/* ============================================================
   UnicornTracker — Main Stylesheet
   Warm, caring, not clinical.
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --purple:       #7c4dbd;
    --purple-light: #a57fd4;
    --purple-dark:  #5a2e99;
    --teal:         #4db6ac;
    --teal-light:   #80cbc4;
    --amber:        #ffa726;
    --amber-light:  #ffd54f;
    --rose:         #ef5350;
    --rose-light:   #ffcdd2;
    --green:        #66bb6a;
    --green-light:  #c8e6c9;
    --blue:         #42a5f5;
    --blue-light:   #bbdefb;

    --bg:           #f7f5fb;
    --card:         #ffffff;
    --border:       #e8e0f0;
    --text:         #2d2040;
    --text-light:   #7a6a90;
    --muted:        #aaa0bb;

    --shadow:       0 2px 12px rgba(100,60,180,0.08);
    --shadow-hover: 0 4px 20px rgba(100,60,180,0.15);
    --radius:       12px;
    --radius-sm:    8px;
    --transition:   0.18s ease;

    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); }
img { max-width: 100%; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ── Header ─────────────────────────────────────────────────── */
.app-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(100,60,180,0.06);
}
.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-weight: 700;
    font-size: 1.2rem;
}
.logo-icon { font-size: 1.5rem; }
.logo-text { background: linear-gradient(135deg, var(--purple), var(--teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-nav { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.nav-link { color: var(--text-light); font-size: 0.9rem; padding: 0.3rem 0.5rem; border-radius: var(--radius-sm); transition: color var(--transition); }
.nav-link:hover { color: var(--purple); }
.nav-user { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-light); border-left: 1px solid var(--border); padding-left: 0.75rem; }
.nav-username { font-weight: 500; color: var(--text); }
.nav-logout { color: var(--text-light) !important; }

/* ── Footer ─────────────────────────────────────────────────── */
.app-footer {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.8rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--purple); color: #fff; border-color: var(--purple); }
.btn-primary:hover { background: var(--purple-dark); border-color: var(--purple-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--purple); border-color: var(--purple); }
.btn-outline:hover { background: var(--purple); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-light); border-color: var(--border); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-danger { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn-danger:hover { background: #a93226; border-color: #a93226; color: #fff; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1.05rem; border-radius: var(--radius); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-add-row { width: 100%; margin: 0.5rem 0; border-style: dashed; color: var(--purple); border-color: var(--purple-light); }
.btn-add-row:hover { background: rgba(124,77,189,0.07); }
.btn-save { padding: 1rem 2.5rem; font-size: 1.1rem; }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    border-left: 4px solid;
}
.alert-success { background: var(--green-light); border-color: var(--green); color: #1b5e20; }
.alert-danger  { background: var(--rose-light); border-color: var(--rose); color: #b71c1c; }
.alert-info    { background: var(--blue-light); border-color: var(--blue); color: #0d47a1; }
.alert-fever   { background: #fff3e0; border-color: #ff9800; color: #e65100; font-weight: 500; }
.alert-concern { background: #fff8e1; border-color: var(--amber); color: #e65100; }
.alert-link    { font-weight: 600; text-decoration: underline; color: inherit; }
.save-success  { font-size: 1rem; padding: 1rem 1.5rem; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }
.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: var(--text);
}
.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(124,77,189,0.12);
}
.form-control-lg { padding: 0.8rem 1rem; font-size: 1rem; }
.form-control-sm { padding: 0.5rem 0.75rem; font-size: 0.9rem; }
.form-hint { display: block; font-size: 0.82rem; color: var(--text-light); margin-top: 0.3rem; }
.form-divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
.form-group-lg { flex: 1; }
.form-group-inline { display: flex; align-items: flex-end; gap: 0.5rem; }
textarea.form-control { resize: vertical; min-height: 80px; }
.optional { font-weight: 400; color: var(--muted); font-size: 0.85rem; }

/* Input with unit toggle */
.input-with-unit { display: flex; gap: 0; align-items: center; }
.input-with-unit .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); flex: 1; }
.unit-toggle { display: flex; border: 2px solid var(--border); border-left: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; overflow: hidden; }
.unit-opt { padding: 0.6rem 0.75rem; cursor: pointer; font-size: 0.85rem; font-weight: 500; color: var(--text-light); transition: all var(--transition); }
.unit-opt input { display: none; }
.unit-opt.active, .unit-opt:has(input:checked) { background: var(--purple); color: #fff; }
.unit-label { padding: 0.65rem 0.75rem; background: var(--border); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 0.9rem; color: var(--text-light); }
.vol-oz-display { font-size: 0.82rem; color: var(--text-light); white-space: nowrap; margin-left: 0.5rem; }

/* Fever alert inline */
.fever-alert { background: #fff3e0; border-left: 4px solid #ff9800; padding: 0.6rem 0.8rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-top: 0.5rem; font-size: 0.9rem; color: #e65100; }

/* ── Score Scale (1-10 tap buttons) ─────────────────────────── */
.score-scale {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin: 0.4rem 0;
}
.scale-btn {
    cursor: pointer;
    transition: all var(--transition);
}
.scale-btn input { display: none; }
.scale-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
    background: #fff;
    transition: all var(--transition);
}
.scale-btn:hover .scale-num { border-color: var(--purple-light); color: var(--purple); }
.scale-btn.selected .scale-num { background: var(--purple); border-color: var(--purple); color: #fff; }
.scale-legend { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-light); margin-top: 0.3rem; }
.score-description { margin-top: 0.5rem; font-size: 0.9rem; color: var(--text-light); font-style: italic; }

/* ── Score range slider ──────────────────────────────────────── */
.score-slider-wrapper { margin: 0.5rem 0; }
.score-range {
    width: 100%;
    height: 6px;
    accent-color: var(--purple);
    cursor: pointer;
}
.score-display { text-align: center; font-size: 1.4rem; font-weight: 700; color: var(--purple); margin-top: 0.3rem; }

/* ── Option buttons ──────────────────────────────────────────── */
.option-buttons { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.4rem 0; }
.opt-btn {
    padding: 0.45rem 0.9rem;
    border: 2px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-light);
    background: #fff;
    transition: all var(--transition);
    white-space: nowrap;
}
.opt-btn input { display: none; }
.opt-btn:hover { border-color: var(--purple-light); color: var(--purple); }
.opt-btn.selected { background: var(--purple); border-color: var(--purple); color: #fff; }
.option-buttons-sm .opt-btn { padding: 0.3rem 0.6rem; font-size: 0.82rem; }

/* ── Yes/No toggle ───────────────────────────────────────────── */
.yes-no-toggle { display: flex; gap: 0.5rem; margin: 0.4rem 0; }
.yn-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    background: #fff;
    transition: all var(--transition);
}
.yn-btn input { display: none; }
.yn-btn:hover { border-color: var(--purple-light); }
.yn-yes { background: var(--rose-light) !important; border-color: var(--rose) !important; color: #c62828 !important; }
.yn-no  { background: var(--green-light) !important; border-color: var(--green) !important; color: #1b5e20 !important; }

/* ── Conditional groups ──────────────────────────────────────── */
.conditional-group {
    margin: 0.5rem 0 0.5rem 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--purple-light);
}

/* ── Toggle checkbox label ───────────────────────────────────── */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}
.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--purple);
    cursor: pointer;
}
.skip-note { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin: 1rem 0; }

/* ── Intake rows ─────────────────────────────────────────────── */
.intake-row {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    position: relative;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.intake-row-body { flex: 1; }
.remove-row-btn {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    line-height: 1;
    transition: color var(--transition);
    flex-shrink: 0;
}
.remove-row-btn:hover { color: var(--rose); }
.running-total {
    background: linear-gradient(135deg, rgba(77,182,172,0.12), rgba(124,77,189,0.08));
    border: 1px solid var(--teal-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.running-total strong { font-size: 1.15rem; color: var(--teal); }
.total-oz { color: var(--text-light); font-size: 0.85rem; }

/* ── Hydration summary bar ───────────────────────────────────── */
.hydration-summary-bar {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.hyd-row { display: flex; justify-content: space-between; align-items: center; padding: 0.25rem 0; font-size: 0.95rem; }
.hyd-tube { color: var(--blue); }
.hyd-grand { border-top: 1px solid var(--border); margin-top: 0.25rem; padding-top: 0.5rem; font-weight: 600; color: var(--teal); font-size: 1rem; }
.hyd-target { color: var(--text-light); font-size: 0.82rem; }

/* ── Wizard ──────────────────────────────────────────────────── */
.wizard-body { background: var(--bg); }
.wizard-container { max-width: 700px; }

.wizard-progress {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}
.progress-step { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; flex-shrink: 0; }
.progress-dot {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
    border: 2px solid var(--border);
    color: var(--muted);
    background: #fff;
    transition: all var(--transition);
}
.progress-step.done   .progress-dot { background: var(--purple); border-color: var(--purple); color: #fff; }
.progress-step.active .progress-dot { background: #fff; border-color: var(--purple); color: var(--purple); box-shadow: 0 0 0 4px rgba(124,77,189,0.15); }
.progress-label { font-size: 0.72rem; color: var(--muted); text-align: center; max-width: 70px; }
.progress-step.active .progress-label { color: var(--purple); font-weight: 600; }
.progress-step.done   .progress-label { color: var(--text-light); }
.progress-line { flex: 1; height: 2px; background: var(--border); min-width: 10px; }
.progress-line.done { background: var(--purple); }

.wizard-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}
.wizard-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.wizard-icon { font-size: 1.75rem; }
.wizard-step-header h2 { flex: 1; font-size: 1.3rem; font-weight: 600; }
.wizard-step-num { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }

.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.wizard-nav-submit { justify-content: space-between; }

.step-form .step-intro { color: var(--text-light); margin-bottom: 1.25rem; font-size: 0.95rem; }

/* ── Symptom sections ────────────────────────────────────────── */
.symptom-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.symptom-section:last-of-type { border-bottom: none; }
.symptom-heading { font-size: 1rem; font-weight: 600; color: var(--purple); margin-bottom: 1rem; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}
.badge-good    { background: var(--green-light); color: #1b5e20; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger  { background: var(--rose-light); color: #b71c1c; }

/* ── Dashboard ───────────────────────────────────────────────── */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.dash-date { font-size: 1.4rem; font-weight: 700; }
.dash-last-entry { color: var(--text-light); font-size: 0.9rem; margin-top: 0.2rem; }
.dash-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow);
}
.stat-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); margin-bottom: 0.4rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-unit  { font-size: 0.8rem; font-weight: 400; color: var(--text-light); }
.stat-sub   { font-size: 0.78rem; color: var(--text-light); margin-top: 0.25rem; }
.stat-na    { color: var(--muted); font-size: 1.2rem; }
.status-good  { color: var(--teal)  !important; }
.status-ok    { color: var(--green) !important; }
.status-warn  { color: var(--amber) !important; }
.status-bad   { color: var(--rose)  !important; }

.hydration-bar { height: 6px; background: var(--border); border-radius: 3px; margin-top: 0.4rem; overflow: hidden; }
.hydration-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.hydration-fill.status-good { background: var(--teal); }
.hydration-fill.status-ok   { background: var(--green); }
.hydration-fill.status-warn { background: var(--amber); }
.hydration-fill.status-bad  { background: var(--rose); }

/* Entry list */
.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.section-link { font-size: 0.82rem; text-transform: none; font-weight: 500; }

.entry-list { display: flex; flex-direction: column; gap: 0.5rem; }
.entry-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    cursor: pointer;
    color: var(--text);
    text-decoration: none;
}
.entry-card:hover { border-color: var(--purple-light); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.entry-time { font-size: 0.82rem; color: var(--text-light); white-space: nowrap; min-width: 60px; }
.entry-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; flex: 1; }
.entry-arrow { color: var(--muted); font-size: 1.3rem; }

/* Chips */
.chip {
    display: inline-flex;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
}
.chip-swallow   { background: rgba(124,77,189,0.12); color: var(--purple); }
.chip-hydration { background: rgba(77,182,172,0.15); color: #00796b; }
.chip-symptom   { background: var(--rose-light); color: #c62828; }
.chip-fever     { background: #fff3e0; color: #e65100; }
.chip-concern   { background: #fff8e1; color: #f57f17; }
.chip-treatment { background: var(--blue-light); color: #1565c0; }
.chip-good      { background: var(--green-light); color: #2e7d32; }
.chip-no        { background: var(--bg); color: var(--muted); }

/* History entry card extra column */
.entry-date-col { text-align: center; min-width: 48px; }
.entry-day      { font-size: 0.7rem; text-transform: uppercase; color: var(--muted); }
.entry-date-num { font-size: 0.95rem; font-weight: 700; }
.entry-year     { font-size: 0.7rem; color: var(--muted); }

/* Recent days */
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.6rem; }
.recent-day-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    position: relative;
}
.recent-day-card:hover { border-color: var(--purple-light); box-shadow: var(--shadow-hover); }
.recent-day-card.had-fever  { border-color: #ff9800; background: #fff8f0; }
.recent-day-card.has-concern { border-color: var(--amber); }
.recent-day-date { font-weight: 600; font-size: 0.88rem; }
.recent-day-stats { font-size: 0.75rem; color: var(--text-light); margin-top: 0.3rem; display: flex; flex-direction: column; gap: 0.15rem; }
.recent-flag { position: absolute; top: 0.5rem; right: 0.5rem; font-size: 0.9rem; }

/* Report buttons */
.report-links { display: flex; gap: 0.75rem; margin-top: 2rem; flex-wrap: wrap; }
.report-btn {
    flex: 1;
    min-width: 160px;
    padding: 0.9rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    text-decoration: none;
}
.report-btn:hover { border-color: var(--purple-light); box-shadow: var(--shadow-hover); color: var(--purple); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }

/* ── Entry view ──────────────────────────────────────────────── */
.entry-view { max-width: 760px; }
.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.entry-header h2 { font-size: 1.4rem; }
.entry-time-logged { color: var(--text-light); font-size: 0.9rem; }
.entry-header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.entry-sections { display: flex; flex-direction: column; gap: 1rem; }
.entry-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
}
.entry-section-title { font-size: 1rem; font-weight: 700; color: var(--purple); margin-bottom: 1rem; }
.entry-subsection { font-size: 0.85rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.entry-stat { }
.entry-stat-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); margin-bottom: 0.2rem; }
.entry-stat-val { font-size: 1.2rem; font-weight: 700; }
.entry-stat-sub { font-size: 0.78rem; color: var(--muted); }
.stat-fever { color: var(--rose) !important; }
.entry-text-note { color: var(--text-light); font-size: 0.92rem; margin-top: 0.5rem; }
.entry-text-block { margin-bottom: 0.75rem; }
.entry-text-block p { margin-top: 0.3rem; }
.symptom-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.symptom-chip { padding: 0.25rem 0.7rem; border-radius: 12px; font-size: 0.82rem; }
.chip-no { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

.hydration-total-row {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg);
    font-size: 0.95rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.hyd-status-badge { padding: 0.2rem 0.6rem; border-radius: 10px; font-size: 0.8rem; font-weight: 600; background: var(--green-light); color: #1b5e20; }

.entry-footer-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.entry-meta { font-size: 0.78rem; color: var(--muted); margin-top: 1rem; }

/* ── Tables ──────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table th, .data-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; }
.data-table th { font-weight: 600; background: var(--bg); color: var(--text-light); font-size: 0.8rem; text-transform: uppercase; }
.table-subtotal td { background: var(--bg); border-top: 2px solid var(--border); }
.table-scroll { overflow-x: auto; }
.muted { color: var(--muted); }

/* ── Reports ─────────────────────────────────────────────────── */
.report-body { background: #fff; }
.report-container { max-width: 820px; }
.report-header { margin-bottom: 1.5rem; border-bottom: 3px solid var(--purple); padding-bottom: 1rem; }
.report-header-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.print-logo { font-size: 1.1rem; font-weight: 800; color: var(--purple); }
.report-actions { display: flex; gap: 0.5rem; }
.report-title { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.report-subtitle { color: var(--text-light); font-size: 0.95rem; margin-top: 0.25rem; }
.report-fever-alert { background: #fff3e0; border: 1px solid #ff9800; border-radius: var(--radius-sm); padding: 0.6rem 0.9rem; margin-top: 0.75rem; font-weight: 600; color: #e65100; }
.report-concern-alert { background: #fff8e1; border: 1px solid var(--amber); border-radius: var(--radius-sm); padding: 0.6rem 0.9rem; margin-top: 0.5rem; color: #f57f17; }
.report-section { margin-bottom: 1.5rem; }
.report-section-title { font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light); border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; margin-bottom: 0.75rem; }
.report-subsection { font-size: 0.82rem; font-weight: 600; color: var(--text-light); margin: 0.75rem 0 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.report-stat { padding: 0.75rem 1rem; background: var(--bg); border-radius: var(--radius-sm); }
.rs-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); margin-bottom: 0.3rem; }
.rs-val { font-size: 1.3rem; font-weight: 700; }
.rs-sub { font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }
.rs-fever { background: #fff3e0 !important; }
.rs-fever .rs-val { color: var(--rose); }
.report-symptom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.4rem; }
.report-sym { font-size: 0.9rem; padding: 0.3rem 0; }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-bottom: 0.5rem; }
.report-table th, .report-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; }
.report-table th { background: var(--bg); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; color: var(--text-light); }
.report-subtotal td { background: #f0f0f0; font-weight: 600; border-top: 2px solid var(--border); }
.week-table td, .week-table th { white-space: nowrap; }
.week-table .no-data td { color: var(--muted); }
.week-table .today-row { background: rgba(124,77,189,0.05); }
.report-hydration-total { padding: 0.75rem 1rem; background: var(--bg); border-radius: var(--radius-sm); margin-top: 0.5rem; font-size: 0.95rem; }
.report-scale-note { font-size: 0.78rem; color: var(--muted); margin-top: 0.5rem; font-style: italic; }
.report-note-block { margin-bottom: 0.75rem; padding-left: 1rem; border-left: 3px solid var(--purple-light); }
.report-note-time { font-size: 0.78rem; font-weight: 600; color: var(--text-light); margin-bottom: 0.25rem; }
.report-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--muted); }
.report-footer-note { font-style: italic; }

/* Charts */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.chart-full { grid-column: 1 / -1; }
.chart-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--shadow); }
.chart-card h3 { font-size: 0.85rem; font-weight: 600; color: var(--text-light); margin-bottom: 0.75rem; }

/* ── Review table ─────────────────────────────────────────────── */
.review-summary { background: var(--bg); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.review-summary h3 { font-size: 1rem; font-weight: 700; color: var(--purple); margin-bottom: 0.25rem; }
.review-sub { font-size: 0.85rem; color: var(--text-light); margin-bottom: 1rem; }
.review-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.review-table th, .review-table td { padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.review-table th { font-weight: 600; color: var(--text-light); width: 35%; }
.review-section-header { background: var(--purple); color: #fff !important; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.4rem 0.6rem; }
.review-edit-links { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }

/* ── Concern flag ─────────────────────────────────────────────── */
.concern-flag-group { padding: 1rem; background: #fff8e1; border-radius: var(--radius-sm); border: 1px solid var(--amber); }
.concern-toggle { font-size: 1rem; }
.concern-label { font-weight: 600; color: #f57f17; }

/* ── Login ───────────────────────────────────────────────────── */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #f0eaff 0%, #e0f7fa 100%); }
.login-wrapper { width: 100%; max-width: 400px; padding: 1rem; }
.login-card { background: var(--card); border-radius: var(--radius); box-shadow: 0 8px 40px rgba(100,60,180,0.12); padding: 2.5rem 2rem; }
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-icon { font-size: 3rem; display: block; }
.login-logo h1 { font-size: 1.8rem; background: linear-gradient(135deg, var(--purple), var(--teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin: 0.5rem 0 0.25rem; }
.login-logo p { color: var(--text-light); }
.login-form .form-group { margin-bottom: 1.25rem; }
.login-form .btn-block { margin-top: 0.5rem; }

/* ── Admin ───────────────────────────────────────────────────── */
.admin-user-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.admin-user-card h3 { margin-bottom: 1rem; }

/* ── Page header ─────────────────────────────────────────────── */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.4rem; }

/* ── Filters ─────────────────────────────────────────────────── */
.history-filters { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filter-form { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.filter-form label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; cursor: pointer; }
.history-count { font-size: 0.82rem; color: var(--text-light); margin-left: auto; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { display: flex; gap: 0.4rem; margin-top: 1.5rem; flex-wrap: wrap; }
.page-btn { padding: 0.4rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.88rem; color: var(--text); background: var(--card); transition: all var(--transition); }
.page-btn:hover { border-color: var(--purple); color: var(--purple); }
.page-btn.active { background: var(--purple); border-color: var(--purple); color: #fff; }

/* ── Quick Entry Grid (Dashboard) ───────────────────────────── */
.quick-entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    cursor: pointer;
    text-align: center;
}
.quick-btn:hover {
    border-color: var(--purple-light);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    color: var(--purple);
}
.quick-btn-icon { font-size: 1.6rem; line-height: 1; }
.quick-btn-label { font-size: 0.82rem; color: var(--text-light); line-height: 1.3; }
.quick-btn:hover .quick-btn-label { color: var(--purple); }
.quick-btn-feel { border-color: rgba(255,167,38,0.4); background: linear-gradient(135deg, #fff, #fffdf0); }
.quick-btn-feel:hover { border-color: var(--amber); }

/* ── Quick Entry Pages ───────────────────────────────────────── */
.quick-entry-body { background: var(--bg); }
.quick-container { max-width: 600px; }
.quick-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}
.quick-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.quick-icon { font-size: 2.2rem; line-height: 1; flex-shrink: 0; }
.quick-card-header h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.1rem; }
.quick-subtitle { color: var(--text-light); font-size: 0.9rem; }
.quick-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .wizard-card { padding: 1.25rem 1rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row-3 { grid-template-columns: 1fr; }
    .charts-grid { grid-template-columns: 1fr; }
    .dash-header { flex-direction: column; }
    .wizard-step-header h2 { font-size: 1.1rem; }
    .btn-lg { padding: 0.65rem 1.25rem; font-size: 0.95rem; }
    .scale-num { width: 36px; height: 36px; font-size: 0.85rem; }
    .report-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-entry-grid { grid-template-columns: repeat(4, 1fr); }
    .quick-card { padding: 1.25rem 1rem; }
}
@media (max-width: 400px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .header-nav .nav-link { display: none; }
    .progress-label { display: none; }
    .quick-entry-grid { grid-template-columns: repeat(3, 1fr); }
}
