/* Premium Clean Dashboard Override */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    background-image: none !important;
    background-color: #f8fafc !important;
    color: #1e293b !important;
    font-family: 'Inter', sans-serif !important;
}

/* Sidebar */
#sidebar-wrapper {
    background: #ffffff !important;
    box-shadow: 1px 0 10px rgba(0,0,0,0.03) !important;
    border-right: 1px solid #e2e8f0 !important;
}
.sidebar-menu > li > a {
    color: #475569 !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}
.sidebar-menu > li > a:hover,
.sidebar-menu > li.active > a {
    background: #f1f5f9 !important;
    color: #2563eb !important;
    border-left-color: #2563eb !important;
}
.sidebar-header {
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em !important;
    background: transparent !important;
}
.brand-logo {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
.logo-text {
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Topbar */
.topbar-nav .navbar {
    background: #ffffff !important;
    box-shadow: 0 1px 10px rgba(0,0,0,0.03) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
.topbar-nav .navbar .nav-link {
    color: #64748b !important;
}
.topbar-nav .search-bar input {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    padding-left: 35px !important;
}
.topbar-nav .search-bar .icon-magnifier {
    color: #94a3b8 !important;
}

/* User dropdown */
.dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}
.dropdown-item {
    color: #334155 !important;
}
.dropdown-item:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}
.user-title {
    color: #0f172a !important;
}
.user-subtitle {
    color: #64748b !important;
}

/* Cards */
.card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}
.card-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    padding: 1rem 1.25rem !important;
}
.card-body, .card-title {
    color: #334155 !important;
}
.card-title {
    font-weight: 600 !important;
}

/* Tables */
.table {
    color: #334155 !important;
}
.table thead th {
    border-bottom: 2px solid #e2e8f0 !important;
    color: #64748b !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    background-color: #f8fafc !important;
    letter-spacing: 0.025em;
}
.table td {
    border-top: 1px solid #e2e8f0 !important;
    vertical-align: middle !important;
    color: #1e293b !important;
}

/* Dashboard summary texts */
.text-white {
    color: #0f172a !important;
}
.text-white-50 {
    color: #64748b !important;
}
.border-light {
    border-color: #e2e8f0 !important;
}

/* Overriding specific card background colors if they use class names like bg-info, bg-success */
.bg-info, .bg-success, .bg-warning, .bg-danger {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}
.bg-info .text-white, .bg-success .text-white, .bg-warning .text-white, .bg-danger .text-white {
    color: #0f172a !important;
}
.w-circle-icon.bg-info { background-color: #e0f2fe !important; }
.w-circle-icon.bg-info i { color: #0ea5e9 !important; }
.w-circle-icon.bg-success { background-color: #d1fae5 !important; }
.w-circle-icon.bg-success i { color: #10b981 !important; }
.w-circle-icon.bg-warning { background-color: #fef3c7 !important; }
.w-circle-icon.bg-warning i { color: #f59e0b !important; }

/* Buttons */
.btn {
    border-radius: 6px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    box-shadow: none !important;
}
.btn-light {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}
.btn-light:hover {
    background-color: #e2e8f0 !important;
}
.btn-primary {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}
.btn-primary:hover {
    background-color: #1d4ed8 !important;
}

/* Fix progress bars */
.progress {
    background-color: #e2e8f0 !important;
    border-radius: 999px !important;
}
.progress-bar {
    background-color: #2563eb !important;
}

/* Right Sidebar Color Switcher */
.right-sidebar {
    display: none !important;
}
.switcher-icon {
    display: none !important;
}

/* Login/Register container */
.card-authentication1 {
    background: #ffffff !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
}
.form-control {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    height: auto !important;
}
.form-control:focus {
    background: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}
label {
    color: #475569 !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}
.card-title {
    color: #0f172a !important;
}
.text-center.text-white {
    color: #0f172a !important;
}
hr {
    border-top-color: #e2e8f0 !important;
}

/* Custom list group */
.list-group-item {
    background: transparent !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}
.list-group-item i {
    color: #64748b !important;
}

/* Charts */
canvas {
    filter: invert(0) !important;
}

/* Remove dark overlay if any */
.overlay {
    background: rgba(0,0,0,0.5) !important;
}

/* Fix Global Link Colors */
a, 
body.bg-theme a, 
body.bg-theme1 a, 
.bg-theme a {
    color: #2563eb !important;
    text-decoration: none !important;
}
a:hover,
body.bg-theme a:hover,
.bg-theme a:hover {
    color: #1d4ed8 !important;
    text-decoration: none !important;
}

/* Sidebar Toggle Menu Fix */
.toggle-menu i {
    color: #1e293b !important; /* Made dark so it shows on white background */
    transition: color 0.2s ease;
}
.toggle-menu i:hover {
    color: #495057 !important; /* Red hover as requested */
}

/* Responsive Table Mobile Fixes */
.table-responsive {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}
.table td, .table th {
    white-space: nowrap !important;
    vertical-align: middle !important;
}
.card {
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Placeholder Fixes */
::-webkit-input-placeholder { color: #94a3b8 !important; }
::-moz-placeholder { color: #94a3b8 !important; opacity: 1 !important; }
:-ms-input-placeholder { color: #94a3b8 !important; }
::placeholder { color: #94a3b8 !important; opacity: 1 !important; }

/* icheck-material overrides */
.icheck-material-white > label { color: #475569 !important; }
.icheck-material-white > input:checked + label::before { border-color: #2563eb !important; }
.icheck-material-white > input:checked + label::after { border-color: #ffffff !important; background-color: #2563eb !important; }

/* Form Control additions */
.form-control, .input-shadow {
    color: #0f172a !important;
}
.form-control-position i {
    color: #64748b !important;
}

.dropdown-item,
.dropdown-item a,
.dropdown-item i,
.topbar-nav .navbar .dropdown-menu .dropdown-item,
.topbar-nav .navbar .dropdown-menu .dropdown-item a {
    color: #334155 !important;
    text-decoration: none !important;
}
.dropdown-item:hover,
.dropdown-item:hover a,
.dropdown-item:hover i {
    color: #0f172a !important;
}

.sidebar-menu a,
.sidebar-menu a i,
.sidebar-menu > li > a {
    text-decoration: none !important;
    color: #475569 !important;
}

/* Force body text colors everywhere just to be safe */
body, h1, h2, h3, h4, h5, h6, p, span, div, li, td, th {
    text-shadow: none !important;
}

/* Ensure no text defaults to white on white */
#wrapper, .card-authentication1, .card-body, .form-group {
    color: #1e293b !important;
}
.text-white { color: #0f172a !important; }

/* Fix other text utility classes that were light in dark theme */
.text-light, .text-light-1, .text-light-2, .text-light-3 {
    color: #475569 !important;
}
.text-muted {
    color: #94a3b8 !important;
}


/* Extra Premium Polish */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025) !important;
}
.btn {
    transition: all 0.2s ease !important;
}
.btn:active {
    transform: scale(0.98) !important;
}
.table-responsive {
    border-radius: 8px !important;
    overflow: hidden !important;
}
.badge {
    padding: 0.4em 0.6em !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
}
.badge-success { background-color: #d1fae5 !important; color: #059669 !important; }
.badge-danger { background-color: #fee2e2 !important; color: #dc2626 !important; }
.badge-warning { background-color: #fef3c7 !important; color: #d97706 !important; }
.badge-info { background-color: #e0f2fe !important; color: #0284c7 !important; }
