/* Estilos da sala de revisao. Externalizado do HTML pra permitir CSP estrita (sem style inline). */
:root{
  --bg:#0f0f0f; --surface:#181818; --surface2:#212121; --surface3:#272727; --hover:#3f3f3f;
  --border:#303030; --border2:#3f3f3f;
  --fg:#f1f1f1; --muted:#aaaaaa; --faint:#717171;
  --red:#ff0000; --red-cta:#cc0000; --red-hi:#e60000;
  --blue:#3ea6ff;
  --brand:#e45a95;          /* rosa do logo do canal */
  --brand-wine:#9c2417;     /* vinho do anel do logo */
  --ok:#2ba640;             /* approve (verde, casa com o louro do logo) */
  --ok-bg:rgba(43,166,64,.15);
  --warn:#ffb84d;           /* request changes */
  --warn-bg:rgba(255,184,77,.14);
  --radius:14px; --radius-sm:10px; --pill:999px;
  --t:160ms cubic-bezier(.2,.6,.2,1);
  --maxw:1100px; --mast:56px;
  --input-bg:#121212; --chip-active-bg:var(--fg); --chip-active-fg:#0f0f0f;
  --toast-bg:var(--fg); --toast-fg:#0f0f0f;
  color-scheme:light dark;
}
.views{margin-top:18px}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0; background:var(--bg); color:var(--fg);
  font-family:'Roboto',system-ui,-apple-system,Segoe UI,sans-serif; font-size:15px; line-height:1.5}
