/* Aurum Prestige — Theme mode overrides (colors via theme.js) */

.text-muted,
small.text-muted,
.text-muted.small,
p.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-body,
.text-body-secondary {
    color: var(--text-primary) !important;
}

.btn-link.text-muted {
    color: var(--text-muted) !important;
}

.btn-link.text-muted:hover,
.btn-link.text-muted:focus {
    color: var(--text-secondary) !important;
}

strong, .fw-bold, b {
    color: inherit;
}

code {
    color: var(--text-secondary);
    background: var(--primary-soft);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

/* Native inputs follow theme mode */
[data-theme-mode="light"] input[type="text"],
[data-theme-mode="light"] input[type="number"],
[data-theme-mode="light"] input[type="time"],
[data-theme-mode="light"] input[type="date"],
[data-theme-mode="light"] input[type="password"],
[data-theme-mode="light"] input[type="tel"],
[data-theme-mode="light"] select,
[data-theme-mode="light"] textarea {
    color-scheme: light;
}

[data-theme-mode="dark"] input[type="text"],
[data-theme-mode="dark"] input[type="number"],
[data-theme-mode="dark"] input[type="time"],
[data-theme-mode="dark"] input[type="date"],
[data-theme-mode="dark"] input[type="password"],
[data-theme-mode="dark"] input[type="tel"],
[data-theme-mode="dark"] select,
[data-theme-mode="dark"] textarea {
    color-scheme: dark;
}

[data-theme-mode="dark"] .form-control,
[data-theme-mode="dark"] .form-select {
    background: var(--bg-main);
    box-shadow: none;
}

[data-theme-mode="dark"] .form-control:focus,
[data-theme-mode="dark"] .form-select:focus {
    background: var(--bg-main);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-control::placeholder,
.form-select option {
    color: var(--text-muted);
    opacity: 0.85;
}

/* ─── Light theme refinements ─── */
[data-theme-mode="light"] {
    --shadow-xs: 0 1px 2px rgba(26, 35, 50, 0.04);
    --shadow-sm: 0 2px 10px rgba(26, 35, 50, 0.06);
    --shadow-md: 0 8px 28px rgba(26, 35, 50, 0.08);
    --shadow-lg: 0 18px 52px rgba(26, 35, 50, 0.1);
    --bg-overlay: rgba(26, 35, 50, 0.32);
    --bg-glass: rgba(255, 255, 255, 0.94);
}

[data-theme-mode="light"] body::before {
    background:
        radial-gradient(ellipse 85% 55% at 8% -8%, var(--primary-soft), transparent 58%),
        radial-gradient(ellipse 65% 45% at 96% 8%, rgba(37, 99, 235, 0.04), transparent 52%),
        radial-gradient(ellipse 55% 38% at 50% 108%, rgba(201, 162, 39, 0.03), transparent 48%);
}

[data-theme-mode="light"] .mesh-bg {
    opacity: 0.18;
}

[data-theme-mode="light"] .sidebar {
    box-shadow:
        0 22px 56px rgba(8, 12, 22, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    background:
        radial-gradient(ellipse 90% 50% at 100% 0%, rgba(201, 162, 39, 0.14), transparent 55%),
        linear-gradient(175deg, var(--sidebar-panel-top) 0%, var(--sidebar-panel) 42%, var(--sidebar-panel-bottom) 100%);
}

[data-theme-mode="light"] .sidebar::before {
    opacity: 1;
}

[data-theme-mode="light"] .brand-name {
    color: var(--sidebar-text);
    background: none;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

[data-theme-mode="light"] .balance-chip {
    color: var(--text-primary);
}

[data-theme-mode="light"] .balance-chip-label {
    color: var(--text-muted);
}

[data-theme-mode="light"] .price-card,
[data-theme-mode="light"] .stat-card,
[data-theme-mode="light"] .settings-card,
[data-theme-mode="light"] .table-card,
[data-theme-mode="light"] .profile-card,
[data-theme-mode="light"] .auth-card {
    box-shadow: var(--shadow-sm);
}

[data-theme-mode="light"] .price-row:not(.price-row--buy):not(.price-row--sell),
[data-theme-mode="light"] .trade-price-display,
[data-theme-mode="light"] .trade-total {
    background: var(--bg-main);
}

[data-theme-mode="light"] .price-row--buy {
    background: rgba(16, 185, 129, 0.16);
}

[data-theme-mode="light"] .price-row--sell {
    background: rgba(239, 68, 68, 0.14);
}

[data-theme-mode="light"] .nav-item.active {
    background: var(--bg-elevated);
    box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--primary-border);
}

[data-theme-mode="light"] .page-hero {
    box-shadow: var(--shadow-sm);
}

[data-theme-mode="light"] .report-user-balance strong {
    color: var(--primary-dark);
}

[data-theme-mode="light"] .btn-close {
    filter: none;
    opacity: 0.6;
}

[data-theme-mode="light"] .btn-close-white {
    filter: none;
    opacity: 0.55;
}

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

[data-theme-mode="light"] .alert-info {
    background: var(--info-soft);
    border-color: rgba(37, 99, 235, 0.22);
    color: var(--text-primary);
}

[data-theme-mode="dark"] .alert-info {
    color: var(--text-secondary);
}

[data-theme-mode="light"] .alert-danger {
    background: var(--danger-soft);
    border-color: rgba(220, 38, 38, 0.22);
    color: var(--danger);
}

[data-theme-mode="light"] .alert-success {
    background: var(--success-soft);
    border-color: rgba(5, 150, 105, 0.22);
    color: var(--success);
}

[data-theme-mode="light"] .bottom-nav {
    box-shadow: 0 -6px 28px rgba(26, 35, 50, 0.06);
    background-color: var(--bg-card);
}

[data-theme-mode="light"] .bottom-nav::after {
    background-color: var(--bg-card);
}

[data-theme-mode="light"] .top-bar {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-xs);
}

[data-theme-mode="light"] .table-dark thead th {
    background: var(--bg-main);
}

[data-theme-mode="light"] .table-dark tbody tr:nth-child(even) {
    background: rgba(26, 35, 50, 0.02);
}

[data-theme-mode="light"] .modal-backdrop.show {
    opacity: 0.35;
}

[data-theme-mode="light"] .theme-preset-mode.mode-dark {
    background: rgba(26, 35, 50, 0.08);
}

[data-theme-mode="light"] .theme-preset-mode.mode-light {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

/* ─── Dark theme depth ─── */
[data-theme-mode="dark"] {
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
    --bg-overlay: rgba(0, 0, 0, 0.55);
    --bg-glass: rgba(21, 27, 40, 0.88);
}

[data-theme-mode="dark"] body::before {
    background:
        radial-gradient(ellipse 90% 60% at 10% -10%, var(--primary-soft), transparent 55%),
        radial-gradient(ellipse 70% 50% at 95% 5%, rgba(59, 130, 246, 0.06), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 110%, var(--primary-soft), transparent 45%);
}

[data-theme-mode="dark"] .mesh-bg {
    opacity: 0.4;
}

[data-theme-mode="dark"] .sidebar {
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

[data-theme-mode="dark"] .brand-name {
    color: var(--sidebar-text);
    background: none;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

[data-theme-mode="dark"] .nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--primary-light);
}

[data-theme-mode="dark"] .balance-chip {
    color: var(--text-primary);
}

[data-theme-mode="dark"] .balance-chip-label {
    color: var(--text-muted);
}

[data-theme-mode="dark"] .page-hero {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
}

[data-theme-mode="dark"] .price-card:hover,
[data-theme-mode="dark"] .stat-card:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

[data-theme-mode="dark"] .settings-card {
    background: linear-gradient(180deg, var(--bg-card), var(--bg-elevated));
}

[data-theme-mode="dark"] .price-row:not(.price-row--buy):not(.price-row--sell),
[data-theme-mode="dark"] .trade-price-display,
[data-theme-mode="dark"] .trade-total {
    background: var(--bg-main);
}

[data-theme-mode="dark"] .price-row--buy {
    background: rgba(16, 185, 129, 0.16);
}

[data-theme-mode="dark"] .price-row--sell {
    background: rgba(239, 68, 68, 0.14);
}

[data-theme-mode="dark"] .bottom-nav {
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    background-color: var(--bg-card);
}

[data-theme-mode="dark"] .bottom-nav::after {
    background-color: var(--bg-card);
}

[data-theme-mode="dark"] .table-dark tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}
