/* ==========================================================================
   GLOBAL DARK THEME — loaded last (from includes/footer.php) on every page
   except index.php. Solid black canvas, high-contrast light type.
   ========================================================================== */

:root {
    --bg-color: #000000;
    --bg-prime: #000000;
    --white: #0b0b11;
    --surface: #0b0b11;
    --bg-card: #0b0b11;
    --text-dark: #f5f6fa;
    --headline: #f8fafc;
    --text-primary: #f8fafc;
    --body-text: #d6d8e0;
    --text-secondary: #c3c7d1;
    --text-muted: #9aa0ae;
    --muted: #9aa0ae;
    --border-color: #232330;
    --borders: #232330;
    --primary-blue: #a5b4fc;
    --secondary-blue: #93c5fd;
    --brand: #8b93ff;
    --brand-primary: #8b93ff;
    --brand-secondary: #93c5fd;
    --brand-hover: #a5b4fc;
    --emerald: #34d399;
    --success: #34d399;
    --card-shadow: 0 6px 24px rgba(0, 0, 0, .55);
}

html {
    background-color: #000000 !important;
}

body {
    background-color: #000000 !important;
    color: #d6d8e0 !important;
}

/* ---------- Typography contrast ---------- */
h1, h2, h3, h4, h5, h6,
.panel-title, .page-title, .section-title, .card-title,
strong, b, th, legend, label {
    color: #f8fafc;
}

a { color: #a5b4fc; }
a:hover { color: #c7ccff; }

/* ---------- Form controls ---------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select, textarea {
    background-color: #101018 !important;
    color: #f1f2f6 !important;
    border: 1px solid #2a2a36 !important;
    border-radius: 10px;
    color-scheme: dark;
}
input::placeholder, textarea::placeholder { color: #7c8291 !important; }
input:focus, select:focus, textarea:focus {
    border-color: #8b93ff !important;
    box-shadow: 0 0 0 3px rgba(139, 147, 255, .22) !important;
    outline: none !important;
}
select option { background: #101018; color: #f1f2f6; }
input[type="checkbox"], input[type="radio"] { accent-color: #8b93ff; }

/* ---------- Tables ---------- */
table { border-color: #232330 !important; }
thead th, table th {
    background-color: #12121a !important;
    color: #e8eaf1 !important;
    border-color: #232330 !important;
}
tbody td, table td { border-color: #232330 !important; color: #d6d8e0; }
tbody tr:nth-child(even) { background-color: rgba(255, 255, 255, .022) !important; }
tbody tr:hover { background-color: rgba(255, 255, 255, .05) !important; }

/* ---------- Cards / panels / boxes ---------- */
.card, .panel, .box, .info-card, .stat-card, .summary-card, .order-card,
.product-card, .ticket-card, .form-card, .auth-card, .table-wrap,
.list-group-item, .accordion-item, .modal-content, .dropdown-menu {
    background-color: #0b0b11 !important;
    border-color: #232330 !important;
    color: #d6d8e0 !important;
}

hr, .divider { border-color: #232330 !important; }

/* ---------- Buttons: always clearly defined ---------- */
button, .btn, input[type="submit"], input[type="button"], .action-btn-prime,
.btn-primary, .btn-secondary, .btn-outline, .btn-buy, .btn-checkout-premium {
    border-radius: 10px;
    font-weight: 700;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
button:focus-visible, .btn:focus-visible, a:focus-visible {
    outline: 2px solid #8b93ff;
    outline-offset: 2px;
}

.btn-primary, .action-btn-prime, .btn-buy, .btn-checkout-premium,
input[type="submit"], button[type="submit"] {
    color: #ffffff !important;
}

.btn-outline, .btn-secondary, .btn-ghost {
    background-color: transparent !important;
    border: 1px solid #3a3a4a !important;
    color: #e8eaf1 !important;
}
.btn-outline:hover, .btn-secondary:hover, .btn-ghost:hover {
    background-color: rgba(139, 147, 255, .14) !important;
    border-color: #8b93ff !important;
    color: #ffffff !important;
}

/* ---------- Alerts / badges ---------- */
.alert { border-radius: 10px; }
.alert-success { background: rgba(16, 185, 129, .13) !important; color: #6ee7b7 !important; border: 1px solid rgba(16, 185, 129, .35) !important; }
.alert-danger, .alert-error { background: rgba(239, 68, 68, .13) !important; color: #fca5a5 !important; border: 1px solid rgba(239, 68, 68, .35) !important; }
.alert-warning { background: rgba(245, 158, 11, .13) !important; color: #fbbf24 !important; border: 1px solid rgba(245, 158, 11, .35) !important; }
.alert-info { background: rgba(59, 130, 246, .13) !important; color: #93c5fd !important; border: 1px solid rgba(59, 130, 246, .35) !important; }

.badge, .pill, .chip { border: 1px solid #2a2a36; }

/* ---------- Code / pre ---------- */
pre, code, kbd, samp {
    background-color: #101018 !important;
    color: #e8eaf1 !important;
    border: 1px solid #232330 !important;
    border-radius: 8px;
}
pre { overflow-x: auto; max-width: 100%; }

/* ---------- Scrollbar ---------- */
* { scrollbar-color: #2a2a36 #000000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #000000; }
::-webkit-scrollbar-thumb { background: #2a2a36; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a4a; }

::selection { background: rgba(139, 147, 255, .35); color: #ffffff; }

/* ---------- Print: keep invoices readable on paper ---------- */
@media print {
    html, body { background: #ffffff !important; color: #111111 !important; }
    .site-footer, #mainHeader, #mobileNav, .print-btn, .no-print { display: none !important; }
    * { box-shadow: none !important; text-shadow: none !important; }
    table, th, td { border-color: #cccccc !important; color: #111111 !important; background: #ffffff !important; }
    h1, h2, h3, h4, h5, h6, p, span, div, strong { color: #111111 !important; }
}
