/* Typography: Outfit as modern primary sans & Tabular Fintech Numbers (Sellaris ERP Style) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:ital,opsz,wght@0,14..32,400..700;1,14..32,400..700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --color-brand-50: #fffbeb;
    --color-brand-100: #fef3c7;
    --color-brand-200: #fde68a;
    --color-brand-300: #fcd34d;
    --color-brand-400: #fbbf24;
    --color-brand-500: #f59e0b;
    --color-brand-600: #d97706;
    --color-brand-700: #b45309;
    --color-brand-800: #92400e;
    --color-brand-900: #78350f;
}

* {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: 'Outfit', sans-serif !important;
}

/* Professional Fintech Currency & Tabular Numbers (Stripe / Sellaris Style) */
.tabular-nums, .font-mono, input.font-mono, span.font-mono, td.font-mono, .currency-amount {
    font-family: 'Outfit', -apple-system, sans-serif !important;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: -0.02em;
}

/* Scrollbars */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Dashboard Executive Card Highlights */
.bg-slate-900 {
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
}

/* Sidebar transition */
.sidebar-transition {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Nav Item Styling */
.sidebar-nav-item {
    transition: all 0.15s ease;
}
.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
}
.sidebar-nav-item.active {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ==========================================================================
   LIGHT MODE ARCHITECTURE (Fintech / Sellaris Clean Light Style)
   ========================================================================== */

/* 1. Global Canvas & Typography */
html.light body {
    background-color: #f8fafc !important; /* slate-50 */
    color: #0f172a !important;            /* slate-900 */
}

html.light main {
    background-color: #f8fafc !important;
}

html.light ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
html.light ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 2. Global Dark Background Overrides to Clean Crisp Light Cards */
/* Main cards (formerly bg-slate-900 and opacity variants) */
html.light .bg-slate-900,
html.light .bg-slate-900\/95,
html.light .bg-slate-900\/90,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/70,
html.light .bg-slate-900\/60,
html.light .bg-slate-900\/50,
html.light .bg-slate-900\/40 {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.03) !important;
}

/* Secondary & inner panels (formerly bg-slate-950 and opacity variants) */
html.light .bg-slate-950,
html.light .bg-slate-950\/95,
html.light .bg-slate-950\/90,
html.light .bg-slate-950\/80,
html.light .bg-slate-950\/70,
html.light .bg-slate-950\/60,
html.light .bg-slate-950\/50,
html.light .bg-slate-950\/40,
html.light .bg-slate-950\/30,
html.light .bg-slate-950\/20 {
    background-color: #f8fafc !important;
}

/* Tertiary & badge backgrounds (formerly bg-slate-800 and opacity variants) */
html.light .bg-slate-800,
html.light .bg-slate-800\/90,
html.light .bg-slate-800\/80,
html.light .bg-slate-800\/60,
html.light .bg-slate-800\/50,
html.light .bg-slate-800\/40,
html.light .bg-slate-800\/30,
html.light .bg-slate-800\/20 {
    background-color: #f1f5f9 !important;
}

/* 3. Global Borders: Replace dark borders with crisp slate-200 / slate-300 */
html.light .border-slate-900,
html.light .border-slate-800,
html.light .border-slate-800\/90,
html.light .border-slate-800\/80,
html.light .border-slate-800\/60,
html.light .border-slate-800\/50,
html.light .border-slate-800\/40,
html.light .border-slate-700,
html.light .border-slate-700\/90,
html.light .border-slate-700\/80,
html.light .border-slate-700\/60,
html.light .border-slate-700\/50,
html.light .border-slate-600 {
    border-color: #e2e8f0 !important;
}

html.light .divide-slate-800 > :not([hidden]) ~ :not([hidden]),
html.light .divide-slate-800\/80 > :not([hidden]) ~ :not([hidden]),
html.light .divide-slate-700 > :not([hidden]) ~ :not([hidden]) {
    border-color: #e2e8f0 !important;
}

