/* =========================================================
   ZAPISI — дизайн-система
   Apple-inspired, mobile-first, один акцент
   ========================================================= */

:root {
    /* --- Цвета --- */
    --bg:               #F5F5F7;
    --surface:          #FFFFFF;
    --surface-hover:    #F2F2F5;
    --surface-active:   #E8E8ED;

    --text:             #0A0A0A;
    --text-secondary:   #6E6E73;
    --text-tertiary:    #AEAEB2;
    --text-disabled:    #C7C7CC;

    --accent:           #007AFF;
    --accent-hover:     #0066D6;
    --accent-soft:      #E5F0FF;

    --danger:           #FF3B30;
    --danger-soft:      #FFEBEA;

    --success:          #34C759;
    --success-soft:     #E6F7EB;

    --warning:          #FF9500;
    --warning-soft:     #FFF3E0;

    --border-subtle:    rgba(0, 0, 0, 0.06);
    --border:           rgba(0, 0, 0, 0.10);

    /* --- Типографика --- */
    --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text",
            "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* --- Скругления --- */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 14px;
    --r-xl: 18px;
    --r-2xl: 20px;
    --r-3xl: 24px;
    --r-pill: 999px;

    /* --- Тени --- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);

    /* --- Анимации --- */
    --t-fast: 0.15s ease;
    --t: 0.2s ease;
    --t-slow: 0.3s ease;

    /* --- Контейнер --- */
    --container: 480px;
    --header-h: 72px;
    --tabbar-h: 72px;
}

/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity var(--t);
}
a:hover { opacity: 0.7; }

button, input, select, textarea { font-family: inherit; }

code {
    background: var(--surface-active);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 13px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    word-break: break-all;
}

img { display: block; max-width: 100%; }

/* =========================================================
   КАРКАС
   ========================================================= */

.app {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.app__header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 245, 247, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--border-subtle);
}

.app__logo {
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.02em;
    color: var(--text);
}
.app__logo:hover { opacity: 1; }

.app__main {
    flex: 1;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 16px;
}

.app__footer {
    max-width: var(--container);
    margin: 0 auto;
    padding: 24px 16px calc(40px + env(safe-area-inset-bottom));
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* =========================================================
   ШАПКА КАБИНЕТА — user chip + bell
   ========================================================= */

.app__header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container);
    padding: 0 16px;
    gap: 12px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
    min-width: 0;
    flex: 1;
    text-align: left;
}
.user-chip:hover { opacity: 0.75; }

.user-chip__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8F1FB, #D8E6F8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.user-chip__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.user-chip__placeholder {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    user-select: none;
}

.user-chip__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}
.user-chip__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}
.user-chip__role {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 1px;
}
.user-chip__chev {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.app__bell {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--t-fast);
}
.app__bell:hover { background: var(--surface-active); }

/* =========================================================
   ТИПОГРАФИКА
   ========================================================= */

.page-title {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text);
}

.section-title {
    margin: 24px 0 8px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}
.section-title:first-child { margin-top: 0; }

.muted { color: var(--text-secondary); }
.error { color: var(--danger); }

.hint {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-tertiary);
}

/* =========================================================
   SURFACE / CARD
   ========================================================= */

