/* ==========================================================================
   АЙЧҮРӨК — UI 2.0 (редизайн 2026-11)
   Premium Beauty + Modern Mobile UX + Minimalism.
   Подключается ПОСЛЕ app.css на всех экранах: переопределяет токены и компоненты,
   добавляет мобильные компоненты клиентского приложения (префикс .ax-).
   ========================================================================== */

:root {
    /* Фирменная палитра */
    --burgundy: #800020;
    --burgundy-dark: #650018;
    --burgundy-ink: #4A0012;
    --cream: #FFF9F3;
    --ivory: #FFFFFF;
    --blush: #F7DDE0;
    --blush-soft: #FCEEF0;
    --rose: #D78C9A;
    --champagne: #C49A6C;
    --champagne-soft: #EEDFCC;
    --brown: #30252A;
    --dusty: #F7DDE0;
    --beige: #F4E9DF;

    --text: #30252A;
    --text-soft: rgba(48, 37, 42, .70);
    --text-faint: rgba(48, 37, 42, .48);
    --line: rgba(196, 154, 108, .45);
    --line-soft: rgba(48, 37, 42, .09);
    --surface: #FFFFFF;
    --surface-2: #FFFBF7;

    --grad-primary: linear-gradient(135deg, #800020 0%, #9E1B3A 100%);
    --grad-deep: linear-gradient(150deg, #650018 0%, #800020 55%, #A3304C 100%);
    --grad-gold: linear-gradient(135deg, #D8B48A 0%, #C49A6C 50%, #A97E52 100%);
    --grad-blush: linear-gradient(160deg, #FFF9F3 0%, #F7DDE0 100%);

    --shadow-card: 0 8px 24px rgba(101, 0, 24, .07);
    --shadow-lift: 0 16px 36px rgba(101, 0, 24, .14);
    --shadow-soft: 0 2px 10px rgba(101, 0, 24, .06);
    --shadow-btn: 0 8px 18px rgba(128, 0, 32, .28);

    --radius: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-pill: 999px;
    --tap: 48px;               /* минимальная зона нажатия (Android 48dp / iOS 44pt) */

    --st-new-bg: #F4E9DF;       --st-new-fg: #6B5335;
    --st-confirmed-bg: #E3F0E4; --st-confirmed-fg: #2F6B3B;
    --st-arrived-bg: #F3E6CF;   --st-arrived-fg: #85622A;
    --st-completed-bg: #ECE9E7; --st-completed-fg: #625C59;
    --st-cancelled-bg: #F8E0DF; --st-cancelled-fg: #A3332B;
    --st-noshow-bg: #3E3034;    --st-noshow-fg: #F7EDEA;

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --nav-h: 68px;
}

/* --- База -------------------------------------------------------------- */
html { -webkit-tap-highlight-color: transparent; }
body {
    color: var(--text);
    background-color: var(--cream);
    background-image:
        radial-gradient(ellipse 70% 45% at 90% -10%, rgba(247, 221, 224, .85), transparent 70%),
        radial-gradient(ellipse 50% 35% at -10% 25%, rgba(238, 223, 204, .55), transparent 70%);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--burgundy-ink); letter-spacing: -.01em; }
a { color: var(--burgundy); }
:focus-visible { outline: 3px solid rgba(196, 154, 108, .65); outline-offset: 2px; border-radius: 10px; }
::selection { background: var(--blush); color: var(--burgundy-ink); }

/* --- Кнопки -------------------------------------------------------------- */
.btn {
    min-height: var(--tap);
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: .01em;
    gap: 8px;
    transition: transform .12s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
    touch-action: manipulation;
    -webkit-user-select: none; user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary { background: var(--grad-primary); color: #fff; box-shadow: var(--shadow-btn); border: 0; }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 24px rgba(128, 0, 32, .34); }
.btn-gold { background: var(--grad-gold); color: #fff; border: 0; box-shadow: 0 8px 18px rgba(169, 126, 82, .3); }
.btn-outline { border: 1.5px solid var(--burgundy); color: var(--burgundy); background: transparent; }
.btn-ghost { background: rgba(128, 0, 32, .06); color: var(--burgundy); border: 0; }
.btn-white { background: #fff; color: var(--burgundy); border: 0; box-shadow: var(--shadow-soft); }
.btn-danger { background: #fff; color: #A3332B; border: 1.5px solid rgba(163, 51, 43, .35); }
.btn-sm { min-height: 40px; padding: 8px 14px; border-radius: 12px; font-size: 14px; }
.btn-lg { min-height: 56px; font-size: 17px; border-radius: 16px; }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
    border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: ax-spin .7s linear infinite;
}
.btn-outline.is-loading::after, .btn-ghost.is-loading::after, .btn-white.is-loading::after { border-color: rgba(128, 0, 32, .25); border-top-color: var(--burgundy); }
@keyframes ax-spin { to { transform: rotate(360deg); } }

/* --- Поля -------------------------------------------------------------- */
.input, .select, .textarea {
    min-height: var(--tap);
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(48, 37, 42, .14);
    background: #fff;
    font-size: 16px; /* без авто-зума iOS */
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--champagne); box-shadow: 0 0 0 4px rgba(196, 154, 108, .18); outline: none; }
.field-label { font-weight: 700; color: var(--text-soft); font-size: 13px; letter-spacing: .02em; }
.field-error { color: #A3332B; }

/* --- Карточки, бейджи ---------------------------------------------------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card); border: 1px solid rgba(196, 154, 108, .16); }
.badge { border-radius: var(--radius-pill); font-weight: 700; font-size: 12px; padding: 4px 10px; letter-spacing: .01em; }
.badge-pay-paid { background: #E3F0E4; color: #2F6B3B; }
.badge-pay-awaiting, .badge-pay-reported, .badge-pay-review { background: #FFF1D6; color: #8A5A00; }
.badge-pay-unpaid, .badge-pay-pending { background: var(--blush-soft); color: var(--burgundy); }
.badge-pay-partial { background: #EAF0FF; color: #2C4C9A; }
.badge-pay-rejected { background: #F8E0DF; color: #A3332B; }
.badge-pay-refunded, .badge-pay-cancelled { background: #ECE9E7; color: #625C59; }

/* --- Модальные окна: bottom sheet на телефоне ------------------------------ */
.modal-dialog { border-radius: 24px; box-shadow: var(--shadow-lift); }
@media (max-width: 640px) {
    .modal { align-items: flex-end !important; padding: 0 !important; }
    .modal-dialog {
        width: 100% !important; max-width: 100% !important; margin: 0 !important;
        border-radius: 24px 24px 0 0 !important; max-height: 92vh; overflow-y: auto;
        padding-bottom: calc(20px + var(--safe-bottom)) !important;
        animation: ax-sheet-in .24s cubic-bezier(.2, .9, .3, 1);
    }
    .modal-dialog::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(48, 37, 42, .15); margin: -6px auto 14px; }
}
@keyframes ax-sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* --- Тосты --------------------------------------------------------------- */
.toast-container { top: calc(14px + var(--safe-top)); bottom: auto; }
.toast { border-radius: 14px; box-shadow: var(--shadow-lift); font-weight: 600; }
@media (max-width: 640px) { .toast-container { left: 12px; right: 12px; } .toast { width: 100%; } }

/* --- Скелетоны ----------------------------------------------------------- */
.skel { position: relative; overflow: hidden; background: #F3E9E4; border-radius: 12px; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent); animation: ax-shimmer 1.2s infinite; }
@keyframes ax-shimmer { to { transform: translateX(100%); } }
.skel-line { height: 14px; margin: 8px 0; }
.skel-card { height: 120px; margin: 12px 0; border-radius: 20px; }

/* --- Офлайн-баннер ------------------------------------------------------- */
.ax-offline { position: fixed; left: 12px; right: 12px; top: calc(10px + var(--safe-top)); z-index: 3000; background: #30252A; color: #fff; border-radius: 14px; padding: 12px 16px; font-weight: 600; font-size: 14px; text-align: center; box-shadow: var(--shadow-lift); }

/* =========================================================================
   Клиентское приложение (.ax-app)
   ========================================================================= */
.ax-app { min-height: 100vh; padding-bottom: calc(var(--nav-h) + 24px + var(--safe-bottom)); }
.ax-wrap { max-width: 560px; margin: 0 auto; padding: calc(10px + var(--safe-top)) 16px 0; }
@media (min-width: 900px) { .ax-wrap { max-width: 720px; } }
.ax-screen { animation: ax-fade .22s ease; }
@keyframes ax-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ax-top { display: flex; align-items: center; gap: 12px; min-height: 56px; margin-bottom: 8px; }
.ax-top-logo { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--champagne); object-fit: cover; flex: none; }
.ax-hello { flex: 1; min-width: 0; }
.ax-hello-sub { font-size: 13px; color: var(--text-faint); font-weight: 600; }
.ax-hello-title { font-family: var(--font-serif); font-size: 22px; line-height: 1.2; color: var(--burgundy-ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-icon-btn { position: relative; width: var(--tap); height: var(--tap); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 0; box-shadow: var(--shadow-soft); color: var(--burgundy); cursor: pointer; flex: none; }
.ax-icon-btn svg { width: 22px; height: 22px; }
.ax-icon-btn:active { transform: scale(.94); }
.ax-dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--burgundy); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }

.ax-back { display: flex; align-items: center; gap: 8px; min-height: 56px; margin-bottom: 4px; }
.ax-back h1 { font-size: 22px; margin: 0; flex: 1; }

.ax-section { margin: 22px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ax-section h2 { font-size: 19px; margin: 0; }
.ax-link { font-weight: 700; font-size: 14px; color: var(--burgundy); background: none; border: 0; padding: 10px 0; cursor: pointer; min-height: 40px; }

/* Карта баллов */
.ax-points { position: relative; overflow: hidden; border-radius: 24px; padding: 20px; color: #fff; background: var(--grad-deep); box-shadow: 0 16px 34px rgba(101, 0, 24, .3); }
.ax-points::before { content: ''; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(216, 180, 138, .45), transparent 65%); }
.ax-points::after { content: ''; position: absolute; left: -30px; bottom: -70px; width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(216, 180, 138, .35); }
.ax-points-row { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ax-points-label { font-size: 13px; opacity: .85; font-weight: 600; }
.ax-points-value { font-family: var(--font-serif); font-size: 40px; line-height: 1.1; font-weight: 600; margin-top: 2px; }
.ax-points-value small { font-size: 22px; }
.ax-level { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .16); border: 1px solid rgba(216, 180, 138, .6); font-weight: 700; font-size: 13px; white-space: nowrap; }
.ax-progress { position: relative; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .2); margin: 16px 0 8px; overflow: hidden; }
.ax-progress > span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--grad-gold); transition: width .6s ease; }
.ax-points-foot { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; opacity: .92; }
.ax-points-foot .btn { min-height: 40px; }

/* Ближайшая запись */
.ax-next { padding: 18px; border-radius: 22px; background: #fff; box-shadow: var(--shadow-card); border: 1px solid rgba(196, 154, 108, .2); }
.ax-next-head { display: flex; align-items: center; gap: 14px; }
.ax-date-tile { flex: none; width: 64px; text-align: center; border-radius: 16px; padding: 8px 4px; background: var(--blush-soft); color: var(--burgundy); }
.ax-date-tile b { display: block; font-family: var(--font-serif); font-size: 26px; line-height: 1; }
.ax-date-tile span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ax-next-title { font-weight: 800; font-size: 16px; line-height: 1.3; }
.ax-next-meta { color: var(--text-soft); font-size: 14px; margin-top: 2px; }
.ax-next-meta b { color: var(--text); }
.ax-next-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ax-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.ax-actions.three { grid-template-columns: 1fr 1fr 1fr; }
.ax-actions .btn { padding-left: 10px; padding-right: 10px; }

.ax-empty-cta { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 22px; background: var(--grad-blush); border: 1px dashed rgba(128, 0, 32, .25); }
.ax-empty-cta p { margin: 0; flex: 1; font-weight: 600; }

/* Горизонтальные ленты */
.ax-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 12px; margin: 0 -16px; scrollbar-width: none; }
.ax-scroll::-webkit-scrollbar { display: none; }
.ax-scroll > * { scroll-snap-align: start; flex: none; }

.ax-chip { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-pill); border: 1.5px solid rgba(128, 0, 32, .14); background: #fff; font-weight: 700; font-size: 14px; color: var(--text); cursor: pointer; white-space: nowrap; }
.ax-chip.is-active { background: var(--burgundy); color: #fff; border-color: var(--burgundy); box-shadow: var(--shadow-btn); }

.ax-cat { width: 84px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; padding: 0; color: var(--text); font-weight: 700; font-size: 12.5px; text-align: center; }
.ax-cat-ic { width: 64px; height: 64px; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: #fff; box-shadow: var(--shadow-soft); border: 1px solid rgba(196, 154, 108, .22); font-size: 28px; }
.ax-cat:active .ax-cat-ic { transform: scale(.94); }

.ax-svc-card { width: 200px; border-radius: 20px; background: #fff; box-shadow: var(--shadow-card); overflow: hidden; border: 1px solid rgba(196, 154, 108, .16); cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit; }
.ax-svc-ph { position: relative; height: 112px; background: var(--grad-blush); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.ax-svc-ph img { width: 100%; height: 100%; object-fit: cover; }
.ax-svc-body { padding: 12px 14px 14px; }
.ax-svc-name { font-weight: 800; font-size: 15px; line-height: 1.3; min-height: 39px; }
.ax-svc-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13px; color: var(--text-soft); }
.ax-price { font-weight: 800; color: var(--burgundy); font-size: 15px; }

.ax-master { width: 132px; text-align: center; background: #fff; border-radius: 20px; padding: 14px 10px; box-shadow: var(--shadow-soft); border: 1px solid rgba(196, 154, 108, .16); cursor: pointer; font: inherit; color: inherit; }
.ax-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 24px; color: var(--burgundy); background: var(--blush); box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--champagne); overflow: hidden; }
.ax-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ax-master-name { font-weight: 800; font-size: 14px; }
.ax-master-spec { font-size: 12px; color: var(--text-faint); line-height: 1.3; margin-top: 2px; }

.ax-promo { position: relative; overflow: hidden; border-radius: 22px; padding: 18px; background: var(--grad-gold); color: #fff; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; box-shadow: 0 12px 26px rgba(169, 126, 82, .3); }
.ax-promo h3 { color: #fff; margin: 0; font-size: 18px; }
.ax-promo p { margin: 0; opacity: .95; font-size: 14px; }
.ax-promo .ax-promo-code { display: inline-block; background: rgba(255, 255, 255, .25); border: 1px dashed rgba(255, 255, 255, .7); border-radius: 10px; padding: 4px 10px; font-weight: 800; letter-spacing: .06em; }

/* Списки */
.ax-list { background: #fff; border-radius: 20px; box-shadow: var(--shadow-soft); border: 1px solid rgba(196, 154, 108, .14); overflow: hidden; }
.ax-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 60px; border-bottom: 1px solid var(--line-soft); background: none; width: 100%; text-align: left; font: inherit; color: inherit; border-left: 0; border-right: 0; border-top: 0; cursor: pointer; }
.ax-row:last-child { border-bottom: 0; }
.ax-row:active { background: var(--blush-soft); }
.ax-row-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--blush-soft); color: var(--burgundy); flex: none; font-size: 19px; }
.ax-row-ic svg { width: 20px; height: 20px; }
.ax-row-main { flex: 1; min-width: 0; }
.ax-row-title { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.ax-row-sub { font-size: 13px; color: var(--text-faint); margin-top: 2px; }
.ax-row-end { text-align: right; font-weight: 800; white-space: nowrap; }
.ax-row-end.plus { color: #2F6B3B; }
.ax-row-end.minus { color: #A3332B; }
.ax-chev { color: var(--text-faint); flex: none; }

/* Поиск / фильтры */
.ax-search { position: relative; margin: 6px 0 12px; }
.ax-search input { padding-left: 46px; border-radius: 16px; min-height: 52px; background: #fff; box-shadow: var(--shadow-soft); border-color: transparent; }
.ax-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-faint); }
.ax-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.ax-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ax-grid .ax-svc-card { width: auto; }
@media (min-width: 640px) { .ax-grid { grid-template-columns: repeat(3, 1fr); } }
.ax-fav { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--burgundy); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-soft); }
.ax-fav svg { width: 20px; height: 20px; }
.ax-fav.is-on svg { fill: var(--burgundy); }

/* Детальная услуги (sheet) */
.ax-sheet-hero { margin: -6px -6px 14px; height: 150px; border-radius: 18px; background: var(--grad-blush); display: flex; align-items: center; justify-content: center; font-size: 56px; overflow: hidden; }
.ax-kv { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 14px; }
.ax-kv span { background: var(--blush-soft); color: var(--burgundy); padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; }

/* Сегменты / тумблеры */
.ax-seg { display: flex; padding: 4px; border-radius: 14px; background: rgba(128, 0, 32, .06); margin-bottom: 14px; }
.ax-seg button { flex: 1; min-height: 42px; border: 0; background: none; border-radius: 11px; font-weight: 700; color: var(--text-soft); cursor: pointer; font: inherit; font-weight: 700; }
.ax-seg button.is-active { background: #fff; color: var(--burgundy); box-shadow: var(--shadow-soft); }
.ax-toggle { position: relative; width: 52px; height: 32px; flex: none; }
.ax-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ax-toggle span { position: absolute; inset: 0; border-radius: 16px; background: rgba(48, 37, 42, .18); transition: background .2s; pointer-events: none; }
.ax-toggle span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .2s; }
.ax-toggle input:checked + span { background: var(--burgundy); }
.ax-toggle input:checked + span::after { transform: translateX(20px); }

/* Профиль */
.ax-profile { text-align: center; padding: 22px 18px; border-radius: 24px; background: var(--grad-blush); border: 1px solid rgba(196, 154, 108, .25); }
.ax-profile .ax-avatar { width: 84px; height: 84px; font-size: 32px; }
.ax-profile-name { font-family: var(--font-serif); font-size: 24px; color: var(--burgundy-ink); overflow-wrap: anywhere; }
.ax-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.ax-stat { background: #fff; border-radius: 16px; padding: 12px 6px; box-shadow: var(--shadow-soft); }
.ax-stat b { display: block; font-size: 20px; color: var(--burgundy); }
.ax-stat span { font-size: 12px; color: var(--text-faint); font-weight: 600; }

/* Нижняя навигация (5 пунктов, центр — «Запись») */
.ax-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid rgba(196, 154, 108, .25); box-shadow: 0 -8px 24px rgba(101, 0, 24, .06); padding-bottom: var(--safe-bottom); }
.ax-nav-inner { max-width: 560px; margin: 0 auto; height: var(--nav-h); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.ax-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; color: var(--text-faint); font-size: 11.5px; font-weight: 700; text-decoration: none; }
.ax-nav a svg { width: 24px; height: 24px; }
.ax-nav a.is-active { color: var(--burgundy); }
.ax-nav a.ax-nav-book { position: relative; color: var(--burgundy); }
.ax-nav a.ax-nav-book .ax-fab { width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; background: var(--grad-primary); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 22px rgba(128, 0, 32, .38), 0 0 0 5px #fff; }
.ax-nav a.ax-nav-book .ax-fab svg { width: 28px; height: 28px; }

/* Шаги записи (прогресс) */
.ax-steps { display: flex; gap: 6px; margin: 8px 0 18px; }
.ax-steps i { flex: 1; height: 5px; border-radius: 3px; background: rgba(128, 0, 32, .12); }
.ax-steps i.is-done { background: var(--burgundy); }
.ax-steps i.is-current { background: var(--grad-gold); }

/* =========================================================================
   Экран оплаты
   ========================================================================= */
.ax-pay-sum { padding: 18px; border-radius: 22px; background: #fff; box-shadow: var(--shadow-card); border: 1px solid rgba(196, 154, 108, .2); }
.ax-pay-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; color: var(--text-soft); }
.ax-pay-line b { color: var(--text); text-align: right; }
.ax-pay-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 12px; font-weight: 800; }
.ax-pay-total b { font-family: var(--font-serif); font-size: 28px; color: var(--burgundy); }
.ax-banks { display: grid; gap: 10px; }
.ax-bank { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 14px 16px; border-radius: 18px; background: #fff; border: 2px solid transparent; box-shadow: var(--shadow-soft); cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s, transform .12s; }
.ax-bank:active { transform: scale(.985); }
.ax-bank.is-selected { border-color: var(--burgundy); box-shadow: 0 10px 22px rgba(128, 0, 32, .14); background: var(--blush-soft); }
.ax-bank-logo { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px; color: #fff; flex: none; letter-spacing: -.02em; }
.ax-bank-logo.mbank { background: linear-gradient(135deg, #0E9F6E, #087F5B); }
.ax-bank-logo.obank { background: linear-gradient(135deg, #E6007E, #B4005F); }
.ax-bank-logo.abereke { background: linear-gradient(135deg, #1C9A3E 0 55%, #F39200 55%); }
.ax-bank-name { font-weight: 800; font-size: 16px; }
.ax-bank-sub { font-size: 13px; color: var(--text-faint); }
.ax-radio { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(48, 37, 42, .25); flex: none; position: relative; }
.ax-bank.is-selected .ax-radio { border-color: var(--burgundy); }
.ax-bank.is-selected .ax-radio::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--burgundy); }
.ax-qr { padding: 18px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-card); text-align: center; border: 1px solid rgba(196, 154, 108, .2); }
.ax-qr-frame { margin: 0 auto; max-width: 340px; padding: 14px; border-radius: 20px; background: #fff; border: 1px solid rgba(48, 37, 42, .08); }
.ax-qr-frame img { width: 100%; height: auto; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; display: block; margin: 0 auto; border-radius: 10px; }
.ax-qr-amount { font-family: var(--font-serif); font-size: 32px; color: var(--burgundy); margin: 12px 0 2px; }
.ax-note { display: flex; gap: 10px; text-align: left; padding: 12px 14px; border-radius: 14px; background: #FFF6E5; color: #6B4A00; font-size: 14px; line-height: 1.45; margin: 12px 0; }
.ax-note.info { background: var(--blush-soft); color: var(--burgundy-ink); }
.ax-steps-list { text-align: left; margin: 12px 0 0; padding-left: 20px; color: var(--text-soft); font-size: 14px; }
.ax-steps-list li { margin: 4px 0; }
.ax-pay-actions { display: grid; gap: 10px; margin-top: 14px; }
.ax-pay-actions .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ax-status-card { text-align: center; padding: 26px 18px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-card); }
.ax-status-ic { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 34px; background: #FFF1D6; }
.ax-status-ic.ok { background: #E3F0E4; }
.ax-status-ic.bad { background: #F8E0DF; }
.ax-bonus-box { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-soft); margin: 12px 0; }
.ax-bonus-box .ax-row-main { font-size: 14px; }

/* =========================================================================
   Экран приветствия
   ========================================================================= */
.ax-welcome { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: calc(28px + var(--safe-top)) 24px calc(28px + var(--safe-bottom)); background: radial-gradient(ellipse 120% 60% at 50% 0%, #F7DDE0 0%, rgba(247, 221, 224, 0) 70%), var(--cream); }
.ax-welcome-logo { width: min(78vw, 360px); height: auto; border-radius: 28px; box-shadow: 0 24px 60px rgba(101, 0, 24, .12); margin-top: 4vh; }
.ax-welcome h1 { font-size: clamp(26px, 7vw, 34px); margin: 26px 0 8px; }
.ax-welcome p { color: var(--text-soft); max-width: 340px; margin: 0 auto; }
.ax-welcome-actions { width: 100%; max-width: 380px; display: grid; gap: 12px; margin-top: 28px; }

/* =========================================================================
   Режим приложения для страницы записи (booking.php внутри кабинета / Mini App)
   ========================================================================= */
body.app-mode .site-header, body.app-mode .site-footer { display: none !important; }
body.app-mode .site-main { padding-top: calc(8px + var(--safe-top)); padding-bottom: calc(var(--nav-h) + 24px + var(--safe-bottom)); }
body.app-mode .ax-app-back { display: flex; }
.ax-app-back { display: none; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; padding: 6px 16px 0; }
.ax-app-back h1 { font-size: 21px; margin: 0; }

/* =========================================================================
   Публичный сайт / мастер-визард: тонкая шлифовка
   ========================================================================= */
.site-header { background: rgba(255, 249, 243, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(196, 154, 108, .25); }
.brand-logo { border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--champagne); }
.brand-name { color: var(--burgundy); }
.hero-logo { border-radius: 32px; box-shadow: 0 30px 70px rgba(101, 0, 24, .14); }
.slot { min-height: 46px; border-radius: 12px; font-weight: 700; }
.slot:disabled, .slot.is-busy { text-decoration: line-through; opacity: .38; cursor: not-allowed; }
.wizard-panel .card, .wizard .card { border-radius: 20px; }

/* =========================================================================
   Админ-панель и кабинет мастера
   ========================================================================= */
.sidebar { background: var(--grad-deep) !important; }
.sidebar .sidebar-link { border-radius: 12px; min-height: 44px; }
.sidebar .sidebar-link.is-active { background: rgba(255, 255, 255, .14); box-shadow: inset 3px 0 0 var(--champagne); }
.sidebar .brand-name { color: #fff; }
.stat-card { border-radius: 18px; }
.stat-card.is-alert { background: #FFF6E5; border-color: rgba(196, 154, 108, .55); }
a.stat-card { display: block; color: inherit; text-decoration: none; transition: transform .12s, box-shadow .2s; }
a.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.table th { color: var(--text-faint); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.pay-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.pay-toolbar .field { margin: 0; min-width: 140px; }
.pay-counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.pay-counter { padding: 12px 14px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); border: 2px solid transparent; cursor: pointer; text-align: left; font: inherit; }
.pay-counter.is-active { border-color: var(--burgundy); }
.pay-counter b { display: block; font-size: 22px; color: var(--burgundy); }
.pay-counter span { font-size: 12.5px; color: var(--text-soft); font-weight: 700; }
.pay-cards { display: grid; gap: 10px; }
.pay-card { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); border: 1px solid rgba(196, 154, 108, .16); cursor: pointer; }
.pay-card:hover { box-shadow: var(--shadow-card); }
.pay-card-title { font-weight: 800; }
.pay-card-sub { font-size: 13px; color: var(--text-faint); }
.pay-card-amount { font-weight: 800; color: var(--burgundy); text-align: right; font-size: 17px; }
.bank-admin { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.bank-admin .card { padding: 18px; }
.bank-admin .qr-preview { aspect-ratio: 1 / 1; border-radius: 14px; background: #FAF6F2; display: flex; align-items: center; justify-content: center; overflow: hidden; margin: 10px 0; border: 1px dashed rgba(48, 37, 42, .15); }
.bank-admin .qr-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.kv-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv-list dt { color: var(--text-faint); font-weight: 600; }
.kv-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.timeline { list-style: none; padding: 0; margin: 10px 0 0; }
.timeline li { position: relative; padding: 0 0 12px 20px; font-size: 13.5px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--champagne); }
.timeline li::after { content: ''; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }

/* Мастер: статус оплаты на карточке записи */
.mpay { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }

/* Доступность: меньше движения */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
body:not(.app-mode) #axNav { display: none; }

/* --- Исправления адаптивности (узкие экраны 320px) ---------------------- */
.modal { z-index: 1200; }
.toast-container { z-index: 3000; }
body.ax-app { overflow-x: hidden; }
.ax-wrap .btn, .modal .btn { white-space: normal; text-align: center; line-height: 1.25; }
.ax-actions, .ax-actions.three, .ax-pay-actions .row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ax-actions.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ax-note > span, .ax-note > div { flex: 1; min-width: 0; }
@media (max-width: 360px) {
    .ax-actions.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ax-actions.three > :last-child { grid-column: 1 / -1; }
    .ax-points-value { font-size: 34px; }
    .ax-nav a { font-size: 10.5px; }
    .ax-hello-title { font-size: 19px; }
}
.ax-bonus-box { flex-wrap: wrap; }
.ax-bonus-box input[type=range] { accent-color: var(--burgundy); height: 32px; }
.sidebar .sidebar-link, .sidebar .sidebar-link span { color: rgba(255, 255, 255, .82) !important; }
.sidebar .sidebar-link svg { color: rgba(238, 223, 204, .9); fill: currentColor; }
.sidebar .sidebar-link:hover { background: rgba(255, 255, 255, .08); color: #fff !important; }
.sidebar .sidebar-link.is-active, .sidebar .sidebar-link.is-active span { color: #fff !important; }
.sidebar .brand-sub { color: rgba(238, 223, 204, .85) !important; }
.sidebar .nav-badge { background: var(--champagne); color: #fff; }
.sidebar-brand { border-bottom-color: rgba(238, 223, 204, .2) !important; }
.main-nav .nav-link { white-space: nowrap; }
@media (max-width: 1280px) and (min-width: 1025px) { .main-nav { gap: 2px; } .main-nav .nav-link { padding-left: 8px; padding-right: 8px; font-size: 14px; } }

/* --- Без горизонтальной прокрутки на телефонах ------------------------------
   body в app.css — flex-колонка: дочерние элементы по умолчанию не сжимаются уже
   своего min-content (горизонтальные ленты) → раздувался layout viewport. */
html, body { max-width: 100%; overflow-x: hidden; }
body > * { min-width: 0; }
.ax-wrap { width: 100%; min-width: 0; }
@media (max-width: 1024px) {
    /* Выезжающее меню сайта: в закрытом состоянии не расширяет страницу */
    .main-nav { visibility: hidden; }
    .main-nav.is-open { visibility: visible; }
    .site-header { overflow: visible; }
}
@media (max-width: 1024px) {
    .main-nav { transition: transform .28s ease, visibility 0s linear .28s; }
    .main-nav.is-open { transition: transform .28s ease, visibility 0s; }
}
.ax-link { min-width: 44px; min-height: 44px; padding: 10px 6px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.photo-placeholder.has-photo { padding: 0; overflow: hidden; }
.photo-placeholder.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.avatar-photo { overflow: hidden; padding: 0; }
.avatar.avatar-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.photo-edit { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: var(--blush-soft); margin-bottom: 14px; }
.photo-edit .ph { width: 72px; height: 72px; border-radius: 16px; background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 12px; flex: none; }
.photo-edit .ph img { width: 100%; height: 100%; object-fit: cover; }

/* --- 2026-11-15: правки, найденные при подготовке инструкции ------------- */
/* Подсказки с иконкой: иконка не забирает половину ширины */
.ax-note > span:first-child:not(:only-child) { flex: 0 0 auto; }
/* Выбранное время остаётся белым и после касания (залипший :hover на телефонах) */
.slot.is-selected, .slot.is-selected:hover:not(:disabled) { color: #fff; border-color: transparent; }
/* Даты в онлайн-записи: все дни видны на узких экранах (раньше справа обрезались 2 колонки) */
.date-grid { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
.date-cell { min-width: 0; }
/* Кабинет мастера: кнопки «Клиент пришёл» / «Завершить» не вылезают за карточку */
@media (max-width: 640px) {
    .mst-booking-side { flex-wrap: wrap; justify-content: flex-start; }
    .mst-booking-side .cab-item-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mst-booking-side .cab-item-actions .btn:only-child { grid-column: 1 / -1; }
}
/* Разделитель «или» на странице входа: линии по бокам вместо бежевой плашки */
.hairline-center:not(:empty) { width: auto; background: none; opacity: 1; display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 13px; font-weight: 600; }
.hairline-center:not(:empty)::before, .hairline-center:not(:empty)::after { content: ''; flex: 1; height: 1px; background: var(--line); }
/* Баллы: «2 визита» не переносится по словам, подпись уровня — справа */
.ax-points-foot > span:first-child:has(+ span) { flex-shrink: 0; white-space: nowrap; }
.ax-points-foot > span + span { text-align: right; }
