/* 
 * Premium Dark Mode Override for Angulr Theme 
 * Completely replaces the light theme with modern Slate/Neon styling
 */

/* ==========================================================================
   Global & Backgrounds
   ========================================================================== */
body, .app, html {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
}

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

/* ==========================================================================
   Header (Navbar)
   ========================================================================== */
.app-header, 
.navbar-header, 
.navbar-collapse {
    background-color: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

/* Brand Text */
.navbar-brand, .navbar-brand:hover {
    color: #f8fafc !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
}

/* Navbar links and icons */
.app-header .nav > li > a {
    color: #94a3b8 !important;
    transition: all 0.3s ease;
}
.app-header .nav > li > a:hover,
.app-header .nav > li.active > a {
    color: #f8fafc !important;
    background-color: #334155 !important;
}
.dropdown-menu {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
}
.dropdown-menu > li > a {
    color: #cbd5e1 !important;
}
.dropdown-menu > li > a:hover {
    background-color: #334155 !important;
    color: #f8fafc !important;
}
.dropdown-menu .divider {
    background-color: #334155 !important;
}

/* ==========================================================================
   Sidebar (Aside)
   ========================================================================== */
.app-aside, 
.aside-wrap {
    background-color: #0f172a !important;
    border-right: 1px solid #334155 !important;
    box-shadow: none !important;
}

/* Sidebar user section */
#aside-user {
    background-color: transparent !important;
}

