:root {
    --alx-primary: #45a29e;
    --alx-secondary: #66fcf1;
    --alx-bg: #0b0c10;
    --alx-text: #c5c6c7;
    --alx-border: #45a29e;
    --alx-muted: #66fcf1;
}

body {
    background-color: #0b0c10;
    color: #66fcf1;
    font-family: 'Courier New', Courier, monospace;
}

/* Header/Sidebar Overrides */
.sidebar {
    background-color: #1f2833 !important;
    border-right: 2px solid #45a29e;
}

.sidebar a {
    color: #c5c6c7 !important;
}

.sidebar a:hover {
    background-color: #0b0c10 !important;
    color: #66fcf1 !important;
    text-shadow: 0 0 5px #66fcf1;
}

/* Card Overrides */
.card {
    background-color: #1f2833;
    border: 1px solid #45a29e;
    box-shadow: 0 0 10px rgba(69, 162, 158, 0.2) !important;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #0b0c10;
    border-bottom: 1px solid #45a29e;
    color: #45a29e;
}

/* Form Controls */
.form-control,
.form-select {
    background-color: #0b0c10;
    border: 1px solid #45a29e;
    color: #c5c6c7;
}

.form-control:focus,
.form-select:focus {
    background-color: #0b0c10;
    color: #66fcf1;
    border-color: #66fcf1;
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.5);
}

/* Table Overrides */
.table {
    color: #c5c6c7;
    --bs-table-color: #c5c6c7;
    --bs-table-bg: transparent;
    --bs-table-border-color: #45a29e;
    --bs-table-striped-bg: rgba(69, 162, 158, 0.1);
    --bs-table-striped-color: #c5c6c7;
    --bs-table-active-bg: rgba(69, 162, 158, 0.2);
    --bs-table-active-color: #66fcf1;
    --bs-table-hover-bg: rgba(69, 162, 158, 0.15);
    --bs-table-hover-color: #66fcf1;
}

.table td,
.table th {
    border-color: #45a29e;
    color: #c5c6c7 !important;
    /* Force visibility */
    background-color: transparent;
    /* Let row bg show */
}

/* Explicit Bootstrap Override for Striped Rows if variables fail */
.table-striped>tbody>tr:nth-of-type(odd)>* {
    color: #c5c6c7 !important;
    background-color: rgba(69, 162, 158, 0.05) !important;
}

.table thead th {
    border-bottom: 2px solid #45a29e;
    color: #45a29e !important;
}

.table-hover tbody tr:hover {
    color: #66fcf1 !important;
    background-color: rgba(69, 162, 158, 0.1) !important;
}

/* Buttons */
.btn-primary {
    background-color: #45a29e;
    border-color: #45a29e;
    color: #0b0c10;
    font-weight: bold;
}

.btn-primary:hover {
    background-color: #66fcf1;
    border-color: #66fcf1;
    color: #0b0c10;
    box-shadow: 0 0 15px #66fcf1;
}

/* Tabs */
.nav-tabs .nav-link {
    color: #45a29e;
    border: 1px solid transparent;
}

.nav-tabs .nav-link.active {
    color: #66fcf1;
    background-color: #1f2833;
    border-color: #45a29e #45a29e #1f2833;
}

/* Alerts */
.alert-success {
    background-color: rgba(69, 162, 158, 0.2);
    border-color: #45a29e;
    color: #66fcf1;
}

/* Cyberpunk Sidebar Extras */
.cyber-sidebar {
    position: relative;
    overflow: hidden;
    background-color: #1f2833;
}

/* Ensure the sidebar text is always legible against the dark background */
.cyber-sidebar .cyber-header,
.cyber-sidebar .cyber-section h6 {
    color: #66fcf1 !important;
}

.cyber-sidebar .cyber-link {
    color: #c5c6c7 !important;
}

