/* Global selectable color themes. Loaded last so every area inherits the active palette. */
:root,
body[data-theme="turkuaz"] {
  --theme-bg:#f2f9f8;
  --theme-bg-2:#e3f3f0;
  --theme-surface:#ffffff;
  --theme-surface-soft:#f7fcfb;
  --theme-surface-muted:#e4f2ef;
  --theme-text:#132c28;
  --theme-muted:#617972;
  --theme-line:#cfe5df;
  --theme-primary:#167c72;
  --theme-primary-2:#35a79b;
  --theme-primary-3:#0e514b;
  --theme-accent:#78cec3;
  --theme-rgb:22,124,114;
  --theme-soft-rgb:120,206,195;
}
body[data-theme="yavru-agzi"] {
  --theme-bg:#fff7f3;
  --theme-bg-2:#fde9df;
  --theme-surface:#ffffff;
  --theme-surface-soft:#fffaf7;
  --theme-surface-muted:#fde8df;
  --theme-text:#3b2420;
  --theme-muted:#80665f;
  --theme-line:#f1d5ca;
  --theme-primary:#d87962;
  --theme-primary-2:#e99b86;
  --theme-primary-3:#9e4f3d;
  --theme-accent:#f3b8a5;
  --theme-rgb:216,121,98;
  --theme-soft-rgb:243,184,165;
}
body[data-theme="acik-pembe"] {
  --theme-bg:#fff6fa;
  --theme-bg-2:#fce7f1;
  --theme-surface:#ffffff;
  --theme-surface-soft:#fffafd;
  --theme-surface-muted:#fbe7f0;
  --theme-text:#3b2230;
  --theme-muted:#806575;
  --theme-line:#efd2df;
  --theme-primary:#d56b9b;
  --theme-primary-2:#e790b6;
  --theme-primary-3:#9c426d;
  --theme-accent:#f2b5cf;
  --theme-rgb:213,107,155;
  --theme-soft-rgb:242,181,207;
}
body[data-theme="lila"] {
  --theme-bg:#f8f5ff;
  --theme-bg-2:#ece5fb;
  --theme-surface:#ffffff;
  --theme-surface-soft:#fbf9ff;
  --theme-surface-muted:#eee8fa;
  --theme-text:#2d2540;
  --theme-muted:#716784;
  --theme-line:#ddd4ef;
  --theme-primary:#8067b7;
  --theme-primary-2:#a48bd5;
  --theme-primary-3:#594483;
  --theme-accent:#c3b0e8;
  --theme-rgb:128,103,183;
  --theme-soft-rgb:195,176,232;
}

