/**
 * Sistema Attenta - CSS Global
 * Tema: Dark/Light Mode com Azul do Logo
 * Versao: 4.0
 */

/* ==========================================
   TEMA ESCURO (Padrao)
   ========================================== */
:root {
    /* Cor primaria - Azul do Logo Attenta */
    --primary-color: #1565C0;
    --primary-hover: #0D47A1;
    --primary-light: rgba(21, 101, 192, 0.15);
    --primary-dark: #0D47A1;

    /* Backgrounds - Mais suaves para melhor contraste */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --bg-input: #1e293b;
    --bg-secondary: rgba(255, 255, 255, 0.05);
    --bg-hover: rgba(255, 255, 255, 0.08);

    /* Borders */
    --border-color: rgba(148, 163, 184, 0.2);
    --border-light: rgba(148, 163, 184, 0.3);

    /* Texto - Melhor contraste para legibilidade */
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #cbd5e1;
    --text-light: #cbd5e1;
    --text-dimmed: #94a3b8;
    --text-white: #ffffff;

    /* Cores de estado */
    --success-color: #22c55e;
    --success-dark: #16a34a;
    --success-bg: rgba(34, 197, 94, 0.15);
    --error-color: #ef4444;
    --error-dark: #dc2626;
    --error-bg: rgba(239, 68, 68, 0.15);
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --info-color: #3b82f6;
    --info-dark: #2563eb;
    --info-bg: rgba(59, 130, 246, 0.15);

    /* Cores adicionais */
    --purple-color: #a855f7;
    --purple-bg: rgba(168, 85, 247, 0.15);
    --muted-bg: rgba(100, 116, 139, 0.15);

    /* Card */
    --card-bg: #1e293b;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 64px;

    /* Transicoes */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;

    /* Sombras */
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Bootstrap overrides */
    --bs-body-color: #f8fafc;
    --bs-body-bg: #020617;
    --bs-link-color: #1565C0;
    --bs-link-hover-color: #0D47A1;

    color-scheme: dark;
}

/* ==========================================
   TEMA CLARO
   ========================================== */
[data-theme="light"] {
    /* Cor primaria - Azul do Logo Attenta */
    --primary-color: #1565C0;
    --primary-hover: #0D47A1;
    --primary-light: rgba(21, 101, 192, 0.1);
    --primary-dark: #0D47A1;

    /* Backgrounds - Cinza claro para fundo, branco para cards */
    --bg-dark: #e5e7eb;
    --bg-darker: #e5e7eb;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-hover: #f9fafb;

    /* Borders - Cinza solido visivel */
    --border-color: #d1d5db;
    --border-light: #e5e7eb;

    /* Texto - Preto e cinzas escuros */
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-light: #6b7280;
    --text-dimmed: #9ca3af;
    --text-white: #111827;

    /* Cores de estado */
    --success-color: #059669;
    --success-dark: #047857;
    --success-bg: #d1fae5;
    --error-color: #dc2626;
    --error-dark: #b91c1c;
    --error-bg: #fee2e2;
    --warning-color: #d97706;
    --warning-dark: #b45309;
    --warning-bg: #fef3c7;
    --info-color: #2563eb;
    --info-dark: #1d4ed8;
    --info-bg: #dbeafe;

    /* Cores adicionais */
    --purple-color: #7c3aed;
    --purple-bg: #ede9fe;
    --muted-bg: #f3f4f6;

    /* Card */
    --card-bg: #ffffff;

    /* Sombras */
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);

    /* Bootstrap overrides */
    --bs-body-color: #111827;
    --bs-body-bg: #e5e7eb;
    --bs-link-color: #1565C0;
    --bs-link-hover-color: #0D47A1;

    color-scheme: light;
}

/* ==========================================
   OVERRIDES PARA TEMA CLARO
   ========================================== */

/* Body e layout principal */
[data-theme="light"] body {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

[data-theme="light"] .main-content {
    background: #f3f4f6 !important;
}

[data-theme="light"] .content-area {
    background: #f3f4f6 !important;
}

[data-theme="light"] .content-wrapper {
    background: #f3f4f6 !important;
}

/* Titulos */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] .h1,
[data-theme="light"] .h2,
[data-theme="light"] .h3,
[data-theme="light"] .h4,
[data-theme="light"] .h5,
[data-theme="light"] .h6 {
    color: #111827 !important;
}

[data-theme="light"] p {
    color: #374151 !important;
}

/* Cards - fundo branco com sombra - DESTAQUE do fundo */
[data-theme="light"] .card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04) !important;
}

[data-theme="light"] .card-title {
    color: #111827 !important;
}

[data-theme="light"] .card-body {
    background: #ffffff !important;
    color: #374151 !important;
}

[data-theme="light"] .card-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    color: #111827 !important;
}

[data-theme="light"] .card-footer {
    background: #ffffff !important;
    border-top: 1px solid #e5e7eb !important;
}

/* Sidebar */
[data-theme="light"] .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #e5e7eb !important;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05) !important;
}

/* Logo swap - esconder/mostrar baseado no tema */
.logo-light,
img.logo-light,
.sidebar-logo.logo-light,
.login-logo.logo-light {
    display: none !important;
}

.logo-dark,
img.logo-dark,
.sidebar-logo.logo-dark,
.login-logo.logo-dark {
    display: block !important;
}

[data-theme="light"] .logo-light,
[data-theme="light"] img.logo-light,
[data-theme="light"] .sidebar-logo.logo-light,
[data-theme="light"] .login-logo.logo-light {
    display: block !important;
}

[data-theme="light"] .logo-dark,
[data-theme="light"] img.logo-dark,
[data-theme="light"] .sidebar-logo.logo-dark,
[data-theme="light"] .login-logo.logo-dark {
    display: none !important;
}

/* Sidebar nav items */
[data-theme="light"] .sidebar .nav-section-title {
    color: #6b7280 !important;
}

[data-theme="light"] .nav-item {
    color: #374151 !important;
}

[data-theme="light"] .nav-item:hover {
    background: #f3f4f6 !important;
    color: #1565C0 !important;
}

[data-theme="light"] .nav-item.active {
    background: rgba(21, 101, 192, 0.1) !important;
    color: #1565C0 !important;
}

[data-theme="light"] .nav-item i {
    color: inherit !important;
}

/* Header */
[data-theme="light"] .app-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

[data-theme="light"] .page-title {
    color: #111827 !important;
}

[data-theme="light"] .header-icon-btn,
[data-theme="light"] .header-icon-btn i,
[data-theme="light"] .app-header .btn-icon,
[data-theme="light"] .app-header .btn-icon i,
[data-theme="light"] .app-header i,
[data-theme="light"] .mobile-menu-btn,
[data-theme="light"] .mobile-menu-btn i {
    color: #374151 !important;
}

[data-theme="light"] .header-icon-btn:hover,
[data-theme="light"] .app-header .btn-icon:hover {
    background: #f3f4f6 !important;
    color: #1565C0 !important;
}

/* User info */
[data-theme="light"] .user-name {
    color: #111827 !important;
}

[data-theme="light"] .user-role {
    color: #6b7280 !important;
}

[data-theme="light"] .user-avatar {
    background: #dbeafe !important;
    color: #1565C0 !important;
}

[data-theme="light"] .user-menu i {
    color: #6b7280 !important;
}

/* Forms - Modo Claro */
[data-theme="light"] .form-control,
[data-theme="light"] .form-select,
[data-theme="light"] input.form-control,
[data-theme="light"] textarea.form-control,
[data-theme="light"] select.form-select {
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    color-scheme: light !important;
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] input.form-control:focus,
[data-theme="light"] textarea.form-control:focus {
    background-color: #ffffff !important;
    border-color: #1565C0 !important;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15) !important;
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    outline: none !important;
}

[data-theme="light"] .form-control::placeholder,
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
    opacity: 1 !important;
}

/* Autofill no modo claro */
[data-theme="light"] input:-webkit-autofill,
[data-theme="light"] input:-webkit-autofill:hover,
[data-theme="light"] input:-webkit-autofill:focus,
[data-theme="light"] input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
    -webkit-text-fill-color: #111827 !important;
    caret-color: #111827 !important;
    background-color: #ffffff !important;
}

[data-theme="light"] .form-label,
[data-theme="light"] label {
    color: #374151 !important;
}

[data-theme="light"] .input-group-text {
    background: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    color: #6b7280 !important;
}

[data-theme="light"] .input-group-text i {
    color: #6b7280 !important;
}

/* Form check/switch no modo claro */
[data-theme="light"] .form-check-input {
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
}

[data-theme="light"] .form-check-input:checked {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
}

[data-theme="light"] .form-check-label {
    color: #374151 !important;
}

/* Tables */
[data-theme="light"] .table {
    color: #111827 !important;
}

[data-theme="light"] .table th {
    background: #f9fafb !important;
    color: #374151 !important;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb !important;
}

[data-theme="light"] .table td {
    color: #374151 !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

[data-theme="light"] .table tbody tr:hover {
    background: #f9fafb !important;
}

/* Stat cards */
[data-theme="light"] .stat-card,
[data-theme="light"] [class*="stat-card"] {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

[data-theme="light"] .stat-card-value {
    color: #111827 !important;
}

[data-theme="light"] .stat-card-label {
    color: #6b7280 !important;
}

/* Dropdowns */
[data-theme="light"] .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

[data-theme="light"] .dropdown-item {
    color: #374151 !important;
}

[data-theme="light"] .dropdown-item:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

[data-theme="light"] .dropdown-divider {
    border-color: #e5e7eb !important;
}

/* Modals */
[data-theme="light"] .modal-content {
    background: #ffffff !important;
    border: none !important;
}

[data-theme="light"] .modal-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
}

[data-theme="light"] .modal-header .modal-title {
    color: #111827 !important;
}

[data-theme="light"] .modal-body {
    background: #ffffff !important;
    color: #374151 !important;
}

[data-theme="light"] .modal-footer {
    background: #ffffff !important;
    border-top: 1px solid #e5e7eb !important;
}

/* Alerts */
[data-theme="light"] .alert-success {
    background: #d1fae5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #065f46 !important;
}

[data-theme="light"] .alert-danger {
    background: #fee2e2 !important;
    border: 1px solid #fecaca !important;
    color: #991b1b !important;
}

[data-theme="light"] .alert-warning {
    background: #fef3c7 !important;
    border: 1px solid #fde68a !important;
    color: #92400e !important;
}

[data-theme="light"] .alert-info {
    background: #dbeafe !important;
    border: 1px solid #bfdbfe !important;
    color: #1e40af !important;
}

/* Text utilities */
[data-theme="light"] .text-muted {
    color: #6b7280 !important;
}

[data-theme="light"] small,
[data-theme="light"] .small {
    color: #6b7280 !important;
}

[data-theme="light"] .fw-semibold,
[data-theme="light"] .fw-medium,
[data-theme="light"] .fw-bold {
    color: #111827 !important;
}

/* Breadcrumbs */
[data-theme="light"] .breadcrumb-item {
    color: #6b7280 !important;
}

[data-theme="light"] .breadcrumb-item a {
    color: #374151 !important;
}

[data-theme="light"] .breadcrumb-item.active {
    color: #111827 !important;
}

/* List groups */
[data-theme="light"] .list-group-item {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
}

/* Buttons */
[data-theme="light"] .btn-outline-secondary {
    color: #374151 !important;
    border-color: #d1d5db !important;
}

[data-theme="light"] .btn-outline-secondary:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
    border-color: #9ca3af !important;
}

[data-theme="light"] .btn-outline-primary {
    color: #1565C0 !important;
    border-color: #1565C0 !important;
}

[data-theme="light"] .btn-outline-primary:hover {
    background: #1565C0 !important;
    color: #ffffff !important;
}

/* Login page */
[data-theme="light"] .login-page {
    background: #e5e7eb !important;
}

[data-theme="light"] .login-card {
    background: #ffffff !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

[data-theme="light"] .login-title {
    color: #111827 !important;
}

[data-theme="light"] .login-subtitle {
    color: #6b7280 !important;
}

/* Login logo - centralizar e alinhar */
.login-card .text-center .login-logo {
    display: inline-block !important;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="light"] .login-card .text-center .login-logo.logo-dark {
    display: none !important;
}

[data-theme="light"] .login-card .text-center .login-logo.logo-light {
    display: inline-block !important;
}

/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f3f4f6;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #9ca3af;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Icons - default color */
[data-theme="light"] .bi,
[data-theme="light"] i.bi {
    color: #6b7280;
}

/* Icons in specific contexts inherit parent color */
[data-theme="light"] .btn i.bi,
[data-theme="light"] .nav-item i.bi,
[data-theme="light"] .dropdown-item i.bi {
    color: inherit !important;
}

/* Badges */
[data-theme="light"] .badge.bg-secondary {
    background: #e5e7eb !important;
    color: #374151 !important;
}

[data-theme="light"] .badge.bg-primary {
    background: #1565C0 !important;
    color: #ffffff !important;
}

/* Separators */
[data-theme="light"] hr {
    border-color: #e5e7eb !important;
    opacity: 1;
}

/* Form switches / toggles */
[data-theme="light"] .form-check-label {
    color: #374151 !important;
}

[data-theme="light"] .form-switch .form-check-input {
    background-color: #d1d5db !important;
    border-color: #d1d5db !important;
}

[data-theme="light"] .form-switch .form-check-input:checked {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
}

/* Nav tabs */
[data-theme="light"] .nav-tabs {
    border-bottom: 1px solid #e5e7eb !important;
}

[data-theme="light"] .nav-tabs .nav-link {
    color: #6b7280 !important;
}

[data-theme="light"] .nav-tabs .nav-link:hover {
    color: #1565C0 !important;
    border-color: transparent !important;
}

[data-theme="light"] .nav-tabs .nav-link.active {
    color: #1565C0 !important;
    background: #ffffff !important;
    border-color: #e5e7eb #e5e7eb #ffffff !important;
}

/* ==========================================
   BOTAO DE TOGGLE DE TEMA
   ========================================== */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
}

.theme-toggle:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    color: #ffffff !important;
}

.theme-toggle:hover i {
    transform: rotate(180deg);
}

/* Icone do tema - escuro mostra lua, claro mostra sol */
.theme-toggle .bi-sun-fill {
    display: none !important;
}

.theme-toggle .bi-moon-fill {
    display: inline-block !important;
}

[data-theme="light"] .theme-toggle .bi-sun-fill {
    display: inline-block !important;
}

[data-theme="light"] .theme-toggle .bi-moon-fill {
    display: none !important;
}

/* Toggle na pagina de login - posicao diferente */
.login-page .theme-toggle {
    top: 20px;
    bottom: auto;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-darker);
    color: #f8fafc;
    min-height: 100vh;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-color); text-decoration: none; }
a:hover { color: var(--primary-hover); }
a:visited { color: var(--primary-color); }

