:root {
    /* Font settings - improved for better readability */
    --btcpay-font-family-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --btcpay-font-family-monospace: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --btcpay-font-size-base: 1rem;
    --btcpay-font-size-xs: 0.75rem;
    --btcpay-font-size-s: 0.875rem;
    --btcpay-font-size-m: 1rem;
    --btcpay-font-size-l: 1.25rem;
    --btcpay-font-size-xl: 1.5rem;
    --btcpay-font-weight-normal: 400;
    --btcpay-font-weight-semibold: 500;
    --btcpay-font-weight-bold: 600;

    /* Spacing settings - refined for better visual harmony */
    --btcpay-space-xs: 0.25rem;
    --btcpay-space-s: 0.5rem;
    --btcpay-space-m: 1rem;
    --btcpay-space-l: 1.5rem;
    --btcpay-space-xl: 3rem;

    /* Border radius - slightly refined for modern aesthetics */
    --btcpay-border-radius-xs: 0.125rem;
    --btcpay-border-radius-s: 0.25rem;
    --btcpay-border-radius-m: 0.375rem;
    --btcpay-border-radius-l: 0.5rem;
    --btcpay-border-radius-xl: 0.75rem;

    /* Line height */
    --btcpay-line-height-base: 1.5;
    --btcpay-line-height-tight: 1.25;

    /* --- Color Palette Inversion --- */

    /* Primary colors - Now Black-based */
    --btcpay-primary-100: #212121; /* Was white */
    --btcpay-primary-200: #1c1c1c;
    --btcpay-primary-300: #171717;
    --btcpay-primary-400: #121212;
    --btcpay-primary-500: #0d0d0d;
    --btcpay-primary-600: #0a0a0a;
    --btcpay-primary-700: #080808;
    --btcpay-primary-800: #050505;
    --btcpay-primary-900: #030303;
    --btcpay-primary-rgb: 13, 13, 13; /* Approx avg of black range */
    --btcpay-primary-accent-rgb: 5, 5, 5; /* Dark accent */
    --btcpay-primary: rgb(var(--btcpay-primary-rgb));
    --btcpay-primary-accent: rgb(var(--btcpay-primary-accent-rgb));
    --btcpay-primary-shadow: rgba(var(--btcpay-primary-rgb), .25);

    /* Neutral colors - Now White-based */
    --btcpay-neutral-50: #ffffff; /* Was black */
    --btcpay-neutral-100: #fafafa;
    --btcpay-neutral-200: #f5f5f5;
    --btcpay-neutral-300: #eeeeee;
    --btcpay-neutral-400: #e5e5e5;
    --btcpay-neutral-500: #d4d4d4;
    --btcpay-neutral-600: #c4c4c4;
    --btcpay-neutral-700: #a3a3a3;
    --btcpay-neutral-800: #8a8a8a;
    --btcpay-neutral-900: #7a7a7a; /* Adjusted end range slightly */

    /* Compatibility mapping (inverted) */
    --btcpay-neutral-dark-100: var(--btcpay-neutral-100); /* Map to light neutrals */
    --btcpay-neutral-dark-200: var(--btcpay-neutral-200);
    --btcpay-neutral-dark-300: var(--btcpay-neutral-300);
    --btcpay-neutral-dark-400: var(--btcpay-neutral-400);
    --btcpay-neutral-dark-500: var(--btcpay-neutral-500);
    --btcpay-neutral-dark-600: var(--btcpay-neutral-600);
    --btcpay-neutral-dark-700: var(--btcpay-neutral-700);
    --btcpay-neutral-dark-800: var(--btcpay-neutral-800);
    --btcpay-neutral-dark-900: var(--btcpay-neutral-900);

    /* Background colors - Now light */
    --btcpay-bg-dark: #ffffff; /* Was black */
    --btcpay-bg-tile: var(--btcpay-bg-dark);
    --btcpay-body-bg-light: #ffffff; /* Was black */
    --btcpay-body-bg-hover: #f5f5f5; /* Was dark hover */
    --btcpay-body-bg-rgb: 255, 255, 255; /* Was 0,0,0 */

    /* Text colors - Now dark */
    --btcpay-body-text: #0a0a0a; /* Was light */
    --btcpay-body-text-muted: #5a5a5a; /* Was light muted */
    --btcpay-body-text-warning-rgb: 0, 0, 0; /* Was white */
    --btcpay-body-text-rgb: 10, 10, 10; /* Was light rgb */
    --btcpay-body-link-accent: #000000; /* Was white */
    --btcpay-body-link-accent-rgb: 0, 0, 0; /* Was white rgb */

    /* Form elements - Light bg, dark text */
    --btcpay-form-bg: #f0f0f0; /* Was dark */
    --btcpay-form-text: #0a0a0a; /* Was light */
    --btcpay-form-text-label: #000000; /* Was white */
    --btcpay-form-border: #cccccc; /* Was dark border */

    /* Header and navigation - Light bg, dark text */
    --btcpay-header-bg: #ffffff; /* Was black */
    --btcpay-nav-link: #5a5a5a; /* Was light muted */
    --btcpay-nav-link-active: #000000; /* Was white */
    --btcpay-footer-link-accent: #000000; /* Was white */

    /* Other UI elements - Light bg, dark text */
    --btcpay-pre-bg: #f0f0f0; /* Was dark */
    /* --btcpay-primary-accent is now dark, defined above */
    --btcpay-secondary: #f0f0f0; /* Was dark */
    --btcpay-secondary-text-active: #000000; /* Was white */
    --btcpay-secondary-rgb: 240, 240, 240; /* Was dark rgb */

    /* Warnings and alerts - Keep warning text black/dark for visibility on light backgrounds */
    --btcpay-warning-text: #000000;
    --btcpay-warning-text-hover: #000000;
    --btcpay-warning-text-active: #000000;
    --btcpay-warning-dim-text: #333333; /* Was light dim */

    /* Shadows and accents - Adjust for light theme */
    --btcpay-light-dim-bg: #ffffff; /* Was black */
    --btcpay-light-shadow: rgba(0, 0, 0, 0.1); /* Was light shadow */
    --btcpay-light-rgb: 0, 0, 0; /* Inverted */
    --btcpay-dark-accent: #0a0a0a; /* Was light */
    --btcpay-dark-dim-bg: #ffffff; /* Was black */
    --btcpay-dark-shadow: rgba(0, 0, 0, 0.1); /* Was light shadow */
    --btcpay-dark-rgb: 10, 10, 10; /* Was light rgb */

    /* Clean focus styling - Adjust for light background */
    --focus-outline: 0 0 0 2px rgba(0, 0, 0, 0.2); /* Was white alpha */

    /* Advanced UI effects */
    --transition-standard: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --subtle-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    --depth-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Enhanced typography with improved font loading */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

/* Base font settings */
body, html {
    font-family: var(--btcpay-font-family-base) !important;
    font-size: var(--btcpay-font-size-base) !important;
    line-height: var(--btcpay-line-height-base) !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

/* Typography spacing */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0 !important;
    margin-bottom: var(--btcpay-space-m) !important;
    line-height: var(--btcpay-line-height-tight) !important;
}

/* Beautiful heading typography */
h1 {
    font-size: 2rem !important;
    letter-spacing: -0.01em !important;
    font-weight: 600 !important;
}

h2 {
    font-size: 1.75rem !important;
    letter-spacing: -0.01em !important;
    font-weight: 600 !important;
}

h3 {
    font-size: 1.5rem !important;
    letter-spacing: -0.01em !important;
    font-weight: 500 !important;
}

h4 {
    font-size: 1.25rem !important;
    letter-spacing: -0.01em !important;
    font-weight: 500 !important;
}

h5, h6 {
    font-size: 1rem !important;
    letter-spacing: 0em !important;
    font-weight: 500 !important;
}

/* Paragraph spacing */
p {
    margin-top: 0 !important;
    margin-bottom: var(--btcpay-space-m) !important;
}

/* Form controls spacing and sizing */
.form-group {
    margin-bottom: var(--btcpay-space-m) !important;
}

.form-label {
    margin-bottom: var(--btcpay-space-xs) !important;
    font-weight: var(--btcpay-font-weight-semibold) !important;
    font-size: var(--btcpay-font-size-s) !important;
    letter-spacing: 0.01em !important;
}

/* Button sizing and spacing - refined */
.btn {
    padding: 0.5rem 1.25rem !important;
    font-size: var(--btcpay-font-size-m) !important;
    line-height: var(--btcpay-line-height-base) !important;
    border-radius: var(--btcpay-border-radius-m) !important;
    transition: var(--transition-standard) !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
}

/* Card spacing - more refined */
.card {
    margin-bottom: var(--btcpay-space-m) !important;
    border-radius: var(--btcpay-border-radius-m) !important;
    transition: var(--transition-smooth) !important;
}

.card-body {
    padding: 1.25rem !important;
}

/* Layout containers */
.container, .container-fluid {
    padding-right: var(--btcpay-space-m) !important;
    padding-left: var(--btcpay-space-m) !important;
}

.row {
    margin-right: calc(-1 * var(--btcpay-space-m)) !important;
    margin-left: calc(-1 * var(--btcpay-space-m)) !important;
}

.col, [class*="col-"] {
    padding-right: var(--btcpay-space-m) !important;
    padding-left: var(--btcpay-space-m) !important;
}

/* BASIC ELEMENTS
-------------------------------------------------- */
/* Base text styling */
body {
    background-color: #ffffff !important; /* Was black */
    color: #0a0a0a !important; /* Was light */
}

a {
    color: #0a0a0a !important; /* Was light */
    transition: var(--transition-standard);
    position: relative;
}

a:hover, a:focus {
    color: #000000 !important; /* Was white */
    text-decoration: none;
}

/* Use subtle underline animation for links */
a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand):after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #000000; /* Was white */
    transform-origin: bottom right;
    transition: transform 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
    opacity: 0.7;
}