.surface,
.card {
    background: var(--surface);
    border-radius: var(--r-2xl);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.surface--flat,
.card--ghost {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.surface__title,
.card__title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.surface__title--lg,
.card__title--lg {
    font-size: 22px;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.surface__text,
.card__text {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.surface__error,
.card__error {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--danger);
}

.card h1, .card h2,
.surface h1, .surface h2 {
    margin: 0 0 8px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.card h1, .surface h1 { font-size: 22px; letter-spacing: -0.02em; }
.card h2, .surface h2 { font-size: 17px; }
.card p, .surface p { margin: 8px 0; }

/* =========================================================
   КНОПКИ
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: var(--r-lg);
    border: none;
    background: var(--surface-active);
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    text-align: center;
    user-select: none;
    transition: background var(--t-fast), opacity var(--t-fast), transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover { background: #DFDFE4; opacity: 1; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn--primary {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}
.btn--primary:hover { background: var(--accent-hover); }

.btn--danger {
    background: var(--danger-soft);
    color: var(--danger);
}
.btn--danger:hover { background: #FFD9D6; }

.btn--block { display: flex; width: 100%; }

.btn--lg {
    min-height: 56px;
    font-size: 17px;
    border-radius: var(--r-xl);
}

.btn--small {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: var(--r-md);
}

.btn--tiny {
    min-height: 28px;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: var(--r-sm);
}

/* =========================================================
   PILLS / FILTERS
   ========================================================= */

.pill-tabs,
.filters {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--surface);
    border-radius: var(--r-pill);
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 16px;
}
.pill-tabs::-webkit-scrollbar { display: none; }

.pill-tabs .pill,
.filters .filter {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--t-fast), color var(--t-fast);
    font-family: inherit;
}

.pill-tabs .pill:hover,
.filters .filter:hover { color: var(--text); }

.pill-tabs .pill--active,
.filters .filter--active {
    background: var(--accent);
    color: #fff;
}
.pill-tabs .pill--active:hover,
.filters .filter--active:hover {
    background: var(--accent);
    color: #fff;
}

/* =========================================================
   CHIP / STATUS
   ========================================================= */

.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 500;
    background: var(--surface-active);
    color: var(--text-secondary);
    white-space: nowrap;
}

.chip--success { background: var(--success-soft); color: #1A7A3A; }
.chip--danger  { background: var(--danger-soft);  color: var(--danger); }
.chip--accent  { background: var(--accent-soft);  color: var(--accent); }
.chip--warning { background: var(--warning-soft); color: #B26A00; }

.status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 500;
    background: var(--surface-active);
    color: var(--text-secondary);
    white-space: nowrap;
}
.status--active    { background: var(--accent-soft);  color: var(--accent); }
.status--completed { background: var(--success-soft); color: #1A7A3A; }
.status--cancelled { background: var(--danger-soft);  color: var(--danger); }

/* =========================================================
   ROW — настройки
   ========================================================= */

.row-group {
    background: var(--surface);
    border-radius: var(--r-2xl);
    padding: 4px 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 0;
    border: none;
    background: none;
    border-bottom: 0.5px solid var(--border-subtle);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    transition: opacity var(--t-fast);
}
.row:last-child { border-bottom: none; }
.row:hover { opacity: 0.7; }

.row__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.row__label {
    flex: 1;
    min-width: 0;
    font-weight: 500;
}

.row__value {
    color: var(--text-secondary);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.row__chevron {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* =========================================================
   ФОРМЫ
   ========================================================= */

.field {
    display: block;
    margin-bottom: 16px;
}

.field__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: -0.005em;
}

.field .req { color: var(--danger); font-weight: 400; }

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    font-size: 16px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    outline: none;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    -webkit-appearance: none;
    appearance: none;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-tertiary);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.field textarea {
    resize: vertical;
    min-height: 88px;
}

.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236E6E73' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.field .hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-tertiary);
}

/* =========================================================
   TOGGLE
   ========================================================= */

.toggle {
    position: relative;
    width: 51px;
    height: 31px;
    flex-shrink: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle__track {
    position: absolute;
    inset: 0;
    background: var(--surface-active);
    border-radius: var(--r-pill);
    transition: background var(--t);
}

.toggle__track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: transform var(--t);
}

.toggle input:checked + .toggle__track { background: var(--success); }
.toggle input:checked + .toggle__track::after { transform: translateX(20px); }

/* =========================================================
   ACTIONS
   ========================================================= */

.actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.actions .btn { flex: 1; }

/* =========================================================
   BACK LINK
   ========================================================= */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 6px 0;
    font-size: 17px;
    font-weight: 400;
    color: var(--accent);
    cursor: pointer;
    margin-bottom: 12px;
    font-family: inherit;
    text-align: left;
}
.back-link:hover { opacity: 0.7; }

/* =========================================================
   SCREEN UX
   ========================================================= */

.screen { animation: screen-fade 0.24s ease; }
.screen[hidden] { display: none !important; }

@keyframes screen-fade {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* =========================================================
   КАТЕГОРИИ
   ========================================================= */

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 18px 0;
    background: none;
    border: none;
    border-bottom: 0.5px solid var(--border-subtle);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: opacity var(--t-fast);
}
.category-item:last-child { border-bottom: none; }
.category-item:hover { opacity: 0.6; }

.category-item--muted { color: var(--text-secondary); }

.category-item__name {
    font-size: 17px;
    font-weight: 500;
    color: var(--text);
}

.category-item__count {
    font-size: 14px;
    color: var(--text-tertiary);
    background: var(--surface-active);
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-weight: 500;
}

/* =========================================================
   SERVICES
   ========================================================= */

.service-list { list-style: none; margin: 0; padding: 0; }

.service-item,
.service-tile {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 16px 12px;
    background: none;
    border: none;
    border-bottom: 0.5px solid var(--border-subtle);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background var(--t-fast);
    border-radius: var(--r-lg);
    margin: 0 -12px;
}
.service-item:last-child,
.service-tile:last-child { border-bottom: none; }
.service-item:hover,
.service-tile:hover { background: var(--surface-hover); }
.service-item--selected,
.service-tile--selected { background: var(--accent-soft); }

.service-item__main,
.service-tile__main { flex: 1; min-width: 0; }
.service-item__name,
.service-tile__name { font-size: 16px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.service-item__desc,
.service-tile__desc { font-size: 13px; line-height: 1.4; margin-bottom: 4px; color: var(--text-secondary); }
.service-item__meta,
.service-tile__meta { font-size: 13px; color: var(--text-secondary); }
.service-item__price,
.service-tile__price { font-size: 16px; font-weight: 600; color: var(--text); white-space: nowrap; }

#categories-list .category-item,
#services-list .service-tile {
    margin: 0;
    padding: 16px 0;
    border-radius: 0;
}

/* =========================================================
   КАЛЕНДАРЬ
   ========================================================= */

.calendar { user-select: none; }

.calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.calendar__title {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.calendar__nav {
    background: var(--surface-active);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    color: var(--text);
    transition: background var(--t-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.calendar__nav:hover { background: #DFDFE4; }

.calendar__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    font-weight: 500;
}

.calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar__day {
    aspect-ratio: 1 / 1;
    border: none;
    background: transparent;
    border-radius: var(--r-md);
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    color: var(--text);
    transition: background var(--t-fast), color var(--t-fast);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.calendar__day:hover:not(:disabled) { background: var(--surface-active); }
.calendar__day--empty { background: transparent; cursor: default; pointer-events: none; }
.calendar__day--past  { color: var(--text-tertiary); cursor: not-allowed; }
.calendar__day--full  { color: var(--text-tertiary); cursor: not-allowed; opacity: 0.55; }
.calendar__day--selected { background: var(--accent); color: #fff; font-weight: 600; }
.calendar__day--selected:hover { background: var(--accent); }

/* =========================================================
   СЛОТЫ
   ========================================================= */

.slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}
@media (max-width: 380px) {
    .slots { grid-template-columns: repeat(3, 1fr); }
}

.slot {
    padding: 12px 8px;
    border-radius: var(--r-md);
    border: none;
    background: var(--surface-active);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text);
    transition: background var(--t-fast), color var(--t-fast);
    font-family: inherit;
    font-variant-numeric: tabular-nums;
}
.slot:hover { background: #DFDFE4; }
.slot--selected { background: var(--accent); color: #fff; font-weight: 600; }
.slot--selected:hover { background: var(--accent); }

/* =========================================================
   HOLD TIMER
   ========================================================= */

.hold-timer {
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--r-lg);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    margin: 16px 0;
    text-align: center;
}
.hold-timer--expired {
    background: var(--danger-soft);
    color: var(--danger);
}

/* =========================================================
   KV — карточка деталей
   ========================================================= */

.kv {
    margin: 0 0 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    font-size: 15px;
}
.kv dt {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
    padding: 6px 0;
    font-weight: 400;
}
.kv dd {
    margin: 0;
    padding: 6px 0;
    font-weight: 500;
    text-align: right;
}

/* =========================================================
   APPOINTMENT CARDS
   ========================================================= */

.appt-card {
    border-radius: var(--r-xl);
    padding: 16px;
    margin-bottom: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.appt-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.appt-card__date { font-weight: 600; font-size: 15px; }
.appt-card__time { font-size: 14px; color: var(--text-secondary); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.appt-card__service { font-size: 14px; margin-bottom: 4px; }
.appt-card__client { font-size: 13px; color: var(--text-secondary); }
.appt-card__actions { display: flex; gap: 8px; margin-top: 14px; }

/* =========================================================
   SERVICE CARDS (кабинет мастера)
   ========================================================= */

.service-card {
    border-radius: var(--r-xl);
    padding: 16px;
    margin-bottom: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.service-card--inactive { opacity: 0.55; }
.service-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.service-card__name { font-weight: 600; font-size: 15px; }
.service-card__cat { font-size: 12px; margin-top: 2px; color: var(--text-secondary); }
.service-card__desc { font-size: 13px; margin-top: 6px; line-height: 1.4; color: var(--text-secondary); }
.service-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}
.service-card__price { font-weight: 600; color: var(--text); font-size: 14px; }
.service-card__actions { display: flex; gap: 8px; margin-top: 14px; }

/* =========================================================
   SERVICE ROW (в /me/services)
   ========================================================= */

.service-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 0.5px solid var(--border-subtle);
}
.service-row:last-child { border-bottom: none; }
.service-row--inactive { opacity: 0.5; }
.service-row__main { flex: 1; min-width: 0; }
.service-row__name { font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.service-row__cat { font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; }
.service-row__meta { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.service-row .toggle { transform: scale(0.85); transform-origin: right center; flex-shrink: 0; }

/* =========================================================
   КАТЕГОРИИ УСЛУГ (список)
   ========================================================= */

.cat-list { list-style: none; padding: 0; margin: 0; }

.cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 0.5px solid var(--border-subtle);
    font-size: 14px;
}
.cat-item:last-child { border-bottom: none; }

/* =========================================================
   РАСПИСАНИЕ
   ========================================================= */

.period {
    border-radius: var(--r-xl);
    padding: 16px;
    margin-bottom: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.period__head {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.period__dates { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.period__pattern { font-size: 13px; margin-top: 4px; color: var(--text-secondary); }
.period__actions { display: flex; gap: 6px; align-items: flex-start; }

.day-row {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-top: 0.5px solid var(--border-subtle);
    font-size: 14px;
    align-items: center;
}
.day-row:first-of-type { border-top: none; }
.day-row__name { min-width: 44px; font-weight: 600; color: var(--text); font-size: 14px; }
.day-row__intervals { flex: 1; }

.interval-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 14px;
    align-items: center;
}
.interval-line__time { font-weight: 500; font-variant-numeric: tabular-nums; }

.interval-line__break {
    font-size: 12px;
    background: var(--surface-active);
    padding: 3px 8px;
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
}

/* =========================================================
   ИСКЛЮЧЕНИЯ
   ========================================================= */

.exc-list { list-style: none; margin: 0; padding: 0; }

.exc-item {
    border-bottom: 0.5px solid var(--border-subtle);
    padding: 14px 0;
}
.exc-item:last-child { border-bottom: none; }
.exc-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.exc-item__date { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.exc-item__body { font-size: 13px; margin-top: 4px; color: var(--text-secondary); }

.exc-interval {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--surface-active);
    border-radius: var(--r-md);
    margin-bottom: 6px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

/* =========================================================
   ЧЕКБОКСЫ / ЦИКЛ / РАДИО
   ========================================================= */

.weekday-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.weekday-checks label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: var(--r-md);
    background: var(--surface-active);
    transition: background var(--t-fast);
    font-weight: 500;
}
.weekday-checks label:hover { background: #DFDFE4; }
.weekday-checks input[type=checkbox] { margin: 0; accent-color: var(--accent); }

.cycle-row { display: flex; gap: 12px; }
.cycle-row label { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cycle-row input {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.cycle-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.radio-row { display: flex; gap: 16px; margin-top: 4px; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; cursor: pointer; }
.radio-row input { accent-color: var(--accent); }

/* =========================================================
   ПУБЛИЧНАЯ ССЫЛКА
   ========================================================= */

.pub-link { margin: 16px 0; }
.pub-link__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.pub-link__row { display: flex; gap: 8px; }

.pub-link__row input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    font-size: 13px;
    background: var(--surface-active);
    color: var(--text-secondary);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    outline: none;
    min-width: 0;
}

/* Slug — ввод своего адреса */
.slug-row {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
    padding: 0 14px;
    height: 48px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.slug-row:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.slug-row__prefix {
    color: var(--text-tertiary);
    font-size: 14px;
    white-space: nowrap;
    user-select: none;
    padding-right: 2px;
}

.slug-row input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    color: var(--text);
    padding: 0;
    height: 100%;
}

.slug-row input::placeholder {
    color: var(--text-tertiary);
}

.slug-row__clear {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    margin-left: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast), color var(--t-fast);
    flex-shrink: 0;
}
.slug-row__clear:hover {
    background: var(--surface-active);
    color: var(--text);
}
.slug-status {
    min-height: 18px;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.3;
}

.slug-status--ok  { color: #1A7A3A; }
.slug-status--err { color: var(--danger); }
.slug-status--checking { color: var(--text-tertiary); }
/* =========================================================
   NAV LIST
   ========================================================= */

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li { border-bottom: 0.5px solid var(--border-subtle); }
.nav-list li:last-child { border-bottom: none; }
.nav-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 16px;
    color: var(--text);
    font-weight: 500;
}
.nav-list a::after {
    content: "›";
    color: var(--text-tertiary);
    font-size: 20px;
    font-weight: 400;
}
.nav-list a:hover { opacity: 0.7; }


/* =========================================================
   ПУБЛИЧНАЯ СТРАНИЦА МАСТЕРА — обложка + профиль
   ========================================================= */

.mp-cover {
    position: relative;
    aspect-ratio: 21 / 9;
    max-height: 220px;
    border-radius: var(--r-2xl);
    overflow: hidden;         /* скругление для картинки */
    background: linear-gradient(135deg, #E8F1FB, #D8E6F8);
    /* Не двигаем вверх-вниз — просто в потоке */
}

.mp-cover__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-cover__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    opacity: 0.35;
}

/* Профиль — аватар + инфо в строку */
.mp-profile {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 0 0 0 20px; 
    margin-top: -25px;
    position: relative;
    z-index: 2;
}

.mp-avatar {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    border: 4px solid var(--accent);
    background: linear-gradient(135deg, #E8F1FB, #D8E6F8);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.mp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-avatar__placeholder {
    font-size: 40px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
    user-select: none;
}

.mp-info {
    flex: 1;
    min-width: 0;
    padding-top: 30px;
    padding-left: 16px;      /* отступ от авы */
    padding-right: 16px;     /* отступ от правого края */
    display: flex;
    flex-direction: column;
    align-items: center;      /* ← центрирует контент по горизонтали */
    text-align: center;       /* ← текст по центру */
}

.mp-name {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
    line-height: 1.15;
}

.mp-role {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.mp-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.mp-meta__row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.mp-meta__icon {
    flex-shrink: 0;
    color: var(--text-tertiary);
    margin-top: 1px;
}

.mp-meta__text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.mp-meta__time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--text);
}

/* Контакты — сразу под профилем, во всю ширину */
.mp-contacts {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;   /* ← все колонки равной ширины */
    gap: 8px;
    width: 100%;
    margin-top: 16px;
}

.mp-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 11px;
    font-weight: 500;
    min-width: 0;
    transition: opacity var(--t-fast);
}
.mp-contact:hover { opacity: 0.75; }

.mp-contact__circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--t-fast);
}
.mp-contact:active .mp-contact__circle { transform: scale(0.95); }

.mp-contact__circle--phone     { background: #E9F5EC; color: #1A7A3A; }
.mp-contact__circle--telegram  { background: #E1F1F8; color: #0088CC; }
.mp-contact__circle--vk        { background: #E1EBFA; color: #0077FF; }
.mp-contact__circle--max       { background: #F0E6F6; color: #7C3AED; }
.mp-contact__circle--instagram { background: #FCE4EC; color: #E1306C; }

.mp-contact__label {
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.15;
}

/* =========================================================
   ПУБЛИЧНАЯ СТРАНИЦА — категории-аккордеоны
   ========================================================= */

.mp-category {
    background: var(--surface);
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px;
    overflow: hidden;
}

.mp-category__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background var(--t-fast);
    background: none;
    border: none;
    width: 100%;
    font-family: inherit;
    text-align: left;
    color: var(--text);
}
.mp-category__head:hover { background: var(--surface-hover); }

.mp-category__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mp-category__icon svg { width: 22px; height: 22px; }

.mp-category__main { flex: 1; min-width: 0; }

.mp-category__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-category__count {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.mp-category__chev {
    color: var(--text-tertiary);
    font-size: 18px;
    transition: transform var(--t);
    flex-shrink: 0;
    line-height: 1;
}
.mp-category--open .mp-category__chev { transform: rotate(90deg); }

.mp-category__body {
    border-top: 0.5px solid var(--border-subtle);
    padding: 4px 0;
}

/* =========================================================
   ПУБЛИЧНАЯ СТРАНИЦА — карточка услуги
   ========================================================= */

.mp-service {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--t-fast);
    border-bottom: 0.5px solid var(--border-subtle);
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    font-family: inherit;
    text-align: left;
    color: var(--text);
}
.mp-service:last-child { border-bottom: none; }
.mp-service:hover { background: var(--surface-hover); }
.mp-service:active { background: var(--surface-active); }

.mp-service__thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--surface-active);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}
.mp-service__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-service__main { flex: 1; min-width: 0; }

.mp-service__name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-service__desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mp-service__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}
.mp-service__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}
.mp-service__meta-item svg {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.mp-service__price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    text-align: right;
}

.mp-service__price-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.mp-service__price-unit {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 1px;
}

/* =========================================================
   ПУБЛИЧНАЯ СТРАНИЦА — CTA «Написать мастеру»
   ========================================================= */

.mp-cta {
    background: var(--accent-soft);
    border-radius: var(--r-2xl);
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.mp-cta__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.mp-cta__text {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* =========================================================
   ПУБЛИЧНАЯ СТРАНИЦА — нижняя кнопка «Выбрать дату»
   ========================================================= */

.mp-bottom-bar {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--container);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--border-subtle);
    z-index: 150;
    transition: transform var(--t), opacity var(--t);
}

.mp-bottom-bar--hidden {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* =========================================================
   ПРОФИЛЬ МАСТЕРА
   ========================================================= */

.master-profile {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.master-profile__photo {
    width: clamp(110px, 32%, 160px);
    aspect-ratio: 4 / 5;
    flex-shrink: 0;
    border-radius: var(--r-2xl);
    overflow: hidden;
    background: linear-gradient(135deg, #E8F1FB, #D8E6F8);
    display: flex;
    align-items: center;
    justify-content: center;
}
.master-profile__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.master-profile__placeholder {
    font-size: 56px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.03em;
    user-select: none;
}
.master-profile__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.master-profile__name {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
    line-height: 1.15;
}
.master-profile__icon {
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-top: 1px;
}
.master-profile__address {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.master-profile__address-text { word-break: break-word; }
.master-profile__tz {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}
.master-profile__tz-time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--text);
}
.master-profile__tz-label { color: var(--text-tertiary); font-size: 12px; }

.master-about { margin-top: 20px; }
.master-about__wrapper { margin-top: 8px; }
.master-about__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.master-about__text--expanded { display: block; -webkit-line-clamp: unset; overflow: visible; }
.master-about__toggle {
    display: inline-block;
    background: none;
    border: none;
    padding: 6px 0;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    cursor: pointer;
    font-family: inherit;
}
.master-about__toggle:hover { opacity: 0.7; }

/* =========================================================
   КОНТАКТЫ
   ========================================================= */

.master-contacts {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.master-contacts__phone-row { display: flex; }
.master-contacts__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: var(--r-pill);
    background: var(--surface-active);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: background var(--t-fast), color var(--t-fast);
    min-height: 38px;
    text-decoration: none;
    flex-shrink: 0;
}
.contact-btn:hover { opacity: 1; }

.contact-btn--wide {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    min-width: 0;
}
.contact-btn--wide .contact-btn__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
    text-align: left;
}
.contact-btn__svg { display: block; flex-shrink: 0; }
.contact-btn__label { font-variant-numeric: tabular-nums; white-space: nowrap; }
.contact-btn__asterisk {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: inherit;
    margin-left: -2px;
}

.contact-btn--phone     { background: #E9F5EC; color: #1A7A3A; }
.contact-btn--phone:hover { background: #D8ECDD; }
.contact-btn--telegram  { background: #E1F1F8; color: #0088CC; }
.contact-btn--telegram:hover { background: #CBE6F2; }
.contact-btn--vk        { background: #E1EBFA; color: #0077FF; }
.contact-btn--vk:hover  { background: #C9DCF5; }
.contact-btn--max       { background: #F0E6F6; color: #7C3AED; }
.contact-btn--max:hover { background: #E5D6F0; }
.contact-btn--instagram { background: #FCE4EC; color: #E1306C; }
.contact-btn--instagram:hover { background: #F8CDD9; }

.contact-disclaimer {
    width: 100%;
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-tertiary);
}

.me-profile__tools {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 0.5px solid var(--border-subtle);
}

/* =========================================================
   ACTION BAR
   ========================================================= */

.action-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 16px -16px -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 50;
}
.action-bar__summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.action-bar__summary strong {
    color: var(--text);
    font-weight: 600;
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}
.action-bar .btn { width: 100%; }

/* =========================================================
   HERO / STEPS / HINT INLINE
   ========================================================= */

.hero { text-align: center; padding: 40px 8px 32px; }
.hero__title {
    margin: 0 0 12px;
    font-size: 32px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}
.hero__subtitle {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.steps { margin: 12px 0; padding-left: 22px; font-size: 15px; line-height: 1.7; }
.steps li { margin-bottom: 6px; }

.hint-inline {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.6;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* =========================================================
   RESULT SCREEN
   ========================================================= */

.result-check { display: inline-block; margin: 0 auto; }

.result-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 0.5px solid var(--border-subtle);
}
.result-row:last-child { border-bottom: none; }
.result-row__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}
.result-row__body { flex: 1; min-width: 0; }
.result-row__value { font-size: 15px; font-weight: 500; color: var(--text); line-height: 1.3; }
.result-row__label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* =========================================================
   TAB BAR
   ========================================================= */

.tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto;
    transform: none;              /* ← убрали transform */
    width: 100%;
    max-width: var(--container);
    z-index: 200;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--border-subtle);
    border-radius: 0;
}

.tab-bar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--t-fast);
    min-width: 0;
}
.tab-bar__item:hover { opacity: 1; color: var(--text-secondary); }
.tab-bar__item--active { color: var(--accent); }

.tab-bar__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-bar__label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: -0.005em;
    line-height: 1.1;
    white-space: nowrap;
}

/* =========================================================
   GREETING / SECTION-HEAD
   ========================================================= */

.greeting { margin-bottom: 24px; }
.greeting__title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text);
}
.greeting__subtitle {
    margin: 6px 0 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 24px 0 12px;
}
.section-head__title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}
.section-head__hint {
    font-size: 13px;
    color: var(--text-secondary);
}

/* =========================================================
   TODAY ITEM
   ========================================================= */

.today-item {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 0.5px solid var(--border-subtle);
}
.today-item:last-child { border-bottom: none; }

.today-item__bar {
    width: 3px;
    border-radius: 2px;
    background: var(--accent);
    flex-shrink: 0;
    align-self: stretch;
    min-height: 40px;
}
.today-item__bar--soon { background: var(--success); }
.today-item__bar--past { background: var(--text-tertiary); }

.today-item__body { flex: 1; min-width: 0; }

.today-item__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.today-item__time {
    font-weight: 600;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.today-item__status { flex-shrink: 0; }
.today-item__client { font-size: 14px; color: var(--text); margin-bottom: 2px; }
.today-item__service { font-size: 13px; color: var(--text-secondary); }

.today-item__menu {
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 20px;
    line-height: 1;
    color: var(--text-tertiary);
    cursor: pointer;
    align-self: center;
    flex-shrink: 0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast), color var(--t-fast);
}
.today-item__menu:hover {
    background: var(--surface-active);
    color: var(--text);
}

/* кликабельные today-item */
.today-item[data-id] {
    cursor: pointer;
    border-radius: var(--r-md);
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
    transition: background var(--t-fast);
}
.today-item[data-id]:hover { background: var(--surface-hover); }
.today-item[data-id]:active { background: var(--surface-active); }

.today-item--clickable {
    cursor: pointer;
    border-radius: var(--r-md);
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
    transition: background var(--t-fast);
}
.today-item--clickable:hover { background: var(--surface-hover); }
.today-item--clickable:active { background: var(--surface-active); }

.empty-note {
    padding: 24px 0;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* =========================================================
   SECTION-HEAD-TOGGLE
   ========================================================= */

.section-head-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    border-radius: var(--r-md);
    transition: opacity var(--t-fast);
}
.section-head-toggle:hover { opacity: 0.7; }

.section-head-toggle__title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}
.section-head-toggle__chevron {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-tertiary);
    transition: transform var(--t);
    line-height: 1;
}
.section-head-toggle__chevron--open { transform: rotate(90deg); }

/* =========================================================
   PROFILE HEAD
   ========================================================= */

.profile-head { text-align: center; padding: 8px 0 24px; }
.profile-head__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #E8F1FB, #D8E6F8);
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-head__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-head__placeholder {
    font-size: 40px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
    user-select: none;
}
.profile-head__name {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.2;
}
.profile-head__role {
    margin: 0 0 16px;
    font-size: 14px;
}
.profile-head__actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.profile-head__actions .btn {
    min-height: 36px;
    padding: 8px 16px;
    font-size: 14px;
}

/* =========================================================
   BOTTOM SHEET
   ========================================================= */

.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 300;
    animation: fade-in 0.2s ease;
}

.sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--container);
    background: var(--surface);
    border-radius: var(--r-3xl) var(--r-3xl) 0 0;
    padding: 0;
    z-index: 301;
    animation: sheet-up 0.24s ease;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
}

.sheet__handle {
    width: 36px;
    height: 4px;
    background: var(--surface-active);
    border-radius: 2px;
    margin: 4px auto 12px;
}

.sheet__title {
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    padding: 4px 0 12px;
    border-bottom: 0.5px solid var(--border-subtle);
    margin-bottom: 8px;
    color: var(--text);
    word-break: break-word;
}

.sheet__actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0;
}

.sheet__action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 8px;
    border: none;
    background: none;
    border-radius: var(--r-lg);
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background var(--t-fast);
}
.sheet__action:hover { background: var(--surface-hover); }

.sheet__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sheet__icon--success { background: var(--success-soft); color: var(--success); }
.sheet__icon--danger  { background: var(--danger-soft);  color: var(--danger); }
.sheet__icon--accent  { background: var(--accent-soft);  color: var(--accent); }

.sheet__close {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    border: none;
    background: var(--surface-active);
    border-radius: var(--r-lg);
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    transition: background var(--t-fast);
}
.sheet__close:hover { background: #DFDFE4; }

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes sheet-up {
    from { transform: translateX(-50%) translateY(100%); }
    to   { transform: translateX(-50%) translateY(0); }
}

/* --- Режим-выбор в sheet --- */

.sheet__action--mode {
    padding: 14px 8px;
    align-items: flex-start;
    gap: 14px;
}
.sheet__action__text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    text-align: left;
}
.sheet__action__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}
.sheet__action__sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.3;
}
.sheet__action__check {
    color: var(--accent);
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    align-self: center;
}

