/* Юстихаб Календарь — 390×844, UI по .cursor/rules/UI СТАНДАРТЫ ИНТЕРФЕЙСОВ.mdc */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    height: 100svh;
    overflow: hidden;
}

body {
    margin: 0;
    height: 100%;
    height: 100svh;
    overflow: hidden;
    overflow-x: hidden;
    background: #000000;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

body.modal-open {
    overflow: hidden;
}

html.modal-open {
    overflow: hidden;
}

input,
textarea {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

/* Экран авторизации — по центру по вертикали, без боковых границ */
.auth-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 16px;
    background: #000;
    position: relative;
    box-sizing: border-box;
}
.auth-screen[hidden] {
    display: none !important;
}

/* При необходимости авторизации показываем только форму входа, календарь скрыт */
.main[hidden],
#main-content[hidden] {
    display: none !important;
}
.auth-screen__container {
    position: relative;
    z-index: 1;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    animation: authScreenFadeInUp 0.6s ease-out both;
}
@keyframes authScreenFadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.auth-screen__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 0;
    margin-bottom: 36px;
}
.auth-screen__logo-img {
    height: 22px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
}
.auth-screen__logo-title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 22px;
    font-weight: 300;
    margin-bottom: -4px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-screen__beta {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-top: -8px;
    color: #a78bfa;
    border: 1px solid #a78bfa;
    border-radius: 6px;
    padding: 2px 6px;
    align-self: center;
    flex-shrink: 0;
}
.auth-screen__heading {
    font-size: 18px;
    font-weight: 600;
    color: rgb(243, 244, 246);
    margin: 0 0 8px 0;
    text-align: center;
}
.auth-screen__hint {
    font-size: 14px;
    color: rgb(156, 163, 175);
    margin: 0 0 20px 0;
    text-align: center;
    line-height: 1.5;
}
.auth-screen__input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid #2a2b2c;
    border-radius: 12px;
    color: rgb(243, 244, 246);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}
.auth-screen__input::placeholder {
    color: rgb(107, 114, 128);
}
.auth-screen__input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}
.auth-screen__input:disabled {
    opacity: 0.55;
}
.auth-screen__btn {
    width: 100%;
    padding: 14px 24px;
    margin-top: 8px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}
.auth-screen__btn:hover:not(:disabled) {
    background: #2563eb;
}
.auth-screen__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.auth-screen__link {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: rgb(156, 163, 175);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    padding: 8px;
    margin-top: 12px;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
}
.auth-screen__link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgb(243, 244, 246);
}
.auth-screen__phone-display {
    text-align: center;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
}
.auth-screen__error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}
.auth-screen__error[hidden] {
    display: none;
}
@media (max-width: 430px) {
    .auth-screen__container {
        padding: 20px;
    }
    .auth-screen__logo-title {
        font-size: 20px;
    }
}

/* Фиксированная высота окна — прокрутка только внутри .main */
.app {
    width: 100%;
    max-width: 390px;
    height: 100%;
    height: 100svh;
    min-height: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: #000000;
    overflow: hidden;
    box-shadow: none;
}

/* Шапка — закреплена сверху при прокрутке .main */
.header {
    position: sticky;
    top: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 12px;
    background: rgba(16, 16, 21, 0.65);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.header__left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header__logo {
    height: 22px;
    width: auto;
    display: block;
}

.header__title {
    font-size: 19px;
    font-weight: 400;
    margin: 0 0 -5px 0;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.9);
}

.header__beta {
    font-size: 8px;
    font-weight: 300;
    color: #ffffff;
    padding: 2px 5px;
    background: #ffffff21;
    margin-left: -3px;
    border-radius: 6px;
    margin-top: -4px;
}

.header__right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header__notifications {
    position: relative;
    margin-right: 12px;
}

.header__notifications-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
}

.header__notifications-btn:hover,
.header__notifications-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08);
}

.header__notifications-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.header__notifications-icon {
    flex-shrink: 0;
}

.header__notifications-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    color: #fff;
    background: #ef4444;
    border-radius: 9px;
}

.header__notifications-badge[hidden] {
    display: none !important;
}

.header__notifications-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-width: calc(100vw - 24px);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: rgba(16, 16, 21, 0.98);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 20;
}

