@import url('/fonts/fonts.css');

/* ─── VINCI Panel – barvy podle webu Codice Vinci ─────────────────────────── */
:root {
  --bg: #06090e;
  --bg-2: #0b1017;
  --surface: rgba(17, 25, 37, 0.72);
  --surface-solid: #0f1620;
  --surface-2: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(21, 31, 46, 0.9);
  --border: rgba(212, 175, 55, 0.14);
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #f0e8cd;
  --text-body: rgba(240, 232, 205, 0.86);
  --muted: rgba(240, 232, 205, 0.54);
  --dim: rgba(240, 232, 205, 0.34);
  --gold: #d4af37;
  --gold-2: #f1d77a;
  --gold-ink: #120e03;
  --gold-bg: rgba(212, 175, 55, 0.10);
  --gold-glow: rgba(212, 175, 55, 0.30);
  --blue: #6ea6ef;
  --blue-bg: rgba(74, 143, 231, 0.13);
  --green: #4ade80;
  --green-bg: rgba(34, 197, 94, 0.12);
  --amber: #fbbf24;
  --amber-bg: rgba(245, 158, 11, 0.12);
  --red: #f87171;
  --red-bg: rgba(239, 68, 68, 0.12);
  --glass-blur: saturate(140%) blur(18px);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Cinzel', Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f1e4;
    --bg-2: #efe7d3;
    --surface: rgba(255, 253, 246, 0.82);
    --surface-solid: #fffdf6;
    --surface-2: rgba(80, 60, 10, 0.05);
    --surface-hover: #fffaf0;
    --border: rgba(150, 115, 25, 0.20);
    --border-soft: rgba(60, 45, 10, 0.08);
    --text: #1b1710;
    --text-body: rgba(27, 23, 16, 0.86);
    --muted: rgba(27, 23, 16, 0.58);
    --dim: rgba(27, 23, 16, 0.38);
    --gold: #a8831a;
    --gold-2: #c9a23a;
    --gold-ink: #ffffff;
    --gold-bg: rgba(168, 131, 26, 0.10);
    --gold-glow: rgba(168, 131, 26, 0.25);
    --blue: #2563c9;
    --blue-bg: rgba(37, 99, 201, 0.10);
    --green: #15803d;
    --green-bg: rgba(21, 128, 61, 0.10);
    --amber: #b45309;
    --amber-bg: rgba(217, 119, 6, 0.12);
    --red: #b91c1c;
    --red-bg: rgba(220, 38, 38, 0.10);
    --shadow: 0 1px 2px rgba(60, 45, 10, 0.06), 0 10px 28px -14px rgba(60, 45, 10, 0.25);
    color-scheme: light;
  }
}

