/* ============================================================
   UaiCash — Temas sutis (cores de destaque)
   Carregado DEPOIS de tailwind.css para sobrescrever as classes uai
   ============================================================ */

:root,
html[data-theme="violet"] {
  --uai-50-rgb: 245 243 255;
  --uai-100-rgb: 237 233 254;
  --uai-500-rgb: 139 92 246;
  --uai-600-rgb: 124 58 237;
  --uai-700-rgb: 109 40 217;
  --uai-900-rgb: 76 29 149;
  --uai-50: #f5f3ff;
  --uai-100: #ede9fe;
  --uai-500: #8b5cf6;
  --uai-600: #7c3aed;
  --uai-700: #6d28d9;
  --uai-900: #4c1d95;
}

html[data-theme="oceano"] {
  --uai-50-rgb: 240 249 255;
  --uai-100-rgb: 224 242 254;
  --uai-500-rgb: 56 189 248;
  --uai-600-rgb: 2 132 199;
  --uai-700-rgb: 3 105 161;
  --uai-900-rgb: 12 74 110;
  --uai-50: #f0f9ff;
  --uai-100: #e0f2fe;
  --uai-500: #38bdf8;
  --uai-600: #0284c7;
  --uai-700: #0369a1;
  --uai-900: #0c4a6e;
}

html[data-theme="floresta"] {
  --uai-50-rgb: 240 253 244;
  --uai-100-rgb: 220 252 231;
  --uai-500-rgb: 52 211 153;
  --uai-600-rgb: 5 150 105;
  --uai-700-rgb: 4 120 87;
  --uai-900-rgb: 6 78 59;
  --uai-50: #f0fdf4;
  --uai-100: #dcfce7;
  --uai-500: #34d399;
  --uai-600: #059669;
  --uai-700: #047857;
  --uai-900: #064e3b;
}

html[data-theme="sol"] {
  --uai-50-rgb: 255 251 235;
  --uai-100-rgb: 254 243 199;
  --uai-500-rgb: 251 191 36;
  --uai-600-rgb: 217 119 6;
  --uai-700-rgb: 180 83 9;
  --uai-900-rgb: 120 53 15;
  --uai-50: #fffbeb;
  --uai-100: #fef3c7;
  --uai-500: #fbbf24;
  --uai-600: #d97706;
  --uai-700: #b45309;
  --uai-900: #78350f;
}

html[data-theme="rose"] {
  --uai-50-rgb: 255 241 242;
  --uai-100-rgb: 255 228 230;
  --uai-500-rgb: 251 113 133;
  --uai-600-rgb: 225 29 72;
  --uai-700-rgb: 190 18 60;
  --uai-900-rgb: 136 19 55;
  --uai-50: #fff1f2;
  --uai-100: #ffe4e6;
  --uai-500: #fb7185;
  --uai-600: #e11d48;
  --uai-700: #be123c;
  --uai-900: #881337;
}

html[data-theme="grafite"] {
  --uai-50-rgb: 248 250 252;
  --uai-100-rgb: 241 245 249;
  --uai-500-rgb: 100 116 139;
  --uai-600-rgb: 71 85 105;
  --uai-700-rgb: 51 65 85;
  --uai-900-rgb: 15 23 42;
  --uai-50: #f8fafc;
  --uai-100: #f1f5f9;
  --uai-500: #64748b;
  --uai-600: #475569;
  --uai-700: #334155;
  --uai-900: #0f172a;
}

/* Inspirado na imagem de referência azul-aço enviada pelo usuário
   (assets/images/theme-references/09d1bd357b19d970bca39f18098536f7.jpg) */
html[data-theme="indigo"] {
  --uai-50-rgb: 240 244 248;
  --uai-100-rgb: 223 232 240;
  --uai-500-rgb: 90 122 156;
  --uai-600-rgb: 61 90 125;
  --uai-700-rgb: 45 68 96;
  --uai-900-rgb: 23 37 53;
  --uai-50: #f0f4f8;
  --uai-100: #dfe8f0;
  --uai-500: #5a7a9c;
  --uai-600: #3d5a7d;
  --uai-700: #2d4460;
  --uai-900: #172535;
}

/* Inspirado na imagem de referência verde-sálvia enviada pelo usuário
   (assets/images/theme-references/61e9219781e5de5e55f3cb3be83c2314.jpg) */
html[data-theme="salvia"] {
  --uai-50-rgb: 246 247 242;
  --uai-100-rgb: 233 235 225;
  --uai-500-rgb: 138 154 122;
  --uai-600-rgb: 107 125 90;
  --uai-700-rgb: 85 99 71;
  --uai-900-rgb: 43 51 36;
  --uai-50: #f6f7f2;
  --uai-100: #e9ebe1;
  --uai-500: #8a9a7a;
  --uai-600: #6b7d5a;
  --uai-700: #556347;
  --uai-900: #2b3324;
}