/* 4. Global Text Colors & High Contrast */
html.light .text-slate-100 { color: #0f172a !important; }
html.light .text-slate-200 { color: #1e293b !important; }
html.light .text-slate-300 { color: #334155 !important; }
html.light .text-slate-400 { color: #475569 !important; }
html.light .text-slate-500 { color: #64748b !important; }
html.light .text-slate-600 { color: #64748b !important; }

/* In Light Mode, headings and titles that had .text-white turn to dark slate */
html.light h1.text-white,
html.light h2.text-white,
html.light h3.text-white,
html.light h4.text-white,
html.light h5.text-white,
html.light h6.text-white,
html.light div.text-white:not([class*="bg-amber"]):not([class*="bg-emerald"]):not([class*="bg-violet"]):not([class*="bg-rose"]):not([class*="bg-blue"]):not([class*="bg-sky"]):not([class*="bg-indigo"]):not([class*="btn"]),
html.light span.text-white:not([class*="bg-amber"]):not([class*="bg-emerald"]):not([class*="bg-violet"]):not([class*="bg-rose"]):not([class*="bg-blue"]):not([class*="bg-sky"]):not([class*="bg-indigo"]):not([class*="btn"]) {
    color: #0f172a !important;
}

/* 5. Interactive Hovers in Light Mode */
html.light .hover\:bg-slate-800:hover,
html.light .hover\:bg-slate-800\/80:hover,
html.light .hover\:bg-slate-800\/60:hover,
html.light .hover\:bg-slate-800\/50:hover,
html.light .hover\:bg-slate-700:hover,
html.light .hover\:bg-slate-700\/80:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

html.light .hover\:bg-slate-900:hover,
html.light .hover\:bg-slate-950:hover {
    background-color: #f8fafc !important;
}

html.light .hover\:border-slate-700:hover,
html.light .hover\:border-slate-700\/80:hover,
html.light .hover\:border-slate-600:hover {
    border-color: #cbd5e1 !important;
}

/* 6. SIDEBAR SPECIFICS (#appSidebar) */
html.light aside#appSidebar {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03) !important;
}

html.light aside#appSidebar .border-b,
html.light aside#appSidebar .border-t {
    border-color: #e2e8f0 !important;
}

html.light aside#appSidebar .sidebar-label .text-slate-100 {
    color: #0f172a !important;
}

/* Sidebar Search Input */
html.light aside#appSidebar #sidebarSearch {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}
html.light aside#appSidebar #sidebarSearch::placeholder {
    color: #94a3b8 !important;
}
html.light aside#appSidebar #sidebarSearch:focus {
    background-color: #ffffff !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 1px #f59e0b !important;
}

/* Sidebar Section Headers */
html.light aside#appSidebar .font-display.text-slate-500 {
    color: #64748b !important;
}

/* Sidebar Navigation Items */
html.light .sidebar-nav-item {
    color: #475569 !important;
}
html.light .sidebar-nav-item:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}
html.light .sidebar-nav-item.active {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fde68a !important;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.1) !important;
}
html.light .sidebar-nav-item.active i {
    color: #d97706 !important;
}

/* Flor CAD Special Sidebar Nav Item */
html.light #nav-item-flor {
    background-color: #f5f3ff !important;
    border-color: #ddd6fe !important;
    color: #6d28d9 !important;
}
html.light #nav-item-flor:hover {
    background-color: #ede9fe !important;
    color: #5b21b6 !important;
}
html.light #nav-item-flor.active {
    background-color: #ede9fe !important;
    border-color: #c4b5fd !important;
    color: #5b21b6 !important;
}

/* Badges inside Sidebar */
html.light aside#appSidebar .sidebar-nav-item .bg-slate-800 {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}
html.light aside#appSidebar .bg-amber-500\/20 {
    background-color: #fef3c7 !important;
    border-color: #fde68a !important;
    color: #92400e !important;
}
html.light aside#appSidebar .bg-emerald-500\/20 {
    background-color: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #065f46 !important;
}
html.light aside#appSidebar .bg-violet-500\/30 {
    background-color: #f5f3ff !important;
    border-color: #ddd6fe !important;
    color: #6d28d9 !important;
}
html.light aside#appSidebar .bg-pink-500\/20 {
    background-color: #fdf2f8 !important;
    border-color: #fbcfe8 !important;
    color: #9d174d !important;
}
html.light aside#appSidebar .bg-rose-500\/20 {
    background-color: #fff1f2 !important;
    border-color: #fecdd3 !important;
    color: #9f1239 !important;
}

/* User Card Bottom Sidebar */
html.light aside#appSidebar .bg-slate-900\/50 {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}
html.light aside#appSidebar .bg-slate-950\/60 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* 7. TOPBAR HEADER */
html.light header {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html.light header #topbarTitle {
    color: #0f172a !important;
}
html.light header #topbarSubtitle {
    color: #64748b !important;
}