h1, h2, h3, h4, h5, h6 { color: #f8fafc; }
p { color: #e2e8f0; }

* {
    --bs-link-color: var(--primary-color);
    --bs-link-hover-color: var(--primary-hover);
}

:root {
    color-scheme: dark;
    -webkit-tap-highlight-color: transparent;
}

[onclick], 
[data-bs-toggle],
.clickable,
.cursor-pointer {
    color: inherit;
}

/* Layout */
.app-container { display: flex; min-height: 100vh; }

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.content-wrapper {
    padding: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 250;
    transition: left var(--transition-normal);
}

.header-left { display: flex; align-items: center; gap: 1rem; }
.header-right { display: flex; align-items: center; gap: 0.5rem; }
.page-title { font-size: 1.125rem; font-weight: 600; color: #f8fafc; margin: 0; }

/* Header icon buttons - garantir visibilidade em AMBOS os modos */
.header-icon-btn,
.header-icon-btn.btn-icon,
.app-header .btn-icon {
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.header-icon-btn:hover,
.header-icon-btn.btn-icon:hover,
.app-header .btn-icon:hover {
    color: var(--primary-color) !important;
    background: var(--primary-light) !important;
}

.header-icon-btn i,
.header-icon-btn.btn-icon i,
.app-header .btn-icon i {
    color: inherit !important;
}

/* Modo escuro - icones brancos */
:root .header-icon-btn,
:root .app-header .btn-icon {
    color: #f8fafc;
}

:root .header-icon-btn i,
:root .app-header .btn-icon i {
    color: #f8fafc;
}

.breadcrumb { margin: 0; padding: 0; background: none; font-size: 0.875rem; }
.breadcrumb-item { color: var(--text-secondary); }
.breadcrumb-item a { color: #f8fafc; }
.breadcrumb-item.active { color: #f8fafc; }

/* Header mobile logo */
.header-logo-mobile {
    display: none;
}

.header-logo-mobile img {
    height: 28px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.header-title-desktop {
    display: block;
}

.mobile-menu-btn {
    display: none !important;
    background: none;
    border: none;
    color: #f8fafc !important;
    padding: 0.5rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn i {
    color: #f8fafc !important;
    font-size: 1.5rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform var(--transition-normal);
    overflow: hidden;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

.sidebar-header a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    overflow: hidden;
}

.sidebar-logo {
    height: 28px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block;
}

.sidebar-logo-text {
    color: #f8fafc;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section { margin-bottom: 0.5rem; }

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 1rem 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: #ffffff;
    transition: all var(--transition-fast);
    cursor: pointer;
    border-left: 3px solid transparent;
    margin: 0.125rem 0;
    text-decoration: none;
}

.nav-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-item i {
    font-size: 1.125rem;
    width: 1.5rem;
    text-align: center;
    color: inherit;
}

.nav-item span {
    font-size: 0.875rem;
    white-space: nowrap;
    color: inherit;
}

.nav-badge {
    margin-left: auto;
    background: var(--error-color);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.user-menu:hover { 
    background: var(--primary-light); 
}

.user-menu:hover .user-name,
.user-menu:hover .user-role {
    color: var(--primary-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

/* User avatar como imagem */
img.user-avatar {
    object-fit: cover;
    background: var(--bg-secondary);
}

.user-info { overflow: hidden; flex: 1; }
.user-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role { font-size: 0.75rem; color: var(--text-secondary); }

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title i { color: var(--primary-color); }

.card-body { padding: 1.25rem; }
.card-body.p-0 { padding: 0; }

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    height: 100%;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.stat-card-icon.primary { background: var(--primary-light); color: var(--primary-color); }
.stat-card-icon.success { background: var(--success-bg); color: var(--success-color); }
.stat-card-icon.warning { background: var(--warning-bg); color: var(--warning-color); }
.stat-card-icon.error { background: var(--error-bg); color: var(--error-color); }
.stat-card-icon.info { background: var(--info-bg); color: var(--info-color); }

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-card-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Forms */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: #ffffff;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: var(--bg-card);
    color: #ffffff;
}

.form-control::placeholder { 
    color: var(--text-secondary); 
    opacity: 1;
}

.form-control:disabled,
.form-select:disabled {
    background: rgba(30, 41, 59, 0.6);
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.7;
}

input.form-control,
textarea.form-control,
select.form-select {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
}

input.form-control::placeholder {
    color: var(--text-secondary) !important;
    -webkit-text-fill-color: var(--text-secondary);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-input) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-select option { 
    background: var(--bg-card); 
    color: #ffffff; 
}

.input-group { display: flex; }
.input-group .form-control { 
    border-radius: 0; 
    border-left: none;
}
.input-group .form-control:first-child { 
    border-radius: var(--radius-lg) 0 0 var(--radius-lg); 
    border-left: 1px solid var(--border-light);
}
.input-group .form-control:last-child { 
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0; 
}
.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    margin-left: -1px;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.input-group-text:first-child {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    border-right: none;
}

.input-group-text:last-child {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    border-left: none;
    cursor: pointer;
}

.input-group-text:last-child:hover {
    color: #f8fafc;
    background: var(--bg-input);
}

.form-check { display: flex; align-items: center; gap: 0.5rem; padding: 0; }
.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin: 0;
}
.form-check-input:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}
.form-check-label { 
    color: #f8fafc; 
    cursor: pointer; 
}

/* Switch - corrigir posicionamento */
.form-switch {
    padding-left: 0 !important;
}

.form-switch .form-check-input {
    width: 2.5rem;
    height: 1.25rem;
    border-radius: 1rem;
    margin-left: 0;
    margin-right: 0.5rem;
    position: relative;
    float: none;
}

.form-text { 
    font-size: 0.8125rem; 
    color: var(--text-secondary); 
    margin-top: 0.25rem; 
}
.invalid-feedback { 
    color: var(--error-color); 
    font-size: 0.8125rem; 
    margin-top: 0.25rem; 
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover) !important;
    color: #ffffff !important;
}
.btn-primary i {
    color: #ffffff !important;
}

/* Reforco para links com classe btn */
a.btn-primary,
a.btn-primary:link,
a.btn-primary:visited,
a.btn-primary:active {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
}
a.btn-primary:hover {
    background: var(--primary-hover) !important;
    color: #ffffff !important;
}

.btn-success {
    background: var(--success-color) !important;
    color: #ffffff !important;
}
.btn-success:hover:not(:disabled) {
    background: #16a34a !important;
    color: #ffffff !important;
}
a.btn-success,
a.btn-success:link,
a.btn-success:visited {
    color: #ffffff !important;
}

.btn-danger {
    background: var(--error-color) !important;
    color: #ffffff !important;
}
.btn-danger:hover:not(:disabled) {
    background: #dc2626 !important;
    color: #ffffff !important;
}
a.btn-danger,
a.btn-danger:link,
a.btn-danger:visited {
    color: #ffffff !important;
}

.btn-warning {
    background: var(--warning-color) !important;
    color: #ffffff !important;
}
.btn-warning:hover:not(:disabled) {
    background: #d97706 !important;
    color: #ffffff !important;
}
a.btn-warning,
a.btn-warning:link,
a.btn-warning:visited {
    color: #ffffff !important;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.btn-outline-primary:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    background: transparent;
    color: #e2e8f0;
    border: 1px solid var(--border-light);
}
.btn-outline-secondary:hover:not(:disabled) {
    background: var(--bg-secondary);
    color: #f8fafc;
    border-color: #e2e8f0;
}

.btn-outline-danger {
    background: transparent;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}
.btn-outline-danger:hover:not(:disabled) {
    background: var(--error-color);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

/* Badges - garantir texto branco */
.badge {
    color: #ffffff !important;
}

.badge.bg-warning,
.badge.bg-info,
.badge.bg-success,
.badge.bg-danger,
.badge.bg-primary,
.badge.bg-secondary {
    color: #ffffff !important;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon.sm {
    width: 32px;
    height: 32px;
}

/* Tables */
.table {
    width: 100%;
    color: #f8fafc;
    border-collapse: collapse;
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 0.875rem 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: #e2e8f0;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: rgba(0, 0, 0, 0.1);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge.bg-success,
.badge-success {
    background: var(--success-bg) !important;
    color: var(--success-color) !important;
}

.badge.bg-danger,
.badge-danger {
    background: var(--error-bg) !important;
    color: var(--error-color) !important;
}

.badge.bg-warning,
.badge-warning {
    background: var(--warning-bg) !important;
    color: var(--warning-color) !important;
}

.badge.bg-info,
.badge-info {
    background: var(--info-bg) !important;
    color: var(--info-color) !important;
}

.badge.bg-primary,
.badge-primary {
    background: var(--primary-color) !important;
    color: #ffffff !important;
}

.badge.bg-secondary,
.badge-secondary {
    background: var(--bg-secondary) !important;
    color: #e2e8f0 !important;
}

/* Clock styles */
.clock-display {
    font-size: 3.5rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1;
    letter-spacing: -0.02em;
}

.clock-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.clock-status.working {
    background: var(--success-bg);
    color: var(--success-color);
}

.clock-status.not-working {
    background: var(--error-bg);
    color: var(--error-color);
}

/* Quick action buttons */
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: #f8fafc;
    transition: all var(--transition-fast);
    min-height: 120px;
    border: 1px solid transparent;
}

.quick-action-btn:hover {
    background: var(--primary-light);
    color: #f8fafc;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.quick-action-btn span {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

/* Notification item */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.notification-item:hover {
    background: rgba(0, 0, 0, 0.1);
}

.notification-item.unread {
    background: var(--primary-light);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.success {
    background: var(--success-bg);
    color: var(--success-color);
}

.notification-icon.error {
    background: var(--error-bg);
    color: var(--error-color);
}

.notification-icon.warning {
    background: var(--warning-bg);
    color: var(--warning-color);
}

.notification-icon.info {
    background: var(--info-bg);
    color: var(--info-color);
}

.notification-icon.primary {
    background: var(--primary-light);
    color: var(--primary-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 500;
    color: #f8fafc;
    margin-bottom: 0.25rem;
}

.notification-text {
    font-size: 0.875rem;
    color: #e2e8f0;
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid;
    margin-bottom: 1rem;
}

.alert-success {
    background: var(--success-bg);
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--success-color);
}

.alert-danger {
    background: var(--error-bg);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--error-color);
}

.alert-warning {
    background: var(--warning-bg);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning-color);
}

.alert-info {
    background: var(--info-bg);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--info-color);
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.login-logo {
    height: 48px;
    margin-bottom: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Garantir que apenas um logo aparece */
.login-card .logo-light {
    display: none;
}

.login-card .logo-dark {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="light"] .login-card .logo-light {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="light"] .login-card .logo-dark {
    display: none;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #f8fafc !important;
}

.login-subtitle {
    color: #e2e8f0 !important;
    margin-bottom: 2rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ===========================================
   PAGE HEADER - PADRÃO GLOBAL
   =========================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #f8fafc;
}

.page-header-title p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.875rem;
}

.page-header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-header-actions .btn {
        flex: 1;
    }
}

/* ===========================================
   FILTERS CARD - PADRÃO GLOBAL
   =========================================== */
.filters-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filters-bar .form-control,
.filters-bar .form-select {
    flex: 1;
    min-width: 150px;
    max-width: 300px;
}

.filters-bar .btn {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .filters-bar {
        flex-direction: column;
    }

    .filters-bar .form-control,
    .filters-bar .form-select {
        max-width: 100%;
        width: 100%;
    }

    .filters-bar .btn {
        width: 100%;
    }
}

/* ===========================================
   STATS ROW - PADRÃO GLOBAL
   =========================================== */
.stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-mini {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 150px;
    border: 1px solid var(--border-color);
}

.stat-mini-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.stat-mini-icon.primary { background: var(--primary-light); color: var(--primary-color); }
.stat-mini-icon.success { background: var(--success-bg); color: var(--success-color); }
.stat-mini-icon.warning { background: var(--warning-bg); color: var(--warning-color); }
.stat-mini-icon.error { background: var(--error-bg); color: var(--error-color); }
.stat-mini-icon.info { background: var(--info-bg); color: var(--info-color); }

.stat-mini-info {
    flex: 1;
}

.stat-mini-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
}

.stat-mini-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .stats-row {
        flex-direction: column;
    }

    .stat-mini {
        width: 100%;
    }
}

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.filter-bar .form-control,
.filter-bar .form-select {
    flex: 1;
    min-width: 150px;
}

/* Modal Dark Theme */
.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #f8fafc;
}

.modal-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    color: #f8fafc;
}

.modal-header .modal-title {
    color: #f8fafc;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.modal-body {
    background-color: var(--bg-card);
    color: #e2e8f0;
}

.modal-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

/* Dropdown Dark Theme */
.dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    color: #e2e8f0;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--primary-light);
    color: #f8fafc;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--primary-color);
    color: white;
}

.dropdown-divider {
    border-color: var(--border-color);
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .sidebar-overlay.show { display: block; }
    .main-content { margin-left: 0; }
    .app-header { left: 0; }
    
    /* Mostrar botao hamburguer no mobile */
    .mobile-menu-btn,
    button.mobile-menu-btn,
    .btn.mobile-menu-btn,
    .header-left .mobile-menu-btn {
        display: flex !important;
    }
    
    .content-wrapper { padding: 1rem; }
    .btn-group { width: 100%; }
    .btn-group .btn { flex: 1; }
    
    /* Header mobile - mostrar logo, esconder titulo */
    .header-logo-mobile {
        display: block !important;
    }
    
    .header-title-desktop {
        display: none !important;
    }
    
    /* FORCADO: Icones brancos no mobile */
    .app-header .mobile-menu-btn,
    .app-header .mobile-menu-btn i,
    .app-header .header-icon-btn,
    .app-header .header-icon-btn i,
    .app-header .btn-icon,
    .app-header .btn-icon i,
    .app-header .btn,
    .app-header .btn i,
    .app-header button,
    .app-header button i,
    .app-header a.btn-icon,
    .app-header a.btn-icon i {
        color: #ffffff !important;
    }
}

@media (max-width: 575.98px) {
    .login-card { padding: 1.5rem; }
    .content-wrapper { padding: 0.75rem; }
    .card-body { padding: 1rem; }
    .stat-card { padding: 1rem; }
    .stat-card-value { font-size: 1.5rem; }
    h1.h3 { font-size: 1.25rem; }
    .clock-display { font-size: 2rem; }
    .display-4 { font-size: 2rem; }
    .display-6 { font-size: 1.25rem; }
    .quick-action-btn { min-height: 100px; padding: 1rem; }
    .quick-action-btn i { font-size: 1.5rem; }
    
    /* Logo mobile menor em ecras pequenos */
    .header-logo-mobile img {
        height: 24px;
        max-width: 100px;
    }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-darker); }
::-webkit-scrollbar-thumb { background: #64748b; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Utility classes */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-secondary) !important; }
.text-light { color: #cbd5e1 !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--error-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }

/* OVERRIDES DE LEGIBILIDADE - MUITO IMPORTANTE */

/* Garantir que TODOS os textos sejam legiveis */
body, html {
    color: #f8fafc;
}

/* Textos em cards */
.card, .card-body, .card-header, .card-footer {
    color: #f8fafc;
}

.card-body p,
.card-body span,
.card-body div,
.card-body label {
    color: #e2e8f0;
}

.card-title {
    color: #f8fafc !important;
}

/* Headers de tabela */
.table th {
    color: var(--text-secondary) !important;
}

/* Celulas de tabela */
.table td {
    color: #e2e8f0 !important;
}

/* Labels de formulario */
.form-label,
label {
    color: #e2e8f0 !important;
}

/* Subtitulos e descricoes */
.text-muted,
.form-text,
small.text-muted {
    color: var(--text-secondary) !important;
}

/* Valores importantes - sempre branco */
.stat-card-value,
.balance-value,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    color: #f8fafc !important;
}

/* Labels de estatisticas */
.stat-card-label {
    color: var(--text-secondary) !important;
}

/* Titulos h1-h6 */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: #f8fafc !important;
}

/* Paragrafos */
p {
    color: #e2e8f0;
}

/* Itens de lista */
li {
    color: #e2e8f0;
}

/* Links de navegacao no sidebar */
.nav-link {
    color: #cbd5e1 !important;
}

.nav-link:hover,
.nav-link.active {
    color: #f8fafc !important;
}

/* Textos em modais */
.modal-title {
    color: #f8fafc !important;
}

.modal-body {
    color: #e2e8f0;
}

/* Textos em alertas */
.alert {
    color: inherit;
}

/* Corrigir texto em filtros/chips */
.filter-chip {
    color: #e2e8f0 !important;
}

.filter-chip.active {
    color: white !important;
}

/* Valores em transacoes */
.transaction-description,
.record-date,
.location-name {
    color: #f8fafc !important;
}

.transaction-date,
.record-day,
.location-address {
    color: var(--text-secondary) !important;
}

/* Calendario */
.day-number {
    color: #f8fafc !important;
}

.calendar-day.other-month .day-number {
    color: #64748b !important;
}

/* Schedule time */
.schedule-time {
    color: var(--primary-color) !important;
}

.schedule-hours,
.schedule-break {
    color: var(--text-secondary) !important;
}

/* Info cards */
.info-card p,
.info-card span {
    color: #e2e8f0 !important;
}

/* Empty states */
.empty-state-title {
    color: #f8fafc !important;
}

.empty-state-text {
    color: var(--text-secondary) !important;
}

/* Breadcrumbs */
.breadcrumb-item {
    color: var(--text-secondary);
}

.breadcrumb-item a {
    color: #cbd5e1 !important;
}

.breadcrumb-item.active {
    color: #f8fafc !important;
}

/* User info no sidebar */
.user-name {
    color: #f8fafc !important;
}

.user-role {
    color: var(--text-secondary) !important;
}

/* Garantir legibilidade em qualquer elemento filho de cards */
.card * {
    color: inherit;
}

.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: #f8fafc !important;
}

