/* ==========================================================================
   STUDY / HOUSE — ADVANCED DARK MODE THEME
   ========================================================================== */

html[data-theme="dark"] {
  --bg: #000000;
  --bg-soft: #102A20;
  --surface: #102A20;
  --surface-2: #102A20;
  --text: #ffffff;
  --muted: #ffffff;
  --line: #ffffff;
  --gold: #ffffff;
  --gold-hover: #ffffff;
  --gold-text: #ffffff;
  --g: #ffffff;
  --accent: #ffffff;
  --base: #000000;
  --header-bg: #000000;
  --header-text: #ffffff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .abp-manifesto,
html[data-theme="dark"] .abp-philosophy,
html[data-theme="dark"] .abp-materials,
html[data-theme="dark"] .sp-catalog,
html[data-theme="dark"] .sp-floorplan,
html[data-theme="dark"] .sp-compare,
html[data-theme="dark"] .spd-hero,
html[data-theme="dark"] .spd-atmosphere,
html[data-theme="dark"] .spd-policies,
html[data-theme="dark"] .spd-related,
html[data-theme="dark"] .mem-tiers,
html[data-theme="dark"] .mem-calc,
html[data-theme="dark"] .mem-matrix,
html[data-theme="dark"] .rul-principles,
html[data-theme="dark"] .rul-audio,
html[data-theme="dark"] .rul-food,
html[data-theme="dark"] .rul-support,
html[data-theme="dark"] .cnt-form-section,
html[data-theme="dark"] .cnt-transit,
html[data-theme="dark"] .cnt-hours,
html[data-theme="dark"] .err-search,
html[data-theme="dark"] .err-status,
html[data-theme="dark"] .err-directory,
html[data-theme="dark"] .err-contact {
  background: var(--bg);
}

html[data-theme="dark"] .abp-timeline,
html[data-theme="dark"] .abp-curators,
html[data-theme="dark"] .abp-press,
html[data-theme="dark"] .sp-pods,
html[data-theme="dark"] .sp-amenities,
html[data-theme="dark"] .sp-gallery,
html[data-theme="dark"] .spd-inventory,
html[data-theme="dark"] .spd-scheduler,
html[data-theme="dark"] .spd-reviews,
html[data-theme="dark"] .mem-perks,
html[data-theme="dark"] .mem-corporate,
html[data-theme="dark"] .mem-experience,
html[data-theme="dark"] .mem-stories,
html[data-theme="dark"] .rul-gauge,
html[data-theme="dark"] .rul-desk,
html[data-theme="dark"] .rul-policy,
html[data-theme="dark"] .cnt-cards,
html[data-theme="dark"] .cnt-map,
html[data-theme="dark"] .cnt-tour,
html[data-theme="dark"] .err-popular,
html[data-theme="dark"] .err-help,
html[data-theme="dark"] .err-pass {
  background: var(--bg-soft);
}

html[data-theme="dark"] .abp-pillar,
html[data-theme="dark"] .abp-timeline-card,
html[data-theme="dark"] .abp-zone-card,
html[data-theme="dark"] .abp-curator-card,
html[data-theme="dark"] .abp-mat-card,
html[data-theme="dark"] .abp-press-card,
html[data-theme="dark"] .sp-card,
html[data-theme="dark"] .sp-pod-spec-item,
html[data-theme="dark"] .sp-floorplan-box,
html[data-theme="dark"] .sp-floor-zone,
html[data-theme="dark"] .sp-amenity-card,
html[data-theme="dark"] .sp-compare-card,
html[data-theme="dark"] .spd-item-card,
html[data-theme="dark"] .spd-atmos-card,
html[data-theme="dark"] .spd-sched-box,
html[data-theme="dark"] .spd-pol-card,
html[data-theme="dark"] .spd-rev-card,
html[data-theme="dark"] .spd-rel-card,
html[data-theme="dark"] .mem-tier-card,
html[data-theme="dark"] .mem-perk-card,
html[data-theme="dark"] .mem-calc-box,
html[data-theme="dark"] .mem-table,
html[data-theme="dark"] .mem-story-card,
html[data-theme="dark"] .mem-faq-item,
html[data-theme="dark"] .rul-princ-card,
html[data-theme="dark"] .rul-gauge-box,
html[data-theme="dark"] .rul-audio-col,
html[data-theme="dark"] .rul-desk-card,
html[data-theme="dark"] .rul-step-card,
html[data-theme="dark"] .rul-support-box,
html[data-theme="dark"] .cnt-form-card,
html[data-theme="dark"] .cnt-channel-card,
html[data-theme="dark"] .cnt-transit-card,
html[data-theme="dark"] .cnt-hours-table-wrap,
html[data-theme="dark"] .cnt-faq-item,
html[data-theme="dark"] .err-search-bar,
html[data-theme="dark"] .err-pop-card,
html[data-theme="dark"] .err-status-box,
html[data-theme="dark"] .err-help-card,
html[data-theme="dark"] .err-dir-card,
html[data-theme="dark"] .err-pass-box {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .a-btn-outline,
html[data-theme="dark"] .a-btn-ghost,
html[data-theme="dark"] .b-btn-line {
  color: var(--gold) !important;
  border-color: var(--gold) !important;
}

html[data-theme="dark"] .btn-outline:hover,
html[data-theme="dark"] .a-btn-outline:hover,
html[data-theme="dark"] .a-btn-ghost:hover,
html[data-theme="dark"] .b-btn-line:hover {
  background: var(--gold) !important;
  color: var(--black) !important;
  border-color: var(--gold) !important;
}

html[data-theme="dark"] .a-link,
html[data-theme="dark"] .b-link,
html[data-theme="dark"] .text-link,
html[data-theme="dark"] .member-text-link {
  color: var(--gold) !important;
  border-color: var(--gold) !important;
}

html[data-theme="dark"] .rul-level-card strong,
html[data-theme="dark"] .rul-support-icon {
  color: var(--gold) !important;
}

html[data-theme="dark"] .abp-founder-card,
html[data-theme="dark"] .abp-curator-pick,
html[data-theme="dark"] .sp-floor-view,
html[data-theme="dark"] .spd-price-box,
html[data-theme="dark"] .spd-slot,
html[data-theme="dark"] .mem-calc-summary,
html[data-theme="dark"] .mem-table th,
html[data-theme="dark"] .rul-level-card,
html[data-theme="dark"] .cnt-form-card input,
html[data-theme="dark"] .cnt-form-card select,
html[data-theme="dark"] .cnt-form-card textarea {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .sp-filter-bar {
  background: var(--surface);
  border-color: var(--line);
}
html[data-theme="dark"] .sp-pill {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

/* Deep, warm dark palette shared by public pages, forms and dashboards. */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1712;
  --bg-soft: #111f18;
  --surface: #17251d;
  --surface-2: #1d2d24;
  --text: #edf2ed;
  --muted: #aab7ad;
  --line: #304137;
  --gold: #d7b66f;
  --gold-hover: #e4c984;
  --gold-text: #e2c47c;
  --g: #d7b66f;
  --accent: #d7b66f;
  --base: #0c1712;
  --header-bg: #111f18;
  --header-text: #edf2ed;
  --green: #111f18;
  --emerald: #08100c;
  --emerald-2: #23513c;
  --emerald-deep: #0c1712;
  --black: #08100c;
  --white: #edf2ed;
  --on-gold: #18251d;
  --shadow: 0 24px 60px rgba(0,0,0,.42);
  --shadow-soft: 0 10px 30px rgba(0,0,0,.28);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .auth-page,
html[data-theme="dark"] .workspace-main,
html[data-theme="dark"] .operations-main {
  background-color: var(--bg);
  color: var(--text);
}
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .auth-topbar {
  background: rgba(17,31,24,.97) !important;
  color: var(--text) !important;
  border-bottom-color: var(--line) !important;
}
html[data-theme="dark"] .site-header {
  background: #08100c !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html[data-theme="light"] .site-header {
  background: #ffffff !important;
}
html[data-theme="dark"] .site-header .brand,
html[data-theme="dark"] .site-header .brand-text,
html[data-theme="dark"] .auth-topbar .auth-brand {
  color: var(--text) !important;
}
html[data-theme="dark"] .site-header .brand-sub { color: var(--muted) !important; }
html[data-theme="dark"] .site-header .nav-links,
html[data-theme="dark"] .site-header .drop-menu {
  background: var(--surface) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .site-header .nav-links {
  background: transparent !important;
}
html[data-theme="dark"] .site-header .nav-links > a,
html[data-theme="dark"] .site-header .nav-links .drop-trigger,
html[data-theme="dark"] .site-header .drop-menu a {
  color: var(--text) !important;
}
html[data-theme="dark"] .site-header .drop-menu a:hover { background: var(--surface-2) !important; }
html[data-theme="dark"] .nav-actions .theme-toggle,
html[data-theme="dark"] .nav-actions .rtl-toggle,
html[data-theme="dark"] .auth-controls .theme-toggle,
html[data-theme="dark"] .auth-controls .rtl-toggle,
html[data-theme="dark"] .workspace-tools .theme-toggle,
html[data-theme="dark"] .workspace-tools .rtl-toggle,
html[data-theme="dark"] .operations-tools .theme-toggle,
html[data-theme="dark"] .operations-tools .rtl-toggle {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .nav-actions .theme-toggle i,
html[data-theme="dark"] .nav-actions .rtl-toggle i,
html[data-theme="dark"] .auth-controls .theme-toggle i,
html[data-theme="dark"] .auth-controls .rtl-toggle i,
html[data-theme="dark"] .workspace-tools .theme-toggle i,
html[data-theme="dark"] .workspace-tools .rtl-toggle i,
html[data-theme="dark"] .operations-tools .theme-toggle i,
html[data-theme="dark"] .operations-tools .rtl-toggle i {
  background: transparent !important;
  color: var(--gold-text) !important;
}
html[data-theme="dark"] .theme-toggle i {
  background: transparent !important;
  color: var(--gold-text) !important;
}
html[data-theme="dark"] .theme-toggle .fa-sun {
  background: transparent !important;
  color: var(--gold-text) !important;
}
html[data-theme="dark"] #themeToggle .fa-sun {
  background: transparent !important;
  color: #e2c47c !important;
}
html[data-theme="dark"] .auth-layout,
html[data-theme="dark"] .auth-form-card,
html[data-theme="dark"] .member-stat,
html[data-theme="dark"] .member-content-card,
html[data-theme="dark"] .operations-panel,
html[data-theme="dark"] .operations-metric {
  background-color: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
html[data-theme="dark"] .member-booking-card { background: linear-gradient(135deg,var(--surface),var(--bg-soft)); }
html[data-theme="dark"] .member-stat-highlight { background: #193326; border-color: #2e4a39; }
html[data-theme="dark"] .auth-input input,
html[data-theme="dark"] .auth-input select,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .cnt-form-card input,
html[data-theme="dark"] .cnt-form-card select,
html[data-theme="dark"] .cnt-form-card textarea {
  background-color: #101c15;
  border-color: var(--line);
  color: var(--text);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #829087; }
html[data-theme="dark"] .member-secondary-button {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}
html[data-theme="dark"] .workspace-topbar,
html[data-theme="dark"] .operations-topbar { border-bottom-color: var(--line); }
html[data-theme="dark"] .page-cta-card,
html[data-theme="dark"] .abp-cta-box { border-color: rgba(215,182,111,.32); }

html[data-theme="dark"] #membership-page .mem-tier-billing .mem-toggle-btn {
  background: #102A20 !important;
  border-color: rgba(255,255,255,.5) !important;
  color: #ffffff !important;
}
html[data-theme="dark"] #membership-page .mem-tier-billing .mem-toggle-btn.active {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #102A20 !important;
}

html[data-theme="dark"] {
  --bg: #08100c;
  --bg-soft: #08100c;
  --surface: #08100c;
  --surface-2: #08100c;
  --emerald-deep: #08100c;
}

html[data-theme="dark"] section:not(.home1-hero-redesign):not(.inner-page-banner):not(.page-banner) {
  background-color: #08100c !important;
  background-image: none !important;
}

html[data-theme="dark"] .a-b.a-dark,
html[data-theme="dark"] .a-plan.a-feat,
html[data-theme="dark"] .page-cta-card,
html[data-theme="dark"] .member-stat-highlight,
html[data-theme="dark"] .operations-maintenance {
  background-color: #08100c !important;
  background-image: none !important;
}
