/* ============================================
   💎 xez STUDIO - Premium Design System v3.0
   ============================================ */

/* ===========================================
   1. DESIGN TOKENS & CSS VARIABLES
   =========================================== */
:root {
    /* Primary Colors - Injected from PHP */
    --xez-primary: #b8d82e;
    --xez-primary-rgb: 255, 179, 0;
    --xez-secondary: #ffb300;

    /* Semantic Colors */
    --xez-success: #b8d82e;
    --xez-success-rgb: 184, 216, 46;
    --xez-warning: #b8d82e;
    --xez-danger: #ff4d4d;
    --xez-info: #7cff4d;
    --xez-logo-navy: #050a06;
    --xez-logo-blue: #b8d82e;
    --xez-logo-cyan: #b8d82e;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 25px rgba(var(--xez-primary-rgb), 0.3);

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

/* ===========================================
   2. THEME: LIGHT MODE
   =========================================== */
.theme-light,
body:not(.theme-dark) {
    --bg-body: #0d0910;
    --bg-card: #0b160d;
    --bg-card-alt: #102313;
    --bg-input: #0b160d;
    --bg-secondary: #102313;
    --text-heading: #f3ffe1;
    --text-body: #d8efc3;
    --text-muted: #a8c79a;
    --text-primary: #f3ffe1;
    --text-secondary: #d8efc3;
    --border-main: #214d2b;
    --border-light: #16351d;
    --border-color: #214d2b;
}

/* ===========================================
   3. THEME: DARK MODE (Softer, Premium Look)
   =========================================== */
.theme-dark {
    --bg-body: #050a06;
    --bg-card: #0b160d;
    --bg-card-alt: #102313;
    --bg-input: #102313;
    --bg-secondary: #102313;
    --text-heading: #f3ffe1;
    --text-body: #f4dfc3;
    --text-muted: #b9d9a9;
    --text-primary: #f3ffe1;
    --text-secondary: #f4dfc3;
    --border-main: #214d2b;
    --border-light: #16351d;
    --border-color: #214d2b;
}

/* ===========================================
   4. BASE STYLES
   =========================================== */
* {
    font-family: 'Kanit', sans-serif;
    box-sizing: border-box;
}

body {
    background: var(--bg-body) !important;
    color: var(--text-body);
    margin: 0;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-heading) !important;
    font-weight: 600;
}

p,
span,
label {
    color: var(--text-body);
}

a {
    color: var(--xez-primary);
    text-decoration: none;
}

a:hover {
    color: var(--xez-secondary);
}

hr {
    border-color: var(--border-main);
    opacity: 0.5;
}

/* ===========================================
   5. NAVBAR
   =========================================== */
.main-navbar {
    background: var(--bg-card) !important;
    border-bottom: 2px solid var(--xez-primary) !important;
    padding: 12px 0;
    transition: all 0.3s ease;
}

.theme-light .main-navbar {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.navbar-text-brand {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    color: var(--text-heading) !important;
    background: none;
    -webkit-text-fill-color: currentColor;
}

/* Strong contrast for readable text on mobile and dark backgrounds. */
.text-muted {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

.theme-light .text-muted {
    color: #d8efc3 !important;
}

.theme-dark .text-muted {
    color: #b9d9a9 !important;
}

.theme-light .text-dark {
    color: #f3ffe1 !important;
}

.theme-dark .text-dark {
    color: #f3ffe1 !important;
}

.nav-link-xez {
    color: var(--text-body) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-link-xez:hover {
    color: var(--xez-primary) !important;
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(var(--xez-primary-rgb), 0.2);
}

.nav-link-xez i {
    font-size: 1rem;
    color: var(--xez-primary);
    transition: all 0.3s ease;
}

.nav-link-xez:hover i {
    color: #fff;
    transform: scale(1.1);
}

.nav-separator {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
}

.btn-navbar-register {
    background: linear-gradient(135deg, var(--xez-primary) 0%, var(--xez-secondary) 100%);
    color: #fff !important;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(var(--xez-primary-rgb), 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.btn-navbar-register:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(var(--xez-primary-rgb), 0.5);
    color: #fff !important;
}

.dropdown-menu {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-main) !important;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    padding: 10px 15px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(var(--xez-primary-rgb), 0.1) !important;
    color: var(--xez-primary) !important;
}

.dropdown-item {
    color: var(--text-body) !important;
    padding: 10px 16px;
}

.dropdown-item:hover {
    background: rgba(var(--xez-primary-rgb), 0.1) !important;
    color: var(--xez-primary) !important;
}

/* ===========================================
   6. CARDS
   =========================================== */
.xez-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-main) !important;
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.xez-card:hover {
    border-color: var(--xez-primary) !important;
    box-shadow: var(--shadow-md);
}

/* Horizontal Category Cards */
.cat-card-horizontal {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 15px;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.cat-card-img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
}

.cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-normal);
}

