/* ================================================================
   custom.css
   Contains:
     1. Global / shared tokens  — scoped to wrapper classes, NOT :root
     2. Guardian Dashboard  (gd-*)   — guardian-dashboard.blade.php
     3. Legacy Guardian UI (g-*)     — older guardian views
     4. Resident Health Card (rhc-*) — resident-health-card.blade.php
     5. Responsive
     6. Resident Dashboard  (rd-*)   — resident-dashboard.blade.php

   TAILWIND SAFETY:
   - All CSS variables are scoped to .gd-wrap / .rd-wrap / .guardian-wrap
     so they NEVER bleed into :root and never override Tailwind utilities
     or Bootstrap/AdminLTE component defaults.
   - No bare element selectors (input, button, select, a, form) anywhere.
   - Wildcard resets ( * { } ) are ONLY box-sizing — never margin/padding.
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');


/* ================================================================
   1. GLOBAL TOKENS
   Scoped to every wrapper class — NOT :root.
   This means Tailwind's own --radius-* / --shadow-* etc stay untouched.
   ================================================================ */

.gd-wrap,
.rd-wrap,
.guardian-wrap,
.rhc-card {
    /* ── Palette ── */
    --ink:         #0d0f14;
    --ink-soft:    #3a3d4a;
    --ink-muted:   #7b7f8e;
    --surface:     #f5f6f9;
    --card-bg:     #ffffff;
    --border:      #e8eaef;

    /* ── Brand colours ── */
    --emerald:     #00c27a;
    --emerald-d:   #009e63;
    --emerald-g:   linear-gradient(135deg, #00c27a 0%, #00e896 100%);

    --amber:       #f59e0b;
    --amber-g:     linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);

    --violet:      #7c3aed;
    --violet-g:    linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);

    --blue:        #2563eb;
    --blue-g:      linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);

    /* ── Shadows ── */
    --shadow-sm:   0 1px 3px rgba(13,15,20,.06), 0 1px 2px rgba(13,15,20,.04);
    --shadow-md:   0 4px 16px rgba(13,15,20,.08), 0 2px 6px rgba(13,15,20,.05);
    --shadow-lg:   0 12px 40px rgba(13,15,20,.12), 0 4px 12px rgba(13,15,20,.07);
    --shadow-xl:   0 24px 64px rgba(13,15,20,.15), 0 8px 20px rgba(13,15,20,.09);

    /* ── Radii ──
       Named --cu-radius-* (cu = custom) to avoid ANY collision with
       Tailwind v4's --radius-*, Bootstrap's --bs-border-radius, or
       any other framework using bare --radius-* names.            */
    --cu-radius-sm:   10px;
    --cu-radius-md:   16px;
    --cu-radius-lg:   24px;
    --cu-radius-xl:   32px;
}

/* Backward-compat aliases so existing class rules don't need editing */
.gd-wrap,
.rd-wrap,
.guardian-wrap,
.rhc-card {
    --radius-sm: var(--cu-radius-sm);
    --radius-md: var(--cu-radius-md);
    --radius-lg: var(--cu-radius-lg);
    --radius-xl: var(--cu-radius-xl);
}

/* ── Keyframes — safe to be global, they have no effect unless referenced ── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%       { transform: scale(1.3); opacity: .7; }
}

@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


/* ================================================================
   2. GUARDIAN DASHBOARD  (gd-*)
   ================================================================ */

/* box-sizing only — never reset margin/padding globally as that
   would override Tailwind utility classes used inside this wrapper */
.gd-wrap * { box-sizing: border-box; }

.gd-wrap {
    font-family: 'DM Sans', sans-serif;
    background: var(--surface);
    min-height: 100vh;
    padding: 36px 40px 80px;
    color: var(--ink);
    position: relative;
    overflow-x: hidden;
}

/* Ambient background blobs */
.gd-wrap::before {
    content: '';
    position: fixed;
    top: -120px; right: -120px;
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(0,194,122,.10) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.gd-wrap::after {
    content: '';
    position: fixed;
    bottom: -80px; left: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(124,58,237,.07) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ── Page header ── */
.gd-page-header {
    position: relative; z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 36px;
    gap: 20px;
    flex-wrap: wrap;
    animation: fade-up .5s ease both;
}
.gd-page-header-left h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--ink);
}
.gd-page-header-left h1 span {
    background: var(--emerald-g);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gd-page-header-left p {
    margin-top: 6px;
    font-size: 15px;
    color: var(--ink-muted);
    font-weight: 300;
    letter-spacing: 0.01em;
}
.gd-add-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--ink);
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 13px; font-weight: 600;
    letter-spacing: 0.02em;
    padding: 12px 22px;
    border-radius: 100px;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, background .2s;
    box-shadow: 0 4px 16px rgba(13,15,20,.20);
    white-space: nowrap;
}
.gd-add-btn:hover {
    background: var(--emerald-d);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,194,122,.30);
}
.gd-add-btn svg { flex-shrink: 0; }

