/* 🌟 ENT Clinic Management System - STUNNING DARK THEME 🌟 */
/* Revolutionary Design by Advanced AI */

/* Reset & Base */
* {
    font-family: 'Cairo', sans-serif;
    box-sizing: border-box;
}

/* Custom CSS Variables - Revolutionary Color System */
:root {
    /* Core Backgrounds - Deep Cosmic Theme */
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f23;
    --bg-tertiary: #161633;
    --bg-glass: rgba(15, 15, 35, 0.9);
    --bg-overlay: rgba(10, 10, 15, 0.95);
    
    /* Premium Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #f8fafc;
    --text-tertiary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    /* Stunning Accent Colors */
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --accent-tertiary: #f59e0b;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #3b82f6;
    
    /* Advanced Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-tertiary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --gradient-danger: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    --gradient-cosmic: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    --gradient-aurora: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    
    /* Premium Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.25);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.4);
    --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);
    --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.3);
    --shadow-glow-gold: 0 0 20px rgba(245, 158, 11, 0.3);
    
    /* Animation Timings - LIGHT & SNAPPY */
    --transition-fast: 0.02s ease-out;
    --transition-normal: 0.05s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.08s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fix number input width */
input[type="number"] {
    min-width: 100px;
    width: 100%;
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

/* Ensure hidden class always works - CRITICAL */
.hidden {
    display: none !important;
}

/* Fix lg:hidden and lg:flex classes */
@media (min-width: 1024px) {
    .lg\:hidden {
        display: none !important;
    }
    .lg\:flex {
        display: flex !important;
    }
}

@media (max-width: 1023px) {
    .hidden.lg\:flex {
        display: none !important;
    }
}

/* 🌟 REVOLUTIONARY SCROLLBAR DESIGN 🌟 */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary));
    box-shadow: var(--shadow-glow-purple);
}