.header__notifications-dropdown[hidden] {
    display: none !important;
}

.header__notifications-dropdown-title {
    padding: 12px 16px 8px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header__notifications-list {
    overflow-y: auto;
    padding: 8px 0;
    max-height: 50vh;
    scrollbar-color: #4a5568 #2d3748;
}
.header__notifications-list::-webkit-scrollbar {
    width: 8px;
}
.header__notifications-list::-webkit-scrollbar-track {
    background: #2d3748;
}
.header__notifications-list::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}
.header__notifications-list::-webkit-scrollbar-thumb:hover {
    background: #5a6578;
}

.header__notifications-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header__notifications-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.header__notifications-item--unread {
    background: rgba(59, 130, 246, 0.08);
}

.header__notifications-item--unread:hover {
    background: rgba(59, 130, 246, 0.12);
}

.header__notifications-item-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header__notifications-item-title {
    font-weight: 600;
}

.header__notifications-item-body {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.header__notifications-item-date {
    flex-shrink: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.header__notifications-load-more {
    margin: 8px 16px 0;
    padding: 8px 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}
.header__notifications-load-more:hover {
    background: rgba(255, 255, 255, 0.12);
}

.header__notifications-read-all {
    margin: 8px 16px 12px;
    padding: 8px 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.header__notifications-read-all:hover {
    background: rgba(255, 255, 255, 0.12);
}

.header__notifications-read-all-icon {
    flex-shrink: 0;
}

.header__avatar-area {
    position: relative;
}

.header__avatar-wrap {
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__avatar-wrap:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header__avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.header__avatar.header__avatar--loaded {
    opacity: 1;
}

.header__avatar-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 300px;
    padding: 12px 16px 10px;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 20;
}

.header__avatar-menu[hidden] {
    display: none;
}

.header__avatar-menu-title {
    padding: 0 0 4px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
}

.header__lawyer-name {
    padding: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.header__lawyer-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0 10px;
}

.header__lawyer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease-out;
}

.header__lawyer-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Активный юрист (календарь которого открыт) — чуть светлее фона */
.header__lawyer-item.header__lawyer-item--selected,
.header__lawyer-item.header__lawyer-item--selected:hover {
    background: rgba(255, 255, 255, 0.08);
}

.header__lawyer-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    flex-shrink: 0;
}

.header__settings-btn,
.header__logout-btn {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
}
.header__settings-btn { margin-top: 8px; }
.header__logout-btn { margin-top: 12px; }
.header__settings-btn:hover,
.header__logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

/* Основной контент — единственная прокручиваемая область */
.main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.main__content {
    padding: 20px 20px 24px;
    flex: 1;
    min-height: min-content;
}

/* Переключатель вида: Календарь / Список */
.view-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    background: rgb(16, 16, 21);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.view-toggle__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease-out, color 0.2s ease-out;
}

.view-toggle__btn .view-toggle__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.2s ease-out;
}

.view-toggle__btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.view-toggle__btn:hover .view-toggle__icon {
    color: rgba(255, 255, 255, 0.65);
}

.view-toggle__btn--active {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
}

.view-toggle__btn--active .view-toggle__icon {
    color: rgba(255, 255, 255, 0.6);
}

/* Режим списка записей */
.list-view {
    padding: 0;
}

.list-view__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.list-view__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.list-view__nav-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.list-view__nav-btn:hover {
    background: transparent;
}

.list-view__nav-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.list-view__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    flex: 1;
    min-width: 0;
}

.list-view__filter {
    display: flex;
    align-items: center;
    gap: 4px;
}