/* =========================================================
   SHEET — со скроллом (для больших форм)
   ========================================================= */

.sheet--scrollable {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    max-height: 90dvh;   /* dynamic vh для мобильных */
    padding: 0;           /* отступы даёт .sheet__scroll и .sheet__footer */
}

/* Ручка + заголовок остаются вверху, не скроллятся */
.sheet--scrollable .sheet__handle {
    flex-shrink: 0;
    margin: 4px auto 12px;
}

.sheet--scrollable .sheet__title {
    flex-shrink: 0;
    padding: 4px 16px 12px;
    margin: 0;
    border-bottom: 0.5px solid var(--border-subtle);
}

/* Скроллящаяся середина */
.sheet__scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    min-height: 0;   /* критично для flex-скролла */
}

/* Фиксированный низ с кнопками */
.sheet__footer {
    flex-shrink: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 0.5px solid var(--border-subtle);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sheet__footer .btn {
    width: 100%;
}

.sheet__footer .sheet__close {
    margin-top: 0;
}
/* =========================================================
   FAB
   ========================================================= */

.fab {
    position: fixed;
    right: calc(50% - (var(--container) / 2) + 16px);
    bottom: calc(72px + env(safe-area-inset-bottom) + 16px);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    transition: transform var(--t-fast), box-shadow var(--t-fast);
    z-index: 150;
    -webkit-tap-highlight-color: transparent;
}
.fab:hover { transform: scale(1.05); box-shadow: 0 8px 24px rgba(0, 122, 255, 0.5); }
.fab:active { transform: scale(0.95); }

@media (max-width: 512px) {
    .fab { right: 16px; }
}

/* =========================================================
   CLIENTS
   ========================================================= */

.search-field { margin-bottom: 16px; }

.search-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 16px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    -webkit-appearance: none;
    appearance: none;
}
.search-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.client-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-bottom: 0.5px solid var(--border-subtle);
    cursor: pointer;
    transition: background var(--t-fast);
    margin: 0 -12px;
    border-radius: var(--r-md);
}
.client-row:last-child { border-bottom: none; }
.client-row:hover { background: var(--surface-hover); }
.client-row:active { background: var(--surface-active); }