a:not(.btn):not(.nav-link):not(.dropdown-item):not(.navbar-brand):hover:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

hr {
    border-color: rgba(0, 0, 0, 0.1); /* Was light alpha */
    margin: 1.5rem 0 !important;
}

/* Clean typography */
h1, h2, h3, h4, h5, h6, .card-title {
    color: #000000 !important; /* Was white */
}

small, .text-muted {
    color: #5a5a5a !important; /* Was light muted */
}

blockquote {
    border-left: 3px solid rgba(0, 0, 0, 0.15); /* Was light alpha */
    background-color: rgba(245, 245, 245, 0.8) !important; /* Light background */
    padding: 1rem 1.25rem !important;
    margin: 1.5rem 0 !important;
    border-radius: 0 var(--btcpay-border-radius-m) var(--btcpay-border-radius-m) 0 !important;
}

code, pre {
    background-color: rgba(240, 240, 240, 0.9) !important; /* Light background */
    border: 1px solid rgba(0, 0, 0, 0.1); /* Was light alpha */
    color: #0a0a0a !important; /* Was light */
    font-family: var(--btcpay-font-family-monospace) !important;
    border-radius: var(--btcpay-border-radius-s) !important;
}

pre {
    padding: 1rem !important;
}

code {
    padding: 0.2em 0.4em !important;
}