.list-view__filter-btn {
    height: 24px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.list-view__filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Выбрано «Все» — та же обводка, что у цветных квадратиков */
.list-view__filter-btn--active {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
    color: #fff;
}

.list-view__filter-btn--active:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Кнопки-квадраты по цвету (синий / красный) */
.list-view__filter-btn--blue {
    width: 24px;
    height: 24px;
    padding: 0;
    background: #0071e3;
    border-color: rgba(255, 255, 255, 0.25);
}

.list-view__filter-btn--blue:hover {
    background: #0077ed;
}

.list-view__filter-btn--blue.list-view__filter-btn--active {
    background: #0071e3;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.list-view__filter-btn--red {
    width: 24px;
    height: 24px;
    padding: 0;
    background: #ea4335;
    border-color: rgba(255, 255, 255, 0.25);
}

.list-view__filter-btn--red:hover {
    background: #f04a3b;
}

.list-view__filter-btn--red.list-view__filter-btn--active {
    background: #ea4335;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.list-view__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-view__day {
    background: rgb(16, 16, 21);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
}

.list-view__day-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.list-view__slots {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.list-view__slot {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    font-size: 14px;
    color: #fff;
    background: #0071e3;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease-out;
}

.list-view__slot:hover,
.list-view__slot:focus {
    background: #0077ed;
    outline: none;
}

.list-view__slot--online {
    background: #0071e3;
}

.list-view__slot--online:hover,
.list-view__slot--online:focus {
    background: #0077ed;
}

.list-view__slot--inperson {
    background: #ea4335;
}

.list-view__slot--inperson:hover,
.list-view__slot--inperson:focus {
    background: #f04a3b;
}

.list-view__slot--court {
    background: #ea4335;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.list-view__slot--court .list-view__slot-primary {
    display: block;
    font-weight: 600;
}

.list-view__slot--court .list-view__slot-detail {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.4;
}

.list-view__slot--court:hover,
.list-view__slot--court:focus {
    background: #f04a3b;
    outline: none;
}

/* Записи и суды прошлых дней в списке — бледнее */
.list-view__day--past .list-view__slot {
    opacity: 0.6;
}

.list-view__day--past .list-view__slot:hover,
.list-view__day--past .list-view__slot:focus {
    opacity: 0.75;
}

.list-view__empty {
    margin: 0;
    padding: 24px 16px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    background: rgb(16, 16, 21);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Календарь */
.calendar {
    background: rgb(16, 16, 21);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 16px 20px;
}

.calendar__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.calendar__nav-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.calendar__nav-btn:hover {
    background: transparent;
}

.calendar__nav-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.calendar__month {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.calendar__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

.calendar__weekday {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 6px 0;
}

.calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar__day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
    border: 0;
    border-radius: 10px;
    padding: 4px;
    transition: background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out;
}

.calendar__day-num {
    line-height: 1;
}

/* Ряд кружков-слотов под числом: синий = свободный, зелёный = занятый */
.calendar__day-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2px;
    max-width: 100%;
}

.calendar__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.calendar__dot--free {
    background: rgba(255, 255, 255, 0.35);
}

.calendar__dot--busy {
    background: #0071e3;
}

.calendar__dot--court {
    background: #ea4335;
}

/* В прошлых днях точки записей/судов — бледнее */
.calendar__day--past .calendar__dot--free,
.calendar__day--past .calendar__dot--busy,
.calendar__day--past .calendar__dot--court {
    opacity: 0.55;
}

/* Выходные — бледно-красные неактивные блоки, слотов не показываем */
.calendar__day--weekend {
    background: rgba(234, 67, 53, 0.06);
    color: rgba(255, 255, 255, 0.5);
}

.calendar__day--empty {
    background: transparent;
    color: transparent;
    pointer-events: none;
}

/* Прошедшие даты — бледный вид, но кликабельны */
.calendar__day--past {
    color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.03);
}

/* Прошедший день, но выходной — как все выходные, красный */
.calendar__day--past.calendar__day--weekend {
    background: rgba(234, 67, 53, 0.06);
    color: rgba(255, 255, 255, 0.5);
}

/* Текущий день — обводка 1px */
.calendar__day--today {
    background: transparent;
    border: 1px solid #8b5cf6;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Выбранный активный день (клик) — обводка 1px */
.calendar__day--selected {
    background: rgba(0, 113, 227, 0.15);
    border: 1px solid #0071e3;
    font-weight: 600;
}

.calendar__day--selected.calendar__day--today {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid #8b5cf6;
}

/* Все непустые ячейки кликабельны (включая прошедшие) */
.calendar__day:not(.calendar__day--empty) {
    cursor: pointer;
}

.calendar__day:not(.calendar__day--empty):not(.calendar__day--selected):not(.calendar__day--past):active {
    background: rgba(255, 255, 255, 0.1);
    border: none;
}

.calendar__day:not(.calendar__day--empty):not(.calendar__day--selected).calendar__day--past:active {
    background: rgba(255, 255, 255, 0.06);
    border: none;
}

@media (hover: hover) {
    .calendar__day:not(.calendar__day--empty):not(.calendar__day--selected):not(.calendar__day--past):hover {
        background: rgba(255, 255, 255, 0.08);
        border: none;
    }
    .calendar__day:not(.calendar__day--empty):not(.calendar__day--selected).calendar__day--past:hover {
        background: rgba(255, 255, 255, 0.05);
        border: none;
    }
}

/* Блок слотов на выбранный день — сетка по часам (8:00–21:00), как в Google Calendar */
.day-slots {
    margin-top: 20px;
    padding: 18px 16px 20px;
    background: rgb(16, 16, 21);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

/* Режим только просмотр (прошлая дата/месяц): без кнопок, перетаскивание отключено; записи и суды бледнее */
.day-slots--readonly .day-slots__add,
.day-slots--readonly .day-slots__delete,
.day-slots--readonly .day-slots__add-court {
    display: none;
}

.day-slots--readonly .day-slots__block--busy,
.day-slots--readonly .day-slots__block--court,
.day-slots--readonly .day-slots__block--court-overlay {
    opacity: 0.6;
}

.day-slots__title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.day-slots--readonly .day-slots__toolbar {
    display: none;
}

.day-slots__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 14px;
}

.day-slots__toolbar-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.day-slots__toolbar-buttons {
    display: flex;
    gap: 6px;
}

.day-slots__toolbar-btn {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.day-slots__toolbar-btn--any {
    background: rgba(128, 128, 128, 0.35);
    color: rgba(255, 255, 255, 0.95);
}

.day-slots__toolbar-btn--online {
    background: rgba(66, 133, 244, 0.16);
    color: #fff;
}

.day-slots__toolbar-btn--in_person {
    background: rgba(234, 67, 53, 0.16);
    color: #fff;
}

.day-slots__toolbar-btn:hover {
    filter: brightness(1.1);
    color: #fff;
}

.day-slots__toolbar-btn--active {
    border: 1px solid #fff;
    box-shadow: 0 0 0 1px #fff;
    color: #fff;
}

.day-slots__type-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.day-slots__type-menu-btn {
    padding: 8px 14px;
    font-size: 14px;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.75);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.day-slots__type-menu-btn--any {
    background: rgba(128, 128, 128, 0.25);
}
.day-slots__type-menu-btn--online {
    background: rgba(66, 133, 244, 0.2);
}
.day-slots__type-menu-btn--in_person {
    background: rgba(234, 67, 53, 0.2);
}

.day-slots__type-menu-btn:hover {
    filter: brightness(1.15);
    color: rgba(255, 255, 255, 0.95);
}

.day-slots__block--menu-open {
    position: relative;
    transform: scale(1.03);
    transform-origin: center center;
    z-index: 1;
}

.day-slots__empty {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* Сетка дня: время слева, блок справа. При .day-slots__list--grid — грид для объединённых блоков суда. */
.day-slots__list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.day-slots__list--grid {
    position: relative;
    display: grid;
    grid-template-columns: 52px 1fr;
    grid-template-rows: repeat(28, 22px);
    row-gap: 1px;
    column-gap: 0;
}
.day-slots__half {
    min-height: 20px;
    display: flex;
    align-items: center;
}

.day-slots__overlay {
    position: absolute;
    top: 0;
    left: 52px;
    right: 0;
    bottom: 0;
    pointer-events: none;
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    z-index: 2;
}

.day-slots__overlay .day-slots__block--court-overlay {
    position: absolute;
    left: 0;
    right: 0;
    box-sizing: border-box;
    pointer-events: auto;
    border-radius: 4px;
    align-items: flex-start;
    padding-top: 8px;
    overflow: hidden;
    min-height: 0;
    background: linear-gradient(180deg, #ed4d3d 0%, #d93a2b 100%);
}

.day-slots__list--grid .day-slots__time {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding: 4px 10px 0 0;
}

.day-slots__list--grid .day-slots__time:first-child {
    border-top: none;
}

/* Полоска текущего времени (только для выбранного сегодня) */
.day-slots__now-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    margin-top: 10px;
    height: 2px;
    background: #ea4335;
    z-index: 4;
    pointer-events: none;
    display: none;
    box-shadow: 0 2px 10px 2px rgba(0, 0, 0, 0.18), 0 4px 20px 4px rgba(0, 0, 0, 0.12);
}

.day-slots__now-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ea4335;
    box-shadow: 0 3px 12px 2px rgba(0, 0, 0, 0.2), 0 6px 24px 4px rgba(0, 0, 0, 0.14);
}

.day-slots__hour {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: stretch;
    gap: 0;
    min-height: 44px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.day-slots__hour:first-child {
    border-top: none;
}

.day-slots__time {
    display: flex;
    align-items: flex-start;
    padding: 4px 10px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
}

.day-slots__block {
    min-height: 44px;
    background: transparent;
    border-radius: 4px;
}

.day-slots__block--placeholder {
    min-height: 44px;
    background: transparent;
    border-radius: 0;
}

.day-slots__list--grid .day-slots__block:not(:nth-child(2)) {
    position: relative;
}

/* Получасовая линия (между двумя 30-мин слотами внутри часа) — темнее */
.day-slots__list--grid .day-slots__half--second::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Часовая линия в колонке слотов (как слева у времени) — светлее */
.day-slots__list--grid .day-slots__half--first::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.day-slots__list--grid .day-slots__block--court-span {
    align-items: flex-start;
    padding-top: 8px;
}

.day-slots__list--grid .day-slots__block--court-span::before {
    display: none;
}

.day-slots__block--empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 0 8px;
}
.day-slots__list--grid .day-slots__block--empty {
    min-height: 20px;
    padding: 0 6px;
}

/* Получасовая высота для занятых/буферных/захолдированных слотов в сетке */
.day-slots__list--grid .day-slots__block--held,
.day-slots__list--grid .day-slots__block--buffer,
.day-slots__list--grid .day-slots__block--busy {
    min-height: 20px;
}

.day-slots__block--court-dragging {
    touch-action: none;
}

/* Анимация появления слота */
.day-slots__block--just-added {
    animation: day-slots__slot-appear 0.25s ease-out forwards;
}

@keyframes day-slots__slot-appear {
    from {
        opacity: 0.5;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Рассеивание частиц при удалении слота (в стиле Telegram) */
.day-slots__particles {
    position: fixed;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
    z-index: 10;
}

.day-slots__particle {
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    animation: day-slots__particle-burst 0.4s ease-out forwards;
}

@keyframes day-slots__particle-burst {
    from {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    to {
        transform: translate(var(--tx, 0), var(--ty, 0)) scale(0);
        opacity: 0;
    }
}

.day-slots__add-court {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    touch-action: none;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.2s ease-out, color 0.2s ease-out;
}

.day-slots__add-court:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.day-slots__add {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.2s ease-out, color 0.2s ease-out;
}

.day-slots__add:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.day-slots__add-slot {
    width: auto;
    height: auto;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
}

.day-slots__block--free {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}
/* Вогнутость на тёмном фоне: верх темнее, низ светлее. Верх не слишком тёмный. */
.day-slots__block--free-any {
    background: linear-gradient(to bottom, rgba(128, 128, 128, 0.11) 0%, rgba(128, 128, 128, 0.2) 100%);
}
.day-slots__block--free-online {
    background: linear-gradient(to bottom, rgba(66, 133, 244, 0.08) 0%, rgba(66, 133, 244, 0.16) 100%);
}
.day-slots__block--free-in_person {
    background: linear-gradient(to bottom, rgba(234, 67, 53, 0.08) 0%, rgba(234, 67, 53, 0.16) 100%);
}
.day-slots__list--grid .day-slots__block--free {
    min-height: 20px;
    padding: 0 6px;
}
.day-slots__list--grid .day-slots__block--free-any {
    background: linear-gradient(to bottom, rgba(128, 128, 128, 0.11) 0%, rgba(128, 128, 128, 0.2) 100%);
}
.day-slots__list--grid .day-slots__block--free-online {
    background: linear-gradient(to bottom, rgba(66, 133, 244, 0.08) 0%, rgba(66, 133, 244, 0.16) 100%);
}
.day-slots__list--grid .day-slots__block--free-in_person {
    background: linear-gradient(to bottom, rgba(234, 67, 53, 0.08) 0%, rgba(234, 67, 53, 0.16) 100%);
}

.day-slots__free-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.68);
}
.day-slots__list--grid .day-slots__free-label {
    font-size: 11px;
}

.day-slots__delete {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.2s ease-out, color 0.2s ease-out;
}

.day-slots__delete:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.65);
}

.day-slots__block--busy {
    background: linear-gradient(180deg, #0078eb 0%, #0066cc 100%);
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: grab;
    transition: opacity 0.2s ease-out;
}

.day-slots__block--busy:active {
    opacity: 0.9;
}

/* Захолдированный слот: «клиент записывается», без цвета типа консультации */
.day-slots__block--held {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: linear-gradient(180deg, rgba(128, 128, 128, 0.35) 0%, rgba(80, 80, 80, 0.45) 100%);
    cursor: help;
}

.day-slots__block--held .day-slots__held-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

/* Подтверждённая запись: онлайн — синий, встреча — красный */
.day-slots__block--booked-online {
    background: linear-gradient(180deg, #0078eb 0%, #0066cc 100%);
}

.day-slots__block--booked-in_person {
    background: linear-gradient(180deg, #e84545 0%, #c62828 100%);
}

.day-slots__block--google {
    background: linear-gradient(180deg, #4a5568 0%, #2d3748 100%);
}

/* Буферное время: не отображаем — прозрачный блок, без подписи и кнопок */
.day-slots__block--buffer {
    background: transparent !important;
    cursor: default;
    pointer-events: none;
}

.day-slots__block--buffer .day-slots__buffer-label {
    display: none;
}

.day-slots__client {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
}

.day-slots__block--court {
    background: #ea4335;
    display: flex;
    align-items: flex-start;
    padding: 8px 10px 0;
    cursor: pointer;
    transition: opacity 0.2s ease-out;
    overflow: hidden;
}

.day-slots__block--court:active {
    opacity: 0.9;
}

.day-slots__court-label {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    overflow: hidden;
    min-height: 0;
}

/* Черновик диапазона при долгом нажатии «+ суд» и перетаскивании */
.day-slots__draft-container {
    position: absolute;
    top: 0;
    left: 52px;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.day-slots__court-draft-block {
    position: absolute;
    left: 0;
    right: 0;
    border-radius: 10px;
    background: rgba(234, 67, 53, 0.5);
    box-sizing: border-box;
}

.day-slots__block.day-slots__drop-target {
    outline: 2px dashed rgba(0, 113, 227, 0.8);
    outline-offset: 2px;
    background: rgba(0, 113, 227, 0.12);
}

/* Один общий пунктирный блок при перетаскивании суда (высота = блоку суда) */
.day-slots__drop-preview.day-slots__drop-preview--court {
    border-radius: 10px;
    outline: 2px dashed rgba(234, 67, 53, 0.9);
    outline-offset: 2px;
    background: rgba(234, 67, 53, 0.12);
    box-sizing: border-box;
}

/* Перетаскивание занятых слотов: призрак и зона сброса */
body.day-slots-dragging {
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

/* Иначе на мобильных вертикальное движение забирает скролл .main и сбрасывает перетаскивание */
body.day-slots-dragging .main {
    touch-action: none;
    -webkit-touch-callout: none;
    overflow: hidden;
}

body.day-slots-no-scroll .main {
    touch-action: none;
    -webkit-overflow-scrolling: auto;
    overflow: hidden;
}

.day-slots__ghost {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 200;
    pointer-events: none;
    margin: 0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0.95;
    background: #0071e3;
    display: flex;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
}

body.day-slots-dragging .day-slots__block--busy,
body.day-slots-dragging .day-slots__block--court {
    cursor: grabbing;
}

.day-slots__ghost.day-slots__block--court {
    background: linear-gradient(180deg, #ed4d3d 0%, #d93a2b 100%);
    align-items: flex-start;
    padding: 8px 10px 0;
}

/* Карточка записи (при клике на занятый слот) */
.booking-card-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    max-height: 100vh;
    max-height: 100svh;
    padding: 24px 20px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: rgba(0, 0, 0, 0.6);
}

.booking-card {
    width: 100%;
    max-width: 360px;
    margin: auto 0;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 20px 24px 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.booking-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.booking-card__header .booking-card__title {
    margin: 0;
    flex: 1;
}

.booking-card__edit-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.booking-card__edit-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
}

.booking-card__edit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0071e3;
}

.booking-card__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.booking-card__close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
}

.booking-card__close:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0071e3;
}

.booking-card__title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.booking-card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.booking-card__body--scroll {
    /* Высота не ограничена — прокрутка общая (бэкдроп), без внутреннего скролла модалки */
}

/* Не менее 16px в модалке, чтобы на iOS не зумило при фокусе в поле */
.booking-card input,
.booking-card textarea,
.booking-card select {
    font-size: 16px !important;
}

.booking-card__link {
    color: #0071e3;
    text-decoration: none;
}

.booking-card__link:hover {
    text-decoration: underline;
}

.court-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.court-form__section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.court-form__section-title {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.4);
}

.court-form__textarea {
    width: 100%;
    min-height: 72px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.9);
    background: rgb(26, 26, 35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-sizing: border-box;
    resize: vertical;
}

.court-form__textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.court-form__textarea:hover,
.court-form__textarea:focus {
    border-color: rgba(255, 255, 255, 0.25);
    outline: none;
}

.court-form__side-hint {
    margin-bottom: 6px;
}

.court-form__toggle {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgb(26, 26, 35);
}

.court-form__toggle-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.court-form__toggle-btn:hover {
    color: rgba(255, 255, 255, 0.85);
}

.court-form__toggle-btn--selected {
    color: #fff;
    background: #0071e3;
}

.court-form__section-title--mt {
    margin-top: 14px;
}

.court-form__option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.court-form__option-btn {
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.7);
    background: rgb(26, 26, 35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.court-form__option-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.court-form__option-btn--selected {
    color: #fff;
    background: #0071e3;
    border-color: #0071e3;
}

.booking-card__row {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.booking-card__row--section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    flex-direction: column;
    gap: 4px;
}

.booking-card__label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
}

.booking-card__value {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

/* Кастомный выпадающий список (часовой пояс в настройках) */
.dropdown-wrap {
    position: relative;
    max-width: 320px;
}
.dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(28, 28, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}
.dropdown-trigger:hover {
    background: rgba(40, 40, 44, 0.98);
    border-color: rgba(255, 255, 255, 0.35);
}
.dropdown-trigger__text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dropdown-trigger__arrow {
    flex-shrink: 0;
    margin-left: 8px;
    opacity: 0.7;
    transition: transform 0.2s;
}
.dropdown-trigger[aria-expanded="true"] .dropdown-trigger__arrow {
    transform: rotate(180deg);
}
.dropdown-list {
    position: absolute;
    z-index: 10;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: #1c1c1f;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.08);
}
.dropdown-list::-webkit-scrollbar {
    width: 8px;
}
.dropdown-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}
.dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}
.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);
}
.dropdown-item {
    padding: 10px 14px;
    font-size: 14px;
    color: #e8e8e8;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dropdown-item:last-child {
    border-bottom: none;
}
.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.dropdown-item--selected {
    background: rgba(0, 113, 227, 0.2);
    color: #7eb8f5;
}
.dropdown-item--selected:hover {
    background: rgba(0, 113, 227, 0.3);
    color: #9cc9f7;
}

.cancel-confirm__text,
.move-booking-modal .booking-card__body > .cancel-confirm__text {
    margin: 0 0 16px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.45;
}

.move-booking-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.move-booking-form__label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.move-booking-days,
.move-booking-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.move-booking-day-btn,
.move-booking-slot-btn {
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgb(26, 26, 35);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}

.move-booking-day-btn:hover,
.move-booking-slot-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.25);
}

