/* VHabLife - Medical Consultation Platform
   Theme: White + Medical Blue
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    /* Medical Blue Palette */
    --primary-50: #e8f4fc;
    --primary-100: #c5e4f7;
    --primary-200: #9ed2f1;
    --primary-300: #6dbdea;
    --primary-400: #3fa7e3;
    --primary-500: #1a8fd1;
    --primary-600: #0d73b3;
    --primary-700: #0a5a8e;
    --primary-800: #084469;
    --primary-900: #052d45;
    
    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Semantic Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --error: #ef4444;
    --error-light: #fee2e2;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--white);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--gray-900);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-100);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-600);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-600);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: var(--white);
    box-shadow: 0 2px 8px rgba(26, 143, 209, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 4px 12px rgba(26, 143, 209, 0.45);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-600);
    border: 2px solid var(--primary-200);
}

.btn-secondary:hover {
    background: var(--primary-50);
    border-color: var(--primary-400);
}

.btn-outline {
    background: transparent;
    color: var(--gray-600);
    border: 2px solid var(--gray-200);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #0d9668;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius-full);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    padding: 8rem 1.5rem 5rem;
    background: linear-gradient(180deg, var(--primary-50) 0%, var(--white) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, var(--primary-100) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-content h1 span {
    color: var(--primary-600);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 520px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--gray-100);
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.doctor-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.doctor-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.doctor-info p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-700);
    font-size: 0.9375rem;
}

.feature-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-50);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    flex-shrink: 0;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
    padding: 5rem 1.5rem;
    background: var(--white);
}

.section-container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--gray-500);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.feature-card:hover {
    background: var(--white);
    border-color: var(--primary-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

/* ============================================
   AUTH PAGES
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
}

.auth-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: pulse-slow 15s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.auth-branding {
    position: relative;
    z-index: 1;
    text-align: center;
}

.auth-branding .logo {
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.auth-branding .logo-icon {
    background: rgba(255,255,255,0.2);
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
}

.auth-branding h2 {
    color: var(--white);
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.auth-branding p {
    color: rgba(255,255,255,0.8);
    font-size: 1.0625rem;
    max-width: 320px;
}

.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--white);
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.auth-form-container h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-form-container > p {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: all var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.auth-footer a {
    color: var(--primary-600);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard {
    min-height: 100vh;
    background: var(--gray-50);
}

.dashboard-nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-nav .nav-container {
    max-width: 1440px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
}

.user-info {
    text-align: right;
}

.user-info .name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--gray-800);
}

.user-info .role {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.dashboard-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--gray-500);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-50);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.stat-card p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ============================================
   CARDS & PANELS
   ============================================ */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 1.125rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

/* ============================================
   TABLES
   ============================================ */

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem 1.25rem;
    text-align: left;
}

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-200);
}

.data-table td {
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9375rem;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
}

.status-badge.pending {
    background: var(--warning-light);
    color: #b45309;
}

.status-badge.reviewed {
    background: var(--success-light);
    color: #047857;
}

.status-badge.new {
    background: var(--primary-100);
    color: var(--primary-700);
}

/* ============================================
   CONSULTATION FORM
   ============================================ */

.consultation-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1rem;
    color: var(--gray-700);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ============================================
   PATIENT LIST (Admin)
   ============================================ */

.patient-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    transition: all var(--transition);
}

.patient-card:hover {
    background: var(--white);
    box-shadow: var(--shadow);
}

.patient-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    flex-shrink: 0;
}

.patient-details {
    flex: 1;
}

.patient-details h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.patient-details p {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.patient-actions {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   CONSULTATION DETAIL 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;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    margin-bottom: 1rem;
}

.detail-label {
    width: 140px;
    font-weight: 500;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.detail-value {
    flex: 1;
    color: var(--gray-800);
}

.comment-box {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}

.comment-box h4 {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--gray-400);
    font-size: 2rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
}

.alert-error {
    background: var(--error-light);
    color: #991b1b;
}

.alert-info {
    background: var(--primary-100);
    color: var(--primary-800);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 3rem 1.5rem 1.5rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-700);
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand p {
    max-width: 280px;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    color: var(--white);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column a {
    font-size: 0.9375rem;
    transition: color var(--transition);
}

.footer-column a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--gray-100);
    color: var(--primary-600);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: var(--white);
    z-index: 1000;
    transition: right var(--transition-slow);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
}

.mobile-nav-close:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.mobile-nav-links {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--gray-700);
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: var(--primary-50);
    color: var(--primary-600);
}

