/* ==========================================
   Agenda ACISGA - Estilos Globais e Variáveis
   ========================================== */

:root {
    /* Paleta Principal — Light */
    --bg: #f3f5f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f5f9;
    --text: #0f1a2e;
    --text-secondary: #55657e;
    --text-muted: #8896ae;
    --border: #e2e8f0;
    --border-light: #edf2f7;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 32px 64px rgba(0, 0, 0, 0.13);
    --radius-xs: 8px;
    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 30px;
    --radius-xl: 40px;
    --radius-full: 9999px;
    --font-display: 'Outfit', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Cores de Acento */
    --accent: #2563eb;
    --accent-light: #3b82f6;
    --accent-dark: #1d4ed8;
    --accent-bg: #eff6ff;
    --accent-bg-hover: #dbeafe;
    
    /* Evento Geral */
    --event: #10b981;
    --event-bg: #ecfdf5;
    --event-border: #6ee7b7;
    --event-text: #065f46;
    --event-glow: rgba(16, 185, 129, 0.2);
    
    /* Evento ACISGA */
    --acisga: #3b82f6;
    --acisga-bg: #eff6ff;
    --acisga-border: #93c5fd;
    --acisga-text: #1e40af;
    --acisga-glow: rgba(59, 130, 246, 0.2);
    
    /* Estados adicionais */
    --today-ring: #f59e0b;
    --today-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-text: #991b1b;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-text: #92400e;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-text: #065f46;
    
    --gradient-hero: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #6366f1 100%);
    --gradient-card: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

[data-theme="dark"] {
    --bg: #0b1120;
    --surface: #131c31;
    --surface-2: #182338;
    --surface-3: #1e2a45;
    --text: #e8ecf4;
    --text-secondary: #a0aec0;
    --text-muted: #6b7d99;
    --border: #253352;
    --border-light: #1e2c45;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 32px 64px rgba(0, 0, 0, 0.55);
    --accent-bg: #1e3a5f;
    --accent-bg-hover: #254a78;
    
    --event-bg: #0a2e1f;
    --event-text: #6ee7b7;
    --event-glow: rgba(16, 185, 129, 0.3);
    
    --acisga-bg: #1e3a5f;
    --acisga-text: #93c5fd;
    --acisga-glow: rgba(59, 130, 246, 0.3);
    
    --today-bg: #2d2410;
    --danger-bg: #3b1520;
    --danger-text: #fca5a5;
    --warning-bg: #2d2410;
    --warning-text: #fbbf24;
    --success-bg: #0a2e1f;
    --success-text: #6ee7b7;
    
    --gradient-card: linear-gradient(180deg, #182338 0%, #131c31 100%);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    font-family: var(--font-body);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    color: var(--text);
    transition: background var(--transition-smooth), color var(--transition-smooth);
    background-image: radial-gradient(ellipse at 50% 0%, var(--accent-bg) 0%, transparent 70%);
    background-attachment: fixed;
}

.hidden {
    display: none !important;
}

/* ========= THEME TOGGLE ========= */
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--surface-2);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    flex-shrink: 0;
}
.theme-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-bg);
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* ========= BADGES ========= */
.modal-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}
.modal-badge.geral {
    background: var(--event-bg);
    color: var(--event-text);
    box-shadow: inset 0 0 0 1px var(--event-border);
}
.modal-badge.acisga {
    background: var(--acisga-bg);
    color: var(--acisga-text);
    box-shadow: inset 0 0 0 1px var(--acisga-border);
}

/* ========= MODALS COMUNS ========= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(4px);
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    animation: popIn 0.3s ease;
    border: 1px solid var(--border);
    transition: all var(--transition-smooth);
}
@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.modal-close {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-body);
    transition: all var(--transition-fast);
}
.modal-close:hover {
    background: var(--accent-dark);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

/* ========= FOOTER ========= */
footer {
    text-align: center;
    margin-top: 2.2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: color var(--transition-smooth);
}
footer .footer-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.5;
}
