:root {
    --bg-primary: #09090b;
    --bg-secondary: #0c0c0e;
    --bg-card: #111113;
    --bg-card-hover: #18181b;
    --bg-input: #18181b;
    --bg-sidebar: linear-gradient(180deg, #0a0a0c 0%, #111113 100%);

    --border: #27272a;
    --border-light: #1e1e21;
    --border-focus: #52525b;

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-dim: #52525b;

    --accent: #ffffff;
    --accent-muted: rgba(255,255,255,0.08);
    --accent-hover: rgba(255,255,255,0.12);

    --success: #22c55e;
    --success-bg: rgba(34,197,94,0.1);
    --warning: #eab308;
    --warning-bg: rgba(234,179,8,0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239,68,68,0.1);
    --info: #3b82f6;
    --info-bg: rgba(59,130,246,0.1);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);

    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 15px; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* Permitir seleção em inputs e textos */
input, textarea, select, .data-table td, .stat-value, .detail-value, p { -webkit-user-select: text; user-select: text; }

a { color: var(--text-primary); text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea, button { font-size: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-focus); }

::selection { background: rgba(255,255,255,0.15); }

/* Lucide SVG icons */
[data-lucide], i svg {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
}
svg.lucide {
    width: 1em;
    height: 1em;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ═══════════════════════════════════════════
   LIGHT THEME
   ═══════════════════════════════════════════ */
body.theme-light {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f3f5;
    --bg-input: #f1f3f5;
    --bg-sidebar: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    --border: #dee2e6;
    --border-light: #e9ecef;
    --border-focus: #adb5bd;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #868e96;
    --text-dim: #adb5bd;
    --accent-muted: rgba(0,0,0,0.04);
    --accent-hover: rgba(0,0,0,0.08);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}
body.theme-light .sidebar { --text-primary: #f8f9fa; --text-secondary: #adb5bd; --text-muted: #868e96; --text-dim: #495057; --border: #2a2a4a; --border-light: #2a2a4a; --bg-input: #2a2a4a; --accent-muted: rgba(255,255,255,0.08); }
body.theme-light .sidebar .nav-link { color: #adb5bd; }
body.theme-light .sidebar .nav-link:hover { color: #ffffff; }
body.theme-light .sidebar .nav-link.active { color: #ffffff; }
body.theme-light .sidebar .nav-section-title { color: #6c757d; }
body.theme-light .sidebar .user-name { color: #f8f9fa; }
body.theme-light .sidebar .user-email { color: #868e96; }
body.theme-light .btn-primary { background: #212529; color: #ffffff; border-color: #212529; }
body.theme-light .btn-primary:hover { background: #343a40; border-color: #343a40; }
body.theme-light .icon-option { color: #212529; }
body.theme-light .icon-option.selected { border-color: #212529; background: rgba(0,0,0,0.08); }
body.theme-light .notif-dropdown { background: #ffffff; }
body.theme-light .search-results { background: #ffffff; }
body.theme-light ::selection { background: rgba(0,0,0,0.1); }
