/* RugWeather application theme
   Shared visual system for authenticated/app pages.
   Legal pages and the public home page are intentionally excluded in base.html. */

:root {
  --rw-bg: #120906;
  --rw-bg-2: #1d0e09;
  --rw-surface: #21120c;
  --rw-surface-2: #2a170f;
  --rw-surface-3: #321b11;
  --rw-border: rgba(221, 132, 65, 0.22);
  --rw-border-soft: rgba(255, 235, 214, 0.10);
  --rw-text: #f7efe6;
  --rw-text-strong: #fff9f2;
  --rw-muted: #c7b6a9;
  --rw-muted-2: #9f8e82;
  --rw-orange: #f07a2d;
  --rw-orange-2: #ff9845;
  --rw-green: #536b48;
  --rw-green-2: #6f855f;
  --rw-danger: #d95645;
  --rw-cream: #f6eee4;
  --rw-shadow: 0 24px 70px rgba(0,0,0,.30);
  --rw-shadow-soft: 0 12px 34px rgba(0,0,0,.22);
}

/* ---------- Global canvas ---------- */
html.app-theme {
  background: var(--rw-bg);
}

body.app-theme {
  color: var(--rw-text);
  background:
    radial-gradient(ellipse 70% 55% at 78% 12%, rgba(139, 61, 24, .34), transparent 62%),
    radial-gradient(ellipse 55% 45% at 20% 48%, rgba(88, 35, 18, .25), transparent 65%),
    linear-gradient(180deg, #0d0705 0%, #1b0c07 42%, #130806 100%);
  min-height: 100vh;
}

body.app-theme::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 30%, rgba(255, 126, 42, .06), transparent 22rem),
    radial-gradient(circle at 15% 80%, rgba(129, 57, 25, .07), transparent 26rem);
}

