*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
    --bg: #f5f7f5;
    --bg-secondary: #eef1ee;
    --text: #1a2e1a;
    --text-secondary: #5a6e5a;
    --border: #d4ddd4;
    --input: #d4ddd4;
    --primary: #00695C;
    --primary-fg: #ffffff;
    --primary-light: #e0f2f1;
    --secondary: #e8efe8;
    --secondary-fg: #2e4a2e;
    --muted: #eef1ee;
    --muted-fg: #6b7e6b;
    --accent: #e0f2f1;
    --accent-fg: #004D40;
    --destructive: #c62828;
    --warning: #f57f17;
    --success: #2e7d32;
    --ring: #80cbc4;
    --card: #ffffff;
    --card-fg: #1a2e1a;
    --shadow: 0 1px 3px rgba(0,50,30,0.06), 0 1px 2px rgba(0,50,30,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,50,30,0.08), 0 2px 4px -2px rgba(0,50,30,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,50,30,0.1), 0 4px 6px -4px rgba(0,50,30,0.05);
    --radius: 0.75rem;
    --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --nav-height: 56px;
    --topbar-height: 52px;

    /* Mood colors */
    --mood-1: #c62828; --mood-2: #d84315; --mood-3: #ef6c00;
    --mood-4: #f9a825; --mood-5: #fdd835; --mood-6: #c0ca33;
    --mood-7: #7cb342; --mood-8: #43a047; --mood-9: #2e7d32; --mood-10: #1b5e20;

    /* Severity colors */
    --sev-mild: #a5d6a7; --sev-moderate: #fff176; --sev-significant: #ffb74d; --sev-severe: #ef5350;
}

[data-theme="dark"] {
    --bg: #121a12;
    --bg-secondary: #1a241a;
    --text: #e0ece0;
    --text-secondary: #8fa88f;
    --border: rgba(0,105,92,0.2);
    --input: rgba(0,105,92,0.25);
    --primary: #80cbc4;
    --primary-fg: #0a1a0a;
    --primary-light: rgba(0,105,92,0.15);
    --secondary: #1e2a1e;
    --secondary-fg: #c8dcc8;
    --muted: #1e2a1e;
    --muted-fg: #7a947a;
    --accent: rgba(0,105,92,0.15);
    --accent-fg: #a7d7d2;
    --card: #1a241a;
    --card-fg: #e0ece0;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
}

html { overflow-y: scroll; font-size: 16px; -webkit-text-size-adjust: 100%; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.2s, color 0.2s;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--topbar-height);
    padding-bottom: calc(var(--nav-height) + 16px);
}

/* Top App Bar */
.topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--topbar-height);
    background: var(--primary);
    color: var(--primary-fg);
    display: flex; align-items: center;
    padding: 0 16px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.topbar-title {
    font-size: 18px; font-weight: 600;
    letter-spacing: -0.01em;
    flex: 1;
}

.topbar .btn-icon { color: var(--primary-fg); }
.topbar .btn-icon:hover { background: rgba(255,255,255,0.15); }

/* Bottom Navigation */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: var(--card);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-around;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 2px; padding: 6px 12px;
    border: none; background: none;
    color: var(--muted-fg);
    font-size: 11px; font-family: inherit;
    cursor: pointer; transition: color 0.15s;
    min-width: 56px;
}

.nav-item .material-symbols-outlined { font-size: 24px; transition: color 0.15s; }
.nav-item:hover { color: var(--primary); }
.nav-item.active { color: var(--primary); font-weight: 600; }
.nav-item.active .material-symbols-outlined { font-variation-settings: 'FILL' 1; }

/* Crisis FAB */
.crisis-fab {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    right: 16px;
    width: 56px; height: 56px;
    border-radius: 28px;
    background: var(--destructive);
    color: #fff;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 99;
    transition: transform 0.15s, box-shadow 0.15s;
}

.crisis-fab:hover { transform: scale(1.05); box-shadow: 0 8px 20px rgba(198,40,40,0.3); }
.crisis-fab .material-symbols-outlined { font-size: 28px; }

