:root {
    color-scheme: light;
    --be-page: #ffffff;
    --be-bg: #f1f5f9;
    --be-surface: #ffffff;
    --be-surface-2: #f8fafc;
    --be-surface-3: #f1f5f9;
    --be-border: #e2e8f0;
    --be-border-soft: #f1f5f9;
    --be-border-strong: #cbd5e1;
    --be-heading: var(--primary);
    --be-link: var(--secondary);
    --be-text-strong: #111827;
    --be-text: #1e293b;
    --be-text-body: #475569;
    --be-text-muted: #64748b;
    --be-text-faint: #94a3b8;
    --be-text-ghost: #cbd5e1;
    --be-accent-text: #047857;
    --be-accent-text-strong: #065f46;
    --be-warning-text: #92400e;
    --be-danger-text: #b91c1c;
    --be-danger-text-2: #dc2626;
    --be-info-text: #1d4ed8;
    --be-violet-text: #6d28d9;
    --be-cyan-text: #0e7490;
    --be-tint-success: #ecfdf5;
    --be-tint-success-2: #d1fae5;
    --be-tint-warning: #fffbeb;
    --be-tint-warning-2: #fef3c7;
    --be-tint-danger: #fef2f2;
    --be-tint-danger-2: #fee2e2;
    --be-tint-info: #eff6ff;
    --be-tint-info-2: #dbeafe;
    --be-tint-violet: #f5f3ff;
    --be-tint-violet-2: #ede9fe;
    --be-tint-cyan: #ecfeff;
    --be-border-success: #a7f3d0;
    --be-border-warning: #fde68a;
    --be-border-danger: #fecaca;
    --be-border-info: #bfdbfe;
    --be-input-bg: #ffffff;
    --be-overlay: rgba(15, 23, 42, 0.5);
    --be-brand-grad: linear-gradient(135deg, #0b1220 0%, #1c2534 55%, #064e3b 140%);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --be-page: #0b1120;
    --be-bg: #0b1120;
    --be-surface: #131c2e;
    --be-surface-2: #172135;
    --be-surface-3: #1c273d;
    --be-border: #263249;
    --be-border-soft: #1f2a3f;
    --be-border-strong: #364259;
    --be-heading: #f1f5f9;
    --be-link: #22d3ee;
    --be-text-strong: #f8fafc;
    --be-text: #e2e8f0;
    --be-text-body: #cbd5e1;
    --be-text-muted: #94a3b8;
    --be-text-faint: #7b889d;
    --be-text-ghost: #4b5872;
    --be-accent-text: #34d399;
    --be-accent-text-strong: #6ee7b7;
    --be-warning-text: #fbbf24;
    --be-danger-text: #fca5a5;
    --be-danger-text-2: #f87171;
    --be-info-text: #7cb3fb;
    --be-violet-text: #c4b5fd;
    --be-cyan-text: #67e8f9;
    --be-tint-success: rgba(16, 185, 129, 0.12);
    --be-tint-success-2: rgba(16, 185, 129, 0.22);
    --be-tint-warning: rgba(245, 158, 11, 0.12);
    --be-tint-warning-2: rgba(245, 158, 11, 0.2);
    --be-tint-danger: rgba(239, 68, 68, 0.12);
    --be-tint-danger-2: rgba(239, 68, 68, 0.2);
    --be-tint-info: rgba(59, 130, 246, 0.12);
    --be-tint-info-2: rgba(59, 130, 246, 0.2);
    --be-tint-violet: rgba(139, 92, 246, 0.14);
    --be-tint-violet-2: rgba(139, 92, 246, 0.22);
    --be-tint-cyan: rgba(6, 182, 212, 0.12);
    --be-border-success: rgba(52, 211, 153, 0.32);
    --be-border-warning: rgba(251, 191, 36, 0.32);
    --be-border-danger: rgba(248, 113, 113, 0.35);
    --be-border-info: rgba(96, 165, 250, 0.32);
    --be-input-bg: #0f1829;
    --be-overlay: rgba(2, 6, 15, 0.7);
    --be-brand-grad: linear-gradient(90deg, #10b981 0, #10b981 3px, #131c2e 3px);

    --text-special: #7cc4fa;
    --text-special-light: rgba(59, 130, 246, 0.12);
    --text-dark: #e2e8f0;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --gray-50: #172135;
    --gray-100: #1c273d;
    --gray-200: #263249;
    --gray-300: #364259;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.35);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.45), 0 1px 2px -1px rgb(0 0 0 / 0.45);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.45), 0 2px 4px -2px rgb(0 0 0 / 0.45);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.55), 0 8px 10px -6px rgb(0 0 0 / 0.55);

    --ca-gray-50: #172135;
    --ca-gray-100: #1c273d;
    --ca-gray-200: #263249;
    --ca-gray-300: #364259;
    --ca-gray-500: #94a3b8;
    --ca-gray-600: #cbd5e1;
    --ca-gray-800: #e2e8f0;
    --ca-text-dark: #e2e8f0;
    --ca-text-body: #cbd5e1;
    --ca-text-muted: #94a3b8;
    --ca-bg-body: #0b1120;
    --ca-border-color: #263249;
    --ca-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.45);
    --ca-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.45);
    --ca-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

html {
    background: var(--be-page);
}

.be-theme-switching *,
.be-theme-switching *::before,
.be-theme-switching *::after {
    transition: none !important;
}

:root[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
    color: var(--be-text);
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
    color: var(--be-text-faint);
}

:root[data-theme="dark"] .be-logo-light {
    display: none !important;
}

.be-logo-dark {
    display: none !important;
}

:root[data-theme="dark"] .be-logo-dark {
    display: inline-block !important;
}

:root[data-theme="dark"] .swal2-popup {
    background: var(--be-surface);
    color: var(--be-text-body);
    border: 1px solid var(--be-border);
}

:root[data-theme="dark"] .swal2-title {
    color: var(--be-text-strong);
}

:root[data-theme="dark"] .swal2-html-container,
:root[data-theme="dark"] .swal2-footer {
    color: var(--be-text-body);
    border-color: var(--be-border);
}

:root[data-theme="dark"] .swal2-input,
:root[data-theme="dark"] .swal2-textarea,
:root[data-theme="dark"] .swal2-select {
    background: var(--be-input-bg);
    color: var(--be-text);
    border-color: var(--be-border-strong);
}

:root[data-theme="dark"] .swal2-validation-message {
    background: var(--be-surface-3);
    color: var(--be-text-body);
}

:root[data-theme="dark"] .swal2-close {
    color: var(--be-text-muted);
}

:root[data-theme="dark"] .swal2-icon.swal2-success [class^="swal2-success-circular-line"],
:root[data-theme="dark"] .swal2-icon.swal2-success .swal2-success-fix {
    background: var(--be-surface) !important;
}

:root[data-theme="dark"] .swal2-container.swal2-backdrop-show {
    background: var(--be-overlay);
}

.be-theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: var(--be-surface-3);
    border: 1px solid var(--be-border);
}

.be-theme-switch-item {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--be-text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.be-theme-switch-item:hover {
    color: var(--be-text);
}

.be-theme-switch-item:focus-visible {
    outline: 2px solid var(--be-accent-text);
    outline-offset: 1px;
}

:root[data-theme-pref="light"] .be-theme-switch-item[data-theme-set="light"],
:root[data-theme-pref="dark"] .be-theme-switch-item[data-theme-set="dark"],
:root[data-theme-pref="system"] .be-theme-switch-item[data-theme-set="system"] {
    background: var(--be-surface);
    color: var(--be-text-strong);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
}

.be-theme-switch--mobile {
    display: flex;
    width: max-content;
    margin: 14px auto 0;
}

.be-theme-switch--mobile .be-theme-switch-item {
    width: 40px;
    height: 34px;
    font-size: 14px;
}
