/* BestPX Cyberpunk / Neon Portal Redesign - Glassmorphism 2.0 */
/* v3.0 — Comprehensive Dark Theme with full Stisla Override */

/* 1. Base Variables & Background */
body {
    background: radial-gradient(circle at center, #111a2e 0%, #060913 100%) !important;
    background-color: #060913 !important;
    color: #e2e8f0;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

/* Base text elements */
h1, h2, h3, h4, h5, h6, .section-title {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}

.text-muted {
    color: #718096 !important;
}

/* 2. Glassmorphism 2.0 on Primary Containers */
.card, .modal-content, .dropdown-menu {
    background: rgba(17, 24, 39, 0.65) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    color: #e2e8f0;
}

.card .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.05);
    background-color: transparent;
}

body.layout-3 .navbar-bg {
    height: 115px;
    background: rgba(6, 9, 19, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,212,255,0.1);
}

/* Navbar */
.navbar-bg {
    background-color: transparent !important;
    background-image: none !important;
}

.navbar {
    background: rgba(10, 15, 26, 0.5) !important;
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.navbar .nav-link {
    color: #e2e8f0 !important;
}

.navbar .nav-link:hover {
    color: #00d4ff !important;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

/* Sidebar */
.main-sidebar {
    background: rgba(10, 15, 26, 0.85) !important;
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-right: 1px solid rgba(0, 212, 255, 0.15);
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.4);
}

.main-sidebar .sidebar-menu li a {
    color: #a0aec0;
    transition: all 0.3s ease;
}

.main-sidebar .sidebar-menu li a:hover {
    color: #fff;
    background-color: rgba(0, 212, 255, 0.05);
}

.main-sidebar .sidebar-menu li.active a {
    color: #00d4ff !important;
    font-weight: 600;
    background: rgba(0, 212, 255, 0.1) !important;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    border-left: 3px solid #00d4ff;
}

.main-sidebar .sidebar-menu li.active a::before {
    display: none;
}

/* Brand Logo */
.sidebar-brand a {
    color: #00d4ff !important;
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    text-transform: uppercase;
}

/* 3. Neon Controls (Buttons, Inputs, Badges) */
.btn-primary {
    background: #00d4ff !important;
    color: #000 !important;
    border: none !important;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.6) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-1px);
    background: #1affff !important;
}

.btn-success {
    background: #00ff88 !important;
    color: #000 !important;
    border: none !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4) !important;
    font-weight: 700;
}

.btn-success:hover {
    background: #33ff99 !important;
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.8) !important;
}

.btn-danger {
    background: #ff3366 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.4) !important;
}

.btn-secondary, .btn-light {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Form Inputs */
.form-control, .custom-select {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    border-radius: 4px;
}

.form-control:focus {
    border-color: #00d4ff !important;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-primary, .badge-info {
    background: rgba(0, 212, 255, 0.1) !important;
    color: #00d4ff !important;
    border: 1px solid #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.badge-success {
    background: rgba(0, 255, 136, 0.1) !important;
    color: #00ff88 !important;
    border: 1px solid #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.badge-warning {
    background: rgba(255, 170, 0, 0.1) !important;
    color: #ffaa00 !important;
    border: 1px solid #ffaa00;
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.badge-danger {
    background: rgba(255, 51, 102, 0.1) !important;
    color: #ff3366 !important;
    border: 1px solid #ff3366;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.3);
}

/* 4. Tables and Layout Adjustments */
.table {
    color: #e2e8f0;
}

.table th {
    border-bottom: 2px solid rgba(0, 212, 255, 0.3) !important;
    color: #00d4ff !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.table td {
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02);
}

.table-striped tbody tr:hover {
    background-color: rgba(0, 212, 255, 0.05);
}

/* Main Content Adjustments */
.section-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 20px;
}