html[data-theme="azul"] {
  --uai-50-rgb: 239 246 255;
  --uai-100-rgb: 219 234 254;
  --uai-500-rgb: 59 130 246;
  --uai-600-rgb: 37 99 235;
  --uai-700-rgb: 29 78 216;
  --uai-900-rgb: 30 58 138;
  --uai-50: #eff6ff;
  --uai-100: #dbeafe;
  --uai-500: #3b82f6;
  --uai-600: #2563eb;
  --uai-700: #1d4ed8;
  --uai-900: #1e3a8a;
}

html[data-theme="ciano"] {
  --uai-50-rgb: 236 254 255;
  --uai-100-rgb: 207 250 254;
  --uai-500-rgb: 6 182 212;
  --uai-600-rgb: 8 145 178;
  --uai-700-rgb: 14 116 144;
  --uai-900-rgb: 22 78 99;
  --uai-50: #ecfeff;
  --uai-100: #cffafe;
  --uai-500: #06b6d4;
  --uai-600: #0891b2;
  --uai-700: #0e7490;
  --uai-900: #164e63;
}

html[data-theme="laranja"] {
  --uai-50-rgb: 255 247 237;
  --uai-100-rgb: 255 237 213;
  --uai-500-rgb: 249 115 22;
  --uai-600-rgb: 234 88 12;
  --uai-700-rgb: 194 65 12;
  --uai-900-rgb: 124 45 18;
  --uai-50: #fff7ed;
  --uai-100: #ffedd5;
  --uai-500: #f97316;
  --uai-600: #ea580c;
  --uai-700: #c2410c;
  --uai-900: #7c2d12;
}

html[data-theme="limao"] {
  --uai-50-rgb: 247 254 231;
  --uai-100-rgb: 236 252 203;
  --uai-500-rgb: 132 204 22;
  --uai-600-rgb: 101 163 13;
  --uai-700-rgb: 77 124 15;
  --uai-900-rgb: 54 83 20;
  --uai-50: #f7fee7;
  --uai-100: #ecfccb;
  --uai-500: #84cc16;
  --uai-600: #65a30d;
  --uai-700: #4d7c0f;
  --uai-900: #365314;
}

html[data-theme="fucsia"] {
  --uai-50-rgb: 253 244 255;
  --uai-100-rgb: 250 232 255;
  --uai-500-rgb: 217 70 239;
  --uai-600-rgb: 192 38 211;
  --uai-700-rgb: 162 28 175;
  --uai-900-rgb: 112 26 117;
  --uai-50: #fdf4ff;
  --uai-100: #fae8ff;
  --uai-500: #d946ef;
  --uai-600: #c026d3;
  --uai-700: #a21caf;
  --uai-900: #701a75;
}

html[data-theme="vermelho"] {
  --uai-50-rgb: 254 242 242;
  --uai-100-rgb: 254 226 226;
  --uai-500-rgb: 239 68 68;
  --uai-600-rgb: 220 38 38;
  --uai-700-rgb: 185 28 28;
  --uai-900-rgb: 127 29 29;
  --uai-50: #fef2f2;
  --uai-100: #fee2e2;
  --uai-500: #ef4444;
  --uai-600: #dc2626;
  --uai-700: #b91c1c;
  --uai-900: #7f1d1d;
}

html[data-theme="roxo"] {
  --uai-50-rgb: 250 245 255;
  --uai-100-rgb: 243 232 255;
  --uai-500-rgb: 168 85 247;
  --uai-600-rgb: 147 51 234;
  --uai-700-rgb: 126 34 206;
  --uai-900-rgb: 88 28 135;
  --uai-50: #faf5ff;
  --uai-100: #f3e8ff;
  --uai-500: #a855f7;
  --uai-600: #9333ea;
  --uai-700: #7e22ce;
  --uai-900: #581c87;
}

/* ============================================================
   DARK MODE — PRETO PURO OLED (economia de bateria)
   ============================================================ */

html.dark {
  background-color: #000000 !important;
  color: #e2e8f0 !important;
}

html.dark body {
  background-color: #000000 !important;
  color: #e2e8f0 !important;
}

/* Containers, Cards, Sidebars e Header */
html.dark aside,
html.dark header {
  background-color: #0a0a0a !important;
  border-color: #1a1a1a !important;
}

html.dark .bg-white {
  background-color: #0d0d0d !important;
  color: #e2e8f0 !important;
  border-color: #1a1a1a !important;
}

html.dark .bg-slate-50 {
  background-color: #050505 !important;
  color: #e2e8f0 !important;
}

html.dark .bg-slate-100 {
  background-color: #0f0f0f !important;
  color: #cbd5e1 !important;
}

html.dark .bg-slate-200 {
  background-color: #1a1a1a !important;
}

html.dark .bg-slate-900 {
  background-color: #0a0a0a !important;
  border-color: #222222 !important;
}

html.dark .bg-slate-800 {
  background-color: #111111 !important;
}

/* Bordas */
html.dark .border-slate-200,
html.dark .border-slate-100,
html.dark .border-slate-300 {
  border-color: #2a2a2a !important;
}

/* Textos */
html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-slate-700 {
  color: #e2e8f0 !important;
}

