/* ============================================================
   Clipes do DoisQ — direção "Estúdio", acento azul cobalto
   ============================================================ */

:root{
  --bg:#0B0C0E;
  --panel:#0E1013;
  --panel2:#15181C;
  --panel3:#1C2026;
  --line:#23272D;
  --line-soft:#1E2227;

  --txt:#E8EAED;
  --txt-strong:#F2F4F6;
  --dim:#9BA3AC;
  --dimmer:#6E767F;
  --faint:#464D55;

  --accent:oklch(0.62 0.16 248);
  --accent-hi:oklch(0.72 0.15 248);
  --accent-txt:oklch(0.78 0.13 248);
  --accent-ink:#04121C;
  --ok:oklch(0.72 0.13 152);
  --ok-txt:oklch(0.82 0.12 152);
  --danger:#FF6B6B;

  --r-sm:6px; --r:8px; --r-md:11px; --r-lg:14px;
  --rail:306px; --details:272px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0; background:var(--bg); color:var(--txt);
  font:14px/1.45 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing:antialiased;
  display:flex; flex-direction:column; overflow:hidden;
}
.mono{ font-family:'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric:tabular-nums; }
.grow{ flex:1; }
.hidden{ display:none !important; }
.dim{ color:var(--faint); }
svg{ width:16px; height:16px; flex:0 0 auto; }
::selection{ background:var(--accent); color:#fff; }

*::-webkit-scrollbar{ width:9px; height:9px; }
*::-webkit-scrollbar-track{ background:transparent; }
*::-webkit-scrollbar-thumb{ background:#262B31; border-radius:99px; border:2px solid var(--panel); }
*::-webkit-scrollbar-thumb:hover{ background:#333941; }

/* ======================== TOP BAR ======================== */
.topbar{
  flex:0 0 auto; height:60px; display:flex; align-items:center; gap:14px;
  padding:0 20px; background:var(--panel); border-bottom:1px solid var(--line-soft);
}
.brand{ display:flex; align-items:center; gap:10px; background:none; border:0; padding:0; cursor:pointer; font:inherit; }
.brand:hover span{ color:#fff; }
.brand svg{ width:24px; height:24px; }
.brand span{
  font-family:'Space Grotesk', system-ui, sans-serif;
  font-size:14px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--txt-strong);
}
.vrule{ width:1px; height:24px; background:var(--line); }

.folder-chip{
  display:flex; align-items:center; gap:8px; max-width:280px;
  padding:6px 12px; border-radius:var(--r);
  background:var(--panel2); border:1px solid var(--line);
  color:var(--dim); font:inherit; font-size:12px; cursor:pointer;
}
.folder-chip:hover{ border-color:#333941; color:var(--txt); }
.folder-chip svg{ width:15px; height:15px; color:var(--ok); }
.folder-chip span{ font-family:'IBM Plex Mono', ui-monospace, monospace; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dot{ width:6px; height:6px; border-radius:50%; background:var(--ok); flex:0 0 auto; }
.dot.off{ background:var(--faint); }

.search{
  display:flex; align-items:center; gap:9px; width:280px;
  padding:0 12px; height:36px; border-radius:var(--r);
  background:var(--panel2); border:1px solid var(--line); color:var(--dimmer);
}
.search:focus-within{ border-color:var(--accent); }
.search input{
  flex:1; min-width:0; background:none; border:0; outline:0;
  color:var(--txt); font:inherit; font-size:13px;
}
.search input::placeholder{ color:var(--dimmer); }
.search input::-webkit-search-cancel-button{ -webkit-appearance:none; }

.select{
  height:36px; padding:0 30px 0 11px; border-radius:var(--r);
  background:var(--panel2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239BA3AC' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center/14px;
  border:1px solid var(--line); color:var(--txt); font:inherit; font-size:13px;
  -webkit-appearance:none; appearance:none; cursor:pointer;
}
.select.wide{ width:100%; }
.select:focus{ outline:none; border-color:var(--accent); }

.iconbtn{
  width:34px; height:34px; display:grid; place-items:center;
  border-radius:var(--r); background:var(--panel2); border:1px solid var(--line);
  color:var(--dim); cursor:pointer;
}
.iconbtn:hover{ color:var(--txt); border-color:#333941; }
.account{ font-size:12px; color:var(--dimmer); max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ======================== VIEWS ======================== */
.view{ display:none; flex:1; min-height:0; }
body[data-view="lock"]   #lock,
body[data-view="home"]   #home,
body[data-view="folder"] #folder{ display:flex; }
body[data-view="editor"] #editor{ display:grid; }
body[data-view="lock"] .topbar{ display:none; }
body[data-view="home"] .only-inner{ display:none; }

/* ======================== TRAVA ======================== */
.lock{ align-items:center; justify-content:center; padding:24px; }
.lock-card{
  width:min(340px,100%); display:flex; flex-direction:column; align-items:center; gap:12px;
  padding:34px 28px; border-radius:18px; background:var(--panel); border:1px solid var(--line);
  box-shadow:0 40px 90px -50px #000;
}
.lock-brand{ display:flex; align-items:center; gap:9px; margin-top:2px; }
.ok-txt{ color:var(--ok-txt); }
.err-txt{ color:var(--danger); }
.lock-hint{ margin:0 0 6px; font-size:12.5px; color:var(--dimmer); text-align:center; }
.lock-card .input{ width:100%; text-align:center; }
.linkish{ background:none; border:0; color:var(--dimmer); font:inherit; font-size:12px; cursor:pointer; text-decoration:underline; }
.linkish:hover{ color:var(--txt); }

.avatar{
  width:34px; height:34px; border-radius:50%; flex:0 0 auto;
  background:var(--accent) center/cover no-repeat;
  display:grid; place-items:center; color:#fff; font-weight:700; font-size:12px;
  font-family:'Space Grotesk',sans-serif;
}
.avatar.big{ width:84px; height:84px; font-size:26px; border:2px solid var(--line); }

/* ======================== TOPO ======================== */
.brand{ display:flex; align-items:center; gap:9px; background:none; border:0; padding:0; cursor:pointer; font:inherit; }
.logo{
  width:28px; height:28px; border-radius:8px; display:grid; place-items:center;
  background:var(--accent); color:#fff; font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:12px;
}
.wordmark{ font-family:'Space Grotesk',sans-serif; font-size:15px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--txt-strong); }
.brand:hover .wordmark{ color:#fff; }
.crumbs{ display:flex; align-items:center; gap:2px; min-width:0; overflow:hidden; }
.crumb{ display:flex; align-items:center; gap:4px; font-size:13px; color:var(--dim); white-space:nowrap; }
.crumb svg{ width:14px; height:14px; color:var(--faint); }
.crumb:last-child{ color:var(--txt-strong); font-weight:600; }
#crumb-name{ max-width:300px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  display:flex; align-items:center; gap:4px; font-size:13px; color:var(--txt-strong); font-weight:600; }
#crumb-name::before{ content:"›"; color:var(--faint); font-weight:400; }

/* ======================== INÍCIO ======================== */
.home{ flex-direction:column; overflow-y:auto; padding:26px 30px 44px; gap:28px; }
.block{ display:flex; flex-direction:column; gap:12px; }
.block-head{ display:flex; align-items:center; gap:12px; }
.block-head h2{
  margin:0; font-family:'Space Grotesk',sans-serif; font-size:13px; font-weight:600;
  letter-spacing:.14em; text-transform:uppercase; color:var(--dimmer);
}
.muted{ font-size:12px; color:var(--faint); }
.block-head .add{ margin-left:auto; }

/* PC */
.pc-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.pc-card{
  display:flex; align-items:center; gap:13px; text-align:left; cursor:pointer;
  padding:15px 16px; border-radius:var(--r-md); background:var(--panel); border:1px solid var(--line); color:var(--txt); font:inherit;
}
.pc-card:hover{ border-color:#333941; background:#131619; }
.pc-card:disabled{ opacity:.5; cursor:not-allowed; }
.pc-ico{ width:38px; height:38px; border-radius:10px; display:grid; place-items:center; background:var(--panel3); color:var(--dim); flex:0 0 auto; }
.pc-ico svg{ width:19px; height:19px; }
.pc-card:not(:disabled) .pc-ico.rem{ background:color-mix(in oklab,var(--accent) 22%,transparent); color:var(--accent-txt); }
.pc-txt{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.pc-txt b{ font-size:13.5px; font-weight:600; color:var(--txt-strong); }
.pc-txt i{ font-style:normal; font-size:11.5px; color:var(--dimmer); }

/* caixa de entrada */
.inbox{
  width:100%; display:flex; align-items:center; gap:14px; cursor:pointer; text-align:left;
  padding:16px 18px; border-radius:var(--r-md); color:var(--txt); font:inherit;
  background:linear-gradient(100deg, color-mix(in oklab,var(--accent) 16%,var(--panel)), var(--panel) 62%);
  border:1px solid color-mix(in oklab,var(--accent) 45%,transparent);
}
.inbox:hover{ border-color:var(--accent); }
.inbox-ico{ width:40px; height:40px; border-radius:11px; display:grid; place-items:center; background:var(--accent); color:#fff; flex:0 0 auto; }
.inbox-ico svg{ width:20px; height:20px; }
.inbox-txt{ display:flex; flex-direction:column; gap:2px; }
.inbox-txt b{ font-size:14.5px; font-weight:600; color:var(--txt-strong); }
.inbox-txt i{ font-style:normal; font-size:12px; color:var(--dim); }
.pill{
  margin-left:auto; min-width:34px; text-align:center; padding:5px 11px; border-radius:99px;
  background:var(--accent); color:#fff; font-family:'IBM Plex Mono',monospace; font-size:13px; font-weight:500;
}

/* pastas */
.folders{ display:grid; grid-template-columns:repeat(auto-fill,minmax(148px,1fr)); gap:12px; }
.fcard{
  display:flex; flex-direction:column; align-items:flex-start; gap:12px; cursor:pointer; text-align:left;
  padding:16px; border-radius:var(--r-md); background:var(--panel); border:1px solid var(--line-soft);
  color:var(--txt); font:inherit; transition:border-color .12s, transform .12s;
}
.fcard:hover{ border-color:#3a4150; transform:translateY(-2px); }
.fico{ width:38px; height:38px; border-radius:10px; display:grid; place-items:center; background:var(--panel3); color:var(--accent-txt); }
.fico svg{ width:19px; height:19px; }
.fname{ font-size:13.5px; font-weight:600; color:var(--txt-strong); line-height:1.3; word-break:break-word; }

/* ======================== PASTA ======================== */
.folder{ flex-direction:column; overflow-y:auto; }
.lib-head{
  position:sticky; top:0; z-index:5; padding:24px 30px 14px;
  background:linear-gradient(180deg,var(--bg) 80%,transparent);
  display:flex; flex-direction:column; gap:14px;
}
.lib-title{ display:flex; align-items:baseline; gap:12px; }
.lib-title h1{ margin:0; font-family:'Space Grotesk',sans-serif; font-size:26px; font-weight:700; letter-spacing:-.02em; color:var(--txt-strong); }
.count{ font-size:13px; color:var(--dimmer); }
.lib-tools{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.search.big{ width:min(340px,100%); height:38px; }
.segmented{ display:flex; gap:3px; padding:3px; border-radius:10px; background:var(--panel2); border:1px solid var(--line); width:fit-content; }
.segmented.tabs.hidden{ display:none; }
.seg{ padding:6px 15px; border:0; border-radius:7px; cursor:pointer; background:none; color:var(--dimmer); font:inherit; font-size:12.5px; }
.seg:hover{ color:var(--txt); }
.seg.on{ background:var(--panel3); color:var(--txt-strong); font-weight:600; }

.groups{ padding:0 30px 40px; display:flex; flex-direction:column; gap:24px; }
.group-head{
  display:flex; align-items:center; gap:10px; margin-bottom:11px;
  font-family:'Space Grotesk',sans-serif; font-size:11.5px; font-weight:600;
  letter-spacing:.12em; text-transform:uppercase; color:var(--dimmer);
}
.group-head .rule{ flex:1; height:1px; background:var(--line-soft); }
.group-head .n{ font-family:'IBM Plex Mono',monospace; color:var(--faint); letter-spacing:0; }
.group.today .group-head{ color:var(--accent-txt); }
.group.today .group-head .rule{ background:color-mix(in oklab,var(--accent) 35%,transparent); }
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(236px,1fr)); gap:14px; }

/* card de arquivo */
.gcard{
  display:flex; flex-direction:column; overflow:hidden;
  border-radius:var(--r-md); border:1px solid var(--line-soft); background:var(--panel);
  transition:border-color .12s, transform .12s;
}
.gcard:hover{ border-color:#333941; transform:translateY(-2px); }
.gcard.today{ border-color:color-mix(in oklab,var(--accent) 55%,transparent); background:#101520; }
.gopen{
  display:flex; flex-direction:column; cursor:pointer; text-align:left;
  background:none; border:0; padding:0; color:inherit; font:inherit; width:100%;
}
.gopen:focus-visible{ outline:2px solid var(--accent); outline-offset:-2px; }
.thumb{
  position:relative; aspect-ratio:16/9; width:100%; display:grid; place-items:center;
  background:linear-gradient(135deg,#242E3A,#151B22 55%,#2B2630) center/cover no-repeat; color:#39414B;
}
.thumb.k-text{ background:linear-gradient(135deg,#2A2C24,#181A15 60%,#242A2E); }
.thumb.k-audio{ background:linear-gradient(135deg,#2B2436,#171420 60%,#22303A); }
.thumb.k-image{ background:#12161B; }
.thumb svg{ width:26px; height:26px; }
.flag{ position:absolute; left:7px; top:7px; display:flex; gap:5px; }
.flag i{ display:flex; padding:3px; border-radius:5px; background:#000000B8; color:var(--accent-txt); }
.flag i svg{ width:12px; height:12px; }
.gbody{ padding:11px 12px 12px; display:flex; flex-direction:column; gap:5px; min-width:0; }
.gtitle{ font-size:13.5px; font-weight:600; color:var(--txt-strong); line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; word-break:break-word; }
.gsub{ font-family:'IBM Plex Mono',monospace; font-size:10.5px; color:var(--dimmer); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.cardbar{ display:flex; gap:4px; padding:0 8px 9px; }
.ibtn{ width:29px; height:29px; display:grid; place-items:center; cursor:pointer; border-radius:var(--r-sm); background:none; border:0; color:var(--faint); }
.ibtn:hover{ background:var(--panel2); color:var(--txt); }
.ibtn.on{ color:var(--accent); }
.ibtn.danger:hover{ color:var(--danger); }
.ibtn svg{ width:15px; height:15px; }

.triage{ display:flex; gap:6px; padding:0 10px 10px; }
.triage .select.tiny{ flex:1; min-width:0; height:30px; font-size:12px; padding:0 26px 0 9px; background-position:right 7px center; }
.triage .btn.tiny{ padding:6px 10px; gap:5px; }
.triage .btn svg{ width:14px; height:14px; }

/* ======================== EDITOR ======================== */
.editor{ grid-template-columns:minmax(0,1fr) var(--details); }

/* ======================== STAGE ======================== */
.stage{ min-width:0; min-height:0; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:18px 20px; overflow:auto; }
.player-wrap{ width:100%; height:100%; display:flex; flex-direction:column; gap:12px; min-height:0; }

.screen{
  flex:1; min-height:0; border-radius:var(--r-lg); overflow:hidden;
  border:1px solid var(--line); background:#000;
  display:flex; align-items:center; justify-content:center;
}
video{ width:100%; height:100%; object-fit:contain; display:block; background:#000; }

.transport{ flex:0 0 auto; display:flex; align-items:center; gap:13px; }
.playbtn{
  width:40px; height:40px; border-radius:50%; border:0; cursor:pointer;
  background:var(--txt-strong); color:var(--bg); display:grid; place-items:center;
}
.playbtn:hover{ background:#fff; }
.playbtn .ico-pause{ display:none; }
body.playing .playbtn .ico-play{ display:none; }
body.playing .playbtn .ico-pause{ display:block; }
.time{ font-size:13px; color:var(--txt); }
.mini-label{ font-size:11px; color:var(--dimmer); }
.presets{ display:flex; gap:5px; }
.preset{
  padding:6px 12px; border-radius:var(--r); cursor:pointer;
  background:var(--panel2); border:1px solid var(--line);
  color:var(--dim); font-family:'IBM Plex Mono', monospace; font-size:12px;
}
.preset:hover{ color:var(--txt); border-color:#333941; }

/* ---- timeline ---- */
.timeline{
  position:relative; flex:0 0 auto; height:76px; overflow:hidden; cursor:pointer;
  border-radius:var(--r-md); background:var(--panel); border:1px solid var(--line);
}
.tl-ruler{ position:absolute; inset:0 0 auto 0; height:18px; border-bottom:1px solid #1B1F24; pointer-events:none; }
.tl-tick{ position:absolute; top:0; bottom:0; width:1px; background:#FFFFFF0D; pointer-events:none; }
.tl-label{ position:absolute; top:3px; font-size:9px; color:var(--faint); transform:translateX(4px); pointer-events:none; font-family:'IBM Plex Mono', monospace; }
.tl-sel{
  position:absolute; top:18px; bottom:0;
  background:color-mix(in oklab, var(--accent) 18%, transparent);
  border-left:2px solid var(--accent); border-right:2px solid var(--accent);
  pointer-events:none;
}
.handle{
  position:absolute; top:18px; bottom:0; width:11px; margin-left:-5.5px;
  border-radius:3px; background:var(--accent); cursor:ew-resize;
  display:flex; align-items:center; justify-content:center;
}
.handle::after{ content:""; width:2px; height:14px; background:var(--accent-ink); border-radius:1px; }
.tl-progress{ position:absolute; top:0; bottom:0; width:1.5px; background:#fff; pointer-events:none; }

/* ---- precision bar ---- */
.cutbar{
  flex:0 0 auto; display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  padding:11px 13px; border-radius:var(--r-md);
  background:var(--panel); border:1px solid var(--line);
}
.field{ display:flex; align-items:center; gap:7px; }
.field > label{
  font-family:'Space Grotesk', sans-serif;
  font-size:10px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--dimmer);
}
.stepper{ display:flex; align-items:center; border-radius:var(--r); border:1px solid var(--line); background:var(--panel2); overflow:hidden; }
.nudge{
  padding:7px 8px; border:0; background:none; cursor:pointer;
  color:var(--dimmer); font:inherit; font-size:11px; line-height:1;
}
.nudge:hover{ color:var(--txt); background:#20242A; }
.tinput{
  width:92px; padding:7px 4px; border:0; background:none; outline:0;
  color:var(--txt-strong); font-size:13px; text-align:center;
  border-left:1px solid var(--line); border-right:1px solid var(--line);
}
.tinput:focus{ background:#20242A; }
.tinput.dur{
  width:84px; border:1px solid color-mix(in oklab, var(--ok) 38%, transparent);
  border-radius:var(--r); background:color-mix(in oklab, var(--ok) 11%, transparent);
  color:var(--ok-txt); padding:7px 10px;
}
.goto{
  width:30px; height:30px; display:grid; place-items:center; cursor:pointer;
  border-radius:var(--r); background:var(--panel2); border:1px solid var(--line); color:var(--dimmer);
}
.goto:hover{ color:var(--txt); border-color:#333941; }
.goto svg{ width:14px; height:14px; }

.cutinfo{ flex:0 0 auto; font-size:11.5px; color:var(--dimmer); padding:0 2px; }

/* ---- buttons ---- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:9px 15px; border-radius:var(--r); cursor:pointer;
  background:var(--panel3); border:1px solid #2A2F36; color:var(--txt);
  font:inherit; font-size:12.5px; white-space:nowrap;
}
.btn:hover{ background:#232830; border-color:#39404A; }
.btn.wide{ width:100%; }
.btn.primary{
  background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600;
  box-shadow:0 6px 20px -10px var(--accent);
}
.btn.primary:hover{ background:var(--accent-hi); border-color:var(--accent-hi); }
.btn:disabled{ opacity:.45; cursor:not-allowed; box-shadow:none; }
.btn svg{ width:15px; height:15px; }

.progressbar{ position:relative; flex:0 0 auto; height:26px; border-radius:var(--r); overflow:hidden; background:var(--panel2); border:1px solid var(--line); }
#progress-fill{ height:100%; width:0; background:linear-gradient(90deg, var(--accent), var(--accent-hi)); transition:width .2s; }
#progress-text{ position:absolute; inset:0; display:grid; place-items:center; font-size:11px; color:var(--txt); }

/* ======================== DETAILS ======================== */
.details{
  background:var(--panel); border-left:1px solid var(--line-soft);
  padding:16px; display:flex; flex-direction:column; gap:16px; overflow-y:auto;
}
.stack{ display:flex; flex-direction:column; gap:6px; }
.lbl{ font-size:11px; color:var(--dimmer); }
.input{
  width:100%; padding:9px 11px; border-radius:var(--r);
  background:var(--panel2); border:1px solid var(--line); color:var(--txt-strong);
  font:inherit; font-size:13px; outline:0;
}
.input:focus{ border-color:var(--accent); }
.input::placeholder{ color:var(--faint); }

.favbtn{
  width:28px; height:28px; display:grid; place-items:center; cursor:pointer;
  border:0; background:none; color:var(--faint); border-radius:var(--r-sm);
}
.favbtn:hover{ background:var(--panel2); }
.favbtn.on{ color:var(--accent); }
.favbtn svg{ width:17px; height:17px; }

.hr{ height:1px; background:var(--line-soft); }
.facts{ margin:0; display:flex; flex-direction:column; gap:10px; }
.facts > div{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.facts dt{ font-size:12px; color:var(--dimmer); }
.facts dd{ margin:0; font-size:11px; color:var(--dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dest{ display:flex; align-items:center; gap:8px; padding:10px 11px; border-radius:var(--r); background:var(--panel2); border:1px solid var(--line); }
.dest span{ font-size:11px; color:var(--dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dest svg{ width:14px; height:14px; }

/* ======================== EMPTY ======================== */
.empty{ margin:auto; padding:28px 20px; text-align:center; color:var(--dimmer); font-size:13px; max-width:300px; }
.empty p{ margin:4px 0; }
.empty b{ color:var(--dim); font-weight:600; }
.empty-ico{ width:34px; height:34px; color:#2C323A; margin-bottom:10px; }
.empty-title{ color:var(--txt); font-weight:600; font-size:14px; }
.empty.big{ max-width:380px; }
.empty.big .empty-ico{ width:52px; height:52px; }
.empty.big h2{ margin:0 0 6px; font-size:18px; color:var(--txt-strong); font-family:'Space Grotesk', sans-serif; }

/* ======================== DIALOG ======================== */
.dlg{
  width:min(540px, 92vw); padding:22px; border:1px solid var(--line); border-radius:var(--r-lg);
  background:var(--panel); color:var(--txt);
}
.dlg::backdrop{ background:#000A; backdrop-filter:blur(4px); }
.dlg h3{ margin:0 0 16px; font-family:'Space Grotesk', sans-serif; font-size:17px; }
.dlg fieldset{ border:1px solid var(--line); border-radius:var(--r-md); padding:14px; margin:0 0 14px; }
.dlg legend{ font-size:11px; color:var(--dimmer); padding:0 6px; text-transform:uppercase; letter-spacing:.1em; font-family:'Space Grotesk', sans-serif; }
.dlg .lbl{ display:block; margin:10px 0 4px; }
.dlg .lbl:first-of-type{ margin-top:0; }
.hint{ font-size:11px; color:var(--dimmer); margin:8px 0 0; }
.row{ display:flex; gap:8px; align-items:center; }
.row.end{ justify-content:flex-end; }
.auth-box{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:12px; font-size:12px; color:var(--dimmer); }
.auth-box .input{ flex:1; min-width:150px; }

/* ======================== TOAST ======================== */
.toast{
  position:fixed; left:50%; bottom:22px; z-index:99; pointer-events:none;
  transform:translateX(-50%) translateY(90px); transition:transform .25s cubic-bezier(.2,.8,.3,1);
  max-width:82vw; padding:11px 18px; border-radius:99px; font-size:13px;
  background:var(--panel3); border:1px solid #2F353D; color:var(--txt);
  box-shadow:0 18px 40px -20px #000;
}
.toast.show{ transform:translateX(-50%) translateY(0); }
.toast.err{ border-color:var(--danger); color:#FFC4C4; }

/* ======================== CONFIG ======================== */
.folder-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.folder-state{ display:flex; align-items:center; gap:7px; font-size:12px; color:var(--dim); min-width:0; }
.folder-state span{ font-family:'IBM Plex Mono',monospace; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dot{ width:7px; height:7px; border-radius:50%; background:var(--ok); flex:0 0 auto; }
.dot.off{ background:var(--faint); }
.hint.storage{ display:block; padding:8px 10px; margin-top:10px; border-radius:var(--r); background:var(--panel2); border:1px solid var(--line); color:var(--dim); }
.dlg.narrow{ width:min(400px,92vw); }
.dlg.wide-dlg{ width:min(680px,94vw); }
.input.area{ resize:vertical; min-height:180px; line-height:1.55; font-family:'IBM Plex Mono',monospace; font-size:12.5px; }
.row .input{ flex:1; }
.stack.grow{ flex:1; }
.btn.tiny{ padding:5px 11px; font-size:12px; }

/* ======================== RESPONSIVE ======================== */
@media (max-width:1180px){ :root{ --details:236px; } }
@media (max-width:980px){
  .editor{ grid-template-columns:minmax(0,1fr); }
  .editor .details{ display:none; }
}
@media (max-width:760px){
  .home{ padding:18px 16px 34px; }
  .lib-head{ padding:18px 16px 12px; }
  .groups{ padding:0 16px 32px; }
  .lib-title h1{ font-size:21px; }
  .search.big{ width:100%; }
  .grid{ grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:11px; }
  .folders{ grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); }
  .wordmark, .account{ display:none; }
  .cutbar{ gap:8px; }
  .tinput{ width:78px; }
}