body[data-theme="zumrut"] {
  --theme-bg:#f3faf7; --theme-bg-2:#e2f3ec; --theme-surface:#ffffff; --theme-surface-soft:#f8fcfa; --theme-surface-muted:#e1f2ec;
  --theme-text:#17332b; --theme-muted:#637c74; --theme-line:#cce5dc; --theme-primary:#21886f; --theme-primary-2:#46a98f; --theme-primary-3:#145c4b; --theme-accent:#70c7ae;
  --theme-rgb:33,136,111; --theme-soft-rgb:112,199,174;
}
body[data-theme="buz-mavisi"] {
  --theme-bg:#f4f9fc; --theme-bg-2:#e5f1f7; --theme-surface:#ffffff; --theme-surface-soft:#f9fcfe; --theme-surface-muted:#e7f3f9;
  --theme-text:#173246; --theme-muted:#657986; --theme-line:#d0e3ee; --theme-primary:#4f91bd; --theme-primary-2:#75abd0; --theme-primary-3:#2d668c; --theme-accent:#9cc8e1;
  --theme-rgb:79,145,189; --theme-soft-rgb:156,200,225;
}
body[data-theme="vanilya"] {
  --theme-bg:#fffaf0; --theme-bg-2:#f9edcf; --theme-surface:#ffffff; --theme-surface-soft:#fffdf8; --theme-surface-muted:#fbf3d9;
  --theme-text:#3b301c; --theme-muted:#80735c; --theme-line:#eadcb8; --theme-primary:#b98b3d; --theme-primary-2:#d5aa58; --theme-primary-3:#7d5a20; --theme-accent:#e5c77c;
  --theme-rgb:185,139,61; --theme-soft-rgb:229,199,124;
}
body[data-theme="adacayi"] {
  --theme-bg:#f7faf5; --theme-bg-2:#eaf0e6; --theme-surface:#ffffff; --theme-surface-soft:#fbfcfa; --theme-surface-muted:#e9f0e6;
  --theme-text:#283329; --theme-muted:#707b6e; --theme-line:#d7e1d2; --theme-primary:#708f72; --theme-primary-2:#8faa8e; --theme-primary-3:#4c674e; --theme-accent:#acc5a9;
  --theme-rgb:112,143,114; --theme-soft-rgb:172,197,169;
}
body[data-theme="gul-kurusu"] {
  --theme-bg:#fcf6f7; --theme-bg-2:#f3e4e8; --theme-surface:#ffffff; --theme-surface-soft:#fefafb; --theme-surface-muted:#f4e4e8;
  --theme-text:#3a292e; --theme-muted:#7d6b70; --theme-line:#e6cfd5; --theme-primary:#a76474; --theme-primary-2:#c17f90; --theme-primary-3:#74404d; --theme-accent:#d8a1ad;
  --theme-rgb:167,100,116; --theme-soft-rgb:216,161,173;
}
body[data-theme="mercan"] {
  --theme-bg:#fff7f5; --theme-bg-2:#fbe6e2; --theme-surface:#ffffff; --theme-surface-soft:#fffaf9; --theme-surface-muted:#fde5e1;
  --theme-text:#3d2523; --theme-muted:#816764; --theme-line:#efd1cc; --theme-primary:#d85f58; --theme-primary-2:#e77d72; --theme-primary-3:#9a3d38; --theme-accent:#f09589;
  --theme-rgb:216,95,88; --theme-soft-rgb:240,149,137;
}
body[data-theme="gece-moru"] {
  --theme-bg:#f8f6fb; --theme-bg-2:#ebe7f2; --theme-surface:#ffffff; --theme-surface-soft:#fbfaff; --theme-surface-muted:#ebe6f4;
  --theme-text:#2b2737; --theme-muted:#706a7c; --theme-line:#dcd5e8; --theme-primary:#66538f; --theme-primary-2:#806daa; --theme-primary-3:#43345f; --theme-accent:#9f8dc4;
  --theme-rgb:102,83,143; --theme-soft-rgb:159,141,196;
}
body[data-theme="safir"] {
  --theme-bg:#f4f8fc; --theme-bg-2:#e2edf7; --theme-surface:#ffffff; --theme-surface-soft:#f9fbfe; --theme-surface-muted:#e4eff8;
  --theme-text:#172c3f; --theme-muted:#647687; --theme-line:#cdddea; --theme-primary:#386fa4; --theme-primary-2:#5689b8; --theme-primary-3:#244e76; --theme-accent:#76a9d2;
  --theme-rgb:56,111,164; --theme-soft-rgb:118,169,210;
}

body[data-theme] {
  --bg:var(--theme-bg);
  --bg-2:var(--theme-bg-2);
  --surface:var(--theme-surface);
  --surface-soft:var(--theme-surface-soft);
  --surface-muted:var(--theme-surface-muted);
  --text:var(--theme-text);
  --muted:var(--theme-muted);
  --line:var(--theme-line);
  --primary:var(--theme-primary);
  --primary-2:var(--theme-primary-2);
  --primary-3:var(--theme-primary-3);
  --accent:var(--theme-accent);
  --shadow:0 22px 60px rgba(var(--theme-rgb),.11);
  --shadow-soft:0 8px 28px rgba(var(--theme-rgb),.08);
  background:
    radial-gradient(circle at 8% -10%, rgba(var(--theme-rgb),.11), transparent 28rem),
    radial-gradient(circle at 95% 10%, rgba(var(--theme-soft-rgb),.14), transparent 24rem),
    var(--theme-bg) !important;
}