.cat-card-body {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cat-card-horizontal:hover .cat-card-img img {
    transform: scale(1.1);
}

.cat-card-horizontal:hover {
    background: rgba(var(--xez-primary-rgb), 0.05) !important;
    transform: translateX(5px);
}

.cat-card-action {
    opacity: 0.5;
    transition: var(--transition-normal);
    margin-left: 10px;
}

.cat-card-horizontal:hover .cat-card-action {
    opacity: 1;
    transform: translateX(3px);
}

/* Theme-aware background utilities */
.bg-white,
.bg-light {
    background: var(--bg-card) !important;
}

.bg-light-soft,
.bg-light-alt {
    background: var(--bg-card-alt) !important;
}

/* ===========================================
   7. BUTTONS
   =========================================== */
.btn {
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    transition: var(--transition-normal);
}

.xez-btn-cyan {
    background: var(--xez-primary) !important;
    color: #fff !important;
    border: none !important;
}

.xez-btn-cyan:hover {
    background: var(--xez-secondary) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: #fff !important;
}

.xez-btn-soldout,
button.xez-btn-soldout,
a .xez-btn-soldout {
    background: #dc2626 !important;
    color: #fff !important;
    border: 1px solid #b91c1c !important;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.28);
    opacity: 1 !important;
    cursor: not-allowed;
}
.xez-btn-soldout:hover,
button.xez-btn-soldout:hover,
a .xez-btn-soldout:hover {
    background: #b91c1c !important;
    color: #fff !important;
    border-color: #991b1b !important;
    transform: none;
}

.xez-btn-outline {
    background: transparent !important;
    color: var(--xez-primary) !important;
    border: 2px solid var(--xez-primary) !important;
}

.xez-btn-outline:hover {
    background: var(--xez-primary) !important;
    color: #fff !important;
}

.btn-light {
    background: var(--bg-card-alt) !important;
    color: var(--text-body) !important;
    border: 1px solid var(--border-main) !important;
}

.btn-auth {
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 600;
}

.btn-login {
    background: var(--xez-primary) !important;
    color: #fff !important;
}

.btn-register {
    background: #1e293b !important;
    color: #fff !important;
}

.theme-dark .btn-register {
    background: var(--bg-card-alt) !important;
}

.bg-main {
    background: var(--xez-primary) !important;
}

/* ===========================================
   8. FORMS & INPUTS
   =========================================== */
.form-control,
.form-select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-main) !important;
    border-radius: var(--radius-sm) !important;
    padding: 12px 16px !important;
    color: var(--text-heading) !important;
    transition: var(--transition-fast);
}

/* Fix for Select Options Visibility */
.form-select option {
    background: var(--bg-card) !important;
    color: var(--text-heading) !important;
}

.theme-light .form-select option {
    color: #000 !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--xez-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--xez-primary-rgb), 0.15) !important;
    outline: none !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

.form-label {
    color: var(--text-body) !important;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ===========================================
   9. TABLES
   =========================================== */
.table {
    color: var(--text-body);
}

.table thead {
    background: var(--bg-card-alt) !important;
}

.table th {
    color: var(--text-muted) !important;
    font-weight: 600;
    border-bottom: 1px solid var(--border-main) !important;
}

.table td {
    border-bottom: 1px solid var(--border-light) !important;
    color: var(--text-body) !important;
}

.table-hover tbody tr:hover {
    background: rgba(var(--xez-primary-rgb), 0.03) !important;
}

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

/* ===========================================
   10. MODALS
   =========================================== */
.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-main) !important;
    border-radius: var(--radius-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-light) !important;
}