.client-row__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8F1FB, #D8E6F8);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}
.client-row__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.client-row__main { flex: 1; min-width: 0; }
.client-row__name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}
.client-row__phone {
    font-size: 13px;
    margin-bottom: 2px;
    font-variant-numeric: tabular-nums;
}
.client-row__meta { font-size: 12px; }

.client-row__note {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    padding: 4px 8px;
    background: var(--surface-active);
    border-radius: var(--r-sm);
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   IDENTITY CARDS (профиль клиента)
   ========================================================= */

.id-card {
    background: var(--surface);
    border-radius: var(--r-2xl);
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.id-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.id-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.id-card__icon--telegram { background: #E1F1F8; color: #0088CC; }
.id-card__icon--max      { background: #F0E6F6; color: #7C3AED; }
.id-card__icon--vk       { background: #E1EBFA; color: #0077FF; }

.id-card__main { flex: 1; min-width: 0; }
.id-card__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}
.id-card__status {
    font-size: 12px;
    margin-top: 2px;
}
.id-card__status--on  { color: #1A7A3A; }
.id-card__status--off { color: var(--text-tertiary); }

.id-card__notify {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 0.5px solid var(--border-subtle);
    cursor: pointer;
}
.id-card__notify-label {
    font-size: 14px;
    color: var(--text);
}
.id-card__notify .toggle { transform: scale(0.85); transform-origin: right center; }

/* Аватар в mode-sheet */

.sheet__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.sheet__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sheet__avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
/* =========================================================
   GUEST HEADER (для неавторизованных)
   ========================================================= */

#guest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container);
    padding: 0 16px;
    gap: 12px;
}

#guest-header .app__logo {
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}
#guest-header .app__logo:hover { opacity: 1; }

/* =========================================================
   CALENDAR — статусы дней (мягкий стиль)
   ========================================================= */

.calendar__day {
    position: relative;
}

.calendar__day--working {
    /* без фона, только в легенде */
}
.calendar__day--dayoff {
    color: var(--text-tertiary);
}
.calendar__day--special {
    background: #FFF8EC;
}

.calendar__day--today {
    border: 1.5px solid var(--accent);
}

.calendar__day--selected {
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 600;
    border-color: transparent;
}
.calendar__day--selected .calendar__day-dot {
    background: rgba(255, 255, 255, 0.85);
}

.calendar__day-dots {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
}

.calendar__day-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.calendar__day-dot--break {
    background: var(--warning);
}

/* Легенда */

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 0.5px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-secondary);
}
.cal-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.cal-legend__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.cal-legend__dot--working { background: #B8E6C5; }
.cal-legend__dot--dayoff  { background: #D5D5DA; }
.cal-legend__dot--special { background: #FFD699; }
.cal-legend__dot--appt    { background: var(--accent); }

/* Режим дня */

.day-mode {
    display: flex;
    align-items: center;
    gap: 14px;
}

.day-mode__icon {
    flex-shrink: 0;
}

.day-mode__main {
    flex: 1;
    min-width: 0;
}

.day-mode__title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.day-mode__text {
    font-size: 13px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.day-mode__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.day-mode__badge--work    { background: var(--success-soft); color: #1A7A3A; }
.day-mode__badge--off     { background: var(--surface-active); color: var(--text-secondary); }
.day-mode__badge--special { background: var(--warning-soft); color: #B26A00; }

/* Недельная полоса */

.week-strip {
    display: flex;
    gap: 6px;
}

.week-strip__day {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: var(--r-md);
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    transition: background var(--t-fast);
    min-width: 0;
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
}

.week-strip__day:hover {
    background: var(--surface-hover);
}

.week-strip__day--active {
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}



.week-strip__day--active .week-strip__name {
    color: rgba(255, 255, 255, 0.85);
}


.week-strip__badge {
    position: absolute;
    top: 3px;
    right: 6px;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.week-strip__day--active .week-strip__badge {
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent);
}

/* =========================================================
   WEEK STRIP NAV — стрелки листания
   ========================================================= */

.week-strip-nav {
    display: flex;
    align-items: stretch;
    gap: 4px;
}

.week-strip-nav__btn {
    flex-shrink: 0;
    width: 28px;
    border: none;
    background: var(--surface);
    border-radius: var(--r-md);
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--t-fast);
    box-shadow: var(--shadow-sm);
}
.week-strip-nav__btn:hover { background: var(--surface-hover); }
.week-strip-nav__btn:active { background: var(--surface-active); }

.week-strip-nav .week-strip {
    flex: 1;
    margin: 0;
    padding: 0;
}

/* =========================================================
   WEEK STRIP — фикс подсветки
   ========================================================= */

.week-strip__day--active,
.week-strip__day--active:hover,
.week-strip__day--active:active,
.week-strip__day--active:focus {
    background: var(--accent) !important;
    color: #fff !important;
    box-shadow: none;
}

.week-strip__day--active .week-strip__name {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Убираем серый hover на touch-устройствах для неактивных — чтобы не путал */
@media (hover: none) {
    .week-strip__day:hover {
        background: var(--surface);
    }
}

.day-mode__breaks {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}
.day-mode__breaks:empty {
    display: none;
}
.greeting__date-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 6px 0;
    margin-top: 6px;
    font-size: 15px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.greeting__date-btn:hover { color: var(--text); }
.greeting__date-btn svg { color: var(--text-tertiary); flex-shrink: 0; }

/* =========================================================
   INTERVAL BREAKS — вложенные перерывы
   ========================================================= */

.iv-breaks {
    margin-top: 8px;
    margin-left: 4px;
    padding-left: 12px;
    border-left: 2px solid var(--warning);
}

.iv-break-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.iv-break-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 6px 8px;
    background: var(--bg);
    border-radius: var(--r-md);
}

.iv-break-row input[type="time"] {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-size: 13px;
    background: var(--surface);
    font-family: inherit;
    color: var(--text);
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
}

.iv-break-row .iv-break-dash {
    color: var(--text-tertiary);
    font-size: 13px;
}

.iv-break-del {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 18px;
    padding: 2px 6px;
    cursor: pointer;
    line-height: 1;
}

.iv-break-add {
    background: none;
    border: none;
    color: var(--warning);
    font-size: 13px;
    font-weight: 500;
    padding: 4px 0;
    cursor: pointer;
    font-family: inherit;
}
.iv-break-add:hover { opacity: 0.75; }

/* =========================================================
   SCHEDULE — точки дней в календаре
   ========================================================= */

.calendar__day-dot--work {
    background: #34C759;
}
.calendar__day-dot--special {
    background: var(--warning);
}
.calendar__day-dot--off {
    background: var(--text-tertiary);
}

/* =========================================================
   Легенда — цвета совпадают с точками
   ========================================================= */

.cal-legend__dot--working { background: #34C759; }
.cal-legend__dot--dayoff  { background: var(--text-tertiary); }
.cal-legend__dot--special { background: var(--warning); }

/* =========================================================
   STATUS PICKER (Рабочий / Выходной / Особый)
   ========================================================= */

.status-picker {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.status-picker__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    border: 1.5px solid var(--border-subtle);
    background: var(--surface);
    border-radius: var(--r-lg);
    cursor: pointer;
    font-family: inherit;
    color: var(--text-secondary);
    transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
}

.status-picker__item:hover {
    background: var(--surface-hover);
}

.status-picker__item--active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.status-picker__item--active .status-picker__icon {
    background: var(--accent);
    color: #fff;
}

.status-picker__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface-active);
    color: var(--text-secondary);
    transition: background var(--t-fast), color var(--t-fast);
}

.status-picker__icon--work    { background: var(--success-soft); color: var(--success); }
.status-picker__icon--off     { background: var(--danger-soft);  color: var(--danger);  }
.status-picker__icon--special { background: var(--warning-soft); color: var(--warning); }

.status-picker__label {
    font-size: 12px;
    letter-spacing: -0.005em;
}

/* Заголовок секции sheet */
.sheet__section-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: -0.005em;
}

.day-edit-interval {
    padding: 12px 0;
}
.day-edit-interval + .day-edit-interval {
    border-top: 0.5px solid var(--border-subtle);
}
.day-edit-interval__row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.day-edit-interval__row input[type="time"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 15px;
    font-family: inherit;
    background: var(--surface);
    -webkit-appearance: none;
    appearance: none;
    min-width: 0;
}
.day-edit-interval__dash {
    color: var(--text-tertiary);
}
.day-edit-interval__del {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 20px;
    padding: 2px 8px;
    cursor: pointer;
}
/* =========================================================
   PATTERN PICKER — выбор паттерна / пресета
   ========================================================= */

.pattern-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pattern-picker__item {
    padding: 8px 14px;
    border: 1.5px solid var(--border-subtle);
    background: var(--surface);
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
    -webkit-tap-highlight-color: transparent;
}

.pattern-picker__item:hover {
    background: var(--surface-hover);
}

.pattern-picker__item--active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

/* =========================================================
   DATE RANGE — С / По
   ========================================================= */

.date-range {
    display: flex;
    gap: 8px;
}

.date-range__field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.date-range__label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    padding-left: 2px;
}

.date-range__field input[type="date"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 15px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    -webkit-appearance: none;
    appearance: none;
    min-width: 0;
}

.date-range__field input[type="date"]:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

/* =========================================================
   WEEKDAY ROW — компактная строка дня
   ========================================================= */

.wd-list {
    display: flex;
    flex-direction: column;
}

.wd-row {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border-bottom: 0.5px solid var(--border-subtle);
}

.wd-row:last-child {
    border-bottom: none;
}

.wd-row__line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wd-row__toggle {
    flex-shrink: 0;
    transform: scale(0.8);
    transform-origin: left center;
    margin-left: -4px;
}

.wd-row__name {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

.wd-row__times {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
}

.wd-row__times input[type="time"] {
    width: 84px;
    padding: 6px 4px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
    border-radius: var(--r-sm);
}

.wd-row__times input[type="time"]:focus {
    background: var(--accent-soft);
    outline: none;
}

.wd-row__dash {
    color: var(--text-tertiary);
    font-size: 13px;
}

.wd-row--off .wd-row__name {
    color: var(--text-tertiary);
}

.wd-row--off .wd-row__times {
    opacity: 0.35;
    pointer-events: none;
}

.wd-row__breaks {
    margin-left: 40px;
    margin-top: 4px;
}

.wd-row__break-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.wd-row__break-row input[type="time"] {
    width: 84px;
    padding: 4px 4px;
    border: none;
    background: var(--warning-soft);
    font-size: 13px;
    font-family: inherit;
    color: #8A5200;
    font-variant-numeric: tabular-nums;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
    border-radius: var(--r-sm);
}

.wd-row__break-row input[type="time"]:focus {
    background: #FFE7B8;
    outline: none;
}

.wd-row__break-dash {
    color: #B26A00;
    font-size: 12px;
}

.wd-row__break-del {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 16px;
    padding: 2px 6px;
    cursor: pointer;
    line-height: 1;
}

.wd-row__break-add {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 13px;
    padding: 6px 0;
    cursor: pointer;
    font-family: inherit;
    margin-left: 40px;
}

.wd-row__break-add:hover {
    color: var(--warning);
}

/* =========================================================
   ПЕРИОД-АККОРДЕОН
   ========================================================= */

.period-item {
    background: var(--surface);
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px;
    overflow: hidden;
}

.period-item__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background var(--t-fast);
}

.period-item__head:hover {
    background: var(--surface-hover);
}

.period-item__main {
    flex: 1;
    min-width: 0;
}

.period-item__dates {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.period-item__pattern {
    font-size: 13px;
    color: var(--text-secondary);
}

.period-item__chevron {
    font-size: 20px;
    color: var(--text-tertiary);
    transition: transform var(--t);
    line-height: 1;
}

.period-item--open .period-item__chevron {
    transform: rotate(90deg);
}

.period-item__body {
    padding: 0 16px 16px;
    border-top: 0.5px solid var(--border-subtle);
}

.period-item__actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.period-item__actions .btn {
    flex: 1;
}

/* Бейдж с числом записей в календаре-пикере */
.calendar__day-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.calendar__day--selected .calendar__day-badge {
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent);
}

#msch-warn-overlay {
    z-index: 500 !important;
}
#msch-warn-sheet {
    z-index: 501 !important;
}

/* =========================================================
   TOASTS — всплывающие уведомления
   ========================================================= */

.toasts {
    position: fixed;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--container);
    padding: 0 16px;
    z-index: 1000;   /* выше всех sheet'ов и модалок */
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    pointer-events: auto;
    animation: toast-in 0.24s cubic-bezier(0.32, 0.72, 0, 1);
    border-left: 4px solid var(--accent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.toast--error {
    border-left-color: var(--danger);
}
.toast--success {
    border-left-color: var(--success);
}
.toast--info {
    border-left-color: var(--accent);
}
.toast--warning {
    border-left-color: var(--warning);
}

.toast__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-top: 1px;
}

.toast--error .toast__icon {
    background: var(--danger-soft);
    color: var(--danger);
}
.toast--success .toast__icon {
    background: var(--success-soft);
    color: #1A7A3A;
}
.toast--info .toast__icon {
    background: var(--accent-soft);
    color: var(--accent);
}
.toast--warning .toast__icon {
    background: var(--warning-soft);
    color: #B26A00;
}

.toast__body {
    flex: 1;
    min-width: 0;
}

.toast__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    line-height: 1.3;
}