/* COMPONENTS
-------------------------------------------------- */
/* Clean buttons */
.btn-primary,
.btn-secondary {
    border: 1px solid rgba(0, 0, 0, 0.2); /* Was light alpha */
    background-color: rgba(230, 230, 230, 0.9) !important; /* Light background */
    color: #000000 !important; /* Was white */
    font-weight: 500;
    transition: var(--transition-standard);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover,
.btn-secondary:hover {
    background-color: rgba(220, 220, 220, 0.95) !important; /* Slightly darker light */
    border-color: rgba(0, 0, 0, 0.25); /* Was light alpha */
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.btn-primary:active,
.btn-secondary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary:focus,
.btn-secondary:focus {
    box-shadow: var(--focus-outline); /* Updated focus outline color */
}

.btn-link {
    color: #0a0a0a !important; /* Was light */
    font-weight: 500;
}

.btn-link:hover {
    color: #000000 !important; /* Was white */
}

/* Success/Danger/Warning button variants - Adjust for light theme */
.btn-success {
    border-color: rgba(30, 130, 50, 0.3) !important;
    color: #155724 !important; /* Dark green text */
    background-color: #d4edda !important; /* Light green background */
}

.btn-success:hover {
    background-color: #c3e6cb !important; /* Darker light green */
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    border-color: rgba(180, 50, 50, 0.3) !important;
    color: #721c24 !important; /* Dark red text */
    background-color: #f8d7da !important; /* Light red background */
}

.btn-danger:hover {
    background-color: #f5c6cb !important; /* Darker light red */
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.btn-warning {
    border-color: rgba(200, 150, 40, 0.3) !important;
    color: #856404 !important; /* Dark yellow text */
    background-color: #fff3cd !important; /* Light yellow background */
}

.btn-warning:hover {
    background-color: #ffeeba !important; /* Darker light yellow */
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Clean cards */
.card {
    background-color: #ffffff !important; /* Was dark */
    border: 1px solid rgba(0, 0, 0, 0.1) !important; /* Was light alpha */
    transition: var(--transition-smooth);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); /* Slightly lighter shadow */
}

.card:hover {
    border-color: rgba(0, 0, 0, 0.15) !important; /* Was light alpha */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12); /* Slightly lighter shadow */
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important; /* Was light alpha */
    background-color: rgba(248, 248, 248, 0.8) !important; /* Light background */
    padding: 1rem 1.25rem !important;
}

.card-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important; /* Was light alpha */
    background-color: rgba(248, 248, 248, 0.8) !important; /* Light background */
    padding: 1rem 1.25rem !important;
}

/* Navigation with clean styling */
.nav-link {
    color: #5a5a5a !important; /* Was light muted */
    transition: var(--transition-standard);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: #0a0a0a !important; /* Was light */
}

.nav-link.active {
    color: #000000 !important; /* Was white */
    position: relative;
}

.nav-link.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 0, 0, 0.5); /* Was light alpha */
    border-radius: 1px;
}

.nav-tabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important; /* Was light alpha */
}

.nav-tabs .nav-link {
    border-radius: var(--btcpay-border-radius-m) var(--btcpay-border-radius-m) 0 0 !important;
    margin-bottom: -1px;
}

.nav-tabs .nav-link.active {
    background-color: #ffffff !important; /* Was dark */
    border-color: rgba(0, 0, 0, 0.1) !important; /* Was light alpha */
    border-bottom-color: transparent !important;
}

/* Pills navigation */
.nav-pills .nav-link.active {
    background-color: rgba(0, 0, 0, 0.08) !important; /* Was light alpha */
    border-radius: var(--btcpay-border-radius-l) !important;
}

.nav-pills .nav-link.active:after {
    display: none;
}

/* Clean badges */
.badge {
    border: 1px solid rgba(0, 0, 0, 0.15); /* Was light alpha */
    background-color: rgba(230, 230, 230, 0.95) !important; /* Light background */
    color: #0a0a0a !important; /* Was light */
    font-weight: 500;
    padding: 0.35em 0.65em !important;
    border-radius: var(--btcpay-border-radius-l) !important;
}

/* Alert styling */
.alert {
    background-color: #f8f9fa !important; /* Lighter background */
    border: 1px solid rgba(0, 0, 0, 0.1) !important; /* Was light alpha */
    color: #0a0a0a !important; /* Was light */
    border-radius: var(--btcpay-border-radius-m) !important;
    padding: 1rem 1.25rem !important;
}

/* Alert variants - Adjust for light theme */
.alert-success {
    color: #155724 !important;
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    border-left: 3px solid #28a745 !important; /* Use the standard success color */
}

.alert-danger {
    color: #721c24 !important;
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
    border-left: 3px solid #dc3545 !important; /* Use the standard danger color */
}

.alert-warning {
    color: #856404 !important;
    background-color: #fff3cd !important;
    border-color: #ffeeba !important;
    border-left: 3px solid #ffc107 !important; /* Use the standard warning color */
}

.alert-info {
    color: #0c5460 !important;
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
    border-left: 3px solid #17a2b8 !important; /* Use the standard info color */
}


/* FORMS
-------------------------------------------------- */
/* Clean form controls */
.form-control, .form-select {
    background-color: #ffffff !important; /* Was dark */
    border: 1px solid #ced4da !important; /* Standard bootstrap light border */
    color: #212529 !important; /* Standard bootstrap dark text */
    transition: var(--transition-standard);
    border-radius: var(--btcpay-border-radius-m) !important;
    padding: 0.5rem 0.75rem !important;
    height: calc(2.5em + 2px) !important; /* Adjust height if needed */
}

.form-control:focus, .form-select:focus {
    box-shadow: var(--focus-outline); /* Updated focus outline */
    border-color: #86b7fe !important; /* Standard bootstrap focus */
    background-color: #ffffff !important; /* Stay white on focus */
}

