
/* XDARK PANEL — CUSTOM OVERRIDES v3.1.3
   Professional — scoped selectors, fluid responsive, full light theme */

/* S1. LIGHT THEME VARIABLES — Enhanced contrast */
[data-theme=light-clean]{--text-primary:#0f172a;--text-secondary:#334155;--text-muted:#475569;--text-dim:#64748b;--bg-elevated:#e8ecf4;--border:#bcc5d3;--accent-bg:#6366f11a;--accent-text:#4338ca}
[data-theme=light-warm]{--text-primary:#1a1008;--text-secondary:#3d3428;--text-muted:#5c5346;--text-dim:#7a7164;--bg-elevated:#e0d8ce;--border:#b8ad9e;--accent-bg:#b453091a;--accent-text:#7c2d12}
[data-theme=light-ocean]{--text-primary:#082440;--text-secondary:#163a5c;--text-muted:#2d5a7e;--text-dim:#5080a0;--bg-elevated:#c4d8ea;--border:#92b4d0;--accent-bg:#0369a11a;--accent-text:#054985}

/* S2. LIGHT — Dark hex backgrounds → theme vars */
[data-theme^=light] .bg-\[\#0c1027\]{background-color:var(--bg-card)!important}
[data-theme^=light] .bg-\[\#0a0d20\]{background-color:var(--bg-input)!important}
[data-theme^=light] .bg-\[\#111738\]{background-color:var(--bg-elevated)!important}
[data-theme^=light] .bg-\[\#080c1a\]{background-color:var(--bg-base)!important}
[data-theme^=light] .bg-\[\#0a0e1f\]{background-color:var(--bg-input)!important}
[data-theme^=light] .bg-\[\#080b1a\]{background-color:var(--bg-base)!important}
[data-theme^=light] .bg-\[\#080b16\]{background-color:var(--bg-base)!important}
[data-theme^=light] .bg-\[\#060915\]{background-color:var(--bg-base)!important}
[data-theme^=light] .bg-\[\#060818\]{background-color:var(--bg-base)!important}
[data-theme^=light] .bg-\[\#0d1230\]{background-color:var(--bg-card)!important}
[data-theme^=light] .bg-\[\#0e1230\]{background-color:var(--bg-card)!important}
[data-theme^=light] .bg-\[\#151d45\]{background-color:var(--bg-elevated)!important}
[data-theme^=light] .bg-\[\#0d1133\]{background-color:var(--bg-card)!important}
[data-theme^=light] .bg-\[\#1a2044\]{background-color:var(--bg-elevated)!important}
[data-theme^=light] .bg-\[\#080b18\]{background-color:var(--bg-base)!important}
[data-theme^=light] .bg-\[\#1a1a2e\]{background-color:var(--bg-elevated)!important}
[data-theme^=light] .bg-\[\#1a1f2e\]{background-color:var(--bg-elevated)!important}
[data-theme^=light] .bg-\[\#2d2d2d\]{background-color:var(--bg-elevated)!important}
[data-theme^=light] .bg-\[\#444\]{background-color:var(--bg-elevated)!important}

/* S3. LIGHT — Dark hex borders → theme vars */
[data-theme^=light] .border-\[\#1a2044\]{border-color:var(--border)!important}
[data-theme^=light] .border-\[\#141b3d\]{border-color:var(--border)!important}
[data-theme^=light] .border-\[\#252d5a\]{border-color:var(--border)!important}
[data-theme^=light] .border-\[\#1e293b\]{border-color:var(--border)!important}
[data-theme^=light] .border-\[\#1e2650\]{border-color:var(--border)!important}
[data-theme^=light] .border-\[\#1e2550\]{border-color:var(--border)!important}
[data-theme^=light] .border-\[\#333\]{border-color:var(--border)!important}
[data-theme^=light] .border-\[\#444\]{border-color:var(--border)!important}
[data-theme^=light] .border-\[\#ccc\]{border-color:var(--border)!important}
[data-theme^=light] .border-\[\#ddd\]{border-color:var(--border)!important}

/* S4. LIGHT — Text colors for readability */
[data-theme^=light] .text-white{color:var(--text-primary)!important}
/* S4b. PROTECT — white text on gradient/colored backgrounds MUST stay white */
[data-theme^=light] .bg-gradient-to-br.text-white,
[data-theme^=light] .bg-gradient-to-r.text-white,
[data-theme^=light] .bg-gradient-to-br .text-white,
[data-theme^=light] .bg-gradient-to-r .text-white,
[data-theme^=light] .from-violet-500.text-white,
[data-theme^=light] .from-violet-600.text-white,
[data-theme^=light] .from-purple-600.text-white,
[data-theme^=light] [class*="from-violet"].text-white,
[data-theme^=light] [class*="from-purple"].text-white,
[data-theme^=light] [style*="gradient"] .text-white,
[data-theme^=light] .bg-red-500 .text-white,
[data-theme^=light] .bg-emerald-500.text-white{color:#fff!important}
/* Sidebar logo + nav active icons + avatar + stat card icons — force white */
[data-theme^=light] aside .bg-gradient-to-br,
[data-theme^=light] header .bg-gradient-to-br,
[data-theme^=light] .login .bg-gradient-to-br{color:#fff!important}
/* Direct: any element with gradient classes keeps white text */
[data-theme^=light] .bg-gradient-to-br[class*="text-white"],
[data-theme^=light] .bg-gradient-to-r[class*="text-white"]{color:#fff!important}
/* Protect white text on dark solid backgrounds (avatars, badges, icons) */
[data-theme^=light] .bg-slate-800.text-white,
[data-theme^=light] .bg-slate-800 .text-white,
[data-theme^=light] .bg-slate-900.text-white,
[data-theme^=light] .bg-slate-900 .text-white,
[data-theme^=light] .bg-red-500.text-white,
[data-theme^=light] .bg-red-500 .text-white,
[data-theme^=light] .bg-emerald-500 .text-white,
[data-theme^=light] .bg-violet-600.text-white,
[data-theme^=light] .bg-purple-600.text-white{color:#fff!important}
/* Dark bg elements — remap to theme in light mode */
[data-theme^=light] .bg-slate-800{background-color:var(--bg-elevated)!important;border-color:var(--border)!important}
[data-theme^=light] .bg-slate-800 .text-white{color:var(--text-primary)!important}
[data-theme^=light] .border-slate-700{border-color:var(--border)!important}
[data-theme^=light] .text-slate-600.font-mono{color:var(--text-muted)!important}
[data-theme^=light] .text-slate-300{color:var(--text-primary)!important}
[data-theme^=light] .text-slate-400{color:var(--text-secondary)!important}
[data-theme^=light] .text-slate-500{color:var(--text-muted)!important}
[data-theme^=light] .text-slate-600{color:#475569!important}
[data-theme^=light] .text-slate-700{color:#334155!important}
[data-theme^=light] .text-slate-800{color:#1e293b!important}
[data-theme^=light] .text-gray-300{color:#4b5563!important}
[data-theme^=light] .text-gray-400{color:var(--text-secondary)!important}
[data-theme^=light] .text-gray-500{color:var(--text-muted)!important}
[data-theme^=light] .text-\[\#aaa\]{color:var(--text-muted)!important}
[data-theme^=light] .text-\[\#888\]{color:var(--text-secondary)!important}
[data-theme^=light] .text-\[\#666\]{color:var(--text-secondary)!important}
[data-theme^=light] .text-\[\#555\]{color:var(--text-primary)!important}
[data-theme^=light] .text-emerald-300{color:#047857!important}
[data-theme^=light] .text-emerald-400{color:#059669!important}
[data-theme^=light] .text-emerald-500{color:#047857!important}
[data-theme^=light] .text-emerald-600{color:#065f46!important}
[data-theme^=light] .text-green-400{color:#16a34a!important}
[data-theme^=light] .text-cyan-400{color:#0891b2!important}
[data-theme^=light] .text-cyan-500{color:#0e7490!important}
[data-theme^=light] .text-cyan-700{color:#155e75!important}
[data-theme^=light] .text-blue-400{color:#1d4ed8!important}
[data-theme^=light] .text-purple-300{color:#7c3aed!important}
[data-theme^=light] .text-purple-400{color:#7c3aed!important}
[data-theme^=light] .text-purple-500{color:#6d28d9!important}
[data-theme^=light] .text-purple-600{color:#5b21b6!important}
[data-theme^=light] .text-violet-400{color:#6d28d9!important}
[data-theme^=light] .text-violet-500{color:#5b21b6!important}
[data-theme^=light] .text-red-300{color:#dc2626!important}
[data-theme^=light] .text-red-400{color:#dc2626!important}
[data-theme^=light] .text-red-500{color:#b91c1c!important}
[data-theme^=light] .text-orange-400{color:#c2410c!important}
[data-theme^=light] .text-amber-300{color:#b45309!important}
[data-theme^=light] .text-amber-400{color:#92400e!important}
[data-theme^=light] .text-amber-500{color:#78350f!important}
[data-theme^=light] .text-yellow-300{color:#a16207!important}
[data-theme^=light] .text-yellow-400{color:#854d0e!important}
[data-theme^=light] .text-yellow-600{color:#713f12!important}
[data-theme^=light] .text-pink-400{color:#db2777!important}
[data-theme^=light] .text-rose-400{color:#e11d48!important}
[data-theme^=light] .text-fuchsia-400{color:#a21caf!important}
[data-theme^=light] .text-sky-400{color:#0369a1!important}
[data-theme^=light] .text-teal-400{color:#0f766e!important}
[data-theme^=light] .text-indigo-400{color:#4338ca!important}
[data-theme^=light] .text-amber-400\/70{color:#92400eb3!important}
[data-theme^=light] .text-amber-400\/80{color:#92400ecc!important}
[data-theme^=light] .text-amber-500\/60{color:#78350f99!important}
[data-theme^=light] .text-cyan-500\/40{color:#0e749066!important}
[data-theme^=light] .text-cyan-500\/60{color:#0e749099!important}
[data-theme^=light] .text-emerald-500\/60{color:#04785799!important}
[data-theme^=light] .text-emerald-500\/70{color:#047857b3!important}
[data-theme^=light] .text-purple-400\/60{color:#7c3aed99!important}
[data-theme^=light] .text-red-400\/60{color:#dc262699!important}
[data-theme^=light] .text-red-400\/70{color:#dc2626b3!important}
[data-theme^=light] .text-red-400\/80{color:#dc2626cc!important}
[data-theme^=light] .text-violet-400\/50{color:#6d28d980!important}
[data-theme^=light] .text-violet-500\/60{color:#5b21b699!important}

/* S5. LIGHT — Background with alpha → visible */
[data-theme^=light] .bg-emerald-500\/5,[data-theme^=light] .bg-emerald-500\/8,[data-theme^=light] .bg-emerald-500\/10{background-color:#ecfdf5!important}
[data-theme^=light] .bg-emerald-500\/12,[data-theme^=light] .bg-emerald-500\/15{background-color:#d1fae5!important}
[data-theme^=light] .bg-emerald-500\/20,[data-theme^=light] .bg-emerald-500\/25,[data-theme^=light] .bg-emerald-500\/30{background-color:#a7f3d066!important}
[data-theme^=light] .bg-cyan-500\/5,[data-theme^=light] .bg-cyan-500\/8,[data-theme^=light] .bg-cyan-500\/10{background-color:#ecfeff!important}
[data-theme^=light] .bg-cyan-500\/12,[data-theme^=light] .bg-cyan-500\/15{background-color:#cffafe!important}
[data-theme^=light] .bg-cyan-500\/20,[data-theme^=light] .bg-cyan-500\/25,[data-theme^=light] .bg-cyan-500\/30{background-color:#a5f3fc66!important}
[data-theme^=light] .bg-blue-500\/5,[data-theme^=light] .bg-blue-500\/8,[data-theme^=light] .bg-blue-500\/10{background-color:#eff6ff!important}
[data-theme^=light] .bg-blue-500\/15,[data-theme^=light] .bg-blue-500\/20,[data-theme^=light] .bg-blue-500\/25{background-color:#dbeafe!important}
[data-theme^=light] .bg-purple-500\/5,[data-theme^=light] .bg-purple-500\/8,[data-theme^=light] .bg-purple-500\/10{background-color:#f5f3ff!important}
[data-theme^=light] .bg-purple-500\/15,[data-theme^=light] .bg-purple-500\/20,[data-theme^=light] .bg-purple-500\/25,[data-theme^=light] .bg-purple-600\/20{background-color:#ede9fe!important}
[data-theme^=light] .bg-red-500\/5,[data-theme^=light] .bg-red-500\/10{background-color:#fef2f2!important}
[data-theme^=light] .bg-red-500\/12,[data-theme^=light] .bg-red-500\/15,[data-theme^=light] .bg-red-600\/15{background-color:#fee2e2!important}
[data-theme^=light] .bg-red-500\/20,[data-theme^=light] .bg-red-500\/25,[data-theme^=light] .bg-red-600\/20,[data-theme^=light] .bg-red-600\/30{background-color:#fecaca66!important}
[data-theme^=light] .bg-red-500\/50{background-color:#fecaca99!important}
[data-theme^=light] .bg-red-500\/80{background-color:#fecacacc!important}
[data-theme^=light] .bg-orange-500\/8,[data-theme^=light] .bg-orange-500\/10{background-color:#fff7ed!important}
[data-theme^=light] .bg-orange-500\/12,[data-theme^=light] .bg-orange-500\/15{background-color:#ffedd5!important}
[data-theme^=light] .bg-orange-500\/20,[data-theme^=light] .bg-orange-500\/25,[data-theme^=light] .bg-orange-500\/30{background-color:#fed7aa66!important}
[data-theme^=light] .bg-amber-500\/5,[data-theme^=light] .bg-amber-500\/10{background-color:#fffbeb!important}
[data-theme^=light] .bg-amber-500\/15,[data-theme^=light] .bg-amber-500\/20,[data-theme^=light] .bg-amber-500\/25{background-color:#fef3c7!important}
[data-theme^=light] .bg-yellow-500\/5,[data-theme^=light] .bg-yellow-500\/10,[data-theme^=light] .bg-yellow-400\/10{background-color:#fefce8!important}
[data-theme^=light] .bg-yellow-500\/20{background-color:#fef9c3!important}
[data-theme^=light] .bg-violet-500\/8,[data-theme^=light] .bg-violet-500\/10,[data-theme^=light] .bg-violet-500\/12,[data-theme^=light] .bg-violet-500\/15{background-color:#ede9fe!important}
[data-theme^=light] .bg-violet-500\/20{background-color:#ddd6fe66!important}
[data-theme^=light] .bg-pink-500\/10{background-color:#fce7f3!important}
[data-theme^=light] .bg-rose-500\/10{background-color:#ffe4e6!important}
[data-theme^=light] .bg-fuchsia-500\/10,[data-theme^=light] .bg-fuchsia-500\/15{background-color:#fae8ff!important}
[data-theme^=light] .bg-sky-500\/10,[data-theme^=light] .bg-sky-500\/20{background-color:#e0f2fe!important}
[data-theme^=light] .bg-teal-500\/10{background-color:#ccfbf1!important}
[data-theme^=light] .bg-indigo-500\/10,[data-theme^=light] .bg-indigo-500\/20{background-color:#e0e7ff!important}
[data-theme^=light] .bg-green-500\/10,[data-theme^=light] .bg-green-500\/15,[data-theme^=light] .bg-green-500\/20{background-color:#dcfce7!important}
[data-theme^=light] .bg-green-600\/20,[data-theme^=light] .bg-green-600\/30{background-color:#dcfce7!important}
[data-theme^=light] .bg-gray-500\/20{background-color:#f3f4f6!important}
[data-theme^=light] .bg-slate-500\/5,[data-theme^=light] .bg-slate-500\/10{background-color:#f1f5f9!important}
[data-theme^=light] .bg-slate-500\/15,[data-theme^=light] .bg-slate-500\/20{background-color:#e2e8f0!important}
[data-theme^=light] .bg-slate-700\/40{background-color:#e2e8f0!important}
[data-theme^=light] .bg-white\/5{background-color:var(--bg-input)!important}
[data-theme^=light] .bg-white\/10{background-color:var(--bg-elevated)!important}
[data-theme^=light] .bg-black\/40{background-color:rgba(0,0,0,.18)!important}
[data-theme^=light] .bg-black\/50{background-color:rgba(0,0,0,.22)!important}
[data-theme^=light] .bg-black\/60{background-color:rgba(0,0,0,.28)!important}
[data-theme^=light] .bg-black\/70{background-color:rgba(0,0,0,.35)!important}
[data-theme^=light] .bg-black\/80{background-color:rgba(0,0,0,.45)!important}

/* S6. LIGHT — Borders with alpha → visible */
[data-theme^=light] .border-emerald-500\/10,[data-theme^=light] .border-emerald-500\/15{border-color:#6ee7b740!important}
[data-theme^=light] .border-emerald-500\/20,[data-theme^=light] .border-emerald-500\/25{border-color:#6ee7b766!important}
[data-theme^=light] .border-emerald-500\/30,[data-theme^=light] .border-emerald-500\/40,[data-theme^=light] .border-emerald-500\/50{border-color:#6ee7b799!important}
[data-theme^=light] .border-amber-500\/10,[data-theme^=light] .border-amber-500\/15{border-color:#fbbf2440!important}
[data-theme^=light] .border-amber-500\/20,[data-theme^=light] .border-amber-500\/25,[data-theme^=light] .border-amber-500\/30,[data-theme^=light] .border-amber-500\/35{border-color:#fbbf2466!important}
[data-theme^=light] .border-violet-500\/15,[data-theme^=light] .border-violet-500\/20,[data-theme^=light] .border-violet-500\/30{border-color:#8b5cf666!important}
[data-theme^=light] .border-violet-500\/40,[data-theme^=light] .border-violet-500\/50{border-color:#8b5cf680!important}
[data-theme^=light] .border-cyan-500\/10,[data-theme^=light] .border-cyan-500\/15{border-color:#06b6d440!important}
[data-theme^=light] .border-cyan-500\/20,[data-theme^=light] .border-cyan-500\/25,[data-theme^=light] .border-cyan-500\/30{border-color:#06b6d466!important}
[data-theme^=light] .border-cyan-500\/40,[data-theme^=light] .border-cyan-500\/50{border-color:#06b6d480!important}
[data-theme^=light] .border-blue-500\/15,[data-theme^=light] .border-blue-500\/20,[data-theme^=light] .border-blue-500\/30{border-color:#3b82f666!important}
[data-theme^=light] .border-blue-500\/40{border-color:#3b82f680!important}
[data-theme^=light] .border-red-500\/10,[data-theme^=light] .border-red-500\/15{border-color:#ef444440!important}
[data-theme^=light] .border-red-500\/20,[data-theme^=light] .border-red-500\/30{border-color:#ef444466!important}
[data-theme^=light] .border-red-500\/40{border-color:#ef444480!important}
[data-theme^=light] .border-red-600\/30{border-color:#dc262666!important}
[data-theme^=light] .border-orange-500\/15,[data-theme^=light] .border-orange-500\/20,[data-theme^=light] .border-orange-500\/25{border-color:#f9731666!important}
[data-theme^=light] .border-orange-500\/30,[data-theme^=light] .border-orange-500\/40{border-color:#f9731680!important}
[data-theme^=light] .border-purple-500\/15,[data-theme^=light] .border-purple-500\/20,[data-theme^=light] .border-purple-500\/30{border-color:#a855f766!important}
[data-theme^=light] .border-purple-500\/40,[data-theme^=light] .border-purple-500\/50{border-color:#a855f780!important}
[data-theme^=light] .border-pink-500\/20{border-color:#ec489966!important}
[data-theme^=light] .border-rose-500\/30{border-color:#f43f5e80!important}
[data-theme^=light] .border-green-500\/30{border-color:#22c55e80!important}
[data-theme^=light] .border-green-600\/30{border-color:#16a34a80!important}
[data-theme^=light] .border-indigo-500\/15,[data-theme^=light] .border-indigo-500\/20,[data-theme^=light] .border-indigo-500\/30{border-color:#6366f166!important}
[data-theme^=light] .border-indigo-500\/50{border-color:#6366f199!important}
[data-theme^=light] .border-sky-500\/20{border-color:#0ea5e966!important}
[data-theme^=light] .border-teal-500\/20{border-color:#14b8a666!important}
[data-theme^=light] .border-gray-500\/30{border-color:#6b728080!important}
[data-theme^=light] .border-slate-500\/20{border-color:#64748b66!important}
[data-theme^=light] .border-slate-500\/30{border-color:#64748b80!important}
[data-theme^=light] .border-slate-700\/50{border-color:#cbd5e1!important}
[data-theme^=light] .border-white\/10,[data-theme^=light] .border-white\/20,[data-theme^=light] .border-white\/30{border-color:var(--border)!important}
[data-theme^=light] .border-yellow-500\/15,[data-theme^=light] .border-yellow-500\/20{border-color:#eab30866!important}
[data-theme^=light] .border-yellow-500\/30,[data-theme^=light] .border-yellow-500\/40,[data-theme^=light] .border-yellow-500\/50{border-color:#eab30880!important}

/* S7. LIGHT — Hover states */
[data-theme^=light] .hover\:bg-\[\#111738\]:hover{background-color:var(--bg-elevated)!important}
[data-theme^=light] .hover\:bg-\[\#0c1027\]:hover{background-color:var(--bg-card)!important}
[data-theme^=light] .hover\:bg-\[\#0a0d20\]:hover{background-color:var(--bg-input)!important}
[data-theme^=light] .hover\:bg-\[\#1a2044\]:hover{background-color:var(--bg-elevated)!important}
[data-theme^=light] .hover\:bg-\[\#0d1230\]:hover{background-color:var(--bg-card)!important}
[data-theme^=light] .hover\:bg-\[\#0e1230\]:hover{background-color:var(--bg-card)!important}
[data-theme^=light] .hover\:bg-\[\#080c1a\]:hover{background-color:var(--bg-base)!important}
[data-theme^=light] .hover\:bg-\[\#151d45\]:hover{background-color:var(--bg-elevated)!important}
[data-theme^=light] .hover\:bg-white\/5:hover,[data-theme^=light] .hover\:bg-white\/10:hover{background-color:var(--bg-elevated)!important}
[data-theme^=light] .hover\:bg-slate-800:hover{background-color:var(--bg-elevated)!important}
[data-theme^=light] .hover\:text-white:hover{color:var(--text-primary)!important}
[data-theme^=light] .hover\:text-slate-300:hover,[data-theme^=light] .hover\:text-gray-200:hover{color:var(--text-primary)!important}
[data-theme^=light] .hover\:text-slate-400:hover{color:var(--text-secondary)!important}
[data-theme^=light] .hover\:text-emerald-300:hover{color:#047857!important}
[data-theme^=light] .hover\:text-emerald-400:hover{color:#059669!important}
[data-theme^=light] .hover\:text-purple-300:hover,[data-theme^=light] .hover\:text-purple-400:hover{color:#6d28d9!important}
[data-theme^=light] .hover\:text-violet-400:hover{color:#6d28d9!important}
[data-theme^=light] .hover\:text-blue-300:hover,[data-theme^=light] .hover\:text-blue-400:hover{color:#1d4ed8!important}
[data-theme^=light] .hover\:text-red-300:hover,[data-theme^=light] .hover\:text-red-400:hover{color:#dc2626!important}
[data-theme^=light] .hover\:text-orange-300:hover,[data-theme^=light] .hover\:text-orange-400:hover{color:#c2410c!important}
[data-theme^=light] .hover\:text-amber-400:hover{color:#92400e!important}
[data-theme^=light] .hover\:text-yellow-400:hover{color:#854d0e!important}
[data-theme^=light] .hover\:text-cyan-400:hover{color:#0891b2!important}
[data-theme^=light] .hover\:border-\[\#252d5a\]:hover,[data-theme^=light] .hover\:border-slate-500:hover,[data-theme^=light] .hover\:border-slate-600:hover{border-color:var(--border)!important}
[data-theme^=light] .group-hover\:text-slate-300{color:var(--text-primary)!important}
[data-theme^=light] .group-hover\:text-purple-400{color:#6d28d9!important}
[data-theme^=light] .group-hover\:text-emerald-400{color:#059669!important}
[data-theme^=light] .group-hover\:text-orange-400{color:#ea580c!important}

/* S8. LIGHT — Inputs, focus, forms */
[data-theme^=light] input,[data-theme^=light] select,[data-theme^=light] textarea{background-color:var(--bg-input)!important;border-color:var(--border)!important;color:var(--text-primary)!important}
[data-theme^=light] input::placeholder,[data-theme^=light] textarea::placeholder{color:var(--text-muted)!important}
[data-theme^=light] input:focus,[data-theme^=light] select:focus,[data-theme^=light] textarea:focus{border-color:var(--accent)!important;box-shadow:0 0 0 2px var(--accent-bg)!important}
[data-theme^=light] .placeholder-slate-600::placeholder,[data-theme^=light] .placeholder-slate-700::placeholder{color:#94a3b8!important}
[data-theme^=light] .placeholder-gray-600::placeholder{color:#9ca3af!important}

/* S9. LIGHT — Rings, dividers, gradients, shadows */
[data-theme^=light] .ring-violet-500\/30,[data-theme^=light] .ring-purple-500\/30{--tw-ring-color:#8b5cf650!important}
[data-theme^=light] .ring-emerald-500\/20{--tw-ring-color:#10b98140!important}
[data-theme^=light] .ring-blue-500\/30{--tw-ring-color:#3b82f650!important}
[data-theme^=light] .ring-red-500\/20{--tw-ring-color:#ef444440!important}
[data-theme^=light] .ring-cyan-500\/30{--tw-ring-color:#06b6d450!important}
[data-theme^=light] .divide-\[\#1a2044\]>:not([hidden])~:not([hidden]),[data-theme^=light] .divide-\[\#1a2044\]\/40>:not([hidden])~:not([hidden]),[data-theme^=light] .divide-\[\#1a2044\]\/50>:not([hidden])~:not([hidden]){border-color:var(--border)!important}
[data-theme^=light] .divide-slate-700>:not([hidden])~:not([hidden]),[data-theme^=light] .divide-slate-800>:not([hidden])~:not([hidden]){border-color:var(--border)!important}
[data-theme^=light] .from-white{--tw-gradient-from:var(--text-primary)!important}
[data-theme^=light] .from-slate-300{--tw-gradient-from:var(--text-secondary)!important}
[data-theme^=light] .from-black{--tw-gradient-from:var(--text-primary)!important}
[data-theme^=light] .to-slate-400{--tw-gradient-to:#475569!important}
[data-theme^=light] .to-slate-700{--tw-gradient-to:var(--text-muted)!important}
[data-theme^=light] .shadow-lg{box-shadow:0 10px 15px -3px rgba(0,0,0,.06),0 4px 6px -4px rgba(0,0,0,.04)!important}
[data-theme^=light] .shadow-xl{box-shadow:0 20px 25px -5px rgba(0,0,0,.06),0 8px 10px -6px rgba(0,0,0,.04)!important}
[data-theme^=light] .shadow-2xl{box-shadow:0 25px 50px -12px rgba(0,0,0,.08)!important}
[data-theme^=light] .max-w-\[1600px\]>.rounded-2xl,[data-theme^=light] .max-w-\[1600px\] .space-y-3>.rounded-2xl{box-shadow:0 1px 3px rgba(0,0,0,.06)!important}
[data-theme^=light] ::-webkit-scrollbar-track{background:var(--bg-base)!important}
[data-theme^=light] ::-webkit-scrollbar-thumb{background:var(--scrollbar)!important}
[data-theme^=light] ::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-hover)!important}
[data-theme^=light] .disabled\:bg-slate-700:disabled{background-color:#e2e8f0!important}
[data-theme^=light] .disabled\:text-slate-500:disabled{color:#94a3b8!important}

/* S10. LIGHT — Button text protection */
[data-theme^=light] button.bg-violet-600,[data-theme^=light] button.bg-violet-700,[data-theme^=light] button.bg-emerald-500,[data-theme^=light] button.bg-emerald-600,[data-theme^=light] button.bg-emerald-700,[data-theme^=light] button.bg-red-500,[data-theme^=light] button.bg-red-600,[data-theme^=light] button.bg-blue-500,[data-theme^=light] button.bg-blue-600,[data-theme^=light] button.bg-green-500,[data-theme^=light] button.bg-green-600,[data-theme^=light] button.bg-purple-500,[data-theme^=light] button.bg-purple-600,[data-theme^=light] button.bg-purple-700,[data-theme^=light] button.bg-orange-500,[data-theme^=light] button.bg-cyan-500,[data-theme^=light] button.bg-indigo-500,[data-theme^=light] button.bg-pink-500,[data-theme^=light] button.bg-rose-500,[data-theme^=light] button.bg-sky-500,[data-theme^=light] button.bg-teal-500,[data-theme^=light] button.bg-amber-500,[data-theme^=light] button.bg-yellow-500,[data-theme^=light] button.bg-slate-500,[data-theme^=light] button.bg-slate-600{color:#fff!important}
[data-theme^=light] button[class*="bg-violet"] .text-white,[data-theme^=light] button[class*="bg-emerald"] .text-white,[data-theme^=light] button[class*="bg-red-5"] .text-white,[data-theme^=light] button[class*="bg-blue-5"] .text-white,[data-theme^=light] button[class*="bg-green-5"] .text-white,[data-theme^=light] button[class*="bg-purple-5"] .text-white,[data-theme^=light] button[class*="bg-orange-5"] .text-white,[data-theme^=light] button[class*="bg-cyan-5"] .text-white,[data-theme^=light] button[class*="bg-indigo-5"] .text-white,[data-theme^=light] button[class*="bg-pink-5"] .text-white,[data-theme^=light] button[class*="bg-rose-5"] .text-white,[data-theme^=light] button[class*="bg-sky-5"] .text-white,[data-theme^=light] button[class*="bg-teal-5"] .text-white,[data-theme^=light] button[class*="bg-slate-5"] .text-white,[data-theme^=light] button[class*="bg-slate-6"] .text-white{color:#fff!important}
[data-theme^=light] [data-sonner-toaster] [data-sonner-toast],[data-theme^=light] .go2072408551{background:var(--bg-card)!important;color:var(--text-primary)!important;border-color:var(--border)!important}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR COLLAPSIBLE — GitHub-style
   Desktop: 280px expanded ↔ 60px collapsed (icons only)
   Tablet: auto-collapse to 60px icons
   Mobile (<768px): overlay slide-in (React default behavior)
   Toggle via html.sb-c class
   ═══════════════════════════════════════════════════════════════ */

/* ── MOBILE (<768px) — overlay sidebar, full height ── */
@media(max-width:767px){
  .fixed.inset-y-0.left-0.z-50{
    width:260px!important;
    max-width:80vw!important;
    transition:transform .3s cubic-bezier(.4,0,.2,1)!important;
  }
  aside.shrink-0{
    width:100%!important;
    min-width:0!important;
  }
  /* Overlay backdrop when sidebar is open */
  .fixed.inset-y-0.left-0.z-50.translate-x-0~div::before{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.5);
    z-index:40;
  }
  aside.shrink-0 nav a{
    padding:0.5rem 0.75rem!important;
    font-size:0.8rem!important;
  }
  aside.shrink-0 nav a svg{
    width:18px!important;
    height:18px!important;
    flex-shrink:0!important;
  }
  aside .px-5.py-4{
    padding:0.5rem 0.75rem!important;
  }
}

/* ── TABLET (768px–1023px) — auto-collapse to icons only ── */
@media(min-width:768px) and (max-width:1023px){
  .fixed.inset-y-0.left-0.z-50{
    width:60px!important;
    position:relative!important;
    transform:none!important;
    transition:width .25s cubic-bezier(.4,0,.2,1)!important;
    flex-shrink:0!important;
    overflow:visible!important;
  }
  /* Force sidebar always visible (not translated away) */
  .fixed.inset-y-0.left-0.z-50.\-translate-x-full{
    transform:none!important;
  }
  aside.shrink-0{
    width:60px!important;
    min-width:60px!important;
    overflow:visible!important;
  }
  /* Hide header hamburger — sidebar is always visible collapsed on tablet */
  header>button:first-child{
    display:none!important;
  }
  /* Show the desktop spacer div instead */
  header>div:first-of-type{
    display:block!important;
  }
  /* Hide text labels */
  aside.shrink-0 nav a>span:not(:first-child),
  aside.shrink-0 nav a>div~span{
    opacity:0!important;max-width:0!important;margin:0!important;padding:0!important;overflow:hidden!important;
  }
  /* Hide section titles */
  aside.shrink-0 nav .text-\[9px\]{
    opacity:0!important;height:0!important;margin:0!important;overflow:hidden!important;
  }
  /* Hide logo text */
  aside.shrink-0>div:first-child .gap-3>div:last-child{
    opacity:0!important;max-width:0!important;display:none!important;
  }
  /* Hide user info text */
  aside.shrink-0>div:last-child .min-w-0{display:none!important}
  aside.shrink-0>div:last-child .gap-1\.5{display:none!important}
  /* Nav links icon-only */
  aside.shrink-0 nav a{
    padding:0!important;gap:0!important;justify-content:center!important;align-items:center!important;
    margin:0 auto!important;width:100%!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;position:relative!important;
    overflow:hidden!important;
  }
  aside.shrink-0 nav a>.w-9.h-9{
    width:42px!important;height:42px!important;border-radius:10px!important;margin:2px auto!important;
  }
  aside.shrink-0 nav a>.w-9.h-9 svg{width:20px!important;height:20px!important}
  aside.shrink-0 nav a>.flex-1{display:none!important}
  aside.shrink-0 nav a>svg:last-child{display:none!important}
  /* Compact nav spacing */
  aside.shrink-0 nav{padding:4px 0!important;overflow:visible!important}
  aside.shrink-0 nav .space-y-0\.5>*+*,
  aside.shrink-0 nav .space-y-1>*+*,
  aside.shrink-0 nav .space-y-4>*+*{margin-top:1px!important}
  /* Logo header compact */
  aside.shrink-0>div:first-child{padding:8px 0!important;justify-content:center!important;overflow:hidden!important}
  aside.shrink-0>div:first-child .flex.items-center.gap-3{justify-content:center!important;gap:6px!important}
  /* User area compact */
  aside.shrink-0>div:last-child{padding:4px 0!important;overflow:hidden!important}
  aside.shrink-0>div:last-child a,
  aside.shrink-0>div:last-child>div{justify-content:center!important;padding:4px!important;gap:4px!important}
  aside.shrink-0>div:last-child a>.min-w-0,
  aside.shrink-0>div:last-child a>.gap-1\.5{display:none!important}
}

/* ── DESKTOP (≥1024px) — sidebar always visible, collapses to icons ── */
@media(min-width:1024px){

  /* Sidebar WRAPPER div (React: lg:relative) — must also transition width */
  .fixed.inset-y-0.left-0.z-50{
    width:280px!important;
    transition:width .25s cubic-bezier(.4,0,.2,1)!important;
    flex-shrink:0!important;
  }
  html.sb-c .fixed.inset-y-0.left-0.z-50{
    width:60px!important;
    overflow:visible!important;
  }

  /* Sidebar smooth transition */
  aside.shrink-0{
    width:280px!important;
    min-width:280px!important;
    transition:width .25s cubic-bezier(.4,0,.2,1),min-width .25s cubic-bezier(.4,0,.2,1)!important;
    overflow:visible!important;
  }

  /* Collapsed: 60px icons only */
  html.sb-c aside.shrink-0{
    width:60px!important;
    min-width:60px!important;
  }

  /* Text labels — fade out when collapsed */
  aside.shrink-0 nav a>span:not(:first-child),
  aside.shrink-0 nav a>div~span{
    transition:opacity .2s,max-width .25s;
    max-width:200px;
    overflow:hidden;
    white-space:nowrap;
  }
  html.sb-c aside.shrink-0 nav a>span:not(:first-child),
  html.sb-c aside.shrink-0 nav a>div~span{
    opacity:0!important;
    max-width:0!important;
    margin:0!important;
    padding:0!important;
  }

  /* Section titles (PRINCIPAL, GESTAO, etc) — hide */
  aside.shrink-0 nav .text-\[9px\]{
    transition:opacity .15s,height .2s;
  }
  html.sb-c aside.shrink-0 nav .text-\[9px\]{
    opacity:0!important;
    height:0!important;
    margin:0!important;
    overflow:hidden!important;
  }

  /* Logo text — hide */
  aside.shrink-0>div:first-child .gap-3>div:last-child{
    transition:opacity .2s,max-width .25s;
    overflow:hidden;
  }
  html.sb-c aside.shrink-0>div:first-child .gap-3>div:last-child{
    opacity:0!important;
    max-width:0!important;
    display:none!important;
  }

  /* User info at bottom — hide text, keep avatar */
  html.sb-c aside.shrink-0>div:last-child .min-w-0{display:none!important}
  html.sb-c aside.shrink-0>div:last-child .gap-1\.5{display:none!important}

  /* === COLLAPSED STATE === */

  html.sb-c aside.shrink-0{overflow:visible!important}

  /* Nav container */
  html.sb-c aside.shrink-0 nav{
    padding:4px 0!important;
    overflow:visible!important;
  }
  /* Kill all space-y margins */
  html.sb-c aside.shrink-0 nav .space-y-0\.5>*+*,
  html.sb-c aside.shrink-0 nav .space-y-1>*+*,
  html.sb-c aside.shrink-0 nav .space-y-4>*+*{margin-top:1px!important}

  /* Each nav link: strip all padding/gap, show only the icon wrapper */
  html.sb-c aside.shrink-0 nav a{
    padding:0!important;
    gap:0!important;
    justify-content:center!important;
    align-items:center!important;
    margin:0 auto!important;
    width:100%!important;
    height:auto!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    position:relative!important;
    overflow:hidden!important;
  }

  /* The icon wrapper div (w-9 h-9) — this IS the visible button */
  html.sb-c aside.shrink-0 nav a>.w-9.h-9{
    width:46px!important;
    height:46px!important;
    border-radius:12px!important;
    margin:2px auto!important;
    background:var(--bg-elevated)!important;
    box-shadow:none!important;
  }
  /* Icon SVG inside — bigger, easy to see */
  html.sb-c aside.shrink-0 nav a>.w-9.h-9 svg{
    width:24px!important;
    height:24px!important;
  }
  /* Hover on the icon box — bg only, no border shift */
  html.sb-c aside.shrink-0 nav a:hover>.w-9.h-9{
    background:var(--accent-bg)!important;
  }

  /* Active page icon */
  html.sb-c aside.shrink-0 nav a[style*="backgroundColor"]>.w-9.h-9{
    box-shadow:inset 0 0 0 2px var(--accent)!important;
  }

  /* Hide the text label span */
  html.sb-c aside.shrink-0 nav a>.flex-1{
    display:none!important;
  }
  /* Hide the chevron */
  html.sb-c aside.shrink-0 nav a>svg:last-child{
    display:none!important;
  }

  /* Logo header */
  html.sb-c aside.shrink-0>div:first-child{
    padding:8px 0!important;
    justify-content:center!important;
    overflow:hidden!important;
  }
  html.sb-c aside.shrink-0>div:first-child .flex.items-center.gap-3{
    justify-content:center!important;
    gap:0!important;
  }

  /* User area at bottom */
  html.sb-c aside.shrink-0>div:last-child{
    padding:4px 0!important;
    overflow:hidden!important;
  }
  html.sb-c aside.shrink-0>div:last-child a,
  html.sb-c aside.shrink-0>div:last-child>div{
    justify-content:center!important;
    padding:4px!important;
    gap:0!important;
  }
  html.sb-c aside.shrink-0>div:last-child a>.min-w-0,
  html.sb-c aside.shrink-0>div:last-child a>.gap-1\.5{
    display:none!important;
  }

}

/* sb-hamburger: only show on desktop (≥1024px) for sidebar collapse toggle */
.sb-hamburger{
  display:none!important;
}
@media(min-width:1024px){
  .sb-hamburger{
    display:flex!important;
    width:32px;
    height:32px;
    border-radius:6px;
    border:1px solid transparent;
    background:transparent;
    color:var(--text-muted);
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:background .12s,color .12s;
    flex-shrink:0;
    margin-right:6px;
    padding:0;
    outline:none;
  }
  .sb-hamburger:hover{
    background:var(--bg-elevated);
    color:var(--text-primary);
  }
  .sb-hamburger:active{
    background:var(--bg-input);
  }
  .sb-hamburger svg{
    pointer-events:none;
  }
}
/* Hide old/unused elements */
.sb-btn{display:none!important}
.sb-toggle{display:none!important}
.sb-overlay{display:none!important}
.sb-close{display:none!important}

/* Hide close button inside sidebar header — keep only the header hamburger */
aside.shrink-0 .px-5.py-4>button{
  display:none!important;
}

/* RESPONSIVE — SCOPED to .max-w-[1600px] main content */

/* R1. Layout */
aside .px-5.py-4{padding:clamp(0.6rem,1vw,1.25rem) clamp(0.8rem,1.2vw,1.25rem)!important;position:relative!important}
aside .w-10.h-10{width:clamp(1.8rem,2.2vw,2.5rem)!important;height:clamp(1.8rem,2.2vw,2.5rem)!important}
/* Logo — replace SVG with icon-192.png image */
aside .px-5.py-4 .w-10.h-10.rounded-xl{
  background-image:url('/icon-192.png')!important;
  background-size:cover!important;
  background-position:center!important;
  background-color:transparent!important;
  border:none!important;
  box-shadow:none!important;
}
aside .px-5.py-4 .w-10.h-10.rounded-xl>svg{
  display:none!important;
}
aside .text-xl{font-size:clamp(0.9rem,1.1vw,1.25rem)!important}
aside nav a{padding:clamp(0.35rem,0.5vw,0.5rem) clamp(0.55rem,0.8vw,0.75rem)!important;font-size:clamp(0.73rem,0.85vw,0.875rem)!important;gap:clamp(0.4rem,0.6vw,0.75rem)!important;border-radius:clamp(0.4rem,0.5vw,0.625rem)!important}
aside nav a svg{width:clamp(14px,1.1vw,18px)!important;height:clamp(14px,1.1vw,18px)!important}
aside nav .text-xs{font-size:clamp(0.6rem,0.68vw,0.75rem)!important}
header.h-\[60px\]{height:clamp(46px,4vw,60px)!important}
main.flex-1.overflow-auto{padding:0.4rem 0.5rem!important;box-sizing:border-box!important;overflow-x:hidden!important}
div.max-w-\[1600px\].mx-auto,
.max-w-\[1600px\].mx-auto{max-width:100%!important;width:100%!important;margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important;box-sizing:border-box!important}
/* Sidebar hidden → more space */
html.sb-c main.flex-1.overflow-auto{padding:0.4rem 0.4rem!important}

/* R2. Cards — scoped (compact but with minimal lateral padding) */
.max-w-\[1600px\] .rounded-2xl.p-4{padding:0.35rem 0.4rem!important}
.max-w-\[1600px\] .rounded-2xl.p-5{padding:0.4rem 0.5rem!important}
.max-w-\[1600px\] .rounded-2xl.p-6{padding:0.4rem 0.5rem!important}
.max-w-\[1600px\] .rounded-2xl.p-8{padding:0.5rem 0.6rem!important}

/* R3. Spacing — scoped */
.max-w-\[1600px\] .space-y-6>*+*{margin-top:clamp(0.8rem,1.5vw,1.5rem)!important}
.max-w-\[1600px\] .space-y-5>*+*{margin-top:clamp(0.65rem,1.2vw,1.25rem)!important}
.max-w-\[1600px\] .space-y-4>*+*{margin-top:clamp(0.55rem,1vw,1rem)!important}
.max-w-\[1600px\] .space-y-3>*+*{margin-top:clamp(0.4rem,0.75vw,0.75rem)!important}
.max-w-\[1600px\] .gap-4{gap:clamp(0.55rem,1vw,1rem)!important}
.max-w-\[1600px\] .gap-3{gap:clamp(0.4rem,0.75vw,0.75rem)!important}

/* R4. Typography — scoped */
.max-w-\[1600px\] .text-2xl{font-size:clamp(1.1rem,1.4vw,1.5rem)!important}
.max-w-\[1600px\] .text-xl{font-size:clamp(0.95rem,1.2vw,1.25rem)!important}
.max-w-\[1600px\] .text-lg{font-size:clamp(0.88rem,1.05vw,1.125rem)!important}
.max-w-\[1600px\] .text-sm{font-size:clamp(0.75rem,0.85vw,0.875rem)!important}
.max-w-\[1600px\] .text-xs{font-size:clamp(0.65rem,0.74vw,0.75rem)!important}
.max-w-\[1600px\] .text-\[10px\]{font-size:clamp(9px,0.62vw,10px)!important}
.max-w-\[1600px\] .text-\[11px\]{font-size:clamp(9.5px,0.68vw,11px)!important}
.max-w-\[1600px\] .text-\[9px\]{font-size:clamp(8px,0.56vw,9px)!important}
.max-w-\[1600px\] .text-\[8px\]{font-size:clamp(7px,0.5vw,8px)!important}

/* R5. Icons — scoped */
.max-w-\[1600px\] .w-5.h-5{width:clamp(1rem,1.2vw,1.25rem)!important;height:clamp(1rem,1.2vw,1.25rem)!important}
.max-w-\[1600px\] .w-4.h-4{width:clamp(0.85rem,1vw,1rem)!important;height:clamp(0.85rem,1vw,1rem)!important}

/* R6. Inputs — scoped */
.max-w-\[1600px\] input:not([type=checkbox]):not([type=radio]):not([type=range]),.max-w-\[1600px\] select,.max-w-\[1600px\] textarea{padding:clamp(0.38rem,0.6vw,0.5rem) clamp(0.55rem,0.9vw,0.875rem)!important;font-size:clamp(0.74rem,0.85vw,0.875rem)!important}
.max-w-\[1600px\] label.text-xs{font-size:clamp(0.63rem,0.72vw,0.75rem)!important}

/* R7. Tables — scoped (compact padding) */
.max-w-\[1600px\] table th,.max-w-\[1600px\] table td{padding:clamp(0.3rem,0.5vw,0.5rem) clamp(0.25rem,0.5vw,0.5rem)!important;font-size:clamp(0.68rem,0.8vw,0.8125rem)!important}

/* R8. Grids — scale at xl */
@media (min-width:1600px){
  .max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4{grid-template-columns:repeat(5,1fr)!important}
  .max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-5{grid-template-columns:repeat(6,1fr)!important}
  .max-w-\[1600px\] .grid.grid-cols-2.md\:grid-cols-3{grid-template-columns:repeat(4,1fr)!important}
  .max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-3.xl\:grid-cols-4{grid-template-columns:repeat(5,1fr)!important}
  main.flex-1.overflow-auto{padding:0.5rem 0.75rem!important}
}

/* R9. Modals — adaptive */
.bg-black\/50>.max-w-2xl,.bg-black\/60>.max-w-2xl{max-width:min(92vw,42rem)!important}
.bg-black\/50>.max-w-lg,.bg-black\/60>.max-w-lg{max-width:min(92vw,32rem)!important}
.bg-black\/50>.max-w-md,.bg-black\/60>.max-w-md{max-width:min(92vw,28rem)!important}

/* R10. Profile — theme selector compact */
.max-w-3xl.mx-auto{max-width:min(96vw,48rem)!important}
@media (min-width:1600px){.max-w-3xl.mx-auto{max-width:56rem!important}}
.max-w-3xl .w-24.h-24{width:clamp(2.8rem,4vw,4rem)!important;height:clamp(2.8rem,4vw,4rem)!important;border-radius:clamp(0.5rem,0.8vw,1rem)!important}
.max-w-3xl .flex.items-center.gap-6{gap:clamp(0.8rem,1.2vw,1.5rem)!important}
.max-w-3xl .grid.grid-cols-2.md\:grid-cols-3.gap-3{gap:clamp(0.3rem,0.5vw,0.5rem)!important}
@media (min-width:640px){.max-w-3xl .grid.grid-cols-2.md\:grid-cols-3.gap-3{grid-template-columns:repeat(4,1fr)!important}}
@media (min-width:1400px){.max-w-3xl .grid.grid-cols-2.md\:grid-cols-3.gap-3{grid-template-columns:repeat(5,1fr)!important}}
.max-w-3xl .grid.grid-cols-2.md\:grid-cols-3.gap-3>button{padding:clamp(0.38rem,0.5vw,0.5rem) clamp(0.42rem,0.6vw,0.625rem)!important;border-radius:clamp(0.4rem,0.6vw,0.625rem)!important;border-width:1.5px!important}
.max-w-3xl .grid.grid-cols-2.md\:grid-cols-3.gap-3>button>.flex.gap-1.mb-3{margin-bottom:clamp(0.2rem,0.3vw,0.35rem)!important;gap:2px!important}
.max-w-3xl .grid.grid-cols-2.md\:grid-cols-3.gap-3>button>.flex.gap-1.mb-3>div{height:clamp(4px,0.4vw,5px)!important;border-radius:3px!important}
.max-w-3xl .grid.grid-cols-2.md\:grid-cols-3.gap-3>button>.rounded-lg.overflow-hidden.mb-3{display:none!important}
.max-w-3xl .grid.grid-cols-2.md\:grid-cols-3.gap-3>button>.flex.items-center.gap-2{gap:clamp(0.15rem,0.25vw,0.25rem)!important}
.max-w-3xl .grid.grid-cols-2.md\:grid-cols-3.gap-3>button>.flex.items-center.gap-2>span:last-child{font-size:clamp(0.65rem,0.74vw,0.78rem)!important;font-weight:600!important}
.max-w-3xl .grid.grid-cols-2.md\:grid-cols-3.gap-3>button>.absolute.top-2.right-2{top:.3rem!important;right:.3rem!important;width:clamp(0.85rem,1vw,1.1rem)!important;height:clamp(0.85rem,1vw,1.1rem)!important}
.max-w-3xl .grid.grid-cols-2.md\:grid-cols-3.gap-3>button>.absolute.top-2.right-2 svg{width:clamp(9px,0.7vw,11px)!important;height:clamp(9px,0.7vw,11px)!important}
.max-w-3xl .flex.flex-wrap.gap-2>button.w-9.h-9{width:clamp(1.4rem,1.7vw,2rem)!important;height:clamp(1.4rem,1.7vw,2rem)!important;border-radius:clamp(0.35rem,0.5vw,0.5rem)!important}

/* R11. Small screens — compact */
@media (max-width:1023px){
  main.flex-1.overflow-auto{padding:0.3rem 0.25rem!important}
  .max-w-\[1600px\] .rounded-2xl.p-4,
  .max-w-\[1600px\] .rounded-2xl.p-5,
  .max-w-\[1600px\] .rounded-2xl.p-6{padding:0.3rem 0.25rem!important}
  .max-w-\[1600px\] table thead th{padding:8px 3px!important;font-size:10px!important}
  .max-w-\[1600px\] table tbody td{padding:6px 3px!important;font-size:11px!important}
  .max-w-\[1600px\] .overflow-x-auto{overflow-x:auto!important}
  .max-w-\[1600px\] table{min-width:700px!important}
  /* Header compact */
  header.h-\[60px\]{height:44px!important;padding:0 0.5rem!important}
  header .text-\[10px\]{font-size:8px!important}
  header .text-lg{font-size:0.8rem!important}
  header .text-\[8px\]{font-size:7px!important}
  /* Clocks hide on very small */
  header .hidden.lg\:flex{display:none!important}
}
/* R11b. Very small screens (<640px) */
@media (max-width:639px){
  main.flex-1.overflow-auto{padding:0.2rem 0.15rem!important}
  .max-w-\[1600px\] .text-2xl{font-size:1rem!important}
  .max-w-\[1600px\] .text-xl{font-size:0.9rem!important}
  .max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4{grid-template-columns:repeat(2,1fr)!important;gap:0.3rem!important}
  .max-w-\[1600px\] table{min-width:600px!important}
  /* Toolbar stack vertically */
  .max-w-\[1600px\]>.rounded-2xl .flex.flex-wrap{flex-wrap:wrap!important;gap:4px!important}
  .max-w-\[1600px\] input[placeholder*="Buscar"]{min-width:100%!important;max-width:100%!important}
}

/* R12. Scrollbar */
::-webkit-scrollbar{width:clamp(5px,0.4vw,8px)!important;height:clamp(5px,0.4vw,8px)!important}
::-webkit-scrollbar-track{background:var(--bg-base)!important;border-radius:4px!important}
::-webkit-scrollbar-thumb{background:var(--scrollbar)!important;border-radius:4px!important}
::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-hover)!important}

/* ═══════════════════════════════════════════════════════════════
   LOGS TABLE — Enhanced visibility (ALL themes)
   Targeted: the main data table used in Logs dos Projetos,
   Project Logs, and Live Connections pages
   ═══════════════════════════════════════════════════════════════ */

/* ── Table: full width, compact columns ── */
.max-w-\[1600px\] table{
  width:100%!important;
  table-layout:fixed!important;
  max-width:100%!important;
}
/* Column widths — balanced distribution (% based for responsive) */
/* 1:checkbox 2:projeto 3:logs 4:user/senha 5:refer 6:operador 7:comentario 8:pais 9:disp 10:status 11:pagina 12:acoes */
/* Column widths — balanced distribution (% based for responsive) */
/* 1:checkbox 2:projeto 3:logs 4:user/senha 5:refer 6:operador 7:comentario 8:pais 9:disp 10:status 11:pagina 12:acoes */
.max-w-\[1600px\] table thead th:nth-child(1),
.max-w-\[1600px\] table tbody td:nth-child(1){width:2.5%!important}         /* checkbox */
.max-w-\[1600px\] table thead th:nth-child(2),
.max-w-\[1600px\] table tbody td:nth-child(2){width:7%!important}           /* PROJETO */
.max-w-\[1600px\] table thead th:nth-child(3),
.max-w-\[1600px\] table tbody td:nth-child(3){width:4.5%!important}         /* LOGS */
.max-w-\[1600px\] table thead th:nth-child(4),
.max-w-\[1600px\] table tbody td:nth-child(4){width:11%!important}          /* USUÁRIO/SENHA */
.max-w-\[1600px\] table thead th:nth-child(5),
.max-w-\[1600px\] table tbody td:nth-child(5){width:4.5%!important}         /* REFER */
.max-w-\[1600px\] table thead th:nth-child(6),
.max-w-\[1600px\] table tbody td:nth-child(6){width:7%!important}           /* OPERADOR */
.max-w-\[1600px\] table thead th:nth-child(7),
.max-w-\[1600px\] table tbody td:nth-child(7){width:9%!important}           /* COMENTÁRIO */
.max-w-\[1600px\] table thead th:nth-child(8),
.max-w-\[1600px\] table tbody td:nth-child(8){width:5.5%!important}         /* PAÍS */
.max-w-\[1600px\] table thead th:nth-child(9),
.max-w-\[1600px\] table tbody td:nth-child(9){width:3.5%!important}         /* DISP */
.max-w-\[1600px\] table thead th:nth-child(10),
.max-w-\[1600px\] table tbody td:nth-child(10){width:6%!important}          /* STATUS */
.max-w-\[1600px\] table thead th:nth-child(11),
.max-w-\[1600px\] table tbody td:nth-child(11){width:6.5%!important}        /* PÁGINA */
.max-w-\[1600px\] table thead th:last-child,
.max-w-\[1600px\] table tbody td:last-child{width:16%!important}            /* AÇÕES */

/* ── Table header: stronger contrast, larger ── */
.max-w-\[1600px\] table thead tr{
  background:var(--bg-input)!important;
  border-bottom:2px solid var(--border)!important;
}
.max-w-\[1600px\] table thead th{
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:0.06em!important;
  color:var(--text-secondary)!important;
  padding:10px 6px!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  text-align:center!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
/* All th inner content centered */
.max-w-\[1600px\] table thead th>*{
  margin-left:auto!important;
  margin-right:auto!important;
  text-align:center!important;
}
/* First header (checkbox) — center, compact */
.max-w-\[1600px\] table thead th:first-child{text-align:center!important;padding:10px 2px!important}
/* PROJETO header — left aligned, same position as data */
.max-w-\[1600px\] table thead th:nth-child(2){text-align:left!important;padding-left:6px!important}
.max-w-\[1600px\] table thead th:nth-child(2)>*{text-align:left!important;margin-left:0!important}
/* USUÁRIO/SENHA — left aligned */
.max-w-\[1600px\] table thead th:nth-child(4){text-align:left!important}
/* Checkbox column compact */
.max-w-\[1600px\] table tbody td:first-child{padding:8px 2px!important;text-align:center!important}
/* PROJETO data — left aligned, match header */
.max-w-\[1600px\] table tbody td:nth-child(2){text-align:left!important;padding-left:6px!important}
.max-w-\[1600px\] table tbody td:nth-child(2)>*{margin-left:0!important;text-align:left!important}

/* ── Table rows: better spacing and readability ── */
.max-w-\[1600px\] table tbody tr{
  transition:background-color .15s!important;
}
.max-w-\[1600px\] table tbody td{
  padding:10px 6px!important;
  font-size:13px!important;
  vertical-align:middle!important;
  line-height:1.4!important;
  text-align:center!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
/* Inner content alignment */
.max-w-\[1600px\] table tbody td>*{
  margin-left:auto!important;
  margin-right:auto!important;
}
.max-w-\[1600px\] table tbody td .flex{
  justify-content:center!important;
}
.max-w-\[1600px\] table thead th .flex{
  justify-content:center!important;
}
/* First column (checkbox) + second (project name) — left align */
.max-w-\[1600px\] table tbody td:first-child{text-align:center!important}
.max-w-\[1600px\] table tbody td:nth-child(2){text-align:left!important}
/* Third (USUARIO/SENHA) — left align (has multiline data) */
.max-w-\[1600px\] table tbody td:nth-child(4){text-align:left!important}

/* Hover row — visible highlight */
.max-w-\[1600px\] table tbody tr:hover{
  background:var(--accent-bg)!important;
}

/* Alternating row hint (subtle) */
.max-w-\[1600px\] table tbody tr:nth-child(even){
  background:color-mix(in srgb, var(--bg-card) 92%, var(--bg-elevated))!important;
}
.max-w-\[1600px\] table tbody tr:nth-child(even):hover{
  background:var(--accent-bg)!important;
}

/* Gold row — keep gold highlight visible */
.max-w-\[1600px\] table tbody tr.bg-yellow-500\/5{
  background:color-mix(in srgb, var(--bg-card) 85%, #fbbf24)!important;
}

/* ── Status badges in table: bigger, bolder ── */
.max-w-\[1600px\] table .bg-emerald-500\/15,
.max-w-\[1600px\] table .bg-amber-500\/15,
.max-w-\[1600px\] table .bg-red-500\/10,
.max-w-\[1600px\] table .bg-slate-500\/10{
  padding:3px 10px!important;
  border-radius:6px!important;
  font-size:11px!important;
  font-weight:700!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
}
/* Status dot bigger */
.max-w-\[1600px\] table .w-1.h-1.rounded-full{
  width:7px!important;
  height:7px!important;
}

/* ═══ TOOLBAR — Title row + Search/Filters row ═══ */

/* Title "Logs dos Projetos" */
.max-w-\[1600px\] .text-sm.font-bold.text-white.shrink-0{
  font-size:clamp(0.85rem,1vw,1rem)!important;
  color:var(--text-primary)!important;
  font-weight:800!important;
}

/* Status count badges (Online 0, etc) */
.max-w-\[1600px\] .flex.items-center.gap-1.px-2.py-1.rounded-lg{
  padding:3px 9px!important;
  font-size:10px!important;
  font-weight:700!important;
  border-width:1.2px!important;
  height:28px!important;
}
/* Pulse dot in Online badge */
.max-w-\[1600px\] .w-1\.5.h-1\.5.rounded-full.bg-emerald-500{
  width:7px!important;
  height:7px!important;
}

/* ── Toolbar wrapper — spacing between rows ── */
.max-w-\[1600px\]>.rounded-2xl>.space-y-3>*+*{
  margin-top:6px!important;
}

/* ── Title row: title + badges ── */
.max-w-\[1600px\]>.rounded-2xl .flex.items-center.justify-between{
  gap:10px!important;
  flex-wrap:nowrap!important;
}
/* Badges row gap */
.max-w-\[1600px\]>.rounded-2xl .flex.items-center.justify-between .flex.items-center.gap-2{
  gap:5px!important;
}

/* ── Search row: input + filters + actions — single line ── */
.max-w-\[1600px\]>.rounded-2xl .flex.flex-wrap{
  flex-wrap:nowrap!important;
  align-items:center!important;
  gap:6px!important;
}

/* Hide search icon */
.max-w-\[1600px\] input[placeholder*="Buscar"]+svg,
.max-w-\[1600px\] input[placeholder*="Buscar"]~svg,
.max-w-\[1600px\] .relative>svg.absolute{
  display:none!important;
}
/* Search input */
.max-w-\[1600px\] input[placeholder*="Buscar"]{
  font-size:12px!important;
  padding:5px 10px!important;
  border-radius:7px!important;
  min-width:160px!important;
  max-width:280px!important;
  flex:1 1 200px!important;
  height:32px!important;
  box-sizing:border-box!important;
}

/* ── Filter tabs (Todos/Online/Away/Offline/Blocked/Gold) ── */
.max-w-\[1600px\] .flex.items-center.gap-0\.5{
  gap:2px!important;
  flex-shrink:0!important;
}
.max-w-\[1600px\] .flex.items-center.gap-0\.5>button{
  padding:4px 9px!important;
  font-size:10px!important;
  font-weight:700!important;
  border-radius:5px!important;
  transition:background-color .15s,color .15s,border-color .15s,box-shadow .15s,transform .15s,opacity .15s!important;
  white-space:nowrap!important;
  height:28px!important;
}
/* Active filter tab */
.max-w-\[1600px\] .flex.items-center.gap-0\.5>button.bg-\[\#1a2044\]{
  background:var(--accent)!important;
  color:#fff!important;
  box-shadow:0 1px 6px var(--accent-bg)!important;
}
/* Gold filter active */
.max-w-\[1600px\] .flex.items-center.gap-0\.5>button.bg-yellow-500\/20{
  background:#fbbf2433!important;
  color:#b45309!important;
  box-shadow:0 1px 6px #fbbf2422!important;
}

/* ── Action buttons (Exportar, Limpar, Visits) ── */
.max-w-\[1600px\] button.text-emerald-400.border-emerald-500\/20,
.max-w-\[1600px\] button.text-red-400.border-red-500\/20,
.max-w-\[1600px\] button.text-orange-400.border-orange-500\/20{
  padding:4px 9px!important;
  font-size:10px!important;
  font-weight:700!important;
  border-radius:5px!important;
  border-width:1.2px!important;
  white-space:nowrap!important;
  flex-shrink:0!important;
  height:28px!important;
}

/* ── Row action buttons (edit, block, delete, etc) — BIGGER ── */
.max-w-\[1600px\] table .w-7.h-7.rounded-lg{
  width:32px!important;
  height:32px!important;
  border-radius:8px!important;
  border:1.5px solid var(--border)!important;
}
.max-w-\[1600px\] table .w-7.h-7.rounded-lg svg{
  width:15px!important;
  height:15px!important;
}
.max-w-\[1600px\] table .w-6.h-6.rounded-lg{
  width:30px!important;
  height:30px!important;
  border-radius:8px!important;
  border:1.5px solid var(--border)!important;
}
.max-w-\[1600px\] table .w-6.h-6.rounded-lg svg{
  width:14px!important;
  height:14px!important;
}
/* Action buttons gap */
.max-w-\[1600px\] table td .flex.items-center.gap-1{
  gap:4px!important;
}
.max-w-\[1600px\] table td .flex.items-center.gap-0\.5{
  gap:4px!important;
}

/* ── ALL THEMES: action buttons visible with solid bg + icon color ── */
/* Purple action (edit/view) */
.max-w-\[1600px\] table .w-7.h-7.bg-purple-500\/10{
  background:var(--accent-bg)!important;
  border-color:var(--accent)!important;
  color:var(--accent-text)!important;
}
.max-w-\[1600px\] table .w-7.h-7.bg-purple-500\/10:hover{
  background:var(--accent)!important;
  color:#fff!important;
}
.max-w-\[1600px\] table .w-7.h-7.bg-purple-600\/20{
  background:var(--accent-bg)!important;
  border-color:var(--accent)!important;
  color:var(--accent-text)!important;
}
/* Red action (delete/block) */
.max-w-\[1600px\] table .w-7.h-7.bg-red-500\/10{
  background:rgba(239,68,68,.12)!important;
  border-color:rgba(239,68,68,.4)!important;
  color:#ef4444!important;
}
.max-w-\[1600px\] table .w-7.h-7.bg-red-500\/10:hover,
.max-w-\[1600px\] table .w-6.h-6.bg-red-500\/80:hover{
  background:#ef4444!important;
  color:#fff!important;
  border-color:#ef4444!important;
}
.max-w-\[1600px\] table .w-6.h-6.bg-red-500\/80{
  background:rgba(239,68,68,.8)!important;
  border-color:#ef4444!important;
  color:#fff!important;
}
/* Blue action (SMS/view) */
.max-w-\[1600px\] table .w-7.h-7.bg-blue-500\/10{
  background:rgba(59,130,246,.12)!important;
  border-color:rgba(59,130,246,.4)!important;
  color:#3b82f6!important;
}
.max-w-\[1600px\] table .w-7.h-7.bg-blue-500\/10:hover{
  background:#3b82f6!important;
  color:#fff!important;
  border-color:#3b82f6!important;
}
/* Orange action */
.max-w-\[1600px\] table .w-7.h-7.bg-orange-500\/12{
  background:rgba(249,115,22,.12)!important;
  border-color:rgba(249,115,22,.4)!important;
  color:#f97316!important;
}
.max-w-\[1600px\] table .w-7.h-7.bg-orange-500\/12:hover{
  background:#f97316!important;
  color:#fff!important;
  border-color:#f97316!important;
}
.max-w-\[1600px\] table .w-7.h-7.bg-orange-500{
  border-color:#f97316!important;
}
/* Dark hex bg action buttons — remap to theme */
.max-w-\[1600px\] table .w-7.h-7.bg-\[\#111738\]{
  background:var(--bg-elevated)!important;
  border-color:var(--border)!important;
  color:var(--text-muted)!important;
}
.max-w-\[1600px\] table .w-7.h-7.bg-\[\#111738\]:hover{
  background:var(--accent-bg)!important;
  border-color:var(--accent)!important;
  color:var(--accent-text)!important;
}
/* Slate bg action */
.max-w-\[1600px\] table .w-7.h-7.bg-slate-800{
  background:var(--bg-elevated)!important;
  border-color:var(--border)!important;
  color:var(--text-muted)!important;
}
/* Gradient badge (log count) */
.max-w-\[1600px\] table .w-7.h-7.bg-gradient-to-br{
  border-color:var(--accent)!important;
}

/* ── LIGHT THEME specific action button fixes ── */
[data-theme^=light] .max-w-\[1600px\] table .w-7.h-7.bg-purple-500\/10{
  background:rgba(124,58,237,.1)!important;
  color:#6d28d9!important;
  border-color:rgba(124,58,237,.35)!important;
}
[data-theme^=light] .max-w-\[1600px\] table .w-7.h-7.bg-red-500\/10{
  background:rgba(239,68,68,.08)!important;
  color:#dc2626!important;
  border-color:rgba(239,68,68,.3)!important;
}
[data-theme^=light] .max-w-\[1600px\] table .w-7.h-7.bg-blue-500\/10{
  background:rgba(59,130,246,.08)!important;
  color:#2563eb!important;
  border-color:rgba(59,130,246,.3)!important;
}
[data-theme^=light] .max-w-\[1600px\] table .w-7.h-7.bg-orange-500\/12{
  background:rgba(249,115,22,.08)!important;
  color:#ea580c!important;
  border-color:rgba(249,115,22,.3)!important;
}
[data-theme^=light] .max-w-\[1600px\] table .w-7.h-7.bg-\[\#111738\]{
  background:var(--bg-input)!important;
  color:var(--text-secondary)!important;
}
[data-theme^=light] .max-w-\[1600px\] table .w-7.h-7.bg-slate-800{
  background:var(--bg-input)!important;
  color:var(--text-secondary)!important;
}

/* ── LOGS TABLE: ALL action buttons — universal styling ── */
/* Target every button inside the last td (actions column) */
.max-w-\[1600px\] table td:last-child button{
  width:30px!important;
  height:30px!important;
  border-radius:8px!important;
  border:1.2px solid var(--border)!important;
  transition:background-color .15s,color .15s,border-color .15s,box-shadow .15s,transform .15s,opacity .15s!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-shrink:0!important;
}
.max-w-\[1600px\] table td:last-child button svg{
  width:19px!important;
  height:19px!important;
  stroke-width:2!important;
}
/* Color each button by its text color (React sets text-amber-400, text-blue-400, etc) */
.max-w-\[1600px\] table td:last-child button[class*="text-amber"]{
  border-color:rgba(245,158,11,.5)!important;
  background:rgba(245,158,11,.12)!important;
}
.max-w-\[1600px\] table td:last-child button[class*="text-amber"]:hover{
  background:#f59e0b!important;color:#fff!important;border-color:#f59e0b!important;
}
.max-w-\[1600px\] table td:last-child button[class*="text-blue"]{
  border-color:rgba(59,130,246,.5)!important;
  background:rgba(59,130,246,.12)!important;
}
.max-w-\[1600px\] table td:last-child button[class*="text-blue"]:hover{
  background:#3b82f6!important;color:#fff!important;border-color:#3b82f6!important;
}
.max-w-\[1600px\] table td:last-child button[class*="text-purple"]{
  border-color:rgba(168,85,247,.5)!important;
  background:rgba(168,85,247,.12)!important;
}
.max-w-\[1600px\] table td:last-child button[class*="text-purple"]:hover{
  background:#a855f7!important;color:#fff!important;border-color:#a855f7!important;
}
.max-w-\[1600px\] table td:last-child button[class*="text-red"]{
  border-color:rgba(239,68,68,.5)!important;
  background:rgba(239,68,68,.12)!important;
}
.max-w-\[1600px\] table td:last-child button[class*="text-red"]:hover{
  background:#ef4444!important;color:#fff!important;border-color:#ef4444!important;
}
.max-w-\[1600px\] table td:last-child button[class*="text-orange"]{
  border-color:rgba(249,115,22,.5)!important;
  background:rgba(249,115,22,.12)!important;
}
.max-w-\[1600px\] table td:last-child button[class*="text-orange"]:hover{
  background:#f97316!important;color:#fff!important;border-color:#f97316!important;
}
.max-w-\[1600px\] table td:last-child button[class*="text-emerald"]{
  border-color:rgba(16,185,129,.5)!important;
  background:rgba(16,185,129,.12)!important;
}
.max-w-\[1600px\] table td:last-child button[class*="text-white"]{
  border-color:var(--border)!important;
}
/* Slate bg buttons */
.max-w-\[1600px\] table td:last-child button[class*="bg-slate"]{
  background:var(--bg-elevated)!important;
  border-color:var(--border)!important;
  color:var(--text-secondary)!important;
}
/* Actions gap + no overflow */
.max-w-\[1600px\] table td:last-child .flex{
  gap:4px!important;
  flex-wrap:nowrap!important;
  justify-content:center!important;
}
.max-w-\[1600px\] table td:last-child{
  overflow:visible!important;
}

/* LIGHT: action buttons — strong bg + dark icon */
[data-theme^=light] .max-w-\[1600px\] table td:last-child button[class*="text-amber"]{background:#fef3c7!important;color:#92400e!important;border-color:#f59e0b!important}
[data-theme^=light] .max-w-\[1600px\] table td:last-child button[class*="text-blue"]{background:#dbeafe!important;color:#1e40af!important;border-color:#3b82f6!important}
[data-theme^=light] .max-w-\[1600px\] table td:last-child button[class*="text-purple"]{background:#ede9fe!important;color:#5b21b6!important;border-color:#8b5cf6!important}
[data-theme^=light] .max-w-\[1600px\] table td:last-child button[class*="text-red"]{background:#fee2e2!important;color:#991b1b!important;border-color:#ef4444!important}
[data-theme^=light] .max-w-\[1600px\] table td:last-child button[class*="text-orange"]{background:#ffedd5!important;color:#9a3412!important;border-color:#f97316!important}
[data-theme^=light] .max-w-\[1600px\] table td:last-child button[class*="text-emerald"]{background:#d1fae5!important;color:#065f46!important;border-color:#10b981!important}
[data-theme^=light] .max-w-\[1600px\] table td:last-child button[class*="bg-slate"]{background:#e2e8f0!important;color:#334155!important;border-color:#94a3b8!important}

/* ── Table container: ensure full width without overflow ── */
.max-w-\[1600px\] .overflow-x-auto{
  width:100%!important;
  overflow-x:auto!important;
  box-sizing:border-box!important;
}
/* Main content area — box-sizing already set in R1 */

/* ── Log count badge in table rows — no shadow ── */
.max-w-\[1600px\] table .bg-gradient-to-br.from-purple-600\/30{
  width:30px!important;
  height:22px!important;
  font-size:11px!important;
  box-shadow:none!important;
}
/* Logs badge — clean style */
.max-w-\[1600px\] table .bg-gradient-to-br{
  box-shadow:none!important;
}
/* Operador column — remove colored shadow/glow */
.max-w-\[1600px\] table td:nth-child(6) span,
.max-w-\[1600px\] table td:nth-child(6) a{
  text-shadow:none!important;
  box-shadow:none!important;
}

/* ── Logs count badge (3rd column) — plain text, no green — ALL themes ── */
.max-w-\[1600px\] table td:nth-child(3) button,
[data-theme^=light] .max-w-\[1600px\] table td:nth-child(3) button,
.max-w-\[1600px\] table td:nth-child(3) button.bg-emerald-500\/15,
[data-theme^=light] .max-w-\[1600px\] table td:nth-child(3) button.bg-emerald-500\/15,
.max-w-\[1600px\] table td:nth-child(3) button.bg-slate-500\/10,
[data-theme^=light] .max-w-\[1600px\] table td:nth-child(3) button.bg-slate-500\/10{
  background:transparent!important;
  background-color:transparent!important;
  color:var(--text-secondary)!important;
  border:none!important;
  box-shadow:none!important;
  padding:0!important;
  --tw-ring-shadow:none!important;
}
.max-w-\[1600px\] table td:nth-child(3) button:hover,
[data-theme^=light] .max-w-\[1600px\] table td:nth-child(3) button:hover{
  background:transparent!important;
  background-color:transparent!important;
  --tw-ring-shadow:none!important;
  box-shadow:none!important;
}
.max-w-\[1600px\] table td:nth-child(3) button svg,
[data-theme^=light] .max-w-\[1600px\] table td:nth-child(3) button svg{
  color:var(--text-muted)!important;
}
/* País column (8th) — show only flag, hide country name text */
.max-w-\[1600px\] table td:nth-child(8) span,
[data-theme^=light] .max-w-\[1600px\] table td:nth-child(8) span{
  display:none!important;
}
.max-w-\[1600px\] table td:nth-child(8) img{
  width:22px!important;
  height:15px!important;
  border-radius:4px!important;
  object-fit:cover!important;
}
.max-w-\[1600px\] table td:nth-child(8) .flex{
  justify-content:center!important;
}

/* Página column (11th) — bigger text */
.max-w-\[1600px\] table td:nth-child(11) span{
  font-size:12px!important;
  max-width:120px!important;
}

/* Dispositivo column (9th) — bigger icon */
.max-w-\[1600px\] table td:nth-child(9) svg{
  width:22px!important;
  height:15px!important;
}

/* Operador column (6th) — plain text, no colored background — ALL themes */
.max-w-\[1600px\] table td:nth-child(6) span[style],
[data-theme^=light] .max-w-\[1600px\] table td:nth-child(6) span[style]{
  background:transparent!important;
  background-color:transparent!important;
  color:var(--text-primary)!important;
  box-shadow:none!important;
  text-shadow:none!important;
  border:none!important;
  padding:0!important;
}

/* ── Pagination: clearer ── */
.max-w-\[1600px\] .flex.items-center.gap-2.text-sm.text-slate-500{
  font-size:13px!important;
  color:var(--text-secondary)!important;
  font-weight:500!important;
}
.max-w-\[1600px\] .flex.items-center.gap-2.text-sm.text-slate-500 select{
  font-size:clamp(11px,0.75vw,13px)!important;
  padding:4px 8px!important;
  border-radius:6px!important;
  font-weight:600!important;
}
/* Pagination buttons (< >) */
.max-w-\[1600px\] .flex.items-center.gap-2.text-sm.text-slate-500 button{
  width:clamp(24px,2vw,32px)!important;
  height:clamp(24px,2vw,32px)!important;
  border-radius:6px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

/* ── Empty state: more visible ── */
.max-w-\[1600px\] table tbody td[colspan]{
  padding:2rem 1rem!important;
  font-size:clamp(12px,0.85vw,14px)!important;
  color:var(--text-muted)!important;
  text-align:center!important;
}

/* ── Checkbox column ── */
.max-w-\[1600px\] table .w-4.h-4.rounded.border-2{
  width:16px!important;
  height:16px!important;
  border-radius:4px!important;
  border-width:2px!important;
}

/* ── Table wrapper card — subtle depth ── */
.max-w-\[1600px\] .bg-\[\#0c1027\].border.border-\[\#1a2044\].rounded-2xl.overflow-hidden{
  box-shadow:0 4px 24px rgba(0,0,0,.08)!important;
}

/* ── LIGHT THEME specific table fixes ── */

/* Active tab on light — already handled by base rule (lines 666-670) */

/* Table header on light — stronger bg */
[data-theme^=light] .max-w-\[1600px\] table thead tr{
  background:var(--bg-elevated)!important;
}
[data-theme^=light] .max-w-\[1600px\] table thead th{
  color:var(--text-primary)!important;
  opacity:.9!important;
}

/* Even rows on light */
[data-theme^=light] .max-w-\[1600px\] table tbody tr:nth-child(even){
  background:color-mix(in srgb, var(--bg-card) 85%, var(--bg-elevated))!important;
}

/* Status badges on light — stronger colors */
[data-theme^=light] .max-w-\[1600px\] table .bg-emerald-500\/15{background-color:#d1fae5!important;color:#047857!important}
[data-theme^=light] .max-w-\[1600px\] table .bg-amber-500\/15{background-color:#fef3c7!important;color:#92400e!important}
[data-theme^=light] .max-w-\[1600px\] table .bg-red-500\/10{background-color:#fee2e2!important;color:#b91c1c!important}
[data-theme^=light] .max-w-\[1600px\] table .bg-slate-500\/10{background-color:#e2e8f0!important;color:#475569!important}

/* Filter inactive text on light */
[data-theme^=light] .max-w-\[1600px\] .flex.items-center.gap-0\.5>button.text-slate-500{
  color:var(--text-secondary)!important;
}

/* Gold filter on light */
[data-theme^=light] .max-w-\[1600px\] .flex.items-center.gap-0\.5>button.bg-yellow-500\/20{
  background:#fef3c7!important;
  color:#78350f!important;
}
[data-theme^=light] .max-w-\[1600px\] .flex.items-center.gap-0\.5>button.text-yellow-600{
  color:#92400e!important;
}

/* Pagination on light */
[data-theme^=light] .max-w-\[1600px\] .flex.items-center.gap-2.text-sm.text-slate-500{
  color:var(--text-primary)!important;
}

/* Table row text on light — ensure readability */
[data-theme^=light] .max-w-\[1600px\] table tbody .text-\[10px\]{color:var(--text-secondary)!important}
[data-theme^=light] .max-w-\[1600px\] table tbody .text-\[11px\]{color:var(--text-primary)!important}
[data-theme^=light] .max-w-\[1600px\] table tbody .text-\[9px\]{color:var(--text-muted)!important}
[data-theme^=light] .max-w-\[1600px\] table tbody .text-\[8px\]{color:var(--text-muted)!important}

/* Checkbox border on light */
[data-theme^=light] .max-w-\[1600px\] table .border-slate-700{
  border-color:var(--border)!important;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — Enhanced visibility (ALL themes)
   ═══════════════════════════════════════════════════════════════ */

/* ── Greeting card: bigger name, clearer quote ── */
.max-w-\[1600px\] .space-y-3>.flex.items-center.justify-between.rounded-2xl{
  padding:clamp(0.8rem,1.5vw,1.5rem) clamp(1rem,1.8vw,1.75rem)!important;
}
/* "BOA TARDE" label */
.max-w-\[1600px\] .space-y-3>.flex.items-center.justify-between.rounded-2xl .text-\[9px\]{
  font-size:clamp(9px,0.65vw,11px)!important;
  font-weight:700!important;
  letter-spacing:0.12em!important;
}
/* User name */
.max-w-\[1600px\] .space-y-3>.flex.items-center.justify-between.rounded-2xl .text-xl{
  font-size:clamp(1.1rem,1.5vw,1.5rem)!important;
  font-weight:900!important;
}
/* Quote text */
.max-w-\[1600px\] .space-y-3>.flex.items-center.justify-between.rounded-2xl .text-\[10px\]{
  font-size:clamp(10px,0.72vw,12px)!important;
  opacity:.85!important;
}
/* "Ao Vivo" button */
.max-w-\[1600px\] .space-y-3>.flex.items-center.justify-between.rounded-2xl button{
  font-size:clamp(10px,0.72vw,12px)!important;
  padding:clamp(0.3rem,0.4vw,0.4rem) clamp(0.6rem,0.9vw,1rem)!important;
  font-weight:700!important;
}

/* ── Stats cards row: bigger numbers ── */
.max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4.gap-2{
  gap:clamp(0.4rem,0.7vw,0.75rem)!important;
}
/* Each stat card */
.max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4.gap-2>.rounded-xl.p-2\.5{
  padding:clamp(0.5rem,0.9vw,0.8rem) clamp(0.6rem,1vw,0.9rem)!important;
  gap:clamp(0.4rem,0.6vw,0.625rem)!important;
}
/* Icon circle */
.max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4.gap-2 .w-8.h-8{
  width:clamp(1.8rem,2.4vw,2.5rem)!important;
  height:clamp(1.8rem,2.4vw,2.5rem)!important;
  border-radius:clamp(0.4rem,0.6vw,0.625rem)!important;
}
.max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4.gap-2 .w-8.h-8 svg{
  width:clamp(14px,1.1vw,17px)!important;
  height:clamp(14px,1.1vw,17px)!important;
}
/* Big number */
.max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4.gap-2 .text-lg.font-black{
  font-size:clamp(1.1rem,1.5vw,1.6rem)!important;
}
/* Label ("Projetos", "Usuarios", etc) */
.max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4.gap-2 .text-\[9px\].text-slate-500{
  font-size:clamp(9px,0.65vw,11px)!important;
  color:var(--text-muted)!important;
  font-weight:600!important;
}
/* Sub label ("0 online") */
.max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4.gap-2 .text-\[8px\]{
  font-size:clamp(8px,0.55vw,10px)!important;
  font-weight:700!important;
}

/* ── Projects + Team bottom grid ── */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2.gap-3{
  gap:clamp(0.5rem,0.8vw,0.75rem)!important;
}

/* Section headers ("Projetos", "Equipe", "Todos") */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .px-4.py-2.border-b{
  padding:clamp(0.4rem,0.6vw,0.6rem) clamp(0.6rem,1vw,1rem)!important;
}
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .text-\[11px\].font-bold{
  font-size:clamp(11px,0.78vw,13px)!important;
}
/* "Todos" link */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .text-\[9px\].text-purple-400{
  font-size:clamp(9px,0.65vw,11px)!important;
  font-weight:600!important;
}
/* Team member count */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .text-\[9px\].text-emerald-400{
  font-size:clamp(9px,0.65vw,11px)!important;
}
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .text-\[9px\].text-slate-600{
  font-size:clamp(9px,0.65vw,11px)!important;
  color:var(--text-muted)!important;
}

/* Project list items */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .space-y-1\.5>div{
  padding:clamp(0.3rem,0.45vw,0.4rem) clamp(0.5rem,0.8vw,0.75rem)!important;
}
/* Project name */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .text-xs.font-bold.text-white{
  font-size:clamp(11px,0.78vw,13px)!important;
}
/* "1 dominios" */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .text-\[9px\].text-slate-500{
  font-size:clamp(9px,0.62vw,10px)!important;
  color:var(--text-muted)!important;
}

/* Team member cards */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .grid.grid-cols-2.gap-1\.5{
  gap:clamp(0.3rem,0.5vw,0.5rem)!important;
}
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .grid.grid-cols-2.gap-1\.5>.rounded-xl{
  padding:clamp(0.3rem,0.5vw,0.5rem) clamp(0.4rem,0.6vw,0.6rem)!important;
}
/* Member name */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .grid.grid-cols-2 .text-xs.font-bold{
  font-size:clamp(10px,0.72vw,12px)!important;
}
/* Role badge (ADMIN, OPERATOR) */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .grid.grid-cols-2 .text-\[8px\]{
  font-size:clamp(8px,0.55vw,10px)!important;
  font-weight:700!important;
}
/* "0 usr · 0 logs" */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .grid.grid-cols-2 .text-\[9px\]{
  font-size:clamp(9px,0.62vw,10px)!important;
}
/* Progress bar track */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .flex-1.h-1{
  height:clamp(3px,0.3vw,5px)!important;
  border-radius:4px!important;
}

/* ── Clock area (top right) ── */
header .text-\[10px\]{font-size:clamp(9px,0.62vw,11px)!important}
header .text-lg{font-size:clamp(0.85rem,1.05vw,1.125rem)!important}
header .text-\[8px\]{font-size:clamp(8px,0.55vw,10px)!important}

/* ── LIGHT THEME dashboard specific ── */
[data-theme^=light] .max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4.gap-2 .text-lg.font-black{
  color:var(--text-primary)!important;
}
[data-theme^=light] .max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2 .text-xs.font-bold.text-white{
  color:var(--text-primary)!important;
}

/* ═══════════════════════════════════════════════════════════════
   USER DETAIL PAGE — LOGS + OPERAÇÕES + AÇÕES RÁPIDAS
   Layout: grid-cols-[1fr_420px] — left (LOGS) + right (OPS)
   ═══════════════════════════════════════════════════════════════ */

/* ═══ TOP ROW: Ultra-compact header bar ═══ */
/* Single row: status cards + IP info, all same height */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2{
  gap:6px!important;
  align-items:start!important;
  grid-template-columns:1fr 480px!important;
}
/* Status cards grid — inline compact */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2 .grid.grid-cols-4{
  gap:4px!important;
}
.max-w-\[1600px\] .grid.grid-cols-4.gap-1\.5{
  height:auto!important;
}
/* Each status card — horizontal row layout */
.max-w-\[1600px\] .grid.grid-cols-4.gap-1\.5>div{
  padding:14px 12px!important;
  border-radius:8px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:2px!important;
  min-height:58px!important;
}
/* Status labels (STATUS, USER, ADMIN, PAGINA) */
.max-w-\[1600px\] .grid.grid-cols-4.gap-1\.5 .text-\[9px\]{
  font-size:9px!important;
  font-weight:700!important;
  letter-spacing:0.06em!important;
  line-height:1!important;
}
/* Status values (away, Não, Home page) */
.max-w-\[1600px\] .grid.grid-cols-4.gap-1\.5 .text-sm{
  font-size:14px!important;
  font-weight:800!important;
  line-height:1.2!important;
}
/* Status card icons — compact */
.max-w-\[1600px\] .grid.grid-cols-4.gap-1\.5 svg{
  width:12px!important;
  height:12px!important;
}
/* Status dot */
.max-w-\[1600px\] .grid.grid-cols-4.gap-1\.5 .w-1\.5{
  width:6px!important;
  height:6px!important;
}
/* Push buttons (Push, Enviar Push) — compact */
.max-w-\[1600px\] .flex.gap-2>button.border{
  font-size:10px!important;
  padding:4px 10px!important;
  height:28px!important;
  border-radius:6px!important;
}

/* ═══ MAIN ROW: 2-column LOGS-dominant layout ═══ */
/* LOGS (left, 60%) | OPERAÇÕES + AÇÕES RÁPIDAS stacked (right, 40%) */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2\.5{
  gap:8px!important;
  align-items:start!important;
  grid-template-columns:1.5fr 1fr!important;
}
/* Right column: stack OPERAÇÕES on top, AÇÕES below */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2\.5>div:last-child{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
}
/* LOGS — natural order (left) */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2\.5>div:first-child{
  order:unset!important;
  max-width:100%!important;
  min-width:0!important;
}
/* OPERAÇÕES first in right column */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2\.5>div:last-child>div:first-child{
  order:1!important;
}
/* AÇÕES RÁPIDAS second in right column */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2\.5>div:last-child>div:last-child{
  order:2!important;
}

/* ── Section titles (OPERAÇÕES, AÇÕES RÁPIDAS, LOGS, ACTIVITY) ── */
.max-w-\[1600px\] .text-\[11px\].font-black.tracking-wider{
  font-size:11px!important;
  letter-spacing:0.08em!important;
  font-weight:900!important;
}

/* ── AÇÕES RÁPIDAS panel ── */
/* Comment row */
.max-w-\[1600px\] input[placeholder*="coment"],
.max-w-\[1600px\] input[placeholder*="Adicionar"]{
  font-size:clamp(13px,1vw,15px)!important;
  padding:8px 12px!important;
  border-radius:8px!important;
  height:clamp(36px,2.6vw,42px)!important;
}
/* Salvar button */
.max-w-\[1600px\] .grid.grid-cols-2.gap-2~div button[class*="bg-blue"],
.max-w-\[1600px\] button.bg-blue-600.text-white{
  font-size:clamp(12px,0.9vw,14px)!important;
  padding:8px 14px!important;
  border-radius:8px!important;
  height:clamp(36px,2.6vw,42px)!important;
  font-weight:700!important;
}

/* ── Ask Question command — select (prontas) above, input (custom) below ── */
.max-w-\[1600px\] .space-y-1 .flex-1.flex.items-center.gap-1\.5.min-w-0{
  flex:1 1 100%!important;
  flex-wrap:wrap!important;
  gap:4px!important;
}
/* Select (opções prontas) — first, full width */
.max-w-\[1600px\] .space-y-1 .flex-1.flex.items-center.gap-1\.5.min-w-0>select{
  flex:1 1 100%!important;
  width:100%!important;
  height:30px!important;
  font-size:11px!important;
  border-radius:8px!important;
  order:1!important;
}
/* Input (pergunta personalizada) — second, full width */
.max-w-\[1600px\] .space-y-1 .flex-1.flex.items-center.gap-1\.5.min-w-0>input{
  flex:1 1 100%!important;
  width:100%!important;
  height:30px!important;
  font-size:11px!important;
  border-radius:8px!important;
  order:2!important;
}
/* Parent row: allow wrapping */
.max-w-\[1600px\] .space-y-1>.rounded-xl.flex.items-center.gap-1\.5{
  flex-wrap:wrap!important;
  padding:8px 10px!important;
}
/* Error button (triangle alert) — bigger */
.max-w-\[1600px\] .space-y-1 .w-7.h-7.bg-red-600\/15{
  width:32px!important;
  height:32px!important;
  border-radius:8px!important;
}
.max-w-\[1600px\] .space-y-1 .w-7.h-7.bg-red-600\/15 svg{
  width:16px!important;
  height:16px!important;
}

/* ── Dashboard: Atividade Recente table — scoped to grid-cols-3 parent ── */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table{
  table-layout:auto!important;
  width:100%!important;
}
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table thead th,
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table tbody td{
  padding:6px 8px!important;
  text-align:left!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
}
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table thead th{
  font-size:9px!important;
  color:var(--text-muted,#64748b)!important;
}
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table tbody td{
  font-size:11px!important;
}
/* User name bigger */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table .text-\[10px\].font-semibold{
  font-size:11px!important;
}
/* User password — hide */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table .text-\[8px\].font-mono{
  display:none!important;
}
/* Country text — hide, show only flag */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table .text-\[9px\].text-slate-400.truncate{
  display:none!important;
}
/* Ref text — bigger */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table .text-\[9px\].text-slate-500{
  font-size:11px!important;
  max-width:100px!important;
}
/* Operator badge — neutral */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table span[style*="background-color: rgba"]{
  background:transparent!important;
  color:var(--text-primary,#fff)!important;
  padding:0!important;
}
/* Avatar — hide */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table .w-6.h-6.rounded{
  display:none!important;
}
/* Flag bigger */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table .w-4.h-3{
  width:20px!important;
  height:14px!important;
  border-radius:3px!important;
}
/* Device icon bigger */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table .lucide-monitor{
  width:14px!important;
  height:14px!important;
}
/* Status badge */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table .bg-emerald-500\/15,
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table .bg-slate-500\/10{
  font-size:9px!important;
  padding:2px 6px!important;
}
/* Truncate max-width bigger */
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table .max-w-\[100px\]{
  max-width:140px!important;
}
.max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3 table .max-w-\[50px\]{
  max-width:80px!important;
}

/* Action buttons (Redirect, Block, XD, SMS, etc) — neutral style */
.max-w-\[1600px\] .grid.grid-cols-2.gap-1\.5>button{
  background:var(--bg-elevated,#0d1230)!important;
  color:var(--text-primary,#fff)!important;
  border:1px solid var(--border,#1a2044)!important;
}
.max-w-\[1600px\] .grid.grid-cols-2.gap-1\.5>button:hover{
  background:var(--accent-bg,rgba(139,92,246,0.15))!important;
  border-color:var(--accent,#7c3aed)!important;
  color:#fff!important;
}
.max-w-\[1600px\] .grid.grid-cols-2.gap-1\.5>button svg{
  color:var(--text-muted,#64748b)!important;
}
.max-w-\[1600px\] .grid.grid-cols-2.gap-1\.5>button:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 3px 10px rgba(0,0,0,.15)!important;
}

/* ── LOGS panel ── */
/* Log entries (PASSWORD, USUÁRIO rows) */
.max-w-\[1600px\] .space-y-2\.5>.border.rounded-lg{
  padding:10px 14px!important;
  border-radius:10px!important;
  transition:background .15s!important;
}
.max-w-\[1600px\] .space-y-2\.5>.border.rounded-lg:hover{
  background:var(--accent-bg)!important;
}

/* Log label (PASSWORD, USUÁRIO) */
.max-w-\[1600px\] .space-y-2\.5 .font-bold.tracking-wide{
  font-size:11px!important;
  font-weight:800!important;
}

/* Log date */
.max-w-\[1600px\] .space-y-2\.5 .text-\[9px\]{
  font-size:9px!important;
}

/* Log value (665565, tesyytyt) */
.max-w-\[1600px\] .space-y-2\.5 .font-mono{
  font-size:15px!important;
  font-weight:700!important;
}

/* ACTIVITY entries */
.max-w-\[1600px\] .space-y-2\.5 .text-\[10px\]{
  font-size:clamp(13px,1vw,15px)!important;
}
.max-w-\[1600px\] .space-y-2\.5 .text-\[11px\]{
  font-size:clamp(13px,1vw,16px)!important;
}

/* ACTIVITY panel: scroll funcional — escopo APENAS o card Activity, nao o container raiz */
.max-w-\[1600px\] .bg-\[\#0a0e1f\].border.rounded-2xl:has(> div > div > h3:not(:first-letter)) .space-y-2\.5,
.max-w-\[1600px\] div:has(> div > h3) > .space-y-2\.5:not(.grid),
.max-w-\[1600px\] .rounded-2xl .space-y-2\.5{
  max-height:55vh!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-right:6px!important;
  scrollbar-width:thin!important;
  scrollbar-color:var(--accent,#7c3aed) transparent!important;
}
.max-w-\[1600px\] .rounded-2xl .space-y-2\.5::-webkit-scrollbar{width:8px!important}
.max-w-\[1600px\] .rounded-2xl .space-y-2\.5::-webkit-scrollbar-track{background:transparent!important}
.max-w-\[1600px\] .rounded-2xl .space-y-2\.5::-webkit-scrollbar-thumb{background:var(--accent,#7c3aed)!important;border-radius:4px!important;opacity:.85!important}

/* Esconder entradas fantasma (duplicatas com opacity baixa) */
.max-w-\[1600px\] .space-y-2\.5 > [style*="opacity: 0"],
.max-w-\[1600px\] .space-y-2\.5 > [style*="opacity:0"],
.max-w-\[1600px\] .space-y-2\.5 > .opacity-0,
.max-w-\[1600px\] .space-y-2\.5 > .opacity-30,
.max-w-\[1600px\] .space-y-2\.5 > .opacity-40,
.max-w-\[1600px\] .space-y-2\.5 > .opacity-50{
  display:none!important;
}

/* NEW badge */
.max-w-\[1600px\] .text-\[8px\].font-bold.bg-red-500{
  font-size:clamp(9px,0.65vw,11px)!important;
  padding:3px 8px!important;
  border-radius:5px!important;
}

/* LOGS/ACTIVITY section header count badge */
.max-w-\[1600px\] .space-y-2\.5 .bg-\[\#0a0e1f\]{
  font-size:clamp(11px,0.8vw,13px)!important;
}

/* Limpar / Mostrar buttons */
.max-w-\[1600px\] .text-\[9px\].text-red-400,
.max-w-\[1600px\] .text-\[9px\].text-purple-400{
  font-size:clamp(11px,0.8vw,13px)!important;
  font-weight:700!important;
}

/* ── OPERAÇÕES panel (right side) ── */
/* Command rows — each command stacks vertically */
.max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5>div.flex{
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px!important;
  padding:4px 0!important;
}
/* The flex-1 wrapper (contains input/select) — always break to new line */
.max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5>div.flex>.flex-1{
  flex-basis:100%!important;
  min-width:100%!important;
  flex-grow:0!important;
  flex-shrink:0!important;
}
/* Select dropdown styling */
.max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5 select{
  height:clamp(34px,2.4vw,40px)!important;
  font-size:clamp(12px,0.85vw,14px)!important;
  border-radius:8px!important;
  padding:6px 10px!important;
}

/* Command button style — larger, more visible */
.max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5 button[class*="bg-emerald"],
.max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5 button[class*="bg-blue"],
.max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5 button[class*="bg-violet"],
.max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5 button[class*="bg-purple"]{
  padding:10px 24px!important;
  font-size:clamp(14px,1.1vw,17px)!important;
  font-weight:700!important;
  border-radius:9px!important;
  min-width:clamp(130px,12vw,180px)!important;
  height:clamp(38px,2.8vw,46px)!important;
  transition:background-color .15s,color .15s,border-color .15s,box-shadow .15s,transform .15s,opacity .15s!important;
}
.max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5 button svg{
  width:clamp(18px,1.3vw,22px)!important;
  height:clamp(18px,1.3vw,22px)!important;
}
.max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5 button:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 3px 12px rgba(0,0,0,.2)!important;
}

/* Warning triangle icon */
.max-w-\[1600px\] .w-5.h-5.text-amber-400{
  width:clamp(18px,1.2vw,22px)!important;
  height:clamp(18px,1.2vw,22px)!important;
  opacity:.9!important;
}

/* Ask Question dropdown */
.max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5 select{
  font-size:clamp(12px,0.85vw,14px)!important;
  padding:6px 10px!important;
  border-radius:7px!important;
  height:clamp(36px,2.6vw,44px)!important;
}

/* Send Bip standalone button */
.max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5>button{
  margin-top:4px!important;
}

/* ── IP info area (top right) ── */
.max-w-\[1600px\] .text-\[11px\].font-semibold{
  font-size:clamp(11px,0.8vw,14px)!important;
}

/* IP info text */
.max-w-\[1600px\] .text-\[13px\],
.max-w-\[1600px\] .text-\[12px\]{
  font-size:clamp(13px,1vw,16px)!important;
}
/* Push / Enviar Push buttons in top right */
.max-w-\[1600px\] .flex.gap-2>button.border{
  font-size:clamp(12px,0.85vw,14px)!important;
  padding:7px 16px!important;
  border-radius:8px!important;
  height:32px!important;
}

/* ═══════════════════════════════════════════════════════════════
   COMPREHENSIVE RESPONSIVE OVERRIDES v3.3
   Breakpoints: 1023px (tablet), 767px (mobile), 479px (small mobile)
   Scope: ALL pages — grids, tables, modals, forms, user detail
   ═══════════════════════════════════════════════════════════════ */

/* ── TABLET (≤1023px) — Stack custom grids, compact everything ── */
@media (max-width:1023px){

  /* === CUSTOM GRID LAYOUTS — stack to 1 column === */
  .grid[class*="grid-cols-\[350px"],
  .grid[class*="grid-cols-\[400px"],
  .grid[class*="grid-cols-\[420px"],
  .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\],
  .grid.lg\:grid-cols-\[350px_1fr\],
  .grid.lg\:grid-cols-\[400px_1fr\]{
    grid-template-columns:1fr!important;
  }

  /* === USER DETAIL PAGE — stack 3-col to 1-col === */
  .max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2{
    grid-template-columns:1fr!important;
  }
  .max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2\.5{
    grid-template-columns:1fr!important;
  }
  /* Reset order — natural stacking on tablet */
  .max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2\.5>div:first-child{
    order:unset!important;
  }
  .max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2\.5>div:last-child{
    display:flex!important;
    flex-direction:column!important;
    gap:8px!important;
  }
  .max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-\[1fr_420px\].gap-2\.5>div:last-child>div{
    order:unset!important;
  }
  /* Status cards row — 2 cols on tablet */
  .max-w-\[1600px\] .grid.grid-cols-4.gap-1\.5{
    grid-template-columns:repeat(2,1fr)!important;
    gap:6px!important;
  }

  /* === AÇÕES RÁPIDAS — 2 cols on tablet === */
  .max-w-\[1600px\] .grid.grid-cols-2.gap-1\.5{
    grid-template-columns:repeat(2,1fr)!important;
  }

  /* === PROJECTS grid — max 2 cols === */
  .max-w-\[1600px\] .grid.grid-cols-1.sm\:grid-cols-2{
    grid-template-columns:repeat(2,1fr)!important;
  }
  .max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-3{
    grid-template-columns:repeat(2,1fr)!important;
  }

  /* === DASHBOARD — team grid 1 col === */
  .max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-2.gap-3{
    grid-template-columns:1fr!important;
  }
  .max-w-\[1600px\] .grid.grid-cols-1.lg\:grid-cols-3{
    grid-template-columns:1fr!important;
  }

  /* === TABLE action buttons — smaller === */
  .max-w-\[1600px\] table td:last-child button{
    width:28px!important;
    height:28px!important;
    border-radius:6px!important;
  }
  .max-w-\[1600px\] table td:last-child button svg{
    width:14px!important;
    height:14px!important;
  }
  .max-w-\[1600px\] table td:last-child .flex{
    gap:3px!important;
  }

  /* === MODALS — wider on tablet === */
  .bg-black\/50>div,.bg-black\/60>div{
    max-width:min(95vw,42rem)!important;
    margin:1rem auto!important;
  }
  /* Modal content compact */
  .bg-black\/50 .p-6,.bg-black\/60 .p-6{
    padding:1rem!important;
  }
  .bg-black\/50 .p-8,.bg-black\/60 .p-8{
    padding:1.25rem!important;
  }

  /* === FORMS inside modals — stack === */
  .bg-black\/50 .grid.grid-cols-2,.bg-black\/60 .grid.grid-cols-2{
    grid-template-columns:1fr!important;
  }

  /* === HEADER — compact clocks === */
  header .flex.items-center.gap-6{
    gap:0.5rem!important;
  }
  header .px-4.py-2.bg-elevated{
    padding:0.25rem 0.5rem!important;
  }
  header .text-2xl{
    font-size:1rem!important;
  }
}

/* ── MOBILE (≤767px) — Full mobile optimization ── */
@media (max-width:767px){

  /* === LAYOUT — full width, minimal padding === */
  main.flex-1.overflow-auto{
    padding:0.25rem 0.2rem!important;
  }

  /* === HEADER — compact mobile === */
  header.h-\[60px\]{
    height:42px!important;
    padding:0 0.4rem!important;
  }
  /* Hide clock area on mobile */
  header .hidden.lg\:flex,
  header .flex.items-center.gap-6{
    display:none!important;
  }
  /* Header right actions compact */
  header .flex.items-center.gap-2{
    gap:0.25rem!important;
  }
  header .flex.items-center.gap-2 button.w-9.h-9{
    width:32px!important;
    height:32px!important;
  }
  header .flex.items-center.gap-2 .px-2\.5{
    padding:0.2rem 0.4rem!important;
    font-size:9px!important;
  }
  /* Hide "Live"/"Offline" text on mobile, keep icon */
  header .flex.items-center.gap-2 .hidden.sm\:inline{
    display:none!important;
  }

  /* === GRIDS — stack everything to 1 col === */
  .max-w-\[1600px\] .grid.grid-cols-2{
    grid-template-columns:1fr!important;
  }
  .max-w-\[1600px\] .grid.grid-cols-3{
    grid-template-columns:1fr!important;
  }
  .max-w-\[1600px\] .grid.grid-cols-4{
    grid-template-columns:repeat(2,1fr)!important;
  }
  /* Stats cards — 2 cols on mobile */
  .max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4{
    grid-template-columns:repeat(2,1fr)!important;
    gap:0.3rem!important;
  }
  /* Status cards user detail — 2 cols */
  .max-w-\[1600px\] .grid.grid-cols-4.gap-1\.5{
    grid-template-columns:repeat(2,1fr)!important;
  }

  /* === AÇÕES RÁPIDAS — 1 col on mobile === */
  .max-w-\[1600px\] .grid.grid-cols-2.gap-1\.5{
    grid-template-columns:1fr!important;
  }
  .max-w-\[1600px\] .grid.grid-cols-2.gap-1\.5>button{
    height:36px!important;
    font-size:13px!important;
  }

  /* === CARDS — minimal padding === */
  .max-w-\[1600px\] .rounded-2xl.p-4,
  .max-w-\[1600px\] .rounded-2xl.p-5,
  .max-w-\[1600px\] .rounded-2xl.p-6,
  .max-w-\[1600px\] .rounded-2xl.p-8{
    padding:0.5rem 0.625rem!important;
  }

  /* === TYPOGRAPHY — mobile sizes === */
  .max-w-\[1600px\] .text-2xl{font-size:1.1rem!important}
  .max-w-\[1600px\] .text-xl{font-size:0.95rem!important}
  .max-w-\[1600px\] .text-lg{font-size:0.85rem!important}
  .max-w-\[1600px\] .text-sm{font-size:0.8rem!important}

  /* === TABLES — mobile scroll === */
  .max-w-\[1600px\] .overflow-x-auto{
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .max-w-\[1600px\] table{
    min-width:650px!important;
  }
  .max-w-\[1600px\] table thead th{
    padding:6px 2px!important;
    font-size:9px!important;
  }
  .max-w-\[1600px\] table tbody td{
    padding:5px 2px!important;
    font-size:11px!important;
  }
  /* Action buttons even smaller */
  .max-w-\[1600px\] table td:last-child button{
    width:26px!important;
    height:26px!important;
    border-radius:5px!important;
  }
  .max-w-\[1600px\] table td:last-child button svg{
    width:12px!important;
    height:12px!important;
  }

  /* === FILTER TABS — compact mobile === */
  .max-w-\[1600px\] .flex.items-center.gap-0\.5>button{
    padding:3px 6px!important;
    font-size:9px!important;
    height:24px!important;
  }

  /* === TOOLBAR — wrap on mobile === */
  .max-w-\[1600px\]>.rounded-2xl .flex.flex-wrap{
    flex-wrap:wrap!important;
    gap:4px!important;
  }
  /* Search input full width */
  .max-w-\[1600px\] input[placeholder*="Buscar"]{
    min-width:100%!important;
    max-width:100%!important;
    flex:0 0 100%!important;
    height:30px!important;
    font-size:11px!important;
  }

  /* === STATUS BADGES — compact === */
  .max-w-\[1600px\] .flex.items-center.gap-1.px-2.py-1.rounded-lg{
    padding:2px 6px!important;
    font-size:9px!important;
  }

  /* === ACTION BUTTONS (Exportar, Limpar, Visits) — compact === */
  .max-w-\[1600px\] button.text-emerald-400.border-emerald-500\/20,
  .max-w-\[1600px\] button.text-red-400.border-red-500\/20,
  .max-w-\[1600px\] button.text-orange-400.border-orange-500\/20{
    padding:3px 6px!important;
    font-size:9px!important;
    height:24px!important;
  }

  /* === PAGINATION — compact === */
  .max-w-\[1600px\] .flex.items-center.gap-2.text-sm.text-slate-500{
    font-size:11px!important;
    flex-wrap:wrap!important;
    gap:0.25rem!important;
  }

  /* === MODALS — nearly full screen on mobile === */
  .bg-black\/50>div,.bg-black\/60>div{
    max-width:96vw!important;
    max-height:92vh!important;
    overflow-y:auto!important;
    margin:0.5rem auto!important;
    border-radius:12px!important;
  }
  .bg-black\/50 .p-6,.bg-black\/60 .p-6{
    padding:0.75rem!important;
  }
  .bg-black\/50 .p-8,.bg-black\/60 .p-8{
    padding:0.875rem!important;
  }
  /* Modal grids — all 1 col */
  .bg-black\/50 .grid.grid-cols-2,.bg-black\/60 .grid.grid-cols-2,
  .bg-black\/50 .grid.grid-cols-3,.bg-black\/60 .grid.grid-cols-3{
    grid-template-columns:1fr!important;
  }
  /* Modal buttons — full width, stacked */
  .bg-black\/50 .flex.gap-2>button,.bg-black\/60 .flex.gap-2>button,
  .bg-black\/50 .flex.gap-3>button,.bg-black\/60 .flex.gap-3>button{
    flex:1 1 100%!important;
    min-height:40px!important;
  }
  .bg-black\/50 .flex.justify-end.gap-2,.bg-black\/60 .flex.justify-end.gap-2,
  .bg-black\/50 .flex.justify-end.gap-3,.bg-black\/60 .flex.justify-end.gap-3{
    flex-wrap:wrap!important;
  }

  /* === INPUTS — full width, touch-friendly === */
  .max-w-\[1600px\] input:not([type=checkbox]):not([type=radio]):not([type=range]),
  .max-w-\[1600px\] select,
  .max-w-\[1600px\] textarea{
    min-height:38px!important;
    font-size:14px!important;
  }

  /* === DASHBOARD greeting — compact === */
  .max-w-\[1600px\] .space-y-3>.flex.items-center.justify-between.rounded-2xl{
    padding:0.6rem 0.75rem!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:0.5rem!important;
  }
  /* Dashboard stat card big number */
  .max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4.gap-2 .text-lg.font-black{
    font-size:1.2rem!important;
  }

  /* === SPACING — tighter on mobile === */
  .max-w-\[1600px\] .space-y-6>*+*{margin-top:0.6rem!important}
  .max-w-\[1600px\] .space-y-5>*+*{margin-top:0.5rem!important}
  .max-w-\[1600px\] .space-y-4>*+*{margin-top:0.4rem!important}
  .max-w-\[1600px\] .space-y-3>*+*{margin-top:0.3rem!important}
  .max-w-\[1600px\] .gap-4{gap:0.4rem!important}
  .max-w-\[1600px\] .gap-3{gap:0.3rem!important}

  /* === USER DETAIL — section titles === */
  .max-w-\[1600px\] .text-\[11px\].font-black.tracking-wider{
    font-size:13px!important;
  }

  /* === LOGS entries (password, user rows) — compact === */
  .max-w-\[1600px\] .space-y-2\.5>.border.rounded-lg{
    padding:8px 10px!important;
  }

  /* === COMMANDS — full width buttons === */
  .max-w-\[1600px\] .grid.grid-cols-1.gap-1\.5>button{
    font-size:12px!important;
    height:34px!important;
  }

  /* === TEXT OVERFLOW protection === */
  .max-w-\[1600px\] .truncate,
  .max-w-\[1600px\] table td{
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  /* Badges wrap */
  .max-w-\[1600px\] .flex.flex-wrap{
    flex-wrap:wrap!important;
  }

  /* === TOUCH TARGETS — min 44px for interactive elements === */
  .max-w-\[1600px\] button:not(table button){
    min-height:32px!important;
  }
}

/* ── SMALL MOBILE (≤479px) — extreme compact ── */
@media (max-width:479px){

  /* Header ultra compact */
  header.h-\[60px\]{
    height:38px!important;
  }
  header .flex.items-center.gap-2 button.w-9.h-9{
    width:28px!important;
    height:28px!important;
  }

  /* Stats cards — still 2 cols but smaller */
  .max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4{
    gap:0.2rem!important;
  }
  .max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4.gap-2>.rounded-xl{
    padding:0.3rem 0.4rem!important;
  }
  .max-w-\[1600px\] .grid.grid-cols-2.lg\:grid-cols-4.gap-2 .text-lg.font-black{
    font-size:1rem!important;
  }

  /* Table even more compact */
  .max-w-\[1600px\] table{
    min-width:550px!important;
  }
  .max-w-\[1600px\] table thead th{
    font-size:8px!important;
    padding:4px 1px!important;
  }
  .max-w-\[1600px\] table tbody td{
    font-size:10px!important;
    padding:4px 1px!important;
  }

  /* Hide less important table columns on very small */
  .max-w-\[1600px\] table thead th:nth-child(5),
  .max-w-\[1600px\] table tbody td:nth-child(5),
  .max-w-\[1600px\] table thead th:nth-child(9),
  .max-w-\[1600px\] table tbody td:nth-child(9){
    display:none!important;
  }

  /* Typography — minimum readable */
  .max-w-\[1600px\] .text-2xl{font-size:0.95rem!important}
  .max-w-\[1600px\] .text-xl{font-size:0.85rem!important}
  .max-w-\[1600px\] .text-lg{font-size:0.8rem!important}

  /* Cards ultra compact */
  .max-w-\[1600px\] .rounded-2xl.p-4,
  .max-w-\[1600px\] .rounded-2xl.p-5,
  .max-w-\[1600px\] .rounded-2xl.p-6{
    padding:0.25rem 0.2rem!important;
  }

  /* Modal nearly full screen */
  .bg-black\/50>div,.bg-black\/60>div{
    max-width:98vw!important;
    max-height:94vh!important;
    border-radius:8px!important;
  }
  .bg-black\/50 .p-6,.bg-black\/60 .p-6{
    padding:0.5rem!important;
  }

  /* Search bar */
  .max-w-\[1600px\] input[placeholder*="Buscar"]{
    height:28px!important;
    font-size:10px!important;
  }

  /* Filter tabs — even smaller */
  .max-w-\[1600px\] .flex.items-center.gap-0\.5>button{
    padding:2px 4px!important;
    font-size:8px!important;
    height:22px!important;
  }

  /* Spacing ultra tight */
  .max-w-\[1600px\] .space-y-6>*+*{margin-top:0.4rem!important}
  .max-w-\[1600px\] .space-y-5>*+*{margin-top:0.35rem!important}
  .max-w-\[1600px\] .space-y-4>*+*{margin-top:0.3rem!important}
  .max-w-\[1600px\] .space-y-3>*+*{margin-top:0.2rem!important}
}

/* ── LANDSCAPE MOBILE — optimize for short+wide screens ── */
@media (max-height:500px) and (max-width:900px){
  header.h-\[60px\]{height:36px!important}
  aside.shrink-0 nav a{padding:0.2rem 0.5rem!important}
  .max-w-\[1600px\] .space-y-6>*+*{margin-top:0.3rem!important}
  .max-w-\[1600px\] .space-y-4>*+*{margin-top:0.2rem!important}
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD — Atividade Recente table alignment (7 cols)
   USUÁRIO | PAÍS | DISP. | REF. | OPERADOR | PÁGINA | STATUS
   Responsivo: min-width fixo evita quebra em telas menores
   ══════════════════════════════════════════════════════════════ */
/* Container scrollável horizontal se a tabela exceder (telas < 1100px) */
.max-w-\[1600px\] div:has(> table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8)))){
  overflow-x:auto!important;
}
/* Tabela: fixed layout + min-width total (soma dos min-widths por coluna) */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))){
  table-layout:fixed!important;
  width:100%!important;
  min-width:1100px!important;
}
/* Todas as células: centro vertical + horizontal (uniformiza header/data) */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) thead th,
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  vertical-align:middle!important;
  text-align:center!important;
  padding:8px 10px!important;
}
/* Conteúdo inline das células: centralizar flex containers também */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td > div,
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td > span{
  justify-content:center!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
/* Widths: % (fluid) + min-width px (responsivo floor) */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) thead th:nth-child(1),
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td:nth-child(1){width:16%!important;min-width:160px!important}  /* USUÁRIO */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) thead th:nth-child(2),
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td:nth-child(2){width:14%!important;min-width:140px!important}  /* PAÍS */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) thead th:nth-child(3),
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td:nth-child(3){width:8%!important;min-width:80px!important}   /* DISP. */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) thead th:nth-child(4),
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td:nth-child(4){width:12%!important;min-width:120px!important}  /* REF. */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) thead th:nth-child(5),
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td:nth-child(5){width:14%!important;min-width:140px!important}  /* OPERADOR */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) thead th:nth-child(6),
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td:nth-child(6){width:14%!important;min-width:140px!important}  /* PÁGINA */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) thead th:nth-child(7),
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td:nth-child(7){width:22%!important;min-width:140px!important}  /* STATUS */

/* PAÍS (col 2): esconder texto do país, mostrar só bandeira */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td:nth-child(2) span:not(:has(img)):not(:has(svg)),
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td:nth-child(2) > div > span:last-child{
  display:none!important;
}
/* Reduzir largura da coluna PAÍS já que agora só tem bandeira */
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) thead th:nth-child(2),
.max-w-\[1600px\] table:has(thead th:nth-child(7)):not(:has(thead th:nth-child(8))) tbody td:nth-child(2){width:7%!important;min-width:70px!important}

/* ══════════════════════════════════════════════════════════════
   ROW ALERT BLINK — novo log piscando até operador interagir
   Controlado por xdark-alerts.js (attr [data-alert="new"])
   ══════════════════════════════════════════════════════════════ */
@keyframes xdark-cell-pulse{
  0%,100%{background-color:rgba(245,158,11,.8)}
  50%    {background-color:rgba(239,68,68,.85)}
}
/* Alta especificidade + override EXPLICITO de animation-duration (vence regra global *{duration:.01ms}) */
html body tr[data-xf="1"][data-alert="new"] > td,
html body tr[data-xf="1"][data-alert="new"]:hover > td{
  animation-name:xdark-cell-pulse!important;
  animation-duration:0.85s!important;
  animation-timing-function:ease-in-out!important;
  animation-iteration-count:infinite!important;
  animation-direction:normal!important;
  animation-fill-mode:both!important;
  animation-play-state:running!important;
  position:relative!important;
  z-index:1!important;
}
/* Borda esquerda e direita — destaca inicio e fim da caixa */
html body tr[data-xf="1"][data-alert="new"] > td:first-child{
  border-left:4px solid rgb(220,38,38)!important;
}
html body tr[data-xf="1"][data-alert="new"] > td:last-child{
  border-right:4px solid rgb(220,38,38)!important;
}
/* Override EXPLICITO de prefers-reduced-motion para esses alertas criticos */
@media (prefers-reduced-motion:reduce){
  html body tr[data-xf="1"][data-alert="new"] > td{
    animation-duration:0.85s!important;
    animation-iteration-count:infinite!important;
  }
}

/* ══════════════════════════════════════════════════════════════
   LIVE CONNECTIONS (/live-connections) — Clientes Conectados
   Unifica stats cards, aproxima elementos, melhora tabela
   ══════════════════════════════════════════════════════════════ */

/* Stats cards row — 5 cards iguais com altura uniforme */
.max-w-\[1600px\] .grid.grid-cols-2.sm\:grid-cols-3.lg\:grid-cols-5,
.max-w-\[1600px\] .grid.grid-cols-5{
  gap:10px!important;
}
.max-w-\[1600px\] .grid.grid-cols-2.sm\:grid-cols-3.lg\:grid-cols-5>div,
.max-w-\[1600px\] .grid.grid-cols-5>div{
  min-height:78px!important;
  padding:10px 14px!important;
  border-radius:10px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:2px!important;
  transition:transform .15s,box-shadow .15s!important;
}
.max-w-\[1600px\] .grid.grid-cols-2.sm\:grid-cols-3.lg\:grid-cols-5>div:hover,
.max-w-\[1600px\] .grid.grid-cols-5>div:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 4px 12px rgba(0,0,0,.08)!important;
}
/* Stats numbers: grandes e centralizados */
.max-w-\[1600px\] .grid.grid-cols-2.sm\:grid-cols-3.lg\:grid-cols-5>div .text-2xl,
.max-w-\[1600px\] .grid.grid-cols-2.sm\:grid-cols-3.lg\:grid-cols-5>div .text-3xl{
  font-size:clamp(22px,1.8vw,30px)!important;
  font-weight:800!important;
  line-height:1.1!important;
}
/* Stats labels: uppercase menor */
.max-w-\[1600px\] .grid.grid-cols-2.sm\:grid-cols-3.lg\:grid-cols-5>div .text-xs,
.max-w-\[1600px\] .grid.grid-cols-2.sm\:grid-cols-3.lg\:grid-cols-5>div .text-\[10px\]{
  font-size:10px!important;
  letter-spacing:.08em!important;
  font-weight:700!important;
  opacity:.85!important;
}

/* Project card "abanca" — melhor proporção */
.max-w-\[1600px\] a[href*="live-connections"] + *,
.max-w-\[1600px\] div:has(> div > .text-sm > span:only-child) > div{
  min-height:unset!important;
}

/* "Redirecionar (N)" button — fill laranja ao invés de só borda */
.max-w-\[1600px\] button:has(svg)[class*="border-orange"],
.max-w-\[1600px\] button[class*="border-orange-"]:not([class*="bg-"]){
  background:rgba(251,146,60,.1)!important;
  border-color:rgba(251,146,60,.4)!important;
  color:rgb(234,88,12)!important;
  font-weight:600!important;
}
.max-w-\[1600px\] button:has(svg)[class*="border-orange"]:hover,
.max-w-\[1600px\] button[class*="border-orange-"]:not([class*="bg-"]):hover{
  background:rgba(251,146,60,.18)!important;
  border-color:rgba(251,146,60,.6)!important;
}

/* "Todos (N)" botão — reposicionar e destacar */
.max-w-\[1600px\] button[class*="border-red-"]:not([class*="bg-"]){
  background:rgba(239,68,68,.08)!important;
  border-color:rgba(239,68,68,.35)!important;
  color:rgb(220,38,38)!important;
  font-weight:600!important;
  padding:6px 14px!important;
  border-radius:8px!important;
}
.max-w-\[1600px\] button[class*="border-red-"]:not([class*="bg-"]):hover{
  background:rgba(239,68,68,.15)!important;
}

/* Tabela Live Connections — USUÁRIO | PROJETO | PÁGINA | IP | PAÍS | DISP. | AÇÃO (7 cols) */
/* Já coberta pela regra de 7 colunas, mas reforça espaçamento de row */
.max-w-\[1600px\] table tbody tr{
  transition:background-color .12s!important;
}
.max-w-\[1600px\] table tbody tr:hover{
  background:var(--accent-bg,rgba(139,92,246,.06))!important;
}

/* Dot status online/offline indicator — um pouco maior */
.max-w-\[1600px\] table tbody .w-2.h-2.rounded-full,
.max-w-\[1600px\] table tbody .w-2\.5.h-2\.5.rounded-full{
  width:10px!important;
  height:10px!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.4)!important;
}

/* Botão "Abrir" na coluna AÇÃO — verde mais destacado */
.max-w-\[1600px\] table tbody button:has(.text-emerald-400),
.max-w-\[1600px\] table tbody a:has(.text-emerald-400),
.max-w-\[1600px\] table tbody button[class*="text-emerald"]{
  padding:5px 14px!important;
  border-radius:7px!important;
  font-weight:600!important;
  background:rgba(16,185,129,.1)!important;
  border:1px solid rgba(16,185,129,.35)!important;
  color:rgb(5,150,105)!important;
  transition:background-color .15s,border-color .15s!important;
}
.max-w-\[1600px\] table tbody button[class*="text-emerald"]:hover{
  background:rgba(16,185,129,.18)!important;
  border-color:rgba(16,185,129,.55)!important;
}

/* ══════════════════════════════════════════════════════════════
   A11Y + PERF PATCH (v3.3)
   ══════════════════════════════════════════════════════════════ */

/* Accessibility: keyboard focus indicator (was absent) */
*:focus-visible{outline:2px solid var(--accent-text,#3b82f6)!important;outline-offset:2px!important;border-radius:4px}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent-text,#3b82f6)!important;outline-offset:2px!important}

/* Performance: replace `transition:all` with specific props (lighter GPU work) */
.transition-all{transition:background-color .15s,color .15s,border-color .15s,box-shadow .15s,opacity .15s,transform .15s!important}

/* Respect user OS "reduce motion" preference */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