html.light header .bg-slate-950\/80,
html.light header .bg-slate-950\/60 {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

html.light #btnThemeToggle {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}
html.light #btnThemeToggle:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

/* 8. KANBAN / PIZARRÓN TALLER */
html.light .kanban-columna {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
html.light .kanban-card {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}
html.light .kanban-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08) !important;
}
html.light .btn-paso-prev {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}
html.light .btn-paso-prev:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}
html.light .kanban-placeholder {
    border-color: #cbd5e1 !important;
    background-color: rgba(248, 250, 252, 0.6) !important;
}

/* 9. DRAWER LATERAL & MODALS */
html.light #drawerFichaPedido {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.08) !important;
}
html.light #drawerFichaPedido > div:first-child {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}
html.light #drawerFichaPedido .tab-drawer-btn {
    color: #64748b !important;
}
html.light #drawerFichaPedido .tab-drawer-btn.active {
    color: #b45309 !important;
    border-color: #f59e0b !important;
}

html.light .fixed .bg-slate-900 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}

/* 10. FORM INPUTS & SELECTS */
html.light input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html.light select,
html.light textarea {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}
html.light select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}
html.light input:focus,
html.light select:focus,
html.light textarea:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 1px #f59e0b !important;
    background-color: #ffffff !important;
}
html.light input::placeholder,
html.light textarea::placeholder {
    color: #94a3b8 !important;
}

/* 11. FILTER PILLS */
html.light .btn-filtro-pill {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}
html.light .btn-filtro-pill:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}
html.light .btn-filtro-pill.active {
    background-color: #f59e0b !important;
    color: #0f172a !important;
    border-color: #f59e0b !important;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.25) !important;
}

/* 12. TABLES */
html.light table thead {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}
html.light table th {
    color: #475569 !important;
    border-color: #e2e8f0 !important;
    background-color: #f8fafc !important;
}
html.light table td {
    border-color: #f1f5f9 !important;
}
html.light tr.fila-pedido:hover {
    background-color: #f8fafc !important;
}

/* 13. HERO BANNERS & CONTROL CENTERS IN LIGHT MODE */
/* A. Portafolio & Catálogo de Obras (Galería) */
html.light #tab-galeria .bg-gradient-to-r {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 50%, #fef3c7 100%) !important;
    border-color: #fde68a !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}
html.light #tab-galeria .bg-gradient-to-r h2 {
    color: #1e293b !important;
}
html.light #tab-galeria .bg-gradient-to-r p {
    color: #475569 !important;
}
html.light #tab-galeria .bg-amber-500\/20 {
    background-color: #fef3c7 !important;
    border-color: #fde68a !important;
    color: #92400e !important;
}
html.light #tab-galeria .bg-slate-950\/60 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
}
html.light #tab-galeria .bg-slate-950\/60 span.text-white {
    color: #0f172a !important;
}
html.light #tab-galeria .bg-slate-950\/60 span.text-slate-500 {
    color: #64748b !important;
}

/* B. Presupuestador Inteligente de Taller */
html.light #tab-presupuestador .bg-gradient-to-r {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 50%, #fef3c7 100%) !important;
    border-color: #fde68a !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}
html.light #tab-presupuestador .bg-gradient-to-r h2 {
    color: #1e293b !important;
}
html.light #tab-presupuestador .bg-gradient-to-r p {
    color: #475569 !important;
}
html.light #tab-presupuestador .bg-slate-950\/80 {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}
html.light #tab-presupuestador .bg-slate-950\/80 button:not(.bg-amber-500) {
    color: #475569 !important;
}
html.light #tab-presupuestador .bg-slate-950\/80 button:not(.bg-amber-500):hover {
    color: #0f172a !important;
    background-color: #e2e8f0 !important;
}

/* C. Catálogo e Inventario Industrial (Stock) */
html.light #tab-stock .bg-gradient-to-r {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 50%, #fef3c7 100%) !important;
    border-color: #fde68a !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}
html.light #tab-stock .bg-gradient-to-r h2 {
    color: #1e293b !important;
}
html.light #tab-stock .bg-gradient-to-r p {
    color: #475569 !important;
}
html.light #tab-stock .bg-amber-500\/20 {
    background-color: #fef3c7 !important;
    border-color: #fde68a !important;
    color: #92400e !important;
}
html.light #tab-stock .bg-slate-800 {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