.form-control::placeholder {
    color: #6c757d !important; /* Standard bootstrap placeholder */
}

.form-control:disabled, .form-select:disabled {
    background-color: #e9ecef !important; /* Standard disabled background */
    border-color: #ced4da !important;
    color: #6c757d !important; /* Standard disabled text */
    opacity: 1; /* Override default opacity if needed */
}

.form-label {
    color: #212529 !important; /* Dark text */
    margin-bottom: 0.375rem !important;
}

.form-check {
    padding-left: 1.75rem !important;
    margin-bottom: 0.25rem !important;
}

/* Checkbox/Radio styling */
.form-check-input {
    background-color: #ffffff !important; /* Light background */
    border: 1px solid #ced4da !important; /* Light border */
    margin-left: -1.75rem !important;
}

.form-check-input:checked {
    background-color: #0d6efd !important; /* Standard Bootstrap blue for checked */
    border-color: #0d6efd !important;
}

/* Specific styling for checkbox checkmark */
.form-check-input[type="checkbox"]:checked {
     background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

/* Specific styling for radio button dot */
.form-check-input[type="radio"]:checked {
    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") !important;
}

.input-group-text {
    background-color: #e9ecef !important; /* Standard light gray */
    border: 1px solid #ced4da !important;
    color: #212529 !important; /* Dark text */
    padding: 0.5rem 0.75rem !important;
}

/* Textarea improved sizing */
textarea.form-control {
    height: auto !important;
    min-height: 100px !important;
}

/* TABLES
-------------------------------------------------- */
/* Table styling */
.table {
    color: #212529 !important; /* Dark text */
    border-color: #dee2e6 !important; /* Standard light border */
    margin-bottom: 1.5rem !important;
}

.table thead th {
    color: #212529 !important; /* Dark text */
    border-bottom: 2px solid #dee2e6 !important; /* Heavier bottom border for header */
    background-color: #f8f9fa !important; /* Very light gray background */
    padding: 0.75rem !important;
    font-weight: 500 !important;
    font-size: var(--btcpay-font-size-s) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

.table tbody tr {
    border-bottom-color: #dee2e6 !important; /* Standard light border */
    transition: var(--transition-standard);
}

.table tbody td {
    padding: 0.75rem !important;
    vertical-align: middle !important;
    border-top: 1px solid #dee2e6; /* Add top border matching bottom */
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05) !important; /* Subtle dark hover */
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.03) !important; /* Very subtle stripe */
}
.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: rgba(0, 0, 0, 0.07) !important; /* Slightly darker hover for striped rows */
}

/* Responsive tables */
.table-responsive {
    margin-bottom: 1.5rem !important;
    border-radius: var(--btcpay-border-radius-m) !important;
    overflow: hidden !important;
    /* Add border to the container for better definition */
    border: 1px solid #dee2e6;
}


/* SIDEBAR AND NAVIGATION
-------------------------------------------------- */
/* Clean sidebar styling */
.navbar-dark, /* Assuming navbar might be used in sidebar context */
.sidebar,
.sidebar-menu,
.side-menu,
#sidebar,
.nav-sidebar,
.main-sidebar {
    background-color: #f8f9fa !important; /* Light background */
    border-right: 1px solid #dee2e6; /* Standard light border */
    display: block !important;
    visibility: visible !important;
}

/* Ensure all sidebar menu items are displayed properly */
.menu-item,
.sidebar-item,
.nav-item,
.menu-link,
.sidebar a,
.sidebar-menu a,
.nav-sidebar a {
    display: flex !important;
    visibility: visible !important;
    padding: 0.5rem 1rem !important;
    margin-bottom: 0.25rem !important;
    border-radius: var(--btcpay-border-radius-m) !important;
    transition: var(--transition-standard) !important;
    color: #495057 !important; /* Slightly muted dark text for links */
}

.sidebar a:hover,
.sidebar-menu a:hover,
.nav-sidebar a:hover {
    background-color: rgba(0, 0, 0, 0.05) !important; /* Subtle dark hover */
    color: #212529 !important; /* Darker text on hover */
}

.sidebar a.active,
.sidebar-menu a.active,
.nav-sidebar a.active {
    background-color: rgba(0, 0, 0, 0.08) !important; /* Slightly darker active */
    color: #000000 !important; /* Black text for active */
    font-weight: 500;
}

/* Dropdown menus */
.dropdown-menu {
    background-color: #ffffff !important; /* White background */
    border: 1px solid rgba(0, 0, 0, 0.15) !important; /* Standard dropdown border */
    border-radius: var(--btcpay-border-radius-m) !important;
    padding: 0.5rem 0 !important;
    margin-top: 0.25rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important; /* Standard shadow */
}

.dropdown-item {
    color: #212529 !important; /* Dark text */
    padding: 0.5rem 1.25rem !important;
    transition: var(--transition-standard) !important;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: #e9ecef !important; /* Light gray hover */
    color: #000000 !important; /* Black text on hover */
}

.dropdown-divider {
    border-top: 1px solid #dee2e6 !important; /* Standard light divider */
    margin: 0.5rem 0 !important;
}