/* ─── Základ ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  min-height: 100dvh;
  color: var(--text-body);
  font: 15.5px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
  background:
    radial-gradient(900px 520px at -10% -10%, rgba(212, 175, 55, 0.13), transparent 60%),
    radial-gradient(700px 600px at 110% 110%, rgba(74, 143, 231, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 420px);
  background-attachment: fixed;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1, h2, h3 { color: var(--text); margin: 0; }
h1 { font: 700 1.6rem/1.2 var(--font-display); letter-spacing: 0.02em; }
h1.plain { font: 700 1.35rem/1.3 var(--font); letter-spacing: -0.01em; }
h2 { font: 700 0.78rem/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 28px 0 12px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 0.84rem; }
.gold { color: var(--gold); }
::selection { background: var(--gold-glow); }

main { max-width: 720px; margin: 0 auto; padding: 20px 16px; animation: enter 0.45s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─── Horní lišta ────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-soft);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand img { width: 30px; height: auto; filter: drop-shadow(0 0 10px var(--gold-glow)); }
.wordmark { font: 700 1.05rem/1 var(--font-display); letter-spacing: 0.16em; color: var(--gold); }
.wordmark span { color: var(--text); font-weight: 600; letter-spacing: 0.12em; margin-left: 6px; }
.user-menu { position: relative; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  font: 700 0.9rem var(--font); color: var(--gold-ink);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border: 0; box-shadow: 0 0 0 3px var(--gold-bg);
}
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; animation: enter 0.2s var(--ease);
}
.menu .who { padding: 10px 12px 8px; border-bottom: 1px solid var(--border-soft); margin-bottom: 4px; }
.menu .who b { display: block; color: var(--text); }
.menu button { width: 100%; text-align: left; background: none; border: 0; color: var(--text-body); font: inherit; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.menu button:hover { background: var(--surface-2); }

/* ─── Spodní navigace ────────────────────────────────────────────────────── */
.tabbar {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 4px; padding: 6px;
  width: min(420px, calc(100% - 24px));
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px 7px; border-radius: 16px;
  font-size: 0.72rem; font-weight: 600; color: var(--muted); transition: all 0.25s var(--ease);
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.active { color: var(--gold); background: var(--gold-bg); }

/* ─── Karty a seznamy ────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { justify-content: space-between; }

.task {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  color: inherit; overflow: hidden; transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.task::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--st, var(--dim)); }
.task:hover { border-color: var(--border); background: var(--surface-hover); color: inherit; }
.task:active { transform: scale(0.99); }
.task .title { color: var(--text); font-weight: 700; line-height: 1.35; }
.task .meta { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.task .chev { color: var(--dim); }
.badge {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font: 700 0.8rem var(--font); letter-spacing: 0.04em; color: var(--gold);
  background: var(--gold-bg); border: 1px solid var(--border);
}

/* stavové barvy */
.st-novy { --st: var(--amber); --st-bg: var(--amber-bg); }
.st-bezi { --st: var(--blue); --st-bg: var(--blue-bg); }
.st-hotovo { --st: var(--green); --st-bg: var(--green-bg); }
.st-chyba { --st: var(--red); --st-bg: var(--red-bg); }
.st-schvaleno { --st: var(--gold); --st-bg: var(--gold-bg); }
.st-zamitnuto { --st: var(--dim); --st-bg: var(--surface-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  color: var(--st, var(--muted)); background: var(--st-bg, var(--surface-2));
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.st-bezi::before { animation: pulse 1.2s infinite; box-shadow: 0 0 0 0 currentColor; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }

/* ─── Úvod: pozdrav a souhrn ─────────────────────────────────────────────── */
.hello { color: var(--muted); font-size: 0.9rem; margin-bottom: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 8px; }
.stat { padding: 14px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.stat .n { font: 700 1.7rem/1 var(--font); color: var(--st); }
.stat .l { font-size: 0.74rem; color: var(--muted); margin-top: 6px; line-height: 1.25; }
.stat.on { border-color: var(--st); }

.toolbar { display: flex; gap: 8px; align-items: center; margin: 18px 0 12px; flex-wrap: wrap; }
.segmented { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 999px; }
.segmented button {
  border: 0; background: transparent; color: var(--muted); font: 600 0.84rem var(--font);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: all 0.2s var(--ease);
}
.segmented button.on { background: var(--surface-solid); color: var(--gold); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25); }
.toolbar select { flex: 1; min-width: 150px; padding: 9px 12px; border-radius: 999px; font-size: 0.86rem; }

/* ─── Formuláře ──────────────────────────────────────────────────────────── */
label { display: block; font-weight: 600; font-size: 0.84rem; color: var(--muted); margin: 16px 0 7px; letter-spacing: 0.01em; }
input[type=text], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select option { background: var(--surface-solid); color: var(--text); }
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-bg); }
::placeholder { color: var(--dim); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text-body); margin: 10px 0; font-size: 0.92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }

/* ─── Tlačítka ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 0.92rem var(--font); border-radius: 14px; padding: 12px 18px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  transition: transform 0.15s var(--ease), box-shadow 0.25s, background 0.25s;
}
.btn:hover { color: var(--text); background: var(--surface-hover); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; }
.btn.primary {
  color: var(--gold-ink); border-color: transparent;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 60%, #b8921f);
  box-shadow: 0 8px 24px -8px var(--gold-glow), 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}
.btn.primary:hover { color: var(--gold-ink); box-shadow: 0 10px 30px -6px var(--gold-glow); }
.btn.ok { color: #04130a; border-color: transparent; background: linear-gradient(135deg, #86efac, #22c55e); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); background: transparent; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: default; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.link { background: none; border: 0; color: var(--gold); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }

.fab {
  position: fixed; z-index: 21; right: max(16px, calc(50% - 344px));
  bottom: calc(92px + env(safe-area-inset-bottom));
  border-radius: 999px; padding: 15px 22px 15px 18px;
}

/* ─── Detail úkolu ───────────────────────────────────────────────────────── */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 0.88rem; margin-bottom: 14px; }
.back:hover { color: var(--gold); }
.hero { padding: 20px; }
.hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(90deg, var(--st, var(--gold)), transparent); }
.hero h1 { margin: 10px 0 6px; }
.desc { white-space: pre-wrap; word-break: break-word; color: var(--text-body); margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft); }

