@import url("fonts.css");

:root {
    color-scheme: light;
    --page: #f5f7f8;
    --surface: #ffffff;
    --surface-soft: #f4f6f8;
    --ink: #252b32;
    --muted: #5d6c7e;
    --line: #d9dfe7;
    --accent: #3aa58c;
    --accent-dark: #287d6a;
    --accent-soft: #e8f5f1;
    --shadow: 0 10px 30px rgb(25 45 48 / 7%);
}

[data-theme="dark"] {
    color-scheme: dark;
    --page: #142124;
    --surface: #1c2d30;
    --surface-soft: #24383b;
    --ink: #f0f6f4;
    --muted: #b3c5c0;
    --line: #3a5051;
    --accent: #63c6aa;
    --accent-dark: #80d9bf;
    --accent-soft: #24463e;
    --shadow: 0 12px 32px rgb(0 0 0 / 24%);
}

* { box-sizing: border-box; scrollbar-width: none; }
*::-webkit-scrollbar:vertical { width: 0; }
.hour-grid, .section-links { scrollbar-width: thin; }
body {
    display: flex;
    flex-direction: column;
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: "پیدا", Tahoma, sans-serif;
    font-weight: 400;
    line-height: 1.6;
}
h1, h2, h3, strong { font-weight: 500; }
a { color: inherit; }
button, input, select, textarea { font: inherit; -webkit-tap-highlight-color: transparent; }
button:focus,
button:focus-visible,
button:active,
input:focus,
input:focus-visible,
input:active,
select:focus,
select:focus-visible,
select:active,
textarea:focus,
textarea:focus-visible,
textarea:active,
a.primary-button:focus,
a.primary-button:focus-visible,
a.primary-button:active,
a.secondary-button:focus,
a.secondary-button:focus-visible,
a.secondary-button:active {
    outline: none;
    box-shadow: none;
}

