/* ============================================================
   STUDIO BY NAILS HELEN — личный кабинет клиента
   В стиле сайта (style.css токены): серый фон, белые карточки,
   Montserrat/Poppins, тёмная кнопка, таупе-акцент.
   ============================================================ */

.kab { font-family: var(--sans); color: var(--ink); }
.kab *, .kab *::before, .kab *::after { box-sizing: border-box; }
.kab h1, .kab h2, .kab h3, .kab h4 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.01em; color: var(--ink); }

/* ---------- Тонкая полоса сверху ---------- */
.kab .topline { height: 4px; background: linear-gradient(90deg, var(--muted), #C9B4AC); }

/* ===================== ЭКРАН ВХОДА ===================== */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; }
.auth-aside {
  background: var(--ink); color: #fff; padding: 3.2rem 3rem; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(154,124,115,0.4), transparent 65%); }
.auth-aside .a-logo { display: flex; align-items: center; gap: 0.7rem; position: relative; z-index: 1; }
.auth-aside .a-logo .mark { width: 44px; height: 44px; border-radius: 11px; background: #fff; color: var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 800; }
.auth-aside .a-logo b { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.auth-aside .a-logo span { display: block; font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.auth-aside .a-mid { position: relative; z-index: 1; }
.auth-aside .a-mid h2 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.15; margin-bottom: 1rem; }
.auth-aside .a-mid p { color: rgba(255,255,255,0.74); max-width: 38ch; margin: 0; }
.auth-aside .a-perks { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: 0.8rem; position: relative; z-index: 1; }
.auth-aside .a-perks li { display: flex; align-items: flex-start; gap: 0.7rem; font-size: 0.94rem; color: rgba(255,255,255,0.9); line-height: 1.4; }
.auth-aside .a-perks .ic { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; background: rgba(255,255,255,0.1); display: grid; place-items: center; }
.auth-aside .a-perks .ic svg { width: 16px; height: 16px; }
.auth-aside .a-foot { position: relative; z-index: 1; font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.auth-aside .a-foot a { color: rgba(255,255,255,0.8); }

.auth-main { display: grid; place-items: center; padding: 2rem; background: var(--bg); }
.auth-card { width: min(420px, 100%); }
.auth-card .eyebrow { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin: 0 0 0.5rem; }
.auth-card h1 { font-size: 2rem; margin-bottom: 0.4rem; }
.auth-card .sub { color: var(--ink-soft); font-size: 0.94rem; margin: 0 0 1.8rem; }

.auth-tabs { display: flex; gap: 0.3rem; background: var(--bg-soft); padding: 0.3rem; border-radius: 12px; margin-bottom: 1.5rem; }
.auth-tabs button { flex: 1; border: 0; background: transparent; font-family: var(--sans); font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); padding: 0.6rem; border-radius: 9px; cursor: pointer; transition: all .15s; }
.auth-tabs button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

.k-field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.k-field label { font-size: 0.8rem; color: var(--ink-soft); font-weight: 500; }
.k-field input { font-family: var(--sans); font-size: 0.95rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 0.95rem; transition: border-color .15s, box-shadow .15s; }
.k-field input:focus { outline: none; border-color: var(--muted); box-shadow: 0 0 0 3px rgba(154,124,115,0.15); }
.k-field .hint { font-size: 0.78rem; color: var(--ink-soft); }

.k-row-between { display: flex; align-items: center; justify-content: space-between; margin: 0.2rem 0 1.4rem; font-size: 0.85rem; }
.k-check { display: flex; align-items: center; gap: 0.5rem; color: var(--ink-soft); cursor: pointer; }
.k-check input { width: 16px; height: 16px; accent-color: var(--muted-deep); }
.k-link { color: var(--muted-deep); font-weight: 500; cursor: pointer; background: none; border: 0; font-family: var(--sans); font-size: 0.85rem; }
.k-link:hover { text-decoration: underline; }

.kbtn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: var(--sans); font-size: 0.92rem; font-weight: 600; padding: 0.85rem 1.4rem; border-radius: 12px; cursor: pointer; border: 1px solid transparent; transition: transform .15s, background .15s, color .15s, border-color .15s; width: 100%; }
.kbtn svg { width: 18px; height: 18px; }
.kbtn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.kbtn-dark:hover { background: #000; transform: translateY(-1px); }
.kbtn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.kbtn-ghost:hover { border-color: #D8D3DF; background: var(--bg-soft); }
.kbtn-auto { width: auto; }
.kbtn-sm { padding: 0.55rem 1rem; font-size: 0.84rem; }

.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.4rem 0; color: var(--ink-soft); font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-alt { font-size: 0.88rem; color: var(--ink-soft); text-align: center; margin-top: 1.4rem; }

/* ===================== КАБИНЕТ ===================== */
.kab-shell { min-height: 100vh; background: var(--bg); }

/* Шапка кабинета (как на сайте — плавающая карточка) */
.kab-header { position: sticky; top: 0; z-index: 40; padding: 1rem 0; background: var(--bg); }
.kab-header-card { width: min(1120px, 94vw); margin-inline: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: 0.7rem 1.3rem; height: 66px; }
.kab-brand { display: flex; align-items: center; gap: 0.6rem; }
.kab-brand .mark { width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 0.9rem; }
.kab-brand b { font-family: var(--display); font-weight: 700; font-size: 0.95rem; }
.kab-brand span { display: block; font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kab-header .h-right { display: flex; align-items: center; gap: 0.8rem; }
.kab-user { display: flex; align-items: center; gap: 0.6rem; padding-right: 0.3rem; min-width: 0; }
.kab-user .ava { width: 38px; height: 38px; border-radius: 50%; background: var(--bg-soft); color: var(--muted-deep); display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; flex: 0 0 38px; }
.kab-user > div { min-width: 0; }
.kab-user b { font-size: 0.86rem; font-weight: 600; display: block; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.kab-user small { font-size: 0.74rem; color: var(--ink-soft); white-space: nowrap; }
.icon-btn2 { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--ink-soft); transition: all .15s; }
.icon-btn2:hover { color: var(--ink); border-color: #D8D3DF; }
.logout-btn:hover { color: var(--danger, #C2506B); border-color: #F0DDE2; }

/* Колокол с индикатором */
.bell-btn { position: relative; }
.bell-btn .ndot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-deep); border: 2px solid var(--card); }

/* Переключатель языка */
.lang-switch { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 0.3rem; height: 40px; padding: 0 0.7rem; border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-family: var(--sans); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: border-color .15s; }
.lang-btn:hover { border-color: #D8D3DF; }
.lang-btn > svg { width: 17px; height: 17px; color: var(--ink-soft); }
.lang-btn .chev { width: 14px; height: 14px; color: var(--ink-soft); }
.lang-scrim { position: fixed; inset: 0; z-index: 50; }
.lang-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 51; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 0.3rem; display: grid; gap: 0.15rem; min-width: 96px; }
.lang-menu button { text-align: left; border: 0; background: transparent; font-family: var(--sans); font-size: 0.86rem; font-weight: 500; color: var(--ink-soft); padding: 0.5rem 0.7rem; border-radius: 8px; cursor: pointer; }
.lang-menu button:hover { background: var(--bg-soft); color: var(--ink); }
.lang-menu button.active { background: var(--ink); color: #fff; font-weight: 600; }

/* Нижняя навигация (только мобильный) */
.kab-bottomnav { display: none; }

.kab-body { width: min(1120px, 94vw); margin: 0 auto; padding: 1.5rem 0 4rem; }

/* Приветствие */
.kab-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.kab-hello .eyebrow { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin: 0 0 0.3rem; }
.kab-hello h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hello-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* Вкладки кабинета */
.kab-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.kab-tab { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--sans); font-size: 0.9rem; font-weight: 500; color: var(--ink-soft); background: var(--card); border: 1px solid var(--line); padding: 0.6rem 1.1rem; border-radius: 999px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.kab-tab svg { width: 17px; height: 17px; }
.kab-tab:hover { border-color: #D8D3DF; }
.kab-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Сетка дашборда */
.kab-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.3rem; align-items: start; }
.kab-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.5rem; }
.kab-card .ch { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.kab-card .ch h3 { font-size: 1.1rem; }
.kab-card .ch .small { font-size: 0.8rem; color: var(--ink-soft); }
.kab-card .ch > svg { width: 20px; height: 20px; flex: 0 0 20px; color: var(--muted-deep); }

/* Ближайшая запись */
.next-appt { background: var(--card); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.next-appt::after { content: none; }
.next-appt h3 { color: var(--ink-soft); position: relative; z-index: 1; }
.next-appt .na-tag { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.52rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-deep); background: #F3ECEA; padding: 0.3rem 1.7rem; border-radius: 999px; margin-bottom: 1rem; position: relative; z-index: 1; }
.next-appt .na-big { font-family: var(--display); font-weight: 800; font-size: 1.25rem; margin: 0.45rem 0 0.2rem; position: relative; z-index: 1; color: var(--ink); }
.next-appt .na-when { color: var(--ink-soft); font-size: 0.88rem; position: relative; z-index: 1; display: flex; align-items: center; gap: 0.5rem; }
.next-appt .na-when svg { width: 16px; height: 16px; }
.next-appt .na-actions { display: flex; gap: 0.6rem; margin-top: 1.3rem; position: relative; z-index: 1; flex-wrap: wrap; }
.next-appt .kbtn { width: auto; }
.next-appt .kbtn-light { background: #fff; color: var(--muted-deep); border: 1px solid var(--muted-deep); }
.next-appt .kbtn-light:hover { background: var(--bg-soft); }
.next-appt .kbtn-outline { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.next-appt .kbtn-outline:hover { background: var(--bg-soft); }

/* История визитов */
.visit { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line-soft); }
.visit:last-child { border-bottom: 0; }
.visit .v-ic { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; background: var(--bg-soft); display: grid; place-items: center; color: var(--muted-deep); }
.visit .v-ic svg { width: 20px; height: 20px; }
.visit .v-main { flex: 1; min-width: 0; }
.visit .v-main b { font-size: 0.92rem; font-weight: 600; display: block; }
.visit .v-main small { font-size: 0.8rem; color: var(--ink-soft); }
.visit .v-price { font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

/* Бонусы / прогресс */
.loyalty .l-top { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.3rem; }
.loyalty .l-num { font-family: var(--display); font-weight: 800; font-size: 2.4rem; color: var(--ink); line-height: 1; }
.loyalty .l-unit { color: var(--ink-soft); font-size: 0.9rem; }
.loyalty .l-bar { height: 10px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin: 1rem 0 0.6rem; }
.loyalty .l-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--muted), var(--muted-deep)); }
.loyalty .l-note { font-size: 0.84rem; color: var(--ink-soft); }

/* Список (мои записи таб) */
.appt-list { display: grid; gap: 0.9rem; }
.appt-item { background: var(--card); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 1.1rem 1.3rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.appt-item .date-chip { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 12px; background: var(--bg-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.appt-item .date-chip b { font-family: var(--display); font-weight: 800; font-size: 1.3rem; line-height: 1; color: var(--ink); }
.appt-item .date-chip small { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.appt-item .ai-main { flex: 1; min-width: 160px; }
.appt-item .ai-main b { font-size: 0.98rem; font-weight: 600; display: block; }
.appt-item .ai-main small { font-size: 0.84rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 0.35rem; }
.appt-item .ai-main small svg { width: 14px; height: 14px; }
.appt-item .ai-actions { display: flex; gap: 0.5rem; }

/* Бейджи статусов */
.kbadge { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.74rem; font-weight: 600; padding: 0.25rem 0.65rem; border-radius: 999px; white-space: nowrap; }
.kbadge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.kbadge.confirmed { color: #2F8F62; background: #E4F2EA; }
.kbadge.pending { color: #C08A2E; background: #F7EEDC; }
.kbadge.done { color: var(--ink-soft); background: var(--line-soft); }
.kbadge.done::before { display: none; }

/* Профиль */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.profile-grid .full { grid-column: 1 / -1; }
.prof-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.prof-head .big-ava { width: 70px; height: 70px; border-radius: 50%; background: var(--bg-soft); color: var(--muted-deep); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
.prof-head h2 { font-size: 1.4rem; }
.prof-head small { font-size: 0.84rem; color: var(--ink-soft); }
.saved-tag { font-size: 0.82rem; color: #2F8F62; font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; }
.saved-tag svg { width: 15px; height: 15px; }

/* Пустое состояние */
.kab-empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-soft); }
.kab-empty .ic { width: 50px; height: 50px; margin: 0 auto 0.9rem; border-radius: 13px; background: var(--bg-soft); display: grid; place-items: center; }
.kab-empty h3 { font-size: 1.05rem; color: var(--ink); margin-bottom: 0.3rem; }
.kab-empty p { margin: 0 0 1.1rem; font-size: 0.9rem; }

/* ---------- Адаптив ---------- */
@media (max-width: 880px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .kab-grid { grid-template-columns: 1fr; }
  .kab-user-txt { display: none; }
}

/* ---------- Мобильный ---------- */
@media (max-width: 620px) {
  .kab-header { padding: 0.7rem 0; }
  .kab-header-card { width: 94vw; height: 58px; padding: 0.5rem 0.75rem; gap: 0.55rem; border-radius: 16px; }
  .kab-brand { gap: 0.55rem; }
  .kab-brand .mark { width: 36px; height: 36px; border-radius: 9px; font-size: 0.8rem; }
  .kab-brand-txt b { font-size: 0.9rem; }
  .kab-brand-txt span { display: none; }
  .h-right { gap: 0.4rem; }
  .icon-btn2 { width: 38px; height: 38px; }
  .kab-user { display: none; }
  .lang-btn { height: 38px; padding: 0 0.5rem; font-size: 0.82rem; gap: 0.2rem; }
  .lang-btn .chev { display: none; }

  .kab-body { padding: 1.1rem 0 5.6rem; }
  .kab-hello { margin-bottom: 1.1rem; gap: 0.8rem; }
  .kab-hello h1 { font-size: 1.65rem; }
  .hello-actions { width: 100%; }
  .hello-actions .kbtn { flex: 1 1 0; min-width: 0; }
  .hello-actions .hide-mobile { display: none; }
  .kab-maintabs { display: none; }

  .kab-bottomnav {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
    bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    width: 94vw;
    background: var(--card); border-radius: 18px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    padding: 0.35rem 0.4rem;
  }
  .bn-item { display: flex; flex-direction: column; align-items: center; gap: 0.18rem; border: 0; background: none; cursor: pointer; padding: 0.45rem 0.2rem; border-radius: 12px; color: var(--ink-soft); font-family: var(--sans); font-size: 0.66rem; font-weight: 600; transition: color .15s; }
  .bn-item svg { width: 22px; height: 22px; }
  .bn-item.active { color: var(--ink); }
  .bn-item.active svg { color: var(--muted-deep); }

  .kab-card { padding: 1.3rem; }
  .kab-empty { padding: 1.8rem 1rem; }
  .next-appt .na-actions .kbtn { flex: 1; }
  .appt-item .ai-actions { width: 100%; }
  .appt-item .ai-actions .kbtn { flex: 1; }
}

@media (max-width: 560px) {
  .profile-grid { grid-template-columns: 1fr; }
}