.app-theme .site-navbar {
  background: rgba(13, 7, 5, .88);
  border-bottom: 1px solid rgba(255, 235, 214, .08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-theme .site-brand {
  color: var(--rw-text-strong);
}

.app-theme .brand-logo {
  background: var(--rw-cream);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}

.app-theme .site-nav-links a {
  color: var(--rw-muted);
}

.app-theme .site-nav-links a:hover {
  color: var(--rw-text-strong);
  background: rgba(255,255,255,.06);
}

.app-theme .site-nav-links .nav-pill {
  color: #1a0c07;
  background: var(--rw-cream);
}

.app-theme .site-nav-links .nav-link-button {
  color: var(--rw-muted);
}

.app-theme .site-nav-links .nav-link-button:hover {
  color: var(--rw-text-strong);
}

/* ---------- Page shell ---------- */
.app-theme .app-page {
  position: relative;
}

.app-theme .app-hero {
  background:
    linear-gradient(135deg, rgba(48, 25, 16, .96), rgba(29, 14, 9, .93));
  border: 1px solid var(--rw-border);
  box-shadow: var(--rw-shadow-soft);
}

.app-theme .app-hero h1,
.app-theme .page-title,
.app-theme .card-title h2,
.app-theme .card-title h3,
.app-theme .app-card h2,
.app-theme .app-card h3 {
  color: var(--rw-text-strong);
}

.app-theme .app-hero p,
.app-theme .page-subtitle,
.app-theme .card-title p,
.app-theme .muted,
.app-theme .form-help {
  color: var(--rw-muted);
}

.app-theme .eyebrow,
.app-theme .section-label {
  color: var(--rw-orange-2);
}

/* ---------- Cards ---------- */
.app-theme .app-card,
.app-theme .empty-state-card,
.app-theme .features-grid article,
.app-theme .premium-showcase,
.app-theme .locked-premium-preview,
.app-theme .auth-copy,
.app-theme .auth-card {
  color: var(--rw-text);
  background:
    linear-gradient(145deg, rgba(43, 23, 14, .97), rgba(29, 14, 9, .97));
  border-color: var(--rw-border);
  box-shadow: var(--rw-shadow-soft);
}

.app-theme .app-card:hover {
  border-color: rgba(240, 122, 45, .30);
}

.app-theme .form-label,
.app-theme .form-group label {
  color: var(--rw-text-strong);
}

.app-theme .form-control,
.app-theme .form-select,
.app-theme input[type="text"],
.app-theme input[type="email"],
.app-theme input[type="password"],
.app-theme input[type="number"],
.app-theme input[type="file"],
.app-theme select,
.app-theme textarea {
  background: #2a1710;
  color: var(--rw-text-strong);
  border-color: rgba(255, 218, 190, .16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.app-theme .form-control::placeholder,
.app-theme input::placeholder,
.app-theme textarea::placeholder {
  color: #8f7d71;
}

.app-theme .form-control:focus,
.app-theme .form-select:focus,
.app-theme input:focus,
.app-theme select:focus,
.app-theme textarea:focus {
  border-color: var(--rw-orange);
  box-shadow: 0 0 0 4px rgba(240,122,45,.16);
}

.app-theme input:-webkit-autofill,
.app-theme input:-webkit-autofill:hover,
.app-theme input:-webkit-autofill:focus,
.app-theme textarea:-webkit-autofill,
.app-theme select:-webkit-autofill {
  -webkit-text-fill-color: var(--rw-text-strong);
  -webkit-box-shadow: 0 0 0 1000px #2a1710 inset;
  transition: background-color 9999s ease-out;
}

/* ---------- Buttons ---------- */
.app-theme .btn,
.app-theme button.btn,
.app-theme .primary-button,
.app-theme .primary-link-button {
  background: linear-gradient(135deg, var(--rw-orange-2), var(--rw-orange));
  color: #1b0b06;
  box-shadow: 0 12px 30px rgba(240,122,45,.20);
}

.app-theme .btn:hover,
.app-theme button.btn:hover,
.app-theme .primary-button:hover {
  filter: brightness(1.06);
  box-shadow: 0 16px 36px rgba(240,122,45,.28);
}

.app-theme .btn-secondary,
.app-theme .secondary-link-button {
  background: #332015;
  color: var(--rw-text-strong);
  border-color: rgba(255, 218, 190, .15);
  box-shadow: none;
}

.app-theme .btn-dark {
  background: #f4eadf;
  color: #1a0c07;
}

.app-theme .btn-outline {
  background: transparent;
  color: var(--rw-text-strong);
  border-color: rgba(255, 218, 190, .20);
}

.app-theme .btn-danger {
  background: linear-gradient(135deg, #df624d, #b83c31);
  color: #fff;
}

/* ---------- Generic chips / summaries ---------- */
.app-theme .card-icon {
  background: #3a2015;
  color: var(--rw-orange-2);
}

.app-theme .location-chip,
.app-theme .location-summary,
.app-theme .meta-list div,
.app-theme .subscription-notice,
.app-theme .collapsible-chevron,
.app-theme .suggestion-chevron {
  background: #2a1710;
  border-color: rgba(255,218,190,.13);
  color: var(--rw-text-strong);
}

.app-theme .location-chip:hover {
  border-color: rgba(240,122,45,.38);
}

.app-theme .location-chip strong,
.app-theme .meta-list dd,
.app-theme .location-summary strong,
.app-theme .subscription-notice strong {
  color: var(--rw-text-strong);
}

.app-theme .location-chip small,
.app-theme .meta-list dt,
.app-theme .location-summary span {
  color: var(--rw-muted-2);
}

.app-theme .badge {
  background: #3b2115;
  color: #f5d5bc;
}

.app-theme .badge.premium {
  background: linear-gradient(135deg, var(--rw-orange-2), var(--rw-orange));
  color: #1b0b06;
}

.app-theme .badge.ending {
  background: rgba(240,122,45,.12);
  color: #ffbd86;
  border-color: rgba(240,122,45,.25);
}

/* ---------- Flash messages ---------- */
.app-theme .flash,
.app-theme .alert,
.app-theme .flash-message {
  --flash-bg: #2a1710;
  --flash-border: rgba(240,122,45,.25);
  --flash-icon-bg: rgba(240,122,45,.12);
  color: var(--rw-text-strong);
  background: var(--flash-bg);
  border-color: var(--flash-border);
  box-shadow: var(--rw-shadow-soft);
}

.app-theme .flash__title,
.app-theme .flash__message {
  color: var(--rw-text-strong);
}

/* ---------- Auth pages ---------- */
.app-theme .auth-copy h1 {
  color: var(--rw-text-strong);
}

.app-theme .auth-copy p,
.app-theme .auth-helper-link,
.app-theme .auth-footer {
  color: var(--rw-muted);
}

.app-theme .auth-helper-link a,
.app-theme .auth-footer a {
  color: var(--rw-orange-2);
}

.app-theme .auth-card .app-card,
.app-theme .auth-card {
  background: linear-gradient(145deg, #2a1710, #1f100b);
}

/* ---------- Footer ---------- */
.app-theme .site-footer {
  background: rgba(10, 5, 4, .74);
  border-top-color: rgba(255,218,190,.08);
}

.app-theme .site-footer-attribution {
  color: var(--rw-muted);
}

.app-theme .site-footer-attribution:hover,
.app-theme .site-footer-attribution:focus-visible {
  color: var(--rw-text-strong);
}

.app-theme .site-footer-attribution img {
  opacity: .72;
}

.app-theme .site-footer,
.app-theme .site-footer a {
  color: var(--rw-muted);
}

.app-theme .site-footer a:hover {
  color: var(--rw-text-strong);
}

/* ---------- Dashboard ---------- */
.app-theme .topbar-panel {
  background: linear-gradient(145deg, rgba(43,23,14,.97), rgba(29,14,9,.97));
  border-color: var(--rw-border);
  box-shadow: var(--rw-shadow-soft);
}

.app-theme .topbar-panel h1 {
  color: var(--rw-text-strong);
}

.app-theme .personalised-rug-note {
  background: rgba(255,255,255,.06);
  color: #f5e8dd;
}

.app-theme .recommendation-feedback {
  background: #2a1710;
  border-color: rgba(255,218,190,.12);
}

.app-theme .forecast-tabs,
.app-theme .forecast-timeline,
.app-theme .yard-location-card,
.app-theme .install-app-card {
  background: #2a1710;
  border-color: rgba(240,122,45,.18);
  color: var(--rw-text);
}

.app-theme .forecast-timeline *,
.app-theme .yard-location-card *,
.app-theme .install-app-card * {
  color: inherit;
}

.app-theme .forecast-item,
.app-theme .forecast-card {
  background: #f2e8dc;
  color: #281710;
}

/* ---------- Horses: compact app-like cards ---------- */
.app-theme .horses-page .horses-hero {
  padding: clamp(1.05rem, 3vw, 1.6rem);
}

.app-theme .horses-page .horse-limit-pill {
  background: #2a1710;
  border-color: rgba(240,122,45,.22);
  color: var(--rw-text-strong);
}

.app-theme .horses-manager-card {
  background: linear-gradient(145deg, rgba(38,20,12,.98), rgba(27,13,8,.98));
}

.app-theme .horses-toolbar h2 {
  color: var(--rw-text-strong);
}

.app-theme .horse-row {
  position: relative;
  background:
    linear-gradient(145deg, rgba(47,25,15,.98), rgba(31,15,9,.98));
  border-color: rgba(240,122,45,.22);
  box-shadow: 0 14px 34px rgba(0,0,0,.20);
  border-radius: 20px;
}

.app-theme .horse-photo {
  background: #3a2116;
  border-color: rgba(255,218,190,.15);
  box-shadow: 0 8px 22px rgba(0,0,0,.20);
}

.app-theme .horse-photo.placeholder {
  color: #f7dfcb;
  background: linear-gradient(145deg, #3b2115, #2a1710);
}

.app-theme .horse-title-row h3 {
  color: var(--rw-text-strong);
}

.app-theme .horse-title-row span,
.app-theme .rug-chips span {
  background: rgba(246,238,228,.10);
  color: #f0ded0;
  border: 1px solid rgba(246,238,228,.08);
}

.app-theme .horse-main p,
.app-theme .quiet-note {
  color: var(--rw-muted);
}

.app-theme .horses-page .empty-state {
  background: #21120c;
  border-color: rgba(240,122,45,.22);
}

.app-theme .horses-page .empty-mark {
  background: #3b2115;
  color: var(--rw-orange-2);
}

.app-theme .horses-page .horses-premium-nudge {
  background: linear-gradient(145deg, #2e190f, #21120c);
  border-color: rgba(240,122,45,.24);
  box-shadow: var(--rw-shadow-soft);
}

.app-theme .horses-page .horses-premium-nudge h2,
.app-theme .horses-page .horses-premium-nudge p {
  color: var(--rw-text-strong);
}

/* ---------- Settings: app-like dashboard cards ---------- */
.app-theme .account-page .settings-hero {
  margin-bottom: 1rem;
}

.app-theme .account-page .settings-grid {
  gap: .9rem;
}

.app-theme .account-page .settings-card {
  background: linear-gradient(145deg, rgba(43,23,14,.98), rgba(29,14,9,.98));
  border-color: rgba(240,122,45,.20);
}

.app-theme .account-page .card-title h2 {
  color: var(--rw-text-strong);
}

.app-theme .account-page .card-title p {
  color: var(--rw-muted);
}

.app-theme .account-page .settings-icon {
  background: #3a2015;
  color: var(--rw-orange-2);
}

.app-theme .account-page .settings-icon svg {
  fill: currentColor;
}

.app-theme .account-page .collapsible-settings-body {
  border-top-color: rgba(255,218,190,.10);
}

.app-theme .account-page .subscription-notice {
  background: #2a1710;
}

.app-theme .account-page .active-notice {
  background: rgba(83,107,72,.18);
  border-color: rgba(111,133,95,.30);
}

.app-theme .account-page .ending-notice {
  background: rgba(240,122,45,.11);
  border-color: rgba(240,122,45,.25);
}

.app-theme .account-page .danger-settings-card {
  border-color: rgba(217,86,69,.34);
}

.app-theme .account-page .danger-icon {
  background: rgba(217,86,69,.12);
}

/* ---------- Premium ---------- */
.app-theme .premium-page .premium-hero-card {
  background: linear-gradient(145deg, #3a2014, #201009);
  border-color: rgba(240,122,45,.28);
}

.app-theme .premium-page .plan-card,
.app-theme .premium-page .features-grid article {
  background: linear-gradient(145deg, #2a1710, #21120c);
  border-color: rgba(240,122,45,.20);
}

.app-theme .premium-page .plan-card h2,
.app-theme .premium-page .features-grid h3,
.app-theme .premium-page .premium-showcase-copy h2,
.app-theme .premium-page .locked-preview-header h3 {
  color: var(--rw-text-strong);
}

.app-theme .premium-page .plan-card ul,
.app-theme .premium-page .features-grid p,
.app-theme .premium-page .premium-showcase-copy p,
.app-theme .premium-page .locked-preview-header p {
  color: var(--rw-muted);
}

.app-theme .premium-page .locked-premium-preview {
  background: #21120c;
}

/* ---------- Learn ---------- */
.app-theme .info-grid .app-card,
.app-theme .learn-page .app-card {
  background: linear-gradient(145deg, #2a1710, #21120c);
}

.app-theme .info-grid .app-card h2,
.app-theme .info-grid .app-card h3 {
  color: var(--rw-text-strong);
}

.app-theme .info-grid .app-card p,
.app-theme .info-grid .app-card li {
  color: var(--rw-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app-theme .app-page {
    padding: .65rem;
  }

  .app-theme .app-hero {
    padding: 1rem;
    border-radius: 20px;
  }

  .app-theme .app-hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .app-theme .app-card {
    border-radius: 20px;
  }

  .app-theme .site-footer {
    margin-top: .5rem;
  }

  .app-theme .horses-page .horses-hero {
    display: grid;
    gap: .75rem;
  }

  .app-theme .horses-page .horses-hero h1 {
    font-size: 2.35rem;
  }

  .app-theme .horses-page .horse-row {
    grid-template-columns: 58px minmax(0,1fr);
    padding: .78rem;
    border-radius: 18px;
  }

  .app-theme .horses-page .horse-photo {
    width: 58px;
    height: 58px;
    border-radius: 15px;
  }

  .app-theme .horses-page .horse-title-row {
    gap: .3rem;
  }

  .app-theme .horses-page .horse-title-row h3 {
    font-size: 1.02rem;
  }

  .app-theme .horses-page .horse-main p {
    font-size: .78rem;
  }

  .app-theme .horses-page .horse-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
  }

  .app-theme .horses-page .horse-actions .btn,
  .app-theme .horses-page .horse-actions form {
    width: 100%;
  }

  .app-theme .account-page .settings-grid {
    grid-template-columns: 1fr;
  }

  .app-theme .account-page .settings-hero h1 {
    font-size: 2.35rem;
  }

  .app-theme .account-page .button-row .btn {
    min-height: 46px;
  }
}

@media (max-width: 520px) {
  .app-theme .app-page {
    padding: .5rem;
  }

  .app-theme .app-hero {
    padding: .9rem;
    border-radius: 18px;
  }

  .app-theme .app-hero h1 {
    font-size: 2rem;
  }

  .app-theme .app-card {
    padding: .85rem;
    border-radius: 18px;
  }

  .app-theme .horses-page .horses-manager-card {
    padding: .75rem;
  }

  .app-theme .horses-page .horse-row {
    grid-template-columns: 52px minmax(0,1fr);
    padding: .65rem;
  }

  .app-theme .horses-page .horse-photo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
  }

  .app-theme .horses-page .horse-actions {
    grid-template-columns: 1fr;
  }

  .app-theme .horses-page .horse-actions .btn {
    min-height: 42px;
  }

  .app-theme .account-page .settings-card {
    border-radius: 18px;
  }

  .app-theme .account-page .collapsible-settings-summary {
    padding: .9rem;
  }
}

/* ======================================================================
   2026-09-17 refinement: flatter dashboard + consistent install cards
   Keeps the homepage's restrained black / warm-brown product language.
   ====================================================================== */

/* The app should feel like the homepage mock product UI, not a stack of
   pale rounded cards. Keep corners tighter, borders subtle and shadows rare. */
.app-theme .dashboard-page,
.app-theme .account-page,
.app-theme .horses-page,
.app-theme .premium-page,
.app-theme .learn-page {
  color: var(--rw-text);
}

.app-theme .dashboard-content {
  max-width: 1180px;
}

/* Dashboard heading area */
.app-theme .main-heading-row,
.app-theme .section-heading-row {
  align-items: end;
}

.app-theme .main-heading-row h1,
.app-theme .section-heading-row h1,
.app-theme .section-heading-row h2 {
  color: var(--rw-text-strong);
}

.app-theme .dashboard-horses-heading {
  align-items: center;
}

.app-theme .section-intro,
.app-theme .main-heading-row p {
  color: var(--rw-muted);
}

/* Plan ahead becomes a slim product control, not a large pale pill. */
.app-theme .plan-ahead-card,
.app-theme .plan-ahead-panel,
.app-theme .plan-ahead-summary {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,235,214,.10);
  color: var(--rw-text);
  box-shadow: none;
  border-radius: 12px;
}

.app-theme .plan-ahead-card *,
.app-theme .plan-ahead-panel *,
.app-theme .plan-ahead-summary * {
  color: inherit;
}

.app-theme .plan-ahead-hint,
.app-theme .plan-ahead-status,
.app-theme .plan-ahead-limit {
  color: var(--rw-muted);
}

/* Horse recommendation cards: dark framed panels like the homepage screen. */
.app-theme .horse-recommendation-grid {
  gap: 12px;
}

.app-theme .horse-recommendation-card {
  background: rgba(18,18,17,.88);
  border: 1px solid rgba(255,235,214,.10);
  box-shadow: none;
  border-radius: 14px;
  overflow: hidden;
}

.app-theme .horse-avatar {
  background: #2b211b;
  border: 1px solid rgba(255,235,214,.10);
  color: var(--rw-text-strong);
}

/* The actual rug recommendation remains visually important, but flatter. */
.app-theme .rug-result {
  margin: 0 14px 10px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  box-shadow: none;
}

.app-theme .rug-result::after {
  opacity: .22;
}

.app-theme .rug-result .label,
.app-theme .rug-result span,
.app-theme .rug-result small {
  color: rgba(255,249,242,.76);
}

.app-theme .rug-result strong,
.app-theme .rug-result h2,
.app-theme .rug-result h3 {
  color: #fff;
}

/* Fly risk should read as a small status row rather than another bubble. */
.app-theme .fly-risk-card {
  margin: 0 14px 10px;
  padding: 9px 10px;
  background: transparent;
  border: 1px solid rgba(255,235,214,.09);
  border-radius: 9px;
  box-shadow: none;
  color: var(--rw-muted);
}

.app-theme .fly-risk-label,
.app-theme .fly-risk-range {
  color: var(--rw-muted);
}

.app-theme .fly-risk-action {
  color: #f0a36a;
}

/* Explanation becomes an integrated dark inset panel. */
.app-theme .recommendation-reason {
  margin: 0 14px 10px;
  padding: 13px 14px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,235,214,.085);
  border-radius: 10px;
  box-shadow: none;
  color: var(--rw-muted);
}

.app-theme .recommendation-reason > span,
.app-theme .recommendation-reason strong,
.app-theme .recommendation-reason b {
  color: var(--rw-text-strong);
}

.app-theme .recommendation-reason p,
.app-theme .recommendation-reason li {
  color: var(--rw-muted);
}

.app-theme .recommendation-reason hr,
.app-theme .recommendation-reason .divider {
  border-color: rgba(255,235,214,.08);
}

/* Feedback row: integrated, not a grey slab. */
.app-theme .recommendation-feedback {
  margin: 0 14px 14px;
  background: transparent;
  border: 1px solid rgba(255,235,214,.09);
  border-radius: 9px;
  box-shadow: none;
}

.app-theme .feedback-summary {
  padding: 10px 12px;
}

.app-theme .feedback-summary strong,
.app-theme .feedback-question {
  color: var(--rw-text-strong);
}

.app-theme .feedback-summary small,
.app-theme .feedback-note {
  color: var(--rw-muted);
}

.app-theme .feedback-chevron {
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,.04);
  border-color: rgba(255,235,214,.10);
  color: var(--rw-text);
}

.app-theme .feedback-panel {
  border-color: rgba(255,235,214,.08);
}

.app-theme .feedback-actions button {
  background: rgba(255,255,255,.035);
  border-color: rgba(255,235,214,.10);
  color: var(--rw-text);
  border-radius: 8px;
}

.app-theme .feedback-actions button:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(240,122,45,.25);
}

/* Forecast control + timeline: same product UI as homepage mock browser. */
.app-theme .weather-tabs,
.app-theme .forecast-tabs {
  padding: 4px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,235,214,.09);
  border-radius: 10px;
  box-shadow: none;
}

.app-theme .tab-button {
  border-radius: 7px;
  color: var(--rw-muted);
  background: transparent;
}

.app-theme .tab-button.active {
  background: rgba(255,255,255,.075);
  color: var(--rw-text-strong);
  box-shadow: none;
}

.app-theme .forecast-section,
.app-theme .forecast-timeline,
.app-theme .hourly-forecast,
.app-theme .premium-insights-card,
.app-theme .insight-summary-panel {
  background: rgba(18,18,17,.82);
  border: 1px solid rgba(255,235,214,.09);
  border-radius: 12px;
  box-shadow: none;
  color: var(--rw-text);
}

.app-theme .forecast-item,
.app-theme .forecast-card,
.app-theme .premium-timeline-item,
.app-theme .insight-metric-card {
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,235,214,.07);
  color: var(--rw-text);
  border-radius: 8px;
  box-shadow: none;
}

.app-theme .forecast-item *,
.app-theme .forecast-card *,
.app-theme .premium-timeline-item *,
.app-theme .insight-metric-card * {
  color: inherit;
}

.app-theme .forecast-item .time,
.app-theme .forecast-card .time,
.app-theme .premium-time {
  color: #e49359;
}

.app-theme .forecast-item .desc,
.app-theme .forecast-card .desc,
.app-theme .forecast-item small,
.app-theme .forecast-card small {
  color: var(--rw-muted);
}

/* Yard location is a slim footer row. */
.app-theme .yard-location-card {
  min-height: 58px;
  padding: 12px 14px;
  background: rgba(18,18,17,.72);
  border: 1px solid rgba(255,235,214,.09);
  border-radius: 10px;
  box-shadow: none;
}

.app-theme .yard-location-card strong {
  color: var(--rw-text-strong);
}

.app-theme .yard-location-label {
  color: var(--rw-muted-2);
}

.app-theme .yard-location-card a {
  color: var(--rw-text-strong);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,235,214,.10);
  border-radius: 8px;
}

/* Install app widget: remove the accidental light-grey inherited surface. */
.app-theme .get-app-footer {
  margin-top: 12px;
}

.app-theme .get-app-card,
.app-theme .install-app-card {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  background: rgba(18,18,17,.76) !important;
  border: 1px solid rgba(255,235,214,.10) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: var(--rw-text) !important;
}

.app-theme .get-app-card:hover,
.app-theme .install-app-card:hover {
  background: rgba(255,255,255,.045) !important;
  border-color: rgba(240,122,45,.24) !important;
}

.app-theme .get-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--rw-cream);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: none;
}

.app-theme .get-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-theme .get-app-label {
  color: #de8a50 !important;
}

.app-theme .get-app-copy strong {
  color: var(--rw-text-strong) !important;
}

.app-theme .get-app-copy small {
  color: var(--rw-muted) !important;
}

.app-theme .get-app-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,235,214,.10) !important;
  color: var(--rw-text-strong) !important;
}

