/* ============================================================
   SGPA — Design System (tokens compartilhados)
   Prefeitura Municipal de Quixaba-PE
   ============================================================ */

:root {
    /* Marca */
    --sg-brand-50:  #eff6ff;
    --sg-brand-100: #dbeafe;
    --sg-brand-200: #bfdbfe;
    --sg-brand-300: #93c5fd;
    --sg-brand-400: #60a5fa;
    --sg-brand-500: #3b82f6;
    --sg-brand-600: #2563eb;
    --sg-brand-700: #1d4ed8;
    --sg-brand-800: #1e40af;
    --sg-brand-900: #1e3a8a;

    /* Navegação (sidebar / rodapés escuros) */
    --sg-nav:        #0b2545;
    --sg-nav-2:      #08182f;
    --sg-nav-line:   rgba(255, 255, 255, 0.08);
    --sg-nav-text:   #b9c6da;
    --sg-nav-active: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);

    /* Superfícies */
    --sg-bg:        #f4f7fb;
    --sg-surface:   #ffffff;
    --sg-surface-2: #f8fafc;
    --sg-border:    #e6ecf4;
    --sg-border-2:  #d8e2ef;

    /* Texto */
    --sg-text:      #0f172a;
    --sg-text-2:    #475569;
    --sg-muted:     #7c8aa0;

    /* Semânticos */
    --sg-success:   #16a34a;
    --sg-success-bg:#dcfce7;
    --sg-warning:   #d97706;
    --sg-warning-bg:#fef3c7;
    --sg-danger:    #dc2626;
    --sg-danger-bg: #fee2e2;
    --sg-info:      #0ea5e9;
    --sg-info-bg:   #e0f2fe;

    /* Raio & sombra */
    --sg-r-sm: 8px;
    --sg-r:    12px;
    --sg-r-lg: 16px;
    --sg-r-xl: 20px;
    --sg-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --sg-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
    --sg-shadow:    0 2px 4px rgba(16, 24, 40, 0.04), 0 6px 16px rgba(16, 24, 40, 0.06);
    --sg-shadow-lg: 0 12px 32px rgba(11, 37, 69, 0.12);
    --sg-ring:      0 0 0 3px rgba(37, 99, 235, 0.16);

    /* Tipografia */
    --sg-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Base tipográfica compartilhada */
.sg-font,
body.sg-font {
    font-family: var(--sg-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'ss01';
}

/* Scrollbar discreta */
.sg-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.sg-scroll::-webkit-scrollbar-track { background: transparent; }
.sg-scroll::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.28); border-radius: 999px; }
.sg-scroll::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.45); }

/* Utilitários de foco acessível */
.sg-focusable:focus-visible {
    outline: none;
    box-shadow: var(--sg-ring);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