.move-booking-day-btn--active,
.move-booking-slot-btn--active {
    border-color: #0071e3;
    background: rgba(0, 113, 227, 0.15);
    color: #7eb8f5;
}

.move-booking-form__row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.move-booking-form__row .move-booking-form__input {
    flex: 1;
    min-width: 0;
}

.move-booking-form__row--time .move-booking-form__input--min {
    flex: 0 0 auto;
    width: 72px;
}

.move-booking-form__row select.move-booking-form__input {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.move-booking-form__sep {
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
    flex-shrink: 0;
}

.move-booking-form__select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.9);
    background: rgb(26, 26, 35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.move-booking-form__select:hover,
.move-booking-form__select:focus {
    border-color: rgba(255, 255, 255, 0.25);
    outline: none;
}

.move-booking-form__input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.9);
    background: rgb(26, 26, 35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-sizing: border-box;
}

.move-booking-form__input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.move-booking-form__input:hover,
.move-booking-form__input:focus {
    border-color: rgba(255, 255, 255, 0.25);
    outline: none;
}

/* Поле даты — такой же размер, как остальные поля формы */
.move-booking-form__input[type="date"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 44px;
}

.booking-card__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.booking-card__btn {
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease-out;
    border: none;
}

.booking-card__btn--secondary {
    background: rgb(16, 16, 21);
    color: rgba(255, 255, 255, 0.9);
}