/* Settings install card uses the same product treatment. */
.app-theme .account-page .get-app-card,
.app-theme .account-page .install-app-card {
  background: rgba(18,18,17,.76) !important;
}

/* Settings themselves: flatter, quieter panels. */
.app-theme .account-page .settings-card,
.app-theme .horses-manager-card,
.app-theme .premium-page .premium-hero-card,
.app-theme .premium-page .plan-card,
.app-theme .premium-page .features-grid article,
.app-theme .premium-page .locked-premium-preview,
.app-theme .learn-page .app-card,
.app-theme .info-grid .app-card {
  background: rgba(18,18,17,.78);
  border: 1px solid rgba(255,235,214,.09);
  border-radius: 12px;
  box-shadow: none;
}

.app-theme .account-page .settings-card:hover,
.app-theme .horses-manager-card:hover,
.app-theme .premium-page .plan-card:hover,
.app-theme .premium-page .features-grid article:hover {
  border-color: rgba(255,235,214,.14);
}

/* Horse management rows: reduce bubble feel. */
.app-theme .horse-row {
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  border-color: rgba(255,235,214,.09);
  box-shadow: none;
}

.app-theme .horse-photo,
.app-theme .horse-photo.placeholder {
  border-radius: 9px;
  box-shadow: none;
}

