/* Lion Review — tema (escuro, no estilo dos apps de revisão de vídeo: fundo quase preto, painéis cinza-grafite,
   destaque violeta). Tokens + componentes base usados por TODAS as telas. Telas específicas: app.css e review.css. */
:root {
  color-scheme: dark;
  --bg: #0c0c0f;          /* fundo da página / player */
  --bg-1: #121216;        /* barra lateral, barra de cima */
  --bg-2: #18181d;        /* cartões, painéis */
  --bg-3: #202027;        /* campos, hover */
  --bg-4: #2a2a33;        /* hover forte, ativo */
  --line: #26262e;        /* bordas */
  --line-2: #33333d;
  --text: #ececf1;
  --text-2: #a9a9b7;
  --text-3: #82828f;
  --accent: #7b6cff;      /* violeta */
  --accent-2: #9a8fff;
  --accent-bg: rgba(123, 108, 255, .14);
  --ok: #34d399;   --ok-bg: rgba(52, 211, 153, .13);
  --warn: #f5b841; --warn-bg: rgba(245, 184, 65, .13);
  --bad: #ff5f6d;  --bad-bg: rgba(255, 95, 109, .13);
  --info: #4ea1ff; --info-bg: rgba(78, 161, 255, .13);
  --r: 10px; --r-sm: 7px; --r-xs: 5px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --top-h: 52px;
  --side-w: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(123, 108, 255, .35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono, .tc { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); } .dim { color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* rolagem fina */
* { scrollbar-width: thin; scrollbar-color: #34343e transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #2f2f39; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background-color: #3d3d49; }

/* ícones (svg inline de icons.js) */
.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.ic-sm { width: 15px; height: 15px; } .ic-lg { width: 22px; height: 22px; }

/* botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text);
  font-weight: 550; font-size: 13.5px; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .12s, border-color .12s, color .12s, opacity .12s;
}
.btn:hover { background: var(--bg-4); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #8a7dff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-3); color: var(--text); }
.btn-danger { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.btn-danger:hover { background: rgba(255, 95, 109, .22); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #06281b; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 15px; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }
.btn-block { width: 100%; }

/* campos */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--bg-1); color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s;
}
.textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.hint { font-size: 12px; color: var(--text-3); }
.err-text { font-size: 12.5px; color: var(--bad); }

/* chave liga/desliga */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 34px; height: 20px; border-radius: 20px; background: var(--bg-4); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #d9d9e3; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* pílula de status */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 22px;
  font-size: 11.5px; font-weight: 650; letter-spacing: .01em; white-space: nowrap; background: var(--bg-3); color: var(--text-2);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.st-needs_review { background: var(--warn-bg); color: var(--warn); }
.pill.st-in_progress { background: var(--info-bg); color: var(--info); }
.pill.st-changes { background: var(--bad-bg); color: var(--bad); }
.pill.st-approved { background: var(--ok-bg); color: var(--ok); }
.badge { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: var(--r-xs); background: var(--bg-4); color: var(--text); font-size: 11px; font-weight: 700; }
.badge-accent { background: var(--accent); color: #fff; }

/* avatar com iniciais */
.av {
  width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  font-size: 11.5px; font-weight: 700; color: #fff; background: #5b5b6b; text-transform: uppercase; letter-spacing: .02em;
}
.av-sm { width: 22px; height: 22px; font-size: 10px; } .av-lg { width: 36px; height: 36px; font-size: 13.5px; }

/* cartão / painel */
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }

/* janela (modal) */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 5, 8, .62); backdrop-filter: blur(2px); }
.modal {
  width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: var(--shadow); animation: lr-pop .14s ease-out;
}
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.modal-h h2 { margin: 0; font-size: 16px; font-weight: 650; flex: 1; }
.modal-b { padding: 8px 18px 4px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; }
@keyframes lr-pop { from { transform: translateY(6px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }

/* menu suspenso */
.menu {
  position: fixed; z-index: 120; min-width: 190px; padding: 5px; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: var(--shadow); animation: lr-pop .1s ease-out;
}
.menu button, .menu a {
  display: flex; width: 100%; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-xs);
  background: none; color: var(--text); font-size: 13px; text-align: left; cursor: pointer; text-decoration: none;
}
.menu button:hover, .menu a:hover { background: var(--bg-3); }
.menu .danger { color: var(--bad); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 2px; }

/* aviso que some sozinho */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 10px 14px;
  border-radius: var(--r); background: #24242c; border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13.5px; animation: lr-pop .14s ease-out;
}
.toast.err { border-color: rgba(255, 95, 109, .45); }
.toast.ok { border-color: rgba(52, 211, 153, .4); }

/* dica ao passar o mouse (data-tip="...") */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 150;
  padding: 5px 8px; border-radius: 6px; background: #2b2b34; color: var(--text); font-size: 12px; font-weight: 500; white-space: nowrap;
  box-shadow: var(--shadow); pointer-events: none;
}
kbd { display: inline-block; min-width: 18px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--bg-3); font: 11px var(--mono); color: var(--text-2); text-align: center; }

/* carregando */
.skel { background: linear-gradient(90deg, #1b1b21 0%, #24242c 50%, #1b1b21 100%); background-size: 200% 100%; animation: lr-skel 1.2s linear infinite; border-radius: var(--r-sm); }
@keyframes lr-skel { to { background-position: -200% 0; } }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: lr-spin .7s linear infinite; }
@keyframes lr-spin { to { transform: rotate(360deg); } }

/* tela vazia */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 56px 16px; text-align: center; color: var(--text-2); }
.empty .ic { width: 40px; height: 40px; color: var(--text-3); }
.empty h3 { margin: 4px 0 0; color: var(--text); font-size: 16px; font-weight: 650; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; letter-spacing: -.01em; color: var(--text); font-size: 15px; }
.logo svg { width: 26px; height: 26px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