.modal-footer {
    border-top: 1px solid var(--border-light) !important;
}

.modal-title {
    color: var(--text-heading) !important;
}

/* ===========================================
   11. SIDEBAR (Admin)
   =========================================== */
.admin-sidebar {
    background: var(--bg-card) !important;
    border-right: 1px solid var(--border-main) !important;
}

.admin-sidebar .list-group-item {
    background: transparent !important;
    border: none !important;
    color: var(--text-body) !important;
    padding: 12px 20px;
    margin-bottom: 4px;
    border-radius: var(--radius-md) !important;
    transition: var(--transition-fast);
}

.admin-sidebar .list-group-item:hover {
    background: rgba(var(--xez-primary-rgb), 0.08) !important;
    color: var(--xez-primary) !important;
}

.admin-sidebar .list-group-item.active {
    background: linear-gradient(135deg, var(--xez-primary), var(--xez-secondary)) !important;
    color: #fff !important;
    box-shadow: var(--shadow-glow);
}

.admin-sidebar .list-group-item i {
    width: 24px;
    margin-right: 10px;
}

/* Admin console navigation refresh */
.admin-console .admin-sidebar { position: sticky; top: 1rem; }
.admin-sidebar-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--xez-primary, #b8d82e), var(--xez-secondary, #ffb300)); box-shadow: 0 8px 18px rgba(255, 179, 0, .2); }
.admin-menu-search .input-group-text, .admin-menu-search .form-control { color: var(--text-body, #d8efc3); border-color: var(--border-main, #214d2b); }
.admin-menu-section-title { padding: .35rem .7rem .45rem; color: var(--xez-primary, #b8d82e); font-size: .75rem; font-weight: 800; letter-spacing: .02em; }
.admin-menu-item { display: flex; align-items: center; gap: .65rem; margin: 2px 0; padding: .65rem .7rem; border: 0 !important; border-radius: 12px !important; color: var(--text-body, #d8efc3); background: transparent; transition: background-color .18s ease, color .18s ease, transform .18s ease; }
.admin-menu-item:hover { color: var(--xez-primary, #b8d82e); background: rgba(var(--xez-primary-rgb, 255, 179, 0), .1); transform: translateX(2px); }
.admin-menu-item.active { color: #fff; background: linear-gradient(135deg, var(--xez-primary, #b8d82e), var(--xez-secondary, #ffb300)); box-shadow: 0 6px 14px rgba(255, 179, 0, .18); }
.admin-menu-item.active .text-muted, .admin-menu-item.active .admin-menu-arrow { color: rgba(255,255,255,.8) !important; }
.admin-menu-item-icon { width: 30px; height: 30px; flex: 0 0 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--xez-primary, #b8d82e); background: rgba(var(--xez-primary-rgb, 255, 179, 0), .1); }
.admin-menu-item.active .admin-menu-item-icon { color: var(--xez-primary, #b8d82e); background: #fff; }
.admin-menu-arrow { color: var(--border-main, #a8c79a); font-size: .7rem; }
.admin-content-card { min-width: 0; }
.stock-empty-state { min-height: 0 !important; }
.stock-empty-icon { width: 64px; height: 64px; margin: 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 18px; color: var(--xez-primary, #b8d82e); background: rgba(var(--xez-primary-rgb, 255, 179, 0), .1); font-size: 1.6rem; }
@media (max-width: 575.98px) { .stock-empty-state { padding: 1rem !important; } .stock-empty-state .py-4 { padding-top: 2rem !important; padding-bottom: 2rem !important; } .stock-empty-state h3 { font-size: 1.15rem; } .stock-empty-state p { font-size: .85rem; } }
@media (max-width: 991.98px) { .admin-console .admin-sidebar { position: static; } .admin-content-card { min-height: auto !important; } }
@media (max-width: 575.98px) { .admin-console { padding-left: .55rem; padding-right: .55rem; } .admin-menu-item { padding: .75rem .65rem; } .admin-menu-item small { font-size: .72rem; } }

/* ===========================================
   12. STAT CARDS (Dashboard)
   =========================================== */
.stat-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-main) !important;
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--xez-primary) !important;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(var(--xez-primary-rgb), 0.1) !important;
}

.stat-icon i {
    font-size: 1.25rem;
    color: var(--xez-primary);
}

/* ===========================================
   13. BADGES
   =========================================== */
.badge {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.bg-xez-primary {
    background: var(--xez-primary) !important;
}

.text-xez-primary {
    color: var(--xez-primary) !important;
}

.bg-success-soft {
    background: rgba(var(--xez-success-rgb), 0.1) !important;
    color: var(--xez-success) !important;
}

.bg-primary-soft {
    background: rgba(var(--xez-primary-rgb), 0.1) !important;
}

/* ===========================================
   14. UTILITY CLASSES
   =========================================== */
.text-main {
    color: var(--xez-primary) !important;
}

.text-dark {
    color: var(--text-heading) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-body) !important;
}

.border {
    border-color: var(--border-main) !important;
}

.border-dashed {
    border-style: dashed !important;
}

.rounded-4 {
    border-radius: var(--radius-lg) !important;
}

.hover-up {
    transition: var(--transition-normal);
}

.hover-up:hover {
    transform: translateY(-4px);
}

.transition-all {
    transition: var(--transition-normal);
}

/* ===========================================
   15. BRANDING & LAYOUT
   =========================================== */
.xez-branding {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-main);
    padding: 60px 20px;
    text-align: center;
}

.announcement-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.announcement-icon {
    background: rgba(var(--xez-primary-rgb), 0.1);
    color: var(--xez-primary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-main);
}

/* ===========================================
   16. ANIMATIONS
   =========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(var(--xez-primary-rgb), 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(var(--xez-primary-rgb), 0.5);
    }
}

.glow-effect {
    animation: glow 2s ease-in-out infinite;
}

/* ===========================================
   17. SLIP UPLOAD
   =========================================== */
.upload-zone {
    background: var(--bg-card-alt);
    border: 2px dashed var(--border-main);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    transition: var(--transition-normal);
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--xez-primary);
    background: rgba(var(--xez-primary-rgb), 0.05);
}

/* ===========================================
   18. RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .xez-branding {
        padding: 40px 16px;
    }

    .xez-branding h1 {
        font-size: 1.75rem;
    }
}

/* ===========================================
   11. PRELOADER
   =========================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.loader-content {
    text-align: center;
}

.loader-logo img {
    width: 100px;
    height: auto;
    animation: loader-pulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(var(--xez-primary-rgb), 0.3));
}

@keyframes loader-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin: 20px auto 0;
    overflow: hidden;
    position: relative;
}

.loader-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--xez-primary), var(--xez-secondary));
    transition: width 0.3s ease;
}

.loader-text {
    color: var(--text-heading);
    letter-spacing: 2px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* ===========================================
   12. THEME ADAPTABILITY (Fixing "Mixed Colors")
   =========================================== */

/* Hero Banner Adaptability */
.theme-light .home-hero-banner {
    background: radial-gradient(circle at top, #ffffff 0%, #f4f6f8 100%) !important;
}

.theme-light .home-hero-title {
    color: var(--text-heading) !important;
    text-shadow: none !important;
}

.theme-light .home-hero-particles {
    opacity: 0.3;
}

.theme-light .home-stats-bar {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

.theme-light .home-stat-label {
    color: #64748b !important;
}

.theme-light .home-stat-icon {
    background: #f1f5f9 !important;
}

.theme-light .home-stat-icon i {
    color: #64748b !important;
}

.theme-light .home-stat-highlight .home-stat-icon {
    background: var(--xez-primary) !important;
}

.theme-light .home-stat-highlight i {
    color: #fff !important;
}

.theme-light .home-btn-outline {
    background: #ffffff !important;
    color: var(--text-body) !important;
    border: 1px solid #e2e8f0 !important;
}

.theme-light .home-btn-outline:hover {
    background: #f8fafc !important;
    color: var(--xez-primary) !important;
    border-color: var(--xez-primary) !important;
}

.theme-light .announcement-content,
.theme-light .announcement-content marquee {
    color: var(--text-body) !important;
}

.theme-light .home-announcement-bar {
    background: rgba(var(--xez-primary-rgb), 0.05) !important;
}

/* Card Adaptability */
.xez-card {
    background: var(--bg-card);
    border: 1px solid var(--border-main);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.theme-light .xez-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.theme-light .xez-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Fee & Button Styles */
.fee-flash {
    animation: fee-flash-pulse 1s infinite;
    font-weight: bold;
}

@keyframes fee-flash-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.btn-topup-confirm {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3) !important;
}

.btn-topup-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5) !important;
}

/* SweetAlert readability: keep notifications clear on dark themes and mobile screens. */
.swal2-container,
.swal2-container.swal2-backdrop-show {
    z-index: 2000 !important;
    background: rgba(2, 6, 23, 0.38) !important;
}

.swal2-popup {
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 18px !important;
    max-width: calc(100vw - 32px) !important;
}

.swal2-title {
    color: #111827 !important;
    opacity: 1 !important;
    font-weight: 700 !important;
}

.swal2-html-container {
    color: #4b5563 !important;
    opacity: 1 !important;
}

.swal2-icon.swal2-success {
    color: #16a34a !important;
    border-color: #86efac !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #16a34a !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(34, 197, 94, 0.28) !important;
}

.swal2-confirm {
    background-color: var(--xez-button, #b8d82e) !important;
    color: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
}

.swal2-cancel {
    background-color: #6b7280 !important;
    color: #ffffff !important;
    border: 0 !important;
}

@media (max-width: 576px) {
    .swal2-popup {
        width: calc(100vw - 32px) !important;
        padding: 1.25rem !important;
    }

    .swal2-icon {
        margin: 0.5rem auto 1rem !important;
    }

    .swal2-title {
        font-size: 1.35rem !important;
    }
}

/* Final contrast override for success alerts. */
body.swal2-shown .swal2-container .swal2-popup,
body.swal2-shown .swal2-container .swal2-popup .swal2-title,
body.swal2-shown .swal2-container .swal2-popup .swal2-html-container {
    opacity: 1 !important;
    filter: none !important;
}

body.swal2-shown .swal2-container .swal2-popup .swal2-title {
    color: #111827 !important;
    text-shadow: none !important;
}

body.swal2-shown .swal2-container .swal2-popup .swal2-html-container {
    color: #374151 !important;
    font-weight: 500 !important;
}

body.swal2-shown .swal2-container .swal2-popup .swal2-icon.swal2-success {
    color: #15803d !important;
    border-color: #4ade80 !important;
}

body.swal2-shown .swal2-container .swal2-popup .swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #15803d !important;
}

body.swal2-shown .swal2-container .swal2-popup .swal2-confirm {
    background: #b8d82e !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* High-contrast status alerts for every SweetAlert type. */
body.swal2-shown .swal2-container .swal2-popup .swal2-icon.swal2-error {
    color: #b91c1c !important;
    border-color: #f87171 !important;
    opacity: 1 !important;
}

body.swal2-shown .swal2-container .swal2-popup .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #b91c1c !important;
}

body.swal2-shown .swal2-container .swal2-popup .swal2-icon.swal2-warning {
    color: #b45309 !important;
    border-color: #f59e0b !important;
    opacity: 1 !important;
}

body.swal2-shown .swal2-container .swal2-popup .swal2-icon.swal2-info {
    color: #0369a1 !important;
    border-color: #7cff4d !important;
    opacity: 1 !important;
}

body.swal2-shown .swal2-container .swal2-popup .swal2-icon.swal2-question {
    color: #1d4ed8 !important;
    border-color: #60a5fa !important;
    opacity: 1 !important;
}

body.swal2-shown .swal2-container .swal2-popup .swal2-title {
    display: block !important;
    visibility: visible !important;
    color: #111827 !important;
    opacity: 1 !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}


/* OMG brand contrast fix: admin username balance badge */
.nav-user-balance {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    background: linear-gradient(135deg, #b8d82e 0%, #ffb300 100%) !important;
    color: #0b160d !important;
    border: 1px solid #ffd166 !important;
    box-shadow: 0 4px 14px rgba(255, 179, 0, 0.28) !important;
    font-weight: 800 !important;
}

.nav-user-balance:hover,
.nav-user-balance:focus {
    color: #0b160d !important;
    filter: brightness(1.08);
}

@media (max-width: 576px) {
    .nav-user-summary {
        gap: 0.35rem !important;
    }

    .nav-user-balance {
        padding: 0.28rem 0.55rem !important;
        font-size: 0.78rem !important;
    }
}


/* OMG VIP logo-matched theme: neon green, gold, and black. */
:root {
    --xez-primary: #b8d82e;
    --xez-primary-rgb: 184, 216, 46;
    --xez-secondary: #ffb300;
    --xez-success: #66d63c;
    --xez-warning: #ffb300;
    --xez-info: #7cff4d;
    --bg-body: #050a06;
    --bg-card: #0b160d;
    --bg-card-alt: #102313;
    --bg-input: #0b160d;
    --bg-secondary: #102313;
    --text-heading: #f3ffe1;
    --text-body: #d8efc3;
    --text-muted: #a8c79a;
    --text-primary: #f3ffe1;
    --text-secondary: #d8efc3;
    --border-main: #214d2b;
    --border-light: #16351d;
    --border-color: #214d2b;
}
body { background: radial-gradient(circle at 50% -10%, #173b16 0%, #050a06 42%, #020402 100%) !important; }
.main-navbar { background: rgba(5, 10, 6, .94) !important; border-bottom-color: #b8d82e !important; }
.card, .modal-content, .dropdown-menu, .offcanvas { background-color: #0b160d !important; border-color: #214d2b !important; }
.btn-primary, .btn-success, .xez-btn-cyan, .btn-login, .bg-main { background: linear-gradient(135deg, #b8d82e, #66d63c) !important; border-color: #b8d82e !important; color: #071006 !important; }
.btn-primary:hover, .btn-success:hover, .xez-btn-cyan:hover, .btn-login:hover { background: linear-gradient(135deg, #d6f54b, #ffb300) !important; color: #071006 !important; }
.xez-order-btn, .xez-detail-btn { background: linear-gradient(135deg, #ffb300, #b8d82e) !important; border-color: #ffb300 !important; color: #071006 !important; }
.form-control, .form-select { background-color: #071006 !important; border-color: #214d2b !important; color: #f3ffe1 !important; }
.form-control:focus, .form-select:focus { border-color: #b8d82e !important; box-shadow: 0 0 0 .2rem rgba(184, 216, 46, .2) !important; }

/* Force the logo-matched dark surface in both saved theme modes. */
.theme-light,
.theme-dark,
body:not(.theme-dark) { background-color: #050a06 !important; color: #d8efc3 !important; }
.theme-light .home-hero-banner,
.theme-dark .home-hero-banner { background: radial-gradient(circle at top, #102313 0%, #050a06 72%) !important; color: #f3ffe1 !important; }
.theme-light .home-stats-bar,
.theme-dark .home-stats-bar,
.theme-light .home-btn-outline,
.theme-dark .home-btn-outline,
.theme-light .announcement-content,
.theme-dark .announcement-content,
.theme-light .home-announcement-bar,
.theme-dark .home-announcement-bar { background: #0b160d !important; color: #d8efc3 !important; border-color: #214d2b !important; }
.theme-light .home-btn-outline:hover,
.theme-dark .home-btn-outline:hover { background: #102313 !important; }
.theme-light .home-stat-label,
.theme-dark .home-stat-label,
.theme-light .home-stat-icon i,
.theme-dark .home-stat-icon i { color: #b9d9a9 !important; }
.theme-light .home-hero-title,
.theme-dark .home-hero-title { color: #f3ffe1 !important; }
.theme-light .text-muted,
.theme-dark .text-muted,
.theme-light .text-dark,
.theme-dark .text-dark { color: #d8efc3 !important; }
.theme-light .xez-card,
.theme-dark .xez-card { background: #0b160d !important; border-color: #214d2b !important; }