/* Premium: retain hierarchy without large slabs. */
.app-theme .premium-page .premium-hero-card {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.app-theme .premium-page .plan-card,
.app-theme .premium-page .features-grid article {
  padding: 1rem;
}

/* Generic app cards should no longer look inflated. */
.app-theme .app-card,
.app-theme .empty-state-card,
.app-theme .auth-copy,
.app-theme .auth-card {
  background: rgba(18,18,17,.78);
  border: 1px solid rgba(255,235,214,.09);
  border-radius: 12px;
  box-shadow: none;
}

/* Tight mobile treatment: preserve hierarchy without giant rounded blocks. */
@media (max-width: 900px) {
  .app-theme .dashboard-content {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .app-theme .horse-recommendation-grid {
    gap: 10px;
  }

  .app-theme .horse-recommendation-card,
  .app-theme .forecast-section,
  .app-theme .forecast-timeline,
  .app-theme .hourly-forecast,
  .app-theme .account-page .settings-card,
  .app-theme .horses-manager-card,
  .app-theme .premium-page .plan-card,
  .app-theme .premium-page .features-grid article,
  .app-theme .app-card {
    border-radius: 10px;
  }

  .app-theme .horse-card-top {
    padding: 12px 12px 9px;
  }

  .app-theme .rug-result,
  .app-theme .fly-risk-card,
  .app-theme .recommendation-reason,
  .app-theme .recommendation-feedback {
    margin-left: 12px;
    margin-right: 12px;
  }

  .app-theme .get-app-card,
  .app-theme .install-app-card {
    min-height: 60px;
    border-radius: 9px !important;
  }
}


/* ==========================================================================
   FINAL VISUAL CONSISTENCY PASS
   All non-legal application pages use the same cinematic background as the
   public homepage. Keep surfaces quiet and translucent so the background
   remains visible instead of creating large pale blocks.
   ========================================================================== */

body.app-theme {
  --app-bg: #0a0a09;
  --bg: #0a0a09;
  --bg-2: #17100d;
  --surface: #151412;
  --surface-soft: rgba(255,255,255,.045);
  --surface-warm: #1b1815;
  --text: #e9e1d7;
  --muted: #b5ada1;
  --border: rgba(244,238,228,.13);
  --brand: #e47a35;
  --brand-dark: #f4eee4;
  --brand-soft: rgba(255,255,255,.055);
  --green: #53604b;
  --green-dark: #b9c8b1;
  --orange: #e47a35;
  --orange-dark: #e47a35;
  --danger: #ef6b5a;
  --danger-soft: rgba(239,107,90,.10);
  --success: #76a77d;
  --shadow: none;
  --shadow-soft: none;

  color: var(--text);
  background: #0a0a09 !important;
  min-height: 100vh;
  background-attachment: fixed;
}

html.app-theme {
  background: #0a0a09 !important;
}

body.app-theme::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 72% 45%, rgba(118, 67, 37, .42), transparent 34%),
    radial-gradient(ellipse at 25% 30%, rgba(69, 41, 25, .35), transparent 35%),
    linear-gradient(180deg, #0a0a09 0%, #17100d 62%, #0a0908 100%);
}

body.app-theme::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.20), transparent 35%, rgba(0,0,0,.12)),
    radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,.52) 100%);
}

.pwa-mode body.app-theme,
html.pwa-mode body.app-theme {
  background: #0a0a09 !important;
}

.pwa-mode body.app-theme::before {
  background:
    radial-gradient(ellipse at 72% 45%, rgba(118, 67, 37, .42), transparent 34%),
    radial-gradient(ellipse at 25% 30%, rgba(69, 41, 25, .35), transparent 35%),
    linear-gradient(180deg, #0a0a09 0%, #17100d 62%, #0a0908 100%);
}

.pwa-mode body.app-theme::after {
  background:
    linear-gradient(90deg, rgba(0,0,0,.20), transparent 35%, rgba(0,0,0,.12)),
    radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,.52) 100%);
}

/* Navigation */
.app-theme .site-navbar {
  background: rgba(10,10,9,.78) !important;
  border-bottom: 1px solid rgba(244,238,228,.10) !important;
  box-shadow: none !important;
}

.app-theme .site-brand,
.app-theme .site-brand span {
  color: #f4eee4 !important;
}

.app-theme .site-nav-links a,
.app-theme .site-nav-links .nav-link-button {
  color: #b5ada1 !important;
}

.app-theme .site-nav-links a:hover,
.app-theme .site-nav-links .nav-link-button:hover {
  color: #fff !important;
  background: rgba(255,255,255,.055) !important;
}

.app-theme .site-nav-links .nav-pill {
  background: #f4eee4 !important;
  color: #171310 !important;
}

.app-theme .site-nav-links .nav-pill:hover {
  background: #fffaf2 !important;
  color: #171310 !important;
}

/* Page headings and normal copy */
.app-theme h1,
.app-theme h2,
.app-theme h3,
.app-theme h4,
.app-theme h5,
.app-theme h6,
.app-theme .page-title,
.app-theme .main-heading-row h1,
.app-theme .section-heading-row h1,
.app-theme .section-heading-row h2,
.app-theme .weather-header h3,
.app-theme .premium-insights-header h3 {
  color: #f4eee4 !important;
}

.app-theme p,
.app-theme li,
.app-theme dd,
.app-theme .section-intro,
.app-theme .page-subtitle,
.app-theme .card-title p,
.app-theme .muted,
.app-theme .form-help {
  color: #b5ada1;
}

.app-theme .eyebrow,
.app-theme .section-label,
.app-theme .turnout-window-note strong,
.app-theme .get-app-label {
  color: #e47a35 !important;
}

/* Generic app surfaces: dark, thin and quiet. */
.app-theme .app-hero,
.app-theme .app-card,
.app-theme .empty-state-card,
.app-theme .auth-copy,
.app-theme .auth-card,
.app-theme .settings-card,
.app-theme .horses-manager-card,
.app-theme .premium-showcase,
.app-theme .premium-hero-card,
.app-theme .plan-card,
.app-theme .features-grid article,
.app-theme .locked-premium-preview,
.app-theme .location-choice-card {
  background: rgba(18,18,17,.78) !important;
  border: 1px solid rgba(244,238,228,.10) !important;
  box-shadow: none !important;
  color: #e9e1d7;
}

/* Avoid the heavy, pale hero slabs used by the old theme. */
.app-theme .app-hero {
  background:
    linear-gradient(135deg, rgba(27,17,13,.78), rgba(18,18,17,.66)) !important;
  border-radius: 14px !important;
}

