
    /*
      HEXA MANAGER — mockup statico (v5)
      Font: Arial ovunque. Palette 2 colori: verde-blu #024442/#04574b, miele #ff9b00/#ddaf27.
      Sfondi flat. Solo gli esagoni hanno sfumatura 135deg (chiaro alto-sx → scuro basso-dx).
    */
    :root {
      /* colori base */
      --ink: #024442;
      --ink-2: #04574b;
      --honey: #ff9b00;
      --honey-2: #ddaf27;
      --honey-ink: #8a5a00;
      --paper: #f1ece1;
      --card: #ffffff;
      --late: #b23b2e;

      /* sfumature solo per esagoni (135deg) */
      --honey-grad: linear-gradient(135deg, #F7CC68 0%, #ff9b00 100%);
      --green-grad: linear-gradient(135deg, #024442 0%, #0B363A 100%);

      /* derivati piatti */
      --ink-soft: rgba(2, 68, 66, .62);
      --line: rgba(2, 68, 66, .16);
      --line-soft: rgba(2, 68, 66, .10);
      --cream-soft: rgba(241, 236, 225, .64);
      --black: #000000;

      /* forma */
      --hex: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
      --hex-side: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
      /* ottagono: estremità a mezzo-esagono (stessa inclinazione del knob hex-top) */
      --oct-track: polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%);

      --radius: 16px;
      --radius-sm: 10px;

      --check-border: #9dc4b8;
      --check-done: #ff9b00;
    }

    /* tema scuro */
    :root.theme-dark {
      --paper: #06201e;
      --card: #0a2f2c;
      --ink: #f1ece1;
      --ink-soft: rgba(241, 236, 225, .62);
      --line: rgba(241, 236, 225, .14);
      --line-soft: rgba(241, 236, 225, .08);
      --cream-soft: rgba(241, 236, 225, .64);
      --check-border: #2d524c;
      --shadow: 0 6px 18px rgba(0, 0, 0, .35);
    }

    * { box-sizing: border-box; }
    html, body { height: 100%; }
    body {
      margin: 0;
      background: var(--paper);
      color: var(--ink);
      font: 16px/1.5 Arial, Helvetica, sans-serif;
      -webkit-font-smoothing: antialiased;
      transition: background .25s, color .25s;
    }
    button { font: inherit; cursor: pointer; color: inherit; }
    a { color: inherit; text-decoration: none; }
    svg { display: block; }
    :focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }
    @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

    h1, h2, .stat strong, .date strong { font-family: Arial, Helvetica, sans-serif; }

    /* ---------- forme esagonali ---------- */
    .hexfill { clip-path: var(--hex); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .hexring { position: relative; flex-shrink: 0; clip-path: var(--hex); background: var(--check-border); }
    .hexring::after { content: ""; position: absolute; inset: 2px; clip-path: var(--hex); background: var(--card); }
    .icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
    .icon.icon-fill { stroke: none; fill: currentColor; }

    /* ---------- layout ---------- */
    .app { min-height: 100vh; display: grid; grid-template-columns: 262px 1fr; }

    /* ---------- sidebar (flat) — font Inter solo qui ---------- */
    .sidebar {
      font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--ink); color: var(--card);
      padding: 26px 16px; display: flex; flex-direction: column; gap: 20px;
      transition: background .25s, color .25s;
    }

    /* logo: esagono miele con esagono verde interno */
    .brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px 6px; }
    .logo-mark { position: relative; width: 34px; height: 38px; flex-shrink: 0; }
    .logo-mark::before, .logo-mark::after { content: ""; position: absolute; clip-path: var(--hex); }
    .logo-mark::before { inset: 0; background: var(--honey-grad); }
    .logo-mark::after { inset: 24%; background: var(--green-grad); }
    .brand strong { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
    .brand small { display: block; font-size: 11px; color: var(--cream-soft); font-weight: 500; letter-spacing: .04em; }

    /* spazi di lavoro: toggle */
    .workspaces-toggle summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; color: var(--honey); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
    .workspaces-toggle summary::-webkit-details-marker { display: none; }
    .summary-label { display: flex; align-items: center; gap: 8px; }
    .workspaces-toggle summary .chevron { width: 14px; height: 14px; flex-shrink: 0; transition: transform .15s; color: var(--honey); }
    .workspaces-toggle[open] summary .chevron { transform: rotate(90deg); }

    .workspaces { margin-top: 8px; display: grid; gap: 3px; }
    /* workspace come nav button: stesso font-size, active come nav.active */
    .workspace {
      border: 0; border-radius: 9px; padding: 10px 11px;
      background: transparent; color: inherit; text-align: left;
      font-size: 14.5px; width: 100%;
      display: flex; align-items: center; gap: 11px;
      transition: background .15s;
    }
    .workspace:hover { background: rgba(241, 236, 225, .07); }
    .workspace.active { background: rgba(241, 236, 225, .14); font-weight: 600; }
    /* maniglie grip sempre bianche */
    .workspace .grip { color: var(--card); width: 16px; height: 16px; flex-shrink: 0; opacity: 1; }
    .workspace .ws-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    /* simboli + e > per utility, bianchi e visibili */
    .workspace.utility { color: var(--cream-soft); margin-top: 4px; }
    .workspace.utility .util-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--card); stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

    /* label sezione in miele */
    .side-label { padding: 0 10px; color: var(--honey); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }

    /* nav */
    .nav { display: grid; gap: 3px; }
    .nav button { display: flex; align-items: center; gap: 11px; border: 0; border-radius: 9px; background: transparent; color: inherit; padding: 10px 11px; text-align: left; font-size: 14.5px; width: 100%; transition: background .15s; }
    .nav button:hover { background: rgba(241, 236, 225, .07); }
    .nav .active { background: rgba(241, 236, 225, .14); font-weight: 600; }
    .nav .active .icon { color: var(--honey); }
    .nav .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--cream-soft); }
    .nav button:hover .icon { color: var(--card); }
    /* counter: bianco trasparente (niente arancione) */
    .nav .counter { margin-left: auto; border-radius: 99px; padding: 2px 9px; background: rgba(241, 236, 225, .16); font-size: 11.5px; font-weight: 600; color: var(--card); }
    .nav .active .counter { background: rgba(241, 236, 225, .22); }

    /* profilo in fondo, senza riquadro */
    .profile { margin-top: auto; border: 0; border-radius: var(--radius-sm); background: transparent; color: inherit; display: flex; gap: 11px; align-items: center; padding: 8px 10px; text-align: left; width: 100%; transition: background .15s; }
    .profile:hover { background: rgba(241, 236, 225, .08); }
    .avatar { width: 32px; height: 35px; background: var(--honey-grad); color: var(--ink); font-weight: 700; font-size: 12.5px; }
    .profile span:last-child { font-size: 14px; font-weight: 500; color: var(--card); }

    /* ---------- contenuto ---------- */
    .content { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

    .topbar {
      position: sticky; top: 0; z-index: 20;
      min-height: 72px; background: var(--card); border-bottom: 1px solid var(--line);
      display: flex; justify-content: space-between; align-items: center; gap: 16px;
      padding: 14px clamp(20px, 4vw, 56px);
      transition: background .25s, border-color .25s;
    }
    .crumbs { color: var(--ink-soft); font-size: 14px; display: flex; align-items: center; gap: 8px; }
    .crumbs b { color: var(--ink); font-weight: 600; }
    .crumb-sep { color: var(--ink-soft); opacity: .5; }

    .top-actions { display: flex; gap: 14px; align-items: center; }
    .icon-btn { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); display: grid; place-items: center; transition: all .15s; }
    .icon-btn:hover { color: var(--ink); border-color: var(--ink-2); transform: translateY(-1px); }
    .icon-btn svg { width: 17px; height: 17px; }

    /* toggle tema: track ottagonale + knob esagono hex-top che si incastri perfettamente */
    .theme-toggle { border: 0; background: transparent; padding: 0; cursor: pointer; display: flex; align-items: center; }
    .tt-track {
      position: relative; display: block;
      width: 56px; height: 30px;
      clip-path: var(--oct-track);
      background: var(--line);
      transition: background .2s;
    }
    .tt-knob {
      position: absolute; top: 0; left: 0;
      width: 28px; height: 30px;
      clip-path: var(--hex);
      background: var(--honey-grad);
      transition: transform .24s ease, background .2s;
      display: grid; place-items: center;
    }
    .tt-icon { width: 13px; height: 13px; stroke: #3a2306; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .tt-moon { display: none; stroke: var(--ink); }
    :root.theme-dark .tt-track { background: rgba(241, 236, 225, .18); }
    :root.theme-dark .tt-knob { transform: translateX(28px); background: var(--card); }
    :root.theme-dark .tt-sun { display: none; }
    :root.theme-dark .tt-moon { display: block; }

    .button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); color: var(--ink); background: var(--card); border-radius: var(--radius-sm); padding: 9px 14px; font-weight: 600; font-size: 14px; transition: border-color .15s, background .15s; }
    .button:hover { border-color: var(--ink-2); }
    .button svg { width: 16px; height: 16px; }

    /* ---------- main ---------- */
    .main { flex: 1; max-width: 1280px; width: 100%; margin: 0 auto; padding: 40px clamp(20px, 4vw, 56px) 60px; }

    .heading { display: flex; justify-content: space-between; gap: 22px; align-items: end; margin-bottom: 30px; }
    .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--honey); text-transform: uppercase; letter-spacing: .06em; }
    .eyebrow .dot { width: 9px; height: 10px; background: var(--honey-grad); clip-path: var(--hex); }
    h1 { margin: 8px 0 6px; font-size: clamp(29px, 3.6vw, 40px); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; }
    h1 .accent { color: var(--honey); }
    .subtitle { color: var(--ink-soft); font-size: 15px; }
    .heading .button { white-space: nowrap; }
    .muted { color: var(--ink-soft); }

    /* ---------- stats: watermark grigetto + numero colorato ---------- */
    .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
    .stat { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 20px 22px; transition: border-color .15s; }
    .stat:hover { border-color: var(--ink-2); }
    .stat-watermark {
      position: absolute; top: -12px; right: -14px;
      width: 110px; height: 127px;
      color: var(--ink); pointer-events: none; z-index: 0;
    }
    .stat-watermark .hex-outline { fill: none; stroke: currentColor; stroke-opacity: .10; stroke-width: 2; stroke-linejoin: round; }
    .stat-watermark .sym { fill: none; stroke: currentColor; stroke-opacity: .14; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
    .stat-content { position: relative; z-index: 1; }
    .stat-row { display: flex; align-items: flex-end; gap: 11px; margin-top: 12px; }
    .stat-row strong { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -.01em; }
    .stat-row .stat-title { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); line-height: 1; padding-bottom: 3px; }
    .stat.s-progetti .stat-row strong { color: var(--ink-2); }
    .stat.s-attivita .stat-row strong { color: var(--honey); }
    .stat.s-scadenze .stat-row strong { color: var(--late); }
    .stat-note { color: var(--ink-soft); font-size: 13px; display: flex; align-items: center; gap: 5px; margin-top: 8px; }
    .stat-note .note-icon { width: 13px; height: 13px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .stat-note .note-icon.tri { fill: currentColor; stroke: none; }
    .stat-note .note-num { font-weight: 700; }
    .stat.s-progetti .note-icon, .stat.s-progetti .note-num { color: var(--ink-2); }
    .stat.s-attivita .note-icon, .stat.s-attivita .note-num { color: var(--honey); }
    .stat.s-scadenze .note-icon, .stat.s-scadenze .note-num { color: var(--late); }

    /* ---------- grid 2 colonne ---------- */
    .grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: start; }
    .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: background .25s, border-color .25s; }
    .card-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 8px; }
    .card-head .title { display: flex; align-items: center; gap: 9px; }
    .card-head .title .glyph { display: none; }
    .card-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
    .text-link { border: 0; background: transparent; padding: 0; color: var(--ink); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 4px; }
    .text-link:hover { color: var(--honey); }
    .text-link svg { width: 14px; height: 14px; }

    /* ---------- task (3 righe allineate) ---------- */
    .task {
      display: grid; grid-template-columns: 32px 1fr auto;
      gap: 13px; align-items: center;
      padding: 14px 0; border-top: 1px solid var(--line);
      min-height: 72px;
    }
    .task:first-of-type { border-top: 0; }
    .task .check { width: 22px; height: 26px; }
    .task-text { display: grid; gap: 1px; min-width: 0; }
    .task-text b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .task-text .sub1 { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .task-text .sub2 { font-size: 12.5px; color: var(--ink-soft); opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .task.done .task-text b, .task.done .task-text .sub1, .task.done .task-text .sub2 { text-decoration: line-through; color: var(--ink-soft); }

    .tag { border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; background: rgba(2, 68, 66, .09); color: var(--ink); }
    .tag.warn { color: var(--ink); background: rgba(255, 155, 0, .22); }
    .tag.late { color: var(--late); background: rgba(178, 59, 46, .13); }
    .tag.done { color: var(--ink); background: rgba(255, 155, 0, .16); }

    /* checkbox (versione "from C"): 2 polygon SVG, bordo uniforme */
    .check { width: 22px; height: 26px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; cursor: pointer; }
    .check-svg { width: 22px; height: 26px; display: block; }
    .check-hex { fill: none; stroke: var(--check-border); stroke-width: 2; stroke-linejoin: round; transition: stroke .15s; }
    .check-fill { fill: var(--check-done); opacity: 0; transition: opacity .15s; }
    .check:hover .check-hex { stroke: var(--ink-2); }
    .task.done .check-hex { stroke: var(--check-done); }
    .task.done .check-fill { opacity: 1; }

    /* ---------- scadenze (3 righe allineate con task) ---------- */
    .deadline {
      display: grid; grid-template-columns: 48px 1fr;
      gap: 14px; align-items: center;
      padding: 14px 0; border-top: 1px solid var(--line);
      min-height: 68px;
    }
    .deadline:first-of-type { border-top: 0; }
    .date { flex-direction: column; width: 48px; height: 52px; color: var(--card); background: var(--green-grad); font-size: 10.5px; font-weight: 700; line-height: 1.3; text-align: center; }
    .date strong { display: block; font-size: 17px; }
    .date span { display: block; letter-spacing: .02em; }
    .date.soon { background: var(--honey-grad); color: var(--ink); }
    .deadline-text { display: grid; gap: 1px; min-width: 0; }
    .deadline-text b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .deadline-text .sub1 { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .deadline-text .sub2 { font-size: 12.5px; color: var(--ink-soft); opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* ---------- progetti con barra completamento ---------- */
    .projects-wrap { margin-top: 14px; }
    .project-list { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .project { border: 1px solid var(--line); background: var(--paper); border-radius: 13px; padding: 16px; transition: border-color .15s; }
    .project:hover { border-color: var(--ink-2); }
    .project .code { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 11.5px; font-weight: 700; }
    .project .code::before { content: ""; width: 9px; height: 10px; clip-path: var(--hex); background: var(--honey-grad); display: inline-block; }
    .project .status-dot { margin-left: auto; width: 8px; height: 9px; clip-path: var(--hex); background: var(--ink-2); }
    .project .code-row { display: flex; align-items: center; }
    .project b { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 14.5px; font-weight: 600; }
    .project .pj-icon { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--ink); }
    .project small { color: var(--ink-soft); font-size: 13px; }
    .project .bar { margin-top: 14px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
    .project .bar i { display: block; height: 100%; background: var(--honey-grad); border-radius: 99px; }
    .project .bar-label { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--ink-soft); font-weight: 600; }

    /* ---------- notice ---------- */
    .notice { margin-top: 22px; border-left: 3px solid var(--honey); background: var(--card); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 12px 15px; color: var(--ink-soft); font-size: 13.5px; }

    /* ---------- responsive ---------- */
    @media (max-width: 980px) {
      .app { grid-template-columns: 1fr; }
      .sidebar { display: none; }
      .stats, .project-list { grid-template-columns: 1fr; }
      .grid { grid-template-columns: 1fr; }
      .topbar { padding: 14px 20px; }
      .main { padding: 30px 20px 40px; }
    }
    @media (max-width: 620px) {
      .heading { align-items: start; flex-direction: column; }
      .task { grid-template-columns: 24px 1fr; }
      .task .tag { grid-column: 2; justify-self: start; margin-top: 4px; }
      .deadline { grid-template-columns: 48px 1fr; }
    }