/* D. Oficina Técnica · Diseño y Coordinación de Obra (Dashboard Integrador) */
html.light .bg-gradient-to-r.from-violet-950\/60 {
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 50%, #faf5ff 100%) !important;
    border-color: #ddd6fe !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}
html.light .bg-gradient-to-r.from-violet-950\/60 h3 {
    color: #1e1b4b !important;
}
html.light .bg-gradient-to-r.from-violet-950\/60 p {
    color: #475569 !important;
}
html.light .bg-gradient-to-r.from-violet-950\/60 .text-violet-300 {
    color: #6d28d9 !important;
}
html.light .bg-gradient-to-r.from-violet-950\/60 .bg-violet-500\/20 {
    background-color: #ede9fe !important;
    border-color: #ddd6fe !important;
    color: #5b21b6 !important;
}
html.light .bg-gradient-to-r.from-violet-950\/60 .bg-slate-800\/90 {
    background-color: #ffffff !important;
    border-color: #fde68a !important;
    color: #b45309 !important;
}

/* E. Estudio Renders 3D & Planos de Taller (Tab Flor) */
html.light #tab-flor .bg-gradient-to-r {
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 50%, #fdf2f8 100%) !important;
    border-color: #ddd6fe !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}
html.light #tab-flor .bg-gradient-to-r h2 {
    color: #1e1b4b !important;
}
html.light #tab-flor .bg-gradient-to-r p {
    color: #475569 !important;
}
html.light #tab-flor .bg-violet-500\/20 {
    background-color: #ede9fe !important;
    border-color: #ddd6fe !important;
    color: #5b21b6 !important;
}
html.light #tab-flor .text-violet-300 {
    color: #6d28d9 !important;
}
html.light #tab-flor .text-violet-200 {
    color: #5b21b6 !important;
}
html.light #tab-flor .bg-violet-500\/30 {
    background-color: #ede9fe !important;
}
html.light #tab-flor .border-violet-400\/40 {
    border-color: #c4b5fd !important;
}

/* 14. BENTO ANALYTICS SVG CHARTS */
html.light svg line[stroke^="rgba(255,255,255"] {
    stroke: rgba(0, 0, 0, 0.08) !important;
}
html.light svg circle[stroke^="rgba(255,255,255"] {
    stroke: rgba(0, 0, 0, 0.08) !important;
}
html.light svg circle[fill="#0f172a"] {
    fill: #ffffff !important;
}

/* 15. ALERT OPERATIONAL BANNERS */
html.light .bg-slate-900\/90.border-amber-500\/15 {
    background-color: #fffbeb !important;
    border-color: #fde68a !important;
}
html.light .bg-amber-500\/5,
html.light .bg-amber-500\/10 {
    background-color: #fef3c7 !important;
    border-color: #fde68a !important;
}
html.light .bg-rose-500\/5,
html.light .bg-rose-500\/10 {
    background-color: #fff1f2 !important;
    border-color: #fecdd3 !important;
}
html.light .bg-pink-500\/5,
html.light .bg-pink-500\/10 {
    background-color: #fdf2f8 !important;
    border-color: #fbcfe8 !important;
}
html.light .bg-emerald-500\/5,
html.light .bg-emerald-500\/10 {
    background-color: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}
html.light .bg-cyan-500\/5,
html.light .bg-cyan-500\/10 {
    background-color: #ecfeff !important;
    border-color: #a5f3fc !important;
}

/* 16. TOAST NOTIFICATIONS */
html.light #toastNotification {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
}
html.light #toastMessage {
    color: #475569 !important;
}

/* 17. MOBILE BOTTOM NAVIGATION BAR */
#mobileBottomBar {
    padding-bottom: max(0.375rem, env(safe-area-inset-bottom));
}
.mobile-nav-btn {
    min-width: 48px;
    touch-action: manipulation;
}
.mobile-nav-btn.active {
    color: #fbbf24 !important;
}
.mobile-nav-btn.active i {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

html.light #mobileBottomBar {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}
html.light .mobile-nav-btn {
    color: #64748b !important;
}
html.light .mobile-nav-btn.active {
    color: #b45309 !important;
}

/* 18. TOUCH SCROLLING */
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}