/* ── Banner ── */
.gd-banner {
    position: relative; z-index: 1;
    display: flex; align-items: flex-start; gap: 16px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 32px;
    overflow: hidden;
    animation: fade-up .5s .1s ease both;
}
.gd-banner::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--amber-g);
}
.gd-banner-icon {
    flex-shrink: 0;
    width: 38px; height: 38px;
    background: var(--amber-g);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(245,158,11,.30);
}
.gd-banner-body h3 {
    font-family: 'Syne', sans-serif;
    font-size: 15px; font-weight: 700;
    color: #92400e;
    margin-bottom: 4px;
}
.gd-banner-body p { font-size: 13.5px; color: #b45309; line-height: 1.5; }
.gd-banner-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 10px;
    font-family: 'Syne', sans-serif;
    font-size: 13px; font-weight: 700;
    color: #92400e;
    text-decoration: none;
    border-bottom: 2px solid #fbbf24;
    padding-bottom: 1px;
    transition: color .2s, border-color .2s;
}
.gd-banner-link:hover { color: #78350f; border-color: #f59e0b; }

/* ── Welcome message ── */
.gd-welcome {
    position: relative; z-index: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    margin-bottom: 36px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    animation: fade-up .5s .08s ease both;
}
.gd-welcome::before {
    content: '';
    position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
    background: var(--emerald-g);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.gd-welcome-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: start;
}
.gd-welcome-icon {
    width: 52px; height: 52px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(0,194,122,.12) 0%, rgba(0,232,150,.06) 100%);
    border: 1px solid rgba(0,194,122,.20);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    color: var(--emerald-d);
}
.gd-welcome-label {
    display: inline-block;
    font-family: 'Syne', sans-serif;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--emerald-d);
    background: rgba(0,194,122,.10);
    border: 1px solid rgba(0,194,122,.18);
    padding: 3px 10px; border-radius: 100px;
    margin-bottom: 10px;
}
.gd-welcome-heading {
    font-family: 'Syne', sans-serif;
    font-size: 19px; font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 14px;
    line-height: 1.3;
}
.gd-welcome-text p {
    font-size: 13.5px;
    color: var(--ink-muted);
    line-height: 1.75;
    font-weight: 300;
}
.gd-welcome-text p + p { margin-top: 10px; }
.gd-welcome-text p:last-child {
    margin-top: 14px;
    font-style: italic;
    color: var(--emerald-d);
    font-weight: 400;
    font-size: 13px;
}
.gd-welcome-quote {
    position: absolute;
    bottom: 16px; right: 28px;
    font-size: 120px; line-height: 1;
    font-family: Georgia, serif;
    color: var(--emerald);
    opacity: .06;
    pointer-events: none;
    user-select: none;
}

/* ── Section header ── */
.gd-section-header {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 24px;
    animation: fade-up .5s .15s ease both;
}
.gd-section-header h2 {
    font-family: 'Syne', sans-serif;
    font-size: 18px; font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.gd-section-header-line { flex: 1; height: 1px; background: var(--border); }
.gd-count-badge {
    font-family: 'Syne', sans-serif;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--ink-muted);
    background: var(--border);
    padding: 3px 10px;
    border-radius: 100px;
}

/* ── Grid ── */
.gd-grid {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* ── Resident card ── */
.gd-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 18px 20px 16px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease;
    display: flex; flex-direction: column;
    animation: fade-up .5s ease both;
}
.gd-card:hover {
    transform: translateY(-4px) scale(1.003);
    box-shadow: var(--shadow-lg);
}
.gd-card:nth-child(1) { animation-delay: .18s; }
.gd-card:nth-child(2) { animation-delay: .24s; }
.gd-card:nth-child(3) { animation-delay: .30s; }
.gd-card:nth-child(4) { animation-delay: .36s; }
.gd-card:nth-child(5) { animation-delay: .42s; }
.gd-card:nth-child(6) { animation-delay: .48s; }

/* Accent strip */
.gd-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.gd-card.c-green::before  { background: var(--emerald-g); }
.gd-card.c-amber::before  { background: var(--amber-g); }
.gd-card.c-violet::before { background: var(--violet-g); }
.gd-card.c-blue::before   { background: var(--blue-g); }

/* Watermark */
.gd-card-watermark {
    position: absolute;
    bottom: -10px; right: -6px;
    width: 80px; height: 80px;
    opacity: .04;
    pointer-events: none;
}