/* Navbar styling */
.navbar {
    background-color: #ffffff !important; /* White background */
    border-bottom: 1px solid #dee2e6; /* Standard light border */
    padding: 0.75rem 1rem !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

.navbar-brand {
    color: #000000 !important; /* Black text */
    font-weight: 600 !important;
    padding: 0 !important;
    margin-right: 1.5rem !important;
    letter-spacing: -0.01em !important;
}

/* Adjust navbar link colors if needed (assuming default dark links on light navbar) */
.navbar .nav-link {
    color: #495057 !important; /* Muted dark */
}
.navbar .nav-link:hover {
    color: #000000 !important; /* Black hover */
}
.navbar .nav-link.active {
    color: #000000 !important; /* Black active */
    font-weight: 500;
}

/* ICONS AND VISUAL ELEMENTS
-------------------------------------------------- */
/* Clean icons */
.fa, .fas, .far, .fab, .bi, [class^="icon-"] {
    color: #212529; /* Default dark icon color */
}
/* Adjust icon color within links or active states if needed */
a .fa, a .fas, a .far, a .fab, a .bi,
.nav-link.active .fa, .nav-link.active .fas, .nav-link.active .far, .nav-link.active .fab, .nav-link.active .bi {
    color: inherit; /* Inherit color from parent */
}


/* Progress bars */
.progress {
    background-color: #e9ecef !important; /* Light gray background */
    border: 1px solid #dee2e6 !important; /* Light border */
    height: 0.75rem !important;
    border-radius: var(--btcpay-border-radius-l) !important;
    margin-bottom: 1rem !important;
}

.progress-bar {
    background-color: #0d6efd !important; /* Standard Bootstrap blue */
}

/* MODALS AND OVERLAYS
-------------------------------------------------- */
.modal-content {
    background-color: #ffffff !important; /* White background */
    border: 1px solid rgba(0, 0, 0, 0.2) !important; /* Standard modal border */
    border-radius: var(--btcpay-border-radius-m) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important; /* Adjusted shadow */
}

.modal-header {
    border-bottom: 1px solid #dee2e6 !important; /* Standard light border */
    padding: 1.25rem !important;
}
/* Ensure header text is dark */
.modal-title {
    color: #000000 !important;
}

.modal-body {
    padding: 1.5rem !important;
    color: #212529; /* Ensure body text is dark */
}

.modal-footer {
    border-top: 1px solid #dee2e6 !important; /* Standard light border */
    padding: 1.25rem !important;
    background-color: #f8f9fa; /* Slightly off-white footer */
}

/* Modal close button */
.btn-close {
    /* Bootstrap 5 uses filter for dark mode, adjust if needed */
    filter: none !important; /* Remove dark mode filter */
    opacity: 0.75 !important;
    transition: var(--transition-standard) !important;
}
.modal-header .btn-close {
     color: #000000 !important; /* Ensure it's visible */
     background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;

}


.btn-close:hover {
    opacity: 1 !important;
}

/* Tooltip styling */
.tooltip .tooltip-inner {
    background-color: #212529 !important; /* Dark background for contrast */
    border: 1px solid #212529 !important;
    color: #ffffff !important; /* Light text */
    padding: 0.5rem 0.75rem !important;
    border-radius: var(--btcpay-border-radius-m) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.tooltip .tooltip-arrow::before {
    border-top-color: #212529 !important; /* Match tooltip background */
}
/* Adjust arrow direction colors if they exist */
.tooltip[data-popper-placement^='top'] .tooltip-arrow::before {
    border-top-color: #212529 !important;
}
.tooltip[data-popper-placement^='bottom'] .tooltip-arrow::before {
    border-bottom-color: #212529 !important;
}
.tooltip[data-popper-placement^='left'] .tooltip-arrow::before {
    border-left-color: #212529 !important;
}
.tooltip[data-popper-placement^='right'] .tooltip-arrow::before {
    border-right-color: #212529 !important;
}


/* BTCPayServer Blue Toggle Switches - Maximum Visibility Fix */

/* Target all possible toggle container classes in BTCPayServer */
.form-switch,
.form-check,
.toggle-container,
.toggle-wrapper,
.custom-switch,
.switch,
[class*="form-switch"],
[class*="toggle"],
[class*="switch"],
label.switch,
.btcpay-toggle-check {
    position: relative !important;
    display: inline-block !important;
    margin: 5px 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10 !important;
}

/* Target the checkbox input with every possible class combination */
.form-check-input[type="checkbox"],
input[type="checkbox"].form-switch-input,
input[type="checkbox"].toggle,
input[type="checkbox"].switch-input,
input[type="checkbox"].custom-switch-input,
.custom-control-input[type="checkbox"],
.switch input[type="checkbox"],
[id$="-switch"],
[class*="switch"] input[type="checkbox"],
[class*="toggle"] input[type="checkbox"],
.form-check input[type="checkbox"] {
    height: 24px !important;
    width: 48px !important;
    background-color: #ccc !important; /* Medium gray background when off */
    border: 2px solid #777 !important; /* Visible border */
    border-radius: 34px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    position: relative !important;
    cursor: pointer !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease-in-out !important;
    background-image: none !important;
    box-shadow: 0 0 5px rgba(0,0,0,0.3) !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 20 !important;
    margin-top: 0 !important;
    margin-right: 8px !important;
}

/* Ensure the handle/knob appears for all toggle types */
.form-check-input[type="checkbox"]::after,
input[type="checkbox"].form-switch-input::after,
input[type="checkbox"].toggle::after,
input[type="checkbox"].switch-input::after,
input[type="checkbox"].custom-switch-input::after,
.custom-control-input[type="checkbox"]::after,
.switch input[type="checkbox"]::after,
[id$="-switch"]::after,
[class*="switch"] input[type="checkbox"]::after,
[class*="toggle"] input[type="checkbox"]::after,
.form-check input[type="checkbox"]::after {
    content: "" !important;
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background-color: white !important;
    border: 1px solid #666 !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
    z-index: 21 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* BLUE checked state for all toggle variants */
.form-check-input[type="checkbox"]:checked,
input[type="checkbox"].form-switch-input:checked,
input[type="checkbox"].toggle:checked,
input[type="checkbox"].switch-input:checked,
input[type="checkbox"].custom-switch-input:checked,
.custom-control-input[type="checkbox"]:checked,
.switch input[type="checkbox"]:checked,
[id$="-switch"]:checked,
[class*="switch"] input[type="checkbox"]:checked,
[class*="toggle"] input[type="checkbox"]:checked,
.form-check input[type="checkbox"]:checked {
    background-color: #0d6efd !important; /* Bootstrap blue - requested by user */
    border-color: #0a58ca !important; /* Darker blue border */
    box-shadow: 0 0 8px rgba(13,110,253,0.5) !important; /* Blue glow */
}

/* Ensure handle moves when checked for all toggle variants */
.form-check-input[type="checkbox"]:checked::after,
input[type="checkbox"].form-switch-input:checked::after,
input[type="checkbox"].toggle:checked::after,
input[type="checkbox"].switch-input:checked::after,
input[type="checkbox"].custom-switch-input:checked::after,
.custom-control-input[type="checkbox"]:checked::after,
.switch input[type="checkbox"]:checked::after,
[id$="-switch"]:checked::after,
[class*="switch"] input[type="checkbox"]:checked::after,
[class*="toggle"] input[type="checkbox"]:checked::after,
.form-check input[type="checkbox"]:checked::after {
    left: calc(100% - 18px) !important;
    background-color: white !important;
}

/* Fix for Bootstrap's custom control label positioning */
.custom-control-label,
.form-check-label,
label.custom-switch,
label.form-switch,
.switch label,
label.switch {
    position: relative !important;
    margin-left: 5px !important;
    padding-left: 5px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    cursor: pointer !important;
}

/* Override any possible hiding */
.switch-group,
.toggle-group,
.form-group .form-check,
.form-group .custom-switch,
.form-group .switch,
.custom-control.custom-switch,
div:has(> input[type="checkbox"].toggle),
div:has(> input[type="checkbox"].switch-input) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix specifically for BTCPayServer settings area */
.settings-row .toggle,
.settings-row .switch,
#Settings .form-check,
#Settings .custom-switch,
.btcpay-settings-page .form-check,
.btcpay-settings-page .custom-switch,
[id*="settings"] .form-check-input,
[class*="settings"] .form-check-input {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix for disabled state */
.form-check-input[type="checkbox"]:disabled,
input[type="checkbox"].toggle:disabled,
input[type="checkbox"].switch-input:disabled {
    opacity: 0.6 !important;
    background-color: #e9ecef !important;
    cursor: not-allowed !important;
}

/* Bootstrap 5 specific overrides if needed */
.form-check-input[type="checkbox"].form-switch-input,
.form-switch .form-check-input {
    height: 24px !important;
    width: 48px !important;
    margin-left: 0 !important;
}

/* Override any background images that might be hiding the toggle */
.form-check-input[type="checkbox"],
input[type="checkbox"].toggle,
input[type="checkbox"].switch-input {
    background-image: none !important;
}

/* Ensure the toggle is visible in label */
label:has(input[type="checkbox"]) {
    display: inline-flex !important;
    align-items: center !important;
}

/* Radio buttons (Keep standard Bootstrap styling from above) */
/* .form-check-input[type="radio"] { ... } */
/* .form-check-input[type="radio"]:checked { ... } */

/* Pagination */
.pagination {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.page-link {
    background-color: #ffffff !important; /* White background */
    border: 1px solid #dee2e6 !important; /* Standard light border */
    color: #0d6efd !important; /* Blue link color */
    transition: var(--transition-standard) !important;
    margin: 0 2px !important;
    border-radius: var(--btcpay-border-radius-m) !important;
}

.page-link:hover {
    background-color: #e9ecef !important; /* Light gray hover */
    color: #0a58ca !important; /* Darker blue on hover */
    border-color: #dee2e6 !important;
    z-index: 2 !important;
}

.page-item.active .page-link {
    background-color: #0d6efd !important; /* Blue background */
    border-color: #0d6efd !important;
    color: #ffffff !important; /* White text */
    font-weight: 500 !important;
    z-index: 3 !important;
}

.page-item.disabled .page-link {
    background-color: #ffffff !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important; /* Gray disabled text */
    opacity: 0.65 !important; /* Standard disabled opacity */
    pointer-events: none;
}

/* UTILITIES AND SPECIAL EFFECTS
-------------------------------------------------- */
/* Scrollbar styling - Light theme */
::-webkit-scrollbar {
    width: 10px; /* Slightly wider */
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1; /* Light track */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #cccccc; /* Medium gray thumb */
    border-radius: 5px;
    border: 2px solid #f1f1f1; /* Creates padding around thumb */
}

::-webkit-scrollbar-thumb:hover {
    background: #aaaaaa; /* Darker gray on hover */
}

/* Focus visible styling */
:focus-visible {
    outline: none !important;
    box-shadow: var(--focus-outline) !important; /* Use updated focus outline */
}

/* Selection styling */
::selection {
    background-color: rgba(0, 123, 255, 0.25); /* Light blue selection */
    color: #000000; /* Dark text */
}

/* FOOTER HIDING
-------------------------------------------------- */
/* These rules remain the same as they target structure, not color */
body > footer,
.main-content + footer,
.footer:not(.sidebar-footer),
footer.btcpay-footer,
.footer-links:not(.sidebar-links),
#main-footer,
.footer-wrapper,
.sticky-footer {
    display: none !important;
}
h2:contains("BTCPay Server Supporters"),
h3:contains("BTCPay Server Supporters"),
div:contains("BTCPay Server Supporters"),
.btcpay-supporters,
.supporters-section,
#supporters-container,
[id*="supporters"],
[class*="supporters"] {
    display: none !important;
}
.supporters-logo-container,
.supporter-logo,
.supporter-logos,
.sponsor-logos,
.sponsors-container {
    display: none !important;
}
[id*="spiral"],
[class*="spiral"],
[id*="opensats"],
[class*="opensats"],
[id*="tether"],
[class*="tether"],
[id*="hrf"],
[class*="hrf"],
a[href*="opensats"],
a[href*="tether"],
a[href*="spiral"],
a[href*="hrf"] {
    display: none !important;
}
h5.text-center.fw-normal.mb-4 {
    display: none !important;
}
div.row.justify-content-center.mt-5 h5.text-center.fw-normal.mb-4,
div.row.justify-content-center.mt-5:has(h5.text-center.fw-normal.mb-4) {
    display: none !important;
}
p.text-center:has(a[href="https://foundation.btcpayserver.org"]),
p.text-center:has(a[href="https://btcpayserver.org/donate/"]) {
    display: none !important;
}


/* Improved styling for the Remember me switch (Keep structural rules) */
.form-check-input[type="checkbox"],
input[type="checkbox"].toggle,
.switch-input {
    position: relative !important;
    margin-right: 8px !important;
    margin-top: 0 !important;
    vertical-align: middle !important;
    display: inline-flex !important;
    align-items: center !important;
}

.form-check,
.form-switch {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.form-check label,
.form-switch label {
    margin-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
}


/* STICKY HEADER CONFIGURATION
-------------------------------------------------- */
.sticky-header,
.navbar-sticky,
.header-sticky,
#sticky-header,
.sticky-top {
    background-color: rgba(255, 255, 255, 0.95) !important; /* Light sticky background */
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    backdrop-filter: saturate(180%) blur(10px);
    transition: var(--transition-standard);
    border-bottom: 1px solid #dee2e6 !important; /* Standard light border */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Add subtle shadow */
}

/* Adjust animations and effects if needed for light theme */
@keyframes fadeIn { /* Keep fade in */
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    /* Keep background pattern hidden on mobile */
    body::before { display: none; }
    body::after { display: none; }
}

/* Smooth page transitions */
body {
    animation: fadeIn 0.3s ease-out;
}

/* Better hover states (Keep transitions) */
a, button, .btn, .nav-link, .dropdown-item {
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

/* Container spacing improvements (Keep spacing) */
main, .main, .container, .container-fluid {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* Improved spacing between sections (Keep spacing) */
section, .section {
    margin-bottom: 2.5rem !important;
}

/* Fade-in animations for key UI elements (Keep animation) */
.card, .alert, .modal-content {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Light mode selection text */
::selection {
    background: rgba(0, 123, 255, 0.25) !important; /* Light blue */
    color: #000 !important; /* Black text */
}

/* Micro-interactions for inputs */
.form-control:focus, .btn:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease !important;
}

/* Optional light background pattern - Adjust pattern color if needed */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999 !important;
    pointer-events: none;
    opacity: 0.03; /* Slightly more visible on white */
    /* Using a darker pattern for visibility on white */
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23000000' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* TOGGLE SWITCH BUG FIX - PREVENT DOUBLE CIRCLES */
body .form-check-input[type="checkbox"],
body input[type="checkbox"],
div .form-check-input[type="checkbox"],
[class*="settings"] .form-check-input[type="checkbox"],
[id*="settings"] .form-check-input[type="checkbox"],
[class*="container"] .form-check-input[type="checkbox"],
[class*="wrapper"] .form-check-input[type="checkbox"],
[class*="panel"] .form-check-input[type="checkbox"],
[class*="form"] .form-check-input[type="checkbox"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    height: 20px !important;
    width: 40px !important;
    background-color: #ccc !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 10px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    z-index: 100 !important;
    transition: all 0.2s ease-in-out !important;
    background-image: none !important;
    overflow: visible !important;
    margin: 0 8px 0 0 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    cursor: pointer !important;
}

/* CRITICAL: Disable any ::before that might be causing double circles */
body .form-check-input[type="checkbox"]::before,
body input[type="checkbox"]::before,
div .form-check-input[type="checkbox"]::before,
[class*="settings"] .form-check-input[type="checkbox"]::before,
[id*="settings"] .form-check-input[type="checkbox"]::before,
[class*="container"] .form-check-input[type="checkbox"]::before,
[class*="wrapper"] .form-check-input[type="checkbox"]::before,
[class*="panel"] .form-check-input[type="checkbox"]::before,
[class*="form"] .form-check-input[type="checkbox"]::before {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Only use ::after for the circle */
body .form-check-input[type="checkbox"]::after,
body input[type="checkbox"]::after,
div .form-check-input[type="checkbox"]::after,
[class*="settings"] .form-check-input[type="checkbox"]::after,
[id*="settings"] .form-check-input[type="checkbox"]::after,
[class*="container"] .form-check-input[type="checkbox"]::after,
[class*="wrapper"] .form-check-input[type="checkbox"]::after,
[class*="panel"] .form-check-input[type="checkbox"]::after,
[class*="form"] .form-check-input[type="checkbox"]::after {
    content: "" !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background-color: white !important;
    border: none !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
    z-index: 100 !important;
}

/* Fix for checked state */
body .form-check-input[type="checkbox"]:checked,
body input[type="checkbox"]:checked,
div .form-check-input[type="checkbox"]:checked,
[class*="settings"] .form-check-input[type="checkbox"]:checked,
[id*="settings"] .form-check-input[type="checkbox"]:checked,
[class*="container"] .form-check-input[type="checkbox"]:checked,
[class*="wrapper"] .form-check-input[type="checkbox"]:checked,
[class*="panel"] .form-check-input[type="checkbox"]:checked,
[class*="form"] .form-check-input[type="checkbox"]:checked {
    background-color: #3498db !important;
    border-color: #2980b9 !important;
}

/* Ensure only one circle by blocking any potential additional elements */
body .form-check-input[type="checkbox"]:checked::before,
body input[type="checkbox"]:checked::before,
div .form-check-input[type="checkbox"]:checked::before,
[class*="settings"] .form-check-input[type="checkbox"]:checked::before,
[id*="settings"] .form-check-input[type="checkbox"]:checked::before,
[class*="container"] .form-check-input[type="checkbox"]:checked::before,
[class*="wrapper"] .form-check-input[type="checkbox"]:checked::before,
[class*="panel"] .form-check-input[type="checkbox"]:checked::before,
[class*="form"] .form-check-input[type="checkbox"]:checked::before {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Fix handle position for checked state */
body .form-check-input[type="checkbox"]:checked::after,
body input[type="checkbox"]:checked::after,
div .form-check-input[type="checkbox"]:checked::after,
[class*="settings"] .form-check-input[type="checkbox"]:checked::after,
[id*="settings"] .form-check-input[type="checkbox"]:checked::after,
[class*="container"] .form-check-input[type="checkbox"]:checked::after,
[class*="wrapper"] .form-check-input[type="checkbox"]:checked::after,
[class*="panel"] .form-check-input[type="checkbox"]:checked::after,
[class*="form"] .form-check-input[type="checkbox"]:checked::after {
    left: calc(100% - 16px) !important;
    background-color: white !important;
}

/* Disable any other effects that might cause visual glitches */
body .form-check-input[type="checkbox"] *,
body input[type="checkbox"] *,
div .form-check-input[type="checkbox"] *,
[class*="settings"] .form-check-input[type="checkbox"] *,
[id*="settings"] .form-check-input[type="checkbox"] *,
[class*="container"] .form-check-input[type="checkbox"] *,
[class*="wrapper"] .form-check-input[type="checkbox"] *,
[class*="panel"] .form-check-input[type="checkbox"] *,
[class*="form"] .form-check-input[type="checkbox"] * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* IMPROVED SUPER-COMPACT SIDEBAR STYLING */
.navbar-dark, 
.sidebar,
.sidebar-menu,
.side-menu,
#sidebar,
.nav-sidebar,
.main-sidebar {
    background-color: #f8f9fa !important;
    border-right: 1px solid #dee2e6;
    display: block !important;
    visibility: visible !important;
    font-size: 0.9rem !important;
    width: auto !important;
    min-width: fit-content !important;
    max-width: max-content !important;
}

/* Even more compact sidebar menu items */
.menu-item,
.sidebar-item,
.nav-item,
.menu-link,
.sidebar a,
.sidebar-menu a,
.nav-sidebar a {
    display: flex !important;
    visibility: visible !important;
    padding: 0.3rem 0.75rem !important;
    margin-bottom: 0.1rem !important;
    border-radius: var(--btcpay-border-radius-m) !important;
    transition: var(--transition-standard) !important;
    color: #495057 !important;
    font-size: 0.9rem !important;
    align-items: center !important;
    white-space: nowrap !important;
}

/* Ultra-compact nested sidebar items */
.sidebar .dropdown-menu a,
.sidebar-menu .dropdown-menu a,
.nav-sidebar .dropdown-menu a,
.sidebar .submenu a,
.sidebar-menu .submenu a,
.nav-sidebar .submenu a,
.sidebar .nav-second-level a,
.sidebar-menu .nav-second-level a,
.nav-sidebar .nav-second-level a {
    font-size: 0.85rem !important;
    padding: 0.25rem 0.75rem !important;
    margin-bottom: 0.05rem !important;
}

/* Ultra-compact sidebar sections/headers */
.sidebar-header,
.nav-header,
.sidebar-heading,
.sidebar h6,
.sidebar-menu h6,
.nav-sidebar h6,
.sidebar .nav-header,
.sidebar-menu .nav-header,
[class*="sidebar"] [class*="header"],
[class*="sidebar"] [class*="heading"] {
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #6c757d !important;
    font-weight: 600 !important;
    padding: 0.4rem 0.75rem 0.1rem !important;
    margin-bottom: 0.05rem !important;
    margin-top: 0.4rem !important;
}

/* More compact sidebar section dividers */
.sidebar hr,
.sidebar-menu hr,
.nav-sidebar hr,
.sidebar .divider,
.sidebar-menu .divider,
.nav-sidebar .divider {
    margin: 0.35rem 0.5rem !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* More compact sidebar icons */
.sidebar .fas,
.sidebar .far,
.sidebar .fab,
.sidebar .fa,
.sidebar .bi,
.sidebar svg,
.sidebar-menu .fas,
.sidebar-menu .far,
.sidebar-menu .fab,
.sidebar-menu .fa,
.sidebar-menu .bi,
.sidebar-menu svg,
.nav-sidebar .fas,
.nav-sidebar .far,
.nav-sidebar .fab,
.nav-sidebar .fa,
.nav-sidebar .bi,
.nav-sidebar svg {
    margin-right: 0.4rem !important;
    font-size: 0.85rem !important;
    width: 1.1rem !important;
    text-align: center !important;
}

/* Active sidebar item - more distinct but compact */
.sidebar a.active,
.sidebar-menu a.active,
.nav-sidebar a.active,
.sidebar .active,
.sidebar-menu .active,
.nav-sidebar .active {
    background-color: rgba(0, 0, 0, 0.08) !important;
    color: #000000 !important;
    font-weight: 500 !important;
    box-shadow: inset 3px 0 0 #3498db !important; /* Left border indicator */
}