.app-theme .app-hero h1,
.app-theme .app-hero p {
  color: #f4eee4 !important;
}

.app-theme .app-hero p {
  color: #b5ada1 !important;
}

/* Inputs / login / forms */
.app-theme .form-control,
.app-theme .form-select,
.app-theme input[type="text"],
.app-theme input[type="email"],
.app-theme input[type="password"],
.app-theme input[type="number"],
.app-theme input[type="file"],
.app-theme select,
.app-theme textarea {
  background: #171412 !important;
  color: #f4eee4 !important;
  border: 1px solid rgba(244,238,228,.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02) !important;
}

.app-theme .form-control::placeholder,
.app-theme input::placeholder,
.app-theme textarea::placeholder {
  color: #81786e !important;
}

.app-theme .form-label,
.app-theme .form-group label,
.app-theme .auth-card label {
  color: #f4eee4 !important;
}

.app-theme .form-control:focus,
.app-theme .form-select:focus,
.app-theme input:focus,
.app-theme select:focus,
.app-theme textarea:focus {
  border-color: rgba(228,122,53,.75) !important;
  box-shadow: 0 0 0 3px rgba(228,122,53,.12) !important;
}

.app-theme input:-webkit-autofill,
.app-theme input:-webkit-autofill:hover,
.app-theme input:-webkit-autofill:focus,
.app-theme textarea:-webkit-autofill,
.app-theme select:-webkit-autofill {
  -webkit-text-fill-color: #f4eee4 !important;
  -webkit-box-shadow: 0 0 0 1000px #171412 inset !important;
  box-shadow: 0 0 0 1000px #171412 inset !important;
}

/* Buttons */
.app-theme .btn,
.app-theme button.btn,
.app-theme .primary-button,
.app-theme .primary-link-button {
  background: #e47a35 !important;
  color: #171310 !important;
  border: 1px solid rgba(228,122,53,.75) !important;
  box-shadow: none !important;
}

.app-theme .btn:hover,
.app-theme button.btn:hover,
.app-theme .primary-button:hover,
.app-theme .primary-link-button:hover {
  background: #f08a43 !important;
  color: #171310 !important;
  box-shadow: none !important;
}

.app-theme .btn-secondary,
.app-theme .secondary-link-button {
  background: rgba(255,255,255,.045) !important;
  color: #f4eee4 !important;
  border: 1px solid rgba(244,238,228,.14) !important;
  box-shadow: none !important;
}

.app-theme .btn-dark {
  background: #f4eee4 !important;
  color: #171310 !important;
}

.app-theme .btn-outline {
  background: transparent !important;
  color: #f4eee4 !important;
  border: 1px solid rgba(244,238,228,.16) !important;
  box-shadow: none !important;
}

.app-theme .btn-danger {
  background: transparent !important;
  color: #ef6b5a !important;
  border: 1px solid rgba(239,107,90,.42) !important;
  box-shadow: none !important;
}

/* Dashboard: the turnout message should not disappear into the brown background. */
.app-theme .turnout-window-note {
  background: rgba(83,96,75,.10) !important;
  border: 1px solid rgba(111,133,95,.22) !important;
  color: #cbd2c4 !important;
  border-radius: 10px !important;
}

.app-theme .turnout-window-note strong {
  color: #b8c8b0 !important;
}

.app-theme .turnout-window-note span {
  color: #87977f !important;
}

/* Plan-ahead control */
.app-theme .plan-ahead-card,
.app-theme .plan-ahead-panel,
.app-theme .plan-ahead-summary {
  background: rgba(18,18,17,.72) !important;
  border-color: rgba(244,238,228,.11) !important;
  color: #f4eee4 !important;
  box-shadow: none !important;
}

.app-theme .plan-ahead-summary-copy strong {
  color: #f4eee4 !important;
}

.app-theme .plan-ahead-summary-copy small {
  color: #9f958b !important;
}

.app-theme .plan-ahead-icon,
.app-theme .plan-ahead-icon svg,
.app-theme .plan-ahead-status-arrow {
  color: #d8cec3 !important;
}

.app-theme .plan-ahead-status {
  background: #f4eee4 !important;
  color: #171310 !important;
  border-color: rgba(244,238,228,.30) !important;
  box-shadow: none !important;
}

.app-theme .plan-ahead-status *,
.app-theme .plan-ahead-status-arrow {
  color: #171310 !important;
}

