/* EMR Sim Medicine - Modern Clinical UI */
/* Teal/Slate palette with clean medical aesthetics */

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-300: #5eead4;
    --primary-400: #2dd4bf;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;
    --primary-700: #0f766e;
    --primary-800: #115e59;
    --primary-900: #134e4a;
    --primary-950: #042f2e;

    --surface: #f8fafc;
    --surface-raised: #ffffff;
    --border-subtle: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --sidebar-active: rgba(20, 184, 166, 0.15);
    --sidebar-hover: rgba(255, 255, 255, 0.05);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
}

/* ========================================
   Global & Typography
   ======================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Sidebar Navigation
   ======================================== */
.nav-link.active {
    background: var(--sidebar-active);
    color: #ffffff;
    border-left: 3px solid var(--primary-400);
    padding-left: 9px;
}

.nav-link {
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: var(--sidebar-hover);
}

/* ========================================
   Form Elements
   ======================================== */
input:focus, textarea:focus, select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ========================================
   HTMX Loading States
   ======================================== */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}

.htmx-settling {
    opacity: 1;
    transition: opacity 0.2s ease-in;
}

.htmx-swapping {
    opacity: 0.5;
    transition: opacity 0.1s ease-out;
}

/* ========================================
   Status Badges
   ======================================== */
.status-scheduled {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-checked-in {
    background-color: #fef3c7;
    color: #92400e;
}

.status-in-progress {
    background-color: #d1fae5;
    color: #065f46;
}

.status-completed {
    background-color: #f1f5f9;
    color: #374151;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ========================================
   Clinical Values
   ======================================== */
.value-abnormal {
    color: #dc2626;
    font-weight: 600;
}

.value-normal {
    color: #059669;
}

/* ========================================
   Allergy Banner
   ======================================== */
.allergy-banner {
    border-left: 4px solid #dc2626;
}

.allergy-banner-none {
    border-left: 4px solid var(--primary-500);
}

/* ========================================
   Cards & Surfaces
   ======================================== */
.card-modern {
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    border-color: var(--primary-400);
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
    transform: translateY(-0.5px);
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    nav, #sidebar, #mobile-menu-btn, #logout-btn, .assistant-panel {
        display: none !important;
    }

    main {
        padding: 0 !important;
    }
}
