/* Sha Tin Group — Dark theme (gold accents on deep espresso) */

html[data-theme="dark"] {
    color-scheme: dark;

    --c1-black: #0B0A08;
    --c2-white: #F5EBD8;
    --c3-ash: #1A1612;
    --c4-grey: #A8947A;
    --c5-blue: #D4A84B;
    --c6-sky: #E8C87A;
    --c7-orange: #C49A3C;
    --c8-amber: #F0D9A8;
    --c9-teal: #8B6914;
    --c10-indigo: #2A2218;

    --ink: #F5EBD8;
    --snow: #14110E;
    --off-white: #1A1612;
    --pearl: #1A1612;
    --graphite: #A8947A;
    --green: #D4A84B;
    --green-soft: #E8C87A;
    --blue-main: #C49A3C;
    --blue-soft: #F0D9A8;
    --brown: #8B6914;
    --tan: #2A2218;
    --jade: #D4A84B;
    --jade-soft: #E8C87A;
    --champagne: #D4A84B;
    --champagne-soft: #E8C87A;
    --brass: #C49A3C;
    --mist: #221C16;

    --dip-page: linear-gradient(180deg, #0B0A08 0%, #14110E 42%, #1A1612 100%);
    --dip-section: linear-gradient(165deg, #12100D 0%, #1A1612 52%, #16130F 100%);
    --dip-muted: linear-gradient(180deg, #1A1612 0%, #221C16 48%, #181410 100%);
    --dip-dark: linear-gradient(160deg, #080706 0%, #1C140E 48%, #0F0C0A 100%);
    --dip-card: linear-gradient(160deg, rgba(26, 22, 18, 0.96), rgba(42, 34, 24, 0.9));

    --text-heading: #F5EBD8;
    --text-body: #D8C9B0;
    --text-muted: #A8947A;
    --text-accent: #E8C87A;
    --text-on-dark: #F5EBD8;
    --text-on-dark-soft: #E8C87A;

    /* Keep --black as near-black for surfaces / on-gold text */
    --black: #0B0A08;
    --white: #F5EBD8;
    --ash: #C9B89A;
    --ash-light: #221C16;
    --ash-dark: #2A2218;
    --ash-dim: #0F0C0A;
    --grey: var(--graphite);
    --grey-dim: #8A7A66;
    --blue: #D4A84B;
    --blue-light: #E8C87A;
    --blue-dark: #0B0A08;
    --blue-dim: rgba(212, 168, 75, 0.14);
    --orange: #D4A84B;
    --orange-light: #E8C87A;
    --orange-dim: rgba(212, 168, 75, 0.16);
    --amber: #F0D9A8;
    --amber-dim: rgba(240, 217, 168, 0.16);
    --teal: #C49A3C;
    --teal-dim: rgba(196, 154, 60, 0.14);
    --indigo: #2A2218;
    --indigo-dim: rgba(42, 34, 24, 0.7);
    --sky-dim: rgba(232, 200, 122, 0.14);
    --surface: #1A1612;
    --surface-2: #221C16;
    --gold: #D4A84B;
    --gold-light: #E8C87A;
    --gold-dim: rgba(212, 168, 75, 0.16);
    --gray: var(--graphite);
    --gray-dim: #8A7A66;
    --border: rgba(232, 200, 122, 0.16);
    --border-gold: rgba(212, 168, 75, 0.4);
    --success: #E8C87A;
    --glass: rgba(20, 17, 14, 0.88);
    --shadow-glass: 0 18px 48px rgba(0, 0, 0, 0.45);

    /* Dashboard bridge — brighter dark portals */
    --dash-bg: #14110E;
    --dash-sidebar: #0B0A08;
    --dash-sidebar-text: #FFF6E4;
    --dash-sidebar-muted: #E0CFA8;
    --dash-card: #221C16;
    --dash-card-border: rgba(232, 200, 122, 0.42);
    --dash-text: #FFF6E4;
    --dash-text-soft: #F0D9A8;
    --dash-muted: #C9B89A;
    --dash-gold: #E8C87A;
    --dash-gold-bright: #F0D9A8;
    --dash-gold-soft: #F5EBD8;
    --dash-input-bg: #1A1612;
    --dash-input-border: rgba(232, 200, 122, 0.35);
    --dash-hover: rgba(232, 200, 122, 0.18);

    --text-primary: #FFF6E4;
    --text-secondary: #F0D9A8;
    --text-muted: #C9B89A;
    --dark: #0B0A08;
    --dark-light: #2A2218;
    --dark-card: #221C16;
    --shadow-gold: 0 4px 30px rgba(0, 0, 0, 0.45);
    --gradient-gold: linear-gradient(135deg, #F0D9A8, #E8C87A, #D4A84B);
}

html[data-theme="dark"] body {
    background: var(--dip-page);
    color: var(--text-body);
}

html[data-theme="dark"] .aurora {
    background: linear-gradient(180deg, rgba(11, 10, 8, 0.9) 0%, rgba(28, 20, 14, 0.55) 50%, rgba(11, 10, 8, 0.85) 100%);
}

html[data-theme="dark"] .aurora::before {
    background: radial-gradient(circle, rgba(212, 168, 75, 0.18), transparent 70%);
}

html[data-theme="dark"] .aurora::after {
    background: radial-gradient(circle, rgba(139, 90, 43, 0.14), transparent 70%);
}

html[data-theme="dark"] .topbar.solid {
    background: rgba(11, 10, 8, 0.94);
    border-bottom-color: rgba(212, 168, 75, 0.28);
}

html[data-theme="dark"] .links > a,
html[data-theme="dark"] .links > .nav-dropdown > .nav-dropdown-trigger,
html[data-theme="dark"] .link-quiet {
    color: #C9B89A;
}

html[data-theme="dark"] .links > a:hover,
html[data-theme="dark"] .links > .nav-dropdown:hover > .nav-dropdown-trigger,
html[data-theme="dark"] .link-quiet:hover {
    color: #F5EBD8;
}

html[data-theme="dark"] .block,
html[data-theme="dark"] .block-muted,
html[data-theme="dark"] .content-body,
html[data-theme="dark"] .stats-section,
html[data-theme="dark"] .services-section,
html[data-theme="dark"] .security-section,
html[data-theme="dark"] .cta-section,
html[data-theme="dark"] .partners-section {
    color: var(--text-body);
}

html[data-theme="dark"] .glass-card,
html[data-theme="dark"] .chairman-box,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .register-card,
html[data-theme="dark"] .calc-panel,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .step,
html[data-theme="dark"] .care-panel,
html[data-theme="dark"] .testimonials-panel {
    background: var(--dip-card);
    border-color: rgba(212, 168, 75, 0.28);
    color: var(--text-body);
}

html[data-theme="dark"] .pill-fill,
html[data-theme="dark"] .btn-gold {
    background: linear-gradient(160deg, #E8C87A, #D4A84B) !important;
    color: #0B0A08 !important;
    border-color: #D4A84B !important;
}

html[data-theme="dark"] .pill-line,
html[data-theme="dark"] .btn-outline {
    color: #F5EBD8 !important;
    border-color: rgba(212, 168, 75, 0.5) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

html[data-theme="dark"] .pill-line:hover {
    background: rgba(212, 168, 75, 0.14) !important;
}

html[data-theme="dark"] .cta-dropdown-menu {
    border-color: rgba(212, 168, 75, 0.4);
    background:
        linear-gradient(160deg, rgba(212, 168, 75, 0.2), rgba(11, 10, 8, 0.98) 55%),
        rgba(11, 10, 8, 0.98);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .calc-field input,
html[data-theme="dark"] .phone-field .phone-code,
html[data-theme="dark"] .phone-field .phone-local {
    background: #0F0C0A;
    color: #F5EBD8;
    border-color: rgba(212, 168, 75, 0.28);
}

html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .calc-field label {
    color: #E8C87A;
}

html[data-theme="dark"] .theme-toggle {
    border-color: rgba(212, 168, 75, 0.4);
    color: #E8C87A;
    background: rgba(212, 168, 75, 0.1);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .content-text strong {
    color: var(--text-heading);
}

html[data-theme="dark"] .content-page,
html[data-theme="dark"] .content-body,
html[data-theme="dark"] .content-text,
html[data-theme="dark"] .content-text p {
    color: var(--text-body);
}

html[data-theme="dark"] .about-feature,
html[data-theme="dark"] .about-feature-copy,
html[data-theme="dark"] .about-feature-copy p,
html[data-theme="dark"] .chairman-welcome .chairman-message,
html[data-theme="dark"] .chairman-caption,
html[data-theme="dark"] .chairman-caption strong {
    color: var(--text-body);
}

html[data-theme="dark"] .about-feature-copy h2,
html[data-theme="dark"] .chairman-caption strong {
    color: var(--text-heading);
}

html[data-theme="dark"] .lang-select,
html[data-theme="dark"] .lang-selector {
    background: #FFE566;
    color: #111;
    border-color: #FFF6B0;
}

html[data-theme="dark"] .lang-picker-btn {
    background: #FFE566;
    color: #111;
    border-color: #FFF6B0;
    box-shadow: 0 0 0 3px rgba(255, 229, 102, 0.5), 0 6px 20px rgba(255, 210, 0, 0.65);
    filter: brightness(1.08);
}

html[data-theme="dark"] .lang-picker-panel {
    background: #FFF8E0;
    border-color: #FFE566;
    color: #1A1408;
}

html[data-theme="dark"] .lang-picker-search {
    background: #FFFFFF;
    border-color: #E8C040;
    color: #111;
}

html[data-theme="dark"] .lang-mode-btn {
    background: #FFFCE8;
    border-color: #E8C040;
    color: #5A4A10;
}

html[data-theme="dark"] .lang-mode-btn.is-active {
    background: #FFE566;
    border-color: #FFD000;
    color: #111;
}

html[data-theme="dark"] .lang-picker-close {
    background: #FFFCE8;
    border-color: #E8C040;
    color: #1A1408;
}

html[data-theme="dark"] .lang-picker-count {
    color: #8A7A40;
}

html[data-theme="dark"] .lang-picker-country {
    color: #1A1408;
}

html[data-theme="dark"] .lang-picker-lang,
html[data-theme="dark"] .lang-picker-mode-label,
html[data-theme="dark"] .lang-picker-head span {
    color: #7A6800;
}

html[data-theme="dark"] .lang-picker-head strong {
    color: #1A1408;
}

html[data-theme="dark"] .links.open,
html[data-theme="dark"] body.nav-open .links {
    background: rgba(11, 10, 8, 0.98);
    border-color: rgba(212, 168, 75, 0.28);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .board-card,
html[data-theme="dark"] .highlight-item {
    background: var(--dip-card);
    border-color: rgba(212, 168, 75, 0.28);
    color: var(--text-body);
}

html[data-theme="dark"] .login-card,
html[data-theme="dark"] .register-card {
    background: var(--dip-card);
    color: var(--text-body);
}

html[data-theme="dark"] .register-card-head h1,
html[data-theme="dark"] .register-stage-title {
    color: var(--text-heading);
}

html[data-theme="dark"] .login-logo h1,
html[data-theme="dark"] .login-tabs button.active {
    color: var(--text-heading);
}

html[data-theme="dark"] .login-tabs button {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .site-footer-full {
    background: var(--dip-dark);
    border-top-color: rgba(212, 168, 75, 0.28);
}

html[data-theme="dark"] .dashboard-layout,
html[data-theme="dark"] .dashboard-main {
    background: var(--dash-bg);
    color: var(--dash-text);
}

html[data-theme="dark"] .sidebar {
    background: var(--dash-sidebar);
    color: var(--dash-sidebar-text);
    border-right-color: rgba(232, 200, 122, 0.4);
}

html[data-theme="dark"] .sidebar-nav a {
    color: var(--dash-sidebar-text);
}

html[data-theme="dark"] .sidebar-nav a:hover,
html[data-theme="dark"] .sidebar-nav a.active {
    color: #FFF8EB;
    background: rgba(232, 200, 122, 0.2);
}

html[data-theme="dark"] .dashboard-header h1,
html[data-theme="dark"] .dashboard-main .card h2,
html[data-theme="dark"] .dashboard-main .card h3,
html[data-theme="dark"] .widget .widget-value {
    color: var(--dash-gold-bright) !important;
}

html[data-theme="dark"] .dashboard-main .card,
html[data-theme="dark"] .widget,
html[data-theme="dark"] .calculator-card,
html[data-theme="dark"] .modal {
    background: var(--dash-card);
    border-color: var(--dash-card-border);
    color: var(--dash-text);
}

html[data-theme="dark"] .dashboard-main p,
html[data-theme="dark"] .dashboard-main td,
html[data-theme="dark"] .dashboard-main li,
html[data-theme="dark"] .message-bubble.received,
html[data-theme="dark"] .message-bubble.sent {
    color: var(--dash-text-soft);
}

html[data-theme="dark"] .dashboard-main .form-control,
html[data-theme="dark"] .modal .form-control {
    background: var(--dash-input-bg);
    color: var(--dash-text);
    border-color: var(--dash-input-border);
}

html[data-theme="dark"] .dashboard-main .form-group label,
html[data-theme="dark"] .modal .form-group label,
html[data-theme="dark"] .stage-step .step-label {
    color: var(--dash-text-soft) !important;
}

html[data-theme="dark"] .stage-step.active .step-label,
html[data-theme="dark"] .stage-step.completed .step-label {
    color: var(--dash-gold-bright) !important;
}

html[data-theme="dark"] .message-bubble.received {
    background: #2A2218;
}

html[data-theme="dark"] .message-bubble.sent {
    background: rgba(232, 200, 122, 0.18);
    color: var(--dash-text);
}

html[data-theme="dark"] .chatbot-panel,
html[data-theme="dark"] .chat-window,
html[data-theme="dark"] .ai-chat-panel {
    background: #14110E;
    border-color: rgba(212, 168, 75, 0.35);
    color: var(--text-body);
}

/* Theme toggle control */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-ctrl, 4px);
    border: 1px solid rgba(184, 134, 11, 0.4);
    background: rgba(255, 249, 240, 0.35);
    color: #8B5A2B;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: #B8860B;
    color: #1C140E;
    background: rgba(212, 168, 75, 0.22);
}

/* Light mode: show moon (switch to dark). Dark mode: show sun (switch to light). */
.theme-toggle .theme-icon-sun { display: none; }
.theme-toggle .theme-icon-moon { display: inline; }

html[data-theme="dark"] .theme-toggle .theme-icon-sun { display: inline; }
html[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }

@media (max-width: 767px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
}