/* Views */
.view {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
    animation: fadeIn 0.15s ease;
}

.view.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s;
}

.card + .card { margin-top: 12px; }
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}

.card-title {
    font-size: 15px; font-weight: 600;
    letter-spacing: -0.01em;
}

.card-subtitle {
    font-size: 13px; color: var(--text-secondary);
    margin-top: 2px;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 0 16px; height: 36px;
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) - 2px);
    background: var(--bg);
    color: var(--text);
    font-size: 14px; font-weight: 500; font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    outline: none;
}

.btn:hover { background: var(--accent); color: var(--accent-fg); }
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-icon {
    padding: 0; width: 40px; height: 40px;
    border: none; background: none;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text);
    transition: background 0.15s;
}

.btn-icon:hover { background: var(--accent); }

.btn-primary {
    background: var(--primary); color: var(--primary-fg);
    border-color: var(--primary);
}

.btn-primary:hover { opacity: 0.9; background: var(--primary); color: var(--primary-fg); }

.btn-secondary {
    background: var(--secondary); color: var(--secondary-fg);
    border-color: transparent;
}

.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--accent); }

.btn-danger { background: var(--destructive); color: #fff; border-color: var(--destructive); }
.btn-danger:hover { opacity: 0.9; }

.btn-lg { height: 44px; padding: 0 24px; font-size: 15px; border-radius: var(--radius); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* Forms */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px; font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-input, .form-select, .form-textarea {
    display: block; width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) - 2px);
    background: var(--bg);
    color: var(--text);
    font-size: 14px; font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,105,92,0.1);
}

.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.form-select { cursor: pointer; appearance: auto; }

.form-hint { font-size: 12px; color: var(--muted-fg); margin-top: 4px; }

/* Chips */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 9999px;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.chip .material-symbols-outlined { font-size: 16px; }

/* Range Slider */
.range-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid var(--primary-fg);
    box-shadow: var(--shadow);
}

.range-slider::-moz-range-thumb {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid var(--primary-fg);
}

.range-value {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 28px;
    background: var(--primary); color: var(--primary-fg);
    border-radius: 14px;
    font-size: 13px; font-weight: 600;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

@media (max-width: 480px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}

/* Quick Action Cards */
.quick-action {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; padding: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.quick-action:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.quick-action .material-symbols-outlined { font-size: 28px; color: var(--primary); }
.quick-action span { font-size: 13px; font-weight: 500; }

/* Toast */
.toast {
    position: fixed;
    top: calc(var(--topbar-height) + 8px);
    right: 16px; left: 16px;
    max-width: 400px;
    margin: 0 auto;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 20px;
    font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-8px);
    transition: transform 0.2s ease, opacity 0.2s ease;
    pointer-events: none;
    text-align: center;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--destructive); }
.toast.toast-warning { border-left: 4px solid var(--warning); }

/* Disclaimer Banner */
.disclaimer-banner {
    background: var(--warning);
    color: #000;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.disclaimer-banner .btn {
    margin-top: 8px;
    background: rgba(0,0,0,0.15);
    color: #000;
    border: none;
    font-size: 12px;
    height: 28px;
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 12px 0; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    padding: 8px 12px;
    border: 1px solid var(--border);
    text-align: left;
}

th {
    font-weight: 600;
    background: var(--muted);
    position: sticky; top: 0;
}

tr:hover { background: var(--accent); }

/* Taper step done */
tr.step-done { opacity: 0.6; }
tr.step-done td:first-child { text-decoration: line-through; }
tr.step-current { background: var(--primary-light); font-weight: 600; }

/* Chart container */
.chart-container {
    position: relative;
    height: 250px;
    margin: 12px 0;
}

.chart-container canvas { width: 100% !important; }

/* Symptom list */
.symptom-item {
    display: flex; align-items: center;
    gap: 12px; padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.symptom-item:last-child { border-bottom: none; }

.symptom-name { flex: 1; font-size: 14px; }

.symptom-slider { flex: 0 0 120px; }

.symptom-value {
    min-width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600;
    border-radius: 14px;
    color: var(--primary-fg);
}

/* Mood scale */
.mood-scale {
    display: flex; gap: 4px;
    justify-content: space-between;
    margin: 12px 0;
}

.mood-btn {
    flex: 1;
    height: 44px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
}

.mood-btn:hover { border-color: var(--primary); }
.mood-btn.active { border-color: var(--primary); background: var(--primary); color: var(--primary-fg); }

.mood-labels {
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--muted-fg);
    margin-top: -4px;
}

/* Window/Wave toggle */
.type-toggle { display: flex; gap: 0; margin: 12px 0; }

.type-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 13px; font-weight: 500; font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}

.type-btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.type-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.type-btn:not(:first-child) { border-left: none; }
.type-btn.active { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }

/* Calendar dots */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin: 12px 0;
}

.cal-header { font-size: 11px; font-weight: 600; text-align: center; color: var(--muted-fg); padding: 4px; }

.cal-day {
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.cal-day:hover { background: var(--accent); }
.cal-day.today { font-weight: 700; }
.cal-day.has-data::after {
    content: '';
    position: absolute; bottom: 2px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--primary);
}

.cal-day.empty { pointer-events: none; }

/* Coping strategy cards */
.strategy-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.strategy-card:hover { box-shadow: var(--shadow-md); }

.strategy-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
}

.strategy-header .material-symbols-outlined { font-size: 22px; color: var(--primary); }

.strategy-header h3 {
    flex: 1; font-size: 14px; font-weight: 600;
}

.strategy-header .chevron {
    font-size: 20px; color: var(--muted-fg);
    transition: transform 0.2s;
}

.strategy-card.open .chevron { transform: rotate(180deg); }

.strategy-body {
    display: none;
    padding: 0 16px 14px;
    font-size: 13px; color: var(--text-secondary);
    line-height: 1.6;
}

.strategy-card.open .strategy-body { display: block; }

.strategy-body p { margin-bottom: 8px; }
.strategy-body strong { color: var(--text); }

/* Breathing timer */
.breathing-timer {
    display: flex; flex-direction: column; align-items: center;
    gap: 16px; padding: 24px;
}

.breathing-circle {
    width: 160px; height: 160px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
    transition: transform 1s ease-in-out;
}

.breathing-circle.inhale { transform: scale(1.3); }
.breathing-circle.hold { transform: scale(1.3); }
.breathing-circle.exhale { transform: scale(1); }

.breathing-label { font-size: 18px; font-weight: 600; color: var(--primary); }
.breathing-count { font-size: 32px; font-weight: 700; color: var(--text); }

/* Crisis resources */
.crisis-call-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 10px;
    width: 100%; height: 56px;
    background: var(--destructive); color: #fff;
    border: none; border-radius: var(--radius);
    font-size: 18px; font-weight: 700; font-family: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    transition: opacity 0.15s;
}

.crisis-call-btn:hover { opacity: 0.9; }

.resource-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: box-shadow 0.15s;
}

.resource-card:hover { box-shadow: var(--shadow-md); }

.resource-info { flex: 1; }
.resource-name { font-size: 14px; font-weight: 600; }
.resource-desc { font-size: 12px; color: var(--text-secondary); }
.resource-phone { font-size: 13px; color: var(--primary); font-weight: 600; }

.resource-action {
    flex-shrink: 0;
}

.resource-action a, .resource-action button {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 4px; padding: 6px 12px;
    border-radius: calc(var(--radius) - 2px);
    background: var(--primary); color: var(--primary-fg);
    text-decoration: none;
    font-size: 12px; font-weight: 600; font-family: inherit;
    border: none; cursor: pointer;
}

/* CIWA score display */
.ciwa-score-display {
    text-align: center;
    padding: 24px;
    margin: 16px 0;
}

.ciwa-score-number {
    font-size: 48px; font-weight: 700;
    color: var(--primary);
}