/* Avatar */
.gd-card-top {
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.gd-avatar-wrap { position: relative; flex-shrink: 0; }
.gd-avatar-img,
.gd-avatar-placeholder {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
}
.gd-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 14px; font-weight: 800;
    color: #fff;
    background: var(--ink);
}
.gd-card.c-green  .gd-avatar-placeholder { background: var(--emerald-g); }
.gd-card.c-amber  .gd-avatar-placeholder { background: var(--amber-g); color: #78350f; }
.gd-card.c-violet .gd-avatar-placeholder { background: var(--violet-g); }
.gd-card.c-blue   .gd-avatar-placeholder { background: var(--blue-g); }

.gd-avatar-ring {
    position: absolute; inset: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
}
.gd-card.c-green  .gd-avatar-ring { border-color: var(--emerald); }
.gd-card.c-amber  .gd-avatar-ring { border-color: var(--amber); }
.gd-card.c-violet .gd-avatar-ring { border-color: var(--violet); }
.gd-card.c-blue   .gd-avatar-ring { border-color: var(--blue); }

.gd-pct-badge {
    font-family: 'Syne', sans-serif;
    font-size: 17px; font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--ink);
}
.gd-pct-badge span { font-size: 11px; font-weight: 500; color: var(--ink-muted); }

/* Name */
.gd-resident-name {
    font-family: 'Syne', sans-serif;
    font-size: 14px; font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 5px;
}
.gd-room-tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 500;
    color: var(--ink-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 100px;
}

/* Chips */
.gd-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 10px; margin-bottom: 12px;
}
.gd-chip {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 400;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 100px;
    white-space: nowrap;
}
.gd-chip svg { flex-shrink: 0; opacity: .6; }

/* Progress */
.gd-progress-wrap { margin-bottom: 14px; }
.gd-progress-labels {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 5px;
}
.gd-progress-labels span:first-child {
    font-size: 10px; font-weight: 500;
    color: var(--ink-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.gd-progress-labels span:last-child {
    font-family: 'Syne', sans-serif;
    font-size: 11px; font-weight: 700;
    color: var(--ink-soft);
}
.gd-progress-track {
    height: 4px;
    background: var(--surface);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.gd-progress-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 1s cubic-bezier(.4,0,.2,1);
}
.gd-card.c-green  .gd-progress-fill { background: var(--emerald-g); }
.gd-card.c-amber  .gd-progress-fill { background: var(--amber-g); }
.gd-card.c-violet .gd-progress-fill { background: var(--violet-g); }
.gd-card.c-blue   .gd-progress-fill { background: var(--blue-g); }

/* Footer */
.gd-card-footer {
    display: flex; align-items: center;
    justify-content: space-between; gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.gd-status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 500;
    color: var(--ink-soft);
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}
.gd-status-dot {
    width: 6px; height: 6px;
    border-radius: 50%; flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}
.gd-card.c-green  .gd-status-dot { background: var(--emerald); }
.gd-card.c-amber  .gd-status-dot { background: var(--amber); }
.gd-card.c-violet .gd-status-dot { background: var(--violet); }
.gd-card.c-blue   .gd-status-dot { background: var(--blue); }

.gd-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: 'Syne', sans-serif;
    font-size: 11.5px; font-weight: 700;
    letter-spacing: 0.01em;
    padding: 7px 14px;
    border-radius: 100px;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
    flex-shrink: 0;
    color: #fff;
}
.gd-card.c-green  .gd-action-btn { background: var(--emerald-g); box-shadow: 0 3px 10px rgba(0,194,122,.28); }
.gd-card.c-amber  .gd-action-btn { background: var(--amber-g);   box-shadow: 0 3px 10px rgba(245,158,11,.28); color: #78350f; }
.gd-card.c-violet .gd-action-btn { background: var(--violet-g);  box-shadow: 0 3px 10px rgba(124,58,237,.28); }
.gd-card.c-blue   .gd-action-btn { background: var(--blue-g);    box-shadow: 0 3px 10px rgba(37,99,235,.28); }
.gd-action-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.gd-action-btn.disabled { opacity: .45; pointer-events: none; cursor: not-allowed; }

/* Add card */
.gd-add-card {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px;
    background: transparent;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-decoration: none;
    transition: border-color .25s, background .25s,
                transform .3s cubic-bezier(.34,1.56,.64,1);
    min-height: 200px;
    text-align: center;
    animation: fade-up .5s .54s ease both;
}
.gd-add-card:hover {
    border-color: var(--emerald);
    background: rgba(0,194,122,.04);
    transform: translateY(-4px);
}
.gd-add-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-muted);
    transition: background .25s, color .25s, transform .25s;
}
.gd-add-card:hover .gd-add-icon {
    background: var(--emerald);
    color: #fff;
    border-color: var(--emerald);
    transform: rotate(90deg) scale(1.1);
}
.gd-add-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 15px; font-weight: 700;
    color: var(--ink-soft);
    transition: color .25s;
}
.gd-add-card:hover h3 { color: var(--emerald-d); }
.gd-add-card p { font-size: 13px; color: var(--ink-muted); line-height: 1.5; }

/* Empty state */
.gd-empty {
    grid-column: 1 / -1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 14px;
    padding: 80px 40px;
    text-align: center;
}
.gd-empty-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-muted);
    margin-bottom: 4px;
}
.gd-empty h3 {
    font-family: 'Syne', sans-serif;
    font-size: 20px; font-weight: 700;
    color: var(--ink);
}
.gd-empty p { font-size: 14px; color: var(--ink-muted); max-width: 360px; line-height: 1.6; }
.gd-empty-btn {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 8px;
    background: var(--ink); color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 13px; font-weight: 700;
    padding: 13px 26px; border-radius: 100px;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: transform .2s, box-shadow .2s, background .2s;
}
.gd-empty-btn:hover {
    background: var(--emerald-d);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,194,122,.30);
}
.gd-empty-note { font-size: 12.5px; color: var(--ink-muted); font-style: italic; }


