/* KACO Review: tmavý vzhled jako klientské galerie (Young Serif, skleněné prvky, zlatý akcent) */
@import url('/review/fonts.css');
:root {
  --bg: #121212; --panel: #1a1a1a; --card: #222; --raised: #2a2a2a;
  --fg: #fff; --dim: rgba(255,255,255,.7); --faint: rgba(255,255,255,.46); --line: rgba(255,255,255,.1);
  --glass: rgba(255,255,255,.1); --glass-hover: rgba(255,255,255,.18);
  --accent: #e5b25d; --accent-ink: #1b1406; --red: #ff7a6b; --green: #5bc985; --blue: #7aa7ff;
  --head: 'Young Serif', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --radius: 12px; --gutter: clamp(16px, 3vw, 40px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font-family: var(--sans); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Horní lišta */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; height: 60px; padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top); background: rgba(18,18,18,.86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--head); font-size: 19px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 50%; background: #fff; padding: 2px; }
.brand em { font-style: normal; color: var(--accent); }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--dim); }
.crumbs a { text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { color: #fff; }
.crumbs span { color: var(--faint); }
.bar-space { flex: 1; }
.nav-link { color: var(--dim); text-decoration: none; font-weight: 600; font-size: 14px; }
.nav-link:hover { color: #fff; }

/* Avatar */
.avatar { --size: 32px; flex: none; display: inline-grid; place-items: center; width: var(--size); height: var(--size); border-radius: 50%;
  font-size: calc(var(--size) * .55); line-height: 1; font-weight: 700; color: #1a1a1a; text-decoration: none; user-select: none; }
.avatar-lg { --size: 72px; }
.avatar-sm { --size: 26px; }

/* Tlačítka */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 8px;
  background: var(--glass); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, opacity .15s; }
.btn:hover { background: var(--glass-hover); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: rgba(255,255,255,.82); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #efc47a; }
.btn-danger { background: rgba(255,122,107,.16); color: var(--red); }
.btn-danger:hover { background: rgba(255,122,107,.26); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 7px; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 9px; }

/* Formuláře */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--dim); }
.input, .textarea, .select { width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.05); color: #fff; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: rgba(229,178,93,.7); background: rgba(255,255,255,.07); }
.textarea { resize: vertical; min-height: 72px; line-height: 1.45; }
.hint { color: var(--faint); font-size: 13px; }
.error { color: var(--red); font-size: 14px; }

/* Stránka */
.page { max-width: 1320px; margin: 0 auto; padding: 32px var(--gutter) 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.h1 { margin: 0; font-family: var(--head); font-weight: 400; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.01em; }
.h2 { margin: 0 0 12px; font-family: var(--head); font-weight: 400; font-size: 22px; }
.sub { margin: 6px 0 0; color: var(--dim); }
.section-title { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

/* Mřížka karet (projekty, videa) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 20px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #2a2a2a, #1c1c1c); transition: transform .2s, box-shadow .2s; }
.card:hover .thumb { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.14); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.thumb-empty svg { width: 34px; height: 34px; }
.badge { position: absolute; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700;
  background: rgba(0,0,0,.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.badge-tl { top: 8px; left: 8px; } .badge-tr { top: 8px; right: 8px; } .badge-bl { bottom: 8px; left: 8px; } .badge-br { bottom: 8px; right: 8px; }
.badge-accent { background: var(--accent); color: var(--accent-ink); }
.card-title { font-weight: 650; font-size: 15px; line-height: 1.3; }
.card-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--faint); font-size: 13px; }
.card-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.14); }
.card-progress i { display: block; height: 100%; background: var(--accent); }
.new-card { display: grid; place-items: center; aspect-ratio: 16 / 9; border: 1.5px dashed rgba(255,255,255,.22); border-radius: 10px; color: var(--dim); cursor: pointer; background: none; font-weight: 600; }
.new-card:hover { border-color: var(--accent); color: #fff; }

/* Nahrávání */
.drop { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1.5px dashed rgba(255,255,255,.2); border-radius: var(--radius); background: rgba(255,255,255,.02); }
.drop.is-over { border-color: var(--accent); background: rgba(229,178,93,.07); }
.drop svg { width: 30px; height: 30px; color: var(--accent); flex: none; }
.uploads { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.upload-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--card); }
.upload-row .bar-track { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.upload-row .bar-track i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.upload-row.is-error .bar-track i { background: var(--red); }
.upload-row.is-done .bar-track i { background: var(--green); }
.upload-status { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Přehrávač a komentáře */
.review { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: calc(100vh - 60px); height: calc(100dvh - 60px); }
.stage { display: flex; flex-direction: column; min-width: 0; background: #000; container-type: inline-size; }
/* Úzký přehrávač: bez délky a popisků u skoků mezi komentáři */
@container (max-width: 760px) { .tc-duration, .chip-label { display: none; } .ctl { width: 34px; } }
@container (max-width: 440px) { [data-quality] { max-width: 62px; } .ctl-row { gap: 2px; } }
.video-wrap { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; background: #000; }
.video-wrap video { width: 100%; height: 100%; object-fit: contain; }
.video-state { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--dim); padding: 20px; }
.spinner { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.controls { padding: 10px 16px 14px; background: var(--panel); border-top: 1px solid var(--line); }
.scrub { position: relative; height: 28px; cursor: pointer; touch-action: none; }
.scrub-track { position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.16); }
.scrub-buffer, .scrub-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.scrub-buffer { background: rgba(255,255,255,.22); }
.scrub-fill { background: #fff; }
.scrub-head { position: absolute; top: 7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.15); pointer-events: none; }
.scrub-marker { position: absolute; top: 2px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; border: 2px solid var(--panel); background: var(--accent); cursor: pointer; z-index: 2; }
.scrub-marker.is-range { height: 6px; top: 4px; border-radius: 3px; margin-left: 0; }
.scrub-marker.is-resolved { background: var(--green); }
.scrub-marker.is-active { box-shadow: 0 0 0 3px rgba(229,178,93,.45); }
.ctl-row { display: flex; align-items: center; gap: 6px; }
.ctl { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 8px; background: none; color: #fff; cursor: pointer; }
.ctl:hover { background: var(--glass); }
.ctl svg { width: 22px; height: 22px; }
.tc { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; padding: 0 8px; color: #fff; }
.tc small { color: var(--faint); }
.ctl-space { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; white-space: nowrap; padding: 0 10px; border: 0; border-radius: 7px; background: var(--glass); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { background: var(--glass-hover); }
.chip select { background: none; border: 0; color: #fff; font-weight: 600; cursor: pointer; }
.side { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--line); }
.side-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.side-title { margin: 0; font-family: var(--head); font-weight: 400; font-size: 21px; line-height: 1.2; }
.side-tools { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.comments { flex: 1; overflow-y: auto; padding: 6px 0; scroll-behavior: smooth; }
.comment { padding: 12px 18px; border-bottom: 1px solid var(--line); transition: background .2s; }
.comment.is-active { background: rgba(229,178,93,.07); }
.comment.is-resolved .comment-body { color: var(--faint); }
.comment-head { display: flex; align-items: center; gap: 6px 9px; flex-wrap: wrap; }
.comment-who { font-weight: 650; font-size: 14px; }
.comment-when { color: var(--faint); font-size: 12px; }
.tc-pill { display: inline-flex; align-items: center; height: 22px; white-space: nowrap; flex: none; padding: 0 7px; border: 0; border-radius: 5px; background: rgba(229,178,93,.16); color: var(--accent);
  font-family: var(--mono); font-size: 12px; cursor: pointer; }
.tc-pill:hover { background: rgba(229,178,93,.28); }
.comment-body { margin: 6px 0 0 35px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-actions { display: flex; gap: 4px; margin: 6px 0 0 29px; }
.link-btn { border: 0; background: none; color: var(--faint); font-size: 12px; font-weight: 600; padding: 4px 6px; border-radius: 5px; cursor: pointer; }
.link-btn:hover { color: #fff; background: var(--glass); }
.link-btn.is-on { color: var(--green); }
.replies { margin: 8px 0 0 35px; padding-left: 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.reply .comment-body { margin-left: 35px; }
.reply-form { display: flex; gap: 8px; margin: 8px 0 0 35px; }
.reply-form .textarea { min-height: 40px; padding: 8px 10px; font-size: 14px; }
.composer { padding: 12px 18px 16px; border-top: 1px solid var(--line); background: var(--panel); }
.composer-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.composer .textarea { min-height: 64px; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--accent); }
.empty { padding: 40px 20px; text-align: center; color: var(--faint); }
@media (max-width: 960px) {
  .review { display: block; height: auto; }
  .stage { position: sticky; top: 60px; z-index: 10; }
  .video-wrap { height: 56vw; max-height: 60vh; }
  .side { border-left: 0; }
  .comments { overflow: visible; }
}

/* Dialog, toast */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-box { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 11px 16px; border-radius: 9px; background: #fff; color: #000; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }

/* Přihlášení a pozvánka */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 50% -10%, rgba(229,178,93,.12), transparent 60%), var(--bg); }
.auth-box { width: min(440px, 100%); display: flex; flex-direction: column; gap: 18px; }
.auth-logo { display: flex; align-items: center; gap: 12px; font-family: var(--head); font-size: 22px; }
.auth-logo img { width: 44px; height: 44px; border-radius: 50%; background: #fff; padding: 3px; }
.avatar-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.avatar-pick button { aspect-ratio: 1; border: 2px solid transparent; border-radius: 50%; background: var(--card); font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.avatar-pick button[aria-pressed="true"] { border-color: var(--accent); background: var(--raised); }
.color-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.color-pick button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.color-pick button[aria-pressed="true"] { border-color: #fff; }
.preview-avatar { display: flex; align-items: center; gap: 14px; }

/* Tabulky (lidé, zařízení) */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-main { flex: 1; min-width: 0; }
.list-main strong { display: block; }
.list-main span { color: var(--faint); font-size: 13px; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--glass); font-size: 12px; font-weight: 600; color: var(--dim); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .bar { gap: 10px; } .brand span { display: none; } .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px 12px; } }