/* Sidebar navigation */
.navi ul.nav li a {
    color: #94a3b8 !important;
    font-weight: 500;
    padding-top: 12px;
    padding-bottom: 12px;
    border-radius: 0 24px 24px 0;
    margin-right: 16px;
    transition: all 0.2s ease;
}
.navi ul.nav li a:hover, 
.navi ul.nav li a:active, 
.navi ul.nav li.active > a {
    color: #3b82f6 !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
}
.navi ul.nav li.active > a:before {
    display: none !important;
}
.navi ul.nav li a i {
    color: #64748b !important;
}
.navi ul.nav li.active > a i {
    color: #3b82f6 !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
    border: none !important;
    padding: 8px 18px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.btn-success {
    background-color: #10b981 !important;
    color: #022c22 !important; /* Dark text for contrast against bright green */
}
.btn-success:hover {
    background-color: #34d399 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4) !important;
}

.btn-primary {
    background-color: #3b82f6 !important;
    color: #eff6ff !important;
}
.btn-primary:hover {
    background-color: #60a5fa !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4) !important;
}

.btn-warning {
    background-color: #f59e0b !important;
    color: #451a03 !important;
}
.btn-warning:hover {
    background-color: #fbbf24 !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4) !important;
}

.btn-danger {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}
.btn-danger:hover {
    background-color: #f87171 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4) !important;
}

.btn-default {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
    border: 1px solid #334155 !important;
}
.btn-default:hover {
    background-color: #334155 !important;
    color: #f8fafc !important;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table {
    background-color: #1e293b !important;
    border-radius: 12px !important;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #334155 !important;
}
.table > thead > tr > th {
    border-bottom: 2px solid #334155 !important;
    color: #94a3b8 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 15px !important;
    padding: 14px 10px !important;
    letter-spacing: 0.5px;
    background-color: #0f172a !important;
    border-top: none !important;
}
.table > tbody > tr > td {
    padding: 16px !important;
    border-top: 1px solid #334155 !important;
    color: #cbd5e1;
    vertical-align: middle;
}
/* Remove all original striping to look cleaner */
.table-striped > tbody > tr:nth-of-type(odd),
.table-striped > tbody > tr:nth-of-type(even) {
    background-color: #1e293b !important;
}
.table > tbody > tr:hover {
    background-color: #334155 !important;
}

/* ==========================================================================
   Panels, Wrappers, Tabs
   ========================================================================== */
.wrapper-md, .wrapper-sm {
    background-color: transparent !important;
}
.bg-light.lter, .bg-light, .bg-white {
    background-color: transparent !important;
}
.b-b {
    border-bottom: 1px solid #334155 !important;
}
.b-t {
    border-top: 1px solid #334155 !important;
}
.b-light {
    border-color: #334155 !important;
}

/* TABS */
.nav-tabs {
    border-bottom: 1px solid #334155 !important;
}
.nav-tabs > li > a {
    color: #94a3b8;
    border-radius: 8px 8px 0 0 !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    font-weight: 500;
    margin-right: 4px;
}
.nav-tabs > li > a:hover {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
}
.nav-tabs > li.active > a, 
.nav-tabs > li.active > a:hover, 
.nav-tabs > li.active > a:focus {
    color: #3b82f6 !important;
    border-bottom: 2px solid #3b82f6 !important;
    background-color: #1e293b !important;
}
.tab-container .tab-content,
.panel {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 24px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.panel {
    border-top: 1px solid #334155 !important;
    border-radius: 12px;
}

/* Input Fields and Pagination */
.form-control {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    padding: 10px 14px;
}
.form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

.pagination > li > a, .pagination > li > span {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}
.pagination > li > a:hover {
    background-color: #334155 !important;
    color: #f8fafc !important;
}
.pagination > .active > a {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

/* Popover / Modals */
.popover {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
}
.popover-title {
    background-color: #0f172a !important;
    border-bottom: 1px solid #334155 !important;
    color: #f8fafc !important;
}
.popover-content {
    color: #cbd5e1 !important;
}
.modal-content {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    border-radius: 16px !important;
}
.modal-header {
    border-bottom: 1px solid #334155 !important;
}
.modal-footer {
    border-top: 1px solid #334155 !important;
}

/* Force transparent TD so TR background shows through */
.table-striped > tbody > tr > td {
    background-color: transparent !important;
}
.table-striped > tbody > tr:nth-child(odd),
.table-striped > tbody > tr:nth-child(even) {
    background-color: #1e293b !important;
}


/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0f172a !important; }
::-webkit-scrollbar-thumb { background: #334155 !important; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569 !important; }

/* btn-info missing */
.btn-info { background-color: #0ea5e9 !important; color: #ffffff !important; }
.btn-info:hover { background-color: #38bdf8 !important; box-shadow: 0 0 15px rgba(14, 165, 233, 0.4) !important; }

/* Table Action Buttons Spacing and Hover Disable */
.table td .btn { margin: 0 4px !important; transition: none !important; border: none !important; }
.table td .btn:hover, .table td .btn:focus, .table td .btn:active { box-shadow: none !important; transform: none !important; }
.table td .btn-info:hover, .table td .btn-info:focus { background-color: #0ea5e9 !important; }
.table td .btn-danger:hover, .table td .btn-danger:focus { background-color: #ef4444 !important; }
.table td .btn-warning:hover, .table td .btn-warning:focus { background-color: #f59e0b !important; }
.table td .btn-primary:hover, .table td .btn-primary:focus { background-color: #3b82f6 !important; }
.table td .btn-success:hover, .table td .btn-success:focus { background-color: #10b981 !important; }

/* Disable Popovers */
.popover { display: none !important; }

/* Modal Layout Constraints */
.modal-dialog { max-width: 90vw; }
.modal-body { max-height: calc(100vh - 200px); overflow-y: auto; }
.modal-body img, .modal-body .img-responsive { max-width: 100% !important; height: auto !important; max-height: 400px; object-fit: contain; }


/* Center Bootstrap Modals and improve layout */
.modal { display: flex !important; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(4px); }
.modal-dialog { margin: 0 auto !important; transform: none !important; width: 100%; max-width: 800px; }
.modal-content { background-color: #1e293b !important; border: 1px solid #334155 !important; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important; border-radius: 16px !important; padding: 15px !important; }
.modal-header { border-bottom: 1px solid #334155 !important; padding-bottom: 15px !important; margin-bottom: 15px !important; text-align: center; }
.modal-header h3, .modal-header h4 { color: #f8fafc !important; font-weight: 600 !important; margin: 0 !important; font-size: 22px !important; }
.modal-body { color: #cbd5e1 !important; font-size: 15px !important; }
.modal-body label { color: #94a3b8 !important; font-weight: 500 !important; margin-bottom: 8px !important; display: block; }
.modal-body input, .modal-body textarea, .modal-body select { background-color: #0f172a !important; border: 1px solid #334155 !important; color: #f8fafc !important; border-radius: 8px !important; padding: 10px 15px !important; width: 100%; box-sizing: border-box; }
.modal-body input:focus, .modal-body textarea:focus { border-color: #3b82f6 !important; outline: none; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }
.modal-footer { border-top: 1px solid #334155 !important; padding-top: 15px !important; margin-top: 15px !important; display: flex; justify-content: flex-end; gap: 10px; }
.modal-footer .btn { padding: 10px 20px !important; border-radius: 8px !important; font-weight: 600 !important; font-size: 15px; margin-left: 0 !important; }