::-webkit-scrollbar-corner {
    background: var(--bg-primary);
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 🌟 PREMIUM GLASS EFFECT REINVENTED 🌟 */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(6px) saturate(100%);
    -webkit-backdrop-filter: blur(6px) saturate(100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 🌟 ADVANCED GLOW EFFECTS 🌟 */
.glow {
    box-shadow: var(--shadow-glow-purple);
}

.glow-cyan {
    box-shadow: var(--shadow-glow-cyan);
}

.glow-gold {
    box-shadow: var(--shadow-glow-gold);
}

.glow-success {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.glow-warning {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.glow-danger {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* 🌟 SPECTACULAR ANIMATIONS 🌟 */
.pulse-dot {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 5px rgba(34, 197, 94, 0.5);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
        box-shadow: 0 0 15px rgba(34, 197, 94, 0.8);
    }
}

.slide-in-left {
    animation: slideInLeftSpectacular 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInLeftSpectacular {
    0% {
        transform: translateX(-100%) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRightSpectacular 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInRightSpectacular {
    0% {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.fade-in {
    animation: fadeInSpectacular 0.2s ease-out;
}

@keyframes fadeInSpectacular {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Floating Animation */
.float {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Pulse Animation for Status */
.pulse-ring {
    animation: pulseRing 1s infinite;
}

@keyframes pulseRing {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 🌟 REVOLUTIONARY LOADER 🌟 */
.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(139, 92, 246, 0.3);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spinSpectacular 0.8s linear infinite;
    position: relative;
}

@keyframes spinSpectacular {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 🌟 ADVANCED TAB SYSTEM 🌟 */
.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    white-space: nowrap;
    transition: all var(--transition-normal);
    background: var(--bg-glass);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
}

.tab-btn.active {
    background: var(--gradient-primary);
    border: 1px solid var(--accent-primary);
    box-shadow: var(--shadow-xl), var(--shadow-glow-purple);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--accent-tertiary);
    border-radius: 2px;
    animation: slideInBottom 0.3s ease-out;
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.tab-btn-mobile {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    border-radius: 25px;
    white-space: nowrap;
    transition: all var(--transition-normal);
    background: var(--bg-glass);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
}

.tab-btn-mobile:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-secondary);
    transform: translateY(-1px);
}

.tab-btn-mobile.active {
    background: var(--gradient-primary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
}

/* 🌟 QUICK ACTION BUTTONS - PREMIUM DESIGN 🌟 */
.quick-action-btn {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    background: var(--bg-glass);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--text-tertiary);
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.quick-action-btn:hover::before {
    opacity: 1;
}

.quick-action-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-secondary);
    box-shadow: var(--shadow-xl), var(--shadow-glow-purple);
}

.quick-action-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* 🌟 ADVANCED FILTER CONTROLS 🌟 */
.filter-select {
    background: var(--bg-glass);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 1rem;
    padding: 0.75rem 2.5rem 0.75rem 1.25rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.875rem;
    color: var(--text-tertiary);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a855f7'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    backdrop-filter: blur(4px);
    }

.filter-select:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-glow-purple);
    transform: translateY(-1px);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2), var(--shadow-glow-purple);
}

/* 🌟 SPECTACULAR QUICK FILTERS BAR 🌟 */
.quick-filters-bar {
    background: var(--gradient-cosmic);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 1.5rem;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.quick-filters-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
}

.filter-chip {
    padding: 0.625rem 1.25rem;
    border-radius: 50px;
    background: var(--bg-glass);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--text-tertiary);
    font-size: 0.75rem;
    white-space: nowrap;
    transition: all var(--transition-normal);
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.filter-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-aurora);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.filter-chip:hover::before {
    opacity: 0.1;
}

.filter-chip:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
}

.filter-chip.active {
    background: var(--gradient-primary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-xl), var(--shadow-glow-purple);
    transform: translateY(-1px);
}

.filter-chip.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-tertiary);
    border-radius: 50px;
    transform: translate(-50%, -50%);
    animation: pulseRing 2s infinite;
}

/* 🌟 REVOLUTIONARY PATIENT CARDS 🌟 */
.patient-card {
    background: var(--bg-glass);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.08s ease-out;
    cursor: pointer;
    color: var(--text-secondary);
    position: relative;
    box-shadow: var(--shadow-lg);
}

.patient-card:hover {
    border-color: var(--accent-primary);
    background: var(--bg-overlay);
    box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
}

/* Card Content Styling */
.patient-card h3 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.patient-card p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.patient-card .text-muted {
    color: var(--text-muted);
}

/* 🌟 PREMIUM STATUS PILLS 🌟 */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-preop {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.3));
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.status-postop {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(96, 165, 250, 0.3));
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.status-inpatient {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.3));
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.status-outpatient {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2), rgba(156, 163, 175, 0.3));
    color: #9ca3af;
    border-color: rgba(107, 114, 128, 0.4);
}

.status-discharged {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.2), rgba(209, 213, 219, 0.3));
    color: #d1d5db;
    border-color: rgba(156, 163, 175, 0.4);
}

/* 🌟 ADVANCED CARD ACTIONS 🌟 */
.card-action-btn {
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: all var(--transition-normal);
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
}

.card-action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.card-action-btn:hover::before {
    opacity: 1;
}

.card-action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 🌟 SPECTACULAR MODAL SYSTEM 🌟 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
    }

    .modal-overlay:not(.hidden) {
    display: flex;
    }

    .modal-overlay.hidden {
    display: none !important;
    }

    .modal-content {
    background: var(--bg-glass);
    backdrop-filter: blur(10px) saturate(100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 2rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    animation: modalSlideIn 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: var(--shadow-2xl), var(--shadow-glow-purple);
    color: var(--text-secondary);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-aurora);
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    position: sticky;
    top: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    color: var(--text-primary);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 🌟 ADVANCED FORM ELEMENTS 🌟 */
.form-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    background: var(--bg-glass);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    transition: all var(--transition-normal);
    font-size: 0.875rem;
    color: var(--text-secondary);
    backdrop-filter: blur(4px);
    }

    .form-input::placeholder {
    color: var(--text-dim);
    opacity: 0.8;
    }

    .form-input:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-glow-purple);
    transform: translateY(-1px);
    }

    .form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2), var(--shadow-glow-purple);
    background: var(--bg-overlay);
    transform: translateY(-1px);
    }

/* 🌟 QUICK ACTION CARDS - PREMIUM DESIGN 🌟 */
.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--bg-glass);
    border-radius: 1.5rem;
    transition: all var(--transition-slow);
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(6px);
    }

.quick-action-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.quick-action-card:hover::before {
    opacity: 1;
}

