Open raw ↗/* HAD Digital MVP - Professional Medical UI */
:root {
--primary: #0066CC;
--primary-dark: #004C99;
--primary-light: #E6F0FF;
--primary-hover: #0055AA;
--white: #FFFFFF;
--gray-50: #F8F9FA;
--gray-100: #F1F3F5;
--gray-200: #E9ECEF;
--gray-300: #DEE2E6;
--gray-400: #ADB5BD;
--gray-500: #868E96;
--gray-600: #495057;
--gray-700: #343A40;
--gray-800: #212529;
--success: #198754;
--success-bg: #D1E7DD;
--success-border: #BADBCC;
--warning: #E8850D;
--warning-bg: #FFF3CD;
--warning-border: #FFEEBA;
--danger: #DC3545;
--danger-bg: #F8D7DA;
--danger-border: #F5C2C7;
--info: #0DCAF0;
--info-bg: #CFF4FC;
--info-border: #B6EFFB;
--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
--shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
--shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
--shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
--shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
--radius: 8px;
--radius-sm: 4px;
--radius-lg: 12px;
--transition: 150ms ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-family); color: var(--gray-800); background: var(--gray-50); line-height: 1.5; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 600; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
/* LOGIN PAGE */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 1rem; }
.login-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; padding: 2.5rem 2rem; }
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo .logo-icon { width: 64px; height: 64px; background: var(--primary); border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 0.75rem; color: white; font-size: 1.5rem; font-weight: 700; }
.login-logo h1 { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); margin-bottom: 0.25rem; }
.login-logo p { color: var(--gray-500); font-size: 0.875rem; }
.login-form .form-group { margin-bottom: 1.25rem; }
.login-form label { display: block; font-weight: 500; margin-bottom: 0.375rem; color: var(--gray-700); font-size: 0.875rem; }
.login-role-select { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1.5rem; }
.role-option { padding: 0.75rem 0.5rem; border: 2px solid var(--gray-200); border-radius: var(--radius); text-align: center; cursor: pointer; transition: all var(--transition); font-size: 0.8125rem; font-weight: 500; background: var(--white); }
.role-option:hover { border-color: var(--primary); background: var(--primary-light); }
.role-option.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.role-option .role-icon { font-size: 1.25rem; display: block; margin-bottom: 0.25rem; }
.login-footer { text-align: center; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-200); color: var(--gray-400); font-size: 0.75rem; }
/* FORM ELEMENTS */
.form-input { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 1rem; transition: border-color var(--transition), box-shadow var(--transition); background: var(--white); min-height: 44px; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.15); }
.form-input.error { border-color: var(--danger); }
.form-error { color: var(--danger); font-size: 0.75rem; margin-top: 0.25rem; }
.form-select { width: 100%; padding: 0.75rem 2.5rem 0.75rem 1rem; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 1rem; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 1rem center; appearance: none; min-height: 44px; }
.form-textarea { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 1rem; resize: vertical; min-height: 100px; transition: border-color var(--transition); }
.form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.15); }
/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border: none; border-radius: var(--radius); font-weight: 500; font-size: 1rem; cursor: pointer; transition: all var(--transition); min-height: 44px; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #157347; }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #BB2D3B; }
.btn-warning { background: var(--warning); color: var(--white); }
.btn-warning:hover { background: #CF7500; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; min-height: 36px; }
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; flex-shrink: 0; }
.btn:disabled, .btn.disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
/* LAYOUT */
.app-shell { display: flex; flex-direction: column; min-height: 100vh; }
.app-header { background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 0 1rem; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.app-header .header-brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.125rem; color: var(--primary); }
.app-header .header-brand .brand-mark { width: 32px; height: 32px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.875rem; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.header-user { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; border-radius: var(--radius); cursor: pointer; transition: background var(--transition); font-size: 0.875rem; color: var(--gray-700); }
.header-user:hover { background: var(--gray-100); }
.header-user .user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.75rem; }
/* NAV */
.app-nav { background: var(--white); border-bottom: 1px solid var(--gray-200); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.app-nav::-webkit-scrollbar { display: none; }
.app-nav .nav-list { display: flex; list-style: none; min-width: max-content; padding: 0 0.5rem; }
.nav-item .nav-link { display: flex; align-items: center; gap: 0.375rem; padding: 0.75rem 1rem; color: var(--gray-500); font-size: 0.875rem; font-weight: 500; border-bottom: 2px solid transparent; transition: all var(--transition); white-space: nowrap; cursor: pointer; }
.nav-item .nav-link:hover { color: var(--primary); text-decoration: none; }
.nav-item .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); }
.nav-badge { background: var(--danger); color: white; font-size: 0.6875rem; font-weight: 600; padding: 0.125rem 0.375rem; border-radius: 10px; min-width: 18px; text-align: center; }
.app-main { flex: 1; padding: 1.25rem 1rem; max-width: 1200px; width: 100%; margin: 0 auto; }
.page-header { margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); margin-bottom: 0.25rem; }
.page-header p { color: var(--gray-500); font-size: 0.875rem; }
/* CARDS */
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 1rem; font-weight: 600; color: var(--gray-800); }
.card-body { padding: 1.25rem; }
.card-footer { padding: 0.75rem 1.25rem; border-top: 1px solid var(--gray-100); background: var(--gray-50); }
/* SUMMARY GRID */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.summary-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.summary-card .summary-icon { width: 44px; height: 44px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 0.75rem; }
.summary-card .summary-icon.blue { background: var(--primary-light); color: var(--primary); }
.summary-card .summary-icon.green { background: var(--success-bg); color: var(--success); }
.summary-card .summary-icon.orange { background: var(--warning-bg); color: var(--warning); }
.summary-card .summary-icon.red { background: var(--danger-bg); color: var(--danger); }
.summary-card .summary-value { font-size: 1.75rem; font-weight: 700; color: var(--gray-800); line-height: 1; margin-bottom: 0.25rem; }
.summary-card .summary-label { font-size: 0.8125rem; color: var(--gray-500); }
/* BADGES */
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.625rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.badge-routine { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-urgent { background: var(--warning-bg); color: #995C00; border: 1px solid var(--warning-border); }
.badge-emergency { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-info { background: var(--info-bg); color: #055160; border: 1px solid var(--info-border); }
.badge-grade-0 { background: var(--gray-100); color: var(--gray-600); }
.badge-grade-1 { background: #E6F9E6; color: #1A7A1A; }
.badge-grade-2 { background: #FFF8E1; color: #8A6D00; }
.badge-grade-3 { background: #FFF0E0; color: #B35C00; }
.badge-grade-4 { background: #FFE0E0; color: #CC0000; }
/* ALERT LIST */
.alert-list { display: flex; flex-direction: column; gap: 0.5rem; }
.alert-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--white); transition: box-shadow var(--transition); cursor: pointer; }
.alert-item:hover { box-shadow: var(--shadow); }
.alert-item .alert-indicator { width: 4px; min-height: 40px; border-radius: 2px; flex-shrink: 0; align-self: stretch; }
.alert-item .alert-indicator.routine { background: var(--success); }
.alert-item .alert-indicator.urgent { background: var(--warning); }
.alert-item .alert-indicator.emergency { background: var(--danger); }
.alert-item .alert-content { flex: 1; min-width: 0; }
.alert-item .alert-title { font-weight: 600; font-size: 0.875rem; margin-bottom: 0.25rem; }
.alert-item .alert-meta { font-size: 0.75rem; color: var(--gray-500); }
.alert-item .alert-actions { display: flex; gap: 0.375rem; flex-shrink: 0; }
/* WIZARD */
.wizard-progress { display: flex; align-items: center; gap: 0.25rem; margin-bottom: 2rem; overflow-x: auto; padding-bottom: 0.5rem; }
.wizard-step { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--gray-400); white-space: nowrap; }
.wizard-step .step-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--gray-300); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; flex-shrink: 0; background: var(--white); }
.wizard-step.active { color: var(--primary); font-weight: 600; }
.wizard-step.active .step-dot { border-color: var(--primary); background: var(--primary); color: white; }
.wizard-step.completed { color: var(--success); }
.wizard-step.completed .step-dot { border-color: var(--success); background: var(--success); color: white; }
.wizard-step-line { flex: 1; height: 2px; background: var(--gray-200); min-width: 20px; }
.wizard-content { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.wizard-content h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.wizard-content .domain-description { color: var(--gray-500); font-size: 0.875rem; margin-bottom: 1.5rem; }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-100); }
/* SYMPTOM QUESTIONS */
.symptom-question { padding: 1rem 0; border-bottom: 1px solid var(--gray-100); }
.symptom-question:last-child { border-bottom: none; }
.symptom-label { font-weight: 500; font-size: 0.9375rem; margin-bottom: 0.75rem; color: var(--gray-700); }
.severity-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.severity-btn { padding: 0.625rem 0.5rem; border: 2px solid var(--gray-200); border-radius: var(--radius); background: var(--white); cursor: pointer; text-align: center; transition: all var(--transition); font-size: 0.8125rem; font-weight: 500; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.125rem; }
.severity-btn:hover { border-color: var(--primary); }
.severity-btn.active-none { border-color: var(--success); background: #E6F9E6; color: var(--success); }
.severity-btn.active-mild { border-color: #4CAF50; background: #E8F5E9; color: #2E7D32; }
.severity-btn.active-moderate { border-color: var(--warning); background: var(--warning-bg); color: #995C00; }
.severity-btn.active-severe { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.severity-emoji { font-size: 1.125rem; }
/* TIMELINE */
.timeline-filters { display: flex; gap: 0.5rem; margin-bottom: 1rem; overflow-x: auto; padding-bottom: 0.25rem; }
.filter-chip { padding: 0.375rem 0.875rem; border: 1px solid var(--gray-300); border-radius: 999px; font-size: 0.8125rem; cursor: pointer; transition: all var(--transition); white-space: nowrap; background: var(--white); color: var(--gray-600); }
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); color: white; border-color: var(--primary); }
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 0.5rem; top: 0; bottom: 0; width: 2px; background: var(--gray-200); }
.timeline-event { position: relative; margin-bottom: 1rem; padding: 1rem; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); cursor: pointer; transition: box-shadow var(--transition); }
.timeline-event:hover { box-shadow: var(--shadow); }
.timeline-event::before { content: ''; position: absolute; left: -1.625rem; top: 1.25rem; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--gray-300); background: var(--white); }
.timeline-event.type-report::before { border-color: var(--primary); background: var(--primary-light); }
.timeline-event.type-alert::before { border-color: var(--danger); background: var(--danger-bg); }
.timeline-event.type-observation::before { border-color: var(--success); background: var(--success-bg); }
.timeline-event.type-message::before { border-color: var(--info); background: var(--info-bg); }
.timeline-event.type-grade::before { border-color: var(--warning); background: var(--warning-bg); }
.timeline-event.type-treatment::before { border-color: #9C27B0; background: #F3E5F5; }
.timeline-event .event-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.375rem; }
.timeline-event .event-type { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.025em; color: var(--gray-500); }
.timeline-event .event-time { font-size: 0.75rem; color: var(--gray-400); }
.timeline-event .event-title { font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.25rem; }
.timeline-event .event-detail { font-size: 0.8125rem; color: var(--gray-600); }
/* TREATMENT PLAN */
.treatment-header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 1.5rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.treatment-header h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.treatment-header .regimen-name { opacity: 0.9; font-size: 0.9375rem; }
.treatment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; padding: 1.25rem; }
.treatment-info-card { padding: 1rem; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--gray-50); }
.treatment-info-card .info-label { font-size: 0.75rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.375rem; }
.treatment-info-card .info-value { font-size: 1.125rem; font-weight: 600; color: var(--gray-800); }
.medication-list { list-style: none; }
.medication-item { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--gray-100); }
.medication-item:last-child { border-bottom: none; }
.medication-item .med-name { font-weight: 500; }
.medication-item .med-dose { color: var(--gray-500); font-size: 0.875rem; }
/* MESSAGES */
.message-thread { display: flex; flex-direction: column; gap: 0.75rem; max-height: 400px; overflow-y: auto; padding: 1rem; }
.message-bubble { max-width: 80%; padding: 0.75rem 1rem; border-radius: var(--radius-lg); font-size: 0.875rem; line-height: 1.5; }
.message-bubble.sent { align-self: flex-end; background: var(--primary); color: white; border-bottom-right-radius: var(--radius-sm); }
.message-bubble.received { align-self: flex-start; background: var(--gray-100); color: var(--gray-800); border-bottom-left-radius: var(--radius-sm); }
.message-bubble .msg-meta { font-size: 0.6875rem; margin-top: 0.375rem; opacity: 0.7; }
.message-input-area { display: flex; gap: 0.5rem; padding: 1rem; border-top: 1px solid var(--gray-200); }
.message-input-area input { flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--gray-300); border-radius: 999px; font-size: 0.9375rem; }
.message-input-area input:focus { outline: none; border-color: var(--primary); }
/* PATIENT DASHBOARD */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.quick-action-btn { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.25rem 0.75rem; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: var(--white); cursor: pointer; transition: all var(--transition); text-align: center; font-size: 0.8125rem; font-weight: 500; color: var(--gray-700); }
.quick-action-btn:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.quick-action-btn .action-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.quick-action-btn.primary-action { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.quick-action-btn.primary-action .action-icon { background: var(--primary); color: white; }
.recent-list { list-style: none; }
.recent-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 0; border-bottom: 1px solid var(--gray-100); cursor: pointer; transition: background var(--transition); }
.recent-item:hover { background: var(--gray-50); }
.recent-item:last-child { border-bottom: none; }
.recent-item .item-icon { width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 0.875rem; flex-shrink: 0; }
.recent-item .item-content { flex: 1; min-width: 0; }
.recent-item .item-title { font-weight: 500; font-size: 0.875rem; }
.recent-item .item-meta { font-size: 0.75rem; color: var(--gray-500); }
/* EXPORT */
.export-preview { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; font-size: 0.875rem; max-height: 500px; overflow-y: auto; line-height: 1.75; }
.export-preview h4 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--gray-800); }
.export-preview table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; font-size: 0.8125rem; }
.export-preview th, .export-preview td { padding: 0.5rem 0.75rem; border: 1px solid var(--gray-200); text-align: left; }
.export-preview th { background: var(--gray-50); font-weight: 600; }
/* ADMIN TABLE */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--gray-100); font-size: 0.875rem; }
.data-table th { font-weight: 600; color: var(--gray-600); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--gray-50); }
.data-table tbody tr:hover { background: var(--gray-50); }
/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; animation: fadeIn 150ms ease; }
.modal { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; animation: slideUp 200ms ease; }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1.125rem; font-weight: 600; }
.modal-close { width: 36px; height: 36px; border: none; background: none; font-size: 1.25rem; cursor: pointer; border-radius: var(--radius); color: var(--gray-500); display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--gray-100); }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 0.5rem; }
/* TOAST */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 0.875rem 1.25rem; display: flex; align-items: center; gap: 0.75rem; min-width: 280px; max-width: 400px; animation: slideInRight 200ms ease; pointer-events: auto; font-size: 0.875rem; }
.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-warning { border-left: 4px solid var(--warning); }
.toast.toast-info { border-left: 4px solid var(--primary); }
.toast-icon { font-size: 1.125rem; flex-shrink: 0; }
.toast-msg { flex: 1; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 1rem; padding: 0.25rem; }
/* STATES */
.loading-spinner { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; color: var(--gray-400); }
.spinner { width: 40px; height: 40px; border: 3px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 1rem; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1.5rem; text-align: center; color: var(--gray-400); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.5; }
.empty-state h4 { font-size: 1rem; color: var(--gray-600); margin-bottom: 0.25rem; }
.empty-state p { font-size: 0.875rem; }
.error-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1.5rem; text-align: center; }
.error-state .error-icon { font-size: 2.5rem; margin-bottom: 0.75rem; color: var(--danger); }
.error-state h4 { font-size: 1rem; color: var(--gray-700); margin-bottom: 0.5rem; }
/* VITALS */
.vitals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
.vital-card { padding: 0.875rem; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--gray-50); text-align: center; }
.vital-card .vital-label { font-size: 0.6875rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; }
.vital-card .vital-value { font-size: 1.375rem; font-weight: 700; color: var(--gray-800); margin: 0.25rem 0; }
.vital-card .vital-unit { font-size: 0.75rem; color: var(--gray-400); }
.vital-card .vital-status { font-size: 0.6875rem; margin-top: 0.25rem; }
/* DATE RANGE */
.date-range { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.date-range input[type="date"] { padding: 0.625rem 0.875rem; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 0.875rem; min-height: 44px; }
/* RESULT CARD */
.result-card { text-align: center; padding: 2rem; }
.result-grade { width: 80px; height: 80px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
.result-grade.grade-0 { background: var(--gray-100); color: var(--gray-600); }
.result-grade.grade-1 { background: #E6F9E6; color: #1A7A1A; }
.result-grade.grade-2 { background: #FFF8E1; color: #8A6D00; }
.result-grade.grade-3 { background: #FFF0E0; color: #B35C00; }
.result-grade.grade-4 { background: #FFE0E0; color: #CC0000; }
.result-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.result-description { color: var(--gray-600); max-width: 480px; margin: 0 auto; }
/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
/* RESPONSIVE */
@media (max-width: 768px) {
.app-main { padding: 1rem 0.75rem; }
.summary-grid { grid-template-columns: repeat(2, 1fr); }
.severity-options { grid-template-columns: repeat(2, 1fr); }
.treatment-grid { grid-template-columns: 1fr; }
.date-range { flex-direction: column; align-items: stretch; }
.modal { max-width: 100%; margin: 0.5rem; }
.alert-item { flex-direction: column; }
.alert-item .alert-actions { align-self: flex-end; }
.quick-actions { grid-template-columns: repeat(2, 1fr); }
.vitals-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
.summary-grid { grid-template-columns: 1fr; }
.login-role-select { grid-template-columns: 1fr; }
.quick-actions { grid-template-columns: 1fr; }
.vitals-grid { grid-template-columns: 1fr; }
}
@media (min-width: 1024px) {
.app-main { padding: 2rem; }
.summary-grid { grid-template-columns: repeat(4, 1fr); }
}