/* Textos de resumo/summary */
.summary-value {
    color: var(--primary-color) !important;
}

.summary-label {
    color: var(--text-secondary) !important;
}

/* Endereco e informacoes secundarias */
.location-address,
.address,
.secondary-info {
    color: #e2e8f0 !important;
}

/* Informacoes terciarias */
.location-radius,
.tertiary-info,
.meta-info {
    color: var(--text-secondary) !important;
}

/* Day off badges */
.day-off-badge {
    font-weight: 500;
}

/* Chart labels */
.chart-bar-value,
.chart-bar-label {
    color: #f8fafc !important;
}

.chart-bar-label {
    color: var(--text-secondary) !important;
}

/* Legend items */
.legend-item {
    color: var(--text-secondary) !important;
}

/* Balance labels */
.balance-label {
    color: var(--text-secondary) !important;
}

.balance-update {
    color: #64748b !important;
}

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--error-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }

/* Badges light - para tipos de justificacao */
.bg-info-light {
    background: var(--info-bg) !important;
    color: var(--info-color) !important;
}

.bg-warning-light {
    background: var(--warning-bg) !important;
    color: var(--warning-color) !important;
}

.bg-success-light {
    background: var(--success-bg) !important;
    color: var(--success-color) !important;
}

.bg-danger-light {
    background: var(--error-bg) !important;
    color: var(--error-color) !important;
}

.bg-primary-light {
    background: var(--primary-light) !important;
    color: var(--primary-color) !important;
}

.bg-secondary-light {
    background: var(--muted-bg) !important;
    color: #cbd5e1 !important;
}

/* Classes de texto para legibilidade */
.text-meta,
.text-description {
    color: var(--text-secondary) !important;
}

/* Garantir que todos os small dentro de cards sejam visiveis */
.card small,
.card .small,
.card-body small {
    color: var(--text-secondary) !important;
}

/* Garantir que fw-semibold e fw-medium dentro de cards sejam brancos */
.card .fw-semibold,
.card .fw-medium,
.card-body .fw-semibold,
.card-body .fw-medium {
    color: #f8fafc !important;
}

/* Correcoes, ferias, justificacoes - labels e valores */
.correction-time-label,
.vacation-label,
.justification-label {
    color: var(--text-secondary) !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.correction-time-value,
.vacation-value,
.justification-value {
    color: #f8fafc !important;
}

.correction-date,
.vacation-date,
.justification-date {
    color: #f8fafc !important;
}

.correction-date span,
.vacation-date span,
.justification-date span {
    color: #f8fafc !important;
}

.correction-reason,
.vacation-reason,
.justification-reason {
    color: var(--text-secondary) !important;
}

.correction-meta,
.vacation-meta,
.justification-meta {
    color: var(--text-secondary) !important;
}

/* Dropdown menus */
.dropdown-menu {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

.dropdown-item {
    color: #e2e8f0 !important;
}

.dropdown-item:hover {
    background: var(--bg-hover) !important;
    color: #f8fafc !important;
}

.dropdown-item.text-danger {
    color: var(--error-color) !important;
}

.dropdown-divider {
    border-color: var(--border-color) !important;
}

/* Garantir que todos os icones bi- herdem cor */
.bi {
    color: inherit;
}

/* Fix para inputs */
.form-control,
.form-select {
    color: #f8fafc !important;
    background-color: var(--bg-input) !important;
}

.form-control::placeholder {
    color: #64748b !important;
}

/* Fix para alerts */
.alert-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
    color: #86efac !important;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #fcd34d !important;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #93c5fd !important;
}

/* Fix para textos muted - GARANTIR LEGIBILIDADE */
.text-muted,
small.text-muted,
.small.text-muted,
span.text-muted,
div.text-muted,
p.text-muted,
i.text-muted,
label.text-muted {
    color: var(--text-secondary) !important;
}

/* Small text deve ser legivel */
small,
.small {
    color: #e2e8f0 !important;
}

/* fw-semibold e fw-medium devem ser brancos */
.fw-semibold,
.fw-medium,
.fw-bold {
    color: #f8fafc !important;
}

/* Text-secondary legivel */
.text-secondary,
p.text-secondary {
    color: #e2e8f0 !important;
}

/* Text-light legivel */
.text-light {
    color: #cbd5e1 !important;
}

/* Icones dentro de text-muted */
.text-muted i,
i.text-muted {
    color: var(--text-secondary) !important;
}

/* Garantir cores nos cards de pedidos */
.correction-time-value,
.vacation-value,
.justification-value {
    color: #f8fafc !important;
}

.correction-time-label,
.vacation-label,
.justification-label {
    color: var(--text-secondary) !important;
}

/* Small dentro de cards */
.card small,
.card .small,
.card-body small {
    color: var(--text-secondary) !important;
}

/* Spans com fw dentro de cards */
.card .fw-semibold,
.card .fw-medium,
.card-body .fw-semibold,
.card-body .fw-medium {
    color: #f8fafc !important;
}

/* Empty states */
.empty-state .text-muted,
.text-center .text-muted,
.py-5 .text-muted {
    color: var(--text-secondary) !important;
}

.empty-state h5,
.text-center h5.text-muted {
    color: #cbd5e1 !important;
}

/* Requirement items no ponto */
.requirement-item,
.requirement-item span {
    color: #e2e8f0 !important;
}

/* Location status cards */
.location-status-card .fw-semibold,
.location-status-card .fw-medium,
#locationTitle {
    color: #f8fafc !important;
}

.location-status-card .text-muted,
.location-status-card .small,
#locationSubtitle {
    color: var(--text-secondary) !important;
}

/* Work location items */
.work-location-item .fw-medium,
.work-location-item .fw-semibold {
    color: #f8fafc !important;
}

.work-location-item .text-muted,
.work-location-item .small {
    color: var(--text-secondary) !important;
}

/* Garantir cores em todos os elementos de lista */
.list-group-item {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: #e2e8f0 !important;
}

/* Fix generico para qualquer texto que possa ter ficado escuro */
.card-body span:not(.badge):not(.text-primary):not(.text-success):not(.text-danger):not(.text-warning):not(.text-info),
.card-body div:not(.stat-card-icon):not(.badge) {
    color: inherit;
}

/* CORRECAO FINAL - Garantir legibilidade de text-muted e small */
.text-muted {
    color: var(--text-secondary) !important;
}

small,
.small {
    color: var(--text-secondary) !important;
}

small.text-muted,
.small.text-muted {
    color: var(--text-secondary) !important;
}

/* Textos dentro de items de correcao e justificacao */
.correction-item small,
.justification-item small,
.correction-reason small,
.justification-reason small,
.correction-meta small,
.justification-meta small,
.correction-description small,
.justification-description small {
    color: var(--text-secondary) !important;
}

/* Textos de descricao em cards de pedidos */
.correction-item .text-muted,
.justification-item .text-muted,
.vacation-item .text-muted {
    color: var(--text-secondary) !important;
}

/* Titulos dentro de items sempre brancos */
.correction-item .fw-semibold,
.justification-item .fw-semibold,
.vacation-item .fw-semibold,
.record-card .fw-semibold {
    color: #f8fafc !important;
}

/* Datas em items sempre brancas */
.correction-date,
.justification-date,
.vacation-date,
.record-date {
    color: #f8fafc !important;
}

.correction-date span,
.justification-date span,
.vacation-date span {
    color: #f8fafc !important;
}

/* Timeline items */
.timeline-item .text-muted {
    color: var(--text-secondary) !important;
}

.timeline-time {
    color: #f8fafc !important;
}

.timeline-type {
    color: #e2e8f0 !important;
}

/* Location status text */
#locationTitle {
    color: #f8fafc !important;
}

#locationSubtitle {
    color: var(--text-secondary) !important;
}

/* Work location items */
.work-location-item .fw-medium {
    color: #f8fafc !important;
}

.work-location-item .small {
    color: var(--text-secondary) !important;
}

.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }

/* ========================================
   OVERRIDES FINAIS - GARANTIR LEGIBILIDADE
   ======================================== */

/* Paragrafos em geral */
p {
    color: #e2e8f0;
}

/* Paragrafos com classes especificas */
p.text-secondary,
p.text-light,
.text-secondary,
.text-light {
    color: #e2e8f0 !important;
}

/* Login page */
.login-page p,
.login-card p {
    color: #e2e8f0 !important;
}

/* Links secundarios */
a.text-secondary {
    color: var(--text-secondary) !important;
}

a.text-secondary:hover {
    color: #e2e8f0 !important;
}

