/* ═══════════════════════════════════════════════════════════════════
   EventCalc — Design System "Dark Premium"
   Inspirado em: Linear, Vercel, GitHub Dark, Resend
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* ═══ CORES ═══ */
    /* Background — 3 níveis de profundidade */
    --bg-0: #0a0a0b;        /* mais escuro (página) */
    --bg-1: #131316;        /* cards normais */
    --bg-2: #1c1c20;        /* cards elevados / modais */
    --bg-hover: #232328;

    /* Bordas — sutis */
    --border-subtle: #232328;
    --border-default: #2a2a30;
    --border-strong: #3a3a42;

    /* Texto */
    --text-primary: #f5f5f7;       /* títulos, texto importante */
    --text-secondary: #a1a1a6;     /* corpo, descrições */
    --text-tertiary: #6e6e73;      /* metadados, labels */
    --text-disabled: #48484c;

    /* Acento dourado — mais sutil que o anterior */
    --accent: #c9a14b;             /* dourado principal */
    --accent-hover: #d4af37;
    --accent-muted: rgba(201, 161, 75, 0.1);
    --accent-glow: rgba(201, 161, 75, 0.25);

    /* Estados */
    --success: #34c759;
    --warning: #ff9f0a;
    --danger: #ff453a;
    --info: #64d2ff;

    /* ═══ TIPOGRAFIA ═══ */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

    /* Escalas tipográficas */
    --text-xs:   0.75rem;     /* 12px */
    --text-sm:   0.875rem;    /* 14px */
    --text-base: 1rem;        /* 16px */
    --text-lg:   1.125rem;    /* 18px */
    --text-xl:   1.25rem;     /* 20px */
    --text-2xl:  1.5rem;      /* 24px */
    --text-3xl:  1.875rem;    /* 30px */
    --text-4xl:  2.25rem;     /* 36px */
    --text-5xl:  3rem;        /* 48px */
    --text-6xl:  3.75rem;     /* 60px */
    --text-7xl:  4.5rem;      /* 72px */

    /* Peso */
    --weight-normal:   400;
    --weight-medium:   500;
    --weight-semibold: 600;
    --weight-bold:     700;
    --weight-extra:    800;

    /* Line-height */
    --leading-tight:  1.2;
    --leading-snug:   1.4;
    --leading-normal: 1.6;
    --leading-loose:  1.8;

    /* ═══ ESPAÇAMENTO ═══ */
    --space-1:  0.25rem;  /*  4px */
    --space-2:  0.5rem;   /*  8px */
    --space-3:  0.75rem;  /* 12px */
    --space-4:  1rem;     /* 16px */
    --space-5:  1.25rem;  /* 20px */
    --space-6:  1.5rem;   /* 24px */
    --space-8:  2rem;     /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    --space-32: 8rem;     /* 128px */

    /* ═══ BORDAS / RAIOS ═══ */
    --radius-sm:   6px;
    --radius:      8px;     /* padrão */
    --radius-md:   10px;
    --radius-lg:   12px;
    --radius-xl:   16px;
    --radius-2xl:  20px;
    --radius-full: 9999px;

    /* ═══ SOMBRAS ═══ */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow:    0 2px 8px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.6);
    --shadow-glow: 0 0 24px rgba(201, 161, 75, 0.15);

    /* ═══ TRANSIÇÕES ═══ */
    --transition-fast:   100ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base:   200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* ═══ Z-INDEX ═══ */
    --z-base:    1;
    --z-dropdown: 50;
    --z-sticky:   100;
    --z-modal:    1000;
    --z-toast:    9999;
}

/* ═══ RESET MODERNIZADO ═══ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-weight: var(--weight-normal);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background: var(--bg-0);
    min-height: 100vh;
    overflow-x: hidden;
}

img, picture, video, svg {
    max-width: 100%;
    display: block;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

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

a:hover {
    color: var(--accent-hover);
}

/* ═══ COMPONENTES BASE ═══ */

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    line-height: 1;
    border-radius: var(--radius);
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-0);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--bg-0);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-1);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-1);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

/* Inputs */
.input, .textarea, .select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-1);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.input::placeholder {
    color: var(--text-tertiary);
}

/* Cards */
.card {
    background: var(--bg-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: border-color var(--transition-base);
}

.card-hover:hover {
    border-color: var(--border-default);
}

.card-elevated {
    background: var(--bg-2);
    box-shadow: var(--shadow-md);
}

/* Labels */
.label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

/* Headings */
h1, .h1 {
    font-size: var(--text-5xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h2, .h2 {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    letter-spacing: -0.015em;
    color: var(--text-primary);
}

h3, .h3 {
    font-size: var(--text-xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--text-primary);
}

h4, .h4 {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    line-height: var(--leading-normal);
}

/* Utilitárias */
.text-accent { color: var(--accent); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.bg-1 { background: var(--bg-1); }
.bg-2 { background: var(--bg-2); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-mono { font-family: var(--font-mono); }

/* Espaçamento utilitário */
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

/* Scrollbar custom */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-0);
}
::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: var(--radius);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

/* Selection */
::selection {
    background: var(--accent-muted);
    color: var(--accent);
}

/* Foco visível (acessibilidade) */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-full);
    background: var(--accent-muted);
    color: var(--accent);
    border: 1px solid var(--accent-muted);
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-8) 0;
    border: none;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 400ms ease-out; }
.animate-slide-up { animation: slideUp 500ms cubic-bezier(0.4, 0, 0.2, 1); }

/* Responsividade básica */
@media (max-width: 768px) {
    h1, .h1 { font-size: var(--text-4xl); }
    h2, .h2 { font-size: var(--text-2xl); }

    .container, .container-narrow, .container-wide {
        padding: 0 var(--space-4);
    }
}
