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

    :root {
      --bg: #0f1117;
      --surface: #1a1d27;
      --surface2: #22253a;
      --border: #2e3150;
      --text: #e8eaf6;
      --text-dim: #8b90b8;
      --accent: #6c63ff;
      --accent2: #a78bfa;
      --red: #f87171;
      --protein-color: #60a5fa;
      --carbs-color: #34d399;
      --fat-color: #fb923c;
      --radius: 14px;
      --radius-sm: 8px;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      padding-bottom: 150px;
    }

    header {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      padding: 16px 20px;
      display: flex; align-items: center; justify-content: space-between;
      position: sticky; top: 0; z-index: 10;
    }
    .logo { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.5px; }
    .logo span { color: var(--accent2); }

    .date-nav {
      display: flex; align-items: center; gap: 12px;
      justify-content: center; padding: 18px 20px 0;
    }
    .date-nav button {
      background: var(--surface2); border: 1px solid var(--border);
      color: var(--text); width: 34px; height: 34px; border-radius: 50%;
      cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
      transition: background 0.15s;
    }
    .date-nav button:hover { background: var(--border); }
    .date-label { font-weight: 600; font-size: 1rem; min-width: 170px; text-align: center; }

    main { max-width: 820px; margin: 0 auto; padding: 20px; }
    .section-title {
      font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
      text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px;
    }

    /* ── Calorie gauge card ── */
    .calorie-strip {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 20px 22px 16px;
      margin-bottom: 24px; display: flex; align-items: center; gap: 20px;
    }
    .gauge-wrap { flex: 0 0 42%; max-width: 200px; min-width: 120px; }
    .gauge-wrap svg { width: 100%; height: auto; display: block; }
    .gauge-labels { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
    .gauge-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
    .gauge-stat-label { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; white-space: nowrap; }
    .gauge-stat-val { font-size: 1rem; font-weight: 800; white-space: nowrap; }
    .gauge-divider { height: 1px; background: var(--border); }
    .gauge-meals-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
    .gauge-meals-label { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; }
    .gauge-meals-val { font-size: 1rem; font-weight: 800; }
    @media (max-width: 480px) {
      .calorie-strip { flex-direction: column; }
      .gauge-wrap { flex: none; width: 60%; max-width: 180px; margin: 0 auto; }
    }

    /* ── Macro card overshoot ── */
    .macro-card.overshoot { border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.06); }
    .macro-card.overshoot::before { background: var(--red); }
    .macro-pct.overshoot { background: rgba(248,113,113,.18); color: var(--red); }
    .progress-fill.overshoot { background: var(--red); }

    .total-item { display: flex; flex-direction: column; gap: 3px; }
    .total-label { font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; }
    .total-val { font-size: 1.15rem; font-weight: 800; }
    .strip-div { width: 1px; height: 32px; background: var(--border); }

    .macro-grid {
      display: grid; grid-template-columns: repeat(3, 1fr);
      gap: 14px; margin-bottom: 24px;
    }
    .macro-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 18px;
      position: relative; overflow: hidden;
    }
    .macro-card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0;
      height: 3px; background: var(--c);
    }
    .macro-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
    .macro-name { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
    .macro-pct { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface2); }
    .macro-val-row { display: flex; align-items: baseline; gap: 3px; margin-bottom: 8px; }
    .macro-consumed { font-size: 1.8rem; font-weight: 800; line-height: 1; }
    .macro-unit-g { font-size: 0.85rem; color: var(--text-dim); }
    .macro-goal-text { font-size: 0.77rem; color: var(--text-dim); margin-bottom: 10px; }
    .macro-goal-text strong { color: var(--text); }
    .progress-track { height: 6px; background: var(--surface2); border-radius: 999px; overflow: hidden; }
    .progress-fill { height: 100%; border-radius: 999px; background: var(--c); transition: width 0.45s cubic-bezier(.4,0,.2,1); }
    .macro-kcal-note { font-size: 0.72rem; color: var(--text-dim); margin-top: 6px; }

    .meals-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
    .meal-list { display: flex; flex-direction: column; gap: 10px; }
    .meal-item {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 14px 16px;
      display: flex; align-items: center; gap: 14px;
    }
    .meal-icon {
      width: 42px; height: 42px; border-radius: var(--radius-sm);
      display: flex; align-items: center; justify-content: center;
      font-size: 1.35rem; flex-shrink: 0; background: var(--surface2);
    }
    .meal-body { flex: 1; min-width: 0; }
    .meal-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .meal-sub { font-size: 0.75rem; color: var(--text-dim); margin-top: 2px; }
    .meal-tags { display: flex; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
    .meal-tag { font-size: 0.71rem; padding: 2px 8px; border-radius: 999px; background: var(--surface2); color: var(--text-dim); }
    .meal-tag span { font-weight: 700; color: var(--text); }
    .meal-tag.tp { border-left: 2px solid var(--protein-color); }
    .meal-tag.tc { border-left: 2px solid var(--carbs-color); }
    .meal-tag.tf { border-left: 2px solid var(--fat-color); }
    .meal-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
    .meal-kcal { text-align: right; }
    .meal-kcal .kv { font-size: 1rem; font-weight: 800; color: var(--accent2); }
    .meal-kcal .kl { font-size: 0.68rem; color: var(--text-dim); }
    .meal-del {
      background: none; border: none; color: var(--text-dim);
      cursor: pointer; font-size: 0.85rem; padding: 6px; border-radius: 50%;
      transition: background 0.15s, color 0.15s; line-height: 1;
    }
    .meal-del:hover { background: rgba(248,113,113,.15); color: var(--red); }

    .empty-state {
      text-align: center; padding: 48px 20px;
      color: var(--text-dim); font-size: 0.9rem;
      background: var(--surface); border: 1px dashed var(--border);
      border-radius: var(--radius);
    }
    .empty-state .em { font-size: 2.5rem; display: block; margin-bottom: 10px; }

    .fab {
      position: fixed; bottom: 78px; right: 20px;
      background: var(--accent); color: #fff; border: none; border-radius: 999px;
      padding: 14px 24px; font-size: 0.9rem; font-weight: 700;
      cursor: pointer; display: flex; align-items: center; gap: 8px;
      box-shadow: 0 4px 24px rgba(108,99,255,.4);
      transition: transform .15s, box-shadow .15s; z-index: 20;
    }
    .fab:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(108,99,255,.5); }

    .btn { padding: 9px 18px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: opacity .15s; }
    .btn:hover { opacity: .85; }
    .btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-dim); }
    .btn-ghost:hover { border-color: var(--accent2); color: var(--accent2); opacity: 1; }
    .btn-primary { background: var(--accent); color: #fff; }
    .btn-primary:disabled { opacity: .4; cursor: not-allowed; }

    .modal-overlay {
      position: fixed; inset: 0; z-index: 100;
      background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
      display: none; align-items: center; justify-content: center; padding: 20px;
      opacity: 0; transition: opacity .2s;
    }
    .modal-overlay.open { opacity: 1; }
    .modal {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); width: 100%; max-width: 500px; padding: 26px;
      transform: scale(.95) translateY(12px); transition: transform .2s;
      max-height: 90vh; overflow-y: auto;
    }
    .modal-overlay.open .modal { transform: scale(1) translateY(0); }
    .modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }

    .form-group { margin-bottom: 14px; }
    .form-group label {
      display: block; font-size: 0.72rem; color: var(--text-dim);
      margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    }
    .form-group input, .form-group select {
      width: 100%; background: var(--surface2); border: 1px solid var(--border);
      color: var(--text); padding: 10px 12px; border-radius: var(--radius-sm);
      font-size: 0.95rem; outline: none; transition: border-color .15s;
    }
    .form-group input:focus, .form-group select:focus { border-color: var(--accent); }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

    .search-wrap { position: relative; }
    .search-results {
      position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 200;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius-sm); max-height: 230px; overflow-y: auto;
      box-shadow: 0 8px 32px rgba(0,0,0,.45);
    }
    .sr-item {
      padding: 10px 14px; cursor: pointer; font-size: 0.87rem;
      border-bottom: 1px solid var(--border);
      display: flex; justify-content: space-between; align-items: center;
      transition: background .1s;
    }
    .sr-item:last-child { border-bottom: none; }
    .sr-item:hover, .sr-item.active { background: var(--surface2); }
    .sr-ask-ai-row { justify-content: center; padding: 8px 14px; background: transparent; cursor: default; }
    .sr-ask-ai-row:hover { background: transparent; }
    .sr-ask-ai-row .btn-ask-ai { margin-top: 0; }
    .sr-name { font-weight: 500; }
    .sr-unit { font-size: 0.7rem; color: var(--text-dim); margin-top: 2px; }
    .sr-macros { font-size: 0.7rem; color: var(--text-dim); text-align: right; white-space: nowrap; margin-left: 12px; }
    .sr-empty { padding: 16px; text-align: center; font-size: 0.85rem; color: var(--text-dim); }
    .btn-ask-ai {
      display: inline-block; margin-top: 8px; padding: 6px 14px;
      background: rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.4);
      border-radius: 20px; color: #a78bfa; font-size: 0.82rem; cursor: pointer;
      transition: background 0.15s;
    }
    .btn-ask-ai:hover { background: rgba(139,92,246,0.28); }
    .ai-spinner {
      display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(139,92,246,0.3);
      border-top-color: #a78bfa; border-radius: 50%; animation: spin 0.7s linear infinite;
      vertical-align: middle; margin-right: 6px;
    }
    .ai-result-card {
      padding: 14px 16px; border-top: 1px solid var(--border);
    }
    .ai-result-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
    .ai-badge {
      font-size: 0.72rem; padding: 2px 8px; border-radius: 10px;
      background: rgba(139,92,246,0.2); color: #c4b5fd; font-weight: 600;
    }
    .ai-source { font-size: 0.72rem; color: var(--text-dim); }
    .ai-result-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
    .ai-result-macros { font-size: 0.78rem; color: var(--text-dim); }
    .ai-use-btn { margin-top: 12px; width: 100%; }

    .sf-card {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px;
      display: flex; justify-content: space-between; align-items: center;
    }
    .sf-name { font-weight: 600; font-size: 0.9rem; }
    .sf-sub { font-size: 0.73rem; color: var(--text-dim); margin-top: 2px; }
    .sf-clear { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 1rem; padding: 4px 8px; }
    .sf-clear:hover { color: var(--red); }

    .macro-preview {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius-sm); padding: 14px 16px;
      display: grid; grid-template-columns: repeat(3, 1fr);
      gap: 10px; margin-top: 14px;
    }
    .prev-item { text-align: center; }
    .prev-val { font-size: 1.2rem; font-weight: 800; }
    .prev-lbl { font-size: 0.67rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
    .prev-kcal { grid-column: 1/-1; text-align: center; font-size: 0.75rem; color: var(--text-dim); margin-top: 4px; }

    /* ── AI meal parsing ───────────────────────────────────────────────── */
    .ai-parse-divider {
      display: flex; align-items: center; gap: 10px;
      margin: 18px 0 14px; color: var(--text-dim); font-size: 0.75rem;
    }
    .ai-parse-divider::before,
    .ai-parse-divider::after {
      content: ''; flex: 1; height: 1px; background: var(--border);
    }
    .form-group textarea {
      width: 100%; background: var(--surface2); border: 1px solid var(--border);
      color: var(--text); padding: 10px 12px; border-radius: var(--radius-sm);
      font-size: 0.88rem; outline: none; transition: border-color .15s;
      resize: none; overflow: hidden; min-height: 72px; line-height: 1.55;
      font-family: inherit; box-sizing: border-box;
    }
    .form-group textarea:focus { border-color: var(--accent); }
    .form-group textarea::placeholder { color: var(--text-dim); opacity: .7; }
    .btn-ai-parse {
      width: 100%; background: rgba(139,92,246,0.15);
      border: 1px solid rgba(139,92,246,0.4); color: #a78bfa;
      font-size: 0.88rem; font-weight: 600; padding: 10px;
      border-radius: var(--radius-sm); cursor: pointer;
      transition: background .15s, opacity .15s;
    }
    .btn-ai-parse:hover { background: rgba(139,92,246,0.28); }
    .btn-ai-parse:disabled { opacity: .45; cursor: not-allowed; }
    .ai-parse-item-card {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 10px;
    }
    .ai-parse-item-header {
      display: flex; justify-content: space-between; align-items: flex-start;
      margin-bottom: 8px;
    }
    .ai-parse-item-name { font-weight: 600; font-size: 0.92rem; }
    .ai-parse-item-serving { font-size: 0.75rem; color: var(--text-dim); margin-top: 2px; }
    .ai-parse-item-kcal {
      font-size: 0.85rem; font-weight: 700; color: var(--accent2); white-space: nowrap;
    }
    .ai-parse-item-macros {
      display: flex; gap: 14px; font-size: 0.75rem; color: var(--text-dim);
    }
    .ai-parse-item-macros span { display: flex; align-items: center; gap: 3px; }
    .ai-parse-totals {
      background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.25);
      border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 12px;
      font-size: 0.82rem;
    }
    .ai-parse-totals-title {
      font-weight: 700; font-size: 0.72rem; color: var(--accent2);
      text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
    }
    .ai-parse-totals-row {
      display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    }
    .ai-parse-totals-row span { color: var(--text-dim); }
    .ai-parse-totals-row strong { color: var(--text); }
    .ai-parse-error {
      margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm);
      background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3);
      color: #f87171; font-size: 0.83rem;
    }
    .ai-parse-source-badge {
      display: inline-block; font-size: 0.68rem; font-weight: 600;
      padding: 2px 7px; border-radius: 99px; letter-spacing: 0.01em;
    }
    .ai-parse-source-db {
      background: rgba(52,211,153,0.15); border: 1px solid rgba(52,211,153,0.4);
      color: #34d399;
    }
    .ai-parse-source-ai {
      background: rgba(167,139,250,0.15); border: 1px solid rgba(167,139,250,0.4);
      color: #a78bfa;
    }
    /* ── end AI meal parsing ────────────────────────────────────────────── */

    .goals-note {
      background: rgba(108,99,255,.1); border: 1px solid rgba(108,99,255,.25);
      border-radius: var(--radius-sm); padding: 10px 14px;
      font-size: 0.8rem; color: var(--accent2); margin-bottom: 16px;
    }

    /* ── What can I eat ── */
    .suggest-btn {
      width: 100%; background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 14px 20px; margin-bottom: 24px;
      display: flex; align-items: center; justify-content: space-between;
      cursor: pointer; color: var(--text); transition: border-color .15s, background .15s;
    }
    .suggest-btn:hover { border-color: var(--accent2); background: var(--surface2); }
    .suggest-btn-left { display: flex; align-items: center; gap: 12px; }
    .suggest-btn-icon {
      width: 38px; height: 38px; border-radius: 50%;
      background: rgba(167,139,250,.15); border: 1px solid rgba(167,139,250,.25);
      display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
    }
    .suggest-btn-label { font-weight: 700; font-size: 0.95rem; }
    .suggest-btn-sub { font-size: 0.75rem; color: var(--text-dim); margin-top: 2px; }
    .suggest-chevron { color: var(--text-dim); font-size: 1.1rem; }

    .suggest-card {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 14px 16px;
      display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
    }
    .suggest-card:last-child { margin-bottom: 0; }
    .suggest-rank {
      width: 28px; height: 28px; border-radius: 50%;
      background: var(--surface); border: 1px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      font-size: 0.75rem; font-weight: 800; color: var(--text-dim); flex-shrink: 0;
    }
    .suggest-body { flex: 1; min-width: 0; }
    .suggest-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .suggest-qty { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }
    .suggest-tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
    .suggest-tag { font-size: 0.68rem; padding: 1px 7px; border-radius: 999px; background: var(--surface); color: var(--text-dim); }
    .suggest-tag span { font-weight: 700; color: var(--text); }
    .suggest-tag.tp { border-left: 2px solid var(--protein-color); }
    .suggest-tag.tc { border-left: 2px solid var(--carbs-color); }
    .suggest-tag.tf { border-left: 2px solid var(--fat-color); }
    .suggest-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
    .suggest-kcal { font-size: 0.88rem; font-weight: 800; color: var(--accent2); }
    .suggest-kcal span { font-size: 0.65rem; font-weight: 400; color: var(--text-dim); }
    .suggest-add {
      background: rgba(108,99,255,.15); border: 1px solid rgba(108,99,255,.3);
      color: var(--accent2); border-radius: var(--radius-sm);
      padding: 4px 10px; font-size: 0.75rem; font-weight: 700;
      cursor: pointer; transition: background .15s;
    }
    .suggest-add:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
    .suggest-empty { text-align: center; padding: 28px 16px; color: var(--text-dim); font-size: 0.88rem; }
    .suggest-match-bar {
      height: 3px; background: var(--surface); border-radius: 999px; overflow: hidden; margin-top: 6px;
    }
    .suggest-match-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }

    /* ── Weekly Report ── */
    .week-nav {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 16px;
    }
    .week-nav button {
      background: var(--surface2); border: 1px solid var(--border);
      color: var(--text); width: 32px; height: 32px; border-radius: 50%;
      cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
      transition: background .15s; flex-shrink: 0;
    }
    .week-nav button:hover { background: var(--border); }
    .week-nav-label { font-weight: 700; font-size: 0.95rem; text-align: center; flex: 1; }

    .week-summary {
      display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius-sm); padding: 10px 14px;
      margin-bottom: 16px; font-size: 0.8rem;
    }
    .week-summary-score { font-size: 1.4rem; font-weight: 800; color: var(--accent2); }
    .week-summary-label { color: var(--text-dim); flex: 1; }
    .week-streak { font-size: 0.78rem; font-weight: 700; color: var(--orange); }

    .week-grid {
      display: grid; grid-template-columns: repeat(7, 1fr);
      gap: 8px; margin-bottom: 4px;
    }
    .day-card {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius-sm); padding: 10px 8px;
      display: flex; flex-direction: column; gap: 6px;
      position: relative; overflow: hidden; min-width: 0;
    }
    .day-card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0;
      height: 3px; background: var(--dc);
    }
    .day-card.dc-achieved { --dc: var(--green); }
    .day-card.dc-partial  { --dc: var(--orange); }
    .day-card.dc-missed   { --dc: var(--red); }
    .day-card.dc-empty    { --dc: var(--border); }
    .day-card.is-today    { border-color: var(--accent2); }

    .day-name { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
    .day-date { font-size: 0.78rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
    .day-status {
      font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
      padding: 2px 6px; border-radius: 999px; display: inline-block; width: fit-content;
    }
    .status-achieved { background: rgba(74,222,128,.15); color: var(--green); }
    .status-partial  { background: rgba(251,146,60,.15);  color: var(--orange); }
    .status-missed   { background: rgba(248,113,113,.15); color: var(--red); }
    .status-empty    { background: var(--surface); color: var(--text-dim); }

    .day-macro-rows { display: flex; flex-direction: column; gap: 4px; }
    .day-macro-row { display: flex; align-items: center; gap: 4px; }
    .day-macro-lbl { font-size: 0.6rem; font-weight: 800; width: 10px; flex-shrink: 0; }
    .day-macro-track { flex: 1; height: 4px; background: var(--surface); border-radius: 999px; overflow: hidden; min-width: 0; }
    .day-macro-fill  { height: 100%; border-radius: 999px; transition: width .4s; max-width: 100%; }
    .day-macro-pct   { font-size: 0.58rem; color: var(--text-dim); width: 24px; text-align: right; flex-shrink: 0; }

    .day-kcal { font-size: 0.65rem; color: var(--text-dim); margin-top: 2px; }
    .day-empty-label { font-size: 0.65rem; color: var(--text-dim); margin-top: 4px; }

    @media (max-width: 600px) {
      .week-grid { grid-template-columns: repeat(4, 1fr); }
    }
    @media (max-width: 400px) {
      .week-grid { grid-template-columns: repeat(2, 1fr); }
    }

    .loading-bar {
      position: fixed; top: 0; left: 0; right: 0; height: 3px;
      background: linear-gradient(90deg, var(--accent), var(--accent2));
      z-index: 999; animation: lanim 1.5s ease-in-out infinite;
    }
    @keyframes lanim {
      0%   { opacity:1; transform:scaleX(0);   transform-origin:left; }
      50%  { opacity:1; transform:scaleX(1);   transform-origin:left; }
      51%  { transform-origin:right; }
      100% { opacity:0; transform:scaleX(0);   transform-origin:right; }
    }

    @keyframes spin { to { transform: rotate(360deg); } }
    @keyframes sync-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50%       { opacity: 0.5; transform: scale(0.75); }
    }
    #sync-dot.syncing { animation: sync-pulse 1.2s ease-in-out infinite; }

    @media (max-width: 600px) {
      .macro-grid { grid-template-columns: 1fr; }
      .form-row { grid-template-columns: 1fr; }
      .totals-strip { gap: 18px; }
    }

    /* ── Auth overlay ─────────────────────────────────────────────────── */
    #auth-overlay {
      position: fixed; inset: 0; background: var(--bg);
      z-index: 9999; display: flex; align-items: center; justify-content: center;
      padding: 16px;
    }
    .auth-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 20px; padding: 32px 28px; width: 100%; max-width: 400px;
    }
    .auth-logo { font-size: 1.6rem; font-weight: 700; text-align: center; margin-bottom: 24px; }
    .auth-logo span { color: var(--accent); }
    .auth-tabs { display: flex; gap: 0; border-radius: 10px; overflow: hidden;
                 border: 1px solid var(--border); margin-bottom: 22px; }
    .auth-tab  { flex: 1; padding: 9px; background: none; border: none; color: var(--text-dim);
                 font-size: 0.9rem; cursor: pointer; transition: background 0.15s; }
    .auth-tab.active { background: var(--surface2); color: var(--text); font-weight: 600; }
    .auth-input {
      width: 100%; padding: 11px 14px; background: var(--surface2);
      border: 1px solid var(--border); border-radius: 10px; color: var(--text);
      font-size: 0.92rem; margin-bottom: 10px; box-sizing: border-box;
    }
    .auth-input:focus { outline: none; border-color: var(--accent); }
    .auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .auth-btn  {
      width: 100%; padding: 13px; background: var(--accent); color: #fff;
      border: none; border-radius: 12px; font-size: 1rem; font-weight: 600;
      cursor: pointer; margin-top: 6px; transition: opacity 0.15s;
    }
    .auth-btn:hover { opacity: 0.88; }
    .auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .auth-error { color: #f87171; font-size: 0.82rem; margin-top: 8px; min-height: 18px; }
    .auth-step-label {
      font-size: 0.8rem; color: var(--text-dim); text-align: center;
      margin-bottom: 14px;
    }
    .auth-divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
    /* Onboarding option cards */
    .ob-card {
      flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
      gap: 6px; padding: 14px 6px; border-radius: 12px; border: 2px solid var(--border);
      background: var(--surface2); color: var(--text); font-size: 1.6rem; cursor: pointer;
      transition: border-color .15s, background .15s, transform .1s;
    }
    .ob-card:hover { border-color: var(--accent); background: var(--surface); }
    .ob-card.selected {
      border-color: var(--accent); background: rgba(108,99,255,.15);
      transform: translateY(-2px);
    }
    .ob-card-label { font-size: 0.72rem; font-weight: 700; color: var(--text); white-space: nowrap; }
    /* Read-only badge in profile */
    .locked-badge {
      display: inline-flex; align-items: center; gap: 4px; font-size: 0.68rem;
      background: rgba(108,99,255,.12); border: 1px solid rgba(108,99,255,.25);
      border-radius: 999px; padding: 2px 8px; color: var(--accent2); font-weight: 600;
    }

    /* ── Profile modal ────────────────────────────────────────────────── */
    .user-btn {
      display: flex; align-items: center; gap: 6px; padding: 6px 12px;
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 20px; color: var(--text); font-size: 0.82rem; cursor: pointer;
    }
    .user-avatar {
      width: 22px; height: 22px; border-radius: 50%;
      background: var(--accent); display: flex; align-items: center; justify-content: center;
      font-size: 0.7rem; font-weight: 700; color: #fff; flex-shrink: 0;
    }
    .profile-section-title {
      font-size: 0.72rem; font-weight: 600; color: var(--text-dim);
      text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 10px;
    }
    .profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .pw-note { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 10px; }

    /* ── Bottom navigation bar ─────────────────────────────────────────────── */
    .bottom-nav {
      position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
      background: var(--surface); border-top: 1px solid var(--border);
      display: none; /* shown only when logged in */
      height: 62px;
      align-items: stretch;
    }
    .bottom-nav-inner {
      display: flex; width: 100%; height: 100%;
      max-width: 820px; margin: 0 auto;
      align-items: stretch;
    }
    .bnav-tab {
      flex: 1; display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      gap: 4px;
      background: none; border: none; cursor: pointer;
      font-size: 0.65rem; font-weight: 600; color: var(--text-dim);
      transition: color .18s; padding: 0; position: relative;
      line-height: 1;
    }
    .bnav-tab .bnav-icon { font-size: 1.3rem; line-height: 1; display: block; }
    .bnav-tab.active { color: var(--accent2); }
    .bnav-tab.active::after {
      content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
      width: 36px; height: 3px; background: var(--accent2); border-radius: 0 0 4px 4px;
    }

    /* ── Exercise tab ──────────────────────────────────────────────────────── */
    #section-exercise { padding: 0 0 150px; }
    .ex-inner { max-width: 820px; margin: 0 auto; padding: 0 20px; }

    /* ── Progression Insights card (integrated, always visible) ── */
    .ex-insights-card {
      margin: 16px 0 0;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 14px 14px 10px;
    }
    .ex-insights-title {
      font-size: 0.68rem; font-weight: 700; letter-spacing: .08em;
      text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px;
      display: flex; align-items: center; gap: 6px;
    }
    /* ── Exercise filter chips ── */
    .ex-insights-chips {
      display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px;
      scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .ex-insights-chips::-webkit-scrollbar { display: none; }
    .ex-chip {
      flex: 0 0 auto; cursor: pointer; user-select: none;
      font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em;
      padding: 5px 13px; border-radius: 20px;
      border: 1px solid var(--border);
      background: var(--surface2); color: var(--text-dim);
      transition: background .15s, border-color .15s, color .15s;
      white-space: nowrap;
    }
    .ex-chip:hover:not(.active) { background: var(--border); color: var(--text); }
    .ex-chip.active {
      background: rgba(139,92,246,.18); border-color: #7c3aed; color: #c4b5fd;
    }
    .ex-insights-placeholder {
      padding: 32px 0 24px; text-align: center;
      font-size: 0.82rem; color: var(--text-dim); font-style: italic;
    }
    .ex-insights-loading {
      padding: 32px 0 24px; text-align: center;
      font-size: 0.78rem; color: var(--text-dim);
      display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .ex-insights-loading::before {
      content: ''; display: inline-block; width: 14px; height: 14px;
      border: 2px solid var(--border); border-top-color: var(--accent2);
      border-radius: 50%; animation: spin .7s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .ex-insights-wrap {
      position: relative; height: 220px; margin-top: 0;
    }
    .ex-insights-wrap canvas { display: block; }
    .ex-insights-hint {
      font-size: 0.63rem; color: var(--text-dim); text-align: right;
      margin-top: 5px; opacity: .6; letter-spacing: .02em;
    }

    .ex-workout-select-wrap { padding: 14px 0 0; }

    /* Exercise cards */
    .ex-card {
      margin: 10px 0 0;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); overflow: hidden;
    }
    .ex-card-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 13px 16px; cursor: pointer; user-select: none;
      transition: background .15s;
    }
    .ex-card-header:hover { background: var(--surface2); }
    .ex-card-name { font-size: 0.88rem; font-weight: 700; color: var(--text); }
    .ex-card-meta { display: flex; align-items: center; gap: 10px; }
    .ex-kcal-badge {
      font-size: 0.65rem; font-weight: 700; color: #a78bfa;
      background: rgba(167,139,250,.12); padding: 2px 8px; border-radius: 20px;
    }
    .ex-done-badge {
      font-size: 0.65rem; font-weight: 700; color: #34d399;
      background: rgba(52,211,153,.12); padding: 2px 8px; border-radius: 20px;
    }
    .ex-chevron { font-size: 0.85rem; color: var(--text-dim); transition: transform .2s; }
    .ex-chevron.open { transform: rotate(180deg); }

    .ex-card-body { padding: 0 16px 14px; border-top: 1px solid var(--border); }

    /* Set table */
    .ex-sets-header {
      display: grid; grid-template-columns: 28px 56px 1fr 1fr 1fr;
      gap: 6px; padding: 8px 0 4px;
      font-size: 0.58rem; font-weight: 700; color: var(--text-dim);
      text-transform: uppercase; letter-spacing: .06em;
    }
    .ex-set-row {
      display: grid; grid-template-columns: 28px 56px 1fr 1fr 1fr;
      gap: 6px; padding: 5px 0; align-items: center;
      border-top: 1px solid rgba(46,49,80,.5);
    }
    .ex-set-num { font-size: 0.75rem; font-weight: 700; color: var(--text-dim); text-align: center; }
    .ex-target-rep { font-size: 0.72rem; color: var(--text-dim); text-align: center; }
    .ex-input {
      background: var(--surface2); border: 1px solid var(--border); border-radius: 6px;
      padding: 5px 7px; color: var(--text); font-size: 0.78rem; width: 100%;
      text-align: center; outline: none; transition: border-color .15s;
    }
    .ex-input:focus { border-color: var(--accent2); }
    .ex-input.notes { text-align: left; font-size: 0.72rem; }
    .ex-input.invalid { border-color: #ef4444; background: rgba(239,68,68,.08); }

    .ex-save-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
    .ex-save-btn {
      background: var(--accent); color: #fff; border: none; border-radius: 8px;
      padding: 7px 16px; font-size: 0.78rem; font-weight: 700; cursor: pointer;
      transition: opacity .15s;
    }
    .ex-save-btn:hover { opacity: .85; }
    .ex-save-btn:disabled { opacity: .4; cursor: not-allowed; }
    .ex-clear-btn {
      background: transparent; color: #ef4444; border: 1px solid rgba(239,68,68,.4);
      border-radius: 8px; padding: 7px 14px; font-size: 0.78rem; font-weight: 600;
      cursor: pointer; transition: background .15s, border-color .15s;
    }
    .ex-clear-btn:hover { background: rgba(239,68,68,.1); border-color: #ef4444; }
    .ex-save-status { font-size: 0.72rem; color: var(--text-dim); }
    .ex-save-status.ok { color: #34d399; }
    .ex-save-status.err { color: var(--red); }

    /* Logged Activities Section */
    .act-log-section {
      margin-top: 24px;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); overflow: hidden;
    }
    .act-log-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 13px 16px; border-bottom: 1px solid var(--border);
    }
    .act-log-title {
      font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: .07em; color: var(--text-dim);
    }
    .act-log-count {
      font-size: 0.68rem; font-weight: 700; color: var(--accent2);
      background: rgba(139,92,246,.12); padding: 2px 9px; border-radius: 20px;
    }
    .act-log-empty {
      padding: 20px 16px; text-align: center;
      font-size: 0.82rem; color: var(--text-dim);
    }
    .act-log-row {
      display: grid;
      grid-template-columns: 1fr 72px 90px 32px;
      gap: 8px; align-items: center;
      padding: 10px 16px; border-top: 1px solid rgba(46,49,80,.45);
      font-size: 0.8rem;
    }
    .act-log-row:first-child { border-top: none; }
    .act-log-name { font-weight: 600; color: var(--text); }
    .act-log-meta { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }
    .act-log-pill {
      font-size: 0.68rem; font-weight: 600; padding: 2px 7px;
      border-radius: 20px; background: var(--surface2); color: var(--text-dim);
      text-align: center; white-space: nowrap;
    }
    .act-log-kcal {
      font-size: 0.78rem; font-weight: 700; color: #a78bfa; text-align: right;
    }
    .act-log-del {
      background: none; border: none; color: var(--text-dim); cursor: pointer;
      font-size: 1rem; padding: 2px 4px; border-radius: 4px;
      transition: color .15s, background .15s; display: flex; align-items: center;
    }
    .act-log-del:hover { color: #ef4444; background: rgba(239,68,68,.1); }

    /* ── Additional Exercises Section ── */
    .add-ex-section {
      margin-top: 24px;
    }
    .add-ex-section-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 4px 0 10px;
    }
    .add-ex-section-title {
      font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: .08em; color: var(--text-dim);
    }
    .add-ex-search-wrap { position: relative; }
    .add-ex-results {
      position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 200;
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: 10px; overflow: hidden;
      box-shadow: 0 8px 24px rgba(0,0,0,.35);
      max-height: 220px; overflow-y: auto;
    }
    .add-ex-result-item {
      padding: 10px 14px; cursor: pointer; font-size: 0.85rem;
      display: flex; justify-content: space-between; align-items: center;
      border-bottom: 1px solid var(--border); transition: background .1s;
    }
    .add-ex-result-item:last-child { border-bottom: none; }
    .add-ex-result-item:hover, .add-ex-result-item.active { background: var(--surface); }
    .add-ex-result-name { font-weight: 500; }
    .add-ex-result-meta { font-size: 0.7rem; color: var(--text-dim); }
    .add-ex-empty-state {
      padding: 18px 0 4px; text-align: center;
      font-size: 0.82rem; color: var(--text-dim); font-style: italic;
    }
    .add-ex-card-remove {
      background: none; border: none; color: var(--text-dim); cursor: pointer;
      font-size: 1.1rem; padding: 2px 6px; border-radius: 4px;
      transition: color .15s, background .15s; line-height: 1;
    }
    .add-ex-card-remove:hover { color: #ef4444; background: rgba(239,68,68,.1); }

    /* ══════════════════════════════════════════════════════════
       Desktop Sidebar Navigation
    ══════════════════════════════════════════════════════════ */
    .sidebar {
      display: none;
      position: fixed; left: 0; top: 0; bottom: 0; width: 240px;
      background: var(--surface); border-right: 1px solid var(--border);
      flex-direction: column; z-index: 50; overflow: hidden;
    }
    .sidebar-logo {
      font-size: 1.15rem; font-weight: 800; letter-spacing: -0.4px;
      padding: 22px 20px 18px; color: var(--text);
      border-bottom: 1px solid var(--border); flex-shrink: 0;
    }
    .sidebar-logo span { color: var(--accent2); }

    .sidebar-section-label {
      font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em;
      text-transform: uppercase; color: var(--text-dim);
      padding: 14px 14px 6px;
    }
    .sidebar-nav { flex: 1; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
    .snav-item {
      display: flex; align-items: center; gap: 11px;
      padding: 10px 12px; border-radius: 10px; border: none; background: none;
      color: var(--text-dim); font-size: 0.87rem; font-weight: 600;
      cursor: pointer; text-align: left; width: 100%;
      transition: background .15s, color .15s;
    }
    .snav-item:hover { background: rgba(108,99,255,.09); color: var(--text); }
    .snav-item.active { background: rgba(108,99,255,.16); color: var(--accent2); }
    .snav-icon { font-size: 1.05rem; width: 22px; text-align: center; flex-shrink: 0; }

    .sidebar-bottom {
      padding: 10px 10px 14px; border-top: 1px solid var(--border); flex-shrink: 0;
      display: flex; flex-direction: column; gap: 1px;
    }
    .sidebar-user-info {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 12px; border-radius: 10px;
      cursor: pointer; transition: background .15s;
    }
    .sidebar-user-info:hover { background: rgba(108,99,255,.09); }
    .sidebar-avatar {
      width: 32px; height: 32px; border-radius: 50%;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      display: flex; align-items: center; justify-content: center;
      font-size: 0.8rem; font-weight: 700; color: #fff; flex-shrink: 0;
    }
    .sidebar-user-name { font-size: 0.82rem; font-weight: 600; color: var(--text); }
    .sidebar-user-sub  { font-size: 0.68rem; color: var(--text-dim); }

    /* ══════════════════════════════════════════════════════════
       Responsive — desktop breakpoint (≥ 768px)
    ══════════════════════════════════════════════════════════ */
    @media (min-width: 768px) {
      .sidebar   { display: flex; }
      .bottom-nav { display: none !important; }

      /* Push all content right of sidebar */
      body { padding-left: 240px; padding-bottom: 32px; }

      /* Header: hide logo (sidebar has it), anchor right of sidebar */
      header { left: 240px; }
      header .logo { display: none; }

      /* Date nav aligned with content */
      .date-nav { padding-left: 32px; padding-right: 32px; max-width: 900px; margin: 0 auto; }

      /* Main content: max width, centered */
      main, .ex-inner, #progress-inner { max-width: 900px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

      /* FAB: clear from bottom nav (no longer needed), just offset from edge */
      .fab { bottom: 28px; right: 28px; }

      /* More breathing room on cards */
      .macro-grid { gap: 18px; }
      .calorie-strip { padding: 24px 28px 20px; }

      /* Modals slightly wider on desktop */
      .modal { max-width: 560px; }
    }

    /* ── Progress tab ── */
    .prog-range-btn {
      padding: 7px 22px; border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--surface2); color: var(--text-dim);
      font-size: 0.82rem; font-weight: 600; cursor: pointer;
      transition: all .15s;
    }
    .prog-range-btn:hover { border-color: var(--accent2); color: var(--accent2); }
    .prog-range-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 12px rgba(108,99,255,.35); }

    /* Activity modal */
    .activity-option {
      padding: 9px 14px; background: var(--surface2); border: 1px solid var(--border);
      border-radius: 8px; font-size: 0.82rem; cursor: pointer; margin-bottom: 6px;
      transition: border-color .15s, background .15s;
    }
    .activity-option:hover { border-color: var(--accent2); background: rgba(108,99,255,.08); }
    .activity-option.selected { border-color: var(--accent2); background: rgba(108,99,255,.12); color: var(--accent2); font-weight: 600; }

    /* ── Admin panel ───────────────────────────────────────────────────── */
    .admin-tabs {
      display: flex; gap: 0; border-radius: 10px; overflow: hidden;
      border: 1px solid var(--border); width: fit-content;
    }
    .admin-tab {
      padding: 8px 22px; background: none; border: none; color: var(--text-dim);
      cursor: pointer; font-size: 0.86rem; transition: background .15s, color .15s;
    }
    .admin-tab.active { background: var(--surface2); color: var(--text); font-weight: 600; }
    .admin-tab:not(:last-child) { border-right: 1px solid var(--border); }

    .admin-ex-row {
      display: flex; align-items: center; justify-content: space-between;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius-sm); padding: 11px 14px; gap: 10px;
      transition: border-color .15s;
    }
    .admin-ex-row:hover { border-color: var(--accent); }
    .admin-ex-row.inactive { opacity: 0.5; }
    .admin-ex-info { flex: 1; min-width: 0; }
    .admin-ex-name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .admin-ex-meta { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }
    .admin-ex-badge {
      font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: 20px;
      text-transform: uppercase; letter-spacing: .05em; flex-shrink: 0;
    }
    .badge-beginner     { background: rgba(52,211,153,.15); color: #34d399; }
    .badge-intermediate { background: rgba(251,191,36,.15);  color: #fbbf24; }
    .badge-advanced     { background: rgba(248,113,113,.15); color: #f87171; }
    .badge-inactive     { background: rgba(107,114,128,.15); color: #6b7280; }

    .admin-ex-actions { display: flex; gap: 6px; flex-shrink: 0; }
    .admin-btn-sm {
      padding: 5px 11px; border-radius: 6px; font-size: 0.76rem; font-weight: 600;
      cursor: pointer; border: 1px solid var(--border); background: var(--surface2);
      color: var(--text-dim); transition: background .15s, color .15s, border-color .15s;
    }
    .admin-btn-sm:hover          { background: var(--border); color: var(--text); }
    .admin-btn-sm.btn-edit:hover { background: rgba(108,99,255,.18); border-color: var(--accent); color: var(--accent2); }
    .admin-btn-sm.btn-del:hover  { background: rgba(248,113,113,.15); border-color: #f87171; color: #f87171; }
    .admin-btn-sm.btn-restore:hover { background: rgba(52,211,153,.15); border-color: #34d399; color: #34d399; }

    .admin-wk-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); overflow: hidden; transition: border-color .15s;
    }
    .admin-wk-card.inactive { opacity: 0.55; }
    .admin-wk-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 13px 16px; cursor: pointer; gap: 10px;
      border-bottom: 1px solid transparent; transition: border-color .15s;
    }
    .admin-wk-card.expanded .admin-wk-header { border-bottom-color: var(--border); }
    .admin-wk-title { font-size: 0.95rem; font-weight: 700; }
    .admin-wk-subtitle { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }
    .admin-wk-chevron { font-size: 0.75rem; color: var(--text-dim); transition: transform .2s; }
    .admin-wk-card.expanded .admin-wk-chevron { transform: rotate(180deg); }
    .admin-wk-body { padding: 12px 16px; display: none; }
    .admin-wk-card.expanded .admin-wk-body { display: block; }

    .admin-ex-item {
      display: flex; align-items: center; gap: 10px; padding: 8px 10px;
      background: var(--surface2); border-radius: 7px; margin-bottom: 5px;
    }
    .admin-ex-item-order {
      width: 22px; height: 22px; border-radius: 50%; background: var(--border);
      font-size: 0.7rem; font-weight: 700; color: var(--text-dim);
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .admin-ex-item-name { flex: 1; font-size: 0.85rem; }
    .admin-ex-item-defaults { font-size: 0.7rem; color: var(--text-dim); }

/* ── Plan prefill strip ───────────────────────────────────────────────────── */
.prefill-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(108, 99, 255, .10);
  border: 1px solid rgba(108, 99, 255, .25);
}
.prefill-icon { font-size: 1rem; flex-shrink: 0; }
.prefill-text { flex: 1; font-size: 0.82rem; color: var(--text-dim); }
.prefill-btn {
  padding: 5px 12px; border-radius: 6px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--accent);
  background: rgba(108, 99, 255, .18); color: var(--accent2);
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.prefill-btn:hover { background: rgba(108, 99, 255, .32); border-color: var(--accent2); }
