/* ===== Central do Cliente — design system ===== */
:root {
  --ink:#1A1512; --ink-soft:#4A4038; --ink-faint:#706456;
  --paper:#F3EEE7; --surface:#FBF9F5; --surface-2:#EFE9E0; --line:#E2D9CC;
  --brass:#A9772A; --brass-soft:#C79A4E;
  --emerald:#2E7D5B; --emerald-ink:#1F5B41; --emerald-tint:#E4F0EA;
  --rose:#C0492F; --rose-tint:#F6E4DE;
  --amber-tint:#F5EBD6;
  --shadow:26px 40px 80px -40px rgba(26,21,18,.45);
  --shadow-soft:0 2px 10px -4px rgba(26,21,18,.25);
  --radius:18px;
  --font-display:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
  --font-ui:-apple-system,"SF Pro Text",system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink:#F2EBE1; --ink-soft:#C4B8A8; --ink-faint:#8B7F70;
    --paper:#171310; --surface:#211B16; --surface-2:#2A231C; --line:#382E25;
    --brass:#D9A441; --brass-soft:#B5872F;
    --emerald:#4CB98A; --emerald-ink:#6FD0A5; --emerald-tint:#17362A;
    --rose:#E27A5F; --rose-tint:#3A211A; --amber-tint:#302612;
    --shadow:26px 40px 90px -40px rgba(0,0,0,.7); --shadow-soft:0 2px 12px -4px rgba(0,0,0,.5);
  }
}
:root[data-theme="light"]{--ink:#1A1512;--ink-soft:#4A4038;--ink-faint:#706456;--paper:#F3EEE7;--surface:#FBF9F5;--surface-2:#EFE9E0;--line:#E2D9CC;--brass:#A9772A;--brass-soft:#C79A4E;--emerald:#2E7D5B;--emerald-ink:#1F5B41;--emerald-tint:#E4F0EA;--rose:#C0492F;--rose-tint:#F6E4DE;--amber-tint:#F5EBD6;--shadow:26px 40px 80px -40px rgba(26,21,18,.45);--shadow-soft:0 2px 10px -4px rgba(26,21,18,.25);}
:root[data-theme="dark"]{--ink:#F2EBE1;--ink-soft:#C4B8A8;--ink-faint:#8B7F70;--paper:#171310;--surface:#211B16;--surface-2:#2A231C;--line:#382E25;--brass:#D9A441;--brass-soft:#B5872F;--emerald:#4CB98A;--emerald-ink:#6FD0A5;--emerald-tint:#17362A;--rose:#E27A5F;--rose-tint:#3A211A;--amber-tint:#302612;--shadow:26px 40px 90px -40px rgba(0,0,0,.7);--shadow-soft:0 2px 12px -4px rgba(0,0,0,.5);}

* { box-sizing:border-box; }
[hidden] { display:none !important; }
html,body { margin:0; padding:0; }
body { background:var(--paper); color:var(--ink); font-family:var(--font-ui); -webkit-font-smoothing:antialiased; line-height:1.5; }
a { color:inherit; }

/* ===== topbar ===== */
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px clamp(16px,4vw,44px); border-bottom:1px solid var(--line);
  background:color-mix(in srgb,var(--paper) 84%, transparent); backdrop-filter:blur(8px);
  position:sticky; top:0; z-index:20; }
.brand { display:flex; align-items:center; gap:11px; min-width:0; flex:0 1 auto; }
.tabs { flex:0 0 auto; }
.top-right { flex:0 0 auto; }
.cs-name-txt { overflow:hidden; text-overflow:ellipsis; max-width:150px; }
.brand-mark { width:34px; height:34px; border-radius:10px; flex:none;
  background:linear-gradient(145deg,var(--brass),var(--brass-soft)); display:grid; place-items:center;
  color:#fff; font-family:var(--font-display); font-weight:700; font-size:18px; box-shadow:var(--shadow-soft); }
.brand-name { font-family:var(--font-display); font-size:18px; line-height:1.1; white-space:nowrap; }
.brand-sub { font-size:11px; color:var(--ink-faint); text-transform:uppercase; letter-spacing:.12em; white-space:nowrap; }
@media (max-width:1320px){ .brand-name,.brand-sub{ display:none; } }

.client-switch { position:relative; }
.cs-btn { display:inline-flex; align-items:center; gap:8px; background:var(--surface);
  border:1px solid var(--line); border-radius:999px; padding:4px 10px 4px 4px; cursor:pointer;
  color:var(--ink); font-family:var(--font-ui); font-size:13.5px; font-weight:600; white-space:nowrap; }
.logout { white-space:nowrap; }
.push-btn { display:inline-flex; align-items:center; gap:5px; color:var(--brass); border-color:color-mix(in srgb, var(--brass) 35%, var(--line)); }
.push-btn:hover { background:color-mix(in srgb, var(--brass) 10%, transparent); }
.cs-btn:hover { border-color:var(--brass-soft); }
.avatar-chip { width:28px; height:28px; border-radius:50%; flex:none; display:grid; place-items:center;
  color:#fff; font-weight:700; font-size:11px; font-family:var(--font-display);
  background:radial-gradient(circle at 32% 28%,#E7C68B,#A9772A 62%,#6E4A16); }
.cs-menu { position:absolute; top:calc(100% + 8px); left:0; z-index:40; width:236px;
  background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow);
  padding:6px; display:none; flex-direction:column; gap:2px; }
.cs-menu.open { display:flex; }
.cs-menu .lbl { font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-faint); padding:8px 10px 4px; font-weight:600; }
.cs-item { display:flex; align-items:center; gap:10px; width:100%; background:none; border:0; cursor:pointer;
  text-align:left; padding:8px 10px; border-radius:9px; color:var(--ink); font-family:var(--font-ui); font-size:13.5px; font-weight:500; text-decoration:none; }
.cs-item:hover { background:var(--surface-2); }
.cs-item.active { background:color-mix(in srgb,var(--brass) 12%, var(--surface)); }
.cs-item .mini { width:26px; height:26px; border-radius:50%; flex:none; display:grid; place-items:center; color:#fff; font-size:10px; font-weight:700; font-family:var(--font-display); }
.cs-item .count { margin-left:auto; font-size:11.5px; color:var(--ink-faint); }

.tabs { display:flex; gap:3px; }
.tab { font-size:13px; font-weight:600; color:var(--ink-faint); padding:7px 12px; border-radius:9px; white-space:nowrap; text-decoration:none; }
.tab:hover { color:var(--ink-soft); }
.tab.active { color:var(--brass); background:color-mix(in srgb,var(--brass) 12%, transparent); }
@media (max-width:720px){ .tabs{ gap:0; } .tab{ padding:7px 9px; font-size:12.5px; } }
@media (max-width:440px){ .tab-perf{ display:none; } }

.top-right { display:flex; align-items:center; gap:10px; }
.who-mini { font-size:12.5px; color:var(--ink-faint); }
@media (max-width:600px){ .who-mini{ display:none; } }
.logout { font-size:12.5px; color:var(--ink-soft); text-decoration:none; border:1px solid var(--line); padding:5px 11px; border-radius:999px; }
.logout:hover { background:var(--surface-2); }

/* ===== generic ===== */
.wrap { max-width:1080px; margin:0 auto; padding:clamp(18px,4vw,40px) clamp(16px,4vw,44px) 64px; }
.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:22px; }
.page-head h1 { font-family:var(--font-display); font-weight:600; font-size:clamp(24px,3.4vw,31px); margin:0; letter-spacing:.2px; }
.page-head .kicker { font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:var(--brass); font-weight:600; }
.subhead { font-size:14px; color:var(--ink-soft); margin:5px 0 0; max-width:56ch; }
.chip { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:500; color:var(--ink-soft);
  background:var(--surface-2); border:1px solid var(--line); padding:5px 11px; border-radius:999px; }
.chip.brass { color:var(--brass); background:color-mix(in srgb,var(--brass) 13%, var(--surface)); border-color:color-mix(in srgb,var(--brass) 30%, var(--line)); font-weight:600; }
.chip.ok { color:var(--emerald); background:var(--emerald-tint); border-color:color-mix(in srgb,var(--emerald) 40%, var(--line)); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; font-family:var(--font-ui);
  font-size:14.5px; font-weight:600; padding:11px 18px; border-radius:12px; cursor:pointer; border:1px solid transparent; text-decoration:none; }
.btn.primary { background:var(--emerald); color:#fff; }
.btn.primary:hover { filter:brightness(1.06); }
.btn.ghost { background:transparent; color:var(--ink); border-color:var(--line); }
.btn.ghost:hover { background:var(--surface-2); }
.btn.danger { background:var(--rose); color:#fff; }
.btn.danger:hover { filter:brightness(1.06); }
.btn.danger-outline { background:transparent; color:var(--rose); border-color:color-mix(in srgb, var(--rose) 40%, var(--line)); }
.btn.danger-outline:hover { background:var(--rose-tint); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline:2px solid var(--brass); outline-offset:2px; }

/* ===== login ===== */
.login-wrap { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-card { width:100%; max-width:380px; background:var(--surface); border:1px solid var(--line);
  border-radius:22px; box-shadow:var(--shadow); padding:34px 30px; }
.login-card .brand-mark { width:44px; height:44px; font-size:22px; border-radius:13px; margin-bottom:18px; }
.login-card h1 { font-family:var(--font-display); font-weight:600; font-size:24px; margin:0 0 4px; }
.login-card p.sub { color:var(--ink-faint); font-size:13.5px; margin:0 0 22px; }
.field-lbl { display:block; font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint); margin:0 0 6px; }
.input { width:100%; font-family:var(--font-ui); font-size:15px; color:var(--ink); background:var(--paper);
  border:1px solid var(--line); border-radius:11px; padding:12px 14px; margin-bottom:16px; }
.input::placeholder { color:var(--ink-faint); }
.login-card .btn.primary { width:100%; padding:13px; }
.err { background:var(--rose-tint); color:var(--rose); border:1px solid color-mix(in srgb,var(--rose) 30%, var(--line));
  font-size:13px; padding:10px 12px; border-radius:10px; margin-bottom:16px; }

/* ===== calendar ===== */
.cal-bar { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.cal-nav { display:flex; align-items:center; gap:6px; }
.cal-nav a { width:34px; height:34px; display:grid; place-items:center; border:1px solid var(--line); border-radius:10px; color:var(--ink-soft); text-decoration:none; }
.cal-nav a:hover { background:var(--surface-2); }
.cal-month { font-family:var(--font-display); font-size:20px; font-weight:600; text-transform:capitalize; min-width:180px; }
.legend { display:flex; gap:14px; margin-left:auto; font-size:12px; color:var(--ink-faint); flex-wrap:wrap; }
.legend span { display:inline-flex; align-items:center; gap:6px; }
.ldot { width:9px; height:9px; border-radius:3px; display:inline-block; }
.ldot.pub { background:var(--brass); } .ldot.com { background:var(--emerald); } .ldot.reu { background:#7C6BB0; }

.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:8px; }
.cal-dow { font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-faint); text-align:center; font-weight:600; padding-bottom:2px; }
.cal-cell { background:var(--surface); border:1px solid var(--line); border-radius:12px; min-height:104px;
  padding:8px; display:flex; flex-direction:column; gap:5px; overflow:hidden; }
.cal-cell.pad { background:transparent; border-color:transparent; }
.cal-cell.today { border-color:var(--brass); box-shadow:inset 0 0 0 1px var(--brass); }
.cal-daynum { font-size:12.5px; font-weight:600; color:var(--ink-soft); font-variant-numeric:tabular-nums; }
.cal-cell.today .cal-daynum { color:var(--brass); }
.ev { font-size:11.5px; line-height:1.25; padding:4px 7px; border-radius:7px; color:#fff; text-decoration:none; display:block;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  border:0; width:100%; text-align:left; font-family:inherit; cursor:pointer; }
button.ev:hover { filter:brightness(1.07); }
.ev.more { cursor:default; }
.ev.pub { background:linear-gradient(180deg,var(--brass),var(--brass-soft)); }
.ev.com { background:var(--emerald); }
.ev.reu { background:#7C6BB0; }
.ev.more { background:var(--surface-2); color:var(--ink-soft); }

/* mobile: agenda list instead of tiny grid */
@media (max-width:640px){
  .cal-grid { grid-template-columns:1fr; gap:6px; }
  .cal-dow { display:none; }
  .cal-cell { flex-direction:row; align-items:flex-start; min-height:0; gap:10px; }
  .cal-cell.pad { display:none; }
  .cal-cell.empty-day { display:none; }
  .cal-daynum { min-width:46px; padding-top:2px; }
  .cal-cell .evs { display:flex; flex-direction:column; gap:5px; flex:1; }
  .ev { white-space:normal; }
}

/* ===== approvals list ===== */
.appr-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px; }
.appr-card { display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--line);
  border-radius:16px; overflow:hidden; box-shadow:var(--shadow-soft); text-decoration:none; color:inherit; transition:transform .12s ease; }
.appr-card:hover { transform:translateY(-3px); }
.appr-thumb { aspect-ratio:16/10; position:relative; color:#fff; }
.appr-thumb .fmt { position:absolute; top:10px; left:10px; font-size:10.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  background:rgba(0,0,0,.34); border:1px solid rgba(255,255,255,.3); padding:3px 8px; border-radius:999px; backdrop-filter:blur(3px); }
.appr-thumb .st { position:absolute; bottom:10px; left:10px; font-size:11px; font-weight:700; padding:4px 9px; border-radius:999px; }
.st-wait { background:var(--amber-tint); color:var(--brass); }
.st-approved { background:var(--emerald-tint); color:var(--emerald); }
.st-published { background:var(--surface-2); color:var(--ink-soft); }
.appr-body { padding:12px 14px; display:flex; flex-direction:column; gap:5px; }
.appr-body h3 { font-family:var(--font-display); font-weight:600; font-size:16px; margin:0; }
.appr-body .meta { font-size:12.5px; color:var(--ink-faint); }
.empty-state { text-align:center; color:var(--ink-faint); padding:60px 20px; }

/* ===== approval detail (phone preview) ===== */
.detail { display:grid; grid-template-columns:minmax(0,340px) minmax(0,1fr); gap:clamp(24px,5vw,52px); align-items:start; }
@media (max-width:820px){ .detail{ grid-template-columns:1fr; justify-items:center; } }
.device-col { position:sticky; top:88px; }
@media (max-width:820px){ .device-col{ position:static; } }
.phone { width:320px; max-width:84vw; aspect-ratio:320/660; background:#000; border-radius:44px; padding:11px;
  box-shadow:var(--shadow),0 0 0 1px rgba(0,0,0,.5), inset 0 0 0 2px #26201a; position:relative; }
.screen { position:relative; width:100%; height:100%; border-radius:34px; overflow:hidden; background:#0c0a09; color:#fff; display:flex; flex-direction:column; }
.island { position:absolute; top:9px; left:50%; transform:translateX(-50%); width:92px; height:24px; background:#000; border-radius:14px; z-index:6; }
.reel { position:absolute; inset:0; }
.reel::after { content:""; position:absolute; inset:0; background:radial-gradient(80% 60% at 50% 42%, transparent 40%, rgba(0,0,0,.55) 100%); }
.reel-badge { position:absolute; top:44px; right:14px; z-index:4; font-size:9.5px; letter-spacing:.12em; text-transform:uppercase;
  color:rgba(255,255,255,.82); background:rgba(0,0,0,.32); border:1px solid rgba(255,255,255,.28); padding:4px 9px; border-radius:999px; backdrop-filter:blur(3px); }
.play { position:absolute; top:42%; left:50%; transform:translate(-50%,-50%); width:60px; height:60px; border-radius:50%; z-index:4;
  background:rgba(255,255,255,.14); border:1.5px solid rgba(255,255,255,.5); display:grid; place-items:center; }
.frame-tag { position:absolute; bottom:12px; left:50%; transform:translateX(-50%); z-index:4; font-size:10px; color:rgba(255,255,255,.42); }
.ig-top { position:relative; z-index:5; display:flex; align-items:center; gap:9px; padding:40px 12px 0; }
.ig-av { width:32px; height:32px; border-radius:50%; flex:none; box-shadow:0 0 0 1.5px rgba(255,255,255,.85);
  display:grid; place-items:center; color:#fff; font-weight:700; font-size:13px; font-family:var(--font-display);
  background:radial-gradient(circle at 32% 28%,#E7C68B,#A9772A 60%,#5c3d12); }
.ig-handle { font-size:13.5px; font-weight:600; display:flex; align-items:center; gap:4px; }
.ig-bottom { position:relative; z-index:5; margin-top:auto; padding:0 14px 16px; display:flex; flex-direction:column; gap:8px; }
.ig-cap { font-size:12.5px; line-height:1.42; color:#f3f3f3; }
.ig-cap b { font-weight:600; }
.ig-audio { display:flex; align-items:center; gap:7px; font-size:12px; color:#fff; }
.device-caption { text-align:center; margin:14px auto 0; max-width:300px; font-size:12.5px; color:var(--ink-faint); }
.device-caption strong { color:var(--brass); font-weight:600; }

.panel { width:100%; max-width:560px; display:flex; flex-direction:column; gap:18px; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-soft); overflow:hidden; }
.field { padding:15px 18px; border-bottom:1px solid var(--line); display:flex; flex-direction:column; gap:7px; }
.field:last-child { border-bottom:0; }
.field-label { font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-faint); font-weight:600; }
.field-value { font-size:14.5px; color:var(--ink); line-height:1.5; }
.field-value.muted { color:var(--ink-soft); }
.actions { display:flex; flex-direction:column; gap:12px; }
.btn-row { display:flex; gap:12px; flex-wrap:wrap; }
.btn-row .btn { flex:1 1 auto; min-width:150px; }
.comment { width:100%; resize:vertical; min-height:46px; max-height:160px; font-family:var(--font-ui); font-size:14px;
  color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:12px 14px; }
.reassure { display:flex; align-items:flex-start; gap:10px; font-size:12.5px; color:var(--ink-faint); line-height:1.45; }
.reassure svg { flex:none; margin-top:1px; color:var(--brass); }

/* toast */
.toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(20px); background:var(--ink); color:var(--paper);
  padding:12px 18px; border-radius:12px; font-size:13.5px; font-weight:500; display:flex; align-items:center; gap:9px; z-index:60;
  box-shadow:var(--shadow); opacity:0; pointer-events:none; transition:opacity .3s ease, transform .3s ease; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ===== materiais: envio ===== */
.up-zone { display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  background:var(--surface); border:2px dashed var(--line); border-radius:16px; padding:20px 22px; cursor:pointer;
  transition:border-color .2s ease, background .2s ease; }
.up-zone:hover, .up-zone.over { border-color:var(--brass); background:color-mix(in srgb, var(--brass) 6%, var(--surface)); }
.up-ic { width:52px; height:52px; border-radius:14px; flex:none; display:grid; place-items:center;
  background:color-mix(in srgb, var(--brass) 14%, var(--surface)); color:var(--brass); }
.up-txt { display:flex; flex-direction:column; gap:3px; flex:1; min-width:180px; }
.up-txt b { font-size:15px; }
.up-txt span { font-size:12.5px; color:var(--ink-faint); }
.up-list { display:flex; flex-direction:column; gap:8px; margin-top:14px; max-width:520px; }
.up-item { display:flex; align-items:center; gap:10px; font-size:12.5px; }
.up-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink-soft); }
.up-bar { width:110px; height:6px; border-radius:3px; background:var(--surface-2); overflow:hidden; flex:none; }
.up-bar i { display:block; height:100%; width:0; background:var(--brass); transition:width .2s ease; }
.up-pct { width:46px; text-align:right; color:var(--ink-faint); font-variant-numeric:tabular-nums; }
.up-item.ok .up-bar i { background:var(--emerald); }
.up-item.ok .up-pct { color:var(--emerald); }
.up-item.fail .up-bar i { background:var(--rose); width:100% !important; }
.up-item.fail .up-pct { color:var(--rose); }

/* ===== materiais: galeria ===== */
.mat-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:16px; margin-top:22px; }
@media (max-width:520px){ .mat-grid { grid-template-columns:repeat(2, 1fr); gap:12px; } }
.mat { display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--line);
  border-radius:14px; overflow:hidden; box-shadow:var(--shadow-soft); }
.mat-thumb { position:relative; aspect-ratio:1/1; border:0; padding:0; cursor:pointer; background:#0c0a09; display:block; width:100%; }
.mat-thumb img, .mat-thumb video { width:100%; height:100%; object-fit:cover; display:block; }
.mat-play { position:absolute; inset:0; display:grid; place-items:center; }
.mat-play svg { filter:drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.mat-info { padding:9px 11px 6px; display:flex; flex-direction:column; gap:2px; min-width:0; }
.mat-name { font-size:12.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mat-meta { font-size:11px; color:var(--ink-faint); }
.mat-note { font-size:11.5px; color:var(--ink-soft); font-style:italic; margin-top:2px; }
.mat-actions { display:flex; gap:6px; padding:0 11px 10px; margin-top:auto; }
.mat-btn { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; color:var(--ink-soft);
  background:var(--surface-2); border:1px solid var(--line); border-radius:8px; padding:5px 9px; cursor:pointer; text-decoration:none;
  font-family:var(--font-ui); }
.mat-btn:hover { background:var(--paper); color:var(--ink); }
.mat-btn.danger { color:var(--rose); }
.mat-btn.danger:hover { background:var(--rose-tint); }

/* seleção */
.mat { position:relative; }
.mat-check { position:absolute; top:8px; left:8px; z-index:3; display:grid; place-items:center;
  width:30px; height:30px; border-radius:9px; background:rgba(0,0,0,.35); backdrop-filter:blur(3px);
  cursor:pointer; transition:background .15s ease; }
.mat-check:hover { background:rgba(0,0,0,.5); }
.mat-check input { width:19px; height:19px; accent-color:var(--brass); cursor:pointer; margin:0; }
.mat.picked { outline:2px solid var(--brass); outline-offset:0; }
.mat.picked .mat-check { background:var(--brass); }
.sel-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:20px; }
.sel-all { display:inline-flex; align-items:center; gap:8px; font-size:13.5px; font-weight:600; color:var(--ink-soft); cursor:pointer; }
.sel-all input { width:17px; height:17px; accent-color:var(--brass); cursor:pointer; }
.sel-row .hint-txt { margin:0; }

.sel-bar { position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(14px); z-index:56;
  display:flex; align-items:center; gap:8px; background:var(--ink); color:var(--paper);
  padding:9px 10px 9px 16px; border-radius:14px; box-shadow:var(--shadow);
  opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease; }
.sel-bar.show { opacity:1; transform:translateX(-50%) translateY(0); pointer-events:auto; }
.sel-count { font-size:13.5px; font-weight:600; white-space:nowrap; margin-right:4px; font-variant-numeric:tabular-nums; }
.sel-act { display:inline-flex; align-items:center; gap:6px; font-family:var(--font-ui); font-size:13px; font-weight:600;
  background:var(--paper); color:var(--ink); border:0; border-radius:9px; padding:7px 12px; cursor:pointer; }
.sel-act:hover { filter:brightness(.94); }
.sel-act.danger { background:var(--rose); color:#fff; }
.sel-act.ghost { background:transparent; color:var(--paper); border:1px solid color-mix(in srgb, var(--paper) 30%, transparent); }
.sel-act.ghost:hover { background:color-mix(in srgb, var(--paper) 12%, transparent); }
@media (max-width:720px){
  .sel-bar { left:12px; right:12px; bottom:calc(84px + env(safe-area-inset-bottom)); transform:translateY(14px); justify-content:center; }
  .sel-bar.show { transform:translateY(0); }
}

/* visualizador */
#lightbox { background:rgba(10,8,6,.9); flex-direction:column; gap:14px; }
.lb-stage { max-width:min(92vw, 1000px); max-height:76vh; display:grid; place-items:center; }
.lb-stage img, .lb-stage video { max-width:100%; max-height:76vh; border-radius:10px; display:block; }
.lb-close { position:fixed; top:16px; right:18px; background:rgba(255,255,255,.14); color:#fff; border:0;
  width:38px; height:38px; border-radius:50%; font-size:15px; cursor:pointer; }
.lb-close:hover { background:rgba(255,255,255,.24); }
.lb-dl { text-decoration:none; }

/* ===== painel do administrador ===== */
.admin-cols { display:grid; grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)); gap:clamp(20px, 4vw, 40px); align-items:start; }
.adm-h { font-family:var(--font-display); font-weight:600; font-size:17px; margin:0 0 10px; }
.admin-cols section > .card + .adm-h { margin-top:26px; }
.adm-row { display:flex; align-items:center; gap:11px; padding:11px 14px; border-bottom:1px solid var(--line); }
.adm-row:last-child { border-bottom:0; }
.adm-info { display:flex; flex-direction:column; gap:1px; flex:1; min-width:0; }
.adm-info b { font-size:14px; }
.adm-meta { font-size:11.5px; color:var(--ink-faint); overflow:hidden; text-overflow:ellipsis; }
.adm-form { padding:4px 18px 18px; }

/* ===== histórico (timeline) ===== */
.hist-head { padding:14px 18px 2px; font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-faint); font-weight:600; }
.timeline { list-style:none; margin:0; padding:6px 18px 14px; display:flex; flex-direction:column; }
.tl-item { display:flex; gap:12px; padding:8px 0; position:relative; }
.tl-item:not(:last-child)::before { content:""; position:absolute; left:5px; top:20px; bottom:-8px; width:2px; background:var(--line); }
.tl-dot { width:12px; height:12px; border-radius:50%; flex:none; margin-top:4px; background:var(--ink-faint); box-shadow:0 0 0 3px var(--surface); position:relative; z-index:1; }
.tl-aprovado .tl-dot { background:var(--emerald); }
.tl-revisado .tl-dot { background:var(--rose); }
.tl-ajuste .tl-dot { background:var(--brass); }
.tl-body { font-size:13.5px; line-height:1.45; }
.tl-line b { font-weight:600; }
.tl-role { font-size:10.5px; color:var(--ink-faint); border:1px solid var(--line); border-radius:999px; padding:1px 7px; margin:0 3px; text-transform:uppercase; letter-spacing:.04em; }
.tl-note { font-size:13px; color:var(--ink-soft); font-style:italic; margin-top:3px; }
.tl-when { font-size:12px; color:var(--ink-faint); margin-top:2px; font-variant-numeric:tabular-nums; }

/* ===== formulário de nova publicação ===== */
.post-form { max-width:620px; display:flex; flex-direction:column; gap:16px; }
.post-form .card { padding:6px 20px 18px; }
.ff { display:flex; flex-direction:column; gap:6px; padding-top:14px; }
.ff-row { display:flex; gap:16px; padding-top:0; }
.ff-row .ff { flex:1; }
.post-form .input { margin:0; }
select.input { appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A7D71' stroke-width='2.2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; padding-right:36px; }
textarea.input { resize:vertical; line-height:1.5; }
.input.file { padding:10px 12px; font-size:13px; color:var(--ink-soft); background:var(--paper); }
.opt { text-transform:none; letter-spacing:0; color:var(--ink-faint); font-weight:400; }
.hint-txt { font-size:12.5px; color:var(--ink-faint); margin:2px 0 0; }
.form-actions { display:flex; gap:12px; flex-wrap:wrap; }
@media (max-width:560px){ .ff-row { flex-direction:column; gap:0; } }

/* ===== modal de evento (Notion-like) ===== */
.modal-overlay { position:fixed; inset:0; z-index:80; background:rgba(20,15,12,.42); backdrop-filter:blur(3px);
  display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-overlay[hidden] { display:none; }
.modal { width:100%; max-width:440px; background:var(--surface); border:1px solid var(--line);
  border-radius:18px; box-shadow:var(--shadow); padding:22px 24px 24px; animation:pop .18s ease; }
@keyframes pop { from { transform:translateY(8px) scale(.98); opacity:0; } to { transform:none; opacity:1; } }
.modal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.modal-kind { font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; padding:4px 10px; border-radius:999px; color:#fff; }
.modal-kind.pub { background:var(--brass); }
.modal-kind.com { background:var(--emerald); }
.modal-kind.reu { background:#7C6BB0; }
.modal-close { background:none; border:0; font-size:16px; color:var(--ink-faint); cursor:pointer; line-height:1; padding:4px; }
.modal-close:hover { color:var(--ink); }
.modal-title { font-family:var(--font-display); font-weight:600; font-size:22px; margin:0 0 6px; line-height:1.2; text-wrap:balance; }
.modal-when { font-size:13.5px; color:var(--brass); font-weight:600; margin-bottom:14px; }
.modal-desc { font-size:14.5px; color:var(--ink-soft); line-height:1.55; margin:0 0 18px; }
.modal .btn.primary { width:100%; }
@media (max-width:560px){
  .modal-overlay { align-items:flex-end; padding:0; }
  .modal { max-width:none; border-radius:20px 20px 0 0; padding-bottom:calc(24px + env(safe-area-inset-bottom)); animation:sheet .22s ease; }
  @keyframes sheet { from { transform:translateY(100%); } to { transform:none; } }
}

/* ===== media no reel / sync / upload ===== */
.reel-media { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; background:#000; z-index:1; }
.sync-bar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:0 0 16px;
  background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:10px 14px; }
.sync-bar .btn { padding:8px 14px; font-size:13.5px; }
.sync-hint { font-size:12.5px; color:var(--ink-faint); }
.ics-form { display:flex; gap:10px; flex:1; min-width:260px; }
.ics-form .input { flex:1; }
.sync-flash { font-size:13px; font-weight:600; color:var(--emerald); }
.feed-bar { align-items:flex-start; }
.feed-txt { display:flex; flex-direction:column; gap:3px; flex:1; min-width:220px; }
.feed-txt b { font-size:13.5px; }
.feed-txt em { font-style:normal; color:var(--ink-soft); font-weight:600; }
.ics-url { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11.5px; color:var(--ink-soft);
  background:var(--paper); border:1px solid var(--line); border-radius:8px; padding:7px 10px;
  max-width:100%; overflow-x:auto; white-space:nowrap; }
.upload-form { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.upload-form input[type=file] { font-size:13px; color:var(--ink-soft); max-width:100%; }

/* ===== aviso "adicione à tela de início" (só iPhone, fora do modo app) ===== */
.ios-hint {
  position:fixed; left:12px; right:12px; bottom:calc(84px + env(safe-area-inset-bottom)); z-index:55;
  display:flex; align-items:center; gap:12px;
  background:var(--surface); border:1px solid var(--line); border-radius:16px;
  padding:12px 14px; box-shadow:var(--shadow);
}
.ios-hint-icon { width:40px; height:40px; border-radius:10px; flex:none; }
.ios-hint-txt { display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.ios-hint-txt b { font-size:13.5px; }
.ios-hint-txt span { font-size:12.5px; color:var(--ink-soft); line-height:1.4; }
.ios-share { width:14px; height:14px; vertical-align:-2px; margin:0 1px; color:var(--brass); }
.ios-hint-x { background:none; border:0; color:var(--ink-faint); font-size:14px; cursor:pointer; padding:4px; align-self:flex-start; }
@media (min-width:721px){ .ios-hint { display:none; } }

/* ===== bottom nav (mobile) ===== */
.bottomnav { display:none; }
@media (max-width:720px){
  .topbar .tabs { display:none; }
  .topbar { padding:12px 14px; }
  .wrap { padding-bottom:96px; }
  .bottomnav {
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:50;
    background:color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter:blur(12px);
    border-top:1px solid var(--line); padding:6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bn { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 2px;
    text-decoration:none; color:var(--ink-faint); font-size:10.5px; font-weight:600; }
  .bn.active { color:var(--brass); }
  .bn svg { display:block; }
  .bn-ic { position:relative; display:inline-flex; }
  .bn-badge { position:absolute; top:-5px; right:-8px; min-width:16px; height:16px; padding:0 4px;
    background:var(--brass); color:#fff; font-size:10px; font-weight:700; font-style:normal;
    border-radius:999px; display:grid; place-items:center; }
}

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