.mobile-nav-links a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.mobile-nav-footer {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.875rem;
    }
    
    .dashboard-content {
        padding: 1.5rem 1rem;
    }
}

/* Mobile Large (768px and below) */
@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-nav-overlay {
        display: block;
    }
    
    /* Hide desktop nav */
    .nav-links {
        display: none;
    }
    
    .nav-actions {
        display: none;
    }
    
    /* Navbar adjustments */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 6rem 1rem 3rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-card {
        padding: 1.5rem;
    }
    
    .doctor-avatar {
        width: 52px;
        height: 52px;
        font-size: 1.25rem;
    }
    
    .feature-item {
        font-size: 0.875rem;
    }
    
    .feature-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    /* Features Section */
    .features {
        padding: 3rem 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .feature-card h3 {
        font-size: 1.125rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    /* Auth Pages */
    .auth-page {
        flex-direction: column;
    }
    
    .auth-left {
        padding: 2rem 1.5rem;
        min-height: auto;
    }
    
    .auth-branding .logo {
        font-size: 1.5rem;
    }
    
    .auth-branding h2 {
        font-size: 1.375rem;
    }
    
    .auth-branding p {
        font-size: 0.9375rem;
    }
    
    .auth-right {
        padding: 2rem 1.25rem;
    }
    
    .auth-form-container h1 {
        font-size: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Dashboard */
    .dashboard-nav {
        padding: 0.5rem 0;
    }
    
    .user-menu {
        gap: 0.5rem;
    }
    
    .user-info {
        display: none;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.375rem;
    }
    
    .dashboard-header p {
        font-size: 0.875rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .stat-card p {
        font-size: 0.75rem;
    }
    
    /* Cards */
    .card-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .card-header h2 {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Tables - horizontal scroll */
    .table-container {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem;
        font-size: 0.8125rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .btn i {
        font-size: 0.875rem;
    }
    
    /* Modals */
    .modal {
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
        margin: 1rem;
        border-radius: var(--radius-lg);
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.125rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 180px);
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    /* Patient Cards */
    .patient-card {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .patient-avatar {
        width: 42px;
        height: 42px;
        font-size: 0.9375rem;
    }
    
    .patient-details {
        flex: 1;
        min-width: calc(100% - 60px);
    }
    
    .patient-details h4 {
        font-size: 0.875rem;
    }
    
    .patient-details p {
        font-size: 0.75rem;
    }
    
    .patient-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-brand .logo {
        justify-content: center;
    }
    
    .footer-brand p {
        text-align: center;
        max-width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Consultation Form */
    .consultation-form-container {
        margin: 0;
    }
    
    .form-section h3 {
        font-size: 0.9375rem;
    }
    
    /* Alerts */
    .alert {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Detail rows */
    .detail-row {
        flex-direction: column;
        gap: 0.25rem;
        margin-bottom: 0.875rem;
    }
    
    .detail-label {
        width: 100%;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    
    .detail-value {
        font-size: 0.9375rem;
    }
}

/* Mobile Small (480px and below) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }
    
    .stat-card-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .stat-card h3 {
        margin-bottom: 0;
    }
    
    .btn-icon {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .modal {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }
    
    /* Full width buttons on very small screens */
    .card-body .btn {
        width: 100%;
        justify-content: center;
    }
    
    .card-body > div[style*="flex"] {
        flex-direction: column;
    }
    
    /* Tab buttons scroll */
    .card-header > div[style*="flex"] {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .card-header .btn {
        flex: 1;
        min-width: 45%;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
    }
    
    .btn-sm {
        min-height: 38px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .nav-links a {
        padding: 0.75rem 0;
    }
    
    .data-table td,
    .data-table th {
        padding: 1rem 0.75rem;
    }
    
    /* Remove hover effects that don't work well on touch */
    .feature-card:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
    
    /* Add active states instead */
    .btn:active {
        transform: scale(0.98);
    }
    
    .feature-card:active {
        transform: scale(0.99);
    }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 5rem 1rem 2rem;
    }
    
    .auth-page {
        flex-direction: row;
    }
    
    .auth-left {
        flex: 0.4;
    }
    
    .auth-right {
        flex: 0.6;
        overflow-y: auto;
    }
    
    .modal {
        max-height: 90vh;
    }
    
    .modal-body {
        max-height: 50vh;
    }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center { text-align: center; }
.text-primary { color: var(--primary-600); }
.text-muted { color: var(--gray-500); }
.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; }
.hidden { display: none !important; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }

