/* Dashboard reorganization (2026-11-24): grouped sidebar with coloured
   group bars + icon tiles, the home step guide, and the Projects home.
   Additive only — loaded after app.css and the module styles. */

/* --- Grouped sidebar --- */
.sidebar nav .nav-group{display:flex;flex-direction:column;align-items:flex-start;gap:2px;margin:16px 4px 6px;padding:6px 10px 7px 8px;background:#ffffff10;border-left:4px solid var(--group);border-radius:0 8px 8px 0}
.sidebar nav .nav-group:first-child{margin-top:2px}
.sidebar nav .nav-group span{font:700 10px 'DM Sans',sans-serif;letter-spacing:.14em;text-transform:uppercase;color:#eef4f6}
.sidebar nav .nav-group small{font:400 11px/1.35 'DM Sans',sans-serif;color:#c8d6dc;letter-spacing:0;text-transform:none}
.sidebar nav a .nav-tile{display:grid;place-items:center;flex:0 0 27px;width:27px;height:27px;border-radius:8px;background:var(--tile);box-shadow:inset 0 0 0 1px #ffffff2e}
.sidebar nav a .nav-tile>svg.icon{width:15px;height:15px;color:#fff}
.sidebar nav a.active .nav-tile{box-shadow:inset 0 0 0 2px #ffffffa6}

/* --- Step guide (home) --- */
.step-guide{display:flex;gap:12px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;margin:16px 0 22px}
.guide-step{flex:1 1 220px;display:flex;gap:12px;align-items:flex-start;text-decoration:none;color:inherit;padding:10px 12px;border-radius:12px;border:1px solid transparent}
.guide-step:hover{background:#f4f8f5}
.guide-step .step-dot{flex:0 0 34px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font:700 13px 'DM Sans',sans-serif;background:#eef2ee;color:#778471;border:1px solid #d8e0d2}
.guide-step .step-dot .icon{width:16px;height:16px}
.guide-step.done .step-dot{background:#237d76;border-color:#237d76;color:#fff}
.guide-step.current .step-dot{background:#fff1d3;border:2px solid #d9a92c;color:#946b1c}
.guide-step.first-focus{background:#fffaf0;border-color:#ecd9a0}
.step-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.step-text strong{font:600 13px 'DM Sans',sans-serif;color:#24485d}
.step-text small{font-size:11px;line-height:1.6;color:#667b88}
.step-tag{align-self:flex-start;font:700 9px 'DM Sans',sans-serif;letter-spacing:.1em;text-transform:uppercase;background:#f1c469;color:#5c430a;border-radius:999px;padding:3px 8px}
.step-cta{font:600 11px 'DM Sans',sans-serif;color:#236d60}

/* --- Projects home --- */
.projects-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:16px;margin:18px 0}
.project-card{background:#fff;border:1px solid #e0e7ec;border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:6px}
.project-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.project-card h3{font:600 16px 'DM Sans',sans-serif;margin:0;color:#24485d}
.project-meta{font-size:12px;color:#667b88;margin:0}
.mini-steps{display:flex;align-items:center;gap:0;margin:10px 0 4px}
.mini-step{flex:0 0 27px;width:27px;height:27px;border-radius:50%;display:grid;place-items:center;font:700 11px 'DM Sans',sans-serif;background:#eef2ee;color:#778471;border:1px solid #d8e0d2}
.mini-step.done{background:#237d76;border-color:#237d76;color:#fff}
.mini-step.current{background:#fff1d3;border:2px solid #d9a92c;color:#946b1c}
.mini-step.unknown{background:#fff;color:#a7b3a1;border-style:dashed}
.mini-link{flex:0 0 24px;height:2px;background:#d8e0d2}
.project-status{font-size:12px;color:#526579;margin:0 0 6px}
.project-card .form-actions{margin-top:auto}
.sidebar-bottom .sidebar-signout{display:inline-flex;align-items:center;gap:7px;margin-top:14px;font-size:12px;font-weight:600;color:#ffcdbd}
.sidebar-bottom .sidebar-signout .icon{width:15px;height:15px}
.sidebar-bottom .sidebar-signout:hover{color:#fff;text-decoration:underline}

.brand-mark{width:47px;height:43px;object-fit:contain;background:#fff;border-radius:10px;padding:3px;flex-shrink:0}
@media(max-width:1000px){.brand-mark{width:42px;height:38px}}
@media(max-width:700px){.brand-mark{width:40px;height:37px}}


/* --- Sidebar rebuild (2026-11-24): tidy group headers with descriptions,
   left-rail items, tool search, pinned create, footer attention card.
   Live group structure and colours unchanged; readable sizes kept. --- */
.sidebar{background:linear-gradient(165deg,#143b36 0,#173e3a 58%,#163b3e 100%);color:#e6f0eb;padding:22px 14px 16px}
.sidebar .brand{margin:0 6px 18px;color:#fff}

/* Workspace switcher card — the real business <select>, restyled */
.sb-switcher{display:flex;align-items:center;gap:10px;padding:10px 11px;border:1px solid #ffffff1f;border-radius:14px;background:#ffffff0d;margin-bottom:12px}
.sb-switcher-chip{flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:#e7f1cf;color:#3d6745;font:800 11px 'DM Sans',sans-serif;letter-spacing:.02em}
.sb-switcher-main{flex:1;min-width:0}
.sb-switcher-caption{display:block;font:700 8px 'DM Sans',sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#9fb9ac;margin-bottom:1px}
.sidebar .business-switch{appearance:none;-webkit-appearance:none;width:100%;background:transparent;border:0;border-radius:0;color:#fff;font-size:13px;font-weight:700;padding:1px 0;margin:0;cursor:pointer;text-overflow:ellipsis}
.sidebar .business-switch option{color:#172b2a;background:#fff;font-weight:500}
.sb-switcher-chev{flex:0 0 14px;width:14px;height:14px;stroke:#adc4b9;fill:none;stroke-width:2;stroke-linecap:round;pointer-events:none}

/* Find a tool */
.nav-search{position:relative;display:block;margin:0 1px 9px}
.nav-search>svg.icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:#a5bbb0;pointer-events:none}
.nav-search input{width:100%;height:38px;padding:0 46px 0 33px;border:1px solid #ffffff24;border-radius:10px;background:#082f2b66;color:#fff;font-size:12px}
.nav-search input::placeholder{color:#a1b6ab}
.nav-shortcut{position:absolute;right:7px;top:50%;transform:translateY(-50%);padding:2px 5px;border:1px solid #ffffff2a;border-radius:5px;color:#a9bcb2;font-size:8px;pointer-events:none}

/* Pinned create */
.nav-create{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:40px;margin:0 0 13px;border:0;border-radius:10px;background:#d9ec9a;color:#27453a;font-size:12.5px;font-weight:800;cursor:pointer;box-shadow:0 5px 14px #0b28242b;transition:background .15s,transform .15s}
.nav-create:hover{background:#e5f5b8;transform:translateY(-1px)}
.nav-create .icon{width:16px;height:16px}

/* Collapsible groups */
.sidebar nav{gap:2px}
.sb-group{margin:2px 0 4px}
.group-head{display:grid;grid-template-columns:30px 1fr 14px;align-items:center;gap:9px;width:100%;padding:7px 8px;border:0;border-radius:10px;background:transparent;color:inherit;text-align:left;cursor:pointer}
.group-head:hover{background:#ffffff0b}
.group-tile{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--tile);box-shadow:inset 0 0 0 1px #ffffff2e}
.group-tile>svg.icon{width:16px;height:16px;color:#fff}
.group-copy{min-width:0;display:flex;flex-direction:column;gap:1px}
.group-title{font:800 11.5px 'DM Sans',sans-serif;letter-spacing:.07em;text-transform:uppercase;color:#f1f5ee}
.group-copy small{font:400 10.5px/1.35 'DM Sans',sans-serif;color:#aec4b6}
.group-chev{width:14px;height:14px;stroke:#adc4b9;fill:none;stroke-width:2;stroke-linecap:round;transition:transform .18s}
.sb-group.collapsed .group-chev{transform:rotate(-90deg)}
.sb-group.collapsed .group-links{display:none}
.group-links{display:grid;gap:2px;margin:2px 0 6px 15px;padding:3px 0 3px 13px;border-left:1px solid #ffffff24}
.sidebar nav .group-links a{display:flex;align-items:center;gap:10px;min-height:40px;padding:5px 10px 5px 7px;border-radius:9px;color:#d3e2da;font-size:13px}
.sidebar nav .group-links a:hover{background:#ffffff10;color:#fff}
.sidebar nav .group-links a .nav-tile{flex-basis:30px;width:30px;height:30px;border-radius:9px}
.sidebar nav .group-links a .nav-tile>svg.icon{width:16px;height:16px}
.sidebar nav .group-links a.active{background:var(--tile);color:#fff;font-weight:650;box-shadow:0 4px 12px #0b282433}
.sidebar nav .group-links a.active .nav-tile{background:#ffffff2e;box-shadow:inset 0 0 0 1px #ffffff59}
.sb-label{min-width:0}
.sb-tag{margin-left:auto;padding:2px 6px;border-radius:5px;background:#ffffff1c;color:#e6f0bc;font-size:8px;font-weight:900;letter-spacing:.06em}
.sb-hide{display:none!important}

/* Footer: attention card, workspace identity, note + actions */
.sidebar-bottom{border-top:1px solid #ffffff1c;padding:14px 2px 0}
.attention-card{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid #ffffff1f;border-radius:12px;background:#ffffff0a;color:#e6f0eb;text-decoration:none}
.attention-card:hover{background:#ffffff12}
.attention-icon{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:9px;background:#f0d17a;color:#4a4c24;font-weight:900;font-size:14px}
.attention-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.attention-copy b{font-size:11.5px;color:#fff}
.attention-copy span{font-size:10.5px;color:#b4c8be}
.attention-count{flex:0 0 auto;padding:3px 8px;border-radius:999px;background:#a97b2c;color:#fff;font-size:10px;font-weight:900}
.profile-row{display:flex;align-items:center;gap:10px;width:100%;margin-top:9px;padding:8px 6px;border:0;border-radius:10px;background:transparent;color:#e6f0eb;text-align:left;cursor:pointer}
.profile-row:hover{background:#ffffff0b}
.profile-row .avatar{flex:0 0 30px;width:30px;height:30px;font-size:10px}
.profile-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:0}
.profile-copy b{font-size:12px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-copy small{font-size:10.5px;color:#a7bdb2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-note{font-size:13px;margin-top:10px;padding:0 6px}
.sidebar-actions{display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:0 6px}
.sidebar-actions .text-button{white-space:nowrap}
.sidebar-bottom .sidebar-signout{margin-top:0}
@media(max-width:700px){.sidebar{width:262px;padding:20px 13px 14px;box-shadow:15px 0 40px #12342c35}}

/* --- 3D pictorial sidebar icons (2026-11-24): Fluent 3D PNGs inside the
   existing coloured tiles; tile sizes and colours unchanged. On the active
   item the tile already gets a translucent white backing (rule above), so
   the 3D icon stays readable over the strong solid fill. --- */
.sidebar nav .group-links a .nav-tile>img.ic3d{width:22px;height:22px;object-fit:contain;display:block}
.group-tile>img.ic3d{width:22px;height:22px;object-fit:contain;display:block}

/* --- Group header icons BARE (2026-11-24): the main folders (Owner/Guide,
   Bookkeeper, Invoicing, AI Accounting, Accountant, Filing & Pay,
   People & Setup) carry their 3D icon with NO tile background, so the
   headers read differently from the menu items under them — items keep
   their coloured tiles. The icon grows slightly (26px) inside the same
   30px header cell, so row height and title/description alignment are
   unchanged. --- */
.group-tile{background:transparent;box-shadow:none;border-radius:0}
.group-tile>img.ic3d{width:26px;height:26px}

/* --- Per-feature guide cards (2026-11-24): a step-by-step guide with a
   Listen (read-aloud) button at the top of every main view, directly under
   the view heading. Collapse persists per view for the session. --- */
.guide-card{background:#fff;border:1px solid var(--line);border-left:4px solid #8ca960;border-radius:16px;padding:16px 18px;margin:0 0 20px}
.guide-card-compact{padding:13px 16px}
.guide-card-head{display:flex;align-items:flex-start;gap:12px}
.guide-card-icon{width:40px;height:40px;object-fit:contain;flex:0 0 40px}
.guide-card-compact .guide-card-icon{width:34px;height:34px;flex-basis:34px}
.guide-card-titles{flex:1;min-width:0}
.guide-card-titles h2{font-size:16px;line-height:1.3;color:var(--green)}
.guide-card-titles p{font-size:12px;color:var(--muted);margin-top:1px}
.guide-listen{flex:0 0 auto}
.guide-listen.speaking{background:var(--lime);border-color:#b9cc8e;color:var(--green)}
.guide-collapse{flex:0 0 auto;display:grid;place-items:center;width:30px;height:30px;border:0;border-radius:8px;background:var(--soft);color:var(--green);cursor:pointer;padding:0}
.guide-collapse svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.guide-card.collapsed .guide-collapse svg{transform:rotate(-90deg)}
.guide-steps{margin:12px 0 2px;padding:0;list-style:none;counter-reset:guide-step}
.guide-card-compact .guide-steps{margin-top:9px}
.guide-steps li{counter-increment:guide-step;position:relative;padding:5px 0 5px 36px;font-size:13px;line-height:1.55;color:var(--ink)}
.guide-steps li::before{content:counter(guide-step);position:absolute;left:0;top:3px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--soft);color:var(--green);font-size:12px;font-weight:700}
.guide-card.collapsed .guide-steps{display:none}
@media(max-width:700px){.guide-card{padding:13px 14px}.guide-card-icon{width:34px;height:34px;flex-basis:34px}}

/* §14: prominent Forgot password link under the password field (sign-in card) */
.forgot-row{display:flex;justify-content:flex-end;margin:-4px 0 16px}
.forgot-link{background:none;border:0;padding:2px 0;color:#0c7a72;font-size:12.5px;font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.forgot-link:hover{color:#076b67}

/* §16 — Journey step tracker (top of Overview) */
.journey{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 18px 14px;margin:16px 0 22px}
.journey-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.journey-head h2{font:700 17px 'DM Sans',sans-serif;color:#24485d;margin:0}
.journey-head p{margin:4px 0 0;font-size:12.5px;line-height:1.5;color:#778471}
.journey-count{flex:0 0 auto;font:700 12.5px 'DM Sans',sans-serif;color:#237d76;background:#e7f4f1;border-radius:999px;padding:5px 11px}
.journey-bar{height:8px;border-radius:99px;background:#eef2ee;margin:14px 0 4px;overflow:hidden}
.journey-bar span{display:block;height:100%;background:#237d76;border-radius:99px;transition:width .4s ease}
.journey-steps{list-style:none;display:flex;gap:4px;margin:4px 0 0;padding:8px 2px 6px;overflow-x:auto;scrollbar-width:thin}
.journey-steps li{flex:1 0 118px;min-width:118px}
.journey-step{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;text-decoration:none;color:inherit;padding:8px 6px;border-radius:12px}
.journey-step::before{content:'';position:absolute;top:25px;left:-50%;width:100%;height:3px;background:#e3eae0;border-radius:2px}
.journey-steps li:first-child .journey-step::before{display:none}
.journey-step.done::before{background:#237d76}
.journey-step:hover{background:#f4f8f5}
.journey-node{position:relative;z-index:1;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font:700 14px 'DM Sans',sans-serif;background:#eef2ee;color:#778471;border:2px solid #d8e0d2}
.journey-node .icon{width:17px;height:17px}
.journey-step.done .journey-node{background:#237d76;border-color:#237d76;color:#fff}
.journey-step.current .journey-node{background:var(--step-color);border-color:var(--step-color);color:#fff;box-shadow:0 0 0 5px rgba(36,72,93,.14)}
.journey-text{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}
.journey-text strong{display:flex;align-items:center;gap:6px;font:600 13.5px 'DM Sans',sans-serif;color:#24485d}
.journey-step.upcoming .journey-text strong{color:#5c6b58}
.journey-ic{width:21px;height:21px}
.journey-text small{font-size:12px;line-height:1.45;color:#778471}
.journey-here{font:700 10.5px 'DM Sans',sans-serif;letter-spacing:.04em;text-transform:uppercase;color:#946b1c;background:#fff1d3;border:1px solid #ecd9a0;border-radius:999px;padding:2px 8px}
.journey-next{margin:10px 0 2px;font-size:13.5px;color:#43584a}
.journey-next a{font-weight:700;color:#0c7a72}
.journey-complete{color:#237d76;font-weight:600}
@media (max-width:640px){.journey{padding:14px 12px 10px}.journey-steps li{flex-basis:112px;min-width:112px}}

/* §17 — Listen buttons: speaker icon + label, obviously a button; tracker head cluster */
.guide-listen{display:inline-flex;align-items:center;gap:6px}
.guide-listen svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.journey-head-side{display:flex;align-items:center;gap:10px;flex:0 0 auto}

/* §17 — persistent compact step tracker (every main view except the Overview) */
.journey-mini{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 14px 9px;margin:0 0 14px}
.jmini-steps{display:flex;align-items:center;overflow-x:auto;padding:2px 0 6px;scrollbar-width:thin}
.jmini-step{flex:0 0 auto;text-decoration:none}
.jmini-node{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;border:2px solid #c9d4c5;color:#778471;font:700 11px 'DM Sans',sans-serif;background:#fff}
.jmini-node svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.jmini-step.done .jmini-node{background:var(--step-color);border-color:var(--step-color);color:#fff}
.jmini-step.current .jmini-node{border-color:var(--step-color);color:var(--step-color);box-shadow:0 0 0 3px rgba(36,72,93,.18)}
.jmini-link{flex:1 1 14px;min-width:8px;height:2px;background:#dde5d8;margin:0 3px}
.jmini-info{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;font-size:12.5px;color:#43584a}
.jmini-current strong{color:#24485d}
.jmini-next a{font-weight:700;color:#0c7a72}
.jmini-complete{color:#237d76;font-weight:600}
.journey-mini .guide-listen{margin-left:auto}
@media(max-width:640px){.journey-mini{padding:9px 11px 8px}.journey-mini .guide-listen{margin-left:0}}