.toast__message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

.toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 18px;
    line-height: 1;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast), color var(--t-fast);
}

.toast__close:hover {
    background: var(--surface-active);
    color: var(--text);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-16px) scale(0.96);
    }
}

.toast--removing {
    animation: toast-out 0.2s ease forwards;
}
/* Тревожный бейдж — записи на выходном дне */
.week-strip__badge--alert {
    background: var(--danger);
    color: #fff;
}

.calendar__day-badge--alert {
    background: var(--danger);
    color: #fff;
}

/* Если день выбран (синий фон) — бейдж должен остаться заметным */
.week-strip__day--active .week-strip__badge--alert {
    background: #FFD9D6;
    color: var(--danger);
}

.calendar__day--selected .calendar__day-badge--alert {
    background: #FFD9D6;
    color: var(--danger);
}

/* =========================================================
   CROPPER — модалка обрезки фото
   ========================================================= */

.crop-container {
    position: relative;
    width: 100%;
    max-height: 60vh;
    overflow: hidden;
    background: #000;
    border-radius: var(--r-lg);
    margin: 0 auto;
}

.crop-container img {
    display: block;
    max-width: 100%;
}

.crop-actions {
    display: flex;
    gap: 8px;
}

.crop-actions .btn {
    flex: 1;
}

/* Стили внутри Cropper — переопределяем дефолты */
.crop-container .cropper-view-box,
.crop-container .cropper-face {
    border-radius: 0;
}

