  :root {
      --red:        #E63946;
      --red-dim:    rgba(230, 57, 70, 0.15);
      --red-glow:   rgba(230, 57, 70, 0.35);
      --green:      #22C55E;
      --amber:      #F59E0B;
      --blue:       #60A5FA;

      --bg:         #0C0C0E;
      --surface:    #141416;
      --surface2:   #1A1A1E;
      --surface3:   #222228;
      --border:     rgba(255,255,255,0.07);
      --border2:    rgba(255,255,255,0.12);

      --text:       #F0EEF0;
      --text-2:     #9898A6;
      --text-3:     #55555F;

      --sidebar-w:  260px;
      --topbar-h:   64px;

      --radius-sm:  8px;
      --radius-md:  14px;
      --radius-lg:  20px;

      --font-sans:  'DM Sans', sans-serif;
      --font-serif: 'DM Serif Display', serif;
      --font-mono:  'Space Mono', monospace;

      --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* ══════════════════════════════════════════
       RESET & BASE
    ══════════════════════════════════════════ */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { height: 100%; }

    body {
      font-family: var(--font-sans);
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      display: flex;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
    }

    /* ══════════════════════════════════════════
       SIDEBAR
    ══════════════════════════════════════════ */
    .sidebar {
      width: var(--sidebar-w);
      min-height: 100vh;
      background: var(--surface);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 0; left: 0; bottom: 0;
      z-index: 50;
      transition: transform 0.3s var(--ease-out);
    }

    .sidebar-logo {
      height: var(--topbar-h);
      display: flex;
      align-items: center;
      gap: 0.7rem;
      padding: 0 1.5rem;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }
    .logo-mark {
      width: 32px; height: 32px;
      background: var(--red);
      border-radius: 9px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      box-shadow: 0 0 16px var(--red-glow);
      position: relative;
    }
    .logo-mark::before,
    .logo-mark::after {
      content: '';
      position: absolute;
      background: white;
      border-radius: 2px;
    }
    .logo-mark::before { width: 14px; height: 3px; }
    .logo-mark::after  { width: 3px; height: 14px; }
    .logo-text {
      font-family: var(--font-mono);
      font-weight: 700;
      font-size: 1rem;
      color: var(--text);
      letter-spacing: -0.02em;
    }
    .logo-text span {
      color: var(--red);
    }

    /* nav sections */
    .sidebar-nav {
      flex: 1;
      padding: 1.2rem 0.8rem;
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
      overflow-y: auto;
    }
    .nav-section-label {
      font-family: var(--font-mono);
      font-size: 0.6rem;
      color: var(--text-3);
      letter-spacing: 0.14em;
      text-transform: uppercase;
      padding: 0.6rem 0.8rem 0.3rem;
      margin-top: 0.5rem;
    }
    .nav-item {
      display: flex;
      align-items: center;
      gap: 0.7rem;
      padding: 0.65rem 0.9rem;
      border-radius: var(--radius-sm);
      font-size: 0.875rem;
      font-weight: 500;
      color: var(--text-2);
      text-decoration: none;
      cursor: pointer;
      transition: background 0.15s, color 0.15s;
      position: relative;
      user-select: none;
    }
    .nav-item:hover {
      background: var(--surface2);
      color: var(--text);
    }
    .nav-item.active {
      background: var(--red-dim);
      color: var(--red);
    }
    .nav-item.active::before {
      content: '';
      position: absolute;
      left: 0; top: 20%; bottom: 20%;
      width: 3px;
      background: var(--red);
      border-radius: 0 3px 3px 0;
    }
    .nav-icon {
      width: 18px; height: 18px;
      flex-shrink: 0;
      opacity: 0.7;
    }
    .nav-item.active .nav-icon,
    .nav-item:hover .nav-icon { opacity: 1; }
    .nav-badge {
      margin-left: auto;
      background: var(--red);
      color: white;
      font-family: var(--font-mono);
      font-size: 0.6rem;
      font-weight: 700;
      padding: 0.15rem 0.45rem;
      border-radius: 100px;
    }

    /* user card at bottom */
    .sidebar-user {
      padding: 0.8rem;
      border-top: 1px solid var(--border);
      flex-shrink: 0;
    }
    .user-card {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.7rem 0.8rem;
      border-radius: var(--radius-sm);
      background: var(--surface2);
      cursor: pointer;
      transition: background 0.15s;
    }
    .user-card:hover { background: var(--surface3); }
    .user-avatar {
      width: 34px; height: 34px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--red), #FF6B6B);
      display: flex; align-items: center; justify-content: center;
      font-family: var(--font-serif);
      font-size: 0.9rem;
      color: white;
      flex-shrink: 0;
    }
    .user-info { flex: 1; min-width: 0; }
    .user-name {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .user-role {
      font-size: 0.68rem;
      color: var(--text-3);
      font-family: var(--font-mono);
      margin-top: 0.1rem;
    }
    .user-chevron {
      width: 14px; height: 14px;
      color: var(--text-3);
    }

    /* ══════════════════════════════════════════
       MAIN LAYOUT
    ══════════════════════════════════════════ */
    .main-wrap {
      margin-left: var(--sidebar-w);
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }

    /* ══════════════════════════════════════════
       TOPBAR
    ══════════════════════════════════════════ */
    .topbar {
      height: var(--topbar-h);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 2rem;
      position: sticky;
      top: 0;
      z-index: 40;
      background: rgba(12,12,14,0.85);
      backdrop-filter: blur(16px);
    }
    .topbar-left {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .breadcrumb {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.82rem;
      color: var(--text-3);
    }
    .breadcrumb .sep { color: var(--text-3); }
    .breadcrumb .current { color: var(--text); font-weight: 500; }
    .topbar-right {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    .topbar-btn {
      width: 34px; height: 34px;
      border-radius: var(--radius-sm);
      background: var(--surface2);
      border: 1px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
      position: relative;
    }
    .topbar-btn:hover {
      background: var(--surface3);
      border-color: var(--border2);
    }
    .topbar-btn svg {
      width: 16px; height: 16px;
      color: var(--text-2);
    }
    .notif-dot {
      position: absolute;
      top: 7px; right: 7px;
      width: 6px; height: 6px;
      background: var(--red);
      border-radius: 50%;
      border: 1.5px solid var(--bg);
    }
    .gen-btn {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      background: var(--red);
      color: white;
      font-size: 0.82rem;
      font-weight: 600;
      padding: 0 1rem;
      height: 34px;
      border-radius: var(--radius-sm);
      border: none;
      cursor: pointer;
      transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
      box-shadow: 0 2px 12px var(--red-glow);
      text-decoration: none;
    }
    .gen-btn:hover {
      background: #c62d38;
      box-shadow: 0 4px 20px var(--red-glow);
      transform: translateY(-1px);
    }
    .gen-btn svg { width: 14px; height: 14px; }

    /* ══════════════════════════════════════════
       PAGE CONTENT
    ══════════════════════════════════════════ */
    .page {
      padding: 2rem 2rem 3rem;
      display: flex;
      flex-direction: column;
      gap: 1.75rem;
    }

    /* ── Page header ── */
    .page-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
    }
    .page-header h1 {
      font-family: var(--font-serif);
      font-size: 2rem;
      color: var(--text);
      line-height: 1.1;
    }
    .page-header p {
      margin-top: 0.3rem;
      font-size: 0.875rem;
      color: var(--text-2);
    }
    .header-actions {
      display: flex;
      gap: 0.6rem;
      align-items: center;
      flex-wrap: wrap;
    }
    .btn-sm {
      display: flex; align-items: center; gap: 0.4rem;
      padding: 0 0.9rem;
      height: 34px;
      border-radius: var(--radius-sm);
      font-size: 0.8rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s;
      text-decoration: none;
      border: none;
    }
    .btn-sm svg { width: 14px; height: 14px; flex-shrink: 0; }
    .btn-outline-sm {
      background: transparent;
      border: 1px solid var(--border2);
      color: var(--text-2);
    }
    .btn-outline-sm:hover {
      background: var(--surface2);
      color: var(--text);
      border-color: var(--border2);
    }
    .btn-red-sm {
      background: var(--red);
      color: white;
      box-shadow: 0 2px 10px var(--red-glow);
    }
    .btn-red-sm:hover {
      background: #c62d38;
      transform: translateY(-1px);
    }

    /* ── Alert banner ── */
    .alert-banner {
      background: rgba(230,57,70,0.08);
      border: 1px solid rgba(230,57,70,0.25);
      border-radius: var(--radius-md);
      padding: 0.9rem 1.2rem;
      display: flex;
      align-items: center;
      gap: 0.8rem;
      animation: slideDown 0.5s var(--ease-out) both;
    }
    @keyframes slideDown {
      from { opacity: 0; transform: translateY(-8px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .alert-icon {
      width: 32px; height: 32px;
      background: var(--red-dim);
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .alert-icon svg { width: 16px; height: 16px; color: var(--red); }
    .alert-text { flex: 1; }
    .alert-text strong {
      font-size: 0.82rem;
      color: var(--text);
      display: block;
    }
    .alert-text span {
      font-size: 0.78rem;
      color: var(--text-2);
    }
    .alert-close {
      width: 26px; height: 26px;
      border-radius: 6px;
      background: transparent;
      border: none;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer;
      color: var(--text-3);
      transition: background 0.15s, color 0.15s;
    }
    .alert-close:hover { background: var(--surface2); color: var(--text); }
    .alert-close svg { width: 14px; height: 14px; }

    /* ── Stat cards row ── */
    .stats-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1rem;
    }
    .stat-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 1.3rem 1.4rem;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      position: relative;
      overflow: hidden;
      transition: border-color 0.2s, transform 0.2s;
      animation: fadeUp 0.5s var(--ease-out) both;
    }
    .stat-card:hover {
      border-color: var(--border2);
      transform: translateY(-2px);
    }
    .stat-card:nth-child(1) { animation-delay: 0.05s; }
    .stat-card:nth-child(2) { animation-delay: 0.10s; }
    .stat-card:nth-child(3) { animation-delay: 0.15s; }
    .stat-card:nth-child(4) { animation-delay: 0.20s; }
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(16px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .stat-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .stat-label {
      font-size: 0.75rem;
      color: var(--text-2);
      font-weight: 500;
    }
    .stat-icon {
      width: 30px; height: 30px;
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
    }
    .stat-icon svg { width: 15px; height: 15px; }
    .stat-value {
      font-family: var(--font-serif);
      font-size: 2rem;
      color: var(--text);
      line-height: 1;
    }
    .stat-footer {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.72rem;
      color: var(--text-3);
    }
    .stat-change {
      display: flex; align-items: center; gap: 0.2rem;
      font-family: var(--font-mono);
      font-size: 0.68rem;
      padding: 0.15rem 0.4rem;
      border-radius: 4px;
    }
    .stat-change.up   { background: rgba(34,197,94,0.12); color: var(--green); }
    .stat-change.warn { background: rgba(245,158,11,0.12); color: var(--amber); }
    .stat-change svg  { width: 10px; height: 10px; }

    /* ── Main grid ── */
    .main-grid {
      display: grid;
      grid-template-columns: 1fr 360px;
      gap: 1.25rem;
      align-items: start;
    }

    /* ── Panel base ── */
    .panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      overflow: hidden;
      animation: fadeUp 0.55s var(--ease-out) 0.25s both;
    }
    .panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.1rem 1.4rem;
      border-bottom: 1px solid var(--border);
    }
    .panel-title {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .panel-title svg { width: 16px; height: 16px; color: var(--red); }
    .panel-action {
      font-size: 0.75rem;
      color: var(--text-3);
      text-decoration: none;
      cursor: pointer;
      padding: 0.3rem 0.6rem;
      border-radius: 6px;
      border: 1px solid var(--border);
      transition: all 0.15s;
    }
    .panel-action:hover {
      color: var(--text);
      border-color: var(--border2);
      background: var(--surface2);
    }

    /* ── Health Card ── */
    .health-card-wrap {
      padding: 1.4rem;
    }
    .health-card {
      background: linear-gradient(145deg, #1a0d10, #1E1825, #0E1A1E);
      border-radius: var(--radius-lg);
      padding: 1.8rem;
      position: relative;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,0.06);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.07),
        0 20px 60px rgba(0,0,0,0.5);
    }
    /* decorative blobs */
    .health-card::before {
      content: '';
      position: absolute;
      top: -40px; right: -40px;
      width: 180px; height: 180px;
      background: radial-gradient(circle, rgba(230,57,70,0.18) 0%, transparent 70%);
      border-radius: 50%;
    }
    .health-card::after {
      content: '';
      position: absolute;
      bottom: -60px; left: 30px;
      width: 200px; height: 200px;
      background: radial-gradient(circle, rgba(96,165,250,0.07) 0%, transparent 70%);
      border-radius: 50%;
    }
    .hc-top-row {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 1.5rem;
      position: relative; z-index: 1;
    }
    .hc-chip {
      font-family: var(--font-mono);
      font-size: 0.6rem;
      color: var(--red);
      letter-spacing: 0.15em;
      text-transform: uppercase;
      background: rgba(230,57,70,0.12);
      border: 1px solid rgba(230,57,70,0.2);
      padding: 0.25rem 0.7rem;
      border-radius: 100px;
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }
    .hc-chip::before {
      content: '';
      width: 5px; height: 5px;
      background: var(--red);
      border-radius: 50%;
    }
    .hc-cross-icon {
      width: 36px; height: 36px;
      background: var(--red);
      border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      position: relative;
      box-shadow: 0 0 20px var(--red-glow);
    }
    .hc-cross-icon::before,
    .hc-cross-icon::after {
      content: '';
      position: absolute;
      background: white;
      border-radius: 2px;
    }
    .hc-cross-icon::before { width: 16px; height: 3px; }
    .hc-cross-icon::after  { width: 3px; height: 16px; }
    .hc-name-block {
      position: relative; z-index: 1;
      margin-bottom: 1.4rem;
    }
    .hc-name {
      font-family: var(--font-serif);
      font-size: 1.8rem;
      color: var(--text);
      line-height: 1.1;
    }
    .hc-sub {
      font-size: 0.75rem;
      color: rgba(255,255,255,0.35);
      margin-top: 0.25rem;
      font-family: var(--font-mono);
    }
    .hc-vitals {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.8rem;
      position: relative; z-index: 1;
      margin-bottom: 1.4rem;
    }
    .hc-vital {
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 10px;
      padding: 0.8rem;
    }
    .hc-vital-label {
      font-family: var(--font-mono);
      font-size: 0.58rem;
      color: rgba(255,255,255,0.3);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      margin-bottom: 0.3rem;
    }
    .hc-vital-val {
      font-size: 0.85rem;
      color: var(--text);
      font-weight: 600;
    }
    .hc-vital-val.danger { color: var(--red); }
    .hc-divider {
      height: 1px;
      background: rgba(255,255,255,0.06);
      margin-bottom: 1rem;
      position: relative; z-index: 1;
    }
    .hc-bottom-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: relative; z-index: 1;
    }
    .hc-emergency {
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
    }
    .hc-em-label {
      font-family: var(--font-mono);
      font-size: 0.58rem;
      color: rgba(255,255,255,0.3);
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }
    .hc-em-val {
      font-size: 0.82rem;
      color: var(--text);
      font-weight: 500;
    }
    .hc-bloodtype {
      font-family: var(--font-serif);
      font-size: 2.8rem;
      color: var(--red);
      line-height: 1;
      text-shadow: 0 0 30px var(--red-glow);
    }
    /* Card actions */
    .card-actions {
      display: flex;
      gap: 0.6rem;
      padding: 1rem 1.4rem;
      border-top: 1px solid var(--border);
    }
    .card-actions .btn-sm { flex: 1; justify-content: center; }

    /* ── Conditions / Meds list ── */
    .info-list {
      padding: 0.5rem 0;
    }
    .info-item {
      display: flex;
      align-items: center;
      gap: 0.9rem;
      padding: 0.7rem 1.4rem;
      transition: background 0.12s;
      cursor: default;
    }
    .info-item:hover { background: var(--surface2); }
    .info-dot {
      width: 8px; height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .info-dot.red    { background: var(--red); }
    .info-dot.amber  { background: var(--amber); }
    .info-dot.blue   { background: var(--blue); }
    .info-dot.green  { background: var(--green); }
    .info-item-name {
      flex: 1;
      font-size: 0.845rem;
      color: var(--text);
      font-weight: 500;
    }
    .info-item-meta {
      font-size: 0.72rem;
      color: var(--text-3);
      font-family: var(--font-mono);
    }
    .info-tag {
      font-size: 0.65rem;
      padding: 0.15rem 0.5rem;
      border-radius: 4px;
      font-family: var(--font-mono);
    }
    .tag-danger  { background: rgba(230,57,70,0.12); color: var(--red); }
    .tag-warn    { background: rgba(245,158,11,0.12); color: var(--amber); }
    .tag-info    { background: rgba(96,165,250,0.12); color: var(--blue); }
    .tag-ok      { background: rgba(34,197,94,0.12);  color: var(--green); }

    /* ── Activity feed ── */
    .activity-list {
      padding: 0.4rem 0;
    }
    .activity-item {
      display: flex;
      gap: 0.9rem;
      padding: 0.8rem 1.4rem;
      align-items: flex-start;
      transition: background 0.12s;
    }
    .activity-item:hover { background: var(--surface2); }
    .activity-avatar {
      width: 30px; height: 30px;
      border-radius: 50%;
      flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.72rem;
      font-family: var(--font-serif);
      color: white;
    }
    .activity-body { flex: 1; min-width: 0; }
    .activity-line {
      font-size: 0.8rem;
      color: var(--text-2);
      line-height: 1.4;
    }
    .activity-line strong { color: var(--text); font-weight: 600; }
    .activity-time {
      font-size: 0.68rem;
      color: var(--text-3);
      font-family: var(--font-mono);
      margin-top: 0.2rem;
    }

    /* ── Right column ── */
    .right-col {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }

    /* ── QR panel ── */
    .qr-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 1.4rem;
      text-align: center;
      animation: fadeUp 0.55s var(--ease-out) 0.3s both;
    }
    .qr-frame {
      width: 120px; height: 120px;
      margin: 0 auto 1rem;
      border-radius: var(--radius-sm);
      background: white;
      padding: 8px;
      display: grid;
      grid-template-columns: repeat(7,1fr);
      grid-template-rows: repeat(7,1fr);
      gap: 2px;
    }
    .qr-cell {
      border-radius: 1px;
    }
    .qr-cell.b { background: #111; }
    .qr-cell.w { background: white; }
    /* Corner finders */
    .qr-finder {
      position: relative;
      grid-column: span 3;
      grid-row: span 3;
      background: #111;
      border-radius: 2px;
      display: flex; align-items: center; justify-content: center;
    }
    .qr-finder::before {
      content: '';
      width: 40%; height: 40%;
      background: white;
      border-radius: 1px;
    }
    .qr-label {
      font-family: var(--font-mono);
      font-size: 0.65rem;
      color: var(--text-3);
      letter-spacing: 0.1em;
      text-transform: uppercase;
      margin-bottom: 0.4rem;
    }
    .qr-code-text {
      font-family: var(--font-mono);
      font-size: 0.75rem;
      color: var(--text);
      font-weight: 700;
      margin-bottom: 0.9rem;
    }
    .qr-actions {
      display: flex;
      gap: 0.5rem;
    }
    .qr-actions .btn-sm { flex: 1; justify-content: center; font-size: 0.75rem; }

    /* ── Mini profile ── */
    .profile-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      overflow: hidden;
      animation: fadeUp 0.55s var(--ease-out) 0.35s both;
    }
    .profile-cover {
      height: 64px;
      background: linear-gradient(135deg, #1a0608, #0e0e1a);
      position: relative;
    }
    .profile-cover::after {
      content: '';
      position: absolute; inset: 0;
      background:
        radial-gradient(ellipse at 30% 50%, rgba(230,57,70,0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(96,165,250,0.1) 0%, transparent 60%);
    }
    .profile-body {
      padding: 0 1.3rem 1.3rem;
      margin-top: -22px;
      position: relative;
    }
    .profile-avatar {
      width: 48px; height: 48px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--red), #FF8C94);
      border: 3px solid var(--surface);
      display: flex; align-items: center; justify-content: center;
      font-family: var(--font-serif);
      font-size: 1.2rem;
      color: white;
      margin-bottom: 0.6rem;
    }
    .profile-name {
      font-family: var(--font-serif);
      font-size: 1.1rem;
      color: var(--text);
    }
    .profile-email {
      font-size: 0.75rem;
      color: var(--text-3);
      font-family: var(--font-mono);
      margin-bottom: 1rem;
    }
    .profile-stats {
      display: grid;
      grid-template-columns: repeat(3,1fr);
      gap: 0.5rem;
      padding-top: 0.8rem;
      border-top: 1px solid var(--border);
    }
    .profile-stat { text-align: center; }
    .profile-stat-val {
      font-family: var(--font-serif);
      font-size: 1.2rem;
      color: var(--text);
    }
    .profile-stat-label {
      font-size: 0.62rem;
      color: var(--text-3);
      margin-top: 0.1rem;
    }

    /* ── Complete profile prompt ── */
    .complete-prompt {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 1.2rem 1.4rem;
      animation: fadeUp 0.55s var(--ease-out) 0.4s both;
    }
    .progress-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.8rem;
    }
    .progress-title {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text);
    }
    .progress-pct {
      font-family: var(--font-mono);
      font-size: 0.75rem;
      color: var(--red);
    }
    .progress-bar-bg {
      height: 5px;
      background: var(--surface3);
      border-radius: 100px;
      overflow: hidden;
      margin-bottom: 1rem;
    }
    .progress-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--red), #FF6B6B);
      border-radius: 100px;
      width: 70%;
      animation: fillBar 1s var(--ease-out) 0.6s both;
    }
    @keyframes fillBar {
      from { width: 0; }
      to   { width: 70%; }
    }
    .todo-list {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .todo-item {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-size: 0.78rem;
    }
    .todo-check {
      width: 16px; height: 16px;
      border-radius: 50%;
      flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
    }
    .todo-check.done { background: rgba(34,197,94,0.15); }
    .todo-check.done svg { width: 9px; height: 9px; color: var(--green); }
    .todo-check.pending {
      border: 1.5px solid var(--text-3);
      width: 16px; height: 16px;
    }
    .todo-text { color: var(--text-2); }
    .todo-text.done-text { text-decoration: line-through; color: var(--text-3); }

    /* ══════════════════════════════════════════
       MOBILE MENU TOGGLE
    ══════════════════════════════════════════ */
    .menu-toggle {
      display: none;
      width: 34px; height: 34px;
      border-radius: var(--radius-sm);
      background: var(--surface2);
      border: 1px solid var(--border);
      align-items: center; justify-content: center;
      cursor: pointer;
    }
    .menu-toggle svg { width: 18px; height: 18px; color: var(--text-2); }
    .sidebar-overlay {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.6);
      z-index: 49;
    }
    .sidebar-overlay.active { display: block; }

    /* ══════════════════════════════════════════
       RESPONSIVE
    ══════════════════════════════════════════ */
    @media (max-width: 1100px) {
      .stats-row { grid-template-columns: repeat(2, 1fr); }
      .main-grid { grid-template-columns: 1fr; }
      .right-col { display: grid; grid-template-columns: 1fr 1fr; }
      .profile-panel { grid-column: span 2; }
    }
    @media (max-width: 768px) {
      .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-w)));
      }
      .sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(0,0,0,0.5);
      }
      .main-wrap { margin-left: 0; }
      .menu-toggle { display: flex; }
      .page { padding: 1.2rem 1rem 2rem; }
      .stats-row { grid-template-columns: 1fr 1fr; }
      .topbar { padding: 0 1rem; }
      .right-col { display: flex; flex-direction: column; }
      .hc-vitals { grid-template-columns: repeat(2,1fr); }
    }
    @media (max-width: 480px) {
      .stats-row { grid-template-columns: 1fr; }
      .hc-vitals { grid-template-columns: 1fr 1fr; }
    }