.section-header h1 {
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* Misc Overrides */
.statistic-details-item .detail-value {
    color: #fff;
}

a {
    color: #00d4ff;
    transition: all 0.2s;
}

a:hover {
    color: #1affff;
    text-shadow: 0 0 8px rgba(0,212,255,0.6);
    text-decoration: none;
}

.list-group-item {
    background: transparent;
    border-color: rgba(255,255,255,0.05);
}

.nav-pills .nav-item .nav-link.active {
    background: #00d4ff !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

/* ==============================================================
   5. CRITICAL CONTRAST FIXES — Stisla Base Theme Overrides
   These rules fix the "invisible text" and "white-on-dark" issues
   that occur because the Stisla base theme assumes a light background.
   ============================================================== */

/* --- Form Labels (were #34395e = nearly invisible on dark bg) --- */
.form-group .control-label,
.form-group > label,
label,
.col-form-label {
    color: #cbd5e0 !important;
}

/* --- Breadcrumb Navigation (dark text on dark bg) --- */
.breadcrumb-item,
.breadcrumb-item a,
.breadcrumb-item.active,
.section-header-breadcrumb .breadcrumb-item {
    color: #a0aec0 !important;
}
.breadcrumb-item a:hover {
    color: #00d4ff !important;
}
.breadcrumb-item + .breadcrumb-item::before {
    color: #4a5568 !important;
}

/* --- Section Titles & Leads (were #191d21 = black on dark bg) --- */
.section .section-title {
    color: #fff !important;
}
.section-lead {
    color: #a0aec0 !important;
}

/* --- Card Header h4 (was #6777ef = low contrast on glassmorphism) --- */
.card .card-header h4 {
    color: #00d4ff !important;
}

/* --- Card Footer / bg-whitesmoke (was bright white #f7f9f9) --- */
.bg-whitesmoke {
    background-color: rgba(255, 255, 255, 0.05) !important;
}
.card .card-footer {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Main Footer (was inheriting white bg from Stisla) --- */
.main-footer {
    background: rgba(10, 15, 26, 0.8) !important;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    color: #718096;
}
.main-footer a {
    color: #a0aec0;
}
.main-footer a:hover {
    color: #00d4ff;
}
.footer-left,
.footer-right {
    color: #718096 !important;
}

/* --- Card Statistic Bodies (were #34395e = invisible on dark) --- */
.card.card-statistic-1 .card-body,
.card.card-statistic-2 .card-body {
    color: #fff !important;
}
.card.card-statistic-1 .card-header h4,
.card.card-statistic-2 .card-header h4 {
    color: #a0aec0 !important;
}

/* --- Dropdown Menus (need dark bg, not the Stisla white) --- */
.dropdown-menu {
    background: rgba(17, 24, 39, 0.95) !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
}
.dropdown-item {
    color: #e2e8f0 !important;
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(0, 212, 255, 0.1) !important;
    color: #00d4ff !important;
}
.dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}
.dropdown-title {
    color: #718096 !important;
}

/* --- Nav Tabs / Pills (non-active tabs invisible) --- */
.nav-pills .nav-item .nav-link {
    color: #a0aec0;
}
.nav-pills .nav-item .nav-link:hover {
    color: #00d4ff;
}
.nav-tabs .nav-link {
    color: #a0aec0;
    border-color: transparent;
}
.nav-tabs .nav-link.active {
    background-color: transparent;
    color: #00d4ff;
    border-bottom: 2px solid #00d4ff;
}
.tab-content {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

/* --- Pagination --- */
.page-item .page-link {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 212, 255, 0.15);
    color: #a0aec0;
}
.page-item.active .page-link {
    background-color: #00d4ff !important;
    border-color: #00d4ff !important;
    color: #000 !important;
}
.page-item .page-link:hover {
    background-color: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
}
.page-item.disabled .page-link {
    background-color: rgba(255, 255, 255, 0.02);
    color: #4a5568;
}

/* --- DataTables Overrides --- */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    color: #a0aec0 !important;
}

/* --- Form Control Plaintext (readonly text was black) --- */
.form-control-plaintext {
    color: #e2e8f0 !important;
}

/* --- Input Group Text --- */
.input-group-text {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(0, 212, 255, 0.2) !important;
    color: #a0aec0 !important;
}

/* --- Alert link contrast fix --- */
.alert a {
    color: #fff !important;
    text-decoration: underline;
}
.alert .close, .alert .close span {
    color: #fff !important;
}

/* --- SweetAlert2 (Popup Dialogs) --- */
.swal2-popup {
    background: rgba(17, 24, 39, 0.95) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(0, 212, 255, 0.15);
}
.swal2-title {
    color: #fff !important;
}
.swal2-content, .swal2-html-container {
    color: #a0aec0 !important;
}

/* --- Card Border Top Colors (Neon replacement for Stisla's purple) --- */
.card.card-primary {
    border-top: 2px solid #00d4ff !important;
}
.card.card-success {
    border-top: 2px solid #00ff88 !important;
}
.card.card-danger {
    border-top: 2px solid #ff3366 !important;
}
.card.card-warning {
    border-top: 2px solid #ffaa00 !important;
}
.card.card-info {
    border-top: 2px solid #3abaf4 !important;
}

/* --- Sidebar Menu Header --- */
.sidebar-menu .menu-header {
    color: #4a5568 !important;
}

/* --- Main Content Area --- */
.main-content {
    background: transparent !important;
}

/* --- Custom Scrollbar (Premium Feel) --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(6, 9, 19, 0.5);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

/* --- Comments Section Dark Override --- */
.be-comment-block {
    border-color: rgba(0, 212, 255, 0.15) !important;
    background: transparent !important;
}
.be-comment-text {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #e2e8f0 !important;
}
.comments-title {
    color: #fff !important;
}
.be-comment-name a,
.be-comment-content a {
    color: #00d4ff !important;
}
.be-comment-time {
    color: #718096 !important;
}

/* --- Pricing Cards Override (components.css white bg fix) --- */
.pricing {
    background: rgba(17, 24, 39, 0.65) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    color: #e2e8f0 !important;
}
.pricing .pricing-title {
    background-color: rgba(0, 212, 255, 0.15) !important;
    color: #00d4ff !important;
}
.pricing .pricing-price {
    color: #00d4ff !important;
}
.pricing .pricing-price div:first-child {
    color: #fff !important;
}
.pricing .pricing-padding {
    color: #e2e8f0 !important;
}
.pricing .pricing-details .pricing-item {
    color: #cbd5e0 !important;
}
.pricing .pricing-details .pricing-item .pricing-item-icon {
    background-color: #00ff88 !important;
}
.pricing .pricing-details .pricing-item .pricing-item-label {
    color: #cbd5e0 !important;
}
.pricing .pricing-cta a {
    background-color: rgba(0, 212, 255, 0.1) !important;
    color: #00d4ff !important;
    transition: all 0.3s ease;
}
.pricing .pricing-cta a:hover {
    background-color: #00d4ff !important;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}
.pricing.pricing-highlight {
    border: 1px solid #00d4ff !important;
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.2) !important;
}
.pricing.pricing-highlight .pricing-title {
    background-color: #00d4ff !important;
    color: #000 !important;
}
.pricing.pricing-highlight .pricing-cta a {
    background-color: #00d4ff !important;
    color: #000 !important;
}

/* --- Invoice Component Override --- */
.invoice {
    background: rgba(17, 24, 39, 0.65) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
    color: #e2e8f0 !important;
}
.invoice hr {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}
.invoice .invoice-detail-item .invoice-detail-value {
    color: #fff !important;
}

/* --- Activity Component Override --- */
.activities .activity .activity-detail {
    background-color: rgba(17, 24, 39, 0.65) !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    color: #e2e8f0 !important;
}
.activities .activity .activity-detail:before {
    color: rgba(17, 24, 39, 0.65) !important;
}
.activities .activity .activity-detail h4 {
    color: #fff !important;
}
.activities .activity:before {
    background-color: #00d4ff !important;
}

/* --- Ticket List Override --- */
.tickets-list .ticket-item {
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}
.tickets-list .ticket-item .ticket-info {
    color: #a0aec0 !important;
}

/* --- Wizard Steps Override --- */
.wizard-steps .wizard-step {
    background: rgba(17, 24, 39, 0.65) !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
    color: #e2e8f0 !important;
}