/* Components that used fixed green/pink values now follow the selected palette. */
body[data-theme] ::selection { background:rgba(var(--theme-rgb),.22); }
body[data-theme] :focus-visible { outline-color:rgba(var(--theme-rgb),.28); }
body[data-theme] .topbar { border-bottom-color:var(--theme-line); box-shadow:0 8px 30px rgba(var(--theme-rgb),.06); }
body[data-theme] .nav a,
body[data-theme] .lang-switch a { color:var(--theme-muted); }
body[data-theme] .nav a.active,
body[data-theme] .lang-switch a.active,
body[data-theme] .nav a:hover,
body[data-theme] .lang-switch a:hover { background:var(--theme-surface-muted); color:var(--theme-primary-3); }
body[data-theme] .brand-mark-image { box-shadow:0 6px 18px rgba(var(--theme-rgb),.12); }
body[data-theme] .btn:hover,
body[data-theme] a.btn:hover,
body[data-theme] button:hover { box-shadow:0 8px 18px rgba(var(--theme-rgb),.18); }
body[data-theme] .btn-secondary:hover,
body[data-theme] a.btn-secondary:hover,
body[data-theme] .btn-outline:hover,
body[data-theme] a.btn-outline:hover,
body[data-theme] .btn-soft:hover,
body[data-theme] a.btn-soft:hover { background:var(--theme-surface-muted)!important; border-color:var(--theme-accent)!important; }
body[data-theme] .btn-soft { background:var(--theme-surface-muted); border-color:var(--theme-line); }
body[data-theme] label { color:var(--theme-primary-3); }
body[data-theme] input:focus,
body[data-theme] textarea:focus,
body[data-theme] select:focus { box-shadow:0 0 0 4px rgba(var(--theme-rgb),.12); }
body[data-theme] .home-hero-card { background:linear-gradient(115deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.91) 55%,rgba(var(--theme-soft-rgb),.24) 100%); }
body[data-theme] .home-hero-card::after { background:rgba(var(--theme-rgb),.09); box-shadow:-55px -65px 0 rgba(var(--theme-soft-rgb),.12); }
body[data-theme] .profile-card { background:linear-gradient(145deg,var(--theme-primary),var(--theme-primary-3)); }
body[data-theme] .table th { background:var(--theme-surface-muted); color:var(--theme-primary-3); }
body[data-theme] .day-pill,
body[data-theme] .group-link.active,
body[data-theme] .form-studio-sidebar .group-link.active,
body[data-theme] .badge.info { background:var(--theme-surface-muted); color:var(--theme-primary-3); border-color:var(--theme-line); }
body[data-theme] .client-avatar { color:var(--theme-primary-3); border-color:var(--theme-line); }
body[data-theme] .avatar-fallback { background:linear-gradient(135deg,var(--theme-primary-2),var(--theme-primary)); }
body[data-theme] .feed-item,
body[data-theme] .task-item,
body[data-theme] .appointment-item,
body[data-theme] .note-item,
body[data-theme] .metric,
body[data-theme] .stat-card,
body[data-theme] .feature-card,
body[data-theme] .tiny-card,
body[data-theme] .client-item,
body[data-theme] .option-editor-item { background:linear-gradient(180deg,#fff,var(--theme-surface-soft)); }
body[data-theme] .client-menu-toggle,
body[data-theme] .client-menu-close { color:var(--theme-primary-3); }
body[data-theme] .client-menu-links a:hover,
body[data-theme] .client-menu-links a:focus { background:var(--theme-surface-muted); }
body[data-theme] .client-app-bottom-nav a.active { color:var(--theme-primary); }
body[data-theme] .client-app-bottom-nav a.active::before { background:var(--theme-primary); }
body[data-theme] .site-settings-nav button:hover,
body[data-theme] .site-settings-nav button.active { color:var(--theme-primary-3); }

/* Theme chooser */
.theme-picker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0 22px}
.theme-choice{position:relative;display:block;margin:0;cursor:pointer}
.theme-choice input{position:absolute;opacity:0;pointer-events:none}
.theme-choice-card{display:grid;grid-template-columns:76px 1fr auto;gap:14px;align-items:center;min-height:96px;padding:14px;border:2px solid var(--line);border-radius:18px;background:#fff;transition:.18s ease;box-shadow:var(--shadow-soft)}
.theme-choice:hover .theme-choice-card{transform:translateY(-2px);border-color:var(--theme-accent)}
.theme-choice input:checked + .theme-choice-card{border-color:var(--primary);box-shadow:0 0 0 4px rgba(var(--theme-rgb),.12),var(--shadow-soft)}
.theme-swatch{width:76px;height:64px;border-radius:14px;border:1px solid rgba(0,0,0,.05);overflow:hidden;display:grid;grid-template-columns:1fr 1fr}
.theme-swatch span{display:block}
.theme-swatch span:first-child{grid-row:1 / span 2}
.theme-choice-card strong{display:block;color:var(--text);font-size:1rem}
.theme-choice-card small{display:block;color:var(--muted);margin-top:3px;font-weight:600}
.theme-check{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:var(--surface-muted);color:transparent;font-size:.85rem}
.theme-choice input:checked + .theme-choice-card .theme-check{background:var(--primary);color:#fff}
@media(max-width:760px){.theme-picker-grid{grid-template-columns:1fr}.theme-choice-card{grid-template-columns:64px 1fr auto}.theme-swatch{width:64px;height:58px}}


/* Authenticated client area: force the selected global palette through the mobile-app layer. */
body.customer-auth[data-theme] {
  --app-bg:var(--theme-bg) !important;
  --app-card:var(--theme-surface) !important;
  --app-card-soft:var(--theme-surface-soft) !important;
  --app-ink:var(--theme-text) !important;
  --app-muted:var(--theme-muted) !important;
  --app-line:var(--theme-line) !important;
  --app-brand:var(--theme-primary) !important;
  --app-brand-dark:var(--theme-primary-3) !important;
  --app-brand-soft:var(--theme-surface-muted) !important;
  color:var(--theme-text) !important;
  background:var(--theme-bg) !important;
}
body.customer-auth[data-theme] .page,
body.customer-auth[data-theme] .client-app-shell { background:var(--theme-bg) !important; }
body.customer-auth[data-theme] .app-progress-card,
body.customer-auth[data-theme] .client-dashboard-hero,
body.customer-auth[data-theme] .profile-card { background:linear-gradient(145deg,var(--theme-primary-3),var(--theme-primary)) !important; }
body.customer-auth[data-theme] .app-card,
body.customer-auth[data-theme] .app-section,
body.customer-auth[data-theme] .dashboard-card,
body.customer-auth[data-theme] .client-finance-card,
body.customer-auth[data-theme] .mobile-booked-slots article,
body.customer-auth[data-theme] .client-appointment-card,
body.customer-auth[data-theme] .app-panel,
body.customer-auth[data-theme] .daily-checkin-sheet,
body.customer-auth[data-theme] .wisdom-panel,
body.customer-auth[data-theme] .reading-panel,
body.customer-auth[data-theme] .profile-panel {
  background:var(--theme-surface) !important;
  border-color:var(--theme-line) !important;
  box-shadow:0 8px 28px rgba(var(--theme-rgb),.08) !important;
}
body.customer-auth[data-theme] .app-quick-actions > *,
body.customer-auth[data-theme] .wisdom-category-grid > button,
body.customer-auth[data-theme] .reading-category-chips button,
body.customer-auth[data-theme] .mobile-slot-picker form,
body.customer-auth[data-theme] .daily-score-grid > div {
  background:var(--theme-surface-muted) !important;
  border-color:var(--theme-line) !important;
  color:var(--theme-primary-3) !important;
}
body.customer-auth[data-theme] .app-quick-actions .app-action-icon,
body.customer-auth[data-theme] .wisdom-category-grid > button strong,
body.customer-auth[data-theme] .reading-category-chips button.active,
body.customer-auth[data-theme] .reading-app-tabs button.active {
  color:var(--theme-primary-3) !important;
}
body.customer-auth[data-theme] .reading-category-chips button.active,
body.customer-auth[data-theme] .reading-app-tabs button.active,
body.customer-auth[data-theme] .wisdom-steps span.active b,
body.customer-auth[data-theme] .client-app-bottom-nav a.active::before {
  background:var(--theme-primary) !important;
  border-color:var(--theme-primary) !important;
}
body.customer-auth[data-theme] .wisdom-steps span.active,
body.customer-auth[data-theme] .client-app-bottom-nav a.active,
body.customer-auth[data-theme] .app-card-label,
body.customer-auth[data-theme] .overline { color:var(--theme-primary) !important; }
body.customer-auth[data-theme] input,
body.customer-auth[data-theme] textarea,
body.customer-auth[data-theme] select {
  color:var(--theme-text) !important;
  background:var(--theme-surface) !important;
  border-color:var(--theme-line) !important;
}
body.customer-auth[data-theme] input:focus,
body.customer-auth[data-theme] textarea:focus,
body.customer-auth[data-theme] select:focus {
  border-color:var(--theme-primary) !important;
  box-shadow:0 0 0 4px rgba(var(--theme-rgb),.12) !important;
}
body.customer-auth[data-theme] .btn-soft,
body.customer-auth[data-theme] .btn-secondary,
body.customer-auth[data-theme] .btn-outline,
body.customer-auth[data-theme] .app-profile-button {
  color:var(--theme-primary-3) !important;
  background:var(--theme-surface-muted) !important;
  border-color:var(--theme-line) !important;
}
body.customer-auth[data-theme] .client-menu-panel,
body.customer-auth[data-theme] .client-menu-head,
body.customer-auth[data-theme] .client-app-bottom-nav {
  background:rgba(255,255,255,.97) !important;
  border-color:var(--theme-line) !important;
}
body.customer-auth[data-theme] .client-menu-links a:hover,
body.customer-auth[data-theme] .client-menu-links a:focus { background:var(--theme-surface-muted) !important; }
body.customer-auth[data-theme] .client-menu-toggle,
body.customer-auth[data-theme] .client-menu-close { color:var(--theme-primary-3) !important; }
body.customer-auth[data-theme] .wisdom-stage,
body.customer-auth[data-theme] .reading-stage {
  background:radial-gradient(circle at 0 0,rgba(var(--theme-rgb),.10),transparent 230px),radial-gradient(circle at 100% 16%,rgba(var(--theme-soft-rgb),.13),transparent 210px),var(--theme-surface-soft) !important;
}
