/* ==========================================================================
   VIUCraft Dark Mode
   Activated when [data-theme="dark"] is set on the <html> element.
   Overrides design tokens from variables.css and component styles.
   ========================================================================== */

/* ==========================================================================
   1. Design Token Overrides
   ========================================================================== */

[data-theme="dark"] {
    /* Semantic Colors Overrides */
    --bg-body: #0a0f18;               /* Deepest dark */
    --bg-surface: #131a28;            /* Elevated surface */
    --bg-surface-subtle: #1c2538;     /* Hover surface */
    --text-main: #f8fafc;             /* Slate-50 */
    --text-muted: #94a3b8;            /* Slate-400 */
    --border-subtle: rgba(255, 255, 255, 0.08); 
    --border-default: rgba(255, 255, 255, 0.15); 

    /* Backgrounds (Legacy support) */
    --bg-primary: #0a0f18;
    --bg-secondary: #131a28;
    --bg-card: #131a28;
    --bg-hover: #1c2538;

    /* Text (Legacy support) */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;

    /* Borders (Legacy support) */
    --border-color: rgba(255, 255, 255, 0.15);

    /* Neutral palette (inverted for dark mode) */
    --neutral-50: #131a28;
    --neutral-100: #1c2538;
    --neutral-200: #2a3449;
    --neutral-300: #3b475e;
    --neutral-400: #475569;
    --neutral-500: #64748b;
    --neutral-600: #94a3b8;
    --neutral-700: #cbd5e1;
    --neutral-800: #e2e8f0;
    --neutral-900: #f8fafc;

    /* Shadows (heavier for dark backgrounds) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #0a0f18 0%, #131a28 50%, #0a0f18 100%);
    --gradient-surface: linear-gradient(to bottom, rgba(19, 26, 40, 1), rgba(19, 26, 40, 0.8));
    --gradient-dark: linear-gradient(145deg, #090e16 0%, #05070a 100%);
}


/* ==========================================================================
   2. Body & Global
   ========================================================================== */

[data-theme="dark"] body {
    background-color: #0f1117;
    color: #e4e4e7;
}

[data-theme="dark"] .stripe-test-banner {
    background-color: rgba(245, 158, 11, 0.15); /* Muted amber */
    color: #fcd34d; /* Amber-300 */
}


/* ==========================================================================
   3. Cards
   ========================================================================== */

[data-theme="dark"] .card {
    background-color: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .card-header {
    background-color: #1a1d2e;
    border-bottom-color: #2e3148;
}

[data-theme="dark"] .admin-card {
    background: #1e2130;
}

[data-theme="dark"] .admin-card .card-header {
    background: #1a1d2e;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .stat-card {
    background: #1e2130;
}

[data-theme="dark"] .quick-action-card {
    background: #1e2130;
    color: #d4d4d8;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .quick-action-card:hover {
    color: #d4d4d8;
}

[data-theme="dark"] .feature-card {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .pricing-card {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .operation-card {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .image-card {
    background: #1e2130;
}

[data-theme="dark"] .metric-card {
    background: #1e2130;
}

[data-theme="dark"] .register-info-card {
    background: #1e2130;
    border-color: #2e3148;
}


/* ==========================================================================
   4. Sidebar
   ========================================================================== */

[data-theme="dark"] .sidebar {
    background: linear-gradient(135deg, #0a0c14 0%, #13162a 100%);
}


/* ==========================================================================
   5. Navbar
   ========================================================================== */

[data-theme="dark"] .navbar-app {
    background: linear-gradient(135deg, #0a0c14 0%, #13162a 100%);
}

[data-theme="dark"] .navbar-app .navbar-brand {
    background-color: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .navbar-app .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.7);
}
[data-theme="dark"] .navbar-app .navbar-nav .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .navbar-public {
    background: #0f1117;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .navbar-public.navbar-transparent {
    background: transparent;
    box-shadow: none;
}

[data-theme="dark"] .navbar-public.navbar-scrolled {
    background: #0f1117;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .navbar-public .navbar-brand {
    color: #e4e4e7;
}

[data-theme="dark"] .navbar-public .navbar-brand .logo-icon {
    color: #e4e4e7;
}

[data-theme="dark"] .navbar-public .navbar-brand:hover {
    color: #e4e4e7;
}

[data-theme="dark"] .navbar-public .nav-link {
    color: #a1a1aa;
}

[data-theme="dark"] .navbar-public .nav-link:hover {
    color: var(--primary-purple);
}

[data-theme="dark"] .navbar-public .btn-outline-dark {
    border-color: #3f4363;
    color: #d4d4d8;
}

[data-theme="dark"] .navbar-public .btn-outline-dark:hover {
    background-color: #1e2130;
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}

/* Mobile navbar collapse */
@media (max-width: 991.98px) {
    [data-theme="dark"] .navbar-public .navbar-collapse {
        background: #1a1d2e;
    }
}

[data-theme="dark"] .navbar-public .navbar-toggler {
    border-color: #3f4363;
}

[data-theme="dark"] .navbar-public .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28228, 228, 231, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


/* ==========================================================================
   6. Tables
   ========================================================================== */

[data-theme="dark"] .table {
    color: #d4d4d8;
    background-color: transparent;
    --bs-table-bg: transparent;
}

[data-theme="dark"] .table > thead > tr > th {
    background-color: #1a1d2e;
    border-bottom-color: #2e3148;
    color: #a1a1aa;
}

[data-theme="dark"] .table > tbody > tr {
    background-color: transparent;
}

[data-theme="dark"] .table > tbody > tr > td {
    border-bottom-color: #2e3148;
    background-color: transparent;
}

[data-theme="dark"] .table > tbody > tr:hover {
    background-color: #252840;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02);
    --bs-table-bg-type: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) {
    background-color: transparent;
}

[data-theme="dark"] .admin-table {
    background-color: transparent;
    --bs-table-bg: transparent;
}

[data-theme="dark"] .admin-table th {
    background-color: #1a1d2e;
    border-bottom-color: #2e3148;
    color: #a1a1aa;
}

[data-theme="dark"] .admin-table td {
    border-bottom-color: #1a1d2e;
    color: #d4d4d8;
    background-color: transparent;
}

[data-theme="dark"] .admin-table tbody tr {
    background-color: transparent;
}

[data-theme="dark"] .admin-table tbody tr:hover {
    background-color: #252840;
}


/* ==========================================================================
   7. Forms
   ========================================================================== */

[data-theme="dark"] .form-control {
    background-color: #1a1d2e;
    border-color: #2e3148;
    color: #e4e4e7;
}

[data-theme="dark"] .form-control:focus {
    background-color: #1e2130;
    border-color: var(--primary-blue);
    color: #e4e4e7;
    box-shadow: 0 0 0 3px rgba(66, 104, 230, 0.2);
}

[data-theme="dark"] .form-control::placeholder {
    color: #71717a;
}

[data-theme="dark"] .form-select {
    background-color: #1a1d2e;
    border-color: #2e3148;
    color: #e4e4e7;
}

[data-theme="dark"] .form-select:focus {
    background-color: #1e2130;
    border-color: var(--primary-blue);
    color: #e4e4e7;
    box-shadow: 0 0 0 3px rgba(66, 104, 230, 0.2);
}

[data-theme="dark"] .form-check-input {
    background-color: #1a1d2e;
    border-color: #3f4363;
}

[data-theme="dark"] .form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

[data-theme="dark"] .input-group-text {
    background-color: #252840;
    border-color: #2e3148;
    color: #a1a1aa;
}

[data-theme="dark"] .form-label {
    color: #d4d4d8;
}

[data-theme="dark"] .auth-form-control {
    background-color: #1a1d2e;
    border-color: #2e3148;
    color: #e4e4e7;
}

[data-theme="dark"] .auth-form-control:focus {
    background-color: #1e2130;
    border-color: var(--primary-blue);
    color: #e4e4e7;
}

[data-theme="dark"] .auth-label {
    color: #d4d4d8;
}

[data-theme="dark"] .login-form-panel .form-check-label {
    color: var(--neutral-700);
}

[data-theme="dark"] .login-footer-link {
    color: var(--neutral-700);
}

[data-theme="dark"] .login-footer-link a {
    color: #818cf8; /* Indigo-400 */
    font-weight: 600;
}

[data-theme="dark"] .form-check-input {
    background-color: #3f4363;
    border: 1px solid #52567a;
    transition: all 0.2s;
}

[data-theme="dark"] .form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

[data-theme="dark"] .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(66, 104, 230, 0.2);
}


/* ==========================================================================
   8. Modals
   ========================================================================== */

[data-theme="dark"] .modal-content {
    background-color: #1e2130;
    border-color: #2e3148;
    color: #e4e4e7;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: #2e3148;
}

[data-theme="dark"] .modal-footer {
    border-top-color: #2e3148;
}

[data-theme="dark"] .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}


/* ==========================================================================
   9. Dropdowns
   ========================================================================== */

[data-theme="dark"] .dropdown-menu {
    background-color: #1e2130;
    border-color: #2e3148;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .dropdown-item {
    color: #d4d4d8;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: #252840;
    color: #e4e4e7;
}

[data-theme="dark"] .dropdown-divider {
    border-top-color: #2e3148;
}


/* ==========================================================================
   10. Alerts
   ========================================================================== */

[data-theme="dark"] .alert-success {
    background-color: rgba(54, 179, 126, 0.15);
    color: #5cd69a;
    border-color: rgba(54, 179, 126, 0.25);
}

[data-theme="dark"] .alert-danger {
    background-color: rgba(255, 87, 36, 0.15);
    color: #ff8866;
    border-color: rgba(255, 87, 36, 0.25);
}

[data-theme="dark"] .alert-warning {
    background-color: rgba(255, 171, 0, 0.15);
    color: #ffc44d;
    border-color: rgba(255, 171, 0, 0.25);
}

[data-theme="dark"] .alert-info {
    background-color: rgba(66, 104, 230, 0.15);
    color: #7b9ef0;
    border-color: rgba(66, 104, 230, 0.25);
}

[data-theme="dark"] .alert-custom.alert-warning {
    background-color: rgba(255, 171, 0, 0.1);
}

[data-theme="dark"] .alert-heading {
    color: #d4d4d8;
}


/* ==========================================================================
   11. Badges
   ========================================================================== */

[data-theme="dark"] .badge-primary {
    background-color: rgba(66, 104, 230, 0.2);
    color: #7b9ef0;
}

[data-theme="dark"] .badge-success {
    background-color: rgba(54, 179, 126, 0.2);
    color: #5cd69a;
}

[data-theme="dark"] .badge-danger {
    background-color: rgba(255, 87, 36, 0.2);
    color: #ff8866;
}

[data-theme="dark"] .badge-warning {
    background-color: rgba(255, 171, 0, 0.2);
    color: #ffc44d;
}


/* ==========================================================================
   12. Progress Bars
   ========================================================================== */

[data-theme="dark"] .progress {
    background-color: #252840;
}

[data-theme="dark"] .admin-progress {
    background-color: #252840;
}


/* ==========================================================================
   13. Code Blocks
   ========================================================================== */

[data-theme="dark"] code {
    background-color: rgba(113, 97, 239, 0.15);
    color: #b4a7f5;
}

[data-theme="dark"] pre {
    background-color: #0a0c14;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] pre code {
    background: none;
    color: inherit;
}

[data-theme="dark"] .operation-card code {
    background: #252840;
    color: #a1a1aa;
}

[data-theme="dark"] .audit-changes {
    background: #1a1d2e;
    color: #a1a1aa;
}


/* ==========================================================================
   14. Button Outline Variants
   ========================================================================== */

[data-theme="dark"] .btn-outline-primary {
    color: #7b9ef0;
    border-color: #7b9ef0;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #fff;
}

[data-theme="dark"] .btn-outline-secondary {
    color: #a1a1aa;
    border-color: #3f4363;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: #252840;
    border-color: #3f4363;
    color: #e4e4e7;
}

[data-theme="dark"] .btn-outline-danger {
    color: #ff8866;
    border-color: #ff8866;
}

[data-theme="dark"] .btn-outline-danger:hover {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: #fff;
}

[data-theme="dark"] .btn-outline-success {
    color: #5cd69a;
    border-color: #5cd69a;
}

[data-theme="dark"] .btn-outline-success:hover {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: #fff;
}

[data-theme="dark"] .btn-outline-warning {
    color: #ffc44d;
    border-color: #ffc44d;
}

[data-theme="dark"] .btn-outline-warning:hover {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
    color: #fff;
}

[data-theme="dark"] .btn-outline-dark {
    color: #d4d4d8;
    border-color: #3f4363;
}

[data-theme="dark"] .btn-outline-dark:hover {
    background-color: #252840;
    border-color: #3f4363;
    color: #e4e4e7;
}

[data-theme="dark"] .btn-outline-light {
    color: #a1a1aa;
    border-color: #3f4363;
}

[data-theme="dark"] .btn-outline-light:hover {
    background-color: #252840;
    border-color: #3f4363;
    color: #e4e4e7;
}


/* ==========================================================================
   15. Text Utilities
   ========================================================================== */

[data-theme="dark"] .text-muted {
    color: #71717a !important;
}

[data-theme="dark"] .text-dark {
    color: #e4e4e7 !important;
}

[data-theme="dark"] .text-body {
    color: #e4e4e7 !important;
}


/* ==========================================================================
   16. Borders
   ========================================================================== */

[data-theme="dark"] .border-bottom {
    border-bottom-color: #2e3148 !important;
}

[data-theme="dark"] .border-top {
    border-top-color: #2e3148 !important;
}

[data-theme="dark"] .border-start {
    border-left-color: #2e3148 !important;
}

[data-theme="dark"] .border-end {
    border-right-color: #2e3148 !important;
}

[data-theme="dark"] .border {
    border-color: #2e3148 !important;
}


/* ==========================================================================
   17. Scrollbars
   ========================================================================== */

[data-theme="dark"] {
    scrollbar-color: #3f4363 #0f1117;
}

[data-theme="dark"] ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #0f1117;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background-color: #3f4363;
    border-radius: 5px;
    border: 2px solid #0f1117;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background-color: #52567a;
}


/* ==========================================================================
   18. Auth Pages
   ========================================================================== */

[data-theme="dark"] .login-wrapper {
    background: var(--bg-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .login-brand-panel {
    background: linear-gradient(135deg, #0a0c14 0%, #13162a 100%);
}

[data-theme="dark"] .login-form-panel {
    background: var(--bg-secondary);
}

[data-theme="dark"] .login-form-panel h1 {
    color: #e4e4e7;
}

[data-theme="dark"] .login-form-panel .login-subtitle {
    color: #71717a;
}

[data-theme="dark"] .login-footer-link {
    color: #71717a;
}

[data-theme="dark"] .register-benefits {
    background: linear-gradient(135deg, #0a0c14 0%, #13162a 100%);
}

[data-theme="dark"] .register-header h1 {
    color: #e4e4e7;
}

[data-theme="dark"] .register-header p {
    color: #a1a1aa;
}

[data-theme="dark"] .register-header-icon {
    background: #1e2130;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .register-card {
    background: #1e2130;
}

[data-theme="dark"] .register-form-panel {
    background: #1e2130;
}

[data-theme="dark"] .register-form-panel .form-control {
    background-color: #1a1d2e;
    border-color: #2e3148;
    color: #e4e4e7;
}

[data-theme="dark"] .register-form-panel .form-label {
    color: #d4d4d8;
}

[data-theme="dark"] .register-login-link {
    color: #71717a;
}

[data-theme="dark"] .register-login-link a {
    color: #818cf8; /* Indigo-400 */
    font-weight: 600;
}


/* ==========================================================================
   19. Admin Specific
   ========================================================================== */

[data-theme="dark"] .admin-page-header h1,
[data-theme="dark"] .admin-page-header .h2 {
    color: #e4e4e7;
}

[data-theme="dark"] .admin-page-header p {
    color: #a1a1aa;
}

[data-theme="dark"] .admin-filter-bar {
    background: #1e2130;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .admin-filter-pill {
    background-color: #252840;
    color: #a1a1aa;
    border-color: #2e3148;
}

[data-theme="dark"] .admin-filter-pill:hover {
    background-color: #2e3148;
    color: #d4d4d8;
}

[data-theme="dark"] .admin-toast {
    background: #1e2130;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .action-section {
    border-color: #2e3148;
}

[data-theme="dark"] .action-section-header {
    background-color: #1a1d2e;
    border-bottom-color: #2e3148;
    color: #a1a1aa;
}

[data-theme="dark"] .form-section-title {
    color: #d4d4d8;
    border-bottom-color: #2e3148;
}

[data-theme="dark"] .empty-state-text {
    color: #71717a;
}


/* ==========================================================================
   20. Notes & Audit Timelines
   ========================================================================== */

[data-theme="dark"] .notes-timeline {
    border-left-color: #2e3148;
}

[data-theme="dark"] .note-content {
    background: #1a1d2e;
    color: #d4d4d8;
}

[data-theme="dark"] .note-icon {
    border-color: #1e2130;
    box-shadow: 0 0 0 2px #2e3148;
}

[data-theme="dark"] .audit-timeline {
    border-left-color: #2e3148;
}

[data-theme="dark"] .audit-item::before {
    border-color: #1e2130;
}


/* ==========================================================================
   21. Customer Tabs
   ========================================================================== */

[data-theme="dark"] .customer-tabs {
    border-bottom-color: #2e3148;
}

[data-theme="dark"] .customer-tabs .nav-link {
    color: #a1a1aa;
}

[data-theme="dark"] .customer-tabs .nav-link:hover {
    color: #d4d4d8;
    border-bottom-color: #3f4363;
}

[data-theme="dark"] .customer-header-info h2 {
    color: #e4e4e7;
}

[data-theme="dark"] .customer-header-info p {
    color: #a1a1aa;
}


/* ==========================================================================
   22. Documentation
   ========================================================================== */

[data-theme="dark"] .docs-header {
    background: #0f1117;
    border-bottom-color: #2e3148;
}

[data-theme="dark"] .docs-header-title {
    color: #e4e4e7;
}

[data-theme="dark"] .docs-header-search .form-control {
    background: #1a1d2e;
    border-color: #2e3148;
    color: #e4e4e7;
}

[data-theme="dark"] .docs-header-search .form-control:focus {
    background: #1e2130;
}

[data-theme="dark"] .docs-header-nav a {
    color: #a1a1aa;
}

[data-theme="dark"] .docs-header-nav a:hover {
    background: #1e2130;
    color: #e4e4e7;
}

[data-theme="dark"] .docs-header-nav a.active {
    background: rgba(113, 97, 239, 0.2);
}

[data-theme="dark"] .docs-page {
    background: #0f1117;
}

[data-theme="dark"] .docs-hero {
    background: linear-gradient(135deg, #0f1117 0%, #1a1d2e 50%, #0f1117 100%);
}

[data-theme="dark"] .docs-hero::before {
    background-image: radial-gradient(circle, #2e3148 1px, transparent 1px);
    opacity: 0.3;
}

[data-theme="dark"] .docs-hero h1 {
    color: #e4e4e7;
}

[data-theme="dark"] .docs-hero p {
    color: #a1a1aa;
}

[data-theme="dark"] .docs-article-card {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .docs-article-card h5 a {
    color: #e4e4e7;
}

[data-theme="dark"] .docs-article-card p {
    color: #a1a1aa;
}

[data-theme="dark"] .docs-stat-card {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .docs-category-card {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .docs-category-card-header {
    border-bottom-color: #2e3148;
}

[data-theme="dark"] .docs-category-card-header h5 {
    color: #e4e4e7;
}

[data-theme="dark"] .docs-category-badge {
    background: #252840;
    color: #a1a1aa;
}

[data-theme="dark"] .docs-sidebar-card {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .docs-sidebar-card-header {
    border-bottom-color: #2e3148;
}

[data-theme="dark"] .docs-sidebar-card-header h5 {
    color: #e4e4e7;
}

[data-theme="dark"] .docs-recent-item {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .docs-recent-badge {
    background: #252840;
    color: #a1a1aa;
}

[data-theme="dark"] .docs-search-box {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .docs-search-result {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .docs-search-result h5 {
    color: #e4e4e7;
}

[data-theme="dark"] .docs-toc {
    border-left-color: #2e3148;
}

[data-theme="dark"] .docs-section-title {
    color: #e4e4e7;
    border-bottom-color: #2e3148;
}

[data-theme="dark"] .docs-content h1,
[data-theme="dark"] .docs-content h2,
[data-theme="dark"] .docs-content h3 {
    color: #e4e4e7;
}

[data-theme="dark"] .docs-content p {
    color: #a1a1aa;
}

[data-theme="dark"] .docs-content ul,
[data-theme="dark"] .docs-content ol {
    color: #a1a1aa;
}

[data-theme="dark"] .docs-content table th {
    background: #1a1d2e;
    color: #d4d4d8;
    border-color: #2e3148;
}

[data-theme="dark"] .docs-content table td {
    border-color: #2e3148;
}

[data-theme="dark"] .docs-content table tr:hover td {
    background: #252840;
}

[data-theme="dark"] .docs-content img {
    border-color: #2e3148;
}

[data-theme="dark"] .docs-content blockquote {
    background: rgba(113, 97, 239, 0.08);
    color: #a1a1aa;
}

[data-theme="dark"] .docs-nav-link {
    border-color: #2e3148;
    color: #a1a1aa;
}

[data-theme="dark"] .docs-nav-link:hover {
    color: #e4e4e7;
}

[data-theme="dark"] .docs-nav-title {
    color: #d4d4d8;
}

[data-theme="dark"] .docs-feedback {
    border-top-color: #2e3148;
}

[data-theme="dark"] .docs-related {
    border-top-color: #2e3148;
}

[data-theme="dark"] .docs-nav-prev-next {
    border-top-color: #2e3148;
}

[data-theme="dark"] .audience-card.active {
    background: rgba(66, 104, 230, 0.15);
    border-color: var(--primary-blue);
}

[data-theme="dark"] .docs-back-link {
    border-color: #3f4363;
    color: #a1a1aa;
}

[data-theme="dark"] .docs-view-all {
    border-color: #2e3148;
}

[data-theme="dark"] .docs-empty {
    background: rgba(66, 104, 230, 0.1);
}

[data-theme="dark"] .docs-tag {
    background: rgba(113, 97, 239, 0.15);
}


/* ==========================================================================
   23. Homepage Sections
   ========================================================================== */

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0f1117 0%, #1a1d2e 50%, #0f1117 100%);
}

[data-theme="dark"] .hero::before {
    background-image: radial-gradient(circle, #2e3148 1px, transparent 1px);
    opacity: 0.3;
}

[data-theme="dark"] .hero .hero-subtitle {
    color: #a1a1aa;
}

[data-theme="dark"] .hero-cta .btn-outline-dark {
    border-color: #3f4363;
    color: #d4d4d8;
}

[data-theme="dark"] .hero-cta .btn-outline-dark:hover {
    background: #1e2130;
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}

[data-theme="dark"] .how-it-works {
    background: #1a1d2e;
}

[data-theme="dark"] .features-section {
    background: #0f1117;
}

[data-theme="dark"] .code-example-section {
    background: #1a1d2e;
}

[data-theme="dark"] .code-example-text h2 {
    color: #e4e4e7;
}

[data-theme="dark"] .code-example-text p {
    color: #a1a1aa;
}

[data-theme="dark"] .operations-section {
    background: #0f1117;
}

[data-theme="dark"] .pricing-section {
    background: #1a1d2e;
}

[data-theme="dark"] .section-header h2 {
    color: #e4e4e7;
}

[data-theme="dark"] .section-header p {
    color: #a1a1aa;
}


/* ==========================================================================
   24. Footer
   ========================================================================== */

[data-theme="dark"] .footer-public {
    background: linear-gradient(135deg, #070810 0%, #0e1020 100%);
}


/* ==========================================================================
   25. Bootstrap Overrides
   ========================================================================== */

[data-theme="dark"] .bg-white {
    background-color: #1e2130 !important;
}

[data-theme="dark"] .bg-light {
    background-color: #1a1d2e !important;
}

[data-theme="dark"] .list-group-item {
    background-color: #1e2130;
    border-color: #2e3148;
    color: #d4d4d8;
}

[data-theme="dark"] .list-group-item:hover {
    background-color: #252840;
}

[data-theme="dark"] .breadcrumb-item a {
    color: #a1a1aa;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: #71717a;
}

[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: #3f4363;
}

[data-theme="dark"] .page-link {
    background-color: #1e2130;
    border-color: #2e3148;
    color: #a1a1aa;
}

[data-theme="dark"] .page-link:hover {
    background-color: #252840;
    border-color: #3f4363;
    color: #e4e4e7;
}

[data-theme="dark"] .page-item.active .page-link {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

[data-theme="dark"] .page-item.disabled .page-link {
    background-color: #1a1d2e;
    border-color: #2e3148;
    color: #3f4363;
}

[data-theme="dark"] .nav-tabs {
    border-bottom-color: #2e3148;
}

[data-theme="dark"] .nav-tabs .nav-link {
    color: #a1a1aa;
}

[data-theme="dark"] .nav-tabs .nav-link:hover {
    border-color: #2e3148;
}

[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: #1e2130;
    border-color: #2e3148 #2e3148 #1e2130;
    color: #e4e4e7;
}

[data-theme="dark"] .accordion-item {
    background-color: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .accordion-button {
    background-color: #1e2130;
    color: #e4e4e7;
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #252840;
    color: #e4e4e7;
}

[data-theme="dark"] .accordion-button::after {
    filter: invert(1);
}

[data-theme="dark"] hr {
    border-color: #2e3148;
}


/* ==========================================================================
   26. Theme Toggle Button
   ========================================================================== */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    padding: 0;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Theme toggle in public navbar (light background) */
.navbar-public .theme-toggle {
    border-color: var(--neutral-300);
    color: var(--neutral-600);
}

.navbar-public .theme-toggle:hover {
    background: var(--neutral-100);
    color: var(--neutral-800);
    border-color: var(--neutral-400);
}

[data-theme="dark"] .navbar-public .theme-toggle {
    border-color: #3f4363;
    color: #a1a1aa;
}

[data-theme="dark"] .navbar-public .theme-toggle:hover {
    background: #252840;
    color: #e4e4e7;
    border-color: #3f4363;
}


/* ==========================================================================
   27. Shortcuts Help Panel
   ========================================================================== */

.shortcuts-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: shortcuts-fade-in 0.15s ease;
}

@keyframes shortcuts-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.shortcuts-panel {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 580px;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    padding: 2rem;
}

[data-theme="dark"] .shortcuts-overlay {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .shortcuts-panel {
    background: #1e2130;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.shortcuts-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--neutral-200);
}

[data-theme="dark"] .shortcuts-panel-header {
    border-bottom-color: #2e3148;
}

.shortcuts-panel-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--neutral-900);
}

[data-theme="dark"] .shortcuts-panel-header h3 {
    color: #e4e4e7;
}

.shortcuts-panel-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--neutral-500);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.shortcuts-panel-close:hover {
    color: var(--neutral-800);
}

[data-theme="dark"] .shortcuts-panel-close:hover {
    color: #e4e4e7;
}

.shortcuts-section {
    margin-bottom: 1.5rem;
}

.shortcuts-section:last-child {
    margin-bottom: 0;
}

.shortcuts-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--neutral-500);
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .shortcuts-section h4 {
    color: #71717a;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.shortcut-item:hover {
    background: var(--neutral-50);
}

[data-theme="dark"] .shortcut-item:hover {
    background: #252840;
}

.shortcut-label {
    font-size: 0.875rem;
    color: var(--neutral-700);
}

[data-theme="dark"] .shortcut-label {
    color: #a1a1aa;
}

.shortcut-keys {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.shortcut-keys span {
    font-size: 0.6875rem;
    color: #a1a1aa;
    margin: 0 0.125rem;
}

kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--neutral-700);
    background: var(--neutral-100);
    border: 1px solid var(--neutral-300);
    border-radius: 5px;
    box-shadow: 0 1px 0 var(--neutral-300);
}

[data-theme="dark"] kbd {
    color: #d4d4d8;
    background: #252840;
    border-color: #3f4363;
    box-shadow: 0 1px 0 #1a1d2e;
}

@media (max-width: 576px) {
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }

    .shortcuts-panel {
        padding: 1.5rem;
    }
}
[data-theme="dark"] .docs-mobile-sidebar-nav a:hover { background: #252840; color: #e4e4e7; }

/* ==========================================================================
   28. Additional Dark Mode Text Fixes
   ========================================================================== */

/* Documentation mobile sidebar title */
[data-theme="dark"] .docs-mobile-sidebar-header h5 {
    color: #e4e4e7;
}

/* Documentation audience cards (I am a... section) */
[data-theme="dark"] .audience-card {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .audience-card h3 {
    color: #e4e4e7;
}

[data-theme="dark"] .audience-card p {
    color: #a1a1aa;
}

/* Documentation sidebar audience links */
[data-theme="dark"] .docs-audience-link h6 {
    color: #e4e4e7;
}

[data-theme="dark"] .docs-audience-link p {
    color: #a1a1aa;
}

/* Registration page */
[data-theme="dark"] .register-header h1 {
    color: #e4e4e7;
}

[data-theme="dark"] .register-card {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .register-card-header {
    background: #1a1d2e;
    border-bottom-color: #2e3148;
}

[data-theme="dark"] .register-card-header h5 {
    color: #e4e4e7;
}

[data-theme="dark"] .register-benefits {
    background: #0f1117;
    border-right-color: #2e3148;
}

[data-theme="dark"] .register-benefits h4 {
    color: #e4e4e7;
}

[data-theme="dark"] .register-benefit-item h5 {
    color: #e4e4e7;
}

[data-theme="dark"] .register-benefit-item p {
    color: #a1a1aa;
}

[data-theme="dark"] .register-benefit-icon {
    background: #1e2130;
}

[data-theme="dark"] .register-form-panel {
    background: #1e2130;
}

[data-theme="dark"] .register-form-panel .form-label {
    color: #d4d4d8;
}

/* Registration info cards (Documentation, URL Builder, API Tester) */
[data-theme="dark"] .register-info-cards {
    padding: 0;
}

[data-theme="dark"] .register-info-card {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .register-info-card:hover {
    background: #252840;
}

[data-theme="dark"] .register-info-card h5 {
    color: #e4e4e7;
}

[data-theme="dark"] .register-info-card p {
    color: #a1a1aa;
}


/* ==========================================================================
   29. Webhook Delivery Log (wdl-* classes)
   ========================================================================== */

[data-theme="dark"] .wdl-breadcrumb .current {
    color: #e4e4e7;
}

[data-theme="dark"] .wdl-stat-card {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .wdl-filters .btn-filter {
    background: #1e2130;
    border-color: #2e3148;
    color: #d4d4d8;
}

[data-theme="dark"] .wdl-filters .btn-filter:hover {
    background: #252840;
}

[data-theme="dark"] .wdl-filters .btn-filter.active {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}

[data-theme="dark"] .wdl-table-wrap {
    background: #1e2130;
    border-color: #2e3148;
}

[data-theme="dark"] .wdl-table thead th {
    background: #1a1d2e;
    color: #a1a1aa;
    border-bottom-color: #2e3148;
}

[data-theme="dark"] .wdl-table tbody td {
    border-bottom-color: #2e3148;
    color: #d4d4d8;
    background-color: transparent;
}

[data-theme="dark"] .wdl-table tbody tr:hover {
    background: #252840;
}

[data-theme="dark"] .wdl-table tbody tr.expanded {
    background: #252840;
}

[data-theme="dark"] .wdl-detail-cell {
    background: #1a1d2e !important;
    border-bottom-color: #2e3148 !important;
}

[data-theme="dark"] .wdl-detail-error {
    background: rgba(255, 87, 36, 0.15);
    color: #ff8866;
}

[data-theme="dark"] .wdl-detail-retry {
    background: rgba(66, 104, 230, 0.15);
    color: #7b9ef0;
}

[data-theme="dark"] .wdl-expand-btn {
    color: #a1a1aa;
}

[data-theme="dark"] .wdl-expand-btn:hover {
    color: #e4e4e7;
}

[data-theme="dark"] .wdl-pagination a,
[data-theme="dark"] .wdl-pagination span {
    background: #1e2130;
    border-color: #2e3148;
    color: #a1a1aa;
}

[data-theme="dark"] .wdl-pagination a:hover {
    background: #252840;
    color: #e4e4e7;
}

[data-theme="dark"] .wdl-pagination .active {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}

[data-theme="dark"] .wdl-empty {
    color: #71717a;
}

[data-theme="dark"] .wdl-empty h5 {
    color: #d4d4d8;
}
