/* ============================================================
   Ouvidoria Corporativa — Design System
   Mendonça Galvão Contadores Associados
   
   Paleta extraída da logo.png:
   - Preto profundo do fundo da logo → bg-main
   - Curvas metálicas prateadas → silver-gradient, text-secondary
   - Linhas douradas decorativas → accent-gold
   - Tipografia branca da logo → text-main (off-white quente)
   ============================================================ */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    /* Primary palette */
    --primary: #1A1A1E;
    --primary-hover: #252529;
    --primary-active: #2D2D33;

    /* Gold accent */
    --accent-gold: #C9A84C;
    --accent-gold-hover: #D4B85E;
    --accent-gold-muted: rgba(201, 168, 76, 0.15);
    --accent-gold-border: rgba(201, 168, 76, 0.3);

    /* Backgrounds */
    --bg-main: #0F0F12;
    --bg-surface: #1A1A1E;
    --bg-elevated: #24242A;
    --bg-input: #1E1E23;

    /* Text */
    --text-main: #F0EDE6;
    --text-secondary: #8A8A94;
    --text-tertiary: #5C5C66;
    --text-gold: #C9A84C;

    /* Borders */
    --border-subtle: #2E2E35;
    --border-medium: #3A3A42;
    --border-gold: rgba(201, 168, 76, 0.3);

    /* Silver gradient (from logo curves) */
    --silver-light: #C0C0C6;
    --silver-medium: #8A8A94;

    /* Semantic colors */
    --success: #2ECC71;
    --success-bg: rgba(46, 204, 113, 0.1);
    --success-border: rgba(46, 204, 113, 0.3);
    --warning: #F39C12;
    --warning-bg: rgba(243, 156, 18, 0.1);
    --warning-border: rgba(243, 156, 18, 0.3);
    --danger: #E74C3C;
    --danger-bg: rgba(231, 76, 60, 0.1);
    --danger-border: rgba(231, 76, 60, 0.3);
    --info: #5DADE2;
    --info-bg: rgba(93, 173, 226, 0.1);
    --info-border: rgba(93, 173, 226, 0.3);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 20px rgba(201, 168, 76, 0.1);

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 64px;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

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

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

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-main);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

.text-gold { color: var(--accent-gold); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}

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

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

@keyframes goldGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(201, 168, 76, 0.2); }
    50% { box-shadow: 0 0 15px rgba(201, 168, 76, 0.4); }
}

.animate-fade {
    opacity: 0;
    animation: fadeIn 0.35s ease forwards;
}

/* Stagger via nth-child — no inline animation-delay needed */
.animate-fade:nth-child(1) { animation-delay: 0.0s; }
.animate-fade:nth-child(2) { animation-delay: 0.05s; }
.animate-fade:nth-child(3) { animation-delay: 0.10s; }
.animate-fade:nth-child(4) { animation-delay: 0.15s; }
.animate-fade:nth-child(5) { animation-delay: 0.20s; }
.animate-fade:nth-child(6) { animation-delay: 0.25s; }
.animate-fade:nth-child(7) { animation-delay: 0.30s; }
.animate-fade:nth-child(8) { animation-delay: 0.35s; }

/* Once animated, lock permanently — !important prevents any inline style override */
.animate-fade.animated {
    animation: none !important;
    animation-delay: 0s !important;
    opacity: 1 !important;
    transform: none !important;
}

.animate-slide-left {
    animation: slideInLeft 0.4s ease forwards;
}

.animate-slide-right {
    animation: slideInRight 0.4s ease forwards;
}

/* ── Utilities ─────────────────────────────────────────────── */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.flex-1 { flex: 1; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
