/* Shared light emerald theme for customer and admin routes. */
:root {
  color-scheme: light;
  background: #f7f8f2;
  --paper: #f7f8f2;
  --white: #ffffff;
  --ink: #183e2f;
  --muted: #526a5c;
  --line: #d1dfd2;
  --lime: #176b54;
  --lime-hover: #10543f;
  --green: #24765b;
  --field: #ffffff;
  --control-border: #728d7b;
  --error-bg: #fff0ed;
  --error-text: #9d3026;
  --success-bg: #e3f3e8;
  --success-text: #205e3d;
  --accent: #176b54;
  --accent-hover: #10543f;
  --question-surface: #ffffff;
  --source-surface: #edf4ed;
  --mint: #e2efe3;
  --mint-ink: #163e2d;
  --mint-muted: #415d4b;
  --teal: #176b54;
  scrollbar-color: #91aa99 var(--paper);
}
body.customer-page { isolation: isolate; background: var(--paper); color: var(--ink); }
body.customer-page::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: url("artwork/moorish-lattice.svg"), url("artwork/moorish-lattice.svg");
  background-position: right -190px top 100px, left -240px bottom -240px;
  background-size: 560px 560px;
  background-repeat: no-repeat;
  opacity: .16;
  pointer-events: none;
}
.customer-page .wordmark img { filter: none; }
.trial-review { margin-block: 28px; padding: 24px; border: 1px solid var(--control-border); border-radius: 16px; background: var(--mint); }
.trial-review h2 { margin: 0 0 12px; font-size: 24px; color: var(--ink); }
.trial-review p { max-width: 65ch; color: var(--muted); line-height: 1.65; }
.trial-review button { margin-top: 14px; }
.trial-review button:disabled { cursor: default; opacity: .7; }
.room-profile:not([hidden]) { display: inline-block; min-height: 44px; padding-block: 10px; margin-top: 20px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.customer-page .field { color: #405e4c; }
.customer-page .field input::placeholder { color: #5b7465; }
.customer-page .header-actions, .landing-page .site-header nav { background: #f7f8f2; border-radius: 999px; }
.customer-page .field input:focus, .customer-page .field select:focus { box-shadow: 0 0 0 3px #176b5420; }
.customer-page .primary-button, .customer-page .share-actions a { background: var(--lime); color: #fff; }
.customer-page .primary-button:hover, .customer-page .share-actions a:hover { background: var(--lime-hover); }
.customer-page .secondary-button { border-color: #aec5b2; background: #e5efe4; color: var(--ink); }
.customer-page .secondary-button:hover { background: #d6e8d7; }
.customer-page :focus-visible { outline-color: var(--lime); }
.customer-page .select-option[aria-selected=true] { background: #dceee0; color: var(--ink); }
.customer-page .select-menu { box-shadow: 0 12px 32px #183e2f18; }
.customer-page .profile-onboarding { background: #fffffff5; border-color: var(--line); box-shadow: 0 12px 50px #183e2f08; backdrop-filter: none; }
.customer-page .onboarding-optional { color: var(--muted); }
.customer-page .onboarding-dialog { background: #fff; border-color: var(--line); box-shadow: 0 25px 100px #173b2d25; }
.customer-page .onboarding-dialog::backdrop { background: #243f3266; }
.customer-page .onboarding-dialog .profile-onboarding { background: transparent; box-shadow: none; }
.customer-page .onboarding-steps [aria-current=step] { color: var(--lime); }
.customer-page .balance-block { background: #e4efe0; color: var(--ink); border-color: #b9cfb9; box-shadow: none; }
.customer-page .balance-block strong { color: var(--lime); }
.customer-page .share-section, .customer-page .social-section { background: #fffffff5; border-color: var(--line); backdrop-filter: none; box-shadow: 0 10px 38px #1c4a2c05; }
.customer-page .copy-row button { background: #e5efe4; color: var(--ink); border-color: #aec5b2; }
.customer-page .copy-row button:hover, .customer-page .ref-code-line button:hover { background: #d6e8d7; }
.customer-page .ref-code-line button { border-color: #aec5b2; }
.customer-page .secondary-button, .customer-page .copy-row button, .customer-page .ref-code-line button { border-color: #728d7b; }
.referral-claim-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .95fr);
  align-items: center;
  gap: 20px 32px;
  margin-top: 32px;
  padding: 26px 30px;
  border: 1px solid #b8d1bd;
  border-radius: 20px;
  background: #f0f6ec;
}
.referral-claim-copy { min-width: 0; }
.referral-claim-copy .section-index { font-size: 10px; letter-spacing: .14em; }
.referral-claim-copy h2 { margin: 8px 0; font-size: 23px; line-height: 1.2; }
.referral-claim-copy > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.referral-claim-form { display: flex; align-items: flex-end; gap: 10px; min-width: 0; }
.referral-claim-form .field { flex: 1; font-size: 10px; }
.referral-claim-form input { min-height: 48px; padding: 12px; font-size: 15px; border-radius: 10px; }
.referral-claim-form .primary-button { flex: none; width: auto; min-height: 48px; margin: 0; padding: 10px 18px; font-size: 13px; }
.referral-claim-row > .form-message { grid-column: 1 / -1; margin: 0; }
.referral-claimed-summary { margin: 0; color: #1b664a; font-size: 14px; }
.referral-claimed-summary strong { display: inline-block; margin-left: 8px; letter-spacing: .04em; overflow-wrap: anywhere; }
.referral-claimed-summary span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.customer-page .credits-layout { margin-top: 24px; }
.credits-page .claim-history .return-instruction { margin: 16px 0 0 !important; line-height: 1.6; }
.credits-page .credits-main { padding-block: 40px 80px; }
.credits-page .credits-hero { gap: 24px; padding-bottom: 32px; }
.credits-page .credits-hero .intro { font-size: 18px; }
@media (min-width: 581px) {
  .credits-page .credits-hero h1 { margin: 12px 0 20px; font-size: clamp(36px, 4.2vw, 56px); }
  .credits-page .balance-block { width: 168px; min-height: 168px; padding: 24px; }
  .credits-page .balance-block strong { font-size: 60px; }
}

/* Landing cards and details keep the original composition and artwork. */
.landing-page .header-signin { border-color: #aec5b2; background: #fff9; }
.landing-page .header-signin { border-color: #728d7b; }
.landing-page .header-signin:hover { background: #e2efe3; }
.landing-page .header-open { border-color: var(--ink); background: var(--ink); color: var(--white); white-space: nowrap; }
.landing-page .header-open:hover { border-color: var(--lime-hover); background: var(--lime-hover); }
.landing-page .header-open .arrow-icon { filter: invert(1); }
.landing-page .arrow-icon { filter: none; }
.landing-page .button-primary { color: #fff; }
.landing-page .button-primary .arrow-icon { filter: invert(1); }
.landing-page .hero-facts { color: var(--muted); }
.landing-page .invitation-note { color: #275b40; border-color: #b0cdb6; background: #eaf4e7; }
.landing-page .glass-panel { border-color: #c5d8c6; box-shadow: 0 15px 45px #153e2a08; backdrop-filter: none; }
.landing-page .panel-heading p, .landing-page .question-cue { color: var(--muted); }
.landing-page .icon-tile { background: #dfede0; }
.landing-page .icon-tile img, .landing-page .source-item > img { filter: none; }
.landing-page .question-panel > a { color: #264c38; border-top-color: #d4e2d4; }
.landing-page .question-panel > a:hover, .landing-page .question-panel > a:focus-visible { color: #10543f; border-top-color: #648f70; }
.landing-page .question-panel > a img { filter: none; }
.landing-page .question-panel:has(a:hover) .icon-tile, .landing-page .question-panel:has(a:focus-visible) .icon-tile { background: #cde2ce; }
.landing-page .source-item { border-top-color: #cfdfd1; }
.landing-page .source-item span, .landing-page .source-note { color: var(--muted); }
.landing-page .ustaz-preview { box-shadow: 0 20px 65px #235f3420; }
.landing-page .step-number { background: #176b54; color: #fff; }
.landing-page .step-connector { background: #c6dccb; }
.landing-page .final-cta { border: 1px solid #bdd4bf; }
.landing-page .final-cta .arrow-icon { filter: invert(1); }

/* The masjid remains full-bleed on mobile; the actual sign-in card is light. */
.auth-page .auth-main { isolation: isolate; border-color: var(--line); background: #f7f8f2; }
.auth-page .auth-main::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .12; background: url("artwork/moorish-lattice.svg") center / 420px repeat; pointer-events: none; }
.auth-page .auth-card { background: #fffffff5; border-color: #c5d8c6; box-shadow: 0 20px 65px #1f503219; backdrop-filter: blur(16px); }
.auth-page .auth-brand img { filter: brightness(0) invert(1); }

/* Live imagery keeps its contrast; controls and the outer shell are light. */
.conversation-page { --panel: #e0ecdf; }
.conversation-page .app-shell, .conversation-page .app-header { background: #f7f8f2; }
.conversation-page .app-shell { position: relative; isolation: isolate; }
.conversation-page .app-shell::before { content: ""; display: none; position: absolute; z-index: -1; inset: 0; background: url("artwork/moorish-lattice.svg") right top / 360px repeat; opacity: .13; pointer-events: none; }
.conversation-page .app-header { border-bottom: 0; }
.conversation-page .account-tools a, .conversation-page .account-tools button, .conversation-page .account-balance { border-color: #728d7b; background: #fffffff0; color: #183e2f; }
.conversation-page .account-tools a:hover, .conversation-page .account-tools button:hover:not(:disabled) { background: #e0eedf; }
.conversation-page .mode-switch { border-color: #728d7b; background: #ffffffe5; }
.conversation-page .mode-switch img { filter: none; }
.conversation-page .mode-switch button[aria-pressed=true] { background: #176b54; }
.conversation-page .mode-switch button[aria-pressed=true] img { filter: invert(1); }
.conversation-page .message.user { color: #173d2d; background: #fffffff0; border-color: #d0e1d3; }
.conversation-page .message.assistant, .conversation-page #status:not(.error), .conversation-page #speech-status { color: #fff; }
.conversation-page .chat-composer { background: #fffffff5; border-color: #c5d8c6; box-shadow: 0 8px 35px #173b2d20; }
.conversation-page #question, .conversation-page .composer-options select { color: #183e2f; }
.conversation-page #question::placeholder, .conversation-page .composer-options span { color: #526a5c; }
.conversation-page #ask { background: #176b54; }
.conversation-page #ask img { filter: invert(1); }
.conversation-page .feedback .error, .conversation-page .setup-notice, .conversation-page #speech-status[data-error=true] { color: #9d3026; background: #fff0ed; }
.conversation-page .feedback button { color: #183e2f; border-color: #b4cdbb; background: #fff; }
.conversation-page .call-view .chat-composer { background: transparent; border: 0; box-shadow: none; }
.conversation-page .room-gate { color-scheme: light; color: #183e2f; background: #f7f8f2; }
.conversation-page .room-gate::before { content: ""; position: absolute; inset: 0; background: url("artwork/moorish-lattice.svg") center / 420px repeat; opacity: .12; pointer-events: none; }
.conversation-page .room-gate .room-card { position: relative; }
.conversation-page .room-gate .room-card { background: #fffffff5; border-color: #c5d8c6; box-shadow: 0 20px 65px #1f503219; }
.conversation-page .room-gate :is(.eyebrow, .room-intro, .room-message, .room-footnote), .conversation-page .room-gate .room-stats span { color: #526a5c; }
.conversation-page .room-gate .room-stats div { background: #edf5eb; border-color: #cbdccc; }
.conversation-page .room-gate .room-icon span { background: #176b54; }
.conversation-page .room-gate button { background: #e1eee1; color: #183e2f; border-color: #728d7b; }
@media (max-width: 900px) { .auth-page .auth-main { background: transparent; }.auth-page .auth-main::before { display: none; } }
@media (max-width: 1100px) {
  .conversation-page .app-shell::before { display: block; }
  .conversation-page .app-header { background: transparent; }
}
@media (max-width: 700px) {
  .referral-claim-row { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 24px 20px; }
  .referral-claim-copy h2 { font-size: 22px; }
  .referral-claim-form .primary-button { padding-inline: 13px; }
}
@media (forced-colors: active) { body.customer-page::before, .conversation-page .app-shell::before { display: none !important; } }