.site-header, .site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(16px, 4vw, 48px);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.site-header { position: sticky; top: 0; z-index: 20; min-height: 72px; }
.site-nav, .header-actions, .site-footer nav { display: flex; align-items: center; gap: 8px; }
.site-nav { gap: 4px; }
.site-nav a, .site-footer a { padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: 14px; text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.site-footer { margin-top: 0; border-top: 1px solid var(--line); border-bottom: 0; color: var(--muted); font-size: 13px; }
.site-footer strong, .site-footer span { display: block; }
.site-footer strong { color: var(--ink); font-size: 16px; }
.brand, .header-actions { display: flex; align-items: center; gap: 12px; }
.brand { font-size: 18px; font-weight: 800; text-decoration: none; }
.brand-mark, .avatar { display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; }
.brand-mark { width: 38px; height: 38px; }
.header-link, .theme-toggle { color: var(--muted); font-size: 14px; text-decoration: none; }
.header-link.header-link--solid { padding: 8px 12px; border-radius: 10px; background: var(--accent); color: #fff; }
.theme-toggle { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.theme-toggle .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle .theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-toggle__sun { display: inline-block; }
body > main { flex: 1 0 auto; }
.page-content { width: min(1180px, 100% - 32px); margin-inline: auto; padding-block: 36px; }

.profile-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.profile-sidebar, .profile-main, .login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.profile-sidebar { padding: 16px; }
.profile-identity { display: flex; align-items: center; gap: 12px; padding: 8px 4px 20px; border-bottom: 1px solid var(--line); }
.profile-identity .theme-toggle { margin-inline-start: auto; flex: none; }
.app-shell .page-content { min-height: 100vh; padding-top: 20px; }
.profile-identity--bar { display: none; }
.avatar { width: 48px; height: 48px; flex: none; font-size: 19px; }
@font-face {
    font-family: "Material Symbols Outlined";
    font-style: normal;
    font-weight: 100 700;
    font-display: block;
    src: url("../unfold/fonts/material-symbols/Material-Symbols-Outlined.woff2") format("woff2");
}
.material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-weight: 100;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
    font-feature-settings: "liga";
    -webkit-font-feature-settings: "liga";
    font-variation-settings: "FILL" 0, "wght" 100, "GRAD" -25, "opsz" 24;
}
.profile-menu__item.is-active .material-symbols-outlined,
.mobile-profile-nav .is-active .material-symbols-outlined,
.primary-button .material-symbols-outlined,
.secondary-button .material-symbols-outlined {
    font-weight: 100;
    font-variation-settings: "FILL" 0, "wght" 100, "GRAD" -25, "opsz" 24;
}
.avatar--icon .material-symbols-outlined { font-size: 28px; }
.profile-identity strong, .profile-identity div > span:not(.badge) { display: block; }
.profile-identity > div { min-width: 0; }
.profile-identity strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-identity div span:not(.badge) { color: var(--muted); font-size: 13px; }
.profile-identity__email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu { display: grid; gap: 6px; padding-top: 14px; }
.profile-menu__item { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; }
.profile-menu__item > .material-symbols-outlined { width: 24px; font-size: 22px; text-align: center; }
.profile-menu__item.is-active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 500; }
.profile-menu__item.is-disabled { cursor: default; opacity: .68; }
.logout-form { margin: 8px 0 0; }
.logout-form--compact { display: inline; margin: 0; }
.logout-form__button { width: 100%; border: 0; background: transparent; cursor: pointer; font: inherit; text-align: start; }
.section-links__button, .header-actions .logout-form__button { width: auto; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.profile-menu__item small { margin-inline-start: auto; color: var(--muted); font-size: 10px; }
.profile-main { min-height: 420px; padding: clamp(20px, 4vw, 36px); }
.eyebrow { margin: 0 0 4px; color: var(--accent-dark); font-size: 13px; font-weight: 700; }
.breadcrumb { margin: 0 0 12px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-inline: 8px; color: var(--muted); }
.breadcrumb a { color: var(--accent-dark); font-weight: 500; text-decoration: none; }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 500; }
h1 { margin: 0 0 24px; font-size: clamp(24px, 3vw, 32px); line-height: 1.35; }
.welcome-line { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 18px; font-weight: 500; }
.welcome-line .material-symbols-outlined { color: var(--muted); font-size: 22px; }
.muted { margin: 4px 0 0; color: var(--muted); }
.overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.overview-card { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; font-size: 14px; font-weight: 500; }
.overview-card__icon { color: var(--muted); font-size: 20px; }
.coming-soon { display: inline-flex; margin-top: 14px; padding: 3px 9px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.mobile-profile-nav { display: none; }

.login-card { width: min(460px, 100%); margin: 24px auto; padding: clamp(22px, 5vw, 40px); }
.login-card form { display: grid; gap: 10px; margin-top: 22px; }
.login-card label { margin-top: 6px; font-size: 14px; font-weight: 700; }
.login-card input:not([type="checkbox"]):not([type="radio"]),
.login-card select,
.login-card textarea,
.stack-form input:not([type="checkbox"]):not([type="radio"]),
.stack-form select,
.stack-form textarea { width: 100%; min-height: 46px; padding: 9px 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.login-card textarea, .stack-form textarea { min-height: 96px; resize: vertical; }
.login-card h2, .profile-main h2 { margin: 18px 0 8px; font-size: 18px; }
.login-card--wide { width: min(760px, 100%); }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding-inline: 16px; border-radius: 10px; font-weight: 500; text-decoration: none; }
.primary-button { margin-top: 10px; border: 0; background: var(--accent); color: #fff; cursor: pointer; }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.field-help, .auth-switch { margin: 0; color: var(--muted); font-size: 13px; }
.auth-switch { margin-top: 16px; }
.auth-switch a { color: var(--accent-dark); font-weight: 700; }
.form-error { padding: 10px 12px; border-radius: 10px; background: #fff0ee; color: #9e3025; font-size: 13px; }
[data-theme="dark"] .form-error { background: #472d2c; color: #ffd2cc; }

@media (max-width: 760px) {
    .site-header { min-height: 62px; }
    .page-content { width: min(100% - 24px, 620px); padding-block: 22px 96px; }
    .profile-shell { display: block; }
    .profile-sidebar { display: none; }
    .profile-identity--bar { display: flex; margin-bottom: 16px; padding: 0 0 16px; }
    .profile-main { min-height: 0; padding: 22px 16px; }
    .overview-grid { grid-template-columns: 1fr; }
    .app-shell .page-content { width: min(100% - 20px, 640px); padding: 12px 0 calc(92px + env(safe-area-inset-bottom)); }
    .app-shell .profile-main { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 0; }
    .app-shell .profile-identity--bar { margin-bottom: 12px; }
    .mobile-profile-nav { position: fixed; z-index: 10; inset-inline: 0; bottom: 0; display: flex; justify-content: center; gap: 0; padding: 6px 8px max(8px, env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); border-radius: 0; background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: none; backdrop-filter: blur(12px); }
    .mobile-profile-nav a { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; max-width: 96px; min-height: 52px; padding: 2px 0; color: var(--muted); font-size: 11px; line-height: 1.2; text-align: center; text-decoration: none; }
    .mobile-profile-nav .material-symbols-outlined { display: block; width: auto; min-width: 0; font-size: 22px; text-align: center; }
    .mobile-profile-nav .is-active { color: var(--accent-dark); font-weight: 500; }
    .section-links { flex-wrap: wrap; justify-content: center; overflow: visible; }
    .section-links a, .section-links form, .section-links button { flex: none; }
    .stack-form .primary-button, .record-card .primary-button, .record-card .secondary-button, .record-card .danger-button { width: 100%; }
    .button-row, .button-row form { width: 100%; }
    .calendar { gap: 4px; }
    .calendar__day { min-height: 48px; padding: 3px; }
    .calendar__name, .calendar__day strong { font-size: 11px; }
    .hour-grid { margin-inline: -4px; }
    body:has(.mobile-profile-nav) .site-footer { padding-bottom: 92px; }
    .site-footer { align-items: flex-start; flex-direction: column; }
    .site-header { flex-wrap: wrap; row-gap: 8px; }
    .site-nav { order: 3; flex: 1 0 100%; justify-content: space-between; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.landing { width: 100%; }
.landing-wrap { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.landing h2 { margin: 0 0 12px; font-size: clamp(22px, 3vw, 28px); line-height: 1.35; }
.hero { padding: 56px 0 36px; background: radial-gradient(520px 220px at 100% 0%, var(--accent-soft), transparent 70%); }
.hero__lead { max-width: 38rem; margin: 0; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero__actions .primary-button { margin-top: 0; }
.landing-section { padding: 28px 0 36px; }
.landing-section--soft { background: color-mix(in srgb, var(--accent-soft) 55%, var(--page)); }
.about-layout, .faq-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.about-points { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.install-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.install-row h2 { margin: 0; font-size: 18px; }
.install-row .primary-button { margin-top: 0; flex: none; }
.install-steps { margin: 8px 0 0; padding-inline-start: 18px; color: var(--muted); font-size: 14px; }
.install-steps li { margin: 8px 0; }
.about-points li, .therapist-card, .schedule__day, .stat-row div { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.about-points li { display: grid; gap: 4px; padding: 14px 16px; }
.about-points span, .stat-note, .schedule-note, .empty-state { color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.stat-row div { padding: 16px; }
.stat-row dt { color: var(--muted); font-size: 13px; }
.stat-row dd { margin: 4px 0 0; font-size: 28px; font-weight: 800; line-height: 1.2; }
.stat-note { margin: 12px 0 0; font-size: 13px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { min-height: 48px; padding: 12px 0; font-weight: 700; cursor: pointer; }
.faq-item p { margin: 0 0 14px; color: var(--muted); }
.search-bar label { font-size: 14px; font-weight: 700; }
.search-bar__row { display: flex; gap: 8px; margin-top: 8px; }
.search-bar input, .search-bar select { flex: 1; min-width: 0; min-height: 46px; padding: 9px 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.search-bar .primary-button { margin-top: 0; }
.therapist-grid, .schedule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.therapist-grid { margin-top: 18px; }
.schedule { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.therapist-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; align-items: center; padding: 16px; }
.therapist-card h2, .schedule__day h3 { margin: 0; font-size: 18px; }
.therapist-card p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.therapist-card .secondary-button { grid-column: 1 / -1; }
.avatar--large { width: 72px; height: 72px; font-size: 28px; }
.therapist-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 20px; align-items: start; }
.therapist-detail { display: grid; gap: 14px; }
.profile-box { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.profile-box h2 { margin: 0; font-size: 16px; }
.profile-box p { margin: 0; white-space: pre-line; }
.profile-facts { display: grid; gap: 8px; margin: 0; }
.profile-facts div { display: flex; justify-content: space-between; gap: 12px; }
.profile-facts dt { color: var(--muted); }
.profile-facts dd { margin: 0; font-weight: 500; text-align: end; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip-list li { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); }
.reserve-card { position: sticky; top: 16px; display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.reserve-card h2 { margin: 0; font-size: 18px; }
.reserve-card dl { display: grid; gap: 10px; margin: 0; }
.reserve-card dl div { display: flex; justify-content: space-between; gap: 12px; }
.reserve-card dt { color: var(--muted); }
.reserve-card dd { margin: 0; font-weight: 500; text-align: end; }
.reserve-card .primary-button, .reserve-card .secondary-button { width: 100%; margin-top: 0; }
.series-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.series-list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.series-list li.is-closed { color: var(--muted); }
.week-count { display: grid; gap: 8px; }
.confirm-dialog, .reserve-dialog { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: transparent; }
.confirm-dialog[open], .reserve-dialog[open] { display: flex; align-items: flex-end; }
.confirm-dialog::backdrop, .reserve-dialog::backdrop { background: rgb(15 23 24 / 48%); }
.confirm-dialog__sheet, .reserve-dialog__sheet { display: grid; gap: 14px; width: 100%; max-height: min(86vh, 640px); overflow: auto; margin: 0; padding: 16px; border-radius: 18px 18px 0 0; background: var(--surface); color: var(--ink); }
.confirm-dialog__sheet h2, .reserve-dialog__sheet h2 { margin: 0; font-size: 18px; }
.confirm-dialog__actions { display: flex; gap: 8px; }
.confirm-dialog__actions .secondary-button, .confirm-dialog__actions .danger-button { flex: 1; margin-top: 0; }
.reserve-close { display: grid; place-items: center; width: 36px; height: 36px; margin-inline-start: auto; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.reserve-person { display: flex; align-items: center; gap: 12px; }
.reserve-person strong { font-size: 18px; }
.reserve-when { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.reserve-edit { display: inline-flex; flex: none; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--accent-dark); font-weight: 500; cursor: pointer; white-space: nowrap; }
.reserve-when strong { min-width: 0; flex: 1; line-height: 1.6; }
.reserve-success { display: grid; justify-items: center; gap: 10px; text-align: center; }
.reserve-success .material-symbols-outlined { font-size: 42px; color: var(--accent-dark); }
.reserve-success .primary-button, .reserve-success .secondary-button { width: 100%; }
.week-strip { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: stretch; gap: 6px; }
.week-nav { display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.week-nav:disabled { opacity: .35; cursor: default; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-day { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 78px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: var(--ink); cursor: pointer; }
.week-day span { color: var(--muted); font-size: 11px; }
.week-day strong { font-weight: 500; }
.week-day__badge { min-height: 14px; font-style: normal; font-size: 10px; font-weight: 500; color: var(--accent-dark); }
.week-day:disabled { opacity: .4; cursor: default; }
.week-day.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.time-list { display: flex; flex-wrap: wrap; gap: 8px; }
.time-chip { min-height: 36px; padding: 4px 10px; border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 500; cursor: pointer; }
.time-chip.is-selected { background: var(--accent); color: #fff; }
.therapist-detail__header { display: flex; align-items: center; gap: 16px; }
.therapist-detail .eyebrow a { color: var(--accent-dark); text-decoration: none; }
.schedule__day { padding: 14px; }
.schedule__day ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.schedule__day li span, .schedule__day li a { display: inline-flex; min-height: 36px; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; text-decoration: none; }
.empty-state { margin-top: 18px; padding: 18px; border: 1px dashed var(--line); border-radius: 16px; background: var(--surface); }

@media (max-width: 760px) {
    .landing-wrap { width: min(100% - 24px, 1180px); }
    .about-layout, .therapist-grid, .schedule, .faq-layout { grid-template-columns: 1fr; }
    .install-row { align-items: stretch; flex-direction: column; }
    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search-bar__row { flex-direction: column; }
    .search-bar .primary-button, .hero__actions .primary-button, .hero__actions .secondary-button { width: 100%; }
    .therapist-layout { grid-template-columns: 1fr; }
    .reserve-card { position: static; }
    .therapist-detail__header { align-items: flex-start; }
}
@media (min-width: 761px) {
    .confirm-dialog[open], .reserve-dialog[open] { align-items: center; justify-content: center; }
    .confirm-dialog__sheet, .reserve-dialog__sheet { width: min(560px, calc(100% - 32px)); border-radius: 18px; }
}

a.overview-card, a.record-card { color: inherit; text-decoration: none; }
a.record-card { display: block; }
a.record-card:hover { border-color: var(--accent); }
.messages { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.form-note { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); font-size: 13px; }
.toast-stack { position: fixed; z-index: 40; display: grid; gap: 8px; inset-inline: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); pointer-events: none; }
.toast { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: var(--page); font-size: 14px; font-weight: 500; box-shadow: var(--shadow); }
.toast--error { background: #9e3025; color: #fff; }
@media (min-width: 761px) {
    .toast-stack { inset-inline: auto 24px; bottom: 24px; width: min(360px, calc(100% - 48px)); }
}
.stack-form { display: grid; gap: 8px; margin-top: 12px; }
.stack-form label { font-size: 14px; font-weight: 700; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.choice-grid li, .choice-grid label { display: flex; gap: 6px; align-items: center; min-height: 36px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); }
.panel-grid { display: grid; gap: 12px; }
.record-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.payment-card { display: grid; gap: 10px; }
.payment-card .record-card__row strong { font-size: 18px; }
.payment-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--muted); font-size: 13px; }
.payment-card__meta a { color: var(--accent-dark); font-weight: 700; text-decoration: none; }
.record-card p { margin: 6px 0 0; }
.record-card__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.record-card__row h1 { margin: 0; }
.record-card__row .primary-button { margin-top: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.button-row form, .button-row .primary-button, .button-row .secondary-button, .danger-button { margin-top: 0; }
.danger-button { min-height: 40px; padding: 8px 12px; border: 1px solid #e7b2ac; border-radius: 10px; background: transparent; color: #9e3025; font-weight: 700; cursor: pointer; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 999px; background: #eef1f4; color: #5c6770; font-size: 12px; font-weight: 500; }
.badge--approved, .badge--confirmed, .badge--accepted, .badge--open, .badge--booked, .badge--verified { background: #e5f6ea; color: #17693a; }
.badge--pending { background: #fff4d6; color: #8a5a00; }
.badge--awaiting { background: #ffedd5; color: #c2410c; }
.badge--submitted { background: #fff1e0; color: #b45309; }
.badge--held { background: #ffece3; color: #9a3412; }
.badge--unread { background: #fff7ed; color: #ea580c; }
.badge--processing { background: #ffe8d6; color: #c05621; }
.badge--rejected, .badge--failed, .badge--suspended, .badge--refunded { background: #fff0ee; color: #9e3025; }
.badge--cancelled, .badge--canceled { background: #eef1f4; color: #5c6770; }
.badge--completed, .badge--read, .badge--paid, .badge--posted { background: #e8eef6; color: #3d5270; }
.calendar__day .badge { max-width: 100%; }
.reward { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); }
[data-session-calendar][aria-busy="true"] { opacity: 0.55; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.calendar-head .secondary-button { min-height: 40px; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar__name { color: var(--muted); font-size: 12px; font-weight: 400; text-align: center; }
.calendar__day strong { font-weight: 400; }
.calendar__day { display: grid; align-content: start; gap: 4px; min-height: 76px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.calendar__day.is-empty { background: transparent; border-color: transparent; }
.calendar__day small { color: var(--muted); font-size: 11px; }
.calendar-session { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.calendar-session small { line-height: 1.35; }
.calendar-session a { color: var(--accent-dark); font-size: 12px; font-weight: 500; text-decoration: none; }
.session-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.session-actions .primary-button, .session-actions .secondary-button { margin-top: 0; }
.hour-grid { display: grid; grid-template-columns: 64px repeat(7, minmax(36px, 1fr)); gap: 4px; overflow-x: auto; margin: 12px 0; }
.hour-grid strong, .hour-grid > span { font-size: 12px; }
.hour-grid label { display: grid; place-items: center; min-height: 28px; border-radius: 8px; background: var(--surface-soft); }
.hour-grid .hour-grid__toggle { display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 2px; min-height: 0; background: transparent; font-size: 12px; }
.section-links { display: none; gap: 8px; margin: 0 0 16px; padding: 0; overflow: auto; list-style: none; }
img.avatar { object-fit: cover; }
[data-theme="dark"] .badge { background: #2a3338; color: #c5ced4; }
[data-theme="dark"] .badge--approved,
[data-theme="dark"] .badge--confirmed,
[data-theme="dark"] .badge--accepted,
[data-theme="dark"] .badge--open,
[data-theme="dark"] .badge--booked,
[data-theme="dark"] .badge--verified { background: #1c3d2c; color: #9be7b8; }
[data-theme="dark"] .badge--pending { background: #3e3420; color: #ffd89a; }
[data-theme="dark"] .badge--awaiting { background: #3f2a1c; color: #fdba74; }
[data-theme="dark"] .badge--submitted { background: #3a2e1d; color: #fbbf24; }
[data-theme="dark"] .badge--held { background: #3f261c; color: #fdba74; }
[data-theme="dark"] .badge--unread { background: #422814; color: #fb923c; }
[data-theme="dark"] .badge--processing { background: #3d2918; color: #fdba74; }
[data-theme="dark"] .badge--rejected,
[data-theme="dark"] .badge--failed,
[data-theme="dark"] .badge--suspended,
[data-theme="dark"] .badge--refunded { background: #472d2c; color: #ffd2cc; }
[data-theme="dark"] .badge--cancelled,
[data-theme="dark"] .badge--canceled { background: #2a3338; color: #c5ced4; }
[data-theme="dark"] .badge--completed,
[data-theme="dark"] .badge--read,
[data-theme="dark"] .badge--paid,
[data-theme="dark"] .badge--posted { background: #243044; color: #c5d4ea; }
[data-theme="dark"] .danger-button { background: #472d2c; color: #ffd2cc; border-color: #6d403c; }

@media (max-width: 760px) {
    .section-links { display: flex; }
    .calendar__day { min-height: 58px; padding: 4px; }
    .login-card--wide { width: min(100%, 760px); }
}

.bone {
    display: block;
    flex: none;
    height: 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--line) 70%, transparent) 0%, var(--line) 45%, color-mix(in srgb, var(--line) 70%, transparent) 100%);
    background-size: 220% 100%;
    animation: bone-shimmer 2.8s ease-in-out infinite;
}
.bone--title { width: 42%; height: 18px; margin-top: 0; }
.bone--line { width: 78%; margin-top: 8px; }
.bone--short { width: 46%; }
.bone--chip { width: 72px; height: 24px; margin-top: 0; border-radius: 999px; }
.bone--stat { width: 36%; height: 34px; margin-top: 8px; }
.bone--avatar { width: 48px; height: 48px; border-radius: 50%; }
.bone--avatar-lg { width: 72px; height: 72px; }
.bone--button { width: 100%; height: 46px; border-radius: 10px; }
.bone--label { width: 28%; height: 16px; margin: 0; }
.bone--field { width: 100%; height: 46px; margin: 0; border-radius: 10px; }
.bone--faq { width: 70%; height: 16px; margin: 16px 0; }
.bone--cell { width: 100%; height: 28px; margin-top: 0; border-radius: 8px; }
.skeleton-field { display: contents; }
.record-card.skeleton { min-height: 118px; }
.therapist-card { min-height: 156px; }
.therapist-card .bone--button { grid-column: 1 / -1; }
.therapist-card > div:has(.bone) { display: grid; align-content: center; gap: 6px; }
.therapist-card .bone--line { margin-top: 0; }
.profile-box.skeleton .bone--line { margin-top: 0; }
.reserve-card.skeleton .bone--button { margin-top: 4px; }
.faq-item.skeleton { min-height: 48px; }
.calendar__day .bone, .calendar-head .bone { margin-top: 0; }
.calendar-head .bone--title { width: 120px; }
.calendar-head .bone--button { width: 96px; height: 40px; }
.hour-grid .bone--line { width: 70%; height: 12px; margin: 8px 0; }
.hour-grid .bone--cell { height: 28px; }
.profile-identity .bone--title { margin-top: 0; }
.profile-identity .bone--line { margin-top: 6px; }
.therapist-grid,
.therapist-layout,
.panel-grid,
.stat-row,
.hour-grid,
[data-session-calendar] {
    animation: arrive 0.7s ease;
}
@keyframes bone-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
@keyframes arrive {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ltr, .money, .money-amount {
    direction: ltr;
    unicode-bidi: isolate;
}
.money {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35em;
    white-space: nowrap;
}
.affiliate-table td.money-cell,
.money-cell {
    text-align: left;
    direction: ltr;
}
.affiliate-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr); gap: 28px; align-items: start; }
.affiliate-hero .affiliate-calc__card { align-self: center; }
.affiliate-highlights { display: grid; gap: 4px; margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.affiliate-highlights p { margin: 0; }
.affiliate-highlights strong { color: var(--accent-dark); font-size: 1.15rem; }
.affiliate-visual { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 180px; border-radius: 24px; background: linear-gradient(160deg, var(--accent-soft), var(--surface)); }
.affiliate-visual span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--surface); color: var(--accent-dark); box-shadow: var(--shadow); }
.affiliate-visual i { width: 28px; height: 2px; background: var(--accent); }
.affiliate-steps, .affiliate-benefits { display: grid; gap: 14px; margin-top: 18px; }
.affiliate-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; padding: 0; }
.affiliate-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.affiliate-steps li, .affiliate-benefits article, .affiliate-calc__card, .affiliate-link {
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow);
}
.affiliate-steps li, .affiliate-benefits article { transition: border-color 0.15s ease, transform 0.15s ease; }
.affiliate-steps li:hover, .affiliate-benefits article:hover { border-color: var(--accent); transform: translateY(-2px); }
.affiliate-steps span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 13px; }
.affiliate-steps h3, .affiliate-benefits h3 { margin: 10px 0 6px; }
.affiliate-steps p, .affiliate-benefits p { margin: 0; color: var(--muted); }
.affiliate-benefits .material-symbols-outlined, .affiliate-steps .material-symbols-outlined { color: var(--accent-dark); }
.affiliate-calc { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 22px; align-items: start; }
.affiliate-calc__card { display: grid; gap: 14px; }
.affiliate-calc__card label { display: grid; gap: 6px; }
.affiliate-calc__card input, .affiliate-calc__card select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; padding: 8px 12px; }
.affiliate-calc__card dl { display: grid; gap: 8px; margin: 0; }
.affiliate-calc__card dl div { display: flex; justify-content: space-between; gap: 12px; }
.affiliate-link { margin-bottom: 28px; }
.affiliate-share { position: sticky; top: 12px; z-index: 6; }
.affiliate-link h1 { margin-top: 0; }
.affiliate-link p { overflow-wrap: anywhere; }
.share-field { display: grid; gap: 6px; margin-top: 14px; }
.share-field label { font-size: 13px; color: var(--muted); }
.share-dialog.reserve-dialog { height: auto; max-height: calc(100% - 32px); overflow: auto; }
.share-dialog .reserve-dialog__sheet { width: min(480px, calc(100% - 32px)); max-height: none; overflow: visible; }
.share-choices { display: grid; gap: 12px; }
.share-choice { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.share-choice span { color: var(--muted); font-size: 13px; }
.share-choice strong { color: var(--ink); font-size: 16px; font-weight: 400; overflow-wrap: anywhere; }
.share-choice__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.share-choice__row strong { flex: 1; min-width: 0; }
.share-choice__actions { display: flex; flex: none; gap: 8px; }
.share-choice__icon { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--accent-dark); cursor: pointer; }
.share-choice__icon:disabled { opacity: 0.45; cursor: default; }
.share-line { display: grid; grid-template-columns: 1fr; gap: 8px; }
.share-line input, .share-line textarea { width: 100%; min-width: 0; min-height: 46px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); direction: ltr; text-align: left; resize: none; overflow-wrap: anywhere; }
.share-line textarea { field-sizing: content; }
.share-line .primary-button, .share-line .secondary-button { width: 100%; margin: 0; }
.wallet-hero.skeleton .bone--eye { width: 92px; height: 18px; margin: 0; }
.wallet-hero.skeleton .bone--details { width: 64px; height: 18px; margin: 0; }
.wallet-hero.skeleton .bone--balance { width: min(220px, 62%); height: 32px; margin: 8px 0 12px; }
.wallet-hero.skeleton .wallet-hero__actions .bone--button { flex: 1; width: auto; height: 48px; }
.wallet-hero.skeleton .bone--square { width: 48px; height: 48px; border-radius: 12px; }
.wallet-skeleton__title { width: 120px; margin: 4px 0 12px; }
.wallet-hero.skeleton .bone,
.wallet-row.skeleton .bone {
    background-image: linear-gradient(90deg, color-mix(in srgb, var(--ink) 12%, var(--surface)) 0%, color-mix(in srgb, var(--ink) 26%, var(--surface)) 45%, color-mix(in srgb, var(--ink) 12%, var(--surface)) 100%);
}
.wallet-row.skeleton { min-height: 72px; background: var(--surface); }
.wallet-hero { display: grid; gap: 6px; margin: 16px 0 20px; padding: 18px 16px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.wallet-hero__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wallet-eye, .wallet-details { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.wallet-eye { color: var(--muted); }
.wallet-details { color: var(--accent-dark); font-weight: 700; }
.wallet-hero__figure { margin: 2px 0 10px; }
.balance-mark { display: inline-flex; align-items: flex-start; gap: 4px; }
.balance-mark__amount { font-weight: 700; line-height: 1.1; direction: ltr; }
.balance-mark__amount.is-large { font-size: 2rem; }
.balance-mark__unit { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.2; }
.balance-mark.is-quiet .balance-mark__amount { color: var(--muted); font-weight: 600; }
.wallet-hero__actions { display: flex; gap: 8px; }
.wallet-add, .wallet-minus { min-height: 48px; border-radius: 12px; font: inherit; cursor: pointer; }
.wallet-add { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--accent); color: #fff; font-weight: 700; }
.wallet-add .material-symbols-outlined { color: #fff; font-size: 22px; }
.wallet-minus { flex: none; width: 48px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 22px; }
.wallet-breakdown { display: grid; margin: 0; }
.wallet-breakdown div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.wallet-breakdown dt, .wallet-breakdown dd { margin: 0; }
.wallet-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.wallet-note .material-symbols-outlined { color: var(--accent-dark); font-size: 18px; }
.wallet-currencies { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.account-tabs { display: flex; gap: 8px; margin: 0 0 16px; }
.account-tabs a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: inherit; text-decoration: none; }
.account-tabs a.is-active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 500; }
.check-line { display: flex; align-items: center; gap: 8px; }
.wallet-accounts { display: grid; gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.wallet-accounts li { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.wallet-accounts__add, .wallet-accounts__remove { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.wallet-accounts__add { color: var(--accent-dark); }
.wallet-accounts__remove { width: 36px; height: 36px; color: #9e3025; border-color: #e7b2ac; }
.wallet-accounts__tools { display: inline-flex; align-items: center; gap: 8px; }
[data-theme="dark"] .wallet-accounts__remove { color: #ffd2cc; border-color: #6d403c; background: #472d2c; }
.amount-row { display: flex; gap: 8px; align-items: center; }
.amount-row input { flex: 1; min-width: 0; width: 100%; }
.amount-row .secondary-button { flex: none; }
.stack { display: grid; gap: 10px; margin: 16px 0; }
.stack input, .stack select { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; padding: 8px 12px; }
.affiliate-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.affiliate-kpis article { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.affiliate-kpis span { display: block; color: var(--muted); font-size: 13px; }
.affiliate-kpis strong { display: block; margin-top: 6px; }
.affiliate-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
.affiliate-filters a { padding: 8px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.affiliate-filters a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.affiliate-filters select { min-height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; }
.affiliate-table-wrap { overflow-x: auto; }
.affiliate-table { width: 100%; border-collapse: collapse; }
.affiliate-table th, .affiliate-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
@media (max-width: 800px) {
    .affiliate-kpis { grid-template-columns: 1fr 1fr; }
}
.affiliate-final { padding: 42px 0; background: linear-gradient(135deg, var(--accent-dark), var(--accent)); color: #f4fffb; }
.affiliate-final p { max-width: 36rem; }
.affiliate-final .primary-button { background: #fff; color: var(--accent-dark); }
@media (max-width: 800px) {
    .affiliate-hero__grid, .affiliate-steps, .affiliate-benefits, .affiliate-calc { grid-template-columns: 1fr; }
    .affiliate-visual { min-height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