a{color:var(--blue); text-decoration:none} a:hover{text-decoration:underline}
::selection{background:rgba(228,90,149,.35); color:#fff}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 24px}
img{display:block}

/* ---------------- masthead (YouTube top bar) ---------------- */
header.mast{position:sticky; top:0; z-index:40; background:var(--bg); height:var(--mast); border-bottom:1px solid transparent}
.mast-in{display:flex; align-items:center; gap:16px; height:var(--mast); max-width:1600px; margin:0 auto; padding:0 18px}
.mast-left{display:flex; align-items:center; gap:10px; flex:0 0 auto}
.mast-avatar{width:30px;height:30px;border-radius:50%;object-fit:cover;background:#000}
.wordmark{font-weight:700; font-size:16px; letter-spacing:-.4px; white-space:nowrap}
.wordmark .imp{color:var(--fg)}
.reviewtag{font-size:10px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:#fff; background:var(--red-cta); padding:2px 6px; border-radius:4px; transform:translateY(-7px); margin-left:-4px}
.mast-search{flex:1 1 auto; display:flex; justify-content:center; min-width:0}
.searchbox{display:flex; width:100%; max-width:480px}
.searchbox input{flex:1; min-width:0; background:var(--input-bg); border:1px solid var(--border); border-right:0; color:var(--fg); border-radius:var(--pill) 0 0 var(--pill); padding:9px 16px; font:inherit; font-size:14px}
.searchbox input:focus{outline:none; border-color:var(--blue); box-shadow:inset 0 0 0 1px var(--blue)}
.searchbox button{flex:0 0 auto; width:60px; background:var(--surface3); border:1px solid var(--border); color:var(--muted); border-radius:0 var(--pill) var(--pill) 0; cursor:pointer; display:flex; align-items:center; justify-content:center}
.searchbox button svg{width:20px;height:20px}
.mast-right{display:flex; align-items:center; gap:12px; flex:0 0 auto}
.reviewer{display:flex; align-items:center; gap:7px; font-size:13px; color:var(--muted)}
.reviewer input{background:var(--surface2); border:1px solid var(--border); color:var(--fg); border-radius:var(--pill); padding:7px 12px; font:inherit; font-size:13px; width:118px}
.reviewer input:focus{outline:none; border-color:var(--blue)}

.btn{font:inherit; font-weight:500; font-size:14px; cursor:pointer; border-radius:var(--pill); padding:9px 16px; border:1px solid var(--border2); background:var(--surface3); color:var(--fg); display:inline-flex; align-items:center; gap:8px; min-height:40px; transition:background var(--t),transform var(--t),border-color var(--t),opacity var(--t); white-space:nowrap}
.btn:hover{background:var(--hover)}
.btn:active{transform:translateY(1px)}
.btn:focus-visible{outline:2px solid var(--blue); outline-offset:2px}
.btn.red{background:var(--red-cta); border-color:transparent; color:#fff; font-weight:500}
.btn.red:hover{background:var(--red-hi)}
.btn.ghost{background:transparent}

/* ---------------- channel hero (banner + avatar) ---------------- */
.banner{margin:16px auto 0; max-width:var(--maxw); padding:0 24px}
.banner img{width:100%; height:clamp(120px,21vw,210px); object-fit:cover; border-radius:16px; background:var(--surface2)}
.chrow{display:flex; align-items:center; gap:22px; padding:22px 0 6px; flex-wrap:wrap}
.ch-avatar{width:88px;height:88px;border-radius:50%;object-fit:cover; box-shadow:0 0 0 1px var(--border); flex:0 0 auto; background:#000}
.ch-info{min-width:0; flex:1 1 280px}
.ch-info h1{font-size:clamp(24px,4vw,34px); font-weight:700; letter-spacing:-.5px; margin:0 0 4px}
.ch-meta{color:var(--muted); font-size:13.5px}
.ch-meta b{color:var(--fg); font-weight:500}
.ch-sub{color:var(--fg); font-size:14px; margin-top:8px}
.ch-sub .dimr{color:var(--muted)}
.intro-note{margin-top:12px; color:var(--muted); font-size:13.5px}

/* ---------------- sticky sub-bar (counts + progress + filter chips) ---------------- */
.subbar{position:sticky; top:var(--mast); z-index:30; background:var(--bg); padding:14px 0 6px; margin-top:10px; border-bottom:1px solid var(--border)}
.counts{display:flex; gap:18px; flex-wrap:wrap; font-size:13px; color:var(--muted); align-items:center}
.count b{color:var(--fg); font-weight:500; font-variant-numeric:tabular-nums}
.count.ok b{color:var(--ok)} .count.warn b{color:var(--warn)}
.progress{height:4px; border-radius:var(--pill); background:var(--surface3); margin:12px 0; overflow:hidden}
.progress > i{display:block; height:100%; width:0; border-radius:var(--pill); background:var(--red); transition:width var(--t)}
.chips{display:flex; gap:9px; flex-wrap:wrap}
.chip{font-size:13px; font-weight:500; padding:7px 13px; border-radius:var(--pill); border:none; background:var(--surface3); color:var(--fg); cursor:pointer; transition:var(--t); min-height:34px}
.chip:hover{background:var(--hover)}
.chip[aria-pressed="true"]{background:var(--chip-active-bg); color:var(--chip-active-fg)}

/* ---------------- section cards ---------------- */
.sec-label{font-size:13px; font-weight:500; letter-spacing:.3px; text-transform:uppercase; color:var(--faint); margin:30px 2px 12px}
section.block{margin:12px 0}
.card{position:relative; background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; overflow:hidden; transition:border-color var(--t)}
.card::before{content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:transparent; transition:background var(--t)}
.card[data-status="approved"]::before{background:var(--ok)}
.card[data-status="changes"]::before{background:var(--warn)}
.card.hidden{display:none}
.card-head{display:flex; align-items:center; gap:12px; flex-wrap:wrap}
.tc{font-size:12px; font-weight:700; letter-spacing:.5px; color:#fff; background:var(--brand-wine); border-radius:6px; padding:4px 8px; line-height:1; white-space:nowrap}
.sec-name{font-weight:500; font-size:18px; flex:1 1 200px; min-width:0}
.statuspill{font-size:12px; font-weight:500; padding:4px 11px; border-radius:var(--pill); background:var(--surface3); color:var(--faint)}
.statuspill[data-s="approved"]{color:var(--ok); background:var(--ok-bg)}
.statuspill[data-s="changes"]{color:var(--warn); background:var(--warn-bg)}

.vo{font-size:17px; line-height:1.62; color:var(--fg); margin:14px 0 2px; font-weight:300}
.vo p{margin:0 0 12px} .vo p:last-child{margin:0}
.notes{display:grid; gap:8px; margin-top:15px; padding-top:14px; border-top:1px solid var(--border)}
.note{display:flex; gap:12px; font-size:13.5px; color:var(--muted)}
.note .k{font-size:11px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:var(--faint); flex:0 0 80px; padding-top:1px}
.note .v{flex:1} .note.onscreen .v{color:#cfe3e6}

.opts{display:grid; gap:9px; margin:14px 0 2px}
.opt{display:flex; gap:11px; align-items:flex-start; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); cursor:pointer; transition:var(--t); font-size:15px}
.opt:hover{background:var(--surface3)}
.opt input{margin-top:3px; accent-color:var(--brand); width:16px; height:16px}
.opt.sel{border-color:var(--brand); background:rgba(228,90,149,.08)}

.actions{display:flex; gap:9px; flex-wrap:wrap; margin-top:16px; align-items:center}
.act{font:inherit; font-weight:500; font-size:13.5px; cursor:pointer; border-radius:var(--pill); padding:8px 14px; border:1px solid var(--border2); background:var(--surface3); color:var(--fg); display:inline-flex; align-items:center; gap:7px; min-height:38px; transition:var(--t)}
.act:hover{background:var(--hover)}
.act:focus-visible{outline:2px solid var(--blue); outline-offset:2px}
.act svg{width:16px;height:16px}
.act.approve[aria-pressed="true"]{background:var(--ok); border-color:transparent; color:#fff}
.act.changes[aria-pressed="true"]{background:var(--warn); border-color:transparent; color:#1a1300}
.act.comment{margin-left:auto}

.comments{margin-top:14px; display:none} .comments.open{display:block}
.notebox{margin-top:14px}
.notelbl{font-size:12px; color:var(--muted); margin-bottom:7px}
.notebox .cbox{align-items:flex-end}
.noteta{min-height:84px; max-height:260px; overflow:auto}
.micbtn{flex:0 0 auto; width:48px; height:48px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:var(--surface3); border:1px solid var(--border2); color:var(--fg); cursor:pointer; transition:var(--t)}
.micbtn:hover{background:var(--hover)}
.micbtn:focus-visible{outline:2px solid var(--blue); outline-offset:2px}
.micbtn svg{width:20px; height:20px}
.micbtn.rec{background:var(--red-cta); border-color:transparent; color:#fff; animation:recpulse 1.3s infinite}
.clist{display:grid; gap:9px; margin-bottom:10px}
.cmt{background:var(--surface3); border-radius:var(--radius-sm); padding:10px 12px; font-size:14px}
.cmt .who{font-size:11.5px; color:var(--faint); margin-bottom:3px; display:flex; justify-content:space-between; gap:10px}
.cmt .who button{background:none;border:none;color:var(--faint);cursor:pointer;font-size:11.5px;padding:0}
.cmt .who button:hover{color:var(--warn)}
.cbox{display:flex; gap:9px; align-items:flex-end}
.cbox textarea{flex:1; background:var(--input-bg); border:1px solid var(--border); color:var(--fg); border-radius:var(--radius-sm); padding:11px 12px; font:inherit; font-size:14px; resize:vertical; min-height:42px; line-height:1.5}
.cbox textarea:focus{outline:none; border-color:var(--blue)}

details.prodnotes{margin:28px 0 8px; background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius); padding:2px 18px}
details.prodnotes summary{cursor:pointer; font-weight:500; font-size:14px; color:var(--muted); padding:14px 0; list-style:none}
details.prodnotes summary::-webkit-details-marker{display:none}
details.prodnotes summary::before{content:"\25B8 "; color:var(--red)}
details.prodnotes[open] summary::before{content:"\25BE "}
details.prodnotes ul{margin:0 0 16px; padding-left:18px; color:var(--muted); font-size:13.5px; line-height:1.7}
details.prodnotes a{word-break:break-word}

.empty{display:none; text-align:center; color:var(--muted); padding:50px 20px}
.empty.show{display:block}

footer{padding:36px 0 60px; color:var(--faint); font-size:12.5px; text-align:center}

.toast{position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(18px); opacity:0; pointer-events:none; background:var(--toast-bg); color:var(--toast-fg); padding:11px 18px; border-radius:8px; font-size:14px; font-weight:500; z-index:60; transition:var(--t)}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0)}

.modal{position:fixed; inset:0; background:rgba(0,0,0,.7); display:none; align-items:center; justify-content:center; z-index:50; padding:20px}
.modal.open{display:flex}
.sheet{background:var(--surface2); border:1px solid var(--border2); border-radius:var(--radius); max-width:640px; width:100%; max-height:86vh; overflow:auto}
.sheet h3{font-weight:500; font-size:18px; margin:0; padding:20px 22px 0}
.sheet .desc{color:var(--muted); font-size:13.5px; padding:6px 22px 0}
.sheet pre{margin:16px 22px; background:#0d0d0d; border:1px solid var(--border); border-radius:10px; padding:16px; font-size:12.5px; line-height:1.6; white-space:pre-wrap; word-break:break-word; max-height:42vh; overflow:auto; color:#dcdcdc; font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.sheet-actions{display:flex; gap:10px; flex-wrap:wrap; padding:0 22px 22px}

@media (max-width:720px){
  .mast-search{display:none}
  .reviewer span{display:none}
  .ch-avatar{width:64px;height:64px}
}
.topnav{display:flex; gap:8px; flex:0 0 auto}
a.chip{text-decoration:none}
a.chip:hover{text-decoration:none}

/* duracao estimada */
.dur{font-size:11px; color:var(--faint); font-variant-numeric:tabular-nums; background:var(--surface3); border-radius:6px; padding:3px 7px; line-height:1}
/* marca de resolvido */
.statuspill[data-s="resolved"]{color:var(--blue); background:rgba(62,166,255,.14)}
.act.resolved{background:var(--ok); border-color:transparent; color:#fff}

/* formulario (brief) */
.form{max-width:680px}
.field{display:block; margin-top:16px}
.field>.lbl{display:block; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:6px}
.fld{width:100%; background:var(--input-bg); border:1px solid var(--border); color:var(--fg); border-radius:10px; padding:12px 14px; font:inherit; font-size:15px; line-height:1.5}
.fld:focus{outline:none; border-color:var(--blue)}
textarea.fld{resize:vertical; min-height:96px}

/* card do brief */
.brief-card{background:var(--surface2); border:1px solid var(--border); border-radius:14px; padding:16px 18px; margin:6px 0}
.brief-card .lbl{font-size:11px; color:var(--faint); text-transform:uppercase; letter-spacing:.5px; margin-top:10px}
.brief-topic{font-size:17px; font-weight:600; margin-top:4px}
.brief-text{white-space:pre-wrap; margin-top:8px; color:var(--fg); line-height:1.55}
.brief-card a{word-break:break-word}

/* banner de status */
.statusbanner{border-radius:12px; padding:12px 16px; font-weight:600; font-size:14px; margin:12px 0}
.statusbanner.ready{background:var(--ok-bg); color:var(--ok)}
.statusbanner.draft{background:var(--warn-bg); color:var(--warn)}

/* preview do YouTube (titulo + thumbnail) */
.yt-thumb{position:relative; aspect-ratio:16/9; border-radius:12px; overflow:hidden; display:flex; align-items:flex-end;
  background:#0a0a0a url('./banner.jpg') center/cover no-repeat}
.yt-thumb::before{content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.7))}
.yt-thumb-text{position:relative; font-weight:800; font-size:clamp(22px,5vw,44px); line-height:1.02; letter-spacing:.5px;
  color:#fff; text-transform:uppercase; text-shadow:0 2px 10px rgba(0,0,0,.75); padding:14px 16px}
.yt-meta{display:flex; gap:12px; margin-top:12px; align-items:flex-start}
.yt-ava{width:36px; height:36px; border-radius:50%; flex:0 0 auto; object-fit:cover}
.yt-title{font-size:16px; font-weight:600; line-height:1.3}
.yt-ch, .yt-sub{font-size:13px; color:var(--muted)}
.act.mic.rec{background:var(--red-cta); border-color:transparent; color:#fff; animation:recpulse 1.3s infinite}
@keyframes recpulse{0%,100%{box-shadow:0 0 0 0 rgba(255,0,0,.5)}50%{box-shadow:0 0 0 7px rgba(255,0,0,0)}}
@media (prefers-reduced-motion:reduce){*{transition:none !important; animation:none !important}}

/* tema claro automatico (segue o sistema) */
@media (prefers-color-scheme: light){
  :root{
    --bg:#f9f9f9; --surface:#ffffff; --surface2:#ffffff; --surface3:#f2f2f2; --hover:#e8e8e8;
    --border:#e5e5e5; --border2:#d8d8d8;
    --fg:#0f0f0f; --muted:#606060; --faint:#909090;
    --blue:#065fd4;
    --ok:#1a7f37; --ok-bg:rgba(26,127,55,.12);
    --warn:#9a6700; --warn-bg:rgba(154,103,0,.13);
    --input-bg:#ffffff; --chip-active-bg:#0f0f0f; --chip-active-fg:#ffffff;
    --toast-bg:#0f0f0f; --toast-fg:#ffffff;
  }
  header.mast{border-bottom-color:var(--border)}
}
