/* ════════════════════════════════════════════════════════════════
   PORTALE COLLABORATORI · DESIGN V3  (collab-2100.css  v2)
   Vero stile V3 "2100": graphite spatial + oro sottile, flat.
   Caricato per ultimo, sostituisce strutturalmente il look V2.
   L'area collaboratore è forzata a data-theme="dark".
   ════════════════════════════════════════════════════════════════ */

html[data-theme="dark"]{
  --gold:#c2a14e; --gold-soft:#e0c98a;
  --c-gold:#c2a14e; --c-gold-light:#e0c98a;
  --c-bronze-1:#c2a14e; --c-bronze-2:#9a7c3a;

  /* superfici flat graphite */
  --v3-bg:        #0d1117;
  --v3-card:      #141a24;
  --v3-row:       #10151d;
  --v3-row-hover: #161d28;
  --v3-line:      rgba(255,255,255,.08);
  --v3-line-2:    rgba(255,255,255,.14);
  --v3-text:      #eef0f4;
  --v3-mute:      rgba(238,240,244,.58);

  --surface:        var(--v3-card);
  --surface-strong: var(--v3-row-hover);
  --surface-solid:  var(--v3-row);
  --surface-2:      var(--v3-row);
  --border:         var(--v3-line);
  --border-strong:  var(--v3-line-2);
  --text:        var(--v3-text);
  --text-soft:   var(--v3-text);
  --text-mute:   var(--v3-mute);
  --text-on-bg:  var(--v3-text);
  --text-on-bg-mute: rgba(238,240,244,.55);

  --bg-grad:
    radial-gradient(1100px 720px at 82% -12%, rgba(194,161,78,.07), transparent 60%),
    linear-gradient(168deg,#0b0e13 0%,#0e131b 55%,#0c1016 100%);
  --bg-dot-a: rgba(194,161,78,.045);
  --bg-dot-b: rgba(194,161,78,.025);
}

/* ─── Tipografia: via Georgia, dentro display/sans ─── */
html[data-theme="dark"] body,
html[data-theme="dark"] .topbar .titles .t1,
html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] .greeting h2, html[data-theme="dark"] .panel h3,
html[data-theme="dark"] .stat .n{
  font-family: var(--font-display,'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif) !important;
}
html[data-theme="dark"] h1, html[data-theme="dark"] h2,
html[data-theme="dark"] .greeting h2{
  font-weight:600 !important; letter-spacing:-.02em !important; color:var(--v3-text) !important;
}

/* ─── Topbar ─── */
html[data-theme="dark"] .topbar{
  background: rgba(13,17,23,.72) !important;
  backdrop-filter: blur(18px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
  border-bottom: 1px solid var(--v3-line) !important;
  border-top: none !important;
}
html[data-theme="dark"] .topbar .titles .t1{ color:var(--v3-text); font-weight:600; letter-spacing:.01em; }
html[data-theme="dark"] .topbar .titles .t2{ color:var(--gold-soft); opacity:.95; }
html[data-theme="dark"] .topbar img.logo{ filter:none; }

/* ─── Hero / greeting ─── */
html[data-theme="dark"] .greeting{
  position:relative; overflow:hidden;
  background: var(--v3-card) !important;
  border:1px solid var(--v3-line) !important;
  border-radius:18px !important;
  box-shadow:none !important;
  padding:20px 24px 20px 28px !important;
}
html[data-theme="dark"] .greeting::before{
  content:""; position:absolute; left:0; top:0; bottom:0; width:4px;
  background:linear-gradient(180deg,#e0c98a,#c2a14e);
}
html[data-theme="dark"] .greeting p{ color:var(--v3-mute) !important; }

/* ─── Stat tiles ─── */
html[data-theme="dark"] .stat{
  background: var(--v3-row) !important;
  border:1px solid var(--v3-line) !important;
  border-radius:14px !important;
}
html[data-theme="dark"] .stat .n{
  color:var(--gold-soft) !important; font-weight:600 !important;
  font-family: var(--font-mono,'Geist Mono',ui-monospace,monospace) !important;
}
html[data-theme="dark"] .stat .l{ color:var(--v3-mute) !important; }

/* ─── Panel / card ─── */
html[data-theme="dark"] .panel{
  background: var(--v3-card) !important;
  border:1px solid var(--v3-line) !important;
  border-radius:18px !important;
  box-shadow:none !important;
  backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
}
html[data-theme="dark"] .panel h3{
  color:var(--v3-text) !important; font-weight:600 !important; letter-spacing:-.01em !important;
  border-bottom:1px solid var(--v3-line) !important;
}
html[data-theme="dark"] .panel h3 .pico{ color:var(--gold) !important; }
html[data-theme="dark"] .panel > p{ color:var(--v3-mute) !important; }

/* ─── Breadcrumb ─── */
html[data-theme="dark"] .crumbs .seg{
  background: var(--v3-row) !important; border:1px solid var(--v3-line) !important;
  color:var(--v3-text) !important; font-weight:500 !important;
}
html[data-theme="dark"] .crumbs .seg:hover{ background: var(--v3-row-hover) !important; }

/* ─── Righe file ─── */
html[data-theme="dark"] .row{
  background: var(--v3-row) !important;
  border:1px solid var(--v3-line) !important;
  border-radius:14px !important;
}
html[data-theme="dark"] .row:hover{
  background: var(--v3-row-hover) !important;
  border-color: var(--v3-line-2) !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .row .ic{
  background: rgba(255,255,255,.06) !important; color:var(--gold-soft) !important;
  box-shadow:none !important; border:1px solid var(--v3-line) !important;
  border-radius:11px !important; font-weight:600 !important;
}
html[data-theme="dark"] .row.folder .ic{
  background: rgba(194,161,78,.16) !important; color:var(--gold-soft) !important; border-color:rgba(194,161,78,.30) !important;
}
html[data-theme="dark"] .row .body b{ color:var(--v3-text) !important; font-weight:500 !important; }
html[data-theme="dark"] .row .body .meta{ color:var(--v3-mute) !important; }

/* ─── Tag / badge / action button ─── */
html[data-theme="dark"] .tag.studio{ background: var(--gold) !important; color:#15171c !important; }
html[data-theme="dark"] .tag.me{ background: rgba(52,211,153,.16) !important; color:#34d399 !important; }
html[data-theme="dark"] .badge-new{ background: var(--gold) !important; color:#15171c !important; }
html[data-theme="dark"] .ab{ box-shadow:none !important; }
html[data-theme="dark"] .ab.dl{ background: var(--gold) !important; color:#15171c !important; }
html[data-theme="dark"] .ab.pv{
  background: rgba(52,211,153,.14) !important; color:#34d399 !important;
  border:1px solid rgba(52,211,153,.38) !important;
}

/* Neutralizza i navy hardcoded inline (#253B4A) presenti nel markup JS */
html[data-theme="dark"] [style*="#253B4A"]{ background: var(--v3-row-hover) !important; }

/* ─── Upload dropzone ─── */
html[data-theme="dark"] .upload{
  background: var(--v3-row) !important;
  border:1px dashed var(--v3-line-2) !important;
  border-radius:14px !important;
}
html[data-theme="dark"] .upload .uti{ color:var(--v3-text) !important; }
html[data-theme="dark"] .upload .usu, html[data-theme="dark"] .upload .pick{ color:var(--v3-mute) !important; }
html[data-theme="dark"] .upload.over{ background: rgba(194,161,78,.10) !important; border-color: var(--gold) !important; }

/* ─── Bottoni primari (gold flat) ─── */
html[data-theme="dark"] .upbtn-row button,
html[data-theme="dark"] .msginput button{
  background:linear-gradient(135deg,#e0c98a,#c2a14e) !important; color:#15171c !important;
  box-shadow:none !important; border:none !important; font-weight:600 !important;
}
html[data-theme="dark"] .upbtn-row button:hover,
html[data-theme="dark"] .msginput button:hover{ filter:brightness(1.05); }

/* Bottoni ghost (logout) */
html[data-theme="dark"] .btn-ghost{
  background: var(--v3-row) !important; border:1px solid var(--v3-line) !important;
  color:var(--v3-text) !important; border-radius:12px !important; font-weight:500 !important;
}
html[data-theme="dark"] .btn-ghost:hover{ border-color: var(--gold) !important; }

/* ─── Empty state ─── */
html[data-theme="dark"] .empty{
  background: var(--v3-row) !important; border:1px dashed var(--v3-line-2) !important;
  color:var(--v3-mute) !important;
}

/* ─── Chat ─── */
html[data-theme="dark"] .msg.studio{ background: rgba(255,255,255,.05) !important; color:var(--v3-text) !important; }
html[data-theme="dark"] .msg.me{
  background: rgba(194,161,78,.16) !important; color:#f3ead0 !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .msginput input{
  background: var(--v3-row) !important; border:1px solid var(--v3-line) !important; color:var(--v3-text) !important;
  border-radius:12px !important;
}
html[data-theme="dark"] .msginput input:focus{ border-color: var(--gold) !important; box-shadow:0 0 0 3px rgba(194,161,78,.20) !important; }

/* ─── Input generici (carica cliente) ─── */
html[data-theme="dark"] input{
  background: var(--v3-row) !important; border:1px solid var(--v3-line) !important; color:var(--v3-text) !important;
}
html[data-theme="dark"] input:focus{ border-color: var(--gold) !important; }

/* ─── Modal preview ─── */
html[data-theme="dark"] .pvm-box{ background:#0e131b !important; border:1px solid var(--v3-line-2) !important; }
html[data-theme="dark"] .pvm-head{ background:#141a24 !important; border-bottom:1px solid var(--v3-line) !important; }

/* ─── Banner nuove richieste assunzione (lampeggio) ─── */
@keyframes asxblink{0%,100%{box-shadow:0 0 0 0 rgba(194,161,78,0);}50%{box-shadow:0 0 0 5px rgba(194,161,78,.22);}}

/* ─── Bottom-nav PWA (v4) ─── */
html[data-theme="dark"] .c2100-bn{
  position:fixed;bottom:0;left:0;right:0;z-index:900;
  display:flex;align-items:stretch;height:60px;
  background:rgba(13,17,23,.88);
  backdrop-filter:blur(22px) saturate(160%);
  -webkit-backdrop-filter:blur(22px) saturate(160%);
  border-top:1px solid var(--v3-line);
  safe-area-inset-bottom:env(safe-area-inset-bottom);
  padding-bottom:env(safe-area-inset-bottom,0px);
}
html[data-theme="dark"] .c2100-btn{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:2px;padding:6px 4px 8px;border:none;background:none;cursor:pointer;
  color:var(--v3-mute);font-size:.68rem;font-weight:500;transition:color .15s;
  -webkit-tap-highlight-color:transparent;
}
html[data-theme="dark"] .c2100-btn.active,
html[data-theme="dark"] .c2100-btn:hover{color:var(--gold-soft);}
html[data-theme="dark"] .c2100-ic{font-size:1.25rem;line-height:1.2;}
html[data-theme="dark"] .c2100-lbl{font-size:.62rem;letter-spacing:.02em;}
/* padding-bottom su .container per non nascondere contenuti dietro la nav */
html[data-theme="dark"] .container{padding-bottom:80px !important;}
