:root {
    /* PwC-inspired: near-black, warm orange accent, hexagon + constellation motif */
    --bg: #0a0a0c;
    --surface: #141417;
    --surface2: #1c1c21;
    --border: #2b2b33;
    --text: #f2f2f5;
    --text-muted: #9595a1;
    --accent: #f5951b;            /* PwC orange */
    --accent-2: #ff7a1a;          /* bright orange hex facet */
    --accent-soft: rgba(245,149,27,0.14);
    --green: #6fbf73;
    --green-soft: rgba(111,191,115,0.13);
    --amber: #f2c14e;             /* warm yellow for warnings */
    --amber-soft: rgba(242,193,78,0.14);
    --red: #e0483a;               /* PwC red */
    --red-soft: rgba(224,72,58,0.14);
    --purple: #b9a7e6;            /* soft lilac facet */
    --purple-soft: rgba(185,167,230,0.14);
    --radius: 14px;
    --radius-sm: 9px;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    background:
      radial-gradient(920px 520px at 88% -6%, rgba(245,149,27,0.10), transparent 60%),
      radial-gradient(700px 460px at 6% 2%, rgba(185,167,230,0.05), transparent 55%),
      var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
  }

  /* ── Brand backdrop (hexagons + constellation) ── */
  .brand-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
  }
  .brand-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .dashboard { position: relative; z-index: 1; }
  .card { position: relative; }

  .dashboard {
    max-width: 1060px;
    margin: 0 auto;
    padding: 28px 22px 40px;
  }

  /* ── Header ── */
  .header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
  }
  .header h1 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.4px;
  }
  .header .subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
  }
  .refresh-badge {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .live-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    display: inline-block;
    animation: pulse 2.4s ease-in-out infinite;
  }
  @keyframes pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50% { opacity:.35; transform:scale(.85); }
  }

  /* ── Stats strip ── */
  .stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
  }
  @media(max-width:680px){ .stats-strip{ grid-template-columns: repeat(2,1fr); } }
  .stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    text-align: center;
  }
  .stat-num {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
  }
  .stat-num.c-red    { color: var(--red); }
  .stat-num.c-amber  { color: var(--amber); }
  .stat-num.c-accent { color: var(--accent); }
  .stat-num.c-green  { color: var(--green); }
  .stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-top: 4px;
  }

  /* ── Main grid ── */
  .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  @media(max-width:720px){ .grid{ grid-template-columns:1fr; } }

  /* ── Card ── */
  .card {
    background: var(--surface);
    border: 0;
    border-radius: var(--radius);
    padding: 18px;
  }
  .card-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .card-header .badge {
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 600;
  }

  /* ── Calendar ── */
  .events { display: flex; flex-direction: column; gap: 6px; }

  .day-sep {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    padding: 8px 0 3px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
  }
  .day-sep:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

  .event {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    background: var(--surface2);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border);
  }
  .event.ev-past    { opacity: .4; }
  .event.ev-today   { border-left-color: var(--accent); }
  .event.ev-sport   { border-left-color: var(--green); }
  .event.ev-call    { border-left-color: var(--purple); }
  .event.ev-interview { border-left-color: var(--amber); }

  .ev-date {
    min-width: 38px;
    text-align: center;
    flex-shrink: 0;
  }
  .ev-date-abbr { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing:.4px; }
  .ev-date-num  { font-size: 19px; font-weight: 800; line-height: 1.1; }
  .event.ev-today .ev-date-num { color: var(--accent); }

  .ev-info { flex: 1; min-width: 0; }
  .ev-title {
    font-size: 13px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .ev-time { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

  .ev-chip {
    font-size: 10px; font-weight: 600;
    padding: 2px 8px; border-radius: 8px;
    white-space: nowrap; flex-shrink: 0;
  }
  .chip-meeting  { background: var(--accent-soft); color: var(--accent); }
  .chip-sport    { background: var(--green-soft);  color: var(--green); }
  .chip-call     { background: var(--purple-soft); color: var(--purple); }
  .chip-trail    { background: var(--green-soft);  color: var(--green); }
  .chip-interview{ background: var(--amber-soft);  color: var(--amber); }

  /* ── Inbox ── */
  .inbox-section { margin-bottom: 13px; }
  .inbox-section:last-child { margin-bottom: 0; }

  .isec-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: 6px; display: flex; align-items: center; gap: 5px;
  }
  .isec-label.l-urgent { color: var(--red); }
  .isec-label.l-bills  { color: var(--amber); }
  .isec-label.l-jobs   { color: var(--accent); }
  .isec-label.l-social { color: var(--text-muted); }

  .email {
    padding: 9px 12px;
    background: var(--surface2);
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    margin-bottom: 5px;
  }
  .email:last-child { margin-bottom: 0; }
  .email.e-urgent { border-left-color: var(--red); }
  .email.e-bills  { border-left-color: var(--amber); }
  .email.e-jobs   { border-left-color: var(--accent); }
  .email.e-social { border-left-color: var(--border); }

  .email-from    { font-size: 10px; color: var(--text-muted); margin-bottom: 1px; }
  .email-subject { font-size: 12px; font-weight: 500; line-height: 1.35; }
  .email-time    { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

  .divider { height: 1px; background: var(--border); margin: 12px 0; }
  .more { font-size: 11px; color: var(--text-muted); text-align: center; padding: 4px 0 2px; }

  /* ── Training ── */
  .card-full { grid-column: 1 / -1; }
  .card-full::after {
    content: '';
    position: absolute;
    top: 14px; right: 16px;
    width: 20px; height: 22px;
    background: var(--accent-soft);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    pointer-events: none;
  }
  .stat-num.c-purple { color: var(--purple); }

  .train-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 4px;
  }
  @media(max-width:680px){ .train-stats{ grid-template-columns: repeat(2,1fr); } }
  .train-stat {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    text-align: center;
  }
  .train-num { font-size: 24px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
  .train-num.c-green  { color: var(--green); }
  .train-num.c-accent { color: var(--accent); }
  .train-num.c-purple { color: var(--purple); }
  .train-num.c-amber  { color: var(--amber); }
  .train-lbl {
    font-size: 10px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .6px; margin-top: 5px;
  }

  .train-body {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
  }
  @media(max-width:720px){ .train-body{ grid-template-columns: 1fr; } }
  .train-recent .event { margin-bottom: 6px; }
  .train-recent .event:last-child { margin-bottom: 0; }

  .goal-card {
    background: var(--accent-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
  }
  .goal-name { font-size: 15px; font-weight: 700; }
  .goal-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
  .goal-count { font-size: 12px; color: var(--text-muted); margin-top: 9px; }
  .goal-days { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -1px; }
  .train-30d {
    font-size: 11px; color: var(--text-muted);
    margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border);
  }

  /* ── Ventures ── */
  .venture-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  @media(max-width:820px){ .venture-grid{ grid-template-columns: repeat(2,1fr); } }
  @media(max-width:520px){ .venture-grid{ grid-template-columns: 1fr; } }
  .venture {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
  }
  .venture-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .venture-name { font-size: 14px; font-weight: 700; }
  .venture-tag { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
  .venture-emph { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
  .venture-next { font-size: 12px; color: var(--accent); margin-top: 8px; }

  /* ── Finance ── */
  .fin-action { font-size: 12px; padding: 5px 0; color: var(--text); border-bottom: 1px solid var(--border); }
  .fin-action:last-child { border-bottom: none; }
  .fin-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  @media(max-width:720px){ .fin-goals{ grid-template-columns: 1fr; } }
  .fin-goal { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 15px; }
  .fin-goal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .fin-goal-name { font-size: 13px; font-weight: 700; }
  .fin-goal-val { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .fin-bar { height: 7px; background: var(--bg); border-radius: 6px; overflow: hidden; margin: 9px 0 8px; }
  .fin-bar-fill { height: 100%; border-radius: 6px; }
  .fin-goal-meta { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
  .fin-goal-next { font-size: 12px; color: var(--accent); margin-top: 6px; }
  .fin-track { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--border); }
  .fin-track-head { font-size: 12px; font-weight: 700; }
  .fin-track-meta { font-size: 11px; color: var(--accent); margin-top: 2px; font-variant-numeric: tabular-nums; }
  .fin-track-note { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.45; }
  .fin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  @media(max-width:720px){ .fin-cols{ grid-template-columns: 1fr; } }
  .fin-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
  .fin-row:last-child { border-bottom: none; }
  .fin-cred { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fin-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

  /* ── Performance ── */
  .perf-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
  .perf-tab {
    background: var(--surface2); color: var(--text-muted);
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 11px; font-weight: 600; padding: 5px 11px; cursor: pointer;
    font-family: inherit;
  }
  .perf-tab-active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
  .perf-kpi {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 9px 0; border-bottom: 1px solid var(--border);
  }
  .perf-kpi:last-child { border-bottom: none; }
  .perf-k { font-size: 12px; color: var(--text-muted); }
  .perf-v { font-size: 16px; font-weight: 700; }

  /* ── Personal & Family ── */
  .pf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
  @media(max-width:820px){ .pf-grid{ grid-template-columns: repeat(2,1fr); } }
  @media(max-width:520px){ .pf-grid{ grid-template-columns: 1fr; } }
  .pf-col { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
  .pf-head { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
  .pf-idea { font-size: 11px; color: var(--text-muted); line-height: 1.6; }

  /* ── Planned week ── */
  .pw-banner {
    background: var(--amber-soft); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 10px 13px;
    font-size: 12px; color: var(--text); margin-bottom: 14px; line-height: 1.5;
  }
  .pw-banner b { color: var(--amber); }
  /* horizontal scroll, readable fixed-width day columns (no squeeze) */
  .pw-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
  .pw-day { flex: 0 0 218px; min-width: 218px; scroll-snap-align: start; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
  .pw-grid::-webkit-scrollbar { height: 8px; }
  .pw-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
  .pw-dayhead {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--text-muted); padding-bottom: 7px; margin-bottom: 7px; border-bottom: 1px solid var(--border);
  }
  .pw-day .event { flex-direction: row; align-items: center; padding: 6px 7px; margin-bottom: 5px; background: var(--surface); }
  .pw-day .event:last-child { margin-bottom: 0; }
  .pw-day .ev-title { font-size: 11px; white-space: normal; }
  .pw-time { font-size: 9px; font-weight: 700; color: var(--text-muted); min-width: 34px; line-height: 1.25; }
  .pw-time span { display: block; font-weight: 400; opacity: .7; }
  .pw-day .ev-chip { font-size: 8px; padding: 1px 5px; }
  .pw-empty { font-size: 10px; color: var(--text-muted); text-align: center; padding: 10px 0; opacity: .5; }

  /* ── Sync / auth ── */
  .sync-btn {
    font-family: inherit; font-size: 12px; font-weight: 600;
    color: var(--text-muted); background: var(--surface2);
    border: 1px solid var(--border); border-radius: 9px;
    padding: 6px 12px; cursor: pointer;
  }
  .sync-btn:hover { color: var(--text); border-color: var(--text-muted); }
  .sync-btn.sync-off { opacity: .6; cursor: default; }
  .auth-modal {
    display: none; position: fixed; inset: 0; z-index: 300;
    background: rgba(0,0,0,.6); align-items: center; justify-content: center;
  }
  .auth-modal.open { display: flex; }
  .auth-box {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 20px; width: min(340px, 92vw);
    display: flex; flex-direction: column; gap: 10px;
  }
  .auth-title { font-size: 16px; font-weight: 700; }
  .auth-sub { font-size: 12px; color: var(--text-muted); }
  .auth-email {
    font-family: inherit; font-size: 14px; padding: 9px 11px;
    background: var(--surface2); color: var(--text);
    border: 1px solid var(--border); border-radius: 9px;
  }
  .auth-send {
    font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
    background: var(--accent); color: #1a1200; border: none;
    border-radius: 9px; padding: 9px;
  }
  .auth-msg { font-size: 12px; color: var(--text-muted); min-height: 16px; }
  .auth-close {
    font-family: inherit; font-size: 12px; color: var(--text-muted);
    background: none; border: none; cursor: pointer; align-self: flex-end;
  }
  .pw-check {
    width: 16px; height: 16px; flex-shrink: 0; padding: 0; cursor: pointer;
    border: 1.5px solid var(--text-muted); border-radius: 5px;
    background: transparent; position: relative;
  }
  .pw-check.done { background: var(--green); border-color: var(--green); }
  .pw-check.done::after {
    content: '✓'; position: absolute; inset: 0; color: #0a0a0c;
    font-size: 11px; font-weight: 900; display: grid; place-items: center;
  }
  .event.block-done .ev-title { text-decoration: line-through; opacity: .55; }

  /* ── Today / Advisor ── */
  .adv-briefing {
    font-size: 14px; line-height: 1.55;
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 14px;
  }
  .adv-agenda { font-size: 11px; color: var(--text-muted); margin: 8px 0 0; }
  .adv-list { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
  .adv-row {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 9px 11px; background: var(--surface2);
    border-radius: var(--radius-sm); border-left: 3px solid var(--border);
  }
  .adv-row.adv-urgent { border-left-color: var(--red); }
  .adv-row.adv-high   { border-left-color: var(--accent); }
  .adv-row.adv-medium { border-left-color: var(--amber); }
  .adv-row.adv-low    { border-left-color: var(--text-muted); }
  .adv-area {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--text-muted); min-width: 80px; flex-shrink: 0; padding-top: 2px;
  }
  .adv-body { flex: 1; min-width: 0; }
  .adv-text { font-size: 13px; font-weight: 600; line-height: 1.4; }
  .adv-why { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.45; }

  /* ── Header right / Modify button ── */
  .header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
  .modify-btn {
    font-family: inherit; font-size: 12px; font-weight: 600;
    color: var(--text-muted); background: var(--surface2);
    border: 1px solid var(--border); border-radius: 9px;
    padding: 6px 12px; cursor: pointer; transition: all .15s;
  }
  .modify-btn:hover { color: var(--text); border-color: var(--text-muted); }
  body.modify .modify-btn { background: var(--accent); color: #1a1200; border-color: var(--accent); }

  /* ── Card grid / blocks ── */
  .card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
    align-items: start;
  }
  @media(max-width:720px){ .card-grid{ grid-template-columns: 1fr; } }
  .block { grid-column: auto; position: relative; }
  .block.span-full { grid-column: 1 / -1; }
  .block.span-half { grid-column: auto; }
  @media(max-width:720px){ .block, .block.span-half { grid-column: 1 / -1; } }
  .block.is-hidden { display: none; }
  .block.collapsed .card > *:not(.card-header) { display: none; }
  .block.collapsed .card-header { margin-bottom: 0; }
  .block.span-full .card::after {
    content: '';
    position: absolute; top: 14px; right: 16px;
    width: 20px; height: 22px;
    background: var(--accent-soft);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    pointer-events: none;
  }

  /* ── Block tools (only in modify mode) ── */
  .block-tools { display: none; position: absolute; top: 8px; right: 8px; gap: 4px; z-index: 6; }
  body.modify .block-tools { display: flex; }
  body.modify .block { outline: 1px dashed var(--border); outline-offset: 3px; border-radius: var(--radius); }
  body.modify .block .card { cursor: grab; }
  .block.dragging { z-index: 1000; box-shadow: 0 14px 44px rgba(0,0,0,.55); opacity: .97; }
  .block.dragging .card { cursor: grabbing; }
  .block-placeholder { border: 1.5px dashed var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
  .bt {
    width: 24px; height: 24px; display: grid; place-items: center;
    font-size: 12px; font-family: inherit; line-height: 1;
    background: var(--surface2); color: var(--text-muted);
    border: 1px solid var(--border); border-radius: 7px; cursor: pointer;
  }
  .bt:hover { color: var(--text); border-color: var(--text-muted); }
  .bt-handle { cursor: grab; touch-action: none; }
  .bt-hide:hover { color: var(--red); border-color: var(--red); }

  /* item drag (within a card) */
  body.modify [data-sortable] > * { outline: 1px dashed var(--border); outline-offset: 2px; cursor: grab; touch-action: none; }
  .item-dragging { opacity: .5; }
  .item-placeholder { border: 1.5px dashed var(--accent) !important; background: var(--accent-soft); border-radius: var(--radius-sm); }

  /* ── Modify toolbar (bottom) ── */
  .modify-bar {
    display: none; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
    align-items: center; gap: 12px; z-index: 200;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    padding: 10px 14px; box-shadow: 0 10px 40px rgba(0,0,0,.5); max-width: calc(100vw - 24px);
  }
  body.modify .modify-bar { display: flex; }
  .mb-hint { font-size: 11px; color: var(--text-muted); }
  .mb-tray { display: flex; gap: 6px; flex-wrap: wrap; max-width: 40vw; }
  .mb-chip {
    font-size: 11px; font-weight: 600; color: var(--accent);
    background: var(--accent-soft); border: 1px solid var(--border);
    border-radius: 999px; padding: 3px 10px; cursor: pointer;
  }
  .mb-chip:hover { border-color: var(--accent); }
  .mb-btn {
    font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
    border-radius: 9px; padding: 7px 14px; border: 1px solid var(--border);
  }
  .mb-save { background: var(--accent); color: #1a1200; border-color: var(--accent); }
  .mb-done { background: var(--surface2); color: var(--text); }
  .mb-status { font-size: 11px; color: var(--green); min-width: 44px; }

  /* ── Footer ── */
  .footer {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .footer a { color: var(--accent); text-decoration: none; }

/* ── Phase 2b: editable bits ── */
.ms-row { cursor: pointer; }
.ms-check { font-size: 14px; color: var(--text-muted); flex-shrink: 0; align-self: center; }
.ms-done .ms-check { color: var(--green); }
.ms-done .adv-text { text-decoration: line-through; opacity: .55; }
.ven-health, .ven-next { cursor: pointer; }
.ven-next:hover { color: var(--text); }
.note-add { display: flex; gap: 8px; margin-bottom: 12px; }
.note-input {
  flex: 1; min-height: 40px; resize: vertical; font-family: inherit; font-size: 13px;
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 11px;
}
.note-addbtn {
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  background: var(--accent); color: #1a1200; border: none;
  border-radius: var(--radius-sm); padding: 0 16px; align-self: stretch;
}
.note-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px;
  background: var(--surface2); border-radius: var(--radius-sm); margin-bottom: 6px;
}
.note-body { flex: 1; min-width: 0; }
.note-text { font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.note-when { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.note-del {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 13px; flex-shrink: 0;
}
.note-del:hover { color: var(--red); }

/* ── Edit mode ── */
body.editing .modify-btn#edit-toggle, #edit-toggle { }
body.editing #edit-toggle { background: var(--accent); color: #1a1200; border-color: var(--accent); }
.ef { border-radius: 4px; }
body.editing .ef {
  outline: 1px dashed var(--border); outline-offset: 2px;
  padding: 0 3px; min-width: 12px; display: inline-block; cursor: text;
}
body.editing .ef:focus { outline: 1.5px solid var(--accent); background: var(--accent-soft); }
.item-ctl { display: none; gap: 3px; margin-left: 8px; flex-shrink: 0; }
body.editing .item-ctl { display: inline-flex; }
.venture .item-ctl { position: absolute; top: 8px; right: 8px; margin: 0; }
.venture { position: relative; }
.ic-mv, .ic-del {
  width: 22px; height: 22px; display: grid; place-items: center;
  font-size: 10px; font-family: inherit; line-height: 1; cursor: pointer;
  background: var(--surface); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 6px;
}
.ic-del:hover { color: var(--red); border-color: var(--red); }
.ic-mv:hover { color: var(--text); }
.add-item {
  display: none; margin-top: 8px; font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); cursor: pointer;
  border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 6px 12px;
}
body.editing .add-item { display: inline-block; }

/* ── Drag-to-reorder (edit mode) ── */
.ic-drag { cursor: grab; touch-action: none; }
.ic-drag:active { cursor: grabbing; }
.dragging-item { box-shadow: 0 12px 40px rgba(0,0,0,.55); opacity: .96; }
.sort-ph { border: 1.5px dashed var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); margin: 0 0 6px; }
.venture-grid .sort-ph { margin: 0; }

/* ── Panel arrange mode ── */
.block { position: relative; }
.blk-tools { display: none; position: absolute; top: 8px; right: 8px; gap: 4px; z-index: 7; }
body.arranging .blk-tools { display: flex; }
body.arranging .block { outline: 1px dashed var(--accent); outline-offset: 3px; border-radius: var(--radius); }
body.arranging .card { pointer-events: none; }
.blk-hidden { display: none; }
body.arranging .blk-hidden { display: block; opacity: .4; }
.blk-handle, .blk-span, .blk-hide {
  width: 26px; height: 26px; display: grid; place-items: center;
  font-size: 12px; font-family: inherit; line-height: 1; cursor: pointer;
  background: var(--surface2); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 7px; pointer-events: auto;
}
.blk-handle { cursor: grab; touch-action: none; }
.blk-span:hover, .blk-handle:hover { color: var(--text); border-color: var(--text-muted); }
.blk-hide:hover { color: var(--red); border-color: var(--red); }
.dragging-blk { z-index: 1000; box-shadow: 0 16px 48px rgba(0,0,0,.6); opacity: .97; }
.blk-ph { border: 2px dashed var(--accent); background: var(--accent-soft); border-radius: var(--radius); }

/* ── Today card: tick + jump-to-source ── */
.adv-row { gap: 11px; }
.today-check {
  width: 18px; height: 18px; flex-shrink: 0; align-self: center; padding: 0; cursor: pointer;
  border: 1.5px solid var(--text-muted); border-radius: 5px; background: transparent; position: relative;
}
.today-check.done { background: var(--green); border-color: var(--green); }
.today-check.done::after { content: '✓'; position: absolute; inset: 0; color: #0a0a0c; font-size: 12px; font-weight: 900; display: grid; place-items: center; }
.today-open { cursor: pointer; }
.today-done .adv-text { text-decoration: line-through; opacity: .5; }
.today-done { opacity: .7; }
.flash { animation: flash 1.6s ease; }
@keyframes flash {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  20% { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
}

/* ── Milk-glass panels + light/dark theme ── */
:root { --glass: rgba(18,18,23,0.52); --glass-brd: rgba(255,255,255,0.09); }

/* frosted-glass cards floating above the covering background */
.card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 0;
  box-shadow: 0 1px 10px rgba(20,40,70,0.05);   /* whisper of lift, no hard edge */
}

/* LIGHT theme */
body.light {
  --bg: #e7ecf4;
  --surface: #ffffff;
  --surface2: rgba(255,255,255,0.55);
  --border: rgba(20,30,50,0.12);
  --text: #1b2230;
  --text-muted: #5a6474;
  --glass: rgba(255,255,255,0.55);
  --glass-brd: rgba(20,30,50,0.10);
  --accent-soft: rgba(245,149,27,0.16);
  --green-soft: rgba(111,191,115,0.18);
  --amber-soft: rgba(242,193,78,0.20);
  --red-soft: rgba(224,72,58,0.14);
  --purple-soft: rgba(150,120,210,0.16);
}
body.light {
  background:
    radial-gradient(900px 520px at 88% -6%, rgba(245,149,27,0.16), transparent 60%),
    radial-gradient(720px 460px at 6% 2%, rgba(110,130,220,0.14), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
body.light .train-stat, body.light .event, body.light .venture, body.light .pw-day,
body.light .adv-row, body.light .adv-briefing, body.light .fin-goal, body.light .pf-col,
body.light .note-row, body.light .note-input { background: var(--surface2); }
body.light .brand-bg { opacity: 0.5; }

/* ── Goal progress card ── */
.prog-block { margin: 4px 0; }
.prog-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.prog-val { font-variant-numeric: tabular-nums; color: var(--text-muted); font-weight: 600; }
.pbar { height: 9px; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.pbar-fill { height: 100%; border-radius: 6px; transition: width .4s ease; }
.prog-note { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.prog-sub { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: 10px; margin-top: 9px; }
.prog-lbl { font-size: 11px; color: var(--text-muted); }
.prog-pct { font-size: 11px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
@media(max-width:520px){ .prog-sub { grid-template-columns: 100px 1fr 38px; } }

/* ── Issue detail modal (drill-down + documents) ── */
.fin-row { cursor: pointer; }
.issue-modal {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.55); align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
}
.issue-modal.open { display: flex; }
.issue-box {
  width: min(560px, 96vw); background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--glass-brd); border-radius: 16px; padding: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
}
.issue-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.issue-title { font-size: 17px; font-weight: 800; line-height: 1.3; }
.issue-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.issue-meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.issue-note { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
.issue-folder { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.doc-row {
  display: block; padding: 10px 12px; margin-bottom: 6px; font-size: 13px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); text-decoration: none;
}
.doc-row:hover { border-color: var(--accent); color: var(--accent); }

/* ── Document browser (subfolders) ── */
.doc-folder { width: 100%; text-align: left; cursor: pointer; font-family: inherit; }
.doc-folder:hover { border-color: var(--accent); color: var(--accent); }
.doc-up {
  font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text-muted); background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 5px 12px; margin-bottom: 10px;
}
.doc-up:hover { color: var(--text); }

/* ── v2: Whoop-leaning palette + hub navigation ── */
:root {
  --accent:#1fc7b6; --accent-2:#2dd4bf; --accent-soft:rgba(31,199,182,0.15);
  --green:#2fd07f; --green-soft:rgba(47,208,127,0.14);
  --red:#f6606f; --red-soft:rgba(246,96,111,0.14);
  --purple:#9f8cf0; --purple-soft:rgba(159,140,240,0.14);
}
.brand-bg { opacity: .5; }
.sector-tiles { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; margin-top:16px; }
@media(max-width:560px){ .sector-tiles{ grid-template-columns:1fr; } }
.sector-tile {
  display:block; text-decoration:none; color:var(--text);
  background:var(--glass); -webkit-backdrop-filter:blur(18px) saturate(1.4); backdrop-filter:blur(18px) saturate(1.4);
  border:1px solid var(--glass-brd); border-radius:var(--radius); padding:16px 18px;
  transition:border-color .15s, transform .12s;
}
.sector-tile:hover { border-color:var(--accent); transform:translateY(-2px); }
.st-top { display:flex; align-items:center; gap:9px; margin-bottom:12px; }
.st-icon { font-size:17px; }
.st-label { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; color:var(--text-muted); }
.st-arrow { margin-left:auto; font-size:20px; color:var(--text-muted); }
.st-metric { font-size:21px; font-weight:800; letter-spacing:-.5px; }
.st-metric span { font-size:12px; font-weight:600; color:var(--text-muted); letter-spacing:0; }
.st-recent { font-size:12px; color:var(--text-muted); margin-top:6px; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.back-link { display:inline-block; text-decoration:none; color:var(--text-muted); font-size:13px; font-weight:600; margin-bottom:4px; padding:4px 0; }
.back-link:hover { color:var(--accent); }

/* ── HYROX stations breakdown ── */
.hx-list { display:flex; flex-direction:column; gap:9px; }
.hx-row { display:grid; grid-template-columns:112px 1fr 50px; align-items:center; gap:10px; }
.hx-label { font-size:12px; color:var(--text-muted); }
.hx-time { font-size:12px; font-weight:700; text-align:right; font-variant-numeric:tabular-nums; }

/* ── Development / education tracker ── */
.edu-status { cursor: pointer; }
.edu-row .adv-body { min-width: 0; }

/* ── Venture pipeline ── */
.deal-stage { cursor: pointer; }

/* ── CRM / bookkeeping ── */
.contact-type, .inv-status { cursor: pointer; }
.prod-status { cursor: pointer; }

/* ── Bookkeeping analysis ── */
.bk-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.bk-kpi { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.bk-kpi-v { font-size: 1.15rem; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
.bk-kpi-l { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; line-height: 1.25; }
.bk-sub { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 14px 0 7px; }
.bk-chart { display: flex; flex-direction: column; gap: 5px; }
.bk-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 9px; font-size: 0.8rem; }
.bk-k { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.bk-cli { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; color: var(--text); }
.bk-track { background: var(--surface2); border-radius: 6px; height: 14px; overflow: hidden; }
.bk-bar { display: block; height: 100%; background: linear-gradient(90deg, var(--green-soft), var(--green)); border-radius: 6px; }
.bk-bar2 { background: linear-gradient(90deg, var(--accent-soft), var(--accent)); }
.bk-bar-peak { background: linear-gradient(90deg, var(--green), #2dd4bf); }
.bk-bar-cur { background: linear-gradient(90deg, var(--accent-soft), var(--accent-2)); }
.bk-v { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 0.76rem; }
.bk-year { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; overflow: hidden; }
.bk-year > summary { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; cursor: pointer; background: var(--surface2); list-style: none; font-size: 0.9rem; }
.bk-year > summary::-webkit-details-marker { display: none; }
.bk-year-y { font-weight: 700; }
.bk-year-sum { color: var(--text-muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.bk-year[open] > summary { border-bottom: 1px solid var(--border); }
.biz-details { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 1rem; opacity: 0.7; }
.biz-details:hover { opacity: 1; }
.inv-gen { background: none; border: none; cursor: pointer; font-size: 1rem; opacity: 0.75; }
.inv-gen:hover { opacity: 1; }
.bp-l { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; }
.bk-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
.bk-select { background: var(--surface2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 0.78rem; cursor: pointer; }
.bk-select:focus { outline: none; border-color: var(--accent); }
.inv-send { background: none; border: none; cursor: pointer; font-size: 0.95rem; opacity: 0.75; }
.inv-send:hover { opacity: 1; }

/* ── invoice mask ── */
.docf-new { margin-left: auto; background: var(--accent); color: #111; border: none; border-radius: var(--radius-sm); padding: 6px 12px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.docf-new:hover { filter: brightness(1.08); }
.docf { display: flex; flex-direction: column; }
.docf .bp-i, .docf textarea.bp-i, .docf select.bp-i { width: 100%; background: var(--surface2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 0.85rem; font-family: inherit; }
.docf-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.docf-hdr { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 14px 0 6px; }
.docf-icols { display: grid; grid-template-columns: 1fr 58px 84px 62px 80px 24px; gap: 6px; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 0 2px 4px; }
.docf-irow { display: grid; grid-template-columns: 1fr 58px 84px 62px 80px 24px; gap: 6px; align-items: center; margin-bottom: 5px; }
.docf-in { background: var(--surface2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 7px; font-size: 0.8rem; font-family: inherit; min-width: 0; }
.docf-in.di-qty, .docf-in.di-price { text-align: right; }
.docf-lt { font-size: 0.78rem; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.docf-del { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; }
.docf-del:hover { color: var(--red); }
.docf-add { align-self: flex-start; background: none; border: 1px dashed var(--border); color: var(--text-muted); border-radius: var(--radius-sm); padding: 6px 12px; font-size: 0.78rem; cursor: pointer; margin-top: 6px; }
.docf-foot { text-align: right; margin: 12px 0; font-size: 0.85rem; color: var(--text-muted); }
.docf-foot b { color: var(--accent); font-size: 1rem; }
.docf-actions { display: flex; gap: 10px; margin-top: 6px; }
.docf-actions .auth-send { flex: 1; }
.docf-actions .docf-btn2 { background: var(--surface2); color: var(--text); }

/* ── offers + invoice actions ── */
.off-gen, .off-conv, .inv-paid, .inv-mahn { background: none; border: none; cursor: pointer; font-size: 0.92rem; opacity: 0.75; }
.off-gen:hover, .off-conv:hover, .inv-paid:hover, .inv-mahn:hover { opacity: 1; }
.off-status { cursor: pointer; }
.inv-od { color: var(--red); font-weight: 600; }
.inv-row-od { background: var(--red-soft); border-radius: 8px; }

/* ── Matrix organisation ── */
.mx-newnode, .mx-newlink, .mx-suggest { margin-left: 8px; background: none; border: 1px solid var(--border); color: var(--text-muted); border-radius: var(--radius-sm); padding: 5px 10px; font-size: 0.74rem; cursor: pointer; }
.mx-newnode { margin-left: auto; }
.mx-newnode:hover, .mx-newlink:hover, .mx-suggest:hover { color: var(--text); border-color: var(--text-muted); }
.mx-grid { width: 100%; border-collapse: collapse; font-size: 0.74rem; }
.mx-grid th { color: var(--text-muted); font-weight: 600; padding: 6px 4px; text-align: center; font-size: 0.68rem; }
.mx-grid th.mx-rh { text-align: right; padding-right: 10px; white-space: nowrap; }
.mx-cell { text-align: center; padding: 8px 4px; border: 1px solid var(--border); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mx-cell.mx-has { background: var(--accent-soft); color: var(--text); font-weight: 700; }
.mx-cluster { margin-bottom: 12px; }
.mx-cl-h { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; margin: 8px 0 4px; }
.mx-node { cursor: pointer; }
.mx-node:hover { background: var(--surface2); border-radius: 8px; }
.mx-open { color: var(--text-muted); align-self: center; }
.mx-meta { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; flex-wrap: wrap; }
.mx-tag { font-size: 0.7rem; padding: 3px 9px; border-radius: 20px; font-weight: 600; }
.mx-status, .mx-delnode, .mx-addlink { background: none; border: 1px solid var(--border); color: var(--text-muted); border-radius: var(--radius-sm); padding: 3px 9px; font-size: 0.72rem; cursor: pointer; }
.mx-delnode:hover { color: var(--red); border-color: var(--red); }
.mx-sec { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 16px 0 7px; display: flex; justify-content: space-between; align-items: center; }
.mx-ripple, .mx-thread { display: flex; flex-direction: column; gap: 6px; }
.mx-link { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; padding: 4px 0; }
.mx-rel { color: var(--text-muted); font-size: 0.74rem; white-space: nowrap; }
.mx-lo { font-weight: 600; }
.mx-prop { opacity: 0.75; }
.mx-badge { font-size: 0.62rem; background: var(--amber-soft); color: var(--amber); padding: 1px 6px; border-radius: 10px; }
.mx-appr { background: none; border: none; color: var(--green); cursor: pointer; }
.mx-dellink, .mx-deltr { background: none; border: none; color: var(--text-muted); cursor: pointer; margin-left: auto; font-size: 0.8rem; }
.mx-dellink:hover, .mx-deltr:hover { color: var(--red); }
.mx-trow { display: flex; align-items: flex-start; gap: 9px; font-size: 0.85rem; padding: 3px 0; }
.mx-tk { flex-shrink: 0; }
.mx-tb { flex: 1; }
.mx-due { color: var(--amber); font-size: 0.76rem; }
.mx-step-open .mx-tb { font-weight: 600; }
.mx-add { display: grid; grid-template-columns: 118px 1fr 130px 34px; gap: 6px; margin-top: 12px; }
.mx-add .bp-i { padding: 7px 8px; font-size: 0.8rem; }
.mx-reg { background: none; border: none; cursor: pointer; font-size: 0.85rem; opacity: 0.4; filter: grayscale(1); }
.mx-reg:hover { opacity: 0.9; filter: none; }
.mx-reg.mx-on { opacity: 1; filter: none; }
.mx-onedrive { width: 100%; margin-top: 10px; background: none; border: 1px dashed var(--border); color: var(--text-muted); border-radius: var(--radius-sm); padding: 9px; font-size: 0.8rem; cursor: pointer; }
.mx-onedrive:hover { color: var(--text); border-color: var(--accent); }
.mx-backnode { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.82rem; padding: 4px 0 10px; }
.doc-pick { width: 100%; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.doc-pick-cta { color: var(--accent); font-size: 0.72rem; opacity: 0; }
.doc-pick:hover .doc-pick-cta { opacity: 1; }

/* ── Mobile pass (new screens) ── */
@media (max-width: 640px) {
  .bk-kpis { grid-template-columns: repeat(2, 1fr); }
  .docf-icols, .docf-irow { grid-template-columns: 1fr 44px 64px 52px 62px 20px; gap: 4px; font-size: 0.7rem; }
  .docf-in { padding: 6px 5px; font-size: 0.74rem; }
  .mx-grid { display: block; overflow-x: auto; }
  .mx-grid th.mx-rh { font-size: 0.6rem; padding-right: 6px; }
  .mx-add { grid-template-columns: 1fr 1fr; }
  .mx-add .bp-i { font-size: 0.76rem; }
  .header-right { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
  .bk-cli { max-width: 84px; }
  .bk-row { grid-template-columns: 36px 1fr auto; gap: 6px; font-size: 0.74rem; }
  .docf-actions { flex-direction: column; }
}
.td-del { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; }
.td-del:hover { color: var(--red); }
.td-done .adv-text { text-decoration: line-through; opacity: 0.55; }
.td-check { cursor: pointer; }
.ven-del { margin-left: auto; background: none; border: none; cursor: pointer; opacity: 0.5; font-size: 0.95rem; }
.ven-del:hover { opacity: 1; }

/* ── Monatsübersicht Konto ── */
.bm-month { margin-bottom: 12px; }
.bm-label { display: flex; justify-content: space-between; font-size: 0.78rem; font-weight: 700; margin-bottom: 3px; }
.bm-saldo.bm-pos { color: var(--green); }
.bm-saldo.bm-neg { color: var(--red); }
.vt-status { cursor: pointer; }
.vt-best { font-size: 0.62rem; background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 8px; margin-left: 6px; }
.vt-ai { margin-top: 10px; padding: 10px 12px; background: var(--surface2); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; font-size: 0.8rem; line-height: 1.55; }
.camp-status { cursor: pointer; }
.camp-ch { font-size: 0.68rem; color: var(--text-muted); background: var(--surface2); padding: 1px 7px; border-radius: 8px; margin-left: 6px; }
/* ── Coach-/Dokument-Vorschläge (erst nach Bestätigung echte Aufgaben) ── */
.prop-box { border: 1px dashed var(--accent); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; background: var(--accent-soft); }
.prop-head { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin-bottom: 6px; font-weight: 700; }
.prop-row { background: none; }
.prop-ok, .prop-no { background: none; border: none; cursor: pointer; font-size: 1rem; opacity: 0.75; padding: 0 4px; }
.prop-ok:hover { opacity: 1; color: var(--green); }
.prop-no:hover { opacity: 1; color: var(--red); }

/* --- Steuerplan-Karte: Fristen-Chips --- */
.sp-tag{display:inline-block;font-size:11px;font-weight:700;padding:1px 7px;border-radius:5px;
        margin-right:8px;white-space:nowrap;background:rgba(127,127,140,.18);color:var(--muted,#8b8b96)}
.sp-tag.sp-soon{background:rgba(245,149,27,.16);color:#f5951b}
.sp-tag.sp-now{background:rgba(224,49,73,.16);color:#e03149}
.sp-tag.sp-over{background:#e03149;color:#fff}
.td-done .sp-tag{opacity:.45}
/* ── Kunden-/Kontaktliste ── */
.ct-row { cursor: pointer; }
.ct-row:hover { background: var(--surface2); border-radius: 8px; }
.ct-open-btn { background: none; border: none; color: var(--text-muted); font-size: 1.15rem; cursor: pointer; padding: 0 4px; }
.ct-row:hover .ct-open-btn { color: var(--accent); }
.ct-open { font-size: 0.62rem; background: var(--red-soft); color: var(--red); padding: 1px 6px; border-radius: 8px; margin-left: 6px; }
.ct-kdnr { font-size: 0.62rem; background: var(--surface2); color: var(--text-muted); padding: 1px 6px; border-radius: 8px; margin-left: 6px; font-weight: 500; }

/* ── Kundenakte ── */
.ct-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: -4px 0 14px; }
.ct-name { font-size: 19px; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.ct-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.ct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.ct-stat { background: var(--surface2); border-radius: var(--radius-sm); padding: 11px 13px; }
.ct-stat b { display: block; font-size: 17px; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
.ct-stat span { font-size: 10.5px; color: var(--text-muted); }
.ct-grp { margin-bottom: 16px; }
.ct-grp-h { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px; padding-bottom: 5px; border-bottom: 1px solid var(--border); }
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; }
.ct-f { display: flex; flex-direction: column; gap: 3px; }
.ct-f.w2 { grid-column: 1 / -1; }
.ct-f span { font-size: 10.5px; color: var(--text-muted); }
.ct-i { background: var(--surface2); color: var(--text); border: 1px solid var(--border); border-radius: 7px; padding: 7px 9px; font-size: 13px; font-family: inherit; width: 100%; }
.ct-i:focus { outline: none; border-color: var(--accent); }
.ct-note { resize: vertical; }
.ct-inv { max-height: 260px; overflow-y: auto; }
.ct-inv-row { display: grid; grid-template-columns: 78px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.ct-inv-row:last-child { border-bottom: none; }
.ct-inv-d { color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 11px; }
.ct-inv-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-inv-n { color: var(--text-muted); font-size: 11px; }
.ct-inv-a { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 66px; text-align: right; }
.ct-bar { position: sticky; bottom: -20px; background: var(--glass); backdrop-filter: blur(12px); margin: 4px -20px -20px; padding: 12px 20px; border-top: 1px solid var(--border); }
.ct-save-btn { width: 100%; background: var(--accent); color: #1a1200; border: none; border-radius: var(--radius-sm); padding: 11px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ct-save-btn:hover { filter: brightness(1.08); }
@media (max-width: 560px) { .ct-grid { grid-template-columns: 1fr; } .ct-f.w2 { grid-column: 1; } }

/* ── Aufklappbare Kartenbereiche ── */
.card-fold > summary { cursor: pointer; list-style: none; user-select: none; margin-bottom: 0; }
.card-fold > summary::-webkit-details-marker { display: none; }
.card-fold[open] > summary { margin-bottom: 15px; }
.fold-chev { margin-left: auto; transition: transform .18s ease; font-size: 14px; opacity: .7; }
.card-fold[open] .fold-chev { transform: rotate(180deg); }
.card-fold > summary:hover .fold-chev { opacity: 1; color: var(--accent); }

/* ══ Kundenakte: Milchglas statt Grau, keine harten Ränder ══ */
.issue-box {
  background: var(--glass) !important;
  -webkit-backdrop-filter: blur(26px) saturate(1.6);
  backdrop-filter: blur(26px) saturate(1.6);
  border: 0 !important;
  box-shadow: 0 20px 60px rgba(20,30,50,0.18);
}
/* Eingabefelder: milchig, randlos, nur ein leiser Boden */
.ct-i, .bp-i, .docf-in, .bk-select {
  background: rgba(255,255,255,0.42) !important;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 0 !important;
  border-bottom: 1.5px solid rgba(255,255,255,0.55) !important;
  border-radius: 9px !important;
  box-shadow: inset 0 1px 2px rgba(20,30,50,0.04);
  transition: background .15s ease, border-color .15s ease;
}
body:not(.light) .ct-i, body:not(.light) .bp-i, body:not(.light) .docf-in, body:not(.light) .bk-select {
  background: rgba(255,255,255,0.07) !important;
  border-bottom-color: rgba(255,255,255,0.14) !important;
}
.ct-i:focus, .bp-i:focus, .docf-in:focus {
  background: rgba(255,255,255,0.62) !important;
  border-bottom-color: rgba(255,255,255,0.95) !important;
  outline: none;
}
body:not(.light) .ct-i:focus, body:not(.light) .bp-i:focus, body:not(.light) .docf-in:focus {
  background: rgba(255,255,255,0.13) !important;
  border-bottom-color: rgba(255,255,255,0.4) !important;
}
/* Kennzahlen + Gruppen: milchig, ohne Trennlinien */
.ct-stat, .bk-kpi { background: rgba(255,255,255,0.34); backdrop-filter: blur(10px); border: 0; }
body:not(.light) .ct-stat, body:not(.light) .bk-kpi { background: rgba(255,255,255,0.06); }
.ct-stat b { color: var(--text); }
.ct-grp-h { border-bottom: 0; opacity: .75; }
.ct-inv-row { border-bottom: 1px solid rgba(255,255,255,0.35); }
body:not(.light) .ct-inv-row { border-bottom-color: rgba(255,255,255,0.07); }
/* Buttons: deckendes Weiß statt Türkis */
.ct-save-btn, .auth-send, .docf-new, .td-add {
  background: rgba(255,255,255,0.92) !important;
  color: #1b2230 !important;
  border: 0 !important;
  box-shadow: 0 2px 10px rgba(20,30,50,0.10);
  font-weight: 700;
}
.ct-save-btn:hover, .auth-send:hover, .docf-new:hover, .td-add:hover {
  background: #fff !important;
  box-shadow: 0 4px 16px rgba(20,30,50,0.16);
  filter: none;
}
.ct-bar {
  background: rgba(255,255,255,0.30);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 0;
}
body:not(.light) .ct-bar { background: rgba(255,255,255,0.05); }

/* ── Trainer-App bridge ── */
a.trainer-row { color: inherit; text-decoration: none; cursor: pointer; }
a.trainer-row:hover .trainer-open { text-decoration: underline; }
.trainer-check {
  width: 18px; height: 18px; flex-shrink: 0; align-self: center; position: relative;
  border: 1.5px solid var(--text-muted); border-radius: 5px;
}
.trainer-check.done { background: var(--green); border-color: var(--green); }
.trainer-check.done::after { content: '✓'; position: absolute; inset: 0; color: #0a0a0c; font-size: 12px; font-weight: 900; display: grid; place-items: center; }
.trainer-open { color: var(--accent); white-space: nowrap; }
.trainer-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.trainer-links a { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.trainer-links a:hover { border-color: var(--accent); color: var(--accent); }
