/* Light / day theme */

[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="light"] {
    color-scheme: light;
    --bg-deep: #eef2f7;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #f8fafc;
    --border: #dbe3ef;
    --text: #1e293b;
    --text-muted: #64748b;
    --brand-navy: #1e40af;
    --accent: #d97706;
    --accent-dim: #ea580c;
    --accent-glow: rgba(234, 88, 12, 0.18);
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #ca8a04;
    --shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
    --surface-subtle: rgba(15, 23, 42, 0.04);
    --surface-border: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .app-body,
[data-theme="light"] .auth-body {
    --bs-tertiary-color: #94a3b8;
    --bs-link-hover-color: #b45309;
}

[data-theme="light"] .app-body code,
[data-theme="light"] .auth-body code {
    color: #92400e;
    background: rgba(234, 88, 12, 0.1);
}

[data-theme="light"] .app-body .form-control::placeholder,
[data-theme="light"] .auth-body .form-control::placeholder {
    color: #94a3b8;
}

/* Shell — light */
[data-theme="light"] .app-sidebar {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: -1px 0 0 var(--border);
}

[data-theme="light"] .sidebar-brand {
    border-bottom-color: var(--surface-border);
}

[data-theme="light"] .sidebar-user {
    background: var(--surface-subtle);
    border-color: var(--surface-border);
}

[data-theme="light"] .sidebar-nav .nav-link:hover {
    background: var(--surface-subtle);
}

[data-theme="light"] .sidebar-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(234, 88, 12, 0.06));
    color: var(--primary-hover);
}

[data-theme="light"] .app-topbar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 0 var(--border);
}

[data-theme="light"] .btn-topbar-icon,
[data-theme="light"] .theme-toggle {
    background: var(--bg-elevated);
    color: var(--text);
}

[data-theme="light"] .btn-topbar-icon:hover,
[data-theme="light"] .theme-toggle:hover {
    background: rgba(234, 88, 12, 0.08);
    border-color: rgba(234, 88, 12, 0.35);
    color: var(--accent-dim);
}

[data-theme="light"] .user-dropdown-menu {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .user-dropdown-body .dropdown-item:hover,
[data-theme="light"] .user-dropdown-body .dropdown-item:focus {
    background: rgba(234, 88, 12, 0.06);
}

[data-theme="light"] .placeholder-card {
    background: var(--bg-elevated);
    border-color: var(--border);
}

[data-theme="light"] .btn-outline-light {
    --bs-btn-color: var(--text);
    --bs-btn-border-color: var(--border);
    --bs-btn-hover-color: var(--text);
    --bs-btn-hover-bg: var(--surface-subtle);
    --bs-btn-hover-border-color: #cbd5e1;
}

[data-theme="light"] .table-app {
    --bs-table-striped-bg: rgba(15, 23, 42, 0.02);
    --bs-table-hover-bg: rgba(234, 88, 12, 0.05);
}

[data-theme="light"] .banner-vat {
    background: linear-gradient(90deg, rgba(22, 163, 74, 0.08), rgba(234, 88, 12, 0.06));
    border-color: rgba(22, 163, 74, 0.25);
}

[data-theme="light"] .snackbar-success {
    background: linear-gradient(135deg, #ecfdf5 0%, var(--bg-elevated) 100%);
    color: #166534;
}

[data-theme="light"] .snackbar-error {
    background: linear-gradient(135deg, #fef2f2 0%, var(--bg-elevated) 100%);
    color: #991b1b;
}

[data-theme="light"] .snackbar-warning {
    color: #92400e;
}

[data-theme="light"] .snackbar-info {
    color: #1d4ed8;
}

/* Auth — light */
[data-theme="light"] .auth-body {
    background: var(--bg-deep);
}

[data-theme="light"] .auth-hero {
    background: linear-gradient(145deg, #e0e7ff 0%, #f0f9ff 45%, #f8fafc 100%);
    border-left-color: rgba(37, 99, 235, 0.12);
}

[data-theme="light"] .auth-hero-mesh {
    background:
        radial-gradient(circle at 15% 20%, rgba(234, 88, 12, 0.12) 0%, transparent 42%),
        radial-gradient(circle at 85% 75%, rgba(37, 99, 235, 0.1) 0%, transparent 40%),
        repeating-linear-gradient(
            -12deg,
            transparent,
            transparent 48px,
            rgba(15, 23, 42, 0.02) 48px,
            rgba(15, 23, 42, 0.02) 49px
        );
}

[data-theme="light"] .auth-hero-ring {
    border-color: rgba(37, 99, 235, 0.12);
}

[data-theme="light"] .auth-hero-title {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #d97706 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="light"] .auth-hero-lead {
    color: #475569;
}

[data-theme="light"] .auth-feature-list li {
    color: #334155;
}

[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--border);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

[data-theme="light"] .auth-demo-card {
    background: var(--bg-elevated);
    border-color: var(--border);
}

[data-theme="light"] .auth-demo-card li {
    border-bottom-color: var(--surface-border);
}

[data-theme="light"] .theme-toggle--auth {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: var(--shadow);
}

[data-theme="light"] .theme-toggle--auth:hover {
    background: #fff;
    border-color: rgba(234, 88, 12, 0.4);
}

/* Theme toggle button */
.theme-toggle {
    position: relative;
}

.theme-toggle svg {
    width: 1.15rem;
    height: 1.15rem;
}

.theme-toggle .theme-icon-sun,
.theme-toggle .theme-icon-moon,
.landing-theme-btn .theme-icon-sun,
.landing-theme-btn .theme-icon-moon {
    display: block;
}

.theme-icon-hidden {
    display: none !important;
}

.theme-toggle-floating {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

[data-theme="light"] .topbar-section--end {
    gap: 0.5rem;
}