/* Круглая маска — только когда явно указано */
.crop-container--circle .cropper-view-box,
.crop-container--circle .cropper-face {
    border-radius: 50%;
}

.cropper-line,
.cropper-point {
    background-color: var(--accent);
}

.cropper-view-box {
    outline: 2px solid var(--accent);
    outline-color: var(--accent);
}

/* =========================================================
   ФОТО — секция в профиле мастера
   ========================================================= */

.photo-grid {
    display: flex;
    gap: 16px;
    align-items: stretch;   /* ← было flex-start */
    margin-top: 4px;
}

.photo-slot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

/* Кнопки в слоте — одинаковая ширина и высота, не зависят от превью */
.photo-slot .btn {
    width: 100%;
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-slot__preview {
    position: relative;
    background: var(--surface-active);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    margin: 0 auto;
}

/* Контейнер превью — фиксированная высота, чтобы превью (круг и прямоугольник)
   центрировались по вертикали, а метка/хинт/кнопки были на одной линии */
.photo-slot__preview-wrap {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.photo-slot__preview--circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    flex-shrink: 0;
}

.photo-slot__preview--rect {
    width: 160px;
    aspect-ratio: 21 / 9;      /* ≈ 60px высотой */
    border-radius: var(--r-lg);
    flex-shrink: 0;
    margin-top: 31px;           /* компенсация: (100 - 60) / 2 */
}

.photo-slot__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-slot__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.photo-slot__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    line-height: 1.2;
    margin-top: 4px;
}

.photo-slot__hint {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
    line-height: 1.2;
    min-height: 13px;
}

.photo-slot__hint--fallback {
    color: var(--warning);
    font-weight: 500;
}


.photo-fallback-hint {
    margin: 16px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-tertiary);
    display: flex;
    align-items: flex-start;
}

.photo-fallback-hint svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--text-secondary);
}

/* Правая часть заголовка карточки записи — чип + ⋯ */
.today-item__head-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
/* Комментарий клиента в карточке записи */
.today-item__comment {
    margin-top: 6px;
    padding: 6px 10px;
    background: var(--surface-active);
    border-radius: var(--r-sm);
    font-size: 13px;
    line-height: 1.35;
    color: var(--text-secondary);
    word-break: break-word;
}
/* Заблокированное поле — серый вид */
.field input:disabled,
.field select:disabled,
.field textarea:disabled {
    background: var(--surface-active);
    color: var(--text-tertiary);
    cursor: not-allowed;
    opacity: 0.7;
}

.field input:disabled::placeholder {
    color: var(--text-tertiary);
}

/* =========================================================
   TODAY AVATAR — круглая аватарка слева в карточке записи
   ========================================================= */

.today-avatar {
    flex-shrink: 0;
    align-self: stretch;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto 0;
    background: var(--surface-active);
    color: var(--text-secondary);
    font-weight: 600;
    border: 3px solid transparent;
    box-sizing: border-box;
}

/* Обводка — активная */
.today-avatar--active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

/* Обводка — завершённая / отменённая */
.today-avatar--past {
    border-color: var(--surface-active);
    background: var(--surface-active);
    color: var(--text-tertiary);
}

.today-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Затемняем фото у неактивных */
.today-avatar--past img {
    opacity: 0.55;
}

.today-avatar--active img {
    opacity: 1;
}

.today-avatar__letter {
    font-size: 20px;
    line-height: 1;
    user-select: none;
}


/* =========================================================
   ME SERVICES — список категорий и услуг (аккордеон)
   ========================================================= */

.ms-category {
    background: var(--surface);
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px;
    overflow: hidden;
}

.ms-category--inactive {
    opacity: 0.55;
}

.ms-category__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background var(--t-fast);
    background: none;
    border: none;
    width: 100%;
    font-family: inherit;
    text-align: left;
    color: var(--text);
}

.ms-category__head:hover {
    background: var(--surface-hover);
}

.ms-category__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ms-category__icon svg {
    width: 22px;
    height: 22px;
}

.ms-category__main {
    flex: 1;
    min-width: 0;
}

.ms-category__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-category__count {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.ms-category__menu {
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 20px;
    line-height: 1;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast), color var(--t-fast);
    flex-shrink: 0;
}
.ms-category__menu:hover {
    background: var(--surface-active);
    color: var(--text);
}

.ms-category__chev {
    color: var(--text-tertiary);
    font-size: 18px;
    transition: transform var(--t);
    flex-shrink: 0;
    line-height: 1;
    margin-left: 2px;
}
.ms-category--open .ms-category__chev {
    transform: rotate(90deg);
}

.ms-category__body {
    border-top: 0.5px solid var(--border-subtle);
    padding: 4px 0;
}

/* ------------- Услуга внутри категории ------------- */

.ms-service {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--t-fast);
    border-bottom: 0.5px solid var(--border-subtle);
}
.ms-service:last-child {
    border-bottom: none;
}
.ms-service:hover {
    background: var(--surface-hover);
}

.ms-service--inactive {
    opacity: 0.5;
}

.ms-service__thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--surface-active);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}
.ms-service__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ms-service__main {
    flex: 1;
    min-width: 0;
}
.ms-service__name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ms-service__meta {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.ms-service__price {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.ms-service__menu {
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 18px;
    line-height: 1;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast), color var(--t-fast);
    flex-shrink: 0;
}
.ms-service__menu:hover {
    background: var(--surface-active);
    color: var(--text);
}

/* ------------- Пустое состояние внутри категории ------------- */

.ms-category__empty {
    padding: 16px 16px 20px;
    font-size: 13px;
    color: var(--text-tertiary);
    text-align: center;
}

/* =========================================================
   ICON PICKER — выбор иконки категории
   ========================================================= */

.icon-picker {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.icon-picker__item {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: var(--surface-active);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
    padding: 0;
}

.icon-picker__item:hover {
    background: var(--surface-hover);
}

.icon-picker__item--active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.icon-picker__item svg {
    width: 22px;
    height: 22px;
}

/* =========================================================
   CHECK ROW — строка с чекбоксом
   ========================================================= */

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--accent);
}
.check-row label {
    font-size: 15px;
    color: var(--text);
    margin: 0;
    cursor: pointer;
}

/* =========================================================
   PHOTO SLOT — квадратный вариант (для услуги)
   ========================================================= */

.photo-slot__preview--square {
    width: 100px;
    height: 100px;
    border-radius: var(--r-lg);
    margin: 0 auto;
}

/* =========================================================
   MOVE LIST — список категорий для перемещения
   ========================================================= */