.quick-action-card:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-secondary);
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-xl), var(--shadow-glow-purple);
}

/* 🌟 BOTTOM NAVIGATION - REVOLUTIONARY 🌟 */
.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    color: var(--text-muted);
    font-size: 0.625rem;
    transition: all var(--transition-normal);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.bottom-nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.bottom-nav-btn:hover::before {
    opacity: 1;
}

.bottom-nav-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.bottom-nav-btn i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* 🌟 REVOLUTIONARY BUTTON SYSTEM 🌟 */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 1px solid;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    outline: none;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn-primary {
    background: var(--gradient-primary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--shadow-glow-purple);
}

.btn-secondary {
    background: var(--bg-glass);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--text-tertiary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--gradient-success);
    border-color: var(--accent-success);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: var(--gradient-warning);
    border-color: var(--accent-warning);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.btn-danger {
    background: var(--gradient-danger);
    border-color: var(--accent-danger);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* 🌟 TABLE STYLING - PREMIUM 🌟 */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table th {
    background: var(--bg-glass);
    color: var(--text-tertiary);
    font-weight: 700;
    padding: 1rem;
    text-align: right;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

table tr {
    transition: all var(--transition-normal);
}

table tr:hover {
    background: rgba(139, 92, 246, 0.05);
    transform: scale(1.01);
}

/* 🌟 DATE INPUTS - STYLISH 🌟 */
.relative-date-input {
    position: relative;
}

.relative-date-input .form-input {
    background: var(--bg-glass);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.75rem;
    padding: 0.75rem;
    transition: all var(--transition-normal);
}

/* 🌟 COSMIC BACKGROUND EFFECTS 🌟 */
body {
    background: var(--gradient-cosmic);
    min-height: 100vh;
    color: var(--text-secondary);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 🌟 AURORA BORDER EFFECTS 🌟 */
.aurora-border {
    position: relative;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary), var(--accent-primary));
    background-size: 400% 400%;
    animation: auroraShift 4s ease-in-out infinite;
}

.aurora-border::before {
    content: '';
    position: absolute;
    inset: 1px;
    background: var(--bg-primary);
    border-radius: calc(1rem - 1px);
    z-index: 1;
}

.aurora-border > * {
    position: relative;
    z-index: 2;
}

@keyframes auroraShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 🌟 TEXT GRADIENT EFFECTS 🌟 */
.text-gradient {
    background: var(--gradient-aurora);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-success {
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 🌟 LOADING STATES 🌟 */
.loading-shimmer {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 🌟 UTILITY CLASSES 🌟 */
.backdrop-blur {
     backdrop-filter: blur(6px);
 }

.border-gradient {
    border: 1px solid;
    border-image: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary)) 1;
}

.hover-lift {
    transition: transform var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* 🌟 RESPONSIVE DESIGN ENHANCEMENTS 🌟 */
@media (max-width: 768px) {
    .modal-content {
        margin: 0.5rem;
        border-radius: 1.5rem;
        max-height: calc(100vh - 1rem);
    }
    
    .patient-card {
        padding: 1rem;
        border-radius: 1rem;
    }
    
    .quick-filters-bar {
        padding: 0.75rem 1rem;
        border-radius: 1rem;
    }
    
    .filter-chip {
        padding: 0.5rem 1rem;
        font-size: 0.6875rem;
    }
}

/* 🌟 DARK THEME ENHANCEMENTS 🌟 */
.dark-theme {
    color-scheme: dark;
}

.dark-theme ::selection {
    background: rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
}

.dark-theme ::-moz-selection {
    background: rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
}

/* 🌟 ACCESSIBILITY ENHANCEMENTS 🌟 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for accessibility */
.btn:focus,
.form-input:focus,
.tab-btn:focus,
.filter-select:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --bg-glass: rgba(0, 0, 0, 0.95);
        --text-secondary: #ffffff;
        --accent-primary: #ffffff;
    }
}

/* 🔄 OFFLINE SYNC UI ANIMATIONS 🔄 */
@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-slide-in-right {
    animation: slide-in-right 0.3s ease-out;
}

#offline-sync-status {
    transition: all 0.3s ease;
}

#offline-sync-status:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

#sync-icon.fa-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.pulse-dot {
    animation: pulse-subtle 2s ease-in-out infinite;
}