.timeline { position: relative; display: flex; flex-direction: column; gap: 10px; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: linear-gradient(var(--border), transparent); }
.ev { position: relative; word-break: break-word; animation: enter 0.35s var(--ease); }
.ev::before { content: ""; position: absolute; left: -19px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--dot, var(--border)); }
.ev .meta { display: flex; align-items: center; gap: 8px; font-size: 0.74rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.ev .meta img { width: 18px; height: auto; }
.ev .body { white-space: pre-wrap; color: var(--text-body); }
.ev.bubble { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; padding: 12px 14px; }
.ev.assistant { --dot: var(--gold); }
.ev.comment { --dot: var(--blue); border-color: color-mix(in srgb, var(--blue) 35%, transparent); }
.ev.result { --dot: var(--green); background: var(--green-bg); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.ev.error { --dot: var(--red); background: var(--red-bg); border-color: color-mix(in srgb, var(--red) 35%, transparent); color: var(--red); }
.ev.error .body { color: var(--red); }
.ev.tool { font: 0.78rem/1.5 var(--mono); color: var(--muted); white-space: pre-wrap; padding: 4px 0 2px; }
.ev.tool::before { width: 6px; height: 6px; left: -17px; top: 10px; border-width: 0; background: var(--dim); }
.ev.system { font-size: 0.78rem; color: var(--dim); padding: 2px 0; }
.ev.system::before { width: 6px; height: 6px; left: -17px; top: 9px; border-width: 0; background: var(--dim); }
.typing { display: inline-flex; gap: 4px; padding: 10px 0 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; } .typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* ─── Projekty ───────────────────────────────────────────────────────────── */
.project { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.project .name { color: var(--text); font-weight: 700; font-size: 1.02rem; }
.project .links { display: flex; gap: 16px; margin-top: 10px; font-size: 0.86rem; font-weight: 600; }

/* ─── Přihlášení ─────────────────────────────────────────────────────────── */
.center-page { max-width: 400px; margin: 7vh auto 0; text-align: center; }
.center-page .logo { width: 104px; height: auto; margin: 0 auto 18px; display: block; filter: drop-shadow(0 0 28px var(--gold-glow)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.center-page .wordmark { font-size: 1.9rem; letter-spacing: 0.22em; display: block; }
.center-page .wordmark span { display: block; margin: 8px 0 0; font-size: 0.8rem; letter-spacing: 0.5em; color: var(--muted); }
.center-page .card { text-align: left; margin-top: 28px; padding: 22px; }
.tagline { color: var(--muted); font-size: 0.9rem; margin-top: 14px; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 18px 0; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty img { width: 54px; opacity: 0.5; margin-bottom: 12px; }
.error-box { color: var(--red); background: var(--red-bg); border-radius: var(--radius-sm); padding: 11px 14px; margin-top: 14px; font-size: 0.9rem; }
.copybox { display: flex; gap: 8px; margin-top: 8px; }
.copybox input { font-size: 0.78rem; }

#toast {
  position: fixed; left: 50%; bottom: calc(160px + env(safe-area-inset-bottom)); transform: translate(-50%, 10px);
  background: var(--surface-solid); color: var(--text); border: 1px solid var(--border);
  padding: 11px 18px; border-radius: 14px; font-size: 0.9rem; font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all 0.3s var(--ease); max-width: calc(100% - 32px); z-index: 30;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 640px) {
  main { padding: 28px 24px; }
  h1 { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ─── Menu: odkazy ───────────────────────────────────────────────────────── */
.menu .menu-item { display: block; color: var(--text-body); padding: 10px 12px; border-radius: 8px; font-weight: 500; }
.menu .menu-item:hover { background: var(--surface-2); color: var(--text); }

/* ─── CRM ────────────────────────────────────────────────────────────────── */
.search { position: relative; margin: 16px 0 12px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 42px; border-radius: 999px; }
.person { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; color: inherit; transition: background 0.25s, border-color 0.25s; }
.person:hover { color: inherit; background: var(--surface-hover); border-color: var(--border); }
.person .title { color: var(--text); font-weight: 700; }
.person .meta { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.ava {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 700 0.85rem var(--font); color: var(--gold); background: var(--gold-bg); border: 1px solid var(--border);
}
.ava.lg { width: 64px; height: 64px; font-size: 1.25rem; }
.ava.co { border-radius: 14px; }
.ava svg { width: 20px; height: 20px; }
.banner {
  display: flex; align-items: center; gap: 12px; color: inherit;
  background: linear-gradient(135deg, var(--gold-bg), transparent); border: 1px solid var(--border);
}
.banner:hover { color: inherit; border-color: var(--gold); }
.banner .n { font: 700 1.4rem var(--font); color: var(--gold); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 14px 0; }
.quick .btn { flex-direction: column; gap: 6px; padding: 12px 8px; font-size: 0.8rem; }
.quick .btn svg { width: 20px; height: 20px; color: var(--gold); }
.fields { display: grid; gap: 12px; margin-top: 16px; }
.field { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }
.field svg { width: 18px; height: 18px; color: var(--muted); margin-top: 2px; }
.field .v { color: var(--text-body); word-break: break-word; }
.field .k { font-size: 0.72rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.mailrow { display: grid; grid-template-columns: auto 1fr; gap: 12px; color: inherit; }
.mailrow:hover { color: inherit; background: var(--surface-hover); }
.mailrow .dir { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.mailrow .dir.in { color: var(--blue); background: var(--blue-bg); }
.mailrow .dir.out { color: var(--green); background: var(--green-bg); }
.mailrow .dir svg { width: 18px; height: 18px; }
.mailrow .top { display: flex; justify-content: space-between; gap: 8px; }
.mailrow .who { color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mailrow .when { color: var(--dim); font-size: 0.75rem; white-space: nowrap; }
.mailrow .subj { color: var(--text-body); font-weight: 600; font-size: 0.9rem; margin-top: 2px; }
.mailrow .snip { color: var(--muted); font-size: 0.82rem; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mailbody { white-space: pre-wrap; word-break: break-word; font-size: 0.92rem; line-height: 1.6; color: var(--text-body); }
.cardphoto { width: 100%; border-radius: 14px; border: 1px solid var(--border-soft); display: block; margin-top: 12px; }
.capture {
  display: grid; place-items: center; gap: 10px; text-align: center; cursor: pointer;
  padding: 34px 16px; border: 1.5px dashed var(--border); border-radius: var(--radius); color: var(--muted);
  background: var(--gold-bg); transition: border-color 0.2s;
}
.capture:hover { border-color: var(--gold); }
.capture svg { width: 42px; height: 42px; color: var(--gold); }
.capture b { color: var(--text); font-size: 1.02rem; }
.reading { display: flex; align-items: center; gap: 12px; color: var(--muted); margin-top: 14px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--gold-bg); border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
.note { border-left: 2px solid var(--border); padding: 2px 0 2px 12px; }
.note .meta { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.note .body { white-space: pre-wrap; margin-top: 2px; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pill-row button { border: 1px solid var(--border-soft); background: var(--surface-2); color: var(--muted); font: 600 0.8rem var(--font); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.pill-row button.on { color: var(--gold); border-color: var(--gold); background: var(--gold-bg); }
.tabbar a { padding-left: 2px; padding-right: 2px; }

/* Výchozí velikost ikon (konkrétní pravidla výše mají přednost) */
:where(main, .menu) svg { width: 20px; height: 20px; flex: none; }
.chev svg { width: 18px; height: 18px; display: block; }
.banner > svg { color: var(--gold); }

/* ─── Spotřeba Clauda ────────────────────────────────────────────────────── */
:root { --series-1: #a8822a; --series-2: #4f86d4; --series-3: #8a8f98; }
@media (prefers-color-scheme: light) { :root { --series-1: #a8831a; --series-2: #2563c9; --series-3: #6b7280; } }
.meters { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
@media (max-width: 420px) { .meters { grid-template-columns: 1fr; } }
.meter-val { font: 700 1.15rem var(--font); color: var(--text); }
.meter-track { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border-soft); margin: 6px 0; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width 0.6s var(--ease); }
.meter.warn .meter-fill { background: var(--amber); }
.meter.warn .meter-val { color: var(--amber); }
.meter.crit .meter-fill { background: var(--red); }
.meter.crit .meter-val { color: var(--red); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.key.lg { width: 6px; height: 100%; min-height: 40px; border-radius: 3px; }
.legend { display: flex; gap: 14px; margin: 10px 0 4px; font-size: 0.8rem; color: var(--text-body); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.bars { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 160px; margin-top: 14px; padding-bottom: 20px; }
.bars .grid { position: absolute; inset: 0 0 20px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.bars .grid i { border-top: 1px dashed var(--border-soft); }
.bar-col { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; cursor: pointer; outline: none; }
.bar-col:hover .stack, .bar-col:focus .stack { filter: brightness(1.15); }
.stack { display: flex; flex-direction: column; gap: 2px; min-height: 0; border-radius: 4px 4px 0 0; overflow: hidden; }
.seg { min-height: 2px; }
.xlab { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 0.66rem; color: var(--dim); }
.tip {
  position: absolute; top: -6px; transform: translate(-50%, -100%); z-index: 3; min-width: 170px;
  background: var(--surface-solid); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
  font-size: 0.76rem; color: var(--text-body); box-shadow: var(--shadow); pointer-events: none;
}
.tip b { color: var(--text); display: block; margin-bottom: 4px; }
.utable { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.utable th, .utable td { text-align: left; padding: 10px 12px; vertical-align: top; }
.utable thead th { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.utable tbody tr + tr th, .utable tbody tr + tr td { border-top: 1px solid var(--border-soft); }
.utable tbody th { color: var(--text); font-weight: 700; white-space: nowrap; }
.utable tbody th .key { margin-right: 8px; }
.limits + .stats { margin-top: 12px; }

/* ─── Katalog programů ───────────────────────────────────────────────────── */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pcard { padding: 0; overflow: hidden; color: inherit; display: flex; flex-direction: column; transition: transform 0.25s var(--ease), border-color 0.25s; }
.pcard:hover { color: inherit; border-color: var(--border); transform: translateY(-2px); }
.pcover { aspect-ratio: 16 / 8; background: center / cover no-repeat var(--surface-2); border-bottom: 1px solid var(--border-soft); }
.pcover.ph { display: grid; place-items: center; background: radial-gradient(120% 140% at 0% 0%, rgba(212, 175, 55, 0.22), transparent 55%), linear-gradient(135deg, var(--surface-solid), var(--bg)); }
.pcover.ph span { font: 700 2rem var(--font-display); color: var(--gold); letter-spacing: 0.08em; opacity: 0.9; }
.pcover.big { aspect-ratio: 16 / 7; border-radius: var(--radius) var(--radius) 0 0; }
.pbody { padding: 14px 16px 16px; }
.pname { color: var(--text); font-weight: 800; font-size: 1.05rem; }
.ptag { color: var(--text-body); font-size: 0.86rem; margin-top: 6px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pmeta { color: var(--muted); font-size: 0.76rem; margin-top: 8px; }
.phero { padding: 0; overflow: hidden; }
.pactions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.pactions .btn.primary:first-child:nth-last-child(4) { grid-column: 1 / -1; }
.linkrow { display: flex; align-items: center; gap: 6px; padding: 10px 0; }
.linkrow + .linkrow { border-top: 1px solid var(--border-soft); }
.linkrow .btn { padding: 9px 12px; }
.lurl { color: var(--text); font-weight: 600; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.micon { font-size: 1.6rem; line-height: 1; }
.mthumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-soft); }
.pub-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.pub-list li::marker { color: var(--gold); }
.pub-shots { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.pub-shots img { height: 220px; width: auto; border-radius: 14px; border: 1px solid var(--border-soft); scroll-snap-align: start; }
.modal-wrap { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); animation: enter 0.25s var(--ease); }
.modal { width: min(420px, 100%); max-height: 90dvh; overflow: auto; padding: 22px; }
.modal-x { position: absolute; right: 10px; top: 10px; padding: 8px; }
.qr { background: #fff; border-radius: 16px; padding: 14px; }
.qr svg { width: 100%; height: auto; display: block; }

/* Veřejná stránka programu */
body.public { padding-bottom: 40px; }
.pub-top { display: flex; justify-content: center; padding: 18px 16px 6px; }
.pub { max-width: 760px; margin: 0 auto; padding: 16px; display: grid; gap: 14px; }
.pub-cover { width: 100%; border-radius: var(--radius); border: 1px solid var(--border-soft); aspect-ratio: 16 / 7; object-fit: cover; }
.pub-head h1 { font-size: 2.1rem; margin: 12px 0 6px; }
.pub-head .chip { margin-right: 6px; }
.pub-tag { font-size: 1.08rem; color: var(--text-body); margin: 0; }
.pub h2 { margin-top: 0; }
.pub-file { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 12px; color: var(--text); }
.pub-file span { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.pub-file:hover { border-color: var(--gold); color: var(--text); }

/* Obálky programů bez obrázku – firemní karta */
.pcover.ph { position: relative; overflow: hidden; display: block; padding: 16px 18px; --tone: 212, 175, 55;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(var(--tone), 0.35), transparent 60%),
    radial-gradient(70% 90% at 0% 100%, rgba(var(--tone), 0.14), transparent 60%),
    linear-gradient(135deg, #111a26, #070b11); }
.pcover.ph.tone-blue { --tone: 74, 143, 231; }
.pcover.ph.tone-emerald { --tone: 52, 211, 153; }
.pcover.ph.tone-violet { --tone: 167, 139, 250; }
.pcover.ph.tone-copper { --tone: 234, 140, 85; }
.pcover.ph::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(120deg, transparent 30%, #000); pointer-events: none; }
.ph-logo { width: 26px; height: auto; opacity: 0.9; position: relative; z-index: 1; }
.ph-name { position: absolute; left: 18px; bottom: 30px; right: 90px; z-index: 1; font: 700 1.35rem/1.1 var(--font-display); color: #f5eed6; letter-spacing: 0.03em; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5); }
.ph-cat { position: absolute; left: 18px; bottom: 12px; z-index: 1; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(var(--tone), 0.95); }
.ph-mono { position: absolute; right: -6px; bottom: -22px; font: 700 6.5rem/1 var(--font-display); color: rgba(var(--tone), 0.13); letter-spacing: -0.02em; }
.pcover.big .ph-name { font-size: 2rem; bottom: 36px; }
.pcover.big .ph-mono { font-size: 9rem; }

/* ─── Nápady ─────────────────────────────────────────────────────────────── */
.capture-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 18px; }
.capture-big { justify-content: flex-start; gap: 14px; padding: 16px 18px; border-radius: 20px; text-align: left; }
.capture-big .mic, .capture-small .mic { font-size: 1.6rem; line-height: 1; }
.capture-big b { display: block; font-size: 1.05rem; }
.capture-big small { display: block; font-weight: 600; opacity: 0.75; font-size: 0.76rem; }
.capture-small { flex-direction: column; gap: 4px; padding: 12px 18px; border-radius: 20px; }
.idea { display: block; color: inherit; overflow: hidden; }
.idea::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--st, var(--dim)); }
.idea:hover { color: inherit; background: var(--surface-hover); border-color: var(--border); }
.idea .title { color: var(--text); font-weight: 700; line-height: 1.35; }
.idea .snip { color: var(--muted); font-size: 0.85rem; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.idea .meta { color: var(--dim); font-size: 0.76rem; margin-top: 8px; white-space: pre; }
.rec { text-align: center; }
.rec-clock { font: 700 2.6rem/1 var(--font); color: var(--text); margin: 12px 0 14px; font-variant-numeric: tabular-nums; }
.rec-level { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 0 auto 22px; max-width: 260px; }
.rec-level i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--red)); transition: width 0.08s linear; }
.rec-btn { width: 92px; height: 92px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; margin: 0 auto;
  background: radial-gradient(circle at 35% 30%, #ff8a80, #dc2626); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.15), 0 10px 30px -8px rgba(239, 68, 68, 0.6); }
.rec-btn span { width: 30px; height: 30px; border-radius: 8px; background: #fff; }
.rec-btn.on { animation: recpulse 1.6s infinite; }
@keyframes recpulse { 0%, 100% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.15), 0 10px 30px -8px rgba(239, 68, 68, 0.6); } 50% { box-shadow: 0 0 0 18px rgba(239, 68, 68, 0.05), 0 10px 30px -8px rgba(239, 68, 68, 0.6); } }
.rec-live { color: var(--red) !important; border-color: var(--red) !important; }
.voice audio { width: 100%; height: 40px; }
.voice .transcript { margin-top: 8px; font-style: italic; }
.tidy { border-color: var(--border); background: linear-gradient(135deg, var(--gold-bg), transparent 70%), var(--surface); margin-top: 12px; }
.tidy .meta { display: flex; align-items: center; gap: 8px; font-size: 0.74rem; color: var(--gold); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.tidy .meta img { width: 18px; }
.tidy .body { white-space: pre-wrap; color: var(--text-body); }
.comment-card .body { color: var(--text-body); }
.tabbar a { font-size: 0.68rem; }
