/* ==========================================================================
   ADMIN THEME - DUAL MODE (LIGHT / DARK)
   ========================================================================== */

/* --------------------------------------------------------------------------
   SHARED / BASE UTILITIES
   -------------------------------------------------------------------------- */
/* Buttons common styling */
.btn-primary {
    background-color: #6d28d9 !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #5b21b6 !important;
    color: #ffffff !important;
}

.btn-warning {
    background-color: #facc15 !important;
    border: none !important;
    color: #0f0b1f !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
}

.btn-warning:hover {
    background-color: #eab308 !important;
    color: #0f0b1f !important;
}

.btn-danger {
    background-color: #dc2626 !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}

.btn-danger:hover {
    background-color: #b91c1c !important;
}

.btn-success {
    background-color: #059669 !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}

.btn-success:hover {
    background-color: #047857 !important;
}

/* Badges */
.badge {
    padding: 5px 10px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
}

.badge.bg-primary {
    background-color: #6d28d9 !important;
    color: #ffffff !important;
}

.badge.bg-success {
    background-color: #059669 !important;
    color: #ffffff !important;
}

.badge.bg-warning {
    background-color: #facc15 !important;
    color: #0f0b1f !important;
}

.badge.bg-danger {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* CKEditor */
.ck-content img {
    max-width: 300px;
    height: 200px;
}

/* Settings tab */
.setting-tab-title {
    margin-top: 15px !important;
    margin-bottom: 5px !important;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/* --------------------------------------------------------------------------
   LIGHT / WHITE MODE STYLES
   -------------------------------------------------------------------------- */
html[data-bs-theme="light"],
html[data-bs-theme="light"] body {
    background-color: #f4f6fa !important;
    color: #1e293b !important;
}

html[data-bs-theme="light"] .app-wrapper,
html[data-bs-theme="light"] .page-content,
html[data-bs-theme="light"] .content-page {
    background-color: #f4f6fa !important;
}

html[data-bs-theme="light"] h1,
html[data-bs-theme="light"] h2,
html[data-bs-theme="light"] h3,
html[data-bs-theme="light"] h4,
html[data-bs-theme="light"] h5,
html[data-bs-theme="light"] h6,
html[data-bs-theme="light"] .text-dark,
html[data-bs-theme="light"] .h1,
html[data-bs-theme="light"] .h2,
html[data-bs-theme="light"] .h3,
html[data-bs-theme="light"] .h4,
html[data-bs-theme="light"] .h5,
html[data-bs-theme="light"] .h6 {
    color: #0f172a !important;
}

html[data-bs-theme="light"] .text-muted {
    color: #64748b !important;
}

html[data-bs-theme="light"] .breadcrumb-item a {
    color: #6366f1 !important;
    text-decoration: none;
}

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

/* Light Sidebar */
html[data-bs-theme="light"] .app-sidebar {
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
}

html[data-bs-theme="light"] .logo-box {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

html[data-bs-theme="light"] .menu-title {
    color: #64748b !important;
    font-size: 0.75rem !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

html[data-bs-theme="light"] .navbar-nav .nav-link {
    color: #334155 !important;
    border-radius: 8px !important;
    margin: 2px 8px !important;
    padding: 10px 14px !important;
}

html[data-bs-theme="light"] .navbar-nav .nav-link iconify-icon,
html[data-bs-theme="light"] .navbar-nav .nav-link .nav-icon {
    color: #6366f1 !important;
}

html[data-bs-theme="light"] .navbar-nav .nav-link:hover,
html[data-bs-theme="light"] .navbar-nav .nav-link:focus,
html[data-bs-theme="light"] .navbar-nav .nav-link.active {
    background-color: #eef2ff !important;
    color: #4f46e5 !important;
}

html[data-bs-theme="light"] .navbar-nav .nav-link:hover iconify-icon,
html[data-bs-theme="light"] .navbar-nav .nav-link.active iconify-icon {
    color: #4f46e5 !important;
}

html[data-bs-theme="light"] .sub-navbar-nav .sub-nav-link {
    color: #64748b !important;
    border-radius: 6px !important;
    padding: 7px 12px !important;
}

html[data-bs-theme="light"] .sub-navbar-nav .sub-nav-link:hover,
html[data-bs-theme="light"] .sub-navbar-nav .sub-nav-link.active {
    color: #4f46e5 !important;
    background-color: #eef2ff !important;
}

/* Light Topbar */
html[data-bs-theme="light"] .app-topbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

html[data-bs-theme="light"] .topbar-button {
    color: #475569 !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
}

html[data-bs-theme="light"] .topbar-button:hover {
    color: #0f172a !important;
    background-color: #e2e8f0 !important;
}

/* Light Dropdown */
html[data-bs-theme="light"] .dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

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

html[data-bs-theme="light"] .dropdown-item:hover {
    background-color: #f1f5f9 !important;
    color: #4f46e5 !important;
}

html[data-bs-theme="light"] .dropdown-header {
    color: #0f172a !important;
    font-weight: 700 !important;
}

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

/* Light Cards */
html[data-bs-theme="light"] .card {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    margin-top: 15px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
}

html[data-bs-theme="light"] .card-header {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

html[data-bs-theme="light"] .card-footer {
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* Light Buttons */
html[data-bs-theme="light"] .btn-secondary,
html[data-bs-theme="light"] .btn-light {
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    border-radius: 8px !important;
}

html[data-bs-theme="light"] .btn-secondary:hover,
html[data-bs-theme="light"] .btn-light:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Light Form Controls */
html[data-bs-theme="light"] .form-control,
html[data-bs-theme="light"] .form-select,
html[data-bs-theme="light"] select,
html[data-bs-theme="light"] textarea {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
}

html[data-bs-theme="light"] .form-control:focus,
html[data-bs-theme="light"] .form-select:focus,
html[data-bs-theme="light"] textarea:focus {
    background-color: #ffffff !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    color: #0f172a !important;
}

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

html[data-bs-theme="light"] .form-label {
    color: #334155 !important;
    font-weight: 500 !important;
}

html[data-bs-theme="light"] .form-check-input {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
}

html[data-bs-theme="light"] .form-check-input:checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
}

/* Light Tables */
html[data-bs-theme="light"] .table {
    color: #334155 !important;
    border-color: #e2e8f0 !important;
}

html[data-bs-theme="light"] .table th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.5px !important;
}

html[data-bs-theme="light"] .table td {
    border-color: #e2e8f0 !important;
    vertical-align: middle !important;
}

html[data-bs-theme="light"] .table-hover tbody tr:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

html[data-bs-theme="light"] .table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8fafc !important;
}

/* Light Avatar */
html[data-bs-theme="light"] .avatar-md.bg-primary.bg-opacity-10 {
    background-color: #eef2ff !important;
}

html[data-bs-theme="light"] .avatar-md .avatar-title,
html[data-bs-theme="light"] iconify-icon.text-primary {
    color: #4f46e5 !important;
}

/* Light Pagination */
html[data-bs-theme="light"] .pagination .page-link {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
    border-radius: 6px !important;
    margin: 0 2px !important;
}

html[data-bs-theme="light"] .pagination .page-item.active .page-link {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #ffffff !important;
}

html[data-bs-theme="light"] .pagination .page-link:hover {
    background-color: #f1f5f9 !important;
    color: #4f46e5 !important;
}

/* Light Modal */
html[data-bs-theme="light"] .modal-content {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

html[data-bs-theme="light"] .modal-header {
    border-bottom: 1px solid #e2e8f0 !important;
}

html[data-bs-theme="light"] .modal-footer {
    border-top: 1px solid #e2e8f0 !important;
}

html[data-bs-theme="light"] .btn-close {
    filter: none !important;
}

/* Light Footer */
html[data-bs-theme="light"] .footer {
    background-color: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #64748b !important;
}

/* Light Nav search */
html[data-bs-theme="light"] .form-search {
    border-radius: 8px;
    border: 1px solid #e2e8f0 !important;
    padding: 9px;
    background-color: #ffffff !important;
    color: #0f172a !important;
}

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

html[data-bs-theme="light"] ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

html[data-bs-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* --------------------------------------------------------------------------
   DARK THEME STYLES - SCOPED EXCLUSIVELY TO html[data-bs-theme="dark"]
   -------------------------------------------------------------------------- */
html[data-bs-theme="dark"],
html[data-bs-theme="dark"] body {
    background-color: #0f0b1f !important;
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] .app-wrapper,
html[data-bs-theme="dark"] .page-content,
html[data-bs-theme="dark"] .content-page {
    background-color: #0f0b1f !important;
}

html[data-bs-theme="dark"] h1,
html[data-bs-theme="dark"] h2,
html[data-bs-theme="dark"] h3,
html[data-bs-theme="dark"] h4,
html[data-bs-theme="dark"] h5,
html[data-bs-theme="dark"] h6,
html[data-bs-theme="dark"] .text-dark,
html[data-bs-theme="dark"] .h1,
html[data-bs-theme="dark"] .h2,
html[data-bs-theme="dark"] .h3,
html[data-bs-theme="dark"] .h4,
html[data-bs-theme="dark"] .h5,
html[data-bs-theme="dark"] .h6 {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .text-muted {
    color: #a78bfa !important;
}

html[data-bs-theme="dark"] .breadcrumb-item a {
    color: #a78bfa !important;
    text-decoration: none;
}

html[data-bs-theme="dark"] .breadcrumb-item.active {
    color: #facc15 !important;
}

/* Dark Sidebar */
html[data-bs-theme="dark"] .app-sidebar {
    background-color: #1a1040 !important;
    border-right: 1px solid #2d1f6e !important;
}

html[data-bs-theme="dark"] .logo-box {
    background-color: #1a1040 !important;
    border-bottom: 1px solid #2d1f6e !important;
}

html[data-bs-theme="dark"] .menu-title {
    color: #facc15 !important;
    font-size: 0.75rem !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

html[data-bs-theme="dark"] .navbar-nav .nav-link {
    color: #cbd5e1 !important;
    border-radius: 8px !important;
    margin: 2px 8px !important;
    padding: 10px 14px !important;
}

html[data-bs-theme="dark"] .navbar-nav .nav-link iconify-icon,
html[data-bs-theme="dark"] .navbar-nav .nav-link .nav-icon {
    color: #a78bfa !important;
}

html[data-bs-theme="dark"] .navbar-nav .nav-link:hover,
html[data-bs-theme="dark"] .navbar-nav .nav-link:focus,
html[data-bs-theme="dark"] .navbar-nav .nav-link.active {
    background-color: #2d1f6e !important;
    color: #facc15 !important;
}

html[data-bs-theme="dark"] .navbar-nav .nav-link:hover iconify-icon,
html[data-bs-theme="dark"] .navbar-nav .nav-link.active iconify-icon {
    color: #facc15 !important;
}

html[data-bs-theme="dark"] .sub-navbar-nav .sub-nav-link {
    color: #94a3b8 !important;
    border-radius: 6px !important;
    padding: 7px 12px !important;
}

html[data-bs-theme="dark"] .sub-navbar-nav .sub-nav-link:hover,
html[data-bs-theme="dark"] .sub-navbar-nav .sub-nav-link.active {
    color: #facc15 !important;
    background-color: #2d1f6e !important;
}

/* Dark Topbar */
html[data-bs-theme="dark"] .app-topbar {
    background-color: #1a1040 !important;
    border-bottom: 1px solid #2d1f6e !important;
}

html[data-bs-theme="dark"] .topbar-button {
    color: #a78bfa !important;
    background-color: #2d1f6e !important;
    border: 1px solid #3d2b8a !important;
    border-radius: 8px !important;
}

html[data-bs-theme="dark"] .topbar-button:hover {
    color: #facc15 !important;
    background-color: #3d2b8a !important;
}

/* Dark Dropdown */
html[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1a1040 !important;
    border: 1px solid #2d1f6e !important;
    border-radius: 10px !important;
}

html[data-bs-theme="dark"] .dropdown-item {
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #2d1f6e !important;
    color: #facc15 !important;
}

html[data-bs-theme="dark"] .dropdown-header {
    color: #facc15 !important;
    font-weight: 700 !important;
}

html[data-bs-theme="dark"] .dropdown-divider {
    border-color: #2d1f6e !important;
}

/* Dark Cards */
html[data-bs-theme="dark"] .card {
    background-color: #1c1242 !important;
    border: 1px solid #2d1f6e !important;
    border-radius: 12px !important;
    margin-top: 15px;
}

html[data-bs-theme="dark"] .card-header {
    background-color: #221650 !important;
    border-bottom: 1px solid #2d1f6e !important;
    color: #ffffff !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

html[data-bs-theme="dark"] .card-footer {
    background-color: #1a1040 !important;
    border-top: 1px solid #2d1f6e !important;
}

/* Dark Buttons */
html[data-bs-theme="dark"] .btn-secondary,
html[data-bs-theme="dark"] .btn-light {
    background-color: #2d1f6e !important;
    border: 1px solid #3d2b8a !important;
    color: #e2e8f0 !important;
    border-radius: 8px !important;
}

html[data-bs-theme="dark"] .btn-secondary:hover,
html[data-bs-theme="dark"] .btn-light:hover {
    background-color: #3d2b8a !important;
    color: #facc15 !important;
}

/* Dark Form Controls */
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] select,
html[data-bs-theme="dark"] textarea {
    background-color: #12092b !important;
    border: 1px solid #2d1f6e !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}

html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus,
html[data-bs-theme="dark"] textarea:focus {
    background-color: #12092b !important;
    border-color: #7c3aed !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .form-control::placeholder {
    color: #64748b !important;
}

html[data-bs-theme="dark"] .form-label {
    color: #cbd5e1 !important;
    font-weight: 500 !important;
}

html[data-bs-theme="dark"] .form-check-input {
    background-color: #12092b !important;
    border-color: #2d1f6e !important;
}

html[data-bs-theme="dark"] .form-check-input:checked {
    background-color: #7c3aed !important;
    border-color: #7c3aed !important;
}

/* Dark Tables */
html[data-bs-theme="dark"] .table {
    color: #e2e8f0 !important;
    border-color: #2d1f6e !important;
}

html[data-bs-theme="dark"] .table th {
    background-color: #221650 !important;
    color: #facc15 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #2d1f6e !important;
    text-transform: uppercase !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.5px !important;
}

html[data-bs-theme="dark"] .table td {
    border-color: #2d1f6e !important;
    vertical-align: middle !important;
}

html[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: #2d1f6e !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
    background-color: #1a1040 !important;
}

/* Dark Avatar */
html[data-bs-theme="dark"] .avatar-md.bg-primary.bg-opacity-10 {
    background-color: #2d1f6e !important;
}

html[data-bs-theme="dark"] .avatar-md .avatar-title,
html[data-bs-theme="dark"] iconify-icon.text-primary {
    color: #facc15 !important;
}

/* Dark Pagination */
html[data-bs-theme="dark"] .pagination .page-link {
    background-color: #1c1242 !important;
    border-color: #2d1f6e !important;
    color: #cbd5e1 !important;
    border-radius: 6px !important;
    margin: 0 2px !important;
}

html[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background-color: #6d28d9 !important;
    border-color: #6d28d9 !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .pagination .page-link:hover {
    background-color: #2d1f6e !important;
    color: #facc15 !important;
}

/* Dark Modal */
html[data-bs-theme="dark"] .modal-content {
    background-color: #1c1242 !important;
    border: 1px solid #2d1f6e !important;
    border-radius: 12px !important;
}

html[data-bs-theme="dark"] .modal-header {
    border-bottom: 1px solid #2d1f6e !important;
}

html[data-bs-theme="dark"] .modal-footer {
    border-top: 1px solid #2d1f6e !important;
}

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

/* Dark Footer */
html[data-bs-theme="dark"] .footer {
    background-color: #1a1040 !important;
    border-top: 1px solid #2d1f6e !important;
    color: #a78bfa !important;
}

/* Dark Nav search */
html[data-bs-theme="dark"] .form-search {
    border-radius: 8px;
    border: 1px solid #2d1f6e !important;
    padding: 9px;
    background-color: #12092b !important;
    color: #ffffff !important;
}

/* Dark Scrollbar */
html[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #0f0b1f;
}

html[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #2d1f6e;
    border-radius: 4px;
}

html[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #3d2b8a;
}