/* Botoes outline-secondary - texto visivel */
.btn-outline-secondary {
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

.btn-outline-secondary:hover {
    background: #475569 !important;
    color: #f8fafc !important;
}

/* Icones dentro de elementos muted */
i.text-muted,
.text-muted i {
    color: var(--text-secondary) !important;
}

/* H5 com text-muted */
h5.text-muted {
    color: #cbd5e1 !important;
}

/* Qualquer elemento com style inline de cor - override */
[style*="color: var(--text-secondary)"] {
    color: var(--text-secondary) !important;
}

/* Form labels */
.form-label,
label {
    color: #e2e8f0 !important;
}

/* Input group text (icones) */
.input-group-text {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

/* Placeholders - mais escuros que o texto */
::placeholder {
    color: #64748b !important;
    opacity: 1 !important;
}

/* Badge secondary */
.badge.bg-secondary {
    background: #475569 !important;
    color: #f8fafc !important;
}

/* Tabelas */
table {
    color: #e2e8f0;
}

td, th {
    color: inherit;
}

/* Cards header e body */
.card-header,
.card-body,
.card-footer {
    color: #f8fafc;
}

/* Alerts - garantir texto legivel */
.alert {
    color: inherit;
}

.alert strong {
    color: inherit;
}

/* Schedule display */
.schedule-time {
    color: var(--primary-color) !important;
}

/* Timeline */
.timeline-time {
    color: #f8fafc !important;
}

.timeline-type {
    color: #e2e8f0 !important;
}

/* Stat cards */
.stat-card-value {
    color: #f8fafc !important;
}

.stat-card-label {
    color: var(--text-secondary) !important;
}

/* Print styles */
@media print {
    .sidebar,
    .app-header,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* ===========================================
   OVERRIDES FINAIS - MAXIMA PRIORIDADE
   =========================================== */

/* Botoes - garantir texto branco em todos os estados */
.btn.btn-primary,
.btn.btn-primary:link,
.btn.btn-primary:visited,
.btn.btn-primary:active,
.btn.btn-primary:focus,
a.btn.btn-primary,
a.btn.btn-primary:link,
a.btn.btn-primary:visited,
a.btn.btn-primary:active,
a.btn.btn-primary:focus,
button.btn-primary {
    background-color: #1565c0 !important;
    color: #ffffff !important;
    border-color: #1565c0 !important;
}

.btn.btn-primary:hover,
a.btn.btn-primary:hover,
button.btn-primary:hover {
    background-color: #1976d2 !important;
    color: #ffffff !important;
}

.btn.btn-success,
a.btn.btn-success,
button.btn-success {
    background-color: #22c55e !important;
    color: #ffffff !important;
}

.btn.btn-danger,
a.btn.btn-danger,
button.btn-danger {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}

.btn.btn-warning,
a.btn.btn-warning,
button.btn-warning {
    background-color: #f59e0b !important;
    color: #ffffff !important;
}

/* Icones dentro de botoes */
.btn-primary i,
.btn-success i,
.btn-danger i,
.btn-warning i {
    color: #ffffff !important;
}

/* ==========================================
   EMPLOYEE DASHBOARD - FORCAR VISIBILIDADE
   ========================================== */

/* Garantir que todo o conteudo da dashboard e visivel */
.content-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 100vh;
}

.greeting-section,
.stats-row,
.clock-card,
.records-timeline {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Stats cards */
.stat-card-mini {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.stat-card-mini-value,
.stat-card-mini-label,
.stat-card-mini-icon {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Garantir que valores sao visiveis */
.stat-card-mini-value {
    color: #f8fafc !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

.stat-card-mini-label {
    color: #94a3b8 !important;
    font-size: 0.75rem !important;
}

/* Saudacao */
.greeting-text {
    display: block !important;
    color: #f8fafc !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

.greeting-date,
.current-time-display {
    display: block !important;
    visibility: visible !important;
    color: #f8fafc !important;
}

/* Records timeline */
.record-item {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.record-type,
.record-time,
.record-location {
    display: block !important;
    visibility: visible !important;
}

/* Cards da dashboard */
.card,
.card-body,
.card-header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ==========================================
   MODO CLARO - OVERRIDES COMPLETOS
   ========================================== */

/* Fundo geral - cinza mais escuro para contraste */
[data-theme="light"] {
    --bg-dark: #f3f4f6 !important;
    --bg-darker: #e5e7eb !important;
    --bg-card: #ffffff !important;
}

/* Stat cards e elementos da dashboard */
[data-theme="light"] .stat-card,
[data-theme="light"] .stat-card-mini,
[data-theme="light"] .attendance-overview,
[data-theme="light"] .quick-action,
[data-theme="light"] .filters-card,
[data-theme="light"] .stat-mini {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}

/* Valores e labels dos stat cards */
[data-theme="light"] .stat-card-value,
[data-theme="light"] .stat-card-mini-value,
[data-theme="light"] .stat-mini-value {
    color: #111827 !important;
}

[data-theme="light"] .stat-card-label,
[data-theme="light"] .stat-card-mini-label,
[data-theme="light"] .stat-mini-label {
    color: #6b7280 !important;
}

/* Dashboard overview */
[data-theme="light"] .attendance-overview-title,
[data-theme="light"] .attendance-circle-value {
    color: #111827 !important;
}

[data-theme="light"] .attendance-circle-label,
[data-theme="light"] .attendance-stat-label {
    color: #6b7280 !important;
}

[data-theme="light"] .attendance-stat-value {
    color: #111827 !important;
}

/* Quick actions */
[data-theme="light"] .quick-action-label {
    color: #111827 !important;
}

/* Pending items */
[data-theme="light"] .pending-item {
    background: #f9fafb !important;
}

[data-theme="light"] .pending-name {
    color: #111827 !important;
}

[data-theme="light"] .pending-type {
    color: #6b7280 !important;
}

/* Summary rows */
[data-theme="light"] .summary-label {
    color: #6b7280 !important;
}

[data-theme="light"] .summary-value {
    color: #111827 !important;
}

/* Header - CORRECAO DOS ICONES */
[data-theme="light"] .app-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
}

[data-theme="light"] .app-header .header-icon-btn,
[data-theme="light"] .app-header .header-icon-btn i,
[data-theme="light"] .app-header .btn-icon,
[data-theme="light"] .app-header .btn-icon i,
[data-theme="light"] .app-header .mobile-menu-btn,
[data-theme="light"] .app-header .mobile-menu-btn i,
[data-theme="light"] .header-right .btn-icon,
[data-theme="light"] .header-right .btn-icon i,
[data-theme="light"] .header-right .header-icon-btn,
[data-theme="light"] .header-right .header-icon-btn i,
[data-theme="light"] .header-right a i,
[data-theme="light"] .header-right button i {
    color: #374151 !important;
}

[data-theme="light"] .app-header .header-icon-btn:hover,
[data-theme="light"] .app-header .btn-icon:hover {
    background: #f3f4f6 !important;
    color: #1565C0 !important;
}

[data-theme="light"] .app-header .header-icon-btn:hover i,
[data-theme="light"] .app-header .btn-icon:hover i {
    color: #1565C0 !important;
}

/* Dropdown no header */
[data-theme="light"] .dropdown-toggle::after {
    color: #374151 !important;
}

/* Botao de toggle de tema */
[data-theme="light"] .theme-toggle {
    background: #1565C0 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3) !important;
}

[data-theme="light"] .theme-toggle i {
    color: #ffffff !important;
}

/* Empty states */
[data-theme="light"] .empty-state {
    color: #6b7280 !important;
}

[data-theme="light"] .empty-state i {
    color: #9ca3af !important;
}

/* Tabelas na dashboard */
[data-theme="light"] .recent-clocks-table th {
    color: #6b7280 !important;
    background: #f9fafb !important;
}

[data-theme="light"] .recent-clocks-table td {
    color: #374151 !important;
    border-color: #e5e7eb !important;
}

[data-theme="light"] .recent-clocks-table td small {
    color: #6b7280 !important;
}

/* User cell na tabela */
[data-theme="light"] .user-cell span {
    color: #111827 !important;
}

/* Page header */
[data-theme="light"] .page-header-title h1 {
    color: #111827 !important;
}

[data-theme="light"] .page-header-title p {
    color: #6b7280 !important;
}

/* Greeting */
[data-theme="light"] .greeting-text {
    color: #111827 !important;
}

[data-theme="light"] .greeting-date,
[data-theme="light"] .current-time-display {
    color: #6b7280 !important;
}

/* Clock display */
[data-theme="light"] .clock-display {
    color: #111827 !important;
}

/* Record items */
[data-theme="light"] .record-type,
[data-theme="light"] .record-time {
    color: #111827 !important;
}

[data-theme="light"] .record-location {
    color: #6b7280 !important;
}

/* Timeline */
[data-theme="light"] .timeline-time {
    color: #111827 !important;
}

[data-theme="light"] .timeline-type {
    color: #374151 !important;
}

/* Sidebar no modo claro */
[data-theme="light"] .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #e5e7eb !important;
}

[data-theme="light"] .sidebar-header {
    border-bottom: 1px solid #e5e7eb !important;
}

[data-theme="light"] .nav-section-title {
    color: #9ca3af !important;
}

[data-theme="light"] .nav-item {
    color: #374151 !important;
}

[data-theme="light"] .nav-item:hover {
    background: #f3f4f6 !important;
    color: #1565C0 !important;
}

[data-theme="light"] .nav-item.active {
    background: rgba(21, 101, 192, 0.1) !important;
    color: #1565C0 !important;
    border-left-color: #1565C0 !important;
}

[data-theme="light"] .nav-item i {
    color: inherit !important;
}

/* User menu na sidebar */
[data-theme="light"] .user-menu {
    border-top: 1px solid #e5e7eb !important;
}

[data-theme="light"] .user-name {
    color: #111827 !important;
}

[data-theme="light"] .user-role {
    color: #6b7280 !important;
}

[data-theme="light"] .sidebar-footer {
    border-top: 1px solid #e5e7eb !important;
}

/* Badges */
[data-theme="light"] .badge.bg-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
}

/* Row backgrounds */
[data-theme="light"] .row {
    color: #374151;
}

/* Fix para inline styles com cor hardcoded */
[data-theme="light"] [style*="color: #f8fafc"],
[data-theme="light"] [style*="color:#f8fafc"] {
    color: #111827 !important;
}

[data-theme="light"] [style*="color: var(--text-secondary)"] {
    color: #6b7280 !important;
}

/* ==========================================
   ADMIN DASHBOARD - MODO CLARO
   ========================================== */

/* Stats grid cards */
[data-theme="light"] .stats-grid .stat-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

[data-theme="light"] .stats-grid .stat-card-value {
    color: #111827 !important;
}

[data-theme="light"] .stats-grid .stat-card-label {
    color: #6b7280 !important;
}

/* Attendance overview */
[data-theme="light"] .attendance-overview {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

[data-theme="light"] .attendance-overview-title {
    color: #111827 !important;
}

[data-theme="light"] .attendance-circle-value {
    color: #3b82f6 !important;
}

[data-theme="light"] .attendance-circle-label {
    color: #6b7280 !important;
}

[data-theme="light"] .attendance-stat-label {
    color: #6b7280 !important;
}

[data-theme="light"] .attendance-stat-value {
    color: #111827 !important;
}

/* Quick actions */
[data-theme="light"] .quick-action {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

[data-theme="light"] .quick-action-label {
    color: #111827 !important;
}

/* Recent clocks table */
[data-theme="light"] .recent-clocks-table th {
    color: #6b7280 !important;
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}

[data-theme="light"] .recent-clocks-table td {
    color: #374151 !important;
    border-color: #e5e7eb !important;
}

[data-theme="light"] .recent-clocks-table .user-cell span {
    color: #111827 !important;
}

/* Pending items */
[data-theme="light"] .pending-item {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
}

[data-theme="light"] .pending-name {
    color: #111827 !important;
}

[data-theme="light"] .pending-type {
    color: #6b7280 !important;
}

/* Summary rows */
[data-theme="light"] .summary-row {
    border-color: #e5e7eb !important;
}

[data-theme="light"] .summary-label {
    color: #6b7280 !important;
}

[data-theme="light"] .summary-value {
    color: #111827 !important;
}

/* Page title */
[data-theme="light"] .page-title {
    color: #111827 !important;
}

/* Botoes outline */
[data-theme="light"] .btn-outline-secondary {
    color: #374151 !important;
    border-color: #d1d5db !important;
    background: transparent !important;
}

[data-theme="light"] .btn-outline-secondary:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
    border-color: #9ca3af !important;
}

[data-theme="light"] .btn-outline-secondary i {
    color: inherit !important;
}

/* D-grid buttons */
[data-theme="light"] .d-grid .btn-outline-secondary {
    background: #ffffff !important;
}

[data-theme="light"] .d-grid .btn-outline-secondary:hover {
    background: #f3f4f6 !important;
}

/* ==========================================
   CORRECOES FINAIS - MAXIMA PRIORIDADE
   ========================================== */

/* FUNDO GERAL - CINZA, NAO BRANCO */
html[data-theme="light"],
html[data-theme="light"] body {
    background-color: #dfe3e8 !important;
}

html[data-theme="light"] .main-content,
html[data-theme="light"] .content-wrapper,
html[data-theme="light"] .content-area {
    background-color: #dfe3e8 !important;
}

/* ICONES DO HEADER - VISIVEIS EM CINZA ESCURO */
html[data-theme="light"] .app-header .header-icon-btn,
html[data-theme="light"] .app-header .btn-icon,
html[data-theme="light"] .app-header .mobile-menu-btn,
html[data-theme="light"] .header-right .header-icon-btn,
html[data-theme="light"] .header-right .btn-icon,
html[data-theme="light"] .header-right a.btn-icon,
html[data-theme="light"] .header-right button.btn-icon {
    color: #1f2937 !important;
}

html[data-theme="light"] .app-header .header-icon-btn i,
html[data-theme="light"] .app-header .btn-icon i,
html[data-theme="light"] .app-header .mobile-menu-btn i,
html[data-theme="light"] .header-right .header-icon-btn i,
html[data-theme="light"] .header-right .btn-icon i,
html[data-theme="light"] .header-right a i,
html[data-theme="light"] .header-right button i,
html[data-theme="light"] .app-header i.bi {
    color: #1f2937 !important;
}

/* BOTAO DE TOGGLE - ICONE BRANCO */
.theme-toggle,
html .theme-toggle,
html[data-theme="light"] .theme-toggle {
    background: #1565C0 !important;
    color: #ffffff !important;
}

.theme-toggle i,
html .theme-toggle i,
html[data-theme="light"] .theme-toggle i,
.theme-toggle .bi,
html[data-theme="light"] .theme-toggle .bi {
    color: #ffffff !important;
}

/* CARDS COM DESTAQUE */
html[data-theme="light"] .card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .attendance-overview,
html[data-theme="light"] .quick-action,
html[data-theme="light"] .filters-card {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* LOGIN PAGE */
html[data-theme="light"] .login-page {
    background: #dfe3e8 !important;
}

html[data-theme="light"] .login-card {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

/* ==========================================
   EMPLOYEE DASHBOARD - MODO CLARO
   ========================================== */

/* Greeting section */
html[data-theme="light"] .greeting-text {
    color: #111827 !important;
}

html[data-theme="light"] .greeting-date {
    color: #6b7280 !important;
}

html[data-theme="light"] .current-time-display {
    color: #111827 !important;
}

html[data-theme="light"] .current-time-display i {
    color: #1565C0 !important;
}

/* Dash stat cards */
html[data-theme="light"] .dash-stat-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .dash-stat-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .dash-stat-value {
    color: #111827 !important;
}

html[data-theme="light"] .dash-stat-sub {
    color: #9ca3af !important;
}

/* Clock card */
html[data-theme="light"] .clock-card {
    background: #ffffff !important;
}

html[data-theme="light"] .clock-status-badge {
    color: #374151 !important;
}

html[data-theme="light"] .clock-status-badge.working {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #059669 !important;
}

html[data-theme="light"] .clock-status-badge.not-working {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #dc2626 !important;
}

/* Location status box */
html[data-theme="light"] .location-status-box {
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    color: #0369a1 !important;
}

html[data-theme="light"] .location-status-box.success {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #059669 !important;
}

html[data-theme="light"] .location-status-box.error {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

html[data-theme="light"] .location-status-box.warning {
    background: #fffbeb !important;
    border-color: #fde68a !important;
    color: #d97706 !important;
}

/* Records timeline */
html[data-theme="light"] .record-type {
    color: #111827 !important;
}

html[data-theme="light"] .record-time {
    color: #6b7280 !important;
}

html[data-theme="light"] .record-location {
    color: #9ca3af !important;
}

html[data-theme="light"] .record-line {
    background: #e5e7eb !important;
}

/* Empty records */
html[data-theme="light"] .empty-records i {
    color: #9ca3af !important;
}

html[data-theme="light"] .empty-records-title {
    color: #111827 !important;
}

html[data-theme="light"] .empty-records-text {
    color: #6b7280 !important;
}

/* Info text in cards */
html[data-theme="light"] .text-info {
    color: #0369a1 !important;
}

/* All spans and generic text in cards */
html[data-theme="light"] .card span,
html[data-theme="light"] .card-body span {
    color: #374151;
}

/* Location text specifically */
html[data-theme="light"] #locationText {
    color: inherit !important;
}

/* ==========================================
   EMPLOYEE PONTO PAGE - MODO CLARO
   ========================================== */

/* Clock display */
html[data-theme="light"] .clock-display {
    color: #111827 !important;
}

/* Clock status badges */
html[data-theme="light"] .clock-status {
    color: #374151 !important;
}

html[data-theme="light"] .clock-status.working {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #059669 !important;
}

html[data-theme="light"] .clock-status.not-working {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #dc2626 !important;
}

/* Requirements box */
html[data-theme="light"] .requirements-box {
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
}

html[data-theme="light"] .requirements-box h6 {
    color: #0369a1 !important;
}

html[data-theme="light"] .requirements-box .requirement-item,
html[data-theme="light"] .requirements-box .requirement-item span {
    color: #374151 !important;
}

html[data-theme="light"] .requirements-box .requirement-item i {
    color: #6b7280 !important;
}

/* Location status card */
html[data-theme="light"] .location-status-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .location-status-card.success {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}

html[data-theme="light"] .location-status-card.warning {
    background: #fffbeb !important;
    border-color: #fde68a !important;
}

html[data-theme="light"] .location-status-card.error {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

html[data-theme="light"] .location-status-card.info {
    background: #f0f9ff !important;
    border-color: #bae6fd !important;
}

html[data-theme="light"] .location-status-card .fw-semibold,
html[data-theme="light"] .location-status-card .fw-medium,
html[data-theme="light"] .location-status-card .text-body {
    color: #111827 !important;
}

html[data-theme="light"] .location-status-card .text-muted,
html[data-theme="light"] .location-status-card .small {
    color: #6b7280 !important;
}

/* Work location items */
html[data-theme="light"] .work-location-item {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .work-location-item .fw-medium {
    color: #111827 !important;
}

html[data-theme="light"] .work-location-item .text-muted,
html[data-theme="light"] .work-location-item .small {
    color: #6b7280 !important;
}

/* Distance badge */
html[data-theme="light"] .distance-badge {
    color: #374151 !important;
}

html[data-theme="light"] .distance-badge.within {
    background: #dcfce7 !important;
    color: #059669 !important;
}

html[data-theme="light"] .distance-badge.outside {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

/* Online status bar */
html[data-theme="light"] .online-status-bar {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
}

/* Fix all hardcoded light text colors */
html[data-theme="light"] [style*="color: #f8fafc"],
html[data-theme="light"] [style*="color:#f8fafc"],
html[data-theme="light"] [style*="color: #e2e8f0"],
html[data-theme="light"] [style*="color:#e2e8f0"] {
    color: #111827 !important;
}

/* Generic fix for any text in light mode cards */
html[data-theme="light"] .card *:not(.btn):not(.badge):not(.alert):not([class*="text-"]):not(i) {
    color: inherit;
}

/* ============================================
   EMPLOYEE PAGES - LIGHT MODE COMPREHENSIVE FIX
   ============================================ */

/* Dashboard page - greeting section */
html[data-theme="light"] .greeting-section .greeting-text,
html[data-theme="light"] .greeting-text {
    color: #111827 !important;
}

html[data-theme="light"] .greeting-section .greeting-date,
html[data-theme="light"] .greeting-date {
    color: #6b7280 !important;
}

html[data-theme="light"] .current-time-display {
    color: #111827 !important;
}

/* Dashboard stats */
html[data-theme="light"] .dash-stat-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .dash-stat-value {
    color: #111827 !important;
}

html[data-theme="light"] .dash-stat-sub {
    color: #9ca3af !important;
}

/* Records timeline */
html[data-theme="light"] .record-type {
    color: #111827 !important;
}

html[data-theme="light"] .record-time,
html[data-theme="light"] .record-location {
    color: #6b7280 !important;
}

html[data-theme="light"] .empty-records-title {
    color: #111827 !important;
}

html[data-theme="light"] .empty-records-text {
    color: #6b7280 !important;
}

/* Ponto page - clock display */
html[data-theme="light"] .clock-display {
    color: #111827 !important;
}

html[data-theme="light"] .requirements-box .requirement-item,
html[data-theme="light"] .requirements-box .requirement-item span {
    color: #374151 !important;
}

html[data-theme="light"] .offline-mode-notice .notice-title {
    color: #111827 !important;
}

html[data-theme="light"] .offline-mode-notice .notice-text {
    color: #6b7280 !important;
}

/* Timeline items */
html[data-theme="light"] .timeline-time {
    color: #111827 !important;
}

html[data-theme="light"] .timeline-type {
    color: #374151 !important;
}

html[data-theme="light"] .timeline-type small {
    color: #6b7280 !important;
}

/* Banco de Horas page */
html[data-theme="light"] .monthly-progress-percent {
    color: #111827 !important;
}

html[data-theme="light"] .monthly-stat-value {
    color: #111827 !important;
}

html[data-theme="light"] .chart-bar-value {
    color: #111827 !important;
}

html[data-theme="light"] .transaction-description {
    color: #111827 !important;
}

html[data-theme="light"] .info-card p,
html[data-theme="light"] .info-type-item {
    color: #4b5563 !important;
}

/* Horario page - calendar */
html[data-theme="light"] .calendar-header-cell {
    color: #374151 !important;
}

html[data-theme="light"] .day-number {
    color: #111827 !important;
}

html[data-theme="light"] .day-off-badge.off {
    background: rgba(100, 116, 139, 0.15) !important;
    color: #475569 !important;
}

html[data-theme="light"] .legend-item {
    color: #374151 !important;
}

html[data-theme="light"] .month-nav-title {
    color: #111827 !important;
}

html[data-theme="light"] .month-nav-btn {
    background: #f3f4f6 !important;
    color: #111827 !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .schedule-list-day {
    color: #111827 !important;
}

html[data-theme="light"] .schedule-list-time {
    color: #111827 !important;
}

html[data-theme="light"] .location-name {
    color: #111827 !important;
}

html[data-theme="light"] .location-address {
    color: #4b5563 !important;
}

/* Perfil page */
html[data-theme="light"] .page-header h1 {
    color: #111827 !important;
}

html[data-theme="light"] .page-header p {
    color: #6b7280 !important;
}

html[data-theme="light"] .profile-card-header h5 {
    color: #111827 !important;
}

html[data-theme="light"] .profile-value {
    color: #111827 !important;
}

html[data-theme="light"] .profile-card-name {
    color: #111827 !important;
}

html[data-theme="light"] .profile-card-position {
    color: #4b5563 !important;
}

html[data-theme="light"] .company-name {
    color: #111827 !important;
}

html[data-theme="light"] .company-team {
    color: #4b5563 !important;
}

html[data-theme="light"] .work-location-name {
    color: #111827 !important;
}

html[data-theme="light"] .work-location-address {
    color: #4b5563 !important;
}

html[data-theme="light"] .map-modal-title {
    color: #111827 !important;
}

html[data-theme="light"] .map-modal-info-row {
    color: #374151 !important;
}

html[data-theme="light"] .section-title {
    color: #111827 !important;
}

/* Notificacoes page */
html[data-theme="light"] .tab-btn:hover {
    color: #111827 !important;
}

html[data-theme="light"] .notification-title {
    color: #111827 !important;
}

html[data-theme="light"] .notification-time {
    color: #9ca3af !important;
}

html[data-theme="light"] .empty-state-title {
    color: #111827 !important;
}

html[data-theme="light"] .setting-title {
    color: #111827 !important;
}

/* Ferias, Justificacoes, Correcoes pages */
html[data-theme="light"] .vacation-dates,
html[data-theme="light"] .justification-date,
html[data-theme="light"] .correction-date {
    color: #111827 !important;
}

html[data-theme="light"] .vacation-detail,
html[data-theme="light"] .justification-detail {
    color: #374151 !important;
}

html[data-theme="light"] .reason-text {
    color: #111827 !important;
}

html[data-theme="light"] .correction-time-value {
    color: #111827 !important;
}

html[data-theme="light"] .text-meta,
html[data-theme="light"] .text-description {
    color: #6b7280 !important;
}

/* Card headers in employee pages */
html[data-theme="light"] .card-header h4,
html[data-theme="light"] .card-header h5,
html[data-theme="light"] .card-body h4,
html[data-theme="light"] .card-body h5,
html[data-theme="light"] .card-body h6 {
    color: #111827 !important;
}

/* Global fix for inline styled elements */
html[data-theme="light"] [style*="color: #f8fafc"],
html[data-theme="light"] [style*="color:#f8fafc"] {
    color: #111827 !important;
}

html[data-theme="light"] [style*="color: #e2e8f0"],
html[data-theme="light"] [style*="color:#e2e8f0"] {
    color: #374151 !important;
}

html[data-theme="light"] [style*="color: #a1a1aa"],
html[data-theme="light"] [style*="color:#a1a1aa"],
html[data-theme="light"] [style*="color: #71717a"],
html[data-theme="light"] [style*="color:#71717a"] {
    color: #6b7280 !important;
}

html[data-theme="light"] [style*="color: #cbd5e1"],
html[data-theme="light"] [style*="color:#cbd5e1"] {
    color: #4b5563 !important;
}

html[data-theme="light"] [style*="color: #94a3b8"],
html[data-theme="light"] [style*="color:#94a3b8"] {
    color: #6b7280 !important;
}

/* Profile cards in light mode */
html[data-theme="light"] .profile-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .profile-card-header {
    border-color: #e5e7eb !important;
}

/* Setting cards in light mode */
html[data-theme="light"] .setting-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

/* Map modal in light mode */
html[data-theme="light"] .map-modal-content {
    background: #ffffff !important;
}

html[data-theme="light"] .map-modal-header,
html[data-theme="light"] .map-modal-info {
    border-color: #e5e7eb !important;
}

/* Notification cards in light mode */
html[data-theme="light"] .notification-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .notification-card.unread {
    background: rgba(21, 101, 192, 0.05) !important;
}

/* Balance card in light mode (banco de horas) */
html[data-theme="light"] .balance-card {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%) !important;
}

/* Monthly progress card in light mode */
html[data-theme="light"] .monthly-progress-card {
    background: rgba(168, 85, 247, 0.05) !important;
    border-color: rgba(168, 85, 247, 0.15) !important;
}

/* Info card in light mode */
html[data-theme="light"] .info-card {
    background: rgba(59, 130, 246, 0.05) !important;
    border-color: rgba(59, 130, 246, 0.15) !important;
}

/* Transaction items in light mode */
html[data-theme="light"] .transaction-item:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}

/* Vacation, justification, correction items in light mode */
html[data-theme="light"] .vacation-item:hover,
html[data-theme="light"] .justification-item:hover,
html[data-theme="light"] .correction-item:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}

/* Vacation reason box */
html[data-theme="light"] .vacation-reason,
html[data-theme="light"] .justification-reason,
html[data-theme="light"] .correction-reason,
html[data-theme="light"] .justification-description {
    background: #f3f4f6 !important;
}

/* Correction entries */
html[data-theme="light"] .correction-entries {
    background: #f3f4f6 !important;
}

/* Pending clocks card */
html[data-theme="light"] .pending-clocks-card {
    background: rgba(245, 158, 11, 0.05) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}

/* Custom switch slider in light mode */
html[data-theme="light"] .custom-switch .slider {
    background-color: #d1d5db !important;
}

/* Tabs container in light mode */
html[data-theme="light"] .tabs-container {
    background: #f3f4f6 !important;
}

/* Mark all button in light mode */
html[data-theme="light"] .mark-all-btn {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

/* Calendar in light mode */
html[data-theme="light"] .calendar-container {
    background: #ffffff !important;
}

html[data-theme="light"] .calendar-header-row {
    background: #f3f4f6 !important;
}

html[data-theme="light"] .calendar-day {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .calendar-day.other-month {
    background: rgba(0, 0, 0, 0.02) !important;
}

html[data-theme="light"] .calendar-day.weekend {
    background: rgba(0, 0, 0, 0.03) !important;
}

html[data-theme="light"] .calendar-day.today {
    background: rgba(21, 101, 192, 0.08) !important;
}

html[data-theme="light"] .calendar-day:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Schedule list in light mode */
html[data-theme="light"] .schedule-list {
    background: #ffffff !important;
}

html[data-theme="light"] .schedule-list-item {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .schedule-list-item.today {
    background: rgba(21, 101, 192, 0.05) !important;
}

html[data-theme="light"] .schedule-list-item.weekend {
    background: rgba(0, 0, 0, 0.02) !important;
}

html[data-theme="light"] .schedule-list-item.holiday {
    background: rgba(245, 158, 11, 0.05) !important;
}

/* Legend bar in light mode */
html[data-theme="light"] .legend-bar {
    background: #ffffff !important;
}

/* Month summary in light mode */
html[data-theme="light"] .month-summary {
    background: #f3f4f6 !important;
}

/* Location card in light mode */
html[data-theme="light"] .location-card {
    border-left-color: var(--primary-color) !important;
}

html[data-theme="light"] .location-item {
    border-color: #e5e7eb !important;
}

/* Info box in light mode */
html[data-theme="light"] .info-box {
    background: rgba(59, 130, 246, 0.05) !important;
}

html[data-theme="light"] .info-box p {
    color: #4b5563 !important;
}

/* Empty state in light mode */
html[data-theme="light"] .empty-state-icon {
    background: #f3f4f6 !important;
}

/* Fix for SweetAlert2 in light mode */
html[data-theme="light"] .swal2-popup {
    background: #ffffff !important;
    color: #111827 !important;
}

html[data-theme="light"] .swal2-title {
    color: #111827 !important;
}

html[data-theme="light"] .swal2-html-container {
    color: #374151 !important;
}

/* ============================================
   ADMIN PAGES - LIGHT MODE COMPREHENSIVE FIX
   ============================================ */

/* Page header in admin pages */
html[data-theme="light"] .page-header-title h1 {
    color: #111827 !important;
}

html[data-theme="light"] .page-header-title p {
    color: #6b7280 !important;
}

/* Stat cards - global (used across many admin pages) */
html[data-theme="light"] .stat-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .stat-card-value {
    color: #111827 !important;
}

html[data-theme="light"] .stat-card-label {
    color: #6b7280 !important;
}

/* Attendance overview section (dashboard) */
html[data-theme="light"] .attendance-overview {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .attendance-overview-title {
    color: #111827 !important;
}

html[data-theme="light"] .attendance-stat-value {
    color: #111827 !important;
}

html[data-theme="light"] .attendance-stat-label {
    color: #6b7280 !important;
}

/* Quick actions (dashboard) */
html[data-theme="light"] .quick-action {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .quick-action:hover {
    border-color: var(--primary-color) !important;
}

html[data-theme="light"] .quick-action-label {
    color: #111827 !important;
}

/* Pending items (dashboard sidebar) */
html[data-theme="light"] .pending-item {
    background: #f3f4f6 !important;
}

html[data-theme="light"] .pending-name {
    color: #111827 !important;
}

html[data-theme="light"] .pending-type {
    color: #6b7280 !important;
}

/* Summary rows (dashboard sidebar) */
html[data-theme="light"] .summary-row {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .summary-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .summary-value {
    color: #111827 !important;
}

/* Recent clocks table (dashboard) */
html[data-theme="light"] .recent-clocks-table th {
    color: #6b7280 !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .recent-clocks-table td {
    border-color: #e5e7eb !important;
    color: #374151 !important;
}

html[data-theme="light"] .recent-clocks-table td small {
    color: #6b7280 !important;
}

/* Filters card (colaboradores, ponto, etc) */
html[data-theme="light"] .filters-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .search-box input {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
}

html[data-theme="light"] .search-box input::placeholder {
    color: #9ca3af !important;
}

html[data-theme="light"] .search-box i {
    color: #6b7280 !important;
}

html[data-theme="light"] .filter-select {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
}

/* Employee cards (colaboradores) */
html[data-theme="light"] .employee-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .employee-card:hover {
    border-color: var(--primary-color) !important;
}

html[data-theme="light"] .employee-name {
    color: #111827 !important;
}

html[data-theme="light"] .employee-position {
    color: #6b7280 !important;
}

html[data-theme="light"] .employee-card-body {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .employee-detail span {
    color: #6b7280 !important;
}

html[data-theme="light"] .employee-detail i {
    color: #9ca3af !important;
}

/* Employee table (colaboradores table view) */
html[data-theme="light"] .employee-table th {
    color: #6b7280 !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .employee-table td {
    border-color: #e5e7eb !important;
    color: #374151 !important;
}

html[data-theme="light"] .employee-table tr:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

html[data-theme="light"] .user-info .name {
    color: #111827 !important;
}

html[data-theme="light"] .user-info .email {
    color: #6b7280 !important;
}

/* View toggle (colaboradores) */
html[data-theme="light"] .view-toggle {
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .view-toggle button {
    color: #6b7280 !important;
}

html[data-theme="light"] .view-toggle button.active {
    background: #ffffff !important;
    color: #111827 !important;
}

html[data-theme="light"] .view-toggle button:hover:not(.active) {
    color: #111827 !important;
}

/* Action buttons */
html[data-theme="light"] .btn-action {
    border-color: #e5e7eb !important;
    color: #6b7280 !important;
}

html[data-theme="light"] .btn-action:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

/* Empty state */
html[data-theme="light"] .empty-state {
    color: #6b7280 !important;
}

html[data-theme="light"] .empty-state h3 {
    color: #111827 !important;
}

html[data-theme="light"] .empty-state i {
    color: #9ca3af !important;
}

/* Tabs (aprovacoes) */
html[data-theme="light"] .tabs {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .tab-btn {
    color: #6b7280 !important;
}

html[data-theme="light"] .tab-btn:hover {
    color: #111827 !important;
}

html[data-theme="light"] .tab-btn:not(.active) .tab-badge {
    background: #e5e7eb !important;
}

/* Request cards (aprovacoes) */
html[data-theme="light"] .request-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .user-name {
    color: #111827 !important;
}

html[data-theme="light"] .user-position {
    color: #6b7280 !important;
}

html[data-theme="light"] .user-team {
    color: #9ca3af !important;
}

html[data-theme="light"] .detail-row {
    color: #6b7280 !important;
}

html[data-theme="light"] .request-reason {
    color: #374151 !important;
}

html[data-theme="light"] .request-date {
    color: #9ca3af !important;
}

html[data-theme="light"] .request-actions {
    border-color: #e5e7eb !important;
}

/* Correction info boxes (aprovacoes) */
html[data-theme="light"] .correction-info {
    background: #f3f4f6 !important;
}

html[data-theme="light"] .correction-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .correction-value {
    color: #111827 !important;
}

/* Team cards (equipas) */
html[data-theme="light"] .team-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .team-card:hover {
    border-color: var(--primary-color) !important;
}

html[data-theme="light"] .team-name {
    color: #111827 !important;
}

html[data-theme="light"] .team-description {
    color: #6b7280 !important;
}

html[data-theme="light"] .team-stat-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .team-stat-value {
    color: #111827 !important;
}

/* Location cards (locais) */
html[data-theme="light"] .location-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .location-card:hover {
    border-color: var(--primary-color) !important;
}

html[data-theme="light"] .location-name {
    color: #111827 !important;
}

html[data-theme="light"] .location-address {
    color: #6b7280 !important;
}

html[data-theme="light"] .location-stats {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .location-stat-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .location-stat-value {
    color: #111827 !important;
}

/* View toggle buttons (ponto) */
html[data-theme="light"] .view-toggle-btn {
    color: #6b7280 !important;
}

html[data-theme="light"] .view-toggle-btn.active {
    background: var(--primary-color) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .view-toggle-btn:hover:not(.active) {
    color: #111827 !important;
}

/* Records table (ponto) */
html[data-theme="light"] .records-table th {
    color: #6b7280 !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .records-table td {
    border-color: #e5e7eb !important;
    color: #374151 !important;
}

html[data-theme="light"] .records-table tr:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Modal content */
html[data-theme="light"] .modal-content {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .modal-header {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .modal-title {
    color: #111827 !important;
}

html[data-theme="light"] .modal-footer {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .btn-close {
    filter: invert(0) !important;
}

/* Form inputs in modals and forms */
html[data-theme="light"] .form-control {
    background: #ffffff !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

html[data-theme="light"] .form-control:focus {
    border-color: var(--primary-color) !important;
    background: #ffffff !important;
}

html[data-theme="light"] .form-control::placeholder {
    color: #9ca3af !important;
}

html[data-theme="light"] .form-select {
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

html[data-theme="light"] .form-label {
    color: #374151 !important;
}

html[data-theme="light"] .input-group-text {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #6b7280 !important;
}

/* Schedule cards (escalas) */
html[data-theme="light"] .schedule-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .schedule-name {
    color: #111827 !important;
}

html[data-theme="light"] .schedule-description {
    color: #6b7280 !important;
}

html[data-theme="light"] .schedule-time {
    color: #111827 !important;
}

html[data-theme="light"] .schedule-day {
    background: #f3f4f6 !important;
    color: #374151 !important;
}

html[data-theme="light"] .schedule-day.active {
    background: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Dropdown menus */
html[data-theme="light"] .dropdown-menu {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] .dropdown-item {
    color: #374151 !important;
}

html[data-theme="light"] .dropdown-item:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

html[data-theme="light"] .dropdown-divider {
    border-color: #e5e7eb !important;
}

/* Pagination */
html[data-theme="light"] .page-link {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #374151 !important;
}

html[data-theme="light"] .page-link:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

html[data-theme="light"] .page-item.active .page-link {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Badges in admin pages */
html[data-theme="light"] .badge-status.active {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #16a34a !important;
}

html[data-theme="light"] .badge-status.inactive {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

/* Settings/definitions page */
html[data-theme="light"] .settings-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .settings-title {
    color: #111827 !important;
}

html[data-theme="light"] .settings-description {
    color: #6b7280 !important;
}

/* Reports page */
html[data-theme="light"] .report-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .report-title {
    color: #111827 !important;
}

html[data-theme="light"] .report-description {
    color: #6b7280 !important;
}

/* User cell in tables */
html[data-theme="light"] .user-cell .avatar {
    box-shadow: 0 0 0 2px #ffffff !important;
}

/* Calendar/date picker in light mode */
html[data-theme="light"] .datepicker {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .datepicker-days td,
html[data-theme="light"] .datepicker-days th {
    color: #374151 !important;
}

html[data-theme="light"] .datepicker-days td:hover {
    background: #f3f4f6 !important;
}

/* Tables generic */
html[data-theme="light"] table th {
    color: #6b7280 !important;
}

html[data-theme="light"] table td {
    color: #374151 !important;
}

/* Card body text */
html[data-theme="light"] .card-body h5,
html[data-theme="light"] .card-body h6 {
    color: #111827 !important;
}

html[data-theme="light"] .card-body p {
    color: #6b7280 !important;
}

/* Text utility classes override */
html[data-theme="light"] .text-secondary {
    color: #6b7280 !important;
}

/* Admin-specific user info */
html[data-theme="light"] .admin-user-name {
    color: #111827 !important;
}

html[data-theme="light"] .admin-user-role {
    color: #6b7280 !important;
}

/* ============================================
   EMPLOYEE HISTORICO PAGE - LIGHT MODE FIX
   ============================================ */

/* Month navigator */
html[data-theme="light"] .month-navigator .month-name {
    color: #111827 !important;
}

html[data-theme="light"] .month-navigator .month-nav-btn {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #6b7280 !important;
}

html[data-theme="light"] .month-navigator .month-nav-btn:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .month-navigator .month-today-btn {
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
    color: #6b7280 !important;
}

html[data-theme="light"] .month-navigator .month-today-btn:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Filter chips */
html[data-theme="light"] .filter-chip {
    border-color: #e5e7eb !important;
    color: #374151 !important;
    background: #ffffff !important;
}

html[data-theme="light"] .filter-chip:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

html[data-theme="light"] .filter-chip.active {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Summary cards */
html[data-theme="light"] .summary-card {
    background: #f3f4f6 !important;
}

html[data-theme="light"] .summary-value {
    color: #111827 !important;
}

html[data-theme="light"] .summary-label {
    color: #6b7280 !important;
}

/* Record cards */
html[data-theme="light"] .record-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .record-card.today {
    background: rgba(21, 101, 192, 0.05) !important;
}

html[data-theme="light"] .record-header {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .record-date {
    color: #111827 !important;
}

html[data-theme="light"] .record-day {
    color: #6b7280 !important;
}

html[data-theme="light"] .record-footer {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .record-stat {
    color: #6b7280 !important;
}

html[data-theme="light"] .record-stat.hours {
    background: rgba(21, 101, 192, 0.08) !important;
}

html[data-theme="light"] .no-entries {
    color: #6b7280 !important;
}

/* Entry badges in light mode */
html[data-theme="light"] .entry-badge.in {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #16a34a !important;
}

html[data-theme="light"] .entry-badge.out {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

/* ============================================
   ALL EMPLOYEE PAGES - COMPREHENSIVE LIGHT MODE FIX
   ============================================ */

/* ---- ALTERAR_SENHA.PHP ---- */
html[data-theme="light"] .password-card-title,
html[data-theme="light"] .password-section-title {
    color: #111827 !important;
}

html[data-theme="light"] .password-requirements-title {
    color: #111827 !important;
}

/* ---- BANCO_HORAS.PHP ---- */
html[data-theme="light"] .balance-card-value,
html[data-theme="light"] .balance-value {
    color: #111827 !important;
}

html[data-theme="light"] .balance-card-label,
html[data-theme="light"] .balance-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .monthly-progress-percent {
    color: #111827 !important;
}

html[data-theme="light"] .monthly-stat-value {
    color: #111827 !important;
}

html[data-theme="light"] .monthly-stat-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .chart-bar-value {
    color: #111827 !important;
}

html[data-theme="light"] .transaction-description,
html[data-theme="light"] .transaction-title {
    color: #111827 !important;
}

html[data-theme="light"] .transaction-date,
html[data-theme="light"] .transaction-meta {
    color: #6b7280 !important;
}

html[data-theme="light"] .info-card p,
html[data-theme="light"] .info-type-item,
html[data-theme="light"] .info-text {
    color: #4b5563 !important;
}

html[data-theme="light"] .transaction-item {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

/* ---- CORRECOES.PHP ---- */
html[data-theme="light"] .correction-card-title,
html[data-theme="light"] .correction-item-date {
    color: #111827 !important;
}

html[data-theme="light"] .correction-item-time {
    color: #111827 !important;
}

html[data-theme="light"] .correction-item {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

/* ---- FERIAS.PHP ---- */
html[data-theme="light"] .vacation-card-title,
html[data-theme="light"] .vacation-item-dates {
    color: #111827 !important;
}

html[data-theme="light"] .vacation-item-days,
html[data-theme="light"] .vacation-item-reason {
    color: #374151 !important;
}

html[data-theme="light"] .vacation-item {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .vacation-balance-value {
    color: #111827 !important;
}

/* ---- JUSTIFICACOES.PHP ---- */
html[data-theme="light"] .justification-card-title,
html[data-theme="light"] .justification-item-date {
    color: #111827 !important;
}

html[data-theme="light"] .justification-item-type {
    color: #111827 !important;
}

html[data-theme="light"] .justification-item-reason {
    color: #4b5563 !important;
}

html[data-theme="light"] .justification-item {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

/* ---- DASHBOARD.PHP ---- */
html[data-theme="light"] .dash-stat-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .dash-stat-value {
    color: #111827 !important;
}

html[data-theme="light"] .dash-stat-sub {
    color: #9ca3af !important;
}

html[data-theme="light"] .greeting-text {
    color: #111827 !important;
}

html[data-theme="light"] .greeting-date {
    color: #6b7280 !important;
}

html[data-theme="light"] .current-time-display {
    color: #111827 !important;
}

html[data-theme="light"] .record-type {
    color: #111827 !important;
}

html[data-theme="light"] .record-time,
html[data-theme="light"] .record-location {
    color: #6b7280 !important;
}

html[data-theme="light"] .empty-records-title {
    color: #111827 !important;
}

html[data-theme="light"] .empty-records-text {
    color: #6b7280 !important;
}

html[data-theme="light"] .dash-stat-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

/* ---- HORARIO.PHP ---- */
html[data-theme="light"] .calendar-header-cell {
    color: #374151 !important;
}

html[data-theme="light"] .day-number {
    color: #111827 !important;
}

html[data-theme="light"] .day-off-badge {
    color: #475569 !important;
}

html[data-theme="light"] .legend-item,
html[data-theme="light"] .legend-text {
    color: #374151 !important;
}

html[data-theme="light"] .schedule-time,
html[data-theme="light"] .schedule-info {
    color: #374151 !important;
}

html[data-theme="light"] .month-nav-title,
html[data-theme="light"] .calendar-title {
    color: #111827 !important;
}

html[data-theme="light"] .schedule-list-day {
    color: #111827 !important;
}

html[data-theme="light"] .schedule-list-time {
    color: #111827 !important;
}

html[data-theme="light"] .schedule-list-location {
    color: #6b7280 !important;
}

html[data-theme="light"] .location-name {
    color: #111827 !important;
}

html[data-theme="light"] .location-address {
    color: #6b7280 !important;
}

html[data-theme="light"] .location-radius {
    color: #4b5563 !important;
}

html[data-theme="light"] .schedule-card-title {
    color: #111827 !important;
}

html[data-theme="light"] .schedule-card-time {
    color: #111827 !important;
}

html[data-theme="light"] .calendar-day {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .calendar-day.other-month .day-number {
    color: #9ca3af !important;
}

html[data-theme="light"] .calendar-day.weekend {
    background: #f9fafb !important;
}

html[data-theme="light"] .calendar-day.today {
    background: rgba(21, 101, 192, 0.08) !important;
}

html[data-theme="light"] .schedule-list-item {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

/* ---- PEDIR_FERIAS.PHP ---- */
html[data-theme="light"] .form-section-title {
    color: #111827 !important;
}

/* ---- NOTIFICACOES.PHP ---- */
html[data-theme="light"] .tab-btn:hover {
    color: #111827 !important;
}

html[data-theme="light"] .notification-title {
    color: #111827 !important;
}

html[data-theme="light"] .notification-message {
    color: #374151 !important;
}

html[data-theme="light"] .notification-time {
    color: #9ca3af !important;
}

html[data-theme="light"] .notification-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .notification-card.unread {
    background: rgba(21, 101, 192, 0.03) !important;
}

html[data-theme="light"] .empty-state-title {
    color: #111827 !important;
}

html[data-theme="light"] .setting-title {
    color: #111827 !important;
}

html[data-theme="light"] .setting-description {
    color: #6b7280 !important;
}

html[data-theme="light"] .notification-icon.secondary {
    background: rgba(148, 163, 184, 0.1) !important;
    color: #64748b !important;
}

/* ---- PEDIR_CORRECAO.PHP ---- */
html[data-theme="light"] .correction-form-title,
html[data-theme="light"] .day-selector-title {
    color: #111827 !important;
}

html[data-theme="light"] .day-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .day-card-date {
    color: #111827 !important;
}

html[data-theme="light"] .day-card-status {
    color: #6b7280 !important;
}

/* ---- PERFIL.PHP ---- */
html[data-theme="light"] .page-header h1 {
    color: #111827 !important;
}

html[data-theme="light"] .page-header p {
    color: #6b7280 !important;
}

html[data-theme="light"] .profile-card-name {
    color: #111827 !important;
}

html[data-theme="light"] .profile-card-position {
    color: #4b5563 !important;
}

html[data-theme="light"] .profile-card-header h5 {
    color: #111827 !important;
}

html[data-theme="light"] .profile-value {
    color: #111827 !important;
}

html[data-theme="light"] .profile-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .company-name {
    color: #111827 !important;
}

html[data-theme="light"] .company-team {
    color: #4b5563 !important;
}

html[data-theme="light"] .work-location-name {
    color: #111827 !important;
}

html[data-theme="light"] .work-location-address {
    color: #4b5563 !important;
}

html[data-theme="light"] .map-modal-title {
    color: #111827 !important;
}

html[data-theme="light"] .map-modal-info-row {
    color: #374151 !important;
}

html[data-theme="light"] .section-title {
    color: #111827 !important;
}

html[data-theme="light"] .profile-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .profile-item {
    border-color: #e5e7eb !important;
}

/* ---- PEDIR_JUSTIFICACAO.PHP ---- */
html[data-theme="light"] .justification-form-title {
    color: #111827 !important;
}

/* ---- SUPORTE.PHP ---- */
html[data-theme="light"] .support-title,
html[data-theme="light"] .support-card-title {
    color: #111827 !important;
}

html[data-theme="light"] .support-description {
    color: #6b7280 !important;
}

html[data-theme="light"] .faq-question {
    color: #111827 !important;
}

html[data-theme="light"] .faq-answer {
    color: #374151 !important;
}

html[data-theme="light"] .contact-title {
    color: #111827 !important;
}

html[data-theme="light"] .contact-info {
    color: #374151 !important;
}

html[data-theme="light"] .support-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .faq-item {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

/* ---- PONTO.PHP ---- */
html[data-theme="light"] .clock-display {
    color: #111827 !important;
}

html[data-theme="light"] .clock-date {
    color: #6b7280 !important;
}

html[data-theme="light"] .requirements-box .requirement-item,
html[data-theme="light"] .requirements-box .requirement-item span {
    color: #374151 !important;
}

html[data-theme="light"] .location-status-card .status-title {
    color: #111827 !important;
}

html[data-theme="light"] .location-status-card .status-message {
    color: #374151 !important;
}

html[data-theme="light"] .timeline-time {
    color: #111827 !important;
}

html[data-theme="light"] .timeline-type {
    color: #374151 !important;
}

html[data-theme="light"] .timeline-location {
    color: #6b7280 !important;
}

html[data-theme="light"] .offline-mode-notice .notice-title {
    color: #111827 !important;
}

html[data-theme="light"] .offline-mode-notice .notice-text {
    color: #6b7280 !important;
}

html[data-theme="light"] .clock-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .requirements-box {
    background: #f0f9ff !important;
    border-color: #bae6fd !important;
}

html[data-theme="light"] .location-status-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .location-status-card.success {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}

html[data-theme="light"] .location-status-card.error {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

html[data-theme="light"] .timeline-item {
    border-color: #e5e7eb !important;
}

/* ---- PONTO_OFFLINE.PHP ---- */
html[data-theme="light"] .offline-clock-display {
    color: #111827 !important;
}

html[data-theme="light"] .offline-status-text {
    color: #6b7280 !important;
}

html[data-theme="light"] .offline-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

/* ---- GENERIC INLINE STYLE OVERRIDES ---- */
/* These override inline styles with color: #f8fafc etc */
html[data-theme="light"] [style*="color: #f8fafc"],
html[data-theme="light"] [style*="color:#f8fafc"] {
    color: #111827 !important;
}

html[data-theme="light"] [style*="color: #e2e8f0"],
html[data-theme="light"] [style*="color:#e2e8f0"] {
    color: #374151 !important;
}

html[data-theme="light"] [style*="color: #a1a1aa"],
html[data-theme="light"] [style*="color:#a1a1aa"],
html[data-theme="light"] [style*="color: #71717a"],
html[data-theme="light"] [style*="color:#71717a"] {
    color: #6b7280 !important;
}

html[data-theme="light"] [style*="color: #cbd5e1"],
html[data-theme="light"] [style*="color:#cbd5e1"] {
    color: #4b5563 !important;
}

html[data-theme="light"] [style*="color: #94a3b8"],
html[data-theme="light"] [style*="color:#94a3b8"] {
    color: #6b7280 !important;
}

/* ---- SWEETALERT2 IN LIGHT MODE ---- */
html[data-theme="light"] .swal2-popup {
    background: #ffffff !important;
}

html[data-theme="light"] .swal2-title {
    color: #111827 !important;
}

html[data-theme="light"] .swal2-html-container,
html[data-theme="light"] .swal2-content {
    color: #374151 !important;
}

/* ---- CARD GENERIC FIXES ---- */
html[data-theme="light"] .card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .card-header {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .card-header h4,
html[data-theme="light"] .card-header h5,
html[data-theme="light"] .card-header h6 {
    color: #111827 !important;
}

html[data-theme="light"] .card-body h3,
html[data-theme="light"] .card-body h4,
html[data-theme="light"] .card-body h5,
html[data-theme="light"] .card-body h6 {
    color: #111827 !important;
}

html[data-theme="light"] .card-footer {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}

/* ---- TEXT MUTED FIXES ---- */
html[data-theme="light"] .text-muted {
    color: #6b7280 !important;
}

/* ---- PAGE HEADERS ---- */
html[data-theme="light"] .page-header h1,
html[data-theme="light"] .page-header-title h1 {
    color: #111827 !important;
}

html[data-theme="light"] .page-header p,
html[data-theme="light"] .page-header-title p {
    color: #6b7280 !important;
}

/* ---- EMPTY STATES ---- */
html[data-theme="light"] .empty-state h5,
html[data-theme="light"] .empty-state h4,
html[data-theme="light"] .empty-state-title {
    color: #111827 !important;
}

html[data-theme="light"] .empty-state p,
html[data-theme="light"] .empty-state-text {
    color: #6b7280 !important;
}

/* ---- LIST ITEMS ---- */
html[data-theme="light"] .list-group-item {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #374151 !important;
}

/* ---- ACCORDION ---- */
html[data-theme="light"] .accordion-item {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .accordion-button {
    background: #ffffff !important;
    color: #111827 !important;
}

html[data-theme="light"] .accordion-button:not(.collapsed) {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

html[data-theme="light"] .accordion-body {
    background: #ffffff !important;
    color: #374151 !important;
}

/* ============================================
   ULTRA HIGH SPECIFICITY OVERRIDES
   For inline <style> blocks in PHP pages
   ============================================ */

/* DASHBOARD.PHP - Inline styles override */
html[data-theme="light"] .dash-stat-label,
html[data-theme="light"] body .dash-stat-label,
html[data-theme="light"] .dash-stat-card .dash-stat-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .dash-stat-value,
html[data-theme="light"] body .dash-stat-value,
html[data-theme="light"] .dash-stat-card .dash-stat-value {
    color: #111827 !important;
}

html[data-theme="light"] .dash-stat-sub,
html[data-theme="light"] body .dash-stat-sub,
html[data-theme="light"] .dash-stat-card .dash-stat-sub {
    color: #9ca3af !important;
}

html[data-theme="light"] .greeting-text,
html[data-theme="light"] body .greeting-text,
html[data-theme="light"] .greeting-section .greeting-text {
    color: #111827 !important;
}

html[data-theme="light"] .greeting-date,
html[data-theme="light"] body .greeting-date,
html[data-theme="light"] .greeting-section .greeting-date {
    color: #6b7280 !important;
}

html[data-theme="light"] .current-time-display,
html[data-theme="light"] body .current-time-display {
    color: #111827 !important;
}

html[data-theme="light"] .record-type,
html[data-theme="light"] body .record-type,
html[data-theme="light"] .record-content .record-type {
    color: #111827 !important;
}

html[data-theme="light"] .record-time,
html[data-theme="light"] body .record-time,
html[data-theme="light"] .record-content .record-time {
    color: #6b7280 !important;
}

html[data-theme="light"] .record-location,
html[data-theme="light"] body .record-location,
html[data-theme="light"] .record-content .record-location {
    color: #6b7280 !important;
}

html[data-theme="light"] .empty-records-title,
html[data-theme="light"] body .empty-records-title,
html[data-theme="light"] .empty-records .empty-records-title {
    color: #111827 !important;
}

html[data-theme="light"] .empty-records-text,
html[data-theme="light"] body .empty-records-text,
html[data-theme="light"] .empty-records .empty-records-text {
    color: #6b7280 !important;
}

/* PONTO.PHP - Inline styles override */
html[data-theme="light"] .clock-display,
html[data-theme="light"] body .clock-display {
    color: #111827 !important;
}

html[data-theme="light"] .requirement-item span,
html[data-theme="light"] body .requirement-item span,
html[data-theme="light"] .requirements-box .requirement-item span {
    color: #374151 !important;
}

html[data-theme="light"] .location-status-card .fw-semibold,
html[data-theme="light"] body .location-status-card .fw-semibold {
    color: #111827 !important;
}

html[data-theme="light"] .timeline-time,
html[data-theme="light"] body .timeline-time,
html[data-theme="light"] .timeline-item .timeline-time {
    color: #111827 !important;
}

html[data-theme="light"] .timeline-type,
html[data-theme="light"] body .timeline-type,
html[data-theme="light"] .timeline-item .timeline-type {
    color: #374151 !important;
}

html[data-theme="light"] .offline-mode-notice .notice-title,
html[data-theme="light"] body .offline-mode-notice .notice-title {
    color: #111827 !important;
}

/* BANCO_HORAS.PHP - Inline styles override */
html[data-theme="light"] .balance-value,
html[data-theme="light"] body .balance-value,
html[data-theme="light"] .balance-card .balance-value {
    color: #111827 !important;
}

html[data-theme="light"] .monthly-progress-percent,
html[data-theme="light"] body .monthly-progress-percent {
    color: #111827 !important;
}

html[data-theme="light"] .monthly-stat-value,
html[data-theme="light"] body .monthly-stat-value {
    color: #111827 !important;
}

html[data-theme="light"] .chart-bar-value,
html[data-theme="light"] body .chart-bar-value {
    color: #111827 !important;
}

html[data-theme="light"] .transaction-description,
html[data-theme="light"] body .transaction-description,
html[data-theme="light"] .transaction-item .transaction-description {
    color: #111827 !important;
}

html[data-theme="light"] .info-card p,
html[data-theme="light"] body .info-card p {
    color: #4b5563 !important;
}

html[data-theme="light"] .info-type-item,
html[data-theme="light"] body .info-type-item {
    color: #4b5563 !important;
}

/* HORARIO.PHP - Inline styles override */
html[data-theme="light"] .calendar-header-cell,
html[data-theme="light"] body .calendar-header-cell {
    color: #374151 !important;
}

html[data-theme="light"] .day-number,
html[data-theme="light"] body .day-number,
html[data-theme="light"] .calendar-day .day-number {
    color: #111827 !important;
}

html[data-theme="light"] .day-off-badge,
html[data-theme="light"] body .day-off-badge {
    color: #475569 !important;
}

html[data-theme="light"] .legend-item,
html[data-theme="light"] body .legend-item {
    color: #374151 !important;
}

html[data-theme="light"] .schedule-time,
html[data-theme="light"] body .schedule-time {
    color: #374151 !important;
}

html[data-theme="light"] .month-nav-title,
html[data-theme="light"] body .month-nav-title {
    color: #111827 !important;
}

html[data-theme="light"] .schedule-list-day,
html[data-theme="light"] body .schedule-list-day {
    color: #111827 !important;
}

html[data-theme="light"] .schedule-list-time,
html[data-theme="light"] body .schedule-list-time {
    color: #111827 !important;
}

html[data-theme="light"] .location-name,
html[data-theme="light"] body .location-name {
    color: #111827 !important;
}

html[data-theme="light"] .location-address,
html[data-theme="light"] body .location-address {
    color: #6b7280 !important;
}

html[data-theme="light"] .location-radius,
html[data-theme="light"] body .location-radius {
    color: #4b5563 !important;
}

/* HISTORICO.PHP - Inline styles override */
html[data-theme="light"] .filter-chip,
html[data-theme="light"] body .filter-chip {
    color: #374151 !important;
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .filter-chip:hover,
html[data-theme="light"] body .filter-chip:hover {
    color: #111827 !important;
    background: #f3f4f6 !important;
}

html[data-theme="light"] .filter-chip.active,
html[data-theme="light"] body .filter-chip.active {
    color: #ffffff !important;
    background: var(--primary-color) !important;
}

html[data-theme="light"] .record-date,
html[data-theme="light"] body .record-date,
html[data-theme="light"] .record-card .record-date {
    color: #111827 !important;
}

html[data-theme="light"] .summary-value,
html[data-theme="light"] body .summary-value,
html[data-theme="light"] .summary-card .summary-value {
    color: #111827 !important;
}

html[data-theme="light"] .month-name,
html[data-theme="light"] body .month-name,
html[data-theme="light"] .month-navigator .month-name {
    color: #111827 !important;
}

/* PERFIL.PHP - Inline styles override */
html[data-theme="light"] .page-header h1,
html[data-theme="light"] body .page-header h1 {
    color: #111827 !important;
}

html[data-theme="light"] .page-header p,
html[data-theme="light"] body .page-header p {
    color: #6b7280 !important;
}

html[data-theme="light"] .profile-card-name,
html[data-theme="light"] body .profile-card-name {
    color: #111827 !important;
}

html[data-theme="light"] .profile-card-position,
html[data-theme="light"] body .profile-card-position {
    color: #4b5563 !important;
}

html[data-theme="light"] .profile-card-header h5,
html[data-theme="light"] body .profile-card-header h5 {
    color: #111827 !important;
}

html[data-theme="light"] .profile-value,
html[data-theme="light"] body .profile-value {
    color: #111827 !important;
}

html[data-theme="light"] .company-name,
html[data-theme="light"] body .company-name {
    color: #111827 !important;
}

html[data-theme="light"] .company-team,
html[data-theme="light"] body .company-team {
    color: #4b5563 !important;
}

html[data-theme="light"] .work-location-name,
html[data-theme="light"] body .work-location-name {
    color: #111827 !important;
}

html[data-theme="light"] .work-location-address,
html[data-theme="light"] body .work-location-address {
    color: #4b5563 !important;
}

html[data-theme="light"] .map-modal-title,
html[data-theme="light"] body .map-modal-title {
    color: #111827 !important;
}

html[data-theme="light"] .map-modal-info-row,
html[data-theme="light"] body .map-modal-info-row {
    color: #374151 !important;
}

html[data-theme="light"] .section-title,
html[data-theme="light"] body .section-title {
    color: #111827 !important;
}

/* NOTIFICACOES.PHP - Inline styles override */
html[data-theme="light"] .tab-btn:hover,
html[data-theme="light"] body .tab-btn:hover {
    color: #111827 !important;
}

html[data-theme="light"] .notification-title,
html[data-theme="light"] body .notification-title {
    color: #111827 !important;
}

html[data-theme="light"] .notification-time,
html[data-theme="light"] body .notification-time {
    color: #9ca3af !important;
}

html[data-theme="light"] .empty-state-title,
html[data-theme="light"] body .empty-state-title {
    color: #111827 !important;
}

html[data-theme="light"] .setting-title,
html[data-theme="light"] body .setting-title {
    color: #111827 !important;
}

/* FERIAS.PHP - Inline styles override */
html[data-theme="light"] .vacation-dates,
html[data-theme="light"] body .vacation-dates {
    color: #111827 !important;
}

html[data-theme="light"] .vacation-detail,
html[data-theme="light"] body .vacation-detail {
    color: #374151 !important;
}

/* JUSTIFICACOES.PHP - Inline styles override */
html[data-theme="light"] .justification-date,
html[data-theme="light"] body .justification-date {
    color: #111827 !important;
}

html[data-theme="light"] .justification-type,
html[data-theme="light"] body .justification-type {
    color: #111827 !important;
}

html[data-theme="light"] .justification-reason,
html[data-theme="light"] body .justification-reason {
    color: #4b5563 !important;
}

/* CORRECOES.PHP - Inline styles override */
html[data-theme="light"] .correction-date,
html[data-theme="light"] body .correction-date {
    color: #111827 !important;
}

html[data-theme="light"] .correction-time,
html[data-theme="light"] body .correction-time {
    color: #111827 !important;
}

/* SUPORTE.PHP - Inline styles override */
html[data-theme="light"] .support-title,
html[data-theme="light"] body .support-title {
    color: #111827 !important;
}

html[data-theme="light"] .support-card-title,
html[data-theme="light"] body .support-card-title {
    color: #111827 !important;
}

html[data-theme="light"] .faq-question,
html[data-theme="light"] body .faq-question {
    color: #111827 !important;
}

html[data-theme="light"] .faq-answer,
html[data-theme="light"] body .faq-answer {
    color: #374151 !important;
}

html[data-theme="light"] .contact-title,
html[data-theme="light"] body .contact-title {
    color: #111827 !important;
}

html[data-theme="light"] .contact-info,
html[data-theme="light"] body .contact-info {
    color: #374151 !important;
}

/* ALTERAR_SENHA.PHP - Inline styles override */
html[data-theme="light"] .password-card-title,
html[data-theme="light"] body .password-card-title {
    color: #111827 !important;
}

html[data-theme="light"] .password-section-title,
html[data-theme="light"] body .password-section-title {
    color: #111827 !important;
}

html[data-theme="light"] .password-requirements-title,
html[data-theme="light"] body .password-requirements-title {
    color: #111827 !important;
}

/* PEDIR_CORRECAO.PHP - Inline styles override */
html[data-theme="light"] .correction-form-title,
html[data-theme="light"] body .correction-form-title {
    color: #111827 !important;
}

html[data-theme="light"] .day-selector-title,
html[data-theme="light"] body .day-selector-title {
    color: #111827 !important;
}

html[data-theme="light"] .day-card-date,
html[data-theme="light"] body .day-card-date {
    color: #111827 !important;
}

/* PEDIR_FERIAS.PHP - Inline styles override */
html[data-theme="light"] .form-section-title,
html[data-theme="light"] body .form-section-title {
    color: #111827 !important;
}

/* PEDIR_JUSTIFICACAO.PHP - Inline styles override */
html[data-theme="light"] .justification-form-title,
html[data-theme="light"] body .justification-form-title {
    color: #111827 !important;
}

/* CARD TITLES - Generic override for all h4, h5, h6 inside cards */
html[data-theme="light"] .card h4,
html[data-theme="light"] .card h5,
html[data-theme="light"] .card h6,
html[data-theme="light"] body .card h4,
html[data-theme="light"] body .card h5,
html[data-theme="light"] body .card h6 {
    color: #111827 !important;
}

html[data-theme="light"] .card-title,
html[data-theme="light"] body .card-title {
    color: #111827 !important;
}

/* Generic text inside cards */
html[data-theme="light"] .card p,
html[data-theme="light"] body .card p {
    color: #374151 !important;
}

html[data-theme="light"] .card span:not(.badge):not(.btn):not([class*="bg-"]),
html[data-theme="light"] body .card span:not(.badge):not(.btn):not([class*="bg-"]) {
    color: inherit;
}

/* ============================================
   FINAL OVERRIDE - MÁXIMA ESPECIFICIDADE
   Para cores hardcoded em <style> inline dos PHP
   ============================================ */

/* Override para cor #f8fafc (branco claro - deve ser escuro no modo claro) */
html[data-theme="light"] .support-title,
html[data-theme="light"] body .support-title,
html[data-theme="light"] .support-card-header h5,
html[data-theme="light"] body .support-card-header h5,
html[data-theme="light"] .contact-value,
html[data-theme="light"] body .contact-value,
html[data-theme="light"] .faq-question,
html[data-theme="light"] body .faq-question,
html[data-theme="light"] .password-card-header h5,
html[data-theme="light"] body .password-card-header h5,
html[data-theme="light"] .form-label,
html[data-theme="light"] body .form-label,
html[data-theme="light"] .security-tips-header h6,
html[data-theme="light"] body .security-tips-header h6 {
    color: #111827 !important;
}

/* Override para elementos de cor #e2e8f0 e #cbd5e1 */
html[data-theme="light"] .support-subtitle,
html[data-theme="light"] body .support-subtitle,
html[data-theme="light"] .schedule-info span,
html[data-theme="light"] body .schedule-info span {
    color: #4b5563 !important;
}

/* Override específico para ferias.php */
html[data-theme="light"] .vacation-content .vacation-dates,
html[data-theme="light"] body .vacation-content .vacation-dates,
html[data-theme="light"] .vacation-content span.fw-medium,
html[data-theme="light"] body .vacation-content span.fw-medium {
    color: #111827 !important;
}

html[data-theme="light"] .vacation-detail span,
html[data-theme="light"] body .vacation-detail span {
    color: #374151 !important;
}

/* Override específico para justificacoes.php */
html[data-theme="light"] .justification-content .justification-date,
html[data-theme="light"] body .justification-content .justification-date,
html[data-theme="light"] .justification-content span.fw-semibold,
html[data-theme="light"] body .justification-content span.fw-semibold {
    color: #111827 !important;
}

html[data-theme="light"] .reason-text,
html[data-theme="light"] body .reason-text {
    color: #111827 !important;
}

/* Override específico para correcoes.php */
html[data-theme="light"] .correction-content .correction-date,
html[data-theme="light"] body .correction-content .correction-date,
html[data-theme="light"] .correction-content span.fw-semibold,
html[data-theme="light"] body .correction-content span.fw-semibold {
    color: #111827 !important;
}

html[data-theme="light"] .correction-time-label,
html[data-theme="light"] body .correction-time-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .correction-time-value,
html[data-theme="light"] body .correction-time-value {
    color: #111827 !important;
}

/* Override específico para suporte.php */
html[data-theme="light"] .support-card,
html[data-theme="light"] body .support-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .support-card-header,
html[data-theme="light"] body .support-card-header {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .contact-item,
html[data-theme="light"] body .contact-item {
    background: #f3f4f6 !important;
}

html[data-theme="light"] .contact-item:hover,
html[data-theme="light"] body .contact-item:hover {
    background: rgba(21, 101, 192, 0.08) !important;
}

html[data-theme="light"] .faq-item,
html[data-theme="light"] body .faq-item {
    background: #f3f4f6 !important;
}

html[data-theme="light"] .app-info,
html[data-theme="light"] body .app-info {
    background: #f3f4f6 !important;
}

/* Override específico para alterar_senha.php */
html[data-theme="light"] .password-card,
html[data-theme="light"] body .password-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .password-card-header,
html[data-theme="light"] body .password-card-header {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .requirements-box,
html[data-theme="light"] body .requirements-box {
    background: #f0f9ff !important;
}

html[data-theme="light"] .requirements-box h6,
html[data-theme="light"] body .requirements-box h6 {
    color: #0369a1 !important;
}

html[data-theme="light"] .requirement-item,
html[data-theme="light"] body .requirement-item {
    color: #4b5563 !important;
}

html[data-theme="light"] .security-tips,
html[data-theme="light"] body .security-tips {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .security-tips li,
html[data-theme="light"] body .security-tips li {
    color: #4b5563 !important;
}

/* Override genérico para todos os spans com cores hardcoded */
html[data-theme="light"] span[style*="#f8fafc"],
html[data-theme="light"] body span[style*="#f8fafc"],
html[data-theme="light"] div[style*="#f8fafc"],
html[data-theme="light"] body div[style*="#f8fafc"] {
    color: #111827 !important;
}

html[data-theme="light"] span[style*="#e2e8f0"],
html[data-theme="light"] body span[style*="#e2e8f0"],
html[data-theme="light"] div[style*="#e2e8f0"],
html[data-theme="light"] body div[style*="#e2e8f0"] {
    color: #374151 !important;
}

html[data-theme="light"] span[style*="#cbd5e1"],
html[data-theme="light"] body span[style*="#cbd5e1"],
html[data-theme="light"] div[style*="#cbd5e1"],
html[data-theme="light"] body div[style*="#cbd5e1"] {
    color: #4b5563 !important;
}

/* Entry badges nos formulários */
html[data-theme="light"] .entry-badge,
html[data-theme="light"] body .entry-badge {
    color: inherit;
}

html[data-theme="light"] .entry-badge-in,
html[data-theme="light"] body .entry-badge-in {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #16a34a !important;
    border-color: #22c55e !important;
}

html[data-theme="light"] .entry-badge-out,
html[data-theme="light"] body .entry-badge-out {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
    border-color: #ef4444 !important;
}

/* Vacation, justification, correction item backgrounds */
html[data-theme="light"] .vacation-item,
html[data-theme="light"] body .vacation-item,
html[data-theme="light"] .justification-item,
html[data-theme="light"] body .justification-item,
html[data-theme="light"] .correction-item,
html[data-theme="light"] body .correction-item {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .vacation-item:hover,
html[data-theme="light"] body .vacation-item:hover,
html[data-theme="light"] .justification-item:hover,
html[data-theme="light"] body .justification-item:hover,
html[data-theme="light"] .correction-item:hover,
html[data-theme="light"] body .correction-item:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* Status indicators */
html[data-theme="light"] .vacation-status-indicator,
html[data-theme="light"] .justification-status-indicator,
html[data-theme="light"] .correction-status-indicator {
    opacity: 0.9;
}

/* Text secondary and muted fixes */
html[data-theme="light"] .text-secondary,
html[data-theme="light"] body .text-secondary,
html[data-theme="light"] .text-muted,
html[data-theme="light"] body .text-muted,
html[data-theme="light"] .text-meta,
html[data-theme="light"] body .text-meta,
html[data-theme="light"] .text-description,
html[data-theme="light"] body .text-description {
    color: #6b7280 !important;
}

/* Schedule info yellow text fix */
html[data-theme="light"] .schedule-info span,
html[data-theme="light"] body .schedule-info span {
    color: #d97706 !important;
}

/* Stat card mini - fixes for employee dashboard */
html[data-theme="light"] .stat-card-mini,
html[data-theme="light"] body .stat-card-mini {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

html[data-theme="light"] .stat-card-mini-value,
html[data-theme="light"] body .stat-card-mini-value {
    color: #111827 !important;
}

html[data-theme="light"] .stat-card-mini-label,
html[data-theme="light"] body .stat-card-mini-label {
    color: #6b7280 !important;
}

/* ============================================
   ADMIN PAGES - LIGHT MODE FINAL OVERRIDES
   For inline <style> blocks in admin PHP pages
   ============================================ */

/* --- ADMIN DASHBOARD.PHP --- */
html[data-theme="light"] .stat-card-value,
html[data-theme="light"] body .stat-card-value,
html[data-theme="light"] .stat-card .stat-card-value {
    color: #111827 !important;
}

html[data-theme="light"] .stat-card-label,
html[data-theme="light"] body .stat-card-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .chart-title,
html[data-theme="light"] body .chart-title {
    color: #111827 !important;
}

html[data-theme="light"] .attendance-overview-title,
html[data-theme="light"] body .attendance-overview-title {
    color: #111827 !important;
}

/* --- ADMIN COLABORADORES.PHP --- */
html[data-theme="light"] .employee-name,
html[data-theme="light"] body .employee-name,
html[data-theme="light"] .employee-card .employee-name {
    color: #111827 !important;
}

html[data-theme="light"] .employee-position,
html[data-theme="light"] body .employee-position {
    color: #6b7280 !important;
}

/* --- ADMIN COLABORADOR_DETALHES.PHP --- */
html[data-theme="light"] .detail-section-header h5,
html[data-theme="light"] body .detail-section-header h5 {
    color: #111827 !important;
}

html[data-theme="light"] .detail-label,
html[data-theme="light"] body .detail-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .detail-value,
html[data-theme="light"] body .detail-value {
    color: #111827 !important;
}

html[data-theme="light"] .detail-value.muted,
html[data-theme="light"] body .detail-value.muted {
    color: #9ca3af !important;
}

html[data-theme="light"] .profile-name,
html[data-theme="light"] body .profile-name,
html[data-theme="light"] .profile-card .profile-name {
    color: #111827 !important;
}

html[data-theme="light"] .bank-hours-label,
html[data-theme="light"] body .bank-hours-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .system-info-label,
html[data-theme="light"] body .system-info-label {
    color: #6b7280 !important;
}

html[data-theme="light"] .system-info-value,
html[data-theme="light"] body .system-info-value {
    color: #111827 !important;
}

html[data-theme="light"] .breadcrumb-item a:hover,
html[data-theme="light"] body .breadcrumb-item a:hover {
    color: #111827 !important;
}

/* --- ADMIN COLABORADOR_FORM.PHP --- */
html[data-theme="light"] .form-section-header h5,
html[data-theme="light"] body .form-section-header h5 {
    color: #111827 !important;
}

html[data-theme="light"] .form-label,
html[data-theme="light"] body .form-label,
html[data-theme="light"] .form-section .form-label {
    color: #374151 !important;
}

html[data-theme="light"] .location-name,
html[data-theme="light"] body .location-name {
    color: #111827 !important;
}

/* --- ADMIN BANCO_HORAS.PHP --- */
html[data-theme="light"] .employee-modal-name,
html[data-theme="light"] body .employee-modal-name {
    color: #111827 !important;
}

html[data-theme="light"] .monthly-progress-stats strong,
html[data-theme="light"] body .monthly-progress-stats strong {
    color: #111827 !important;
}

/* --- ADMIN RELATORIOS.PHP --- */
html[data-theme="light"] .period-title,
html[data-theme="light"] body .period-title {
    color: #111827 !important;
}

html[data-theme="light"] .date-input-group input,
html[data-theme="light"] body .date-input-group input {
    color: #111827 !important;
}

html[data-theme="light"] .bar-value,
html[data-theme="light"] body .bar-value {
    color: #111827 !important;
}

html[data-theme="light"] .report-title,
html[data-theme="light"] body .report-title {
    color: #111827 !important;
}

html[data-theme="light"] .quick-stats-title,
html[data-theme="light"] body .quick-stats-title {
    color: #111827 !important;
}

html[data-theme="light"] .quick-stat-value,
html[data-theme="light"] body .quick-stat-value {
    color: #111827 !important;
}

html[data-theme="light"] .filter-section-title,
html[data-theme="light"] body .filter-section-title {
    color: #111827 !important;
}

html[data-theme="light"] .export-btn-title,
html[data-theme="light"] body .export-btn-title {
    color: #111827 !important;
}

/* --- ADMIN DEFINICOES.PHP --- */
html[data-theme="light"] .settings-card-header h3,
html[data-theme="light"] body .settings-card-header h3 {
    color: #111827 !important;
}

html[data-theme="light"] .switch-label-text,
html[data-theme="light"] body .switch-label-text {
    color: #111827 !important;
}

/* --- ADMIN PERFIL.PHP --- */
html[data-theme="light"] .profile-card-header h5,
html[data-theme="light"] body .profile-card-header h5,
html[data-theme="light"] .profile-card .profile-card-header h5 {
    color: #111827 !important;
}

html[data-theme="light"] .info-item p,
html[data-theme="light"] body .info-item p {
    color: #111827 !important;
}

/* --- ADMIN NOTIFICACOES.PHP --- */
html[data-theme="light"] .settings-section-title,
html[data-theme="light"] body .settings-section-title {
    color: #111827 !important;
}

/* --- ADMIN ALTERAR_SENHA.PHP --- */
html[data-theme="light"] .password-card-header h5,
html[data-theme="light"] body .password-card-header h5 {
    color: #111827 !important;
}

html[data-theme="light"] .security-tips-header h6,
html[data-theme="light"] body .security-tips-header h6 {
    color: #111827 !important;
}

/* --- Generic admin fixes for cards and sections --- */
html[data-theme="light"] .detail-section,
html[data-theme="light"] body .detail-section {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .detail-section-header,
html[data-theme="light"] body .detail-section-header {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .form-section,
html[data-theme="light"] body .form-section {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .form-section-header,
html[data-theme="light"] body .form-section-header {
    border-color: #e5e7eb !important;
}

/* Fix for user search in ponto_manual */
html[data-theme="light"] .user-search-name,
html[data-theme="light"] body .user-search-name {
    color: #111827 !important;
}

html[data-theme="light"] .user-search-team,
html[data-theme="light"] body .user-search-team {
    color: #6b7280 !important;
}

html[data-theme="light"] .selected-user-name,
html[data-theme="light"] body .selected-user-name {
    color: #111827 !important;
}

html[data-theme="light"] .selected-user-team,
html[data-theme="light"] body .selected-user-team {
    color: #6b7280 !important;
}

html[data-theme="light"] .entry-time,
html[data-theme="light"] body .entry-time {
    color: #111827 !important;
}

html[data-theme="light"] .entry-label,
html[data-theme="light"] body .entry-label {
    color: #6b7280 !important;
}

/* Admin locations list */
html[data-theme="light"] .locations-list,
html[data-theme="light"] body .locations-list {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .location-item,
html[data-theme="light"] body .location-item {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .location-item:hover,
html[data-theme="light"] body .location-item:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

html[data-theme="light"] .location-item.selected,
html[data-theme="light"] body .location-item.selected {
    background: rgba(59, 130, 246, 0.08) !important;
}

/* Admin user search results */
html[data-theme="light"] .user-search-results,
html[data-theme="light"] body .user-search-results {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .user-search-item,
html[data-theme="light"] body .user-search-item {
    border-color: #e5e7eb !important;
}

html[data-theme="light"] .user-search-item:hover,
html[data-theme="light"] body .user-search-item:hover {
    background: rgba(21, 101, 192, 0.05) !important;
}

/* Selected user card */
html[data-theme="light"] .selected-user,
html[data-theme="light"] body .selected-user {
    background: rgba(21, 101, 192, 0.05) !important;
}

/* Entry items in manual clock */
html[data-theme="light"] .entry-item,
html[data-theme="light"] body .entry-item {
    background: #f9fafb !important;
}

/* No records state */
html[data-theme="light"] .no-records,
html[data-theme="light"] body .no-records {
    background: #f9fafb !important;
    color: #6b7280 !important;
}

/* Total hours badge */
html[data-theme="light"] .total-hours-badge,
html[data-theme="light"] body .total-hours-badge {
    background: rgba(21, 101, 192, 0.1) !important;
    color: #1d4ed8 !important;
}

/* ============================================
   EMPLOYEE BANCO_HORAS.PHP - LIGHT MODE FIX
   ============================================ */

/* Monthly progress percent */
html[data-theme="light"] .monthly-progress-percent,
html[data-theme="light"] body .monthly-progress-percent,
html[data-theme="light"] .monthly-progress-card .monthly-progress-percent {
    color: #111827 !important;
}

/* Monthly stat value */
html[data-theme="light"] .monthly-stat-value,
html[data-theme="light"] body .monthly-stat-value,
html[data-theme="light"] .monthly-stat .monthly-stat-value {
    color: #111827 !important;
}

/* Chart bar value */
html[data-theme="light"] .chart-bar-value,
html[data-theme="light"] body .chart-bar-value,
html[data-theme="light"] .chart-bar-wrapper .chart-bar-value {
    color: #111827 !important;
}

/* Transaction description */
html[data-theme="light"] .transaction-description,
html[data-theme="light"] body .transaction-description,
html[data-theme="light"] .transaction-content .transaction-description {
    color: #111827 !important;
}

/* Info card paragraph text */
html[data-theme="light"] .info-card p,
html[data-theme="light"] body .info-card p {
    color: #4b5563 !important;
}

/* Info type item */
html[data-theme="light"] .info-type-item,
html[data-theme="light"] body .info-type-item,
html[data-theme="light"] .info-types .info-type-item {
    color: #4b5563 !important;
}

html[data-theme="light"] .info-type-item span,
html[data-theme="light"] body .info-type-item span {
    color: #4b5563 !important;
}

/* Monthly progress card background for light mode */
html[data-theme="light"] .monthly-progress-card,
html[data-theme="light"] body .monthly-progress-card {
    background: rgba(168, 85, 247, 0.05) !important;
    border-color: rgba(168, 85, 247, 0.15) !important;
}

/* Progress bar container */
html[data-theme="light"] .progress-bar-container,
html[data-theme="light"] body .progress-bar-container {
    background: rgba(0, 0, 0, 0.08) !important;
}

/* Info card background for light mode */
html[data-theme="light"] .info-card,
html[data-theme="light"] body .info-card {
    background: rgba(59, 130, 246, 0.05) !important;
    border-color: rgba(59, 130, 246, 0.15) !important;
}

/* Balance card for light mode */
html[data-theme="light"] .balance-card,
html[data-theme="light"] body .balance-card {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%) !important;
}

/* Transaction item hover */
html[data-theme="light"] .transaction-item:hover,
html[data-theme="light"] body .transaction-item:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}

/* ============================================
   LOGIN PAGE - LOGO FIX (DARK MODE)
   ============================================ */

/* No modo escuro (padrão): mostrar logo branco, esconder logo azul */
html:not([data-theme="light"]) .login-logo.logo-light,
html:not([data-theme="light"]) body .login-logo.logo-light,
html:not([data-theme="light"]) .login-card .logo-light {
    display: none !important;
}

html:not([data-theme="light"]) .login-logo.logo-dark,
html:not([data-theme="light"]) body .login-logo.logo-dark,
html:not([data-theme="light"]) .login-card .logo-dark {
    display: block !important;
}

/* No modo claro: mostrar logo azul, esconder logo branco */
html[data-theme="light"] .login-logo.logo-dark,
html[data-theme="light"] body .login-logo.logo-dark,
html[data-theme="light"] .login-card .logo-dark {
    display: none !important;
}

html[data-theme="light"] .login-logo.logo-light,
html[data-theme="light"] body .login-logo.logo-light,
html[data-theme="light"] .login-card .logo-light {
    display: block !important;
}