.move-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px;
    cursor: pointer;
    border-bottom: 0.5px solid var(--border-subtle);
    transition: background var(--t-fast);
    border-radius: var(--r-md);
    width: 100%;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    font-family: inherit;
    text-align: left;
    color: var(--text);
}
.move-item:last-child {
    border-bottom: none;
}
.move-item:hover {
    background: var(--surface-hover);
}
.move-item--current {
    background: var(--accent-soft);
}
.move-item__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.move-item__name {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.move-item__check {
    color: var(--accent);
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

/* =========================================================
   SERVICE CATEGORY — компактный список категорий
   ========================================================= */

.service-category {
    border-bottom: 0.5px solid var(--border-subtle);
}

.service-category:last-child {
    border-bottom: none;
}

.service-category__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: var(--text);
    transition: opacity var(--t-fast);
}

.service-category__head:hover {
    opacity: 0.7;
}

.service-category__name {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.service-category__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.service-category__count {
    font-size: 13px;
    color: var(--text-tertiary);
}

.service-category__chevron {
    font-size: 18px;
    color: var(--text-tertiary);
    transition: transform var(--t);
    line-height: 1;
}

.service-category--open .service-category__chevron {
    transform: rotate(90deg);
}

.service-category__body {
    padding: 0 0 8px;
    margin-left: 12px;
    border-left: 2px solid var(--border-subtle);
    padding-left: 12px;
}

.service-category__body .service-tile {
    padding: 12px 0;
    margin: 0;
    border-radius: 0;
    border-bottom: 0.5px solid var(--border-subtle);
}

.service-category__body .service-tile:last-child {
    border-bottom: none;
}

/* =========================================================
   QR-код публичной ссылки
   ========================================================= */

.qr-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.qr-block__canvas {
    padding: 10px;
    background: #fff;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-block__canvas img,
.qr-block__canvas canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-block__hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    word-break: break-all;
    max-width: 100%;
}

/* =========================================================
   TAB BAR — центральная кнопка QR (только в мастерском)
   ========================================================= */

.tab-bar__qr {
    flex: 0 0 auto;
    width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.tab-bar__qr-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
    margin-top: -22px;      /* выступает над таб-баром */
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.tab-bar__qr:hover .tab-bar__qr-circle {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.5);
}

.tab-bar__qr:active .tab-bar__qr-circle {
    transform: scale(0.95);
}

/* =========================================================
   Role picker (главная страница)
   ========================================================= */

.role-picker {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.role-card {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

.role-card:active {
    transform: scale(0.98);
    background: var(--surface-active, var(--surface));
}

.role-card:hover {
    border-color: var(--accent);
}

.role-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
}

.role-card__icon--master {
    background: #E8F1FB;
    color: #007AFF;
}

.role-card__icon--client {
    background: #E5F0FF;
    color: #007AFF;
}

.role-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.role-card__title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.role-card__subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.35;
}

.role-card__chev {
    font-size: 24px;
    color: var(--text-tertiary);
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.12s ease;
}

.role-card:active .role-card__chev {
    transform: translateX(2px);
}

.role-picker__hint {
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* =========================================================
   Шапка: контейнер для кнопок справа
   ========================================================= */

.app__header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.app__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.app__icon-btn:active {
    background: var(--surface-active, rgba(0,0,0,0.05));
}

.app__icon-btn--logout:active {
    background: rgba(255, 59, 48, 0.12);
    color: var(--danger, #FF3B30);
}

/* =========================================================
   ТЁМНАЯ ТЕМА
   ========================================================= */

[data-theme="dark"] {
    --bg: #000000;
    --surface: #1C1C1E;
    --surface-active: #2C2C2E;
    --border: #38383A;
    --text: #FFFFFF;
    --text-secondary: #98989F;
    --text-tertiary: #636366;
    --accent: #0A84FF;
    --accent-soft: #0A84FF22;
    --danger: #FF453A;
    --warning: #FFD60A;
    --success: #32D74B;

    color-scheme: dark;
}

[data-theme="dark"] body {
    background: var(--bg);
    color: var(--text);
}

[data-theme="dark"] .surface,
[data-theme="dark"] .card {
    background: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .app__header {
    background: rgba(28, 28, 30, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .tab-bar {
    background: rgba(28, 28, 30, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top-color: var(--border);
}

[data-theme="dark"] .sheet {
    background: #1C1C1E;
}

[data-theme="dark"] .calendar__day {
    color: var(--text);
}

[data-theme="dark"] .calendar__day--empty {
    color: var(--text-tertiary);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #1C1C1E;
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-tertiary);
}

[data-theme="dark"] .btn {
    background: #2C2C2E;
    color: var(--text);
}

[data-theme="dark"] .btn--primary {
    background: var(--accent);
    color: #FFFFFF;
}

[data-theme="dark"] .btn--danger {
    background: #2C2C2E;
    color: var(--danger);
}

/* =========================================================
   ТЁМНАЯ ТЕМА — расширенные правки
   ========================================================= */

[data-theme="dark"] {
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border:        rgba(255, 255, 255, 0.12);
    --surface-hover: #2C2C2E;
    --text-disabled: #48484A;

    --danger-soft:  rgba(255, 69, 58, 0.15);
    --success-soft: rgba(50, 215, 75, 0.15);
    --warning-soft: rgba(255, 214, 10, 0.15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* --- Кнопки: hover --- */
[data-theme="dark"] .btn:hover,
[data-theme="dark"] .calendar__nav:hover,
[data-theme="dark"] .sheet__close:hover,
[data-theme="dark"] .slot:hover,
[data-theme="dark"] .weekday-checks label:hover {
    background: #3A3A3C;
}

[data-theme="dark"] .btn--danger:hover {
    background: rgba(255, 69, 58, 0.25);
}

/* --- Полупрозрачные бары --- */
[data-theme="dark"] .action-bar {
    background: rgba(28, 28, 30, 0.85);
}
[data-theme="dark"] .mp-bottom-bar {
    background: rgba(28, 28, 30, 0.9);
}

/* --- Градиентные аватары --- */
[data-theme="dark"] .user-chip__avatar,
[data-theme="dark"] .profile-head__avatar,
[data-theme="dark"] .mp-avatar,
[data-theme="dark"] .master-profile__photo,
[data-theme="dark"] .client-row__avatar {
    background: linear-gradient(135deg, #1A2A3A, #14283C);
}

/* --- Иконки ролей на главной --- */
[data-theme="dark"] .role-card__icon--master,
[data-theme="dark"] .role-card__icon--client {
    background: rgba(10, 132, 255, 0.15);
    color: #5EA8FF;
}

/* --- Контакты: телефон / telegram / vk / max / instagram --- */
[data-theme="dark"] .contact-btn--phone     { background: rgba(52, 199, 89, 0.15);  color: #32D74B; }
[data-theme="dark"] .contact-btn--phone:hover { background: rgba(52, 199, 89, 0.25); }

[data-theme="dark"] .contact-btn--telegram  { background: rgba(0, 136, 204, 0.15);  color: #4FC3F7; }
[data-theme="dark"] .contact-btn--telegram:hover { background: rgba(0, 136, 204, 0.25); }

[data-theme="dark"] .contact-btn--vk        { background: rgba(0, 119, 255, 0.15);  color: #5EA8FF; }
[data-theme="dark"] .contact-btn--vk:hover  { background: rgba(0, 119, 255, 0.25); }

[data-theme="dark"] .contact-btn--max       { background: rgba(124, 58, 237, 0.15); color: #A78BFA; }
[data-theme="dark"] .contact-btn--max:hover { background: rgba(124, 58, 237, 0.25); }

[data-theme="dark"] .contact-btn--instagram { background: rgba(225, 48, 108, 0.15); color: #FF6B9D; }
[data-theme="dark"] .contact-btn--instagram:hover { background: rgba(225, 48, 108, 0.25); }

/* --- Круглые контакты на публичной странице --- */
[data-theme="dark"] .mp-contact__circle--phone     { background: rgba(52, 199, 89, 0.15);  color: #32D74B; }
[data-theme="dark"] .mp-contact__circle--telegram  { background: rgba(0, 136, 204, 0.15);  color: #4FC3F7; }
[data-theme="dark"] .mp-contact__circle--vk        { background: rgba(0, 119, 255, 0.15);  color: #5EA8FF; }
[data-theme="dark"] .mp-contact__circle--max       { background: rgba(124, 58, 237, 0.15); color: #A78BFA; }
[data-theme="dark"] .mp-contact__circle--instagram { background: rgba(225, 48, 108, 0.15); color: #FF6B9D; }

/* --- Иконки identity в профиле --- */
[data-theme="dark"] .id-card__icon--telegram { background: rgba(0, 136, 204, 0.15);  color: #4FC3F7; }
[data-theme="dark"] .id-card__icon--max      { background: rgba(124, 58, 237, 0.15); color: #A78BFA; }
[data-theme="dark"] .id-card__icon--vk       { background: rgba(0, 119, 255, 0.15);  color: #5EA8FF; }

/* --- Чипы и статусы: цвет текста ярче --- */
[data-theme="dark"] .chip--success,
[data-theme="dark"] .status--completed,
[data-theme="dark"] .day-mode__badge--work,
[data-theme="dark"] .slug-status--ok,
[data-theme="dark"] .id-card__status--on,
[data-theme="dark"] .toast--success .toast__icon {
    color: #32D74B;
}

[data-theme="dark"] .chip--danger,
[data-theme="dark"] .status--cancelled,
[data-theme="dark"] .toast--error .toast__icon {
    color: #FF453A;
}

[data-theme="dark"] .chip--warning,
[data-theme="dark"] .day-mode__badge--special,
[data-theme="dark"] .toast--warning .toast__icon {
    color: #FFD60A;
}

/* --- Календарь: особый день --- */
[data-theme="dark"] .calendar__day--special {
    background: rgba(255, 214, 10, 0.12);
}

/* --- Бейджи-алерты --- */
[data-theme="dark"] .week-strip__badge--alert,
[data-theme="dark"] .calendar__day-badge--alert {
    background: #FF453A;
    color: #FFFFFF;
}

[data-theme="dark"] .week-strip__day--active .week-strip__badge--alert,
[data-theme="dark"] .calendar__day--selected .calendar__day-badge--alert {
    background: #FFB3AE;
    color: #7A120C;
}

/* --- Перерывы в расписании (жёлтый фон) --- */
[data-theme="dark"] .wd-row__break-row input[type="time"] {
    background: rgba(255, 214, 10, 0.12);
    color: #FFD60A;
}
[data-theme="dark"] .wd-row__break-row input[type="time"]:focus {
    background: rgba(255, 214, 10, 0.22);
}
[data-theme="dark"] .wd-row__break-dash {
    color: #FFD60A;
}

/* --- Легенда календаря --- */
[data-theme="dark"] .cal-legend__dot--working { background: #32D74B; }
[data-theme="dark"] .cal-legend__dot--dayoff  { background: #636366; }
[data-theme="dark"] .cal-legend__dot--special { background: #FFD60A; }

/* =========================================================
   Тёмная тема: прошлые и нерабочие дни календаря
   ========================================================= */

[data-theme="dark"] .calendar__day--past,
[data-theme="dark"] .calendar__day--full {
    color: #48484A;              /* темнее, чем --text-tertiary */
    opacity: 0.7;
}

[data-theme="dark"] .calendar__day--dayoff {
    color: #636366;              /* --text-tertiary */
    opacity: 1;
}

/* Отдельно — если прошлый день ещё и выходной */
[data-theme="dark"] .calendar__day--past.calendar__day--dayoff {
    color: #48484A;
    opacity: 0.6;
}

/* =========================================================
   Notify token row
   ========================================================= */

.notify-token-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.notify-token-code {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: var(--surface-active);
    border-radius: var(--r-md);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 14px;
    letter-spacing: 0.02em;
    color: var(--text);
    word-break: break-all;
    min-width: 0;
    user-select: all;
}

.notify-token-row .btn {
    flex-shrink: 0;
}

/* =========================================================
   Compact identity rows (в одной карточке)
   ========================================================= */

.id-card__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 0.5px solid var(--border-subtle);
}

.id-card__row:last-child {
    border-bottom: none;
}

.id-card__row-main {
    flex: 1;
    min-width: 0;
}

.id-card__row-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.2;
}

.id-card__row-status {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.id-card__row-status--on {
    color: var(--success);
}

.id-card__row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

/* =========================================================
   Превью иконки категории события
   ========================================================= */

.event-cat-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface-active);
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.event-cat-preview svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* Когда выбрана категория — цветной фон */
.event-cat-preview--active {
    background: #E5F0FF;
    color: #007AFF;
}

/* Тёмная тема */
[data-theme="dark"] .event-cat-preview {
    background: #2C2C2E;
    color: #636366;
}
[data-theme="dark"] .event-cat-preview--active {
    background: rgba(10, 132, 255, 0.15);
    color: #5EA8FF;
}


/* =========================================================
   TOUR — онбординг-тур по интерфейсу
   ========================================================= */

.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0.6);
    animation: tour-fade-in 0.2s ease;
    pointer-events: auto;
}

@keyframes tour-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.tour-highlight {
    position: fixed;
    z-index: 901;
    border-radius: var(--r-md);
    box-shadow: 0 0 0 4px var(--accent), 0 0 0 9999px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    transition: left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.tour-tooltip {
    position: fixed;
    z-index: 902;
    background: var(--surface);
    color: var(--text);
    border-radius: var(--r-xl);
    padding: 18px;
    max-width: 340px;
    width: calc(100vw - 32px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    animation: tour-tooltip-in 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes tour-tooltip-in {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tour-tooltip__step {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.tour-tooltip__title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.tour-tooltip__text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0 0 18px;
}

.tour-tooltip__actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
}

.tour-tooltip__skip {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 14px;
    padding: 8px 0;
    cursor: pointer;
    font-family: inherit;
    transition: color var(--t-fast);
}
.tour-tooltip__skip:hover { color: var(--text-secondary); }

.tour-tooltip__next {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--t-fast), transform var(--t-fast);
}
.tour-tooltip__next:hover { background: var(--accent-hover); }
.tour-tooltip__next:active { transform: scale(0.97); }

.tour-tooltip__dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 14px;
}

.tour-tooltip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--surface-active);
    transition: background var(--t-fast), width var(--t-fast);
}
.tour-tooltip__dot--active {
    background: var(--accent);
    width: 18px;
    border-radius: 3px;
}

/* =========================================================
   HELP — модалка «Что где находится»
   ========================================================= */

.help-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 0.5px solid var(--border-subtle);
}
.help-item:last-child {
    border-bottom: none;
}

.help-item__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-item__body {
    flex: 1;
    min-width: 0;
}

.help-item__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.help-item__text {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary);
    margin: 0;
}

/* =========================================================
   ABOUT — Помощь и о сервисе
   ========================================================= */

/* --- HERO --- */
.about-hero {
    position: relative;
    border-radius: var(--r-2xl);
    overflow: hidden;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #C8DCEF 0%, #A5C2DD 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(120, 150, 180, 0.2);
}

.about-hero__img {
    position: relative;
    aspect-ratio: 21 / 9;
    width: 100%;
    overflow: hidden;
}

.about-hero__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-hero__body {
    position: absolute;
    inset: 0;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0) 100%
    );
}

.about-hero__desc {
    font-size: 12.5px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 10px;
    max-width: 95%;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.about-hero__title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.about-hero__subtitle {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 10px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.about-hero__badge {
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 10.5px;
    font-weight: 500;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Кнопка «О проекте и разработчике» --- */
.about-link-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    background: var(--surface);
    border: none;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: var(--text);
    margin-bottom: 16px;
    transition: background var(--t-fast);
}
.about-link-btn:hover { background: var(--surface-hover); }
.about-link-btn:active { background: var(--surface-active); }

.about-link-btn__icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #E4F0FA;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-link-btn__body { flex: 1; min-width: 0; }

.about-link-btn__title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.about-link-btn__text {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.3;
}

.about-link-btn__chevron {
    font-size: 20px;
    color: var(--text-tertiary);
    flex-shrink: 0;
    font-weight: 300;
}

/* --- Компактный блок строк --- */
.about-block {
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 8px;
}

.about-block__row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 0.5px solid var(--border-subtle);
}
.about-block__row:last-child { border-bottom: none; }

.about-block__icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.about-block__icon--blue   { background: #EBF3FF; color: #007AFF; }
.about-block__icon--yellow { background: #FFF8E8; color: #B26A00; }
.about-block__icon--red    { background: #FFEFEE; color: #E33A2E; }
.about-block__icon--green  { background: #EAF8EE; color: #1A7A3A; }
.about-block__icon--peach  { background: #FFF0E8; color: #B85B1F; }

.about-block__body { flex: 1; min-width: 0; }

.about-block__title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.25;
    letter-spacing: -0.005em;
}

.about-block__text {
    font-size: 12px;
    line-height: 1.3;
    color: var(--text-tertiary);
    margin-top: 1px;
}

.about-block__chevron {
    font-size: 18px;
    color: var(--text-tertiary);
    flex-shrink: 0;
    line-height: 1;
    font-weight: 300;
}

/* --- Связь (3 иконки) --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 0;
}

.contact-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 4px;
    border-radius: var(--r-lg);
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    transition: transform var(--t-fast), background var(--t-fast);
    box-shadow: var(--shadow-sm);
}
.contact-tile:hover { background: var(--surface-hover); }
.contact-tile:active { transform: scale(0.96); }

.contact-tile__circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-tile__circle--tg  { background: #E1F1F8; color: #0088CC; }
.contact-tile__circle--vk  { background: #E1EBFA; color: #0077FF; }
.contact-tile__circle--max { background: #F0E6F6; color: #7C3AED; }

.contact-tile__label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
}

/* --- Блок «Поддержать проект» --- */
.support-box {
    margin-top: 24px;
    padding: 24px 20px;
    border-radius: var(--r-2xl);
    background: linear-gradient(160deg, #FFF3F1 0%, #FFE4E0 100%);
    text-align: center;
}

.support-box__heart {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 8px;
}

.support-box__title {
    font-size: 18px;
    font-weight: 700;
    color: #C72F24;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.support-box__text {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #8B3A32;
}

.support-box__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--r-md);
    background: #E33A2E;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--t-fast), transform var(--t-fast);
}
.support-box__btn:hover { background: #C72F24; }
.support-box__btn:active { transform: scale(0.97); }

/* --- Юридический блок --- */
.legal-block {
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 8px;
}

.legal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 0.5px solid var(--border-subtle);
    transition: background var(--t-fast);
}
.legal-row:last-child { border-bottom: none; }
.legal-row:hover { background: var(--surface-hover); }
.legal-row:active { background: var(--surface-active); }

.legal-row__chevron {
    font-size: 18px;
    color: var(--text-tertiary);
    font-weight: 300;
    line-height: 1;
}

/* --- Разработчик (в модалке) --- */
.dev-block {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.dev-block__avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #E8F1FB, #D8E6F8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dev-block__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dev-block__initial {
    display: none;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}
.dev-block__avatar--placeholder .dev-block__initial { display: block; }

.dev-block__body { flex: 1; min-width: 0; }

.dev-block__name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.dev-block__role {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.dev-block__text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.dev-block__links {
    display: flex;
    gap: 10px;
    padding-top: 14px;
    border-top: 0.5px solid var(--border-subtle);
}

.dev-social {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-active);
    color: var(--text-secondary);
    text-decoration: none;
    transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast);
}
.dev-social:hover { background: var(--accent-soft); color: var(--accent); }
.dev-social:active { transform: scale(0.94); }

/* --- Модалка «Поддержать» --- */
.support-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.support-amount {
    padding: 14px 10px;
    border-radius: var(--r-md);
    background: var(--surface-active);
    border: 2px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    transition: border-color var(--t-fast), background var(--t-fast);
    font-variant-numeric: tabular-nums;
}
.support-amount:hover { background: var(--surface-hover); }
.support-amount--active {
    border-color: #E33A2E;
    background: #FFF0EF;
    color: #E33A2E;
}
.support-amount--other {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* --- Плитки-иконки (5 в ряд) — с анимацией --- */
.about-tiles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 24px;
}

.about-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px 10px;
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

/* Наведение мышью */
.about-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* Нажатие (тап на телефоне / клик) */
.about-tile:active {
    transform: scale(0.94);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Анимация иконки при hover */
.about-tile:hover .about-tile__icon {
    transform: scale(1.08) rotate(-2deg);
}

.about-tile:active .about-tile__icon {
    transform: scale(0.92);
}

.about-tile__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-tile__icon--blue   { background: #EBF3FF; color: #007AFF; }
.about-tile__icon--yellow { background: #FFF8E8; color: #B26A00; }
.about-tile__icon--red    { background: #FFEFEE; color: #E33A2E; }
.about-tile__icon--green  { background: #EAF8EE; color: #1A7A3A; }
.about-tile__icon--peach  { background: #FFF0E8; color: #B85B1F; }

.about-tile__label {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.15;
    letter-spacing: -0.005em;
    transition: color 0.15s ease;
}

.about-tile:hover .about-tile__label {
    color: var(--text);
}


/* =========================================================
   LEGAL — Юридические документы
   ========================================================= */

.legal-page {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 32px;
}

.legal-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: -4px 0 20px;
    padding-left: 2px;
}

.legal-doc {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
}

.legal-doc h2 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 28px 0 10px;
    padding-top: 4px;
}

.legal-doc h2:first-child {
    margin-top: 0;
}

.legal-doc p {
    margin: 0 0 12px;
    color: var(--text-secondary);
}

.legal-doc ul {
    margin: 0 0 14px;
    padding-left: 22px;
    color: var(--text-secondary);
}

.legal-doc li {
    margin-bottom: 6px;
    line-height: 1.55;
}

.legal-doc strong {
    color: var(--text);
    font-weight: 600;
}

.legal-doc a {
    color: var(--accent);
    text-decoration: none;
}
.legal-doc a:hover {
    text-decoration: underline;
}

.legal-footer-note {
    margin-top: 28px;
    padding: 16px 18px;
    background: var(--surface);
    border-radius: var(--r-lg);
    border-left: 3px solid var(--accent);
    box-shadow: var(--shadow-sm);
}

.legal-footer-note p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}

/* =========================================================
   ICON PICKER — плоский список эмодзи
   ========================================================= */

.ms-category__emoji {
    font-size: 22px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    transform: translateY(-1px);
    user-select: none;
}

/* Сетка эмодзи — 7 в ряд */
.icon-picker {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.icon-picker__item {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    border: 2px solid transparent;
    background: var(--surface-active);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background var(--t-fast), border-color var(--t-fast);
}

.icon-picker__item:hover {
    background: var(--surface-hover);
}

.icon-picker__item.icon-picker__item--active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.icon-picker__item .ms-category__emoji {
    font-size: 24px;
    pointer-events: none;
}