html.dark .text-slate-600,
html.dark .text-slate-500 {
  color: #94a3b8 !important;
}

html.dark .text-slate-400,
html.dark .text-slate-300 {
  color: #64748b !important;
}

/* Inputs, Selects */
html.dark input,
html.dark select,
html.dark textarea {
  background-color: #0a0a0a !important;
  color: #e2e8f0 !important;
  border-color: #222222 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #555555 !important;
}

/* Hovers */
html.dark .hover\:bg-slate-50:hover {
  background-color: #1a1a1a !important;
}

html.dark .hover\:bg-slate-100:hover {
  background-color: #222222 !important;
}

html.dark .hover\:bg-uai-50:hover {
  background-color: #1a1a1a !important;
}

/* Badges */
html.dark .bg-emerald-50 {
  background-color: rgba(16, 185, 129, 0.10) !important;
}
html.dark .bg-red-50 {
  background-color: rgba(239, 68, 68, 0.10) !important;
}
html.dark .bg-uai-50 {
  background-color: rgba(124, 58, 237, 0.12) !important;
}
html.dark .text-emerald-600,
html.dark .text-emerald-700 {
  color: #34d399 !important;
}
html.dark .text-red-500,
html.dark .text-red-600 {
  color: #f87171 !important;
}

/* Botão de Dark Mode */
html.dark #dark-toggle {
  background: #111111 !important;
  color: #fbbf24 !important;
  border: 1px solid #222222 !important;
}

/* Login Card */
html.dark .login-card {
  background: rgba(0, 0, 0, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
}

html.dark .login-header h1 {
  color: #ffffff !important;
}

/* ---- Sobrescritas das classes uai compiladas ---- */

.bg-uai-50 {
  background-color: rgb(var(--uai-50-rgb) / var(--tw-bg-opacity, 1));
}
.bg-uai-100 {
  background-color: rgb(var(--uai-100-rgb) / var(--tw-bg-opacity, 1));
}
.bg-uai-50\/50 {
  background-color: rgb(var(--uai-50-rgb) / 0.5);
}
.bg-uai-600 {
  background-color: rgb(var(--uai-600-rgb) / var(--tw-bg-opacity, 1));
}

.text-uai-600 {
  color: rgb(var(--uai-600-rgb) / var(--tw-text-opacity, 1));
}
.text-uai-700 {
  color: rgb(var(--uai-700-rgb) / var(--tw-text-opacity, 1));
}

.border-uai-100 {
  border-color: rgb(var(--uai-100-rgb) / var(--tw-border-opacity, 1));
}
.border-uai-500 {
  border-color: rgb(var(--uai-500-rgb) / var(--tw-border-opacity, 1));
}
.border-uai-600 {
  border-color: rgb(var(--uai-600-rgb) / var(--tw-border-opacity, 1));
}

.ring-uai-600 {
  --tw-ring-color: rgb(var(--uai-600-rgb) / var(--tw-ring-opacity, 1));
}
.accent-uai-600 {
  accent-color: var(--uai-600);
}
.shadow-uai-100 {
  --tw-shadow-color: var(--uai-100);
}

.hover\:bg-uai-100:hover {
  background-color: rgb(var(--uai-100-rgb) / var(--tw-bg-opacity, 1));
}
.hover\:bg-uai-50:hover {
  background-color: rgb(var(--uai-50-rgb) / var(--tw-bg-opacity, 1));
}
.hover\:bg-uai-700:hover {
  background-color: rgb(var(--uai-700-rgb) / var(--tw-bg-opacity, 1));
}
.hover\:text-uai-600:hover {
  color: rgb(var(--uai-600-rgb) / var(--tw-text-opacity, 1));
}
.hover\:text-uai-700:hover {
  color: rgb(var(--uai-700-rgb) / var(--tw-text-opacity, 1));
}

.focus\:border-uai-600:focus {
  border-color: rgb(var(--uai-600-rgb) / var(--tw-border-opacity, 1));
}
.focus\:ring-uai-600:focus {
  --tw-ring-color: rgb(var(--uai-600-rgb) / var(--tw-ring-opacity, 1));
}

.group:hover .group-hover\:bg-uai-600 {
  background-color: rgb(var(--uai-600-rgb) / var(--tw-bg-opacity, 1));
}
.group:hover .group-hover\:text-uai-600 {
  color: rgb(var(--uai-600-rgb) / var(--tw-text-opacity, 1));
}

.peer:checked ~ .peer-checked\:border-uai-600 {
  border-color: rgb(var(--uai-600-rgb) / var(--tw-border-opacity, 1));
}
.peer:checked ~ .peer-checked\:bg-uai-50 {
  background-color: rgb(var(--uai-50-rgb) / var(--tw-bg-opacity, 1));
}
.peer:checked ~ .peer-checked\:bg-uai-600 {
  background-color: rgb(var(--uai-600-rgb) / var(--tw-bg-opacity, 1));
}
.peer:checked ~ .peer-checked\:text-uai-600 {
  color: rgb(var(--uai-600-rgb) / var(--tw-text-opacity, 1));
}
