/* Stitch by Google - Premium UI System for MediFusion AI */
:root {
    --google-blue: #1a73e8;
    --google-red: #ea4335;
    --google-yellow: #fbbc04;
    --google-green: #34a853;
    
    --stitch-primary: #1a73e8;
    --stitch-accent: #8b5cf6;
    --stitch-surface: #ffffff;
    --stitch-bg: #f8f9fa;
    --stitch-text: #202124;
    --stitch-text-secondary: #5f6368;
    --stitch-border: #dadce0;
    
    /* Deep Dark Mode Tokens */
    --stitch-dark-bg: #0f172a;
    --stitch-dark-surface: rgba(30, 41, 59, 0.7);
    --stitch-dark-border: rgba(255, 255, 255, 0.1);
    --stitch-glass: blur(12px);
    
    /* Animation Tokens */
    --stitch-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --stitch-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --stitch-shadow-hover: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
    --stitch-radius: 24px;
    --stitch-card-radius: 20px;
    --stitch-button-radius: 100px;
    
    /* Layout Tokens */
    --sidebar-width: 280px;
    --topbar-height: 72px;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
    --stitch-bg: var(--stitch-dark-bg);
    --stitch-surface: var(--stitch-dark-surface);
    --stitch-text: #f1f5f9;
    --stitch-text-secondary: #94a3b8;
    --stitch-border: var(--stitch-dark-border);
    --stitch-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* Premium Animations */
@keyframes stitch-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes stitch-slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes stitch-scale-up { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.animate-fade { animation: stitch-fade-in 0.5s ease-out forwards; }
.animate-slide-up { animation: stitch-slide-up 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.animate-scale { animation: stitch-scale-up 0.4s ease-out forwards; }

/* Scrollbar Styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 10px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }
::-webkit-scrollbar-thumb:hover { background: var(--stitch-primary); }

/* Base Styles */
body.stitch-theme {
    background-color: var(--stitch-bg);
    color: var(--stitch-text);
    font-family: 'Google Sans', 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    transition: var(--stitch-transition);
}

/* Authentication Layouts */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 2rem;
}

.auth-card-stitch {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: var(--stitch-card-radius);
    padding: 2.5rem;
    text-align: center;
}

.auth-logo {
    width: 48px;
    height: 48px;
    background: var(--stitch-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

/* Premium Navigation Components */
.sidebar-premium {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--stitch-surface);
    border-right: 1px solid var(--stitch-border);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.nav-group-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--stitch-text-secondary);
    margin: 1.5rem 0 0.75rem 1rem;
}

.nav-item-premium {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--stitch-button-radius);
    color: var(--stitch-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 4px;
}

.nav-item-premium i {
    width: 24px;
    font-size: 1.25rem;
    text-align: center;
}

.nav-item-premium:hover {
    background: rgba(26, 115, 232, 0.08);
    color: var(--stitch-primary);
}

.nav-item-premium.active {
    background: #e8f0fe;
    color: var(--stitch-primary);
    font-weight: 600;
}

/* Dashboard Content Area */
.main-content-stitch {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: calc(100vh - var(--topbar-height));
    background: var(--stitch-bg);
}

.top-bar-stitch {
    height: var(--topbar-height);
    margin-left: var(--sidebar-width);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    background: var(--stitch-surface);
    border-bottom: 1px solid var(--stitch-border);
}

/* Card Variants */
.premium-card {
    background: var(--stitch-surface);
    border: 1px solid var(--stitch-border);
    border-radius: var(--stitch-card-radius);
    padding: 1.5rem;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
    box-shadow: 0 4px 12px rgba(60,64,67,0.1);
}

.stat-card-stitch {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--stitch-text);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--stitch-text-secondary);
    font-weight: 500;
}