.ciwa-severity {
    font-size: 18px; font-weight: 600;
    margin-top: 4px;
}

.ciwa-severity.mild { color: var(--success); }
.ciwa-severity.moderate { color: var(--warning); }
.ciwa-severity.significant { color: #e65100; }
.ciwa-severity.severe { color: var(--destructive); }

.ciwa-guidance {
    font-size: 14px; color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.5;
}

/* Equivalency result */
.equiv-result {
    text-align: center;
    padding: 24px;
    background: var(--primary-light);
    border-radius: var(--radius);
    margin: 16px 0;
}

.equiv-result-dose {
    font-size: 36px; font-weight: 700;
    color: var(--primary);
}

.equiv-result-label {
    font-size: 13px; color: var(--text-secondary);
    margin-top: 4px;
}

/* Diary entry */
.diary-entry {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.diary-entry:hover { background: var(--accent); }
.diary-entry-title { font-size: 14px; font-weight: 600; }
.diary-entry-preview { font-size: 13px; color: var(--text-secondary); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diary-entry-meta { font-size: 11px; color: var(--muted-fg); margin-top: 4px; display: flex; gap: 8px; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
    position: absolute; inset: 0;
    background: var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle-track::before {
    content: ''; position: absolute;
    width: 20px; height: 20px;
    left: 2px; bottom: 2px;
    background: var(--bg);
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.toggle input:checked + .toggle-track { background: var(--primary); }
.toggle input:checked + .toggle-track::before { transform: translateX(20px); background: #fff; }

/* Settings rows */
.setting-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 14px; font-weight: 500; }
.setting-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Section headers */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}

.section-title {
    font-size: 16px; font-weight: 700;
    letter-spacing: -0.01em;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--muted-fg);
}

.empty-state .material-symbols-outlined { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 14px; margin-bottom: 16px; }

/* Sub-view navigation */
.sub-nav {
    display: flex; gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.sub-nav-item {
    padding: 10px 16px;
    border: none; background: none;
    color: var(--text-secondary);
    font-size: 14px; font-weight: 500; font-family: inherit;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.sub-nav-item:hover { color: var(--text); }
.sub-nav-item.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Medication checklist */
.med-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.med-check {
    width: 24px; height: 24px;
    border: 2px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.med-check.checked {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.med-info { flex: 1; }
.med-name { font-size: 14px; font-weight: 600; }
.med-dose { font-size: 12px; color: var(--text-secondary); }

/* Offline indicator */
.offline-bar {
    position: fixed;
    top: var(--topbar-height);
    left: 0; right: 0;
    background: var(--warning);
    color: #000;
    text-align: center;
    padding: 4px;
    font-size: 12px; font-weight: 600;
    z-index: 99;
    display: none;
}

.offline-bar.show { display: block; }

/* Badge */
.badge {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px; font-weight: 600;
}

.badge-success { background: #c8e6c9; color: #2e7d32; }
.badge-warning { background: #fff9c4; color: #f57f17; }
.badge-danger { background: #ffcdd2; color: #c62828; }
.badge-info { background: var(--primary-light); color: var(--primary); }

[data-theme="dark"] .badge-success { background: rgba(46,125,50,0.2); }
[data-theme="dark"] .badge-warning { background: rgba(245,127,23,0.2); }
[data-theme="dark"] .badge-danger { background: rgba(198,40,40,0.2); }

/* Responsive */
@media (max-width: 480px) {
    .view { padding: 12px; }
    .card { padding: 12px; }
    .mood-scale { gap: 2px; }
    .mood-btn { height: 38px; font-size: 13px; }
}

/* Confirm dialog */
.confirm-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
}

.confirm-dialog {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 360px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.confirm-dialog h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.confirm-dialog p { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }
.confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Print */
@media print {
    .topbar, .bottom-nav, .crisis-fab, .toast, .offline-bar { display: none !important; }
    body { padding: 0; }
    .view { max-width: 100%; }
}