/* ================================================================
   3. LEGACY GUARDIAN UI  (g-*)
   ================================================================ */

.guardian-wrap * { box-sizing: border-box; }
.guardian-wrap {
    font-family: 'DM Sans', sans-serif;
    background: #F4F5F7;
    min-height: 100vh;
    padding: 40px 32px;
}

/* Page Header */
.g-page-header { margin-bottom: 36px; }
.g-page-header h1 {
    font-family: 'Sora', sans-serif;
    font-size: 28px; font-weight: 600;
    color: #111827; letter-spacing: -0.5px;
    margin: 0 0 4px;
}
.g-page-header p { font-size: 14px; color: #6B7280; margin: 0; }

/* Banner */
.g-banner {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 16px;
    padding: 18px 22px;
    display: flex; align-items: flex-start; gap: 14px;
    margin-bottom: 28px;
}
.g-banner-icon {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: #FEF3C7;
    display: flex; align-items: center; justify-content: center;
    color: #D97706;
}
.g-banner-body h3 {
    font-family: 'Sora', sans-serif;
    font-size: 14px; font-weight: 600;
    color: #92400E; margin: 0 0 4px;
}
.g-banner-body p { font-size: 13px; color: #B45309; margin: 0 0 12px; }
.g-banner-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: #D97706; color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px; font-weight: 500;
    padding: 8px 16px; border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s;
}
.g-banner-btn:hover { background: #B45309; }

/* Section header */
.g-section-header {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.g-section-header h2 {
    font-family: 'Sora', sans-serif;
    font-size: 18px; font-weight: 600;
    color: #1F2937; margin: 0;
}
.g-count-badge {
    font-size: 12px; font-weight: 500;
    background: #E5E7EB; color: #6B7280;
    padding: 4px 12px; border-radius: 999px;
}

/* Grid */
.g-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

/* Empty state */
.g-empty {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #E5E7EB;
    padding: 64px 32px;
    text-align: center;
    grid-column: 1 / -1;
}
.g-empty-icon {
    width: 68px; height: 68px; border-radius: 18px;
    background: #F3F4F6;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    color: #9CA3AF;
}
.g-empty h3 {
    font-family: 'Sora', sans-serif;
    font-size: 18px; font-weight: 600;
    color: #1F2937; margin: 0 0 8px;
}
.g-empty p { font-size: 14px; color: #9CA3AF; margin: 0 0 24px; }
.g-empty-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: #16A34A; color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px; font-weight: 500;
    padding: 11px 22px; border-radius: 12px;
    text-decoration: none;
    transition: background 0.15s;
}
.g-empty-btn:hover { background: #15803D; }
.g-empty-note { font-size: 13px; color: #D97706; margin: 0; }

/* Resident card */
.g-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 22px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: flex; flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    cursor: pointer;
}
.g-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 44px rgba(0,0,0,0.10);
}
.g-card-glow {
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    border-radius: 20px 20px 0 0;
}
.g-card.g-blue   .g-card-glow { background: linear-gradient(90deg, #3B82F6, #93C5FD); }
.g-card.g-purple .g-card-glow { background: linear-gradient(90deg, #8B5CF6, #C4B5FD); }
.g-card.g-amber  .g-card-glow { background: linear-gradient(90deg, #F59E0B, #FCD34D); }
.g-card.g-red    .g-card-glow { background: linear-gradient(90deg, #EF4444, #FCA5A5); }

.g-card-watermark {
    position: absolute;
    bottom: -18px; right: -18px;
    width: 96px; height: 96px;
    opacity: 0.045;
}
.g-card.g-blue   .g-card-watermark { color: #3B82F6; }
.g-card.g-purple .g-card-watermark { color: #8B5CF6; }
.g-card.g-amber  .g-card-watermark { color: #F59E0B; }
.g-card.g-red    .g-card-watermark { color: #EF4444; }

.g-card-header {
    display: flex; align-items: center;
    gap: 12px; margin: 12px 0 16px;
}
.g-avatar-img {
    width: 50px; height: 50px;
    border-radius: 14px; object-fit: cover;
    border: 2px solid rgba(0,0,0,0.06);
    flex-shrink: 0;
}
.g-avatar-placeholder {
    width: 50px; height: 50px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Sora', sans-serif;
    font-size: 16px; font-weight: 600;
    color: #fff; flex-shrink: 0;
}
.g-card.g-blue   .g-avatar-placeholder { background: linear-gradient(135deg, #3B82F6, #6366F1); }
.g-card.g-purple .g-avatar-placeholder { background: linear-gradient(135deg, #8B5CF6, #EC4899); }
.g-card.g-amber  .g-avatar-placeholder { background: linear-gradient(135deg, #F59E0B, #EF4444); }
.g-card.g-red    .g-avatar-placeholder { background: linear-gradient(135deg, #EF4444, #F97316); }

.g-name-block { flex: 1; min-width: 0; }
.g-resident-name {
    font-family: 'Sora', sans-serif;
    font-size: 15px; font-weight: 600;
    color: #111827;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin: 0 0 3px;
}
.g-room-tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11.5px; color: #9CA3AF; font-weight: 500;
}
.g-completion-badge {
    flex-shrink: 0;
    font-size: 11px; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
}
.g-card.g-blue   .g-completion-badge { background: #DBEAFE; color: #1D4ED8; }
.g-card.g-purple .g-completion-badge { background: #EDE9FE; color: #6D28D9; }
.g-card.g-amber  .g-completion-badge { background: #FEF3C7; color: #B45309; }
.g-card.g-red    .g-completion-badge { background: #FEE2E2; color: #B91C1C; }

.g-divider { height: 1px; background: #F3F4F6; margin: 0 0 14px; }

.g-info-row {
    display: flex; align-items: center;
    gap: 8px; font-size: 13px; color: #4B5563;
    margin-bottom: 8px;
}
.g-info-row svg { color: #9CA3AF; flex-shrink: 0; }

.g-progress-section { margin-top: 14px; }
.g-progress-label {
    display: flex; justify-content: space-between;
    font-size: 11.5px; color: #9CA3AF; margin-bottom: 6px;
}
.g-progress-track {
    background: #F3F4F6;
    border-radius: 999px; height: 5px; overflow: hidden;
}
.g-progress-fill { height: 5px; border-radius: 999px; }
.g-card.g-blue   .g-progress-fill { background: linear-gradient(90deg, #3B82F6, #93C5FD); }
.g-card.g-purple .g-progress-fill { background: linear-gradient(90deg, #8B5CF6, #C4B5FD); }
.g-card.g-amber  .g-progress-fill { background: linear-gradient(90deg, #F59E0B, #FCD34D); }
.g-card.g-red    .g-progress-fill { background: linear-gradient(90deg, #EF4444, #FCA5A5); }

.g-card-footer {
    display: flex; align-items: center;
    justify-content: space-between; margin-top: 16px;
}
.g-status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 500;
    padding: 5px 11px; border-radius: 999px;
}
.g-status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.g-card.g-blue   .g-status-pill { background: #EFF6FF; color: #1D4ED8; }
.g-card.g-blue   .g-status-dot  { background: #3B82F6; }
.g-card.g-purple .g-status-pill { background: #F5F3FF; color: #6D28D9; }
.g-card.g-purple .g-status-dot  { background: #8B5CF6; }
.g-card.g-amber  .g-status-pill { background: #FFFBEB; color: #B45309; }
.g-card.g-amber  .g-status-dot  { background: #F59E0B; }
.g-card.g-red    .g-status-pill { background: #FFF1F2; color: #B91C1C; }
.g-card.g-red    .g-status-dot  { background: #EF4444; }

.g-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px; font-weight: 600;
    padding: 8px 15px; border-radius: 10px;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.15s;
}
.g-action-btn:hover { opacity: 0.85; transform: scale(0.97); }
.g-card.g-blue   .g-action-btn { background: #EFF6FF; color: #1D4ED8; }
.g-card.g-purple .g-action-btn { background: #F5F3FF; color: #6D28D9; }
.g-card.g-amber  .g-action-btn { background: #FFFBEB; color: #92400E; }
.g-card.g-red    .g-action-btn { background: #FFF1F2; color: #991B1B; }

.g-add-card {
    border: 2px dashed #D1D5DB;
    border-radius: 20px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 14px;
    min-height: 270px;
    background: #FAFAFA;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.g-add-card:hover { border-color: #22C55E; background: #F0FDF4; }
.g-add-icon-wrap {
    width: 54px; height: 54px;
    border-radius: 15px;
    background: #DCFCE7;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
.g-add-card:hover .g-add-icon-wrap { background: #22C55E; transform: scale(1.1); }
.g-add-icon-wrap svg { color: #16A34A; transition: color 0.2s; }
.g-add-card:hover .g-add-icon-wrap svg { color: #fff; }
.g-add-card h3 {
    font-family: 'Sora', sans-serif;
    font-size: 14px; font-weight: 600; color: #374151; margin: 0;
}
.g-add-card p {
    font-size: 12.5px; color: #9CA3AF;
    text-align: center; max-width: 170px;
    line-height: 1.6; margin: 0;
}


/* ================================================================
   4. RESIDENT HEALTH CARD  (rhc-*)
   ================================================================ */

.rhc-card {
    --rhc-teal:      #0d9488;
    --rhc-teal-lt:   #5eead4;
    --rhc-teal-pale: #ccfbf1;
    --rhc-teal-bg:   #f0fdfa;
    --rhc-green:     #16a34a;
    --rhc-green-lt:  #4ade80;
    --rhc-amber:     #f59e0b;
    --rhc-amber-bg:  #fef3c7;
    --rhc-ink:       #0d0f14;
    --rhc-ink-soft:  #374151;
    --rhc-muted:     #9ca3af;
    --rhc-surface:   #f9fafb;
    --rhc-border:    #f0f0f3;
    --rhc-white:     #ffffff;

    --rhc-grad-teal:  linear-gradient(135deg, #0d9488 0%, #5eead4 100%);
    --rhc-grad-green: linear-gradient(135deg, #16a34a 0%, #4ade80 100%);
    --rhc-grad-card:  linear-gradient(160deg, #ffffff 0%, #f8fffe 100%);

    --rhc-shadow-sm: 0 1px 3px rgba(13,15,20,.05), 0 1px 2px rgba(13,15,20,.04);
    --rhc-shadow-md: 0 4px 16px rgba(13,148,136,.08), 0 2px 6px rgba(13,15,20,.05);
    --rhc-shadow-lg: 0 16px 40px rgba(13,148,136,.14), 0 4px 12px rgba(13,15,20,.07);
    --rhc-shadow-xl: 0 28px 60px rgba(13,148,136,.18), 0 8px 20px rgba(13,15,20,.09);
}

.rhc-card {
    font-family: 'DM Sans', sans-serif;
    background: var(--rhc-grad-card);
    border-radius: 20px;
    border: 1px solid var(--rhc-border);
    overflow: hidden;
    position: relative;
    display: flex; flex-direction: column;
    box-shadow: var(--rhc-shadow-md);
    transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .28s ease;
    animation: rhc-fade-up .4s ease both;
}
.rhc-card:hover {
    transform: translateY(-6px) scale(1.008);
    box-shadow: var(--rhc-shadow-xl);
}

@keyframes rhc-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Accent bar */
.rhc-accent {
    height: 4px;
    background: var(--rhc-grad-teal);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.rhc-accent::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
    animation: shimmer 2.4s ease-in-out infinite;
}

/* Watermark */
.rhc-watermark {
    position: absolute;
    bottom: -14px; right: -14px;
    width: 100px; height: 100px;
    color: var(--rhc-teal);
    opacity: .05;
    pointer-events: none;
}

/* Header */
.rhc-header {
    display: flex; align-items: center;
    gap: 14px;
    padding: 20px 20px 14px;
}
.rhc-avatar-wrap { position: relative; flex-shrink: 0; }
.rhc-avatar-img,
.rhc-avatar-placeholder {
    width: 48px; height: 48px;
    border-radius: 14px; object-fit: cover; flex-shrink: 0;
}
.rhc-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 16px; font-weight: 800;
    color: var(--rhc-white);
    background: var(--rhc-grad-teal);
    letter-spacing: -0.02em;
}
.rhc-avatar-badge {
    position: absolute; bottom: -4px; right: -4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid var(--rhc-white);
    background: var(--rhc-teal);
    display: flex; align-items: center; justify-content: center;
}
.rhc-avatar-badge svg { width: 8px; height: 8px; color: #fff; }
.rhc-avatar-badge.all-done { background: var(--rhc-green); }

.rhc-name-block { flex: 1; min-width: 0; }
.rhc-name {
    font-family: 'Syne', sans-serif;
    font-size: 14.5px; font-weight: 700;
    color: var(--rhc-ink);
    letter-spacing: -0.02em; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin: 0 0 3px;
}
.rhc-sub {
    font-size: 11.5px; color: var(--rhc-muted); margin: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rhc-count-badge {
    flex-shrink: 0;
    font-family: 'Syne', sans-serif;
    font-size: 12px; font-weight: 800;
    letter-spacing: -0.01em;
    padding: 4px 11px; border-radius: 100px; line-height: 1.4;
}
.rhc-count-badge.all-done    { background: var(--rhc-teal-pale); color: #0f766e; }
.rhc-count-badge.in-progress { background: var(--rhc-amber-bg);  color: #b45309; }

/* Divider */
.rhc-divider { height: 1px; background: var(--rhc-border); margin: 0 20px 14px; }

/* Forms label */
.rhc-forms-label {
    font-size: 10px; font-weight: 700;
    color: var(--rhc-muted);
    letter-spacing: 0.10em; text-transform: uppercase;
    padding: 0 20px; margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.rhc-forms-label::after {
    content: ''; flex: 1; height: 1px; background: var(--rhc-border);
}

/* Forms list */
.rhc-forms { padding: 0 20px; display: flex; flex-direction: column; gap: 5px; }

/* Form row */
.rhc-form-row {
    display: flex; align-items: center;
    justify-content: space-between; gap: 10px;
    background: var(--rhc-surface);
    border: 1px solid var(--rhc-border);
    border-radius: 11px; padding: 9px 11px;
    text-decoration: none;
    transition: background .16s, border-color .16s,
                transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .16s;
}
.rhc-form-row:hover {
    background: var(--rhc-teal-bg);
    border-color: var(--rhc-teal-lt);
    transform: translateX(3px);
    box-shadow: 0 2px 10px rgba(13,148,136,.10);
}
.rhc-form-row.done {
    background: linear-gradient(90deg, #f0fdf4 0%, #f9fafb 100%);
    border-color: #bbf7d0;
}
.rhc-form-row.done:hover { background: #dcfce7; border-color: #86efac; }

.rhc-form-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rhc-form-icon {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 17px !important;
    transition: transform .2s;
}
.rhc-form-row:hover .rhc-form-icon { transform: scale(1.1); }
.rhc-form-icon.done    { background: var(--rhc-teal-pale); color: var(--rhc-teal) !important; }
.rhc-form-icon.pending { background: #f3f4f6;              color: var(--rhc-muted) !important; }

.rhc-form-text-name {
    font-size: 12px; font-weight: 600;
    color: var(--rhc-ink-soft);
    display: block; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rhc-form-text-sub {
    font-size: 10.5px; color: var(--rhc-muted);
    display: block; line-height: 1.3;
}
.rhc-form-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.rhc-form-status {
    font-size: 10.5px; font-weight: 700;
    letter-spacing: 0.02em;
    padding: 3px 9px; border-radius: 100px; white-space: nowrap;
}
.rhc-form-status.done    { background: var(--rhc-teal-pale); color: #0f766e; }
.rhc-form-status.pending { background: var(--rhc-amber-bg);  color: #b45309; }

.rhc-form-arrow {
    width: 16px; height: 16px;
    color: var(--rhc-muted);
    opacity: 0;
    transition: opacity .16s, transform .2s;
    flex-shrink: 0;
}
.rhc-form-row:hover .rhc-form-arrow {
    opacity: 1; transform: translateX(3px);
    color: var(--rhc-teal);
}

/* Progress footer */
.rhc-footer { padding: 14px 20px 18px; margin-top: 10px; }
.rhc-progress-label {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 7px;
}
.rhc-progress-label-text {
    font-size: 10.5px; font-weight: 500;
    color: var(--rhc-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.rhc-progress-label-count {
    font-family: 'Syne', sans-serif;
    font-size: 11px; font-weight: 700; color: #0f766e;
}
.rhc-progress-track {
    background: #f3f4f6; border-radius: 100px;
    height: 5px; overflow: hidden;
}
.rhc-progress-fill {
    height: 5px; border-radius: 100px;
    background: var(--rhc-grad-teal);
    transition: width .8s cubic-bezier(.4,0,.2,1);
    position: relative; overflow: hidden;
}
.rhc-progress-fill::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.4) 50%, transparent 100%);
    animation: shimmer 2s ease-in-out infinite;
}
.rhc-progress-fill.all-done { background: var(--rhc-grad-green); }


/* ================================================================
   5. RESPONSIVE
   ================================================================ */

@media (max-width: 640px) {
    .gd-wrap          { padding: 24px 20px 60px; }
    .gd-grid          { grid-template-columns: 1fr; }
    .gd-welcome       { padding: 24px 22px; }
    .gd-welcome-inner { grid-template-columns: 1fr; gap: 16px; }
    .gd-welcome-icon  { display: none; }
    .rd-wrap          { padding: 20px 16px 60px; }
    .rd-vital-grid    { grid-template-columns: 1fr 1fr; }
    .rd-section-body  { padding: 16px; }
    .rd-section-header{ padding: 14px 16px; }
    .rd-table         { font-size: 12px; }
}


/* ================================================================
   6. RESIDENT DASHBOARD  (rd-*)
   ================================================================ */

.rd-wrap {
    font-family: 'DM Sans', sans-serif;
    background: var(--surface);
    min-height: 100vh;
    padding: 36px 40px 80px;
    color: var(--ink);
    position: relative;
    overflow-x: hidden;
}
/* box-sizing only — preserves Tailwind utilities inside the wrapper */
.rd-wrap * { box-sizing: border-box; }

/* Ambient blobs */
.rd-wrap::before {
    content: '';
    position: fixed; top: -120px; right: -120px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(0,194,122,.09) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none; z-index: 0;
}
.rd-wrap::after {
    content: '';
    position: fixed; bottom: -80px; left: -80px;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(37,99,235,.07) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none; z-index: 0;
}

/* ── Page header ── */
.rd-page-header {
    position: relative; z-index: 1;
    display: flex; align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px; gap: 16px; flex-wrap: wrap;
    animation: fade-up .45s ease both;
}
.rd-page-header h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
    color: var(--ink);
}
.rd-page-header h1 span {
    background: var(--emerald-g);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.rd-page-header p { margin-top: 5px; font-size: 14px; color: var(--ink-muted); font-weight: 300; }
.rd-back-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 600;
    color: var(--ink-soft); text-decoration: none;
    border: 1px solid var(--border); border-radius: 100px;
    padding: 9px 18px; background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: background .2s, box-shadow .2s;
}
.rd-back-btn:hover { background: var(--surface); box-shadow: var(--shadow-md); }

/* ── Two-column layout grids ── */
.rd-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
    align-items: start;
}
.rd-two-col > .rd-section { margin-bottom: 0; }

/* ── Section title icon — inline-flex so emoji doesn't block-render ── */
.rd-section-title-icon {
    width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; line-height: 1;
}

/* ── Section card ── */
.rd-section {
    position: relative; z-index: 1;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    animation: fade-up .45s ease both;
}
.rd-section:nth-child(2) { animation-delay: .08s; }
.rd-section:nth-child(3) { animation-delay: .14s; }
.rd-section:nth-child(4) { animation-delay: .20s; }
.rd-section:nth-child(5) { animation-delay: .26s; }

/* Accent strip */
.rd-section::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.rd-section.accent-emerald::before { background: var(--emerald-g); }
.rd-section.accent-blue::before    { background: var(--blue-g); }
.rd-section.accent-amber::before   { background: var(--amber-g); }
.rd-section.accent-violet::before  { background: var(--violet-g); }

.rd-section-header {
    padding: 18px 24px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.rd-section-title {
    font-family: 'Syne', sans-serif;
    font-size: 15px; font-weight: 700;
    letter-spacing: -0.01em; color: var(--ink);
    display: flex; align-items: center; gap: 8px;
}

/* Section title icon — inline-flex so emoji renders inline, not as a block */
.rd-section-title-icon {
    width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; line-height: 1;
}
.accent-emerald .rd-section-title-icon { background: rgba(0,194,122,.10); }
.accent-blue    .rd-section-title-icon { background: rgba(37,99,235,.10); }
.accent-amber   .rd-section-title-icon { background: rgba(245,158,11,.10); }
.accent-violet  .rd-section-title-icon { background: rgba(124,58,237,.10); }

.rd-section-link {
    font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 700;
    color: var(--emerald-d); text-decoration: none;
    display: inline-flex; align-items: center; gap: 4px;
    transition: gap .15s;
}
.rd-section-link:hover { gap: 7px; }
.rd-section-body { padding: 20px 24px; }

/* ── Empty state ── */
.rd-empty {
    padding: 36px 20px; text-align: center;
    color: var(--ink-muted); font-size: 13.5px; font-weight: 300;
}
.rd-empty-icon { font-size: 28px; display: block; margin-bottom: 10px; opacity: .5; }

/* ── Vital grid ── */
.rd-vital-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.rd-vital-card {
    border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 16px 18px; background: var(--surface);
    position: relative; overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.rd-vital-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.rd-vital-card::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
    background: var(--emerald-g);
}
.rd-vital-label {
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px;
}
.rd-vital-value {
    font-family: 'Syne', sans-serif;
    font-size: 22px; font-weight: 800;
    letter-spacing: -0.04em; color: var(--ink); line-height: 1;
}
.rd-vital-unit {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px; font-weight: 400; color: var(--ink-muted); margin-left: 3px;
}

/* ── Chart grid ── */
.rd-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.rd-chart-wrap h3 {
    font-family: 'Syne', sans-serif;
    font-size: 12px; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px;
}
.rd-chart-canvas-wrap { height: 200px; position: relative; }

/* ── Table ── */
.rd-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.rd-table thead th {
    font-family: 'Syne', sans-serif;
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--ink-muted);
    padding: 0 12px 10px 0; border-bottom: 1px solid var(--border);
}
.rd-table tbody tr { transition: background .15s; }
.rd-table tbody tr:hover { background: var(--surface); }
.rd-table tbody td {
    padding: 11px 12px 11px 0; border-bottom: 1px solid var(--border);
    font-size: 13px; color: var(--ink-soft); vertical-align: middle;
}
.rd-table tbody tr:last-child td { border-bottom: none; }
.rd-date-cell {
    font-family: 'Syne', sans-serif; font-size: 11.5px; font-weight: 700;
    color: var(--ink); white-space: nowrap;
}

/* Meal status */
.rd-meal-taken   { color: var(--emerald-d); font-weight: 600; font-size: 12px; }
.rd-meal-missed  { color: #ef4444;          font-weight: 600; font-size: 12px; }
.rd-meal-pending { color: var(--ink-muted); font-size: 12px; }

/* Prescription chips */
.rd-rx-chip {
    display: inline-block; font-family: 'Syne', sans-serif;
    font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
    padding: 3px 10px; border-radius: 100px;
}
.rd-rx-taken   { background: rgba(0,194,122,.12);  color: var(--emerald-d); }
.rd-rx-missed  { background: rgba(239,68,68,.10);  color: #dc2626; }
.rd-rx-refused { background: rgba(245,158,11,.12); color: #b45309; }
.rd-rx-pending { background: var(--border);        color: var(--ink-muted); }

/* Med name */
.rd-med-name { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: var(--ink); }
.rd-med-sub  { font-size: 11px; color: var(--ink-muted); margin-top: 2px; }