/* SurveyHub visual polish v1 — append-only overlay; gold + charcoal with readable text. */
/* This file is intentionally loaded LAST to correct legacy light-theme collisions. */

body.gold-ui {
  --sh-text: #f1f0e6;
  --sh-soft: #c9ccbd;
  --sh-muted: #adb5a6;
  --sh-line: rgba(229,220,188,.18);
  --sh-success: #48d39a;
  --sh-error: #ff8186;
  --sh-warning: #f3c56d;
  --sh-gold: #e0c781;
  color: var(--sh-text) !important;
  background: radial-gradient(ellipse 58% 32% at 12% 0%, rgba(175,139,67,.24), transparent 75%),
    radial-gradient(ellipse 40% 28% at 96% 4%, rgba(190,157,84,.11), transparent 80%),
    linear-gradient(180deg, #191a17 0%, #171815 54%, #141613 100%) !important;
  min-height: 100vh;
}
html:has(body.gold-ui) { background: #171815; color-scheme: dark; }
body.gold-ui.reference-ui.public-shell,
body.gold-ui.reference-ui.app-shell,
body.gold-ui.public-shell,
body.gold-ui.app-shell { background-color: transparent !important; color: var(--sh-text) !important; }
body.gold-ui .main-wrap, body.gold-ui main { background-color: transparent !important; }

/* Typography — older reference-ui.css uses nearly black ink even on dark sections. */
body.gold-ui h1, body.gold-ui h2, body.gold-ui h3,
body.gold-ui h4, body.gold-ui .page-heading h1,
body.gold-ui .reference-page-heading h1,
body.gold-ui .section-head h2,
body.gold-ui .reference-section-head h2,
body.gold-ui .reference-question-heading h2,
body.gold-ui .auth-intro h1,
body.gold-ui .hero h1,
body.gold-ui .global h2 { color: var(--sh-text) !important; }
body.gold-ui p, body.gold-ui .page-heading p,
body.gold-ui .reference-page-heading p,
body.gold-ui .reference-ui p { color: var(--sh-soft) !important; }
body.gold-ui small, body.gold-ui .muted,
body.gold-ui .reference-empty-note, body.gold-ui .chart-empty-note,
body.gold-ui .fin-eyebrow { color: var(--sh-muted) !important; }
body.gold-ui .eyebrow, body.gold-ui .hero-tagline,
body.gold-ui .fin-eyebrow { color: var(--sh-gold) !important; }
body.gold-ui a:not(.button) { text-underline-offset: 3px; }
body.gold-ui a:not(.button):hover { color: #f0d88d; }

/* Landing: text, sections, FAQ, onboarding cards and preview must never blend into the background. */
body.gold-ui.public-shell .hero,
body.gold-ui.public-shell .section,
body.gold-ui.public-shell .auth-grid,
body.gold-ui .global { color: var(--sh-text) !important; }
body.gold-ui.public-shell .topbar,
body.gold-ui.reference-ui.public-shell .topbar {
  background: rgba(28,30,26,.88) !important;
  border-bottom: 1px solid var(--sh-line) !important;
}
body.gold-ui .public-nav > a:not(.button),
body.gold-ui .brand, body.gold-ui .header-logo { color: #f2e9cf !important; }
body.gold-ui .trust-row, body.gold-ui .auth-feature,
body.gold-ui .region-pills span { color: #d0d1c3 !important; }
body.gold-ui .hero-visual .visual-orbit {
  background: radial-gradient(circle, rgba(226,190,101,.19), transparent 68%) !important;
}
body.gold-ui .preview-card,
body.gold-ui .floating-badge,
body.gold-ui .mini-stats > div,
body.gold-ui .sample-task,
body.gold-ui .region-pills span {
  background: linear-gradient(145deg, #31332c, #252722) !important;
  color: var(--sh-text) !important;
  border: 1px solid var(--sh-line) !important;
  box-shadow: 0 10px 32px rgba(0,0,0,.15);
}
body.gold-ui .preview-card strong, body.gold-ui .mini-stats strong,
body.gold-ui .sample-task strong, body.gold-ui .floating-badge strong {
  color: #f2e0ac !important;
}
body.gold-ui .preview-card small, body.gold-ui .mini-stats span,
body.gold-ui .sample-task p { color: #bdc2af !important; }
body.gold-ui .sample-task .task-icon,
body.gold-ui .step-number { background: rgba(221,189,110,.14) !important; color: #ebd08b !important; }
body.gold-ui .tinted:before,
body.gold-ui .tinted::before {
  background: linear-gradient(120deg, rgba(217,183,100,.09), rgba(255,255,255,.015)) !important;
  border: 1px solid rgba(225,199,127,.12);
}
body.gold-ui .faq, body.gold-ui details.faq { border-bottom: 1px solid var(--sh-line) !important; }
body.gold-ui .faq summary, body.gold-ui details summary { color: #ebe9dc !important; }
body.gold-ui .faq p { color: var(--sh-soft) !important; }

/* Shared surfaces and layout across admin, dashboard, transactions, auth and task pages. */
body.gold-ui .card,
body.gold-ui .preview-card,
body.gold-ui .auth-card,
body.gold-ui .reference-quiz-card,
body.gold-ui .reference-panel-caption,
body.gold-ui .fin-transactions {
  border-color: var(--sh-line) !important;
}
body.gold-ui .card, body.gold-ui .auth-card {
  background: linear-gradient(143deg, rgba(51,54,46,.94), rgba(37,40,34,.96)) !important;
  box-shadow: 0 14px 35px rgba(0,0,0,.18) !important;
}
body.gold-ui .reference-panel-caption,
body.gold-ui .reference-package-select,
body.gold-ui .account-menu,
body.gold-ui .reference-reset {
  color: #dedfcf !important;
}
body.gold-ui .reference-panel-caption,
body.gold-ui .reference-package-select {
  background: #292c25 !important;
  border: 1px solid var(--sh-line) !important;
  border-radius: 12px !important;
}
body.gold-ui .reference-metric-list strong,
body.gold-ui .reference-account-metrics strong,
body.gold-ui .reference-wallet > strong,
body.gold-ui .reference-donut strong,
body.gold-ui .reference-task-breakdown strong,
body.gold-ui .stat > strong { color: #f3eedf !important; }
body.gold-ui .reference-latest td a { color: #eeeadd !important; }
body.gold-ui .reference-quiz-card .option-text,
body.gold-ui .reference-answer-options .option-text { color: #e3e4d5 !important; }
body.gold-ui .reference-answer-options .answer-option,
body.gold-ui .reference-rating label {
  background: rgba(255,255,255,.035) !important;
  border-color: var(--sh-line) !important;
  color: #e6e6dc !important;
}
body.gold-ui .reference-answer-options .answer-option:has(input:checked) {
  background: rgba(224,199,129,.13) !important;
  border-color: rgba(224,199,129,.6) !important;
}
body.gold-ui th { color: #b8bead !important; }
body.gold-ui td { color: #e4e5d8 !important; }
body.gold-ui .list-row { border-color: var(--sh-line) !important; }
body.gold-ui .empty, body.gold-ui .reference-empty,
body.gold-ui .reference-filter-empty { color: var(--sh-soft) !important; }

/* Professional controls. Preserve the existing gold actions and bottom navigation. */
body.gold-ui main .button, body.gold-ui .auth-card .button,
body.gold-ui main button[type="submit"], body.gold-ui .auth-card button[type="submit"] {
  border-radius: 13px !important;
  min-height: 44px;
  letter-spacing: .01em;
}
body.gold-ui input, body.gold-ui select, body.gold-ui textarea {
  border-color: rgba(224,222,195,.27) !important;
  background: rgba(32,35,29,.88) !important;
  color: #f2f2e6 !important;
}
body.gold-ui input::placeholder, body.gold-ui textarea::placeholder { color: #aeb5a5 !important; }
body.gold-ui :is(button,a,input,select,textarea,summary):focus-visible {
  outline: 3px solid rgba(238,207,120,.8) !important;
  outline-offset: 3px;
}
body.gold-ui .table-scroll { max-width: 100%; overflow-x: auto; }

/* Semantic outcome colors: successful transactions/submissions green, failed red. */
body.gold-ui .positive,
body.gold-ui .fin-transaction-amount.positive,
body.gold-ui .status.approved, body.gold-ui .status.completed,
body.gold-ui .status.success, body.gold-ui .status.paid,
body.gold-ui .status.active, body.gold-ui .status.claimable {
  color: var(--sh-success) !important;
}
body.gold-ui .negative,
body.gold-ui .fin-transaction-amount.negative,
body.gold-ui .status.rejected, body.gold-ui .status.failed,
body.gold-ui .status.cancelled, body.gold-ui .status.suspended,
body.gold-ui .status.expired, body.gold-ui .status.declined {
  color: var(--sh-error) !important;
}
body.gold-ui .status.approved, body.gold-ui .status.completed,
body.gold-ui .status.success, body.gold-ui .status.paid,
body.gold-ui .status.active, body.gold-ui .status.claimable {
  background: rgba(50,201,135,.13) !important;
  border: 1px solid rgba(72,211,154,.35) !important;
}
body.gold-ui .status.rejected, body.gold-ui .status.failed,
body.gold-ui .status.cancelled, body.gold-ui .status.suspended,
body.gold-ui .status.expired, body.gold-ui .status.declined {
  background: rgba(235,78,87,.13) !important;
  border: 1px solid rgba(255,129,134,.34) !important;
}
body.gold-ui .status.pending, body.gold-ui .status.processing {
  background: rgba(243,197,109,.12) !important;
  color: var(--sh-warning) !important;
  border: 1px solid rgba(243,197,109,.3) !important;
}
body.gold-ui .notice.success, body.gold-ui .notice.approved,
body.gold-ui .notice.completed, body.gold-ui .notice:not(.error):not(.warning):not(.info),
body.gold-ui [role="status"].success {
  background: rgba(44,174,116,.14) !important;
  color: #a0f3c7 !important;
  border: 1px solid rgba(72,211,154,.34) !important;
  border-left: 4px solid #48d39a !important;
  border-radius: 12px !important;
}
body.gold-ui .notice.error, body.gold-ui .notice.failed,
body.gold-ui .notice.danger, body.gold-ui [role="alert"],
body.gold-ui .alert-danger, body.gold-ui .alert-error {
  background: rgba(197,55,64,.15) !important;
  color: #ffc6c8 !important;
  border: 1px solid rgba(255,129,134,.38) !important;
  border-left: 4px solid #ff8186 !important;
  border-radius: 12px !important;
}
body.gold-ui .notice.warning { color: #f7db9b !important; background: rgba(243,197,109,.1) !important; }
body.gold-ui .notice.info { color: #e9dcae !important; background: rgba(224,199,129,.09) !important; }
body.gold-ui .notice a, body.gold-ui [role="alert"] a { color: inherit !important; text-decoration: underline; }

/* Financial highlight card must keep dark lettering ON the metallic-gold surface. */
body.gold-ui .fin-balance-card,
body.gold-ui .fin-balance-card :is(h1,h2,h3,h4,small,p,strong) {
  color: #292b22 !important;
}
body.gold-ui .fin-balance-card .fin-balance-amount { color: #24291b !important; }

/* Respect screen sizes and don't override intentional [hidden] content. */
body.gold-ui .card, body.gold-ui .grid > *, body.gold-ui .hero > *,
body.gold-ui .auth-grid > *, body.gold-ui .reference-dashboard-grid > * { min-width: 0; }
@media (max-width: 760px) {
  body.gold-ui .hero { gap: 25px; min-height: auto; }
  body.gold-ui .hero h1 { font-size: clamp(34px, 9vw, 48px) !important; line-height: 1.12; }
  body.gold-ui.public-shell .section { padding-block: 38px; }
  body.gold-ui .card { border-radius: 16px !important; }
  body.gold-ui .region-pills { gap: 8px; }
  body.gold-ui .region-pills span { padding: 9px 12px; }
  body.gold-ui .mobile-nav a, body.gold-ui .mobile-nav button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  body.gold-ui *, body.gold-ui *::before, body.gold-ui *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