.cyber-sidebar .cyber-link:hover {
    color: #66fcf1 !important;
    background: rgba(102, 252, 241, 0.1) !important;
    border-left: 3px solid #66fcf1;
}

.cyber-sidebar .cyber-submenu .cyber-link {
    color: #66fcf1 !important;
    opacity: 0.85;
}

.cyber-sidebar .cyber-logo small,
.cyber-sidebar .cyber-footer small {
    color: #66fcf1 !important;
}

.cyber-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(102, 252, 241, 0.3);
    opacity: 0.5;
    animation: scanline 4s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% {
        top: -5%;
    }

    100% {
        top: 105%;
    }
}

.cyber-link {
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 0.85rem;
    color: #c5c6c7;
}

.cyber-link i {
    font-size: 1.25rem;
    min-width: 1.5rem;
    text-align: center;
    color: #66fcf1;
    filter: drop-shadow(0 0 2px #45a29e);
}

.cyber-link:hover {
    padding-left: 1.5rem !important;
    /* Visual bump */
    background: rgba(102, 252, 241, 0.1) !important;
    color: #66fcf1 !important;
    border-left: 3px solid #66fcf1;
    text-shadow: 0 0 8px #66fcf1;
}

.cyber-link:hover i {
    filter: drop-shadow(0 0 6px #66fcf1);
    color: #66fcf1 !important;
}

.glitch {
    position: relative;
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px #ff00ff, -2px -2px #00ffff;
    animation: glitch 1s infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

/* Layout & Grid */
.cyber-shell {
    background-color: #0b0c10;
    position: relative;
    min-height: 100vh;
}

.cyber-grid-overlay {
    background-image:
        linear-gradient(0deg, transparent 24%, rgba(69, 162, 158, .1) 25%, rgba(69, 162, 158, .1) 26%, transparent 27%, transparent 74%, rgba(69, 162, 158, .1) 75%, rgba(69, 162, 158, .1) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(69, 162, 158, .1) 25%, rgba(69, 162, 158, .1) 26%, transparent 27%, transparent 74%, rgba(69, 162, 158, .1) 75%, rgba(69, 162, 158, .1) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

.cyber-page-title {
    color: #66fcf1;
    text-shadow: 0 0 10px #66fcf1;
    border-bottom: 2px dashed #45a29e;
    padding-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
    font-weight: 900;
}

/* Override sidebar positioning for grid layout */
.col-md-3 .sidebar {
    position: relative !important;
    /* Force static inside column */
    min-height: 100%;
    border-right: 2px solid #66fcf1;
    background-color: rgba(31, 40, 51, 0.9) !important;
}

/* Cyberpunk Card Component */
.cyber-card {
    background: rgba(11, 12, 16, 0.95) !important;
    border: 1px solid #333 !important;
    overflow: visible;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.cyber-corner {
    position: absolute;
    width: 25px;
    height: 25px;
    border: 2px solid #66fcf1;
    z-index: 10;
    transition: all 0.3s;
    pointer-events: none;
    /* Critical: Allow clicks to pass through to inputs */
}

.cyber-card:hover .cyber-corner {
    width: 100%;
    height: 100%;
    opacity: 0.2;
}

.cyber-corner-tl {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.cyber-corner-br {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* Standardize form elements behavior - user-modify caused issues */
input,
textarea {
    user-select: text !important;
    pointer-events: auto !important;
}

select {
    user-select: none !important;
    /* Standard behavior for dropdowns */
    pointer-events: auto !important;
    cursor: pointer;
}

/* SELECT2 CYBERPUNK OVERRIDES */
/* Fix Layout in Input Group - Handled by Blade Wrapper */
/* .input-group .select2-container { ... } removed */

/* Match Input Aesthetic */
.select2-container--bootstrap-5 .select2-selection {
    background-color: #0b0c10 !important;
    border: 1px solid #45a29e !important;
    color: #c5c6c7 !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #c5c6c7 !important;
}

/* Dropdown */
.select2-container--bootstrap-5 .select2-dropdown {
    background-color: #0b0c10 !important;
    border: 1px solid #66fcf1 !important;
    color: #c5c6c7 !important;
}

/* Search Field */
.select2-container--bootstrap-5 .select2-search__field {
    background-color: #1f2833 !important;
    color: #66fcf1 !important;
    border: 1px solid #45a29e !important;
}

/* Options */
.select2-container--bootstrap-5 .select2-results__option {
    color: #c5c6c7 !important;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #45a29e !important;
    color: #0b0c10 !important;
}

/* Selected */
.select2-container--bootstrap-5 .select2-results__option[aria-selected="true"] {
    background-color: #1f2833 !important;
    color: #66fcf1 !important;
}

/* Retro Terminal Debug Bar Style */
/* Retro Terminal Debug Bar Style */
.phpdebugbar {
    font-family: 'Courier New', Courier, monospace !important;
    background-color: #000000 !important;
}

/* Main Panels */
.phpdebugbar-header,
.phpdebugbar-body,
.phpdebugbar-panel,
.phpdebugbar-dataset-title,
.phpdebugbar-widget-content,
.phpdebugbar-widgets-sqlqueries {
    background-color: #000000 !important;
    color: #33ff00 !important;
    border-color: #33ff00 !important;
}

/* Fix generic indicators */
.phpdebugbar-indicator {
    background-color: #000000 !important;
    color: #33ff00 !important;
}

/* TABS */
.phpdebugbar-tab {
    background-color: #000000 !important;
    color: #33ff00 !important;
    border-right: 1px solid #33ff00 !important;
}

/* Active/Hover Tab: High Contrast (Green BG, Black Text) */
.phpdebugbar-tab.phpdebugbar-active,
.phpdebugbar-tab:hover {
    background-color: #33ff00 !important;
    color: #000000 !important;
}

.phpdebugbar-tab.phpdebugbar-active span,
.phpdebugbar-tab.phpdebugbar-active i,
.phpdebugbar-tab:hover span,
.phpdebugbar-tab:hover i {
    color: #000000 !important;
    filter: none !important;
}

/* ICONS */
.phpdebugbar-icon {
    filter: sepia(100%) hue-rotate(50deg) saturate(500%) !important;
}

/* BADGES */
span.phpdebugbar-badge,
.phpdebugbar .phpdebugbar-badge {
    background-color: #33ff00 !important;
    color: #000000 !important;
}

/* LIST ITEMS (Generic) - Hover Effect */
.phpdebugbar-widgets-list li:hover,
.phpdebugbar-widgets-list tr:hover td {
    background-color: #33ff00 !important;
    color: #000000 !important;
}

/* Text colors inside hovered items - Default to Black */
.phpdebugbar-widgets-list li:hover *,
.phpdebugbar-widgets-list tr:hover td * {
    color: #000000 !important;
}

/* --- DATABASE / SQL TAB SPECIFIC OVERRIDES --- */

/* 1. Normal State: Black Background, Green Text */
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-list {
    background-color: #000000 !important;
}

.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-list li {
    background-color: #000000 !important;
    color: #33ff00 !important;
    border-bottom: 1px solid #1a1a1a !important;
}

.phpdebugbar-widgets-sqlqueries code,
.phpdebugbar-widgets-sqlqueries span,
.phpdebugbar-widgets-sqlqueries pre {
    background-color: transparent !important;
    color: #33ff00 !important;
}

/* 2. Highlighted Syntax (Keywords like SELECT, FROM, etc.) - Normal: White */
.phpdebugbar-widgets-sqlqueries .keyword,
.phpdebugbar-widgets-sqlqueries b,
.phpdebugbar-widgets-sqlqueries strong,
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-stmt-highlight,
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-duration,
.phpdebugbar-widgets-duration {
    color: #ffffff !important;
}

/* 3. Hover State: Green Background, Black Text */
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-list li:hover {
    background-color: #33ff00 !important;
    color: #000000 !important;
}

/* 4. Text inside Hovered Row: Default Black */
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-list li:hover code,
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-list li:hover span,
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-list li:hover pre {
    color: #000000 !important;
}

/* 5. Highlighted Syntax inside Hovered Row: BLUE */
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-list li:hover .keyword,
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-list li:hover b,
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-list li:hover strong,
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-list li:hover .phpdebugbar-widgets-stmt-highlight,
.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-list li:hover .phpdebugbar-widgets-duration {
    color: #0000ff !important;
    text-shadow: none !important;
}

/* --- RETRO ARCADE BUTTONS (Menu Items) --- */
.cyber-retro-container {
    perspective: 1000px;
}

.cyber-retro-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #0b0c10;
    border: 3px solid #1f2833;
    position: relative;
    text-decoration: none;
    transition: all 0.1s steps(4);
    box-shadow: 4px 4px 0px #000, 0 0 10px rgba(102, 252, 241, 0.1);
    image-rendering: -webkit-optimize-contrast;
}

.cyber-button-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cyber-retro-icon {
    transition: all 0.1s steps(2);
    filter: drop-shadow(0 0 2px currentColor);
}

/* Retro Pixels in corners */
.cyber-pixel {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #45a29e;
    opacity: 0.5;
}

.pixel-tl {
    top: -3px;
    left: -3px;
}

.pixel-tr {
    top: -3px;
    right: -3px;
}

.pixel-bl {
    bottom: -3px;
    left: -3px;
}

.pixel-br {
    bottom: -3px;
    right: -3px;
}

/* HOVER EFFECT: Simulation of a pressed arcade button */
.cyber-retro-button:hover {
    background: #1f2833;
    border-color: #66fcf1;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000, 0 0 20px rgba(102, 252, 241, 0.4);
}

.cyber-retro-button:hover .cyber-retro-icon {
    color: #fff !important;
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px #66fcf1);
}

.cyber-retro-button:hover .cyber-pixel {
    background: #66fcf1;
    opacity: 1;
    box-shadow: 0 0 5px #66fcf1;
}

/* ACTIVE STATE */
.cyber-retro-button.active {
    background: rgba(102, 252, 241, 0.1);
    border-color: #66fcf1;
    box-shadow: inset 0 0 10px rgba(102, 252, 241, 0.2);
}

/* RETRO BADGE (Pixel style) */
.cyber-retro-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff003c;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 10px;
    padding: 2px 5px;
    border: 2px solid #000;
    box-shadow: 2px 2px 0 #000;
    z-index: 10;
}

/* Dropdown Menu Overrides */
.dropdown-menu {
    background-color: #1f2833;
    border: 1px solid #45a29e;
}

.dropdown-item {
    color: #c5c6c7;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: #0b0c10;
    color: #66fcf1;
}

.dropdown-header {
    color: #45a29e !important;
}

/* Cyberpunk Navbar Overrides */
.alx-navbar {
    background: rgba(5, 10, 15, 0.95) !important;
    border-bottom: 1px solid #45a29e !important;
}

.alx-navbar-brand {
    color: #66fcf1 !important;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(102, 252, 241, 0.5);
}

.alx-navbar-brand:hover {
    color: #fff !important;
    text-shadow: 0 0 10px #66fcf1;
}

.alx-nav-link {
    color: #c5c6c7 !important;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    font-size: 0.8rem !important;
}

.alx-nav-link:hover {
    color: #66fcf1 !important;
    background: rgba(102, 252, 241, 0.1) !important;
    text-shadow: 0 0 5px rgba(102, 252, 241, 0.5);
}

.alx-navbar-tools a {
    color: #c5c6c7 !important;
}

.alx-navbar-tools a:hover {
    color: #66fcf1 !important;
    text-shadow: 0 0 5px rgba(102, 252, 241, 0.5);
}