.booking-card__btn--secondary:hover {
    background: rgb(26, 26, 35);
}

.booking-card__btn--danger {
    background: #ea4335;
    color: #fff;
}

.booking-card__btn--danger:hover {
    background: #f04a3b;
}

.booking-card__btn--primary {
    background: #0071e3;
    color: #fff;
}

.booking-card__btn--primary:hover {
    background: #0077ed;
}

/* Уведомление при конфликте слотов суда с записью клиента */
.day-slots__toast {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 24px;
    z-index: 150;
    width: calc(100% - 24px);
    padding: 12px 20px;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: day-slots__toast-in 0.2s ease-out;
}

.day-slots__toast--error {
    background: #ea4335;
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

@keyframes day-slots__toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Десктоп: две колонки — слева месячный календарь, справа дневные слоты; макс. 800px; скролл всей страницы ========== */
@media (min-width: 768px) {
    html {
        overflow: auto;
        height: auto;
        min-height: 100%;
    }

    body {
        align-items: center;
        overflow: auto;
        height: auto;
        min-height: 100%;
    }

    .app {
        max-width: 800px;
        width: 100%;
        min-height: 100vh;
        min-height: 100svh;
        height: auto;
        margin: 0 auto;
        box-shadow: none;
        overflow: visible;
    }

    /* На десктопе скролл общий (страницы), не внутри .main */
    .main {
        overflow: visible;
        flex: none;
        min-height: 0;
        -webkit-overflow-scrolling: auto;
    }

    /* При перетаскивании слотов блокируем скролл страницы на десктопе */
    body.day-slots-dragging {
        overflow: hidden;
    }

    body.day-slots-no-scroll {
        overflow: hidden;
    }

    .header {
        padding: 14px 24px;
    }

    /* Две колонки: слева календарь (без увеличения), справа слоты дня */
    .main__content {
        display: grid;
        grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        gap: 0 24px;
        padding: 24px 24px 32px;
        align-items: start;
    }

    .view-toggle {
        grid-column: 1 / -1;
        margin-bottom: 16px;
    }

    .calendar {
        grid-column: 1;
        grid-row: 2;
        align-self: start;
        /* Месячный календарь без увеличения — оставляем как на мобильном */
    }

    .day-slots {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0;
        padding: 18px 16px 20px;
        min-height: 200px;
    }

    .day-slots[hidden] {
        display: none;
    }

    /* Режим «Список» — на всю ширину */
    .list-view {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .list-view[hidden] {
        display: none;
    }

    .booking-card-backdrop {
        padding: 32px 24px;
    }

    .booking-card {
        max-width: 440px;
        margin-left: auto;
        margin-right: auto;
    }

    .day-slots__toast {
        left: 50%;
        right: auto;
        width: auto;
        max-width: 420px;
        transform: translateX(-50%);
    }

    .day-slots__toast--error {
        transform: translateX(-50%);
    }
}