/* Dashboard horse cards */
.app-theme .horse-recommendation-card {
  background: rgba(15,15,14,.76) !important;
  border: 1px solid rgba(244,238,228,.11) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
.app-theme .horse-avatar {
  background: #241b16 !important;
  border-color: rgba(244,238,228,.12) !important;
  color: #f4eee4 !important;
  box-shadow: none !important;
}


/* Keep the important recommendation block as the visual accent. */
.app-theme .rug-result {
  background: linear-gradient(135deg, rgba(83,96,75,.84), rgba(73,52,38,.84)) !important;
  border-color: rgba(255,255,255,.08) !important;
  color: #fff !important;
}

.app-theme .rug-result .label,
.app-theme .rug-result span,
.app-theme .rug-result small {
  color: rgba(255,249,242,.76) !important;
}

.app-theme .rug-result strong,
.app-theme .rug-result h2,
.app-theme .rug-result h3 {
  color: #fff !important;
}

/* Fly-risk and feedback rows */
.app-theme .fly-risk-card,
.app-theme .recommendation-feedback,
.app-theme .feedback-summary,
.app-theme .feedback-panel {
  background: rgba(255,255,255,.025) !important;
  border-color: rgba(244,238,228,.09) !important;
  color: #e9e1d7 !important;
  box-shadow: none !important;
}

.app-theme .fly-risk-card *,
.app-theme .recommendation-feedback *,
.app-theme .feedback-summary *,
.app-theme .feedback-panel * {
  color: inherit;
}

.app-theme .fly-risk-card .fly-risk-label,
.app-theme .fly-risk-card .fly-risk-value {
  color: #e47a35 !important;
}

.app-theme .recommendation-reason,
.app-theme .basic-recommendation-why,
.app-theme .premium-horse-insight {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(244,238,228,.09) !important;
  color: #e9e1d7 !important;
  box-shadow: none !important;
}

.app-theme .recommendation-reason p,
.app-theme .basic-recommendation-why p,
.app-theme .best-check-note p,
.app-theme .feedback-summary small,
.app-theme .feedback-note {
  color: #b5ada1 !important;
}

.app-theme .recommendation-reason span,
.app-theme .best-check-note strong {
  color: #e47a35 !important;
}

/* Forecast section: remove the large grey slab seen in the screenshot. */
.app-theme .forecast-section,
.app-theme .result-card,
.app-theme .forecast-section .result-card,
.app-theme .forecast-timeline,
.app-theme .hourly-forecast,
.app-theme .premium-insights-card {
  background: rgba(15,15,14,.76) !important;
  border: 1px solid rgba(244,238,228,.10) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  color: #e9e1d7 !important;
}

.app-theme .forecast-section .weather-header h3,
.app-theme .premium-insights-header h3 {
  color: #f4eee4 !important;
}

.app-theme .forecast-item,
.app-theme .forecast-card,
.app-theme .premium-timeline-item,
.app-theme .insight-metric-card {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(244,238,228,.08) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: #e9e1d7 !important;
}

.app-theme .forecast-item .time,
.app-theme .forecast-card .time,
.app-theme .premium-time {
  color: #e47a35 !important;
}

.app-theme .forecast-item .desc,
.app-theme .forecast-card .desc,
.app-theme .forecast-item small,
.app-theme .forecast-card small,
.app-theme .premium-timeline-item small,
.app-theme .premium-timeline-item em {
  color: #9f958b !important;
}

.app-theme .forecast-item .temp,
.app-theme .forecast-card .temp,
.app-theme .premium-timeline-item strong,
.app-theme .insight-metric-card strong {
  color: #f4eee4 !important;
}

/* Forecast / Analytics tabs */
.app-theme .weather-tabs,
.app-theme .forecast-tabs {
  background: rgba(15,15,14,.72) !important;
  border: 1px solid rgba(244,238,228,.10) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.app-theme .tab-button {
  color: #9f958b !important;
  background: transparent !important;
}

.app-theme .tab-button.active {
  color: #f4eee4 !important;
  background: rgba(255,255,255,.075) !important;
}

/* Analytics: every heading and metric must remain readable on the dark surface. */
.app-theme .premium-insights-card .premium-insights-header h3,
.app-theme .premium-insights-card .premium-insights-header p {
  color: #f4eee4 !important;
}

.app-theme .premium-insights-card .premium-insights-header p {
  color: #9f958b !important;
}

.app-theme .insight-summary-panel {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(244,238,228,.08) !important;
  color: #e9e1d7 !important;
}

.app-theme .insight-summary-panel h4 {
  color: #f4eee4 !important;
}

.app-theme .insight-summary-panel p {
  color: #b5ada1 !important;
}

.app-theme .check-window-chip {
  background: rgba(255,255,255,.055) !important;
  border-color: rgba(244,238,228,.12) !important;
}

.app-theme .check-window-chip span {
  color: #a99f95 !important;
}

.app-theme .check-window-chip strong {
  color: #f4eee4 !important;
}

.app-theme .insight-metric-card span {
  color: #9f958b !important;
}

.app-theme .insight-metric-card small {
  color: #9f958b !important;
}

.app-theme .risk-reason-item,
.app-theme .care-tip-item {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(244,238,228,.08) !important;
  color: #b5ada1 !important;
}

.app-theme .risk-reason-item p,
.app-theme .care-tip-item p {
  color: #b5ada1 !important;
}

.app-theme .care-tip-item strong {
  background: #3a2418 !important;
  color: #f4eee4 !important;
}

.app-theme .premium-timeline-item {
  background: rgba(255,255,255,.035) !important;
}

/* Yard location row */
.app-theme .yard-location-card {
  background: rgba(15,15,14,.72) !important;
  border: 1px solid rgba(244,238,228,.10) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.app-theme .yard-location-label {
  color: #8f857b !important;
}

.app-theme .yard-location-card strong {
  color: #f4eee4 !important;
}

.app-theme .yard-location-card a {
  background: rgba(255,255,255,.045) !important;
  color: #f4eee4 !important;
  border: 1px solid rgba(244,238,228,.12) !important;
}

/* Install widget: dark, compact and consistent everywhere. */
.app-theme .get-app-footer,
.app-theme .get-app-card,
.app-theme .install-app-card {
  background: transparent !important;
}

.app-theme .get-app-card,
.app-theme .install-app-card {
  min-height: 62px !important;
  padding: 10px 12px !important;
  background: rgba(15,15,14,.72) !important;
  border: 1px solid rgba(244,238,228,.10) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: #e9e1d7 !important;
}

.app-theme .get-app-card:hover,
.app-theme .install-app-card:hover {
  background: rgba(255,255,255,.045) !important;
  border-color: rgba(228,122,53,.24) !important;
}

.app-theme .get-app-icon {
  background: #2b1a12 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.app-theme .get-app-copy strong {
  color: #f4eee4 !important;
}

.app-theme .get-app-copy small {
  color: #9f958b !important;
}

.app-theme .get-app-arrow {
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(244,238,228,.12) !important;
  color: #f4eee4 !important;
}

/* Settings / account page */
.app-theme .meta-list div,
.app-theme .subscription-meta-list div,
.app-theme .location-summary,
.app-theme .subscription-notice,
.app-theme .collapsible-settings-card,
.app-theme .notification-setting-row,
.app-theme .notification-toggle-row,
.app-theme .push-settings-card,
.app-theme .suggestion-summary,
.app-theme .suggestion-details,
.app-theme .suggestion-body {
  background: rgba(255,255,255,.035) !important;
  border-color: rgba(244,238,228,.09) !important;
  color: #e9e1d7 !important;
  box-shadow: none !important;
}

.app-theme .meta-list dt,
.app-theme .subscription-meta-list dt,
.app-theme .location-summary span,
.app-theme .notification-toggle-copy small {
  color: #8f857b !important;
}

.app-theme .meta-list dd,
.app-theme .subscription-meta-list dd,
.app-theme .location-summary strong,
.app-theme .subscription-notice strong,
.app-theme .notification-toggle-copy strong {
  color: #f4eee4 !important;
}

.app-theme .settings-card .card-title h2,
.app-theme .settings-card .card-title h3,
.app-theme .settings-card .card-title p {
  color: #f4eee4 !important;
}

.app-theme .settings-card .card-title p {
  color: #9f958b !important;
}

.app-theme .card-icon,
.app-theme .settings-icon,
.app-theme .push-icon,
.app-theme .danger-icon {
  background: rgba(228,122,53,.09) !important;
  color: #e47a35 !important;
  border: 1px solid rgba(228,122,53,.13) !important;
}

.app-theme .danger-settings-card {
  border-color: rgba(239,107,90,.24) !important;
}

.app-theme .danger-settings-card .card-icon,
.app-theme .danger-settings-card .danger-icon {
  background: rgba(239,107,90,.09) !important;
  color: #ef6b5a !important;
}

/* Horses page */
.app-theme .horse-row {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(244,238,228,.10) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.app-theme .horse-row h3,
.app-theme .horse-title-row h3 {
  color: #f4eee4 !important;
}

.app-theme .horse-row p,
.app-theme .horse-main p {
  color: #a99f95 !important;
}

.app-theme .horse-photo,
.app-theme .horse-photo.placeholder {
  background: #241b16 !important;
  border-color: rgba(244,238,228,.10) !important;
  color: #f4eee4 !important;
  box-shadow: none !important;
}

.app-theme .rug-chip,
.app-theme .horse-title-row > span {
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(244,238,228,.10) !important;
  color: #c9beb3 !important;
}

/* Premium page: keep hierarchy, remove the large green/brown slab. */
.app-theme .premium-page .premium-hero-card {
  background:
    linear-gradient(135deg, rgba(27,17,13,.80), rgba(18,18,17,.72)) !important;
  border: 1px solid rgba(244,238,228,.10) !important;
  color: #e9e1d7 !important;
}

.app-theme .premium-page .premium-hero-card h1,
.app-theme .premium-page .premium-showcase-copy h2,
.app-theme .premium-page .locked-preview-header h3 {
  color: #f4eee4 !important;
}

.app-theme .premium-page .premium-hero-card p,
.app-theme .premium-page .premium-showcase-copy p,
.app-theme .premium-page .locked-preview-header p {
  color: #b5ada1 !important;
}

.app-theme .price-card {
  background: rgba(255,255,255,.055) !important;
  border: 1px solid rgba(244,238,228,.13) !important;
  color: #f4eee4 !important;
  box-shadow: none !important;
}

.app-theme .price-card span {
  color: #e47a35 !important;
}

.app-theme .price-card p {
  color: #b5ada1 !important;
}

.app-theme .premium-page .premium-horse-preview-card,
.app-theme .premium-page .locked-preview-summary {
  background: rgba(255,255,255,.035) !important;
  border-color: rgba(244,238,228,.09) !important;
  color: #e9e1d7 !important;
}

.app-theme .premium-page .premium-horse-preview-card h4,
.app-theme .premium-page .premium-horse-preview-card strong {
  color: #f4eee4 !important;
}

.app-theme .premium-page .premium-horse-preview-card p,
.app-theme .premium-page .premium-horse-preview-card small {
  color: #9f958b !important;
}

.app-theme .premium-page .locked-preview-summary {
  background: linear-gradient(135deg, rgba(83,96,75,.72), rgba(73,52,38,.72)) !important;
}

.app-theme .premium-page .locked-preview-summary h4,
.app-theme .premium-page .locked-preview-summary p {
  color: #fff !important;
}

/* Login / auth */
.app-theme .auth-copy h1 {
  color: #f4eee4 !important;
}

.app-theme .auth-copy p,
.app-theme .auth-footer,
.app-theme .auth-helper-link {
  color: #b5ada1 !important;
}

.app-theme .auth-footer a,
.app-theme .auth-helper-link a {
  color: #e47a35 !important;
}

.app-theme .auth-card {
  background: rgba(18,18,17,.82) !important;
}

/* Location picker and other form cards */
.app-theme .location-map-preview {
  background: #171412 !important;
  border-color: rgba(244,238,228,.10) !important;
}

.app-theme .location-choice-copy strong {
  color: #f4eee4 !important;
}

.app-theme .location-choice-copy small,
.app-theme .location-choice-copy em {
  color: #9f958b !important;
}

/* Empty/error cards */
.app-theme .empty-state-card h2,
.app-theme .empty-state-card p {
  color: #f4eee4 !important;
}

.app-theme .empty-state-card p {
  color: #b5ada1 !important;
}

.app-theme .empty-icon {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(244,238,228,.09) !important;
}

/* Flash messages / overlays */
.app-theme .flash,
.app-theme .alert,
.app-theme .flash-message {
  background: rgba(18,18,17,.94) !important;
  border-color: rgba(244,238,228,.11) !important;
  color: #f4eee4 !important;
  box-shadow: 0 18px 50px rgba(0,0,0,.35) !important;
}

.app-theme .dashboard-idea-popover summary {
  background: rgba(18,18,17,.88) !important;
  border-color: rgba(244,238,228,.12) !important;
  color: #f4eee4 !important;
  box-shadow: none !important;
}

.app-theme .dashboard-idea-popover summary:hover {
  background: rgba(255,255,255,.06) !important;
}

.app-theme .app-guide-backdrop {
  background: rgba(0,0,0,.70) !important;
}

.app-theme .app-guide-sheet {
  background: #151412 !important;
  border-color: rgba(244,238,228,.12) !important;
  color: #e9e1d7 !important;
  box-shadow: 0 28px 80px rgba(0,0,0,.55) !important;
}

.app-theme .app-guide-close {
  background: rgba(255,255,255,.05) !important;
  color: #f4eee4 !important;
  border-color: rgba(244,238,228,.12) !important;
}


.app-theme .site-footer {
  background: rgba(10,10,9,.72) !important;
  color: #766e66 !important;
  border-top-color: rgba(244,238,228,.08) !important;
}

.app-theme .site-footer a {
  color: #9f958b !important;
}

.app-theme .site-footer a:hover {
  color: #f4eee4 !important;
}

/* Smaller screens: keep the same visual language without making panels huge. */
@media (max-width: 900px) {
  .app-theme .app-page {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .app-theme .app-hero {
    border-radius: 12px !important;
  }

  .app-theme .app-card,
  .app-theme .settings-card,
  .app-theme .horse-recommendation-card,
  .app-theme .premium-hero-card,
  .app-theme .premium-showcase,
  .app-theme .result-card {
    border-radius: 10px !important;
  }
}

@media (max-width: 640px) {
  .app-theme .turnout-window-note {
    border-radius: 9px !important;
  }

  .app-theme .plan-ahead-status {
    min-height: 36px;
    padding-inline: .7rem;
  }

  .app-theme .get-app-card,
  .app-theme .install-app-card {
    min-height: 58px !important;
  }
}

/* =========================================================
   Final dark-theme consistency pass
   Keeps the app pages visually aligned with the homepage.
   ========================================================= */

.app-theme {
  color-scheme: dark;
}

/* Dashboard: no pale panels hiding on the dark canvas */
.app-theme .turnout-window-note {
  background: rgba(48, 78, 46, 0.18) !important;
  border: 1px solid rgba(112, 151, 91, 0.20) !important;
  color: #dce8d4 !important;
  box-shadow: none !important;
}
.app-theme .turnout-window-note strong {
  color: #dce8d4 !important;
}
.app-theme .turnout-window-note span {
  color: #9fb39a !important;
}

.app-theme .topbar-panel,
.app-theme .empty-state-card,
.app-theme .result-card,
.app-theme .horse-recommendation-card,
.app-theme .premium-insights-card {
  background: rgba(18, 13, 10, 0.72) !important;
  border-color: rgba(255, 218, 190, 0.12) !important;
  box-shadow: none !important;
}

/* Plan Ahead */
.app-theme .plan-ahead-card {
  background: rgba(16, 12, 10, 0.76) !important;
  border-color: rgba(255, 218, 190, 0.14) !important;
  box-shadow: none !important;
}

.app-theme .plan-ahead-panel {
  border-top-color: rgba(255, 218, 190, 0.10) !important;
}

.app-theme .plan-ahead-icon {
  color: #eee3d8 !important;
}

.app-theme .plan-ahead-summary-copy strong {
  color: #fff9f2 !important;
}
.app-theme .plan-ahead-summary-copy small {
  color: #a9988c !important;
}

.app-theme .plan-ahead-status {
  background: #f3eadf !important;
  color: #24130b !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
}
.app-theme .plan-ahead-status-arrow {
  color: #24130b !important;
}

.app-theme .plan-start-fieldset {
  background: #191310 !important;
  border-color: rgba(255, 218, 190, 0.13) !important;
}
.app-theme .plan-start-fieldset legend,
.app-theme .plan-time-field span {
  color: #ff9845 !important;
}
.app-theme .plan-radio-option span {
  background: #25201c !important;
  color: #b9aaa0 !important;
  border-color: rgba(255, 218, 190, 0.13) !important;
}
.app-theme .plan-radio-option input:checked + span {
  background: #f07a2d !important;
  color: #180b06 !important;
  border-color: #f07a2d !important;
}
.app-theme .plan-time-field input {
  background: #211914 !important;
  color: #fff9f2 !important;
  border-color: rgba(255, 218, 190, 0.15) !important;
  color-scheme: dark;
}
.app-theme .plan-time-field input:disabled {
  background: #16110e !important;
  color: #766960 !important;
  border-color: rgba(255, 218, 190, 0.08) !important;
}
.app-theme .plan-ahead-submit {
  background: linear-gradient(135deg, #ff9845, #f07a2d) !important;
  color: #1b0b06 !important;
  box-shadow: 0 10px 24px rgba(240, 122, 45, 0.16) !important;
}
.app-theme .plan-ahead-hint,
.app-theme .plan-ahead-limit {
  color: #ad9b90 !important;
}
.app-theme .plan-ahead-result {
  background: rgba(70, 105, 64, 0.16) !important;
  border-color: rgba(112, 151, 91, 0.20) !important;
}
.app-theme .plan-ahead-result strong {
  color: #dce8d4 !important;
}
.app-theme .plan-ahead-result span,
.app-theme .plan-ahead-result small {
  color: #aebda9 !important;
}

/* Settings / reminder controls */
.app-theme .notification-setting-row,
.app-theme .notification-toggle-row {
  background: #171311 !important;
  border-color: rgba(255, 218, 190, 0.10) !important;
  box-shadow: none !important;
}
.app-theme .notification-toggle-copy strong {
  color: #fff9f2 !important;
}
.app-theme .notification-toggle-copy small {
  color: #9f8e82 !important;
}
.app-theme .notification-time-row {
  background: #211914 !important;
  border-top-color: rgba(255, 218, 190, 0.10) !important;
}
.app-theme .notification-time-row label {
  color: #cdbdb1 !important;
}
.app-theme .notification-time-row input[type="time"] {
  background: #2a2019 !important;
  color: #fff9f2 !important;
  border-color: rgba(255, 218, 190, 0.18) !important;
  box-shadow: none !important;
  color-scheme: dark;
}
.app-theme .notification-time-row input[type="time"]:focus-visible {
  outline-color: rgba(240, 122, 45, 0.30) !important;
}
.app-theme .toggle-slider {
  background: #30251e !important;
  border-color: rgba(255, 218, 190, 0.12) !important;
}
.app-theme .toggle-switch input:checked + .toggle-slider {
  background: #52704f !important;
  border-color: #648762 !important;
}
.app-theme .toggle-slider::before {
  background: #fff9f2 !important;
}

/* All native form controls on the dark app theme */
.app-theme input[type="date"],
.app-theme input[type="datetime-local"],
.app-theme input[type="month"],
.app-theme input[type="time"],
.app-theme input[type="week"],
.app-theme input[type="search"] {
  background: #211914 !important;
  color: #fff9f2 !important;
  border-color: rgba(255, 218, 190, 0.15) !important;
  color-scheme: dark;
}

/* Location cards / map previews */
.app-theme .location-choice-card {
  background: rgba(18, 13, 10, 0.76) !important;
  border-color: rgba(255, 218, 190, 0.11) !important;
  box-shadow: none !important;
}
.app-theme .location-choice-card:hover,
.app-theme .location-choice-card:has(input:checked) {
  border-color: rgba(240, 122, 45, 0.52) !important;
  box-shadow: none !important;
}
.app-theme .location-map-preview {
  background: #17100c !important;
  border-color: rgba(255, 218, 190, 0.12) !important;
  box-shadow: none !important;
}
.app-theme .location-choice-copy strong {
  color: #fff9f2 !important;
}
.app-theme .location-choice-copy em {
  color: #9f8e82 !important;
}
.app-theme .location-map-pin {
  border-color: #f7efe6 !important;
}
.app-theme .location-map-pin::after {
  background: #f7efe6 !important;
}

/* Forecast / analytics: dark, readable, restrained */
.app-theme .forecast-section .result-card {
  background: rgba(18, 13, 10, 0.76) !important;
  border-color: rgba(255, 218, 190, 0.12) !important;
  box-shadow: none !important;
}
.app-theme .weather-tabs {
  background: #171311 !important;
  border-color: rgba(255, 218, 190, 0.12) !important;
  box-shadow: none !important;
}
.app-theme .tab-button {
  color: #a9988c !important;
}
.app-theme .tab-button.active {
  background: #2b201a !important;
  color: #fff9f2 !important;
}
.app-theme .forecast-item,
.app-theme .premium-timeline-item,
.app-theme .insight-metric-card {
  background: #191614 !important;
  border-color: rgba(255, 218, 190, 0.10) !important;
  box-shadow: none !important;
}
.app-theme .forecast-item strong,
.app-theme .premium-timeline-item strong,
.app-theme .insight-metric-card strong {
  color: #fff9f2 !important;
}
.app-theme .forecast-item span,
.app-theme .forecast-item small,
.app-theme .premium-timeline-item small,
.app-theme .premium-timeline-item em,
.app-theme .insight-metric-card span,
.app-theme .insight-metric-card small {
  color: #a9988c !important;
}
.app-theme .risk-reason-item,
.app-theme .care-tip-item {
  background: #191614 !important;
  border-color: rgba(255, 218, 190, 0.10) !important;
}
.app-theme .risk-reason-item p,
.app-theme .care-tip-item p {
  color: #bbaea4 !important;
}
.app-theme .premium-insights-card {
  background: rgba(18, 13, 10, 0.76) !important;
}
.app-theme .insight-summary-panel {
  background: #211914 !important;
  border-color: rgba(255, 218, 190, 0.12) !important;
}
.app-theme .insight-summary-panel h4 {
  color: #fff9f2 !important;
}
.app-theme .insight-summary-panel p {
  color: #c7b6a9 !important;
}
.app-theme .risk-reasons-block,
.app-theme .care-tips-block,
.app-theme .premium-timeline-block {
  color: var(--rw-text);
}

/* App-install widget */
.app-theme .get-app-card {
  background: #171311 !important;
  border-color: rgba(255, 218, 190, 0.12) !important;
  box-shadow: none !important;
  color: #fff9f2 !important;
}
.app-theme .get-app-card:hover {
  background: #211914 !important;
  border-color: rgba(240, 122, 45, 0.28) !important;
}
.app-theme .get-app-copy strong {
  color: #fff9f2 !important;
}
.app-theme .get-app-copy small {
  color: #9f8e82 !important;
}
.app-theme .get-app-label {
  color: #ff9845 !important;
}
.app-theme .get-app-icon {
  background: #2b1a12 !important;
  box-shadow: none !important;
}

/* Suggestion box */
.app-theme .dashboard-idea-popover summary {
  background: #f3eadf !important;
  color: #24130b !important;
  border-color: rgba(255,255,255,.18) !important;
  box-shadow: none !important;
}
.app-theme .dashboard-idea-popover summary span {
  background: rgba(240,122,45,.16) !important;
}
.app-theme .dashboard-idea-panel {
  background: #211914 !important;
  border-color: rgba(255,218,190,.16) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.48) !important;
}
.app-theme .dashboard-idea-panel h2 {
  color: #fff9f2 !important;
}
.app-theme .dashboard-idea-panel p,
.app-theme .dashboard-idea-actions small {
  color: #b9aaa0 !important;
}
.app-theme .dashboard-idea-panel label {
  color: #ff9845 !important;
}
.app-theme .dashboard-idea-panel textarea {
  background: #120f0d !important;
  color: #fff9f2 !important;
  border-color: rgba(255,218,190,.16) !important;
}
.app-theme .dashboard-idea-panel textarea::placeholder {
  color: #75675f !important;
}
.app-theme .dashboard-idea-panel textarea:focus {
  background: #171311 !important;
  border-color: rgba(240,122,45,.55) !important;
  box-shadow: 0 0 0 4px rgba(240,122,45,.12) !important;
}
.app-theme .dashboard-idea-close {
  background: #30231b !important;
  color: #f7efe6 !important;
}
.app-theme .dashboard-idea-close:hover {
  background: rgba(240,122,45,.18) !important;
}

/* Account / generic settings surfaces */
.app-theme .meta-list div,
.app-theme .location-summary,
.app-theme .subscription-notice,
.app-theme .suggestion-chevron,
.app-theme .collapsible-chevron {
  background: #211914 !important;
  color: #fff9f2 !important;
}
.app-theme .meta-list dt,
.app-theme .location-summary span {
  color: #a9988c !important;
}
.app-theme .meta-list dd,
.app-theme .location-summary strong {
  color: #fff9f2 !important;
}
.app-theme .suggestion-form textarea,
.app-theme .suggestion-form input,
.app-theme .collapsible-settings-body input,
.app-theme .collapsible-settings-body select {
  background: #171311 !important;
  color: #fff9f2 !important;
  border-color: rgba(255,218,190,.14) !important;
}

/* Remove accidental pale surfaces from the shared app theme */
.app-theme .surface-light,
.app-theme .light-panel {
  background: #171311 !important;
  color: #fff9f2 !important;
}


/* Final UI fixes */
/* Dashboard suggestion button: keep the lightbulb control dark in the dark app theme. */
.app-theme .dashboard-idea-popover summary {
  background: #211914 !important;
  color: #fff9f2 !important;
  border-color: rgba(255,218,190,.14) !important;
  box-shadow: none !important;
}

.app-theme .dashboard-idea-popover summary span {
  background: #382318 !important;
  border: 1px solid rgba(240,122,45,.20) !important;
  color: #ffb06b !important;
}

.app-theme .dashboard-idea-popover summary:hover {
  background: #2a1d16 !important;
}

/* Premium preview / FAQ: explicitly override legacy light-theme colours so no copy disappears. */
.app-theme .premium-page .premium-feedback-preview {
  background: #211914 !important;
  border-color: rgba(255,218,190,.14) !important;
  color: #e9e1d7 !important;
  box-shadow: none !important;
}

.app-theme .premium-page .premium-feedback-preview span {
  color: #ff9845 !important;
}

.app-theme .premium-page .premium-feedback-preview strong {
  color: #fff9f2 !important;
}

.app-theme .premium-page .premium-feedback-buttons button {
  background: #2a2019 !important;
  border-color: rgba(255,218,190,.14) !important;
  color: #e9e1d7 !important;
}

.app-theme .premium-page .premium-feedback-buttons button:first-child {
  background: rgba(83,112,79,.26) !important;
  border-color: rgba(112,151,91,.30) !important;
  color: #dce8d4 !important;
}

.app-theme .premium-page .premium-feedback-preview p {
  color: #b9aaa0 !important;
}

.app-theme .premium-page .locked-preview-overlay {
  background: linear-gradient(180deg, rgba(32,25,20,.94), rgba(24,18,14,.98)) !important;
  border-color: rgba(255,218,190,.14) !important;
}

.app-theme .premium-page .locked-preview-overlay span {
  color: #f7efe6 !important;
}

.app-theme .premium-page .locked-preview-locked .locked-metric,
.app-theme .premium-page .locked-preview-locked .locked-line {
  background: linear-gradient(180deg, #211914, #191411) !important;
  border-color: rgba(255,218,190,.10) !important;
}

.app-theme .premium-page .locked-preview-locked .locked-metric::before,
.app-theme .premium-page .locked-preview-locked .locked-metric::after,
.app-theme .premium-page .locked-preview-locked .locked-line::before,
.app-theme .premium-page .locked-preview-locked .locked-line::after {
  background: rgba(255,218,190,.12) !important;
}

.app-theme .premium-page .premium-faq .section-heading h2 {
  color: #f4eee4 !important;
}

.app-theme .premium-page .premium-faq-grid article {
  background: #211914 !important;
  border-color: rgba(255,218,190,.11) !important;
  color: #e9e1d7 !important;
  box-shadow: none !important;
}

.app-theme .premium-page .premium-faq-grid h3 {
  color: #f4eee4 !important;
}

.app-theme .premium-page .premium-faq-grid p {
  color: #b9aaa0 !important;
}

