/* ==========================================================================
   VallKai Saku – vizuální styl (krvavě rudá / černá, VallKai ekosystém)
   ========================================================================== */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #07070a;
  --bg-2: #0c0c11;
  --panel: rgba(17, 17, 23, 0.86);
  --panel-solid: #111117;
  --panel-2: #17171f;
  --panel-3: #1d1d26;
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);
  --border-red: rgba(225, 29, 46, 0.5);
  --text: #ececf1;
  --text-2: #a3a3b0;
  --text-3: #6c6c7a;
  --red: #e11d2e;
  --red-hi: #ff2b3f;
  --red-dark: #7f0d17;
  --red-soft: rgba(225, 29, 46, 0.14);
  --red-glow: 0 0 0 1px rgba(225, 29, 46, 0.35), 0 0 24px rgba(225, 29, 46, 0.28);
  --green: #22c55e;
  --amber: #f59e0b;
  --violet: #a855f7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
  --font: "Inter Variable", Inter, "Segoe UI", Ubuntu, Cantarell, system-ui, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", "Ubuntu Mono", ui-monospace, monospace;
  --topbar-h: 58px;
  --statusbar-h: 30px;
  --sidebar-w: 236px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
#app { height: 100%; }
a { color: var(--red-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
::selection { background: rgba(225, 29, 46, 0.45); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #26262f; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a3a46; }
::-webkit-scrollbar-track { background: transparent; }
.icon { flex: none; display: inline-block; vertical-align: middle; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.red { color: var(--red-hi); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.boot { height: 100%; display: grid; place-items: center; }
.boot img { animation: pulse 1.6s ease-in-out infinite; filter: drop-shadow(0 0 22px rgba(225, 29, 46, 0.6)); }
@keyframes pulse { 50% { opacity: 0.55; transform: scale(0.96); } }

/* ------------------------------------------------------------------ tlačítka */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text);
  cursor: pointer; font-weight: 550; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--panel-3); border-color: rgba(255, 255, 255, 0.2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, .input:focus-visible, .select:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(180deg, #ef2537 0%, #b3111f 100%);
  border-color: #ff3b4e; color: #fff;
  box-shadow: 0 0 18px rgba(225, 29, 46, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { background: linear-gradient(180deg, #ff3346 0%, #c51322 100%); border-color: #ff5566; box-shadow: 0 0 26px rgba(225, 29, 46, 0.5), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-outline { background: transparent; border-color: var(--border-red); color: #ff5a69; }
.btn-outline:hover { background: var(--red-soft); border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); border-color: transparent; }
.btn-danger { background: rgba(225, 29, 46, 0.1); border-color: rgba(225, 29, 46, 0.4); color: #ff6b78; }
.btn-danger:hover { background: rgba(225, 29, 46, 0.2); border-color: var(--red); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.play-btn {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1px solid rgba(225, 29, 46, 0.5); background: rgba(225, 29, 46, 0.12); color: #ff4d5e; cursor: pointer;
  transition: all .15s;
}
.play-btn:hover { background: var(--red); color: #fff; box-shadow: 0 0 16px rgba(225, 29, 46, .6); }
.play-btn.is-running { background: var(--red); color: #fff; animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 20px rgba(225, 29, 46, .75); } }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; }
.segmented button { border: 0; background: transparent; color: var(--text-2); padding: 0 12px; height: 30px; border-radius: 7px; cursor: pointer; font-weight: 550; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: linear-gradient(180deg, rgba(225,29,46,.28), rgba(225,29,46,.14)); color: #fff; box-shadow: inset 0 0 0 1px rgba(225,29,46,.55); }

/* ------------------------------------------------------------------ formuláře */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .02em; }
.field .hint { font-size: 12px; color: var(--text-3); }
.field .error, .form-error { font-size: 12.5px; color: #ff6b78; }
.form-error { padding: 10px 12px; border: 1px solid rgba(225,29,46,.4); background: rgba(225,29,46,.08); border-radius: var(--radius-sm); display: flex; gap: 8px; align-items: flex-start; }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--radius-sm);
  background: rgba(8, 8, 12, 0.75); border: 1px solid var(--border-2); color: var(--text);
  font: inherit; font-size: 13.5px; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3a3b0' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.select option, .select optgroup { background: #15151c; color: var(--text); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(255,255,255,.2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.18); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-left: 40px; }
.input-icon > .suffix { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.input-lg { height: 48px; font-size: 15px; }
.checkbox { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; color: var(--text-2); font-size: 13.5px; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--red); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.swatch.active { border-color: #fff; box-shadow: 0 0 12px currentColor; }
input[type="color"].swatch { padding: 0; background: none; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.7); cursor: pointer; }

/* ------------------------------------------------------------------ odznaky, čipy */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .01em; border: 1px solid var(--border-2); color: var(--text-2); background: rgba(255,255,255,.03); white-space: nowrap; }
.badge-red { color: #ff6372; border-color: rgba(225,29,46,.45); background: rgba(225,29,46,.12); }
.badge-green { color: #4ade80; border-color: rgba(34,197,94,.4); background: rgba(34,197,94,.1); }
.badge-amber { color: #fbbf24; border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.1); }
.badge-violet { color: #c084fc; border-color: rgba(168,85,247,.4); background: rgba(168,85,247,.1); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red-hi); box-shadow: 0 0 0 0 rgba(255, 43, 63, .7); animation: live 1.6s infinite; flex: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255,43,63,.7); } 70% { box-shadow: 0 0 0 9px rgba(255,43,63,0); } 100% { box-shadow: 0 0 0 0 rgba(255,43,63,0); } }

.avatar { border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-weight: 700; color: #fff; overflow: hidden; object-fit: cover; text-transform: uppercase; letter-spacing: .02em; box-shadow: 0 0 0 2px rgba(0,0,0,.6), 0 0 0 3px rgba(255,255,255,.08); }
.avatar-stack { display: inline-flex; }
.avatar-stack > * + * { margin-left: -8px; }

/* ------------------------------------------------------------------ přihlášení */
.auth-screen { position: relative; height: 100%; overflow: auto; display: grid; place-items: center; padding: 40px 20px; isolation: isolate; }
.auth-bg { position: fixed; inset: 0; z-index: -2; background: #000 url(/assets/bg/temple.webp) center 40% / cover no-repeat; }
.auth-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 42% 62% at 50% 52%, rgba(0,0,0,.5) 0%, rgba(0,0,0,.12) 65%, rgba(0,0,0,.4) 100%), linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.3)); }
.embers { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.embers span { position: absolute; bottom: -20px; width: 4px; height: 4px; border-radius: 50%; background: #ff3346; box-shadow: 0 0 10px #ff2b3f, 0 0 20px rgba(255,43,63,.6); animation: ember linear infinite; opacity: 0; }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(var(--dx, 40px), -105vh); opacity: 0; } }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.auth-brand { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.auth-brand::before { content: ""; position: absolute; inset: -20px -110px -10px; z-index: -1; background: radial-gradient(ellipse at 50% 60%, rgba(0,0,0,.62) 0%, rgba(0,0,0,.35) 45%, transparent 72%); pointer-events: none; }
.auth-brand .symbol { width: 132px; height: auto; filter: drop-shadow(0 0 28px rgba(225, 29, 46, 0.55)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.auth-brand .wordmark { width: 300px; height: auto; filter: drop-shadow(0 0 2px rgba(0,0,0,.95)) drop-shadow(0 4px 18px rgba(0,0,0,.9)); }
.auth-brand .tagline { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: #e7e7ee; font-weight: 600; }
.auth-brand .tagline b { color: var(--red-hi); font-size: 20px; letter-spacing: 0; font-weight: 700; text-shadow: 0 0 14px rgba(255,43,63,.7); }
.auth-panel { width: 100%; padding: 26px; border-radius: 16px; background: linear-gradient(180deg, rgba(14,14,19,.82), rgba(8,8,11,.88)); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 80px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.04); backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 14px; }
.auth-panel h1 { margin: 0; font-size: 20px; font-weight: 700; }
.auth-panel p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.auth-panel .divider-red { height: 1px; background: linear-gradient(90deg, var(--red), transparent 70%); margin: 2px 0 4px; }
.auth-foot { font-size: 12px; color: var(--text-3); letter-spacing: .04em; display: flex; gap: 10px; align-items: center; }
.code-input { text-align: center; font-family: var(--mono); font-size: 28px; letter-spacing: .5em; height: 60px; padding-left: .5em; }
.link-btn { background: none; border: 0; color: var(--text-2); cursor: pointer; font-size: 13px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }

/* ------------------------------------------------------------------ rozložení aplikace */
.shell { height: 100%; display: grid; grid-template-rows: var(--topbar-h) 1fr var(--statusbar-h); grid-template-columns: var(--sidebar-w) 1fr; grid-template-areas: "top top" "side main" "status status"; }
.topbar { grid-area: top; display: flex; align-items: center; gap: 18px; padding: 0 16px 0 14px; background: linear-gradient(180deg, #0b0b0f, #08080b); border-bottom: 1px solid rgba(225, 29, 46, 0.28); box-shadow: 0 1px 0 rgba(0,0,0,.8), 0 6px 30px rgba(225,29,46,.06); position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; min-width: calc(var(--sidebar-w) - 30px); cursor: pointer; text-decoration: none !important; }
.brand img.sym { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(225,29,46,.5)); }
.brand img.word { height: 22px; width: auto; }
.brand .sep { width: 1px; height: 22px; background: var(--border-2); }
.brand .app { font-weight: 800; letter-spacing: .22em; font-size: 14px; color: #fff; display: flex; align-items: center; gap: 7px; }
.brand .app b { color: var(--red-hi); font-size: 17px; letter-spacing: 0; text-shadow: 0 0 10px rgba(255,43,63,.6); }
.topbar .spacer { flex: 1; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.05); color: var(--text); }
.icon-btn .count { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 10px rgba(225,29,46,.7); }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text); }
.user-btn:hover { background: rgba(255,255,255,.04); border-color: var(--border); }
.user-btn .who { text-align: left; line-height: 1.2; }
.user-btn .who small { display: block; color: var(--text-3); font-size: 11px; }

.sidebar { grid-area: side; display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; background: linear-gradient(180deg, #0a0a0e, #070709); border-right: 1px solid var(--border); position: relative; overflow: hidden auto; }
.sidebar .section-label { font-size: 10.5px; font-weight: 700; color: var(--text-3); letter-spacing: .16em; text-transform: uppercase; padding: 12px 12px 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px; color: var(--text-2); font-weight: 550; text-decoration: none !important; border: 1px solid transparent; transition: background .15s, color .15s; }
.nav-item:hover { background: rgba(255,255,255,.035); color: var(--text); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(225,29,46,.3), rgba(225,29,46,.06) 80%); border-color: rgba(225,29,46,.35); box-shadow: inset 0 0 22px rgba(225,29,46,.12); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red-hi); box-shadow: 0 0 12px var(--red-hi); }
.nav-item.active .icon { color: var(--red-hi); filter: drop-shadow(0 0 6px rgba(255,43,63,.6)); }
.nav-item .count { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--text-2); background: rgba(255,255,255,.06); border-radius: 6px; padding: 1px 7px; }
.side-card { margin-top: auto; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid rgba(225,29,46,.3); min-height: 168px; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; background: #000 url(/assets/bg/city.webp) 18% 60% / 330% no-repeat; }
.side-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1) 0%, rgba(8,8,11,.92) 68%); }
.side-card > * { position: relative; }
.side-card b { font-size: 13.5px; display: block; }
.side-card small { color: var(--text-2); font-size: 12px; line-height: 1.45; display: block; margin-top: 4px; }
.side-card .bar { height: 3px; margin-top: 12px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.side-card .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red-dark), var(--red-hi)); box-shadow: 0 0 10px var(--red); }
.kanji-mark { position: absolute; left: 14px; bottom: 190px; font-size: 92px; line-height: 1; font-weight: 800; color: rgba(225,29,46,.13); pointer-events: none; user-select: none; font-family: "Noto Serif CJK JP", "Noto Sans CJK JP", serif; }

.main { grid-area: main; overflow: auto; position: relative; background: radial-gradient(ellipse 80% 50% at 70% -10%, rgba(225,29,46,.07), transparent 60%), var(--bg); }
.page { padding: 24px 28px 40px; max-width: 1680px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.statusbar { grid-area: status; display: flex; align-items: center; gap: 18px; padding: 0 16px; font-size: 12px; color: var(--text-3); background: #08080b; border-top: 1px solid var(--border); }
.statusbar .item { display: flex; align-items: center; gap: 7px; }
.statusbar .spacer { flex: 1; }
.env-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; padding: 1px 7px; border-radius: 5px; border: 1px solid; }
.env-badge.dev { color: #fbbf24; border-color: rgba(245,158,11,.45); }
.env-badge.prod { color: #4ade80; border-color: rgba(34,197,94,.45); }

/* ------------------------------------------------------------------ hlavička stránky */
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.page-head .head-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--red-hi); background: linear-gradient(180deg, rgba(225,29,46,.2), rgba(225,29,46,.05)); border: 1px solid rgba(225,29,46,.45); box-shadow: 0 0 24px rgba(225,29,46,.18); }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 750; letter-spacing: -.01em; }
.page-head p { margin: 2px 0 0; color: var(--text-2); font-size: 13.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------ panely a karty */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(255,255,255,.02) inset; position: relative; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.panel-head h2 .icon, .panel-head h3 .icon { color: var(--red-hi); }
.panel-head .more { margin-left: auto; font-size: 12.5px; color: #ff4d5e; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; background: none; border: 0; }
.panel-body { padding: 16px 18px; }
.panel-glow { border-color: rgba(225,29,46,.35); box-shadow: 0 0 0 1px rgba(225,29,46,.08), 0 0 30px rgba(225,29,46,.08); }
.empty { padding: 34px 20px; text-align: center; color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .icon { color: rgba(225,29,46,.55); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(225,29,46,.5), transparent); opacity: .5; }
.stat .stat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--red-hi); background: rgba(225,29,46,.1); border: 1px solid rgba(225,29,46,.3); flex: none; }
.stat .value { font-size: 24px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .label { font-size: 12.5px; color: var(--text-2); font-weight: 500; letter-spacing: 0; }
.stat.warn .stat-icon { color: #fbbf24; background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.35); }

/* ------------------------------------------------------------------ dashboard */
.hero { position: relative; min-height: 236px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(225,29,46,.3); background: #000 url(/assets/bg/temple.webp) center 38% / cover no-repeat; display: flex; align-items: stretch; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,5,8,.96) 0%, rgba(5,5,8,.82) 38%, rgba(5,5,8,.25) 75%, rgba(5,5,8,.45) 100%); }
.hero > * { position: relative; }
.hero-text { padding: 28px 32px; display: flex; flex-direction: column; justify-content: center; gap: 10px; max-width: 640px; }
.hero-kicker { font-size: 12px; letter-spacing: .3em; font-weight: 700; color: var(--red-hi); text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.hero h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; text-shadow: 0 4px 30px rgba(0,0,0,.8); }
.hero h1 span { color: var(--red-hi); text-shadow: 0 0 24px rgba(255,43,63,.5); }
.hero .sub { color: #cfcfd8; font-size: 14px; }
.hero-tags { font-size: 12px; letter-spacing: .35em; color: #e5e5ea; font-weight: 600; display: flex; gap: 12px; align-items: center; margin-top: 2px; }
.hero-tags i { width: 5px; height: 5px; background: var(--red-hi); border-radius: 50%; box-shadow: 0 0 8px var(--red-hi); }
.hero-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.hero-timer { margin-left: auto; align-self: center; margin-right: 28px; padding: 18px 22px; min-width: 300px; border-radius: 14px; background: rgba(8,8,11,.78); border: 1px solid rgba(225,29,46,.5); box-shadow: 0 0 40px rgba(225,29,46,.25); backdrop-filter: blur(6px); display: flex; flex-direction: column; gap: 8px; }
.hero-timer .clock { font-family: var(--mono); font-size: 40px; font-weight: 700; letter-spacing: .02em; color: #fff; text-shadow: 0 0 20px rgba(255,43,63,.6); line-height: 1; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.week-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; align-items: end; height: 190px; padding: 10px 6px 0; position: relative; }
.week-chart .target { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(255,255,255,.14); }
.week-chart .target span { position: absolute; right: 0; top: -18px; font-size: 11px; color: var(--text-3); }
.week-bar { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; cursor: pointer; }
.week-bar .bar { width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, rgba(225,29,46,.85), rgba(127,13,23,.6)); border: 1px solid rgba(255,59,78,.5); min-height: 3px; transition: filter .15s; position: relative; }
.week-bar:hover .bar { filter: brightness(1.25); }
.week-bar.today .bar { background: linear-gradient(180deg, #ff3346, #a50f1c); box-shadow: 0 0 22px rgba(225,29,46,.6); }
.week-bar.empty .bar { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); }
.week-bar .v { font-size: 12px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.week-bar .d { font-size: 12px; color: var(--text-3); font-weight: 600; }
.week-bar.today .d { color: var(--red-hi); }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: rgba(255,255,255,.025); }
.list-item .title { font-weight: 600; }
.list-item .meta { font-size: 12px; color: var(--text-3); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.feed { position: relative; padding: 6px 18px 12px; }
.feed-item { display: flex; gap: 12px; padding: 9px 0; position: relative; }
.feed-item::before { content: ""; position: absolute; left: 15px; top: 40px; bottom: -6px; width: 1px; background: linear-gradient(180deg, rgba(225,29,46,.45), rgba(225,29,46,.05)); }
.feed-item:last-child::before { display: none; }
.feed-item .txt { font-size: 13px; line-height: 1.45; }
.feed-item .when { font-size: 11.5px; color: var(--text-3); }
.team-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.team-row:last-child { border-bottom: 0; }
.team-row .t { font-size: 12px; color: var(--text-3); }

/* ------------------------------------------------------------------ úkoly */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .input-icon { width: 260px; }
.toolbar .select { width: auto; min-width: 160px; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.k-col { background: rgba(12,12,17,.7); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; min-height: 320px; transition: border-color .15s, box-shadow .15s; }
.k-col.drop { border-color: var(--red); box-shadow: 0 0 0 1px rgba(225,29,46,.4), 0 0 30px rgba(225,29,46,.18); }
.k-col-head { display: flex; align-items: center; gap: 9px; padding: 13px 14px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.k-col-head .n { margin-left: auto; font-size: 12px; color: var(--text-2); background: rgba(255,255,255,.06); padding: 1px 8px; border-radius: 6px; }
.k-col-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.k-card { position: relative; padding: 12px 13px 11px; border-radius: 11px; background: linear-gradient(180deg, #16161e, #121218); border: 1px solid var(--border-2); cursor: pointer; display: flex; flex-direction: column; gap: 9px; transition: border-color .15s, transform .15s, box-shadow .15s; overflow: hidden; }
.k-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--pc, var(--red)); box-shadow: 0 0 10px var(--pc, var(--red)); }
.k-card:hover { border-color: rgba(225,29,46,.45); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.k-card.dragging { opacity: .45; }
.k-card.running { border-color: rgba(225,29,46,.7); box-shadow: 0 0 0 1px rgba(225,29,46,.3), 0 0 22px rgba(225,29,46,.2); }
.k-card .k-title { font-weight: 600; font-size: 13.5px; line-height: 1.4; }
.k-card .k-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-3); }
.k-card .play-btn { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; opacity: 0; transition: opacity .15s; }
.k-card:hover .play-btn, .k-card .play-btn.is-running { opacity: 1; }
.progress { height: 4px; background: rgba(255,255,255,.07); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--red-dark), var(--red-hi)); border-radius: 4px; }
.progress.over i { background: linear-gradient(90deg, #b45309, #fbbf24); }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(255,255,255,.02); }
.table tbody tr.clickable { cursor: pointer; }
.table tr:last-child td { border-bottom: 0; }
.overdue { color: #ff6b78 !important; }

/* ------------------------------------------------------------------ výkaz – svislá časová linie */
.tl-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tl-range { display: flex; align-items: center; gap: 6px; }
.tl-range .label { min-width: 230px; text-align: center; font-weight: 700; font-size: 15px; color: var(--text); }
.tl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.tl-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; }
.vline { padding: 6px 22px 16px 8px; }
.vl-row { display: grid; grid-template-columns: 78px 46px minmax(0, 1fr); }
.vl-rail { position: relative; display: flex; justify-content: center; }
.vl-rail::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: rgba(225, 29, 46, .5); box-shadow: 0 0 10px rgba(225, 29, 46, .35); }
.vline > .vl-row:first-child .vl-rail::before { top: 24px; }
.vline > .vl-row:last-child .vl-rail::before { bottom: calc(100% - 20px); }
.vl-time { text-align: right; padding: 16px 2px 0 0; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.vl-time small { display: block; margin-top: 3px; font-weight: 500; font-size: 12px; color: var(--text-3); }
.vl-dot { position: relative; z-index: 1; margin-top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px #111117, 0 0 14px var(--c); }
.vl-row.running .vl-dot { animation: dotpulse 1.6s ease-in-out infinite; }
@keyframes dotpulse { 50% { box-shadow: 0 0 0 4px #111117, 0 0 0 9px color-mix(in srgb, var(--c) 30%, transparent), 0 0 22px var(--c); } }
.vl-card {
  all: unset; box-sizing: border-box; width: 100%; display: flex; flex-direction: column; gap: 6px; margin: 6px 0; padding: 11px 14px 12px;
  border-radius: 12px; cursor: pointer; border: 1px solid var(--border-2); border-left: 3px solid var(--c);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 10%, transparent), rgba(255, 255, 255, .015) 70%);
  transition: border-color .15s, background .15s, transform .15s;
}
.vl-card:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); border-left-color: var(--c); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, transparent), rgba(255, 255, 255, .02) 70%); transform: translateX(3px); }
.vl-card:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.vl-head { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.vl-title { flex: 1; min-width: 0; font-weight: 650; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-dur { font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; color: color-mix(in srgb, var(--c) 65%, white); }
.vl-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.vl-note { font-size: 13px; color: var(--text-2); font-style: italic; }
.vline.week { padding-top: 4px; }
.vline.week > .vl-row:first-child .vl-rail::before { top: 34px; }
.vline.week > .vl-row:last-child .vl-rail::before { bottom: calc(100% - 34px); }
.wk-row .vl-time { padding-top: 22px; }
.wk-wd { display: block; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.wk-row.today .wk-wd { color: var(--red-hi); }
.wk-row.weekend .wk-wd { color: var(--text-3); }
.wk-node { position: relative; z-index: 1; margin-top: 25px; width: 18px; height: 18px; border-radius: 5px; transform: rotate(45deg); background: #111117; border: 2px solid var(--red-hi); box-shadow: 0 0 0 5px #111117, 0 0 16px rgba(255, 43, 63, .55); }
.wk-row.no-entries .wk-node { border-color: rgba(255, 255, 255, .28); box-shadow: 0 0 0 5px #111117; }
.wk-row.today .wk-node { background: var(--red-hi); }
.wk-row.running .wk-node { animation: nodepulse 1.6s ease-in-out infinite; }
@keyframes nodepulse { 50% { box-shadow: 0 0 0 5px #111117, 0 0 0 10px rgba(255, 43, 63, .25), 0 0 24px rgba(255, 43, 63, .8); } }
.wk-card {
  all: unset; box-sizing: border-box; width: 100%; display: flex; flex-direction: column; gap: 10px; margin: 8px 0; padding: 14px 16px;
  border-radius: 14px; cursor: pointer; border: 1px solid var(--border-2);
  background: linear-gradient(90deg, rgba(225, 29, 46, .09), rgba(255, 255, 255, .015) 70%);
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.wk-card:hover { border-color: rgba(225, 29, 46, .6); background: linear-gradient(90deg, rgba(225, 29, 46, .16), rgba(255, 255, 255, .02) 70%); transform: translateX(3px); box-shadow: 0 0 24px rgba(225, 29, 46, .15); }
.wk-card:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.wk-row.today .wk-card { border-color: rgba(225, 29, 46, .55); box-shadow: 0 0 26px rgba(225, 29, 46, .16); }
.wk-row.no-entries .wk-card { background: transparent; border-style: dashed; padding-top: 12px; padding-bottom: 12px; }
.wk-title { font-size: 16px; font-weight: 750; }
.wk-total { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wk-total.zero { font-size: 15px; font-weight: 500; color: var(--text-3); }
.wk-bar { display: flex; gap: 2px; height: 8px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .05); }
.wk-bar i { display: block; min-width: 4px; box-shadow: 0 0 8px currentColor; }
.wk-more { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; color: #ff4d5e; font-weight: 600; }
.wk-row.no-entries .wk-more { color: var(--text-3); }
.wk-card:hover .wk-more { color: #ff6b78; }
.vl-gap .vl-rail::before { background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .25) 0 4px, transparent 4px 9px); box-shadow: none; }
.vl-gap span { padding: 3px 0; font-size: 12px; font-style: italic; color: var(--text-3); }
.vl-plus { position: relative; z-index: 1; margin-top: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: #111117; border: 1px dashed rgba(255, 255, 255, .35); color: var(--text-2); box-shadow: 0 0 0 4px #111117; transition: all .15s; }
.vl-addbtn { all: unset; cursor: pointer; display: inline-block; margin: 8px 0 6px; padding: 5px 12px; border-radius: 8px; border: 1px dashed rgba(255, 255, 255, .16); color: var(--text-3); font-size: 12.5px; font-weight: 600; transition: all .15s; }
.vl-add:hover .vl-plus, .vl-plus:hover { border: 1px solid var(--red-hi); color: #fff; background: var(--red); box-shadow: 0 0 0 4px #111117, 0 0 14px rgba(225, 29, 46, .7); }
.vl-add:hover .vl-addbtn, .vl-addbtn:hover { border-color: rgba(225, 29, 46, .6); color: #ff6b78; }
.vl-row.fresh .vl-card { animation: freshcard 3s ease-out; }
.vl-row.fresh .vl-dot { animation: freshdot .9s ease-out 3; }
@keyframes freshcard { 0%, 35% { box-shadow: 0 0 0 2px var(--c), 0 0 34px color-mix(in srgb, var(--c) 70%, transparent); } 100% { box-shadow: none; } }
@keyframes freshdot { 0% { transform: scale(2); } 100% { transform: scale(1); } }
.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.bar-row .name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; min-width: 0; }
.bar-row .val { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.bar-row .val b { color: var(--text); }
.bar-row .track { grid-column: 1 / -1; height: 6px; background: rgba(255, 255, 255, .06); border-radius: 6px; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 6px; box-shadow: 0 0 10px currentColor; }

/* ------------------------------------------------------------------ modální okna */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(3,3,5,.72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 30px 20px; overflow-y: auto; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 60px); display: flex; flex-direction: column; background: linear-gradient(180deg, #121218, #0c0c10); border: 1px solid rgba(225,29,46,.38); border-radius: 16px; box-shadow: 0 30px 90px rgba(0,0,0,.8), 0 0 40px rgba(225,29,46,.12); animation: pop .18s cubic-bezier(.2,.9,.3,1.2); overflow: hidden; position: relative; }
.modal.lg { max-width: 860px; }
.modal.xl { max-width: 1060px; }
.modal.sm { max-width: 420px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-accent { height: 3px; background: linear-gradient(90deg, var(--c, var(--red)), transparent); box-shadow: 0 0 14px var(--c, var(--red)); flex: none; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex: none; }
.modal-head .mh-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--red-hi); background: rgba(225,29,46,.12); border: 1px solid rgba(225,29,46,.35); flex: none; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.modal-head .sub { font-size: 12.5px; color: var(--text-2); }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: rgba(0,0,0,.25); flex: none; }
.modal-foot .spacer { flex: 1; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; }
.side-fields { display: flex; flex-direction: column; gap: 14px; padding-left: 22px; border-left: 1px solid var(--border); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; align-items: center; font-size: 13.5px; }
.kv > dt { color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.kv > dd { margin: 0; min-width: 0; }
.big-time { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.big-time .range { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.big-time .dur { font-size: 15px; font-weight: 700; color: var(--red-hi); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--text-2); font-weight: 600; cursor: pointer; position: relative; display: inline-flex; gap: 8px; align-items: center; }
.tabs button.active { color: #fff; }
.tabs button.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--red-hi); box-shadow: 0 0 10px var(--red-hi); }
.tabs .n { font-size: 11px; background: rgba(225,29,46,.2); color: #ff6b78; border-radius: 10px; padding: 0 7px; }
.comment { display: flex; gap: 11px; }
.comment .bubble { flex: 1; padding: 10px 13px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--border); font-size: 13.5px; white-space: pre-wrap; }
.comment .bubble .who { font-size: 12px; color: var(--text-3); margin-bottom: 3px; white-space: normal; }
.comment .bubble .who b { color: var(--text); }
.history-item { display: flex; gap: 10px; font-size: 12.5px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.history-item:last-child { border-bottom: 0; }
.diff { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12px; }
.diff s { color: #ff6b78; text-decoration-color: rgba(255,107,120,.6); }
.diff ins { color: #4ade80; text-decoration: none; }
.qr-box { background: #fff; padding: 10px; border-radius: 12px; width: 212px; height: 212px; box-shadow: 0 0 30px rgba(225,29,46,.35); flex: none; }
.qr-box img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.secret { font-family: var(--mono); font-size: 14px; letter-spacing: .08em; padding: 10px 12px; border-radius: 8px; background: rgba(0,0,0,.4); border: 1px dashed var(--border-2); word-break: break-all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-family: var(--mono); font-size: 15px; letter-spacing: .06em; }
.codes span { padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,.4); border: 1px solid var(--border-2); text-align: center; }
.steps { display: flex; gap: 8px; }
.steps i { height: 3px; flex: 1; border-radius: 3px; background: rgba(255,255,255,.1); }
.steps i.on { background: var(--red-hi); box-shadow: 0 0 8px var(--red-hi); }
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(225,29,46,.35); background: rgba(225,29,46,.07); font-size: 13px; line-height: 1.5; }
.callout .icon { color: var(--red-hi); margin-top: 1px; }
.callout.amber { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.07); }
.callout.amber .icon { color: #fbbf24; }
.callout.green { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.07); }
.callout.green .icon { color: #4ade80; }

/* ------------------------------------------------------------------ časovač v horní liště */
.timer { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 6px 0 14px; border-radius: 12px; border: 1px solid var(--border-2); background: rgba(255,255,255,.025); min-width: 0; max-width: 520px; }
.timer.running { border-color: rgba(225,29,46,.6); background: linear-gradient(90deg, rgba(225,29,46,.16), rgba(225,29,46,.04)); box-shadow: 0 0 24px rgba(225,29,46,.18); }
.timer .what { min-width: 0; line-height: 1.2; cursor: pointer; }
.timer .what b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.timer .what small { display: block; font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.timer .clock { font-family: var(--mono); font-size: 19px; font-weight: 700; color: #fff; letter-spacing: .02em; font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(255,43,63,.5); }
.timer .stop { width: 32px; height: 32px; border-radius: 9px; border: 1px solid #ff3b4e; background: linear-gradient(180deg, #ef2537, #b3111f); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 14px rgba(225,29,46,.5); }
.timer .stop:hover { filter: brightness(1.15); }
.timer-start { height: 40px; }

/* ------------------------------------------------------------------ popover / menu / toast */
.popover { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 240px; background: #111117; border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; animation: pop .14s ease-out; }
.popover.wide { width: 380px; padding: 0; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 8px; background: none; border: 0; text-align: left; color: var(--text); cursor: pointer; font-size: 13.5px; text-decoration: none !important; }
.menu-item:hover { background: rgba(255,255,255,.05); }
.menu-item .icon { color: var(--text-2); }
.menu-item.danger { color: #ff6b78; }
.menu-item.danger .icon { color: #ff6b78; }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.toasts { position: fixed; right: 20px; bottom: 44px; z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 11px; background: #131319; border: 1px solid var(--border-2); box-shadow: var(--shadow); font-size: 13.5px; max-width: 420px; animation: slidein .2s ease-out; }
.toast.success { border-color: rgba(34,197,94,.45); }
.toast.success .icon { color: #4ade80; }
.toast.error { border-color: rgba(225,29,46,.6); }
.toast.error .icon { color: #ff6b78; }
.toast.info .icon { color: var(--red-hi); }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } }

/* ------------------------------------------------------------------ projekty, uživatelé, profil */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.project-card { position: relative; padding: 18px; border-radius: 14px; background: linear-gradient(180deg, #14141b, #0f0f14); border: 1px solid var(--border-2); display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.project-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); box-shadow: 0 0 16px var(--c); }
.project-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); pointer-events: none; }
.project-card h3 { margin: 0; font-size: 17px; }
.project-card p { margin: 0; color: var(--text-2); font-size: 13px; min-height: 38px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card .pstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.project-card .pstats div { display: flex; flex-direction: column; }
.project-card .pstats b { font-size: 16px; font-variant-numeric: tabular-nums; }
.project-card .pstats small { font-size: 11.5px; color: var(--text-3); }
.project-card.archived { opacity: .55; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 20px; align-items: start; }

/* ------------------------------------------------------------------ responzivita */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: 1fr; }
  .tl-layout { grid-template-columns: 1fr; }
  .tl-side { position: static; }
  .hero-timer { display: none; }
}
@media (max-width: 960px) {
  :root { --sidebar-w: 72px; }
  .sidebar .section-label, .nav-item span, .side-card, .kanji-mark, .brand img.word, .brand .sep, .user-btn .who { display: none; }
  .brand { min-width: auto; }
  .nav-item { justify-content: center; padding: 0; }
  .split { grid-template-columns: 1fr; }
  .side-fields { padding-left: 0; border-left: 0; }
  .timer .what { display: none; }
  .page { padding: 18px 16px 30px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .vl-row { grid-template-columns: 52px 34px minmax(0, 1fr); }
  .vline { padding-right: 12px; }
  .brand .app { display: none; }
  .hero h1 { font-size: 26px; }
  .profile-grid { grid-template-columns: 1fr; }
}
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px; color: var(--text-3); }
.modal:focus { outline: none; }
.week-bar .d { white-space: nowrap; }

/* ------------------------------------------------------------------ typy práce, výběr čipů, formulář záznamu */
.chip-missing { color: #fbbf24; background: rgba(245, 158, 11, .08); border: 1px dashed rgba(245, 158, 11, .5); }
.chip-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-picker .pick {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border-2); background: rgba(255, 255, 255, .025); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600;
  transition: all .12s;
}
.chip-picker .pick:hover { color: var(--text); border-color: rgba(255, 255, 255, .25); }
.chip-picker .pick.active { color: #fff; border-color: var(--pc, var(--red)); background: color-mix(in srgb, var(--pc, var(--red)) 22%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--pc, var(--red)) 35%, transparent); }
.form-section { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .015); }
.form-section > h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.form-section > h4 .icon { color: var(--red-hi); }
.form-section.warn { border-color: rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .04); }
.form-section.warn > h4 .icon { color: #fbbf24; }
.quick-durations { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-durations button { height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border-2); background: transparent; color: var(--text-2); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.quick-durations button:hover { color: #fff; border-color: var(--red); }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--text-2); }
.toggle input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 22px; background: rgba(255, 255, 255, .12); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked { background: var(--red); box-shadow: 0 0 12px rgba(225, 29, 46, .5); }
.toggle input:checked::after { transform: translateX(16px); }
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-list .row .input { flex: 1; }
.links-view { display: flex; flex-direction: column; gap: 4px; }
.links-view a { display: inline-flex; align-items: center; gap: 6px; word-break: break-all; font-size: 13px; }
.entry-text { white-space: pre-wrap; line-height: 1.55; }
.vl-flags { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); }
.vl-outcome { font-size: 13px; color: var(--text); display: flex; gap: 6px; align-items: flex-start; }
.vl-outcome .icon { color: #4ade80; margin-top: 2px; }
/* iPad / Safari: nativní pole data a času nesmí přetékat mřížku */
.grid-2 > *, .grid-3 > * { min-width: 0; }
input[type="date"].input, input[type="time"].input { min-width: 0; -webkit-appearance: none; appearance: none; display: block; text-align: left; }
input[type="date"].input::-webkit-date-and-time-value, input[type="time"].input::-webkit-date-and-time-value { text-align: left; }

/* ------------------------------------------------------------------ profilový obrázek */
.avatar-picker { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar-edit { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; line-height: 0; }
.avatar-edit:disabled { cursor: wait; }
.avatar-edit-overlay { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .15s; box-shadow: inset 0 0 0 2px var(--red); }
.avatar-edit:hover .avatar-edit-overlay, .avatar-edit:focus-visible .avatar-edit-overlay, .avatar-edit:disabled .avatar-edit-overlay { opacity: 1; }

/* ------------------------------------------------------------------ výběr přístupů, nápověda */
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border-2); background: rgba(255, 255, 255, .02); cursor: pointer; font-size: 13px; transition: border-color .12s, background .12s; min-width: 0; }
.pick-row:hover { border-color: rgba(255, 255, 255, .25); }
.pick-row.on { border-color: rgba(225, 29, 46, .6); background: rgba(225, 29, 46, .1); }
.pick-row input { width: 16px; height: 16px; accent-color: var(--red); flex: none; }
.help-text { margin: 0; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.help-page { max-width: 980px; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; align-items: start; }
.help-card h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.help-card h3 .icon { color: var(--red-hi); }
.help-card ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.help-card li b { color: var(--text); }
.role-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.role-table th, .role-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.role-table th { color: var(--text-3); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.role-table td.yes { color: #4ade80; } .role-table td.no { color: var(--text-3); }
.history-item .history-del { opacity: .85; flex: none; align-self: flex-start; color: #ff8a94; border: 1px solid rgba(225,29,46,.35); }
.history-item:hover .history-del, .history-del:focus-visible { opacity: 1; color: #ff6b78; }
@media (hover: none) { .history-item .history-del { opacity: 1; } }
.history-head { display: flex; align-items: center; gap: 8px; }
.history-head .btn { margin-left: auto; }

/* ---------------------------------------------------------------- dokumenty */
.docs-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.docs-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.docs-cat { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; text-align: left; }
.docs-cat .icon { color: var(--c); flex: none; }
.docs-cat:hover { background: rgba(255,255,255,.04); color: var(--text); }
.docs-cat.active { background: color-mix(in srgb, var(--c) 16%, transparent); color: #fff; box-shadow: inset 2px 0 0 var(--c); }
.docs-cat.archived { opacity: .55; }
.docs-cat .n { font-size: 11.5px; color: var(--text-3); background: rgba(255,255,255,.05); border-radius: 10px; padding: 1px 8px; }
.docs-manage { margin-top: 6px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text-3); padding: 10px; font: inherit; font-size: 12.5px; display: flex; gap: 8px; align-items: center; cursor: pointer; }
.docs-manage:hover { color: var(--text); }
.docs-intro { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-left: 3px solid var(--c); }
.docs-intro .di-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.docs-intro h3 { margin: 0; font-size: 16px; }
.docs-intro p { margin: 2px 0 4px; color: var(--text-2); font-size: 13px; }
.docs-intro small { font-size: 12px; }
.doc-row .doc-when { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.file-badge { flex: none; position: relative; display: grid; place-items: end center; padding-bottom: 5px; border-radius: 6px 12px 6px 6px; background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 26%, #16161c), color-mix(in srgb, var(--fc) 10%, #111116)); border: 1px solid color-mix(in srgb, var(--fc) 55%, transparent); }
.file-badge b { font-size: 9.5px; letter-spacing: .04em; color: var(--fc); font-weight: 800; }
.file-badge::before { content: ""; position: absolute; top: 7px; left: 22%; right: 22%; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--fc) 45%, transparent); box-shadow: 0 5px 0 color-mix(in srgb, var(--fc) 30%, transparent), 0 10px 0 color-mix(in srgb, var(--fc) 20%, transparent); }
.doc-head { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.02); }
.doc-preview { display: block; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #0a0a0d; text-align: center; }
.doc-preview img { max-width: 100%; max-height: 360px; display: block; margin: 0 auto; }
.hash { font-size: 11.5px; word-break: break-all; color: var(--text-2); min-width: 0; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 26px 18px; border: 1.5px dashed rgba(225,29,46,.45); border-radius: 14px; background: rgba(225,29,46,.04); color: var(--text-2); text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone .icon { color: var(--red-hi); }
.dropzone:hover, .dropzone.over { background: rgba(225,29,46,.1); border-color: var(--red-hi); }
.dropzone.has-file { flex-direction: row; padding: 14px 16px; border-style: solid; }
.cat-edit { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.015); }
.cat-edit.new { border-style: dashed; }
.icon-select { width: 130px; flex: none; }
.update-banner { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; border-radius: 12px; background: #18181d; border: 1px solid rgba(225,29,46,.55); box-shadow: 0 10px 40px rgba(0,0,0,.5), 0 0 24px rgba(225,29,46,.25); font-size: 13.5px; }
.update-banner > .icon { color: var(--red-hi); }
@media (max-width: 960px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .docs-cat { width: auto; }
  .doc-row .doc-when { display: none; }
}

/* ---------------------------------------------------------------- psané dokumenty */
.modal.xl { max-width: 1180px; }
.md-title { font-size: 18px; font-weight: 650; }
.md-meta { padding: 10px 14px; }
.md-meta .link-btn { display: flex; width: 100%; align-items: center; gap: 6px; font-weight: 600; }
.md-views button { height: 28px; }
.md-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 420px; }
.md-editor.view-write, .md-editor.view-preview { grid-template-columns: 1fr; }
.md-pane { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.md-toolbar { display: flex; flex-wrap: wrap; gap: 3px; padding: 5px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); }
.md-tool { min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; display: inline-grid; place-items: center; }
.md-tool:hover { background: rgba(225,29,46,.16); color: #fff; }
.md-tool.b { font-weight: 850; }
.md-tool.i { font-style: italic; font-family: Georgia, serif; }
.md-sep { width: 1px; margin: 4px 3px; background: var(--border); }
.md-input { flex: 1; min-height: 380px; resize: vertical; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13.5px; line-height: 1.6; }
.md-help { font-size: 12px; color: var(--text-3); }
.md-help summary { cursor: pointer; }
.md-help div { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.md-help code { color: #ff8a94; }
.md-preview { border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; background: rgba(255,255,255,.015); overflow: auto; max-height: 620px; }
.md-note { max-width: 420px; }
.md-sheet { border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; background: rgba(255,255,255,.015); max-height: 55vh; overflow: auto; }
.md-body { font-size: 14px; line-height: 1.65; color: var(--text); overflow-wrap: anywhere; }
.md-body > :first-child { margin-top: 0; }
.md-body h1 { font-size: 22px; margin: 18px 0 8px; }
.md-body h2 { font-size: 17px; margin: 16px 0 6px; }
.md-body h3 { font-size: 14.5px; margin: 14px 0 4px; color: #ff6b78; }
.md-body p { margin: 0 0 10px; }
.md-body ul, .md-body ol { margin: 0 0 10px; padding-left: 22px; }
.md-body li::marker { color: var(--red-hi); }
.md-body li.task { list-style: none; margin-left: -20px; display: flex; gap: 8px; align-items: baseline; }
.md-body li.task .box { width: 14px; height: 14px; flex: none; border-radius: 4px; border: 1.5px solid var(--text-3); position: relative; top: 2px; }
.md-body li.task.done .box { background: var(--red); border-color: var(--red); box-shadow: inset 0 0 0 2px #121218; }
.md-body li.task.done { color: var(--text-2); }
.md-body blockquote { margin: 0 0 10px; padding: 6px 14px; border-left: 3px solid var(--red); color: var(--text-2); background: rgba(225,29,46,.06); border-radius: 0 8px 8px 0; }
.md-body code { font-family: ui-monospace, monospace; font-size: 12.5px; padding: 1px 6px; border-radius: 5px; background: rgba(255,255,255,.07); color: #ff9aa3; }
.md-body hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.md-body table { border-collapse: collapse; width: 100%; margin: 0 0 12px; font-size: 13px; }
.md-body th, .md-body td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.md-body th { background: rgba(225,29,46,.12); font-weight: 650; }
.md-body a { color: #ff6b78; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.tpl-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left; padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.02); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.tpl-card .icon { color: var(--red-hi); }
.tpl-card small { color: var(--text-3); font-size: 12px; }
.tpl-card:hover { border-color: rgba(225,29,46,.6); background: rgba(225,29,46,.08); }
.versions { display: grid; grid-template-columns: 260px 1fr; gap: 14px; min-height: 360px; }
.versions-list { padding: 6px; display: flex; flex-direction: column; gap: 2px; max-height: 60vh; overflow: auto; }
.version-item { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.version-item small { display: block; font-size: 11.5px; }
.version-item .vn { font-weight: 800; color: var(--red-hi); min-width: 28px; }
.version-item:hover { background: rgba(255,255,255,.04); }
.version-item.active { background: rgba(225,29,46,.14); color: #fff; }
.versions-view { padding: 16px 20px; max-height: 60vh; overflow: auto; }
@media (max-width: 960px) {
  .md-editor { grid-template-columns: 1fr; }
  .md-editor.view-split .md-preview { display: none; }
  .versions { grid-template-columns: 1fr; }
}
