/* c:\xampp\htdocs\coloniadeferias\public\css\theme.css */

/* Animação do Gradiente de Fundo (Light Mode) */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body.theme-light-glass {
    background: linear-gradient(-45deg, #e0f2fe, #f3e8ff, #fdf4ff, #ecfeff);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #1f2937;
}

/* O Glassmorphism Base (Vidro Branco Translucido) */
.glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

/* Painel de Navegação (Sidebar mais solida mas translúcida) */
.glass-sidebar {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.7);
}

/* Inputs, Selects e Textareas */
.glass-input {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(156, 163, 175, 0.6) !important; /* Borda cinza visível */
    color: #1f2937;
    transition: all 0.3s ease;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3) !important;
}

/* Tabelas e Linhas em Glass */
.glass-table-row {
    transition: all 0.2s ease;
}
.glass-table-row:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Modais do SweetAlert (customClass.popup) */
.swal2-popup.glass-swal {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}

/* Esconder barra de rolagem mas permitir rolagem (estética clean) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.8);
}

/* DARK MODE OVERRIDES */
html.dark body.theme-light-glass {
    background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #172554);
    background-size: 400% 400%;
    color: #f3f4f6;
}
html.dark body {
    background-color: #0f172a;
    color: #f3f4f6;
}
html.dark .glass {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}
html.dark .glass-sidebar {
    background: rgba(15, 23, 42, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}
html.dark .glass-input {
    background: rgba(30, 41, 59, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f3f4f6;
}
html.dark .glass-swal {
    background: rgba(15, 23, 42, 0.85) !important;
    color: #f3f4f6 !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
html.dark .glass-swal .swal2-title,
html.dark .glass-swal .swal2-html-container {
    color: #f3f4f6 !important;
}


/* UNIVERSAL DARK MODE OVERRIDES (TRANSLUCENT BACKGROUNDS) */
html.dark .bg-white\/95 { background-color: rgba(30, 41, 59, 0.95) !important; border-color: rgba(255, 255, 255, 0.1) !important; }
html.dark .bg-white\/90 { background-color: rgba(30, 41, 59, 0.9) !important; border-color: rgba(255, 255, 255, 0.1) !important; }
html.dark .bg-white\/80 { background-color: rgba(30, 41, 59, 0.8) !important; border-color: rgba(255, 255, 255, 0.1) !important; }
html.dark .bg-white\/70 { background-color: rgba(30, 41, 59, 0.7) !important; border-color: rgba(255, 255, 255, 0.1) !important; }
html.dark .bg-white\/60 { background-color: rgba(30, 41, 59, 0.6) !important; border-color: rgba(255, 255, 255, 0.1) !important; }
html.dark .bg-white\/50 { background-color: rgba(30, 41, 59, 0.5) !important; border-color: rgba(255, 255, 255, 0.1) !important; }
html.dark .bg-white\/40 { background-color: rgba(30, 41, 59, 0.4) !important; }
html.dark .bg-white\/30 { background-color: rgba(30, 41, 59, 0.3) !important; }
html.dark .bg-white\/20 { background-color: rgba(30, 41, 59, 0.2) !important; }
html.dark .bg-white\/15 { background-color: rgba(30, 41, 59, 0.15) !important; }
html.dark .bg-white\/10 { background-color: rgba(30, 41, 59, 0.1) !important; }
html.dark .bg-white { background-color: #1e293b !important; border-color: rgba(255, 255, 255, 0.1) !important; }

/* DUSTY GRAY / NEUTRAL BACKGROUNDS */
html.dark .bg-gray-50, 
html.dark .bg-slate-50, 
html.dark .bg-slate-100 { background-color: #0f172a !important; }
html.dark .bg-gray-50\/50,
html.dark .bg-slate-50\/50,
html.dark .bg-white\/20 { background-color: rgba(30, 41, 59, 0.5) !important; }
html.dark .bg-gray-100 { background-color: #1e293b !important; }
html.dark .bg-gray-200 { background-color: #334155 !important; }
html.dark .bg-gray-300 { background-color: #475569 !important; }

/* HOVERS & STATES */
html.dark .hover\:bg-gray-50:hover,
html.dark .hover\:bg-gray-100:hover,
html.dark .hover\:bg-slate-50:hover,
html.dark .hover\:bg-slate-100:hover { background-color: rgba(255, 255, 255, 0.05) !important; }
html.dark .hover\:border-gray-300:hover { border-color: rgba(255, 255, 255, 0.2) !important; }
html.dark .glass-table-row:hover { background: rgba(0, 0, 0, 0.2) !important; }

/* UNIVERSAL DARK MODE OVERRIDES (TEXT COLORS) */
html.dark .text-gray-950,
html.dark .text-slate-950,
html.dark .text-gray-900, 
html.dark .text-gray-800, 
html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-slate-700 { color: #f3f4f6 !important; }
html.dark .text-gray-700, 
html.dark .text-gray-600,
html.dark .text-slate-600 { color: #d1d5db !important; }
html.dark .text-gray-500,
html.dark .text-slate-500 { color: #9ca3af !important; }

/* UNIVERSAL DARK MODE OVERRIDES (BORDERS) */
html.dark .border-gray-200, 
html.dark .border-gray-300, 
html.dark .border-gray-100,
html.dark .border-slate-200,
html.dark .border-slate-300 { border-color: #334155 !important; }

html.dark .border-white\/60,
html.dark .border-white\/50,
html.dark .border-white\/40,
html.dark .border-white\/30,
html.dark .border-white\/20,
html.dark .border-white\/10,
html.dark .border-white,
html.dark .border-gray-200\/50,
html.dark .border-gray-100\/50,
html.dark .border-gray-300\/50,
html.dark .border-slate-200\/50 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* DIVIDERS & TABLES */
html.dark .divide-gray-200\/50 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: #334155 !important;
}
html.dark table thead th { color: #9ca3af !important; }

/* CUSTOM SCROLLBARS FOR BI/OTHER PANELS */
html.dark .custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
}
html.dark .custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* GENERIC FALLBACK FOR FORM CONTROLS IN DARK MODE (UNSTYLIZED INPUTS) */
html.dark select,
html.dark input[type="date"],
html.dark input[type="time"],
html.dark input[type="text"],
html.dark textarea {
    background-color: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #f3f4f6 !important;
}
html.dark select option {
    background-color: #1e293b !important;
    color: #f3f4f6 !important;
}

/* BADGES AND STATUS COLORS FOR DARK MODE */
html.dark .bg-yellow-50,
html.dark .bg-yellow-100,
html.dark .bg-yellow-200,
html.dark [class*="bg-yellow-50"], 
html.dark [class*="bg-yellow-100"], 
html.dark [class*="bg-yellow-200"] { 
    background-color: rgba(113, 63, 18, 0.6) !important; 
    border-color: rgba(253, 224, 71, 0.2) !important; 
}
html.dark .text-yellow-700,
html.dark .text-yellow-800,
html.dark .text-yellow-900,
html.dark [class*="text-yellow-"] { 
    color: #fde047 !important; 
}

html.dark .bg-emerald-50,
html.dark .bg-emerald-100,
html.dark [class*="bg-emerald-50"], 
html.dark [class*="bg-emerald-100"] { 
    background-color: rgba(6, 78, 59, 0.6) !important; 
    border-color: rgba(110, 231, 183, 0.2) !important; 
}
html.dark .text-emerald-700,
html.dark .text-emerald-800,
html.dark .text-emerald-900,
html.dark [class*="text-emerald-"] { 
    color: #6ee7b7 !important; 
}

html.dark .bg-red-50,
html.dark .bg-red-100,
html.dark [class*="bg-red-50"], 
html.dark [class*="bg-red-100"] { 
    background-color: rgba(127, 29, 29, 0.6) !important; 
    border-color: rgba(252, 165, 165, 0.2) !important; 
}
html.dark .text-red-700,
html.dark .text-red-800,
html.dark .text-red-900,
html.dark [class*="text-red-"] { 
    color: #fca5a5 !important; 
}

html.dark .bg-blue-50,
html.dark .bg-blue-100,
html.dark [class*="bg-blue-50"], 
html.dark [class*="bg-blue-100"] { 
    background-color: rgba(30, 58, 138, 0.6) !important; 
    border-color: rgba(147, 197, 253, 0.2) !important; 
}
html.dark .text-blue-700,
html.dark .text-blue-800,
html.dark .text-blue-900,
html.dark [class*="text-blue-"] { 
    color: #93c5fd !important; 
}

html.dark [class*="bg-v"][class*="iolet-50"], 
html.dark [class*="bg-v"][class*="iolet-100"] { 
    background-color: rgba(92, 36, 172, 0.4) !important; 
    border-color: rgba(196, 181, 253, 0.2) !important; 
}
html.dark [class*="text-v"][class*="iolet-700"],
html.dark [class*="text-v"][class*="iolet-800"],
html.dark [class*="text-v"][class*="iolet-900"],
html.dark [class*="text-v"][class*="iolet-"] { 
    color: #c4b6fd !important; 
}

html.dark .bg-green-50,
html.dark .bg-green-100,
html.dark [class*="bg-green-50"], 
html.dark [class*="bg-green-100"] { 
    background-color: rgba(20, 83, 45, 0.6) !important; 
    border-color: rgba(134, 239, 172, 0.2) !important; 
}
html.dark .text-green-700,
html.dark .text-green-800,
html.dark .text-green-900,
html.dark [class*="text-green-"] { 
    color: #86efac !important; 
}
