/* =========================================================
   PREMIUM ROSE GOLD BACKGROUND + WAVE ANIMATION
   ========================================================= */

:root {
    --container-width: 480px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;

    --transition-fast: 0.15s ease;
    --transition-medium: 0.25s ease;

    --color-text: #1c1c1e;
    --color-text-secondary: #8e8e93;
    
    /* Admin Dashboard Colors */
    --admin-bg: #f8f9fa;
    --admin-card-bg: #ffffff;
    --admin-border: #e0e0e0;
    --admin-primary: #D4AF37;
    --admin-success: #4caf50;
    --admin-error: #f44336;
    --admin-warning: #ff9800;
    --admin-info: #2196f3;
    
    /* Exit Button Colors */
    --exit-btn-bg: rgba(212, 175, 55, 0.95);
    --exit-btn-hover: rgba(212, 175, 55, 1);
    --exit-btn-text: #ffffff;
    --exit-btn-shadow: rgba(0, 0, 0, 0.2);
}

/* =========================================================
   ТЕМЫ - Dark, Light, Pink
   ========================================================= */

/* Темная тема (по умолчанию) */
[data-theme="dark"],
:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --primary-color: #D4AF37;
    --primary-hover: #FFD700;
}

/* Светлая тема */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #1c1c1e;
    --text-secondary: #6e6e6e;
    --border-color: #e0e0e0;
    --primary-color: #D4AF37;
    --primary-hover: #b8941f;
}

/* Розовая тема */
[data-theme="pink"] {
    --bg-primary: #ffe4e1;
    --bg-secondary: #ffd1dc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --text-primary: #8b0045;
    --text-secondary: #c75b7f;
    --border-color: rgba(255, 105, 180, 0.3);
    --primary-color: #ff69b4;
    --primary-hover: #ff1493;
}

/* =========================================================
   ФОНЫ - Waves, Gradient, Static
   ========================================================= */

/* По умолчанию - волны (waves) */
body.bg-waves,
body {
    background: #1a1a2e;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100%;
    font-family: "Inter", sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------------------------------------------------------
   MAIN BACKGROUND — ROSE GOLD + SMOOTH WAVE
   --------------------------------------------------------- */

body {
    background: #1a1a2e;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

/* Градиентный фон */
body.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

/* Статичный фон */
body.bg-static {
    background: var(--bg-primary);
}

/* Применение цветовой схемы темы к body */
[data-theme="light"] body {
    color: var(--text-primary);
}

[data-theme="pink"] body {
    color: var(--text-primary);
}

/* =========================================================
   PREMIUM ROSE GOLD MULTI-WAVE BACKGROUND (7 floating waves)
   Soft, animated, full-height waves with seamless blending
========================================================= */
.waves-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(135deg, #a708ecfc, #ad05ea, #a90cf8e7);
}

/* БАЗА ВОЛНЫ */
.wave {
    position: absolute;
    width: 300%;
    height: 30vh;
    left: -100%;
    background: rgba(39, 227, 248, 0.5);
    clip-path: ellipse(80% 60% at 50% 50%);
    animation: waveFlow 12s linear infinite;
    opacity: 0.5;
    transition: transform 0.2s ease-out;
    z-index: 1;
}


/* Индивидуальные слои волн (7 штук) */
.wave:nth-child(1) {
    top: -5%;
    animation-duration: 15s;
    opacity: 0.4;
}
.wave:nth-child(2) {
    top: 10%;
    animation-duration: 18s;
    opacity: 0.35;
}
.wave:nth-child(3) {
    top: 25%;
    animation-duration: 20s;
    opacity: 0.3;
}
.wave:nth-child(4) {
    top: 40%;
    animation-duration: 16s;
    opacity: 0.25;
}
.wave:nth-child(5) {
    top: 55%;
    animation-duration: 19s;
    opacity: 0.2;
}
/* =========================================================
   SCHEDULE MANAGER STYLES - Управление графиком мастеров
   ========================================================= */

/* Контейнер экрана управления графиком */
.schedule-manager-container {
    padding-bottom: 100px;
}

/* Селектор мастера */
.master-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.master-select:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Табы переключения режимов */
.view-mode-tabs {
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.view-mode-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-mode-tab.active {
    color: #D4AF37;
    border-bottom: 2px solid #D4AF37;
    margin-bottom: -2px;
}

.view-mode-tab:hover {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.05);
}

/* Календарная сетка */
.calendar-grid {
    margin-bottom: 20px;
}

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

.calendar-weekdays > div {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    padding: 4px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    padding: 6px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    position: relative;
    aspect-ratio: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.calendar-day:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.calendar-day:active {
    transform: scale(0.98);
}

/* Легенда календаря */
.calendar-legend {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
}

.calendar-legend > div:first-child {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

/* Карточки дней расписания */
.schedule-day-card {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: background 0.2s ease;
}

.schedule-day-card:hover {
    background: #f0f1f3;
}

.schedule-day-card input[type="time"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.schedule-day-card input[type="time"]:focus {
    outline: none;
    border-color: #D4AF37;
}

/* Чекбокс "Рабочий день" */
.is-working-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #D4AF37;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    color: #000;
    border-radius: 8px;
    max-width: 500px;
    margin: 40px auto;
    padding: 24px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Форма исключений */
#exceptionForm input[type="date"],
#exceptionForm input[type="time"],
#exceptionForm select,
#exceptionForm textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

#exceptionForm input[type="date"]:focus,
#exceptionForm input[type="time"]:focus,
#exceptionForm select:focus,
#exceptionForm textarea:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

#exceptionForm textarea {
    resize: vertical;
    font-family: inherit;
    min-height: 80px;
}

/* Кнопка закрытия модального окна */
#closeModal {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 32px;
    transition: color 0.2s ease;
}

#closeModal:hover {
    color: #f44336;
}

/* Карточки исключений */
.exception-card {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.exception-card:hover {
    background: #f0f1f3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.delete-exception-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s ease;
}

.delete-exception-btn:hover {
    background: #d32f2f;
}

.delete-exception-btn:active {
    transform: scale(0.95);
}

/* Кнопки навигации календаря */
.btn-icon {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #D4AF37;
    color: white;
    border-color: #D4AF37;
}

.btn-icon:active {
    transform: scale(0.95);
}

/* Состояния экрана */
#loadingState,
#emptyState {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
    .calendar-day {
        min-height: 50px;
        font-size: 14px;
    }
    
    .modal-content {
        margin: 20px auto;
        padding: 20px;
    }
    
    .schedule-day-card {
        padding: 12px;
    }
}

/* =========================================================
   END OF SCHEDULE MANAGER STYLES
   ========================================================= */

.wave:nth-child(6) {
    top: 70%;
    animation-duration: 22s;
    opacity: 0.15;
}
.wave:nth-child(7) {
    top: 85%;
    animation-duration: 25s;
    opacity: 0.1;
}

/* Анимация волны */
@keyframes waveFlow {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* =========================================================
   PREMIUM GOLD PETALS — MULTI SHAPES + WIND MOVEMENT
========================================================= */

/* Контейнер остаётся без изменений */
.petal-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* Базовый стиль лепестка */
.petal {
    position: absolute;
    top: -10vh;
    width: 12px; /* Уменьшили ширину для реалистичности */
    height: 20px; /* Вытянутая форма */
    aspect-ratio: 1.6/1; /* Соотношение сторон */
    opacity: 0.85;
    filter: blur(0.2px) drop-shadow(0 0 1px rgba(0, 0, 0, 0.1)); /* Лёгкая тень для объёма */
    animation: fall linear forwards;
    transform-origin: center; /* Центр вращения */
}

/* Внутренняя часть лепестка с текстурой и градиентом */
.petal-inner {
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(244, 116, 116, 0.997) 0%,
        rgb(241, 88, 88) 50%,
        rgb(255, 0, 0) 100%
    );
    border-radius: inherit; /* Наследуем скругление от родителя */
    animation: windShake 3.5s ease-in-out infinite;
    box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.3); /* Внутренний блик */
}

/* 5 реалистичных форм лепестков */
.petal.shape1 { border-radius: 50% 30% 50% 30%; }
.petal.shape2 { border-radius: 60% 40% 30% 70%; }
.petal.shape3 { border-radius: 30% 60% 70% 40%; }
.petal.shape4 { border-radius: 40% 70% 50% 30%; }
.petal.shape5 { border-radius: 70% 30% 40% 60%; }

/* Падение */
@keyframes fall {
    0% {
        transform: translateY(0) rotateZ(0deg) rotateX(0deg) scale(0.8);
        opacity: 0.9;
    }
    20% {
        transform: translateY(20vh) rotateZ(45deg) rotateX(30deg) scale(1);
    }
    40% {
        transform: translateY(40vh) rotateZ(90deg) rotateX(60deg) scale(0.95);
    }
    60% {
        opacity: 0.7;
    }
    80% {
        transform: translateY(80vh) rotateZ(180deg) rotateX(120deg) scale(0.9);
    }
    100% {
        transform: translateY(110vh) rotateZ(270deg) rotateX(180deg) scale(0.8);
        opacity: 0;
    }
}


/* Движение ветра / дрожание */
@keyframes windShake {
    0%, 100% { transform: translateX(0) rotateZ(0deg); }
    10%      { transform: translateX(-8px) rotateZ(-10deg); }
    30%      { transform: translateX(6px) rotateZ(8deg); }
    50%      { transform: translateX(-4px) rotateZ(-5deg); }
    70%      { transform: translateX(3px) rotateZ(5deg); }
}



/* -----------------------------------------------
   ФИОЛЕТОВЫЙ ТУМАН
----------------------------------------------- */
.mist {
    position: absolute;
    width: 200%;
    height: 200%;
    left: -50%;
    top: -25%;
    background: radial-gradient(circle, rgba(160, 90, 255, 0.3), transparent 70%);
    filter: blur(80px);
    animation: mistFloat 16s ease-in-out infinite;
    z-index: 2;
}

/* -----------------------------------------------
   Анимации
----------------------------------------------- */
@keyframes waveFlow {
    0% {
        transform: translateX(-15%) translateY(0);
    }
    50% {
        transform: translateX(15%) translateY(25px);
    }
    100% {
        transform: translateX(-15%) translateY(0);
    }
}

@keyframes mistFloat {
    0%   { transform: translateX(-10%) translateY(0); }
    50%  { transform: translateX(10%) translateY(40px); }
    100% { transform: translateX(-10%) translateY(0); }
}


/* =========================================================
   SOFT PEARL HAZE (AIR MIST)
   ========================================================= */

body .haze {
    position: fixed;
    top: 0;
    left: 0;
    width: 120%;
    height: 120%;

    background: radial-gradient(circle at 30% 20%, rgba(255, 210, 225, 0.35), transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(255, 205, 230, 0.25), transparent 60%);

    filter: blur(40px);
    opacity: 0.65;

    pointer-events: none;
    z-index: -3;
}


/* =========================================================
   PREMIUM BUTTONS (Blue/Purple theme)
   ========================================================= */

.card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    transition: 0.2s ease;
}


/*  
-----------------------------------------------------------
 2) GLOBAL RESET  
 Очищаем дефолтные стили браузера, чтобы всё выглядело одинаково.
-----------------------------------------------------------
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    font-family: 'Inter', sans-serif;
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

/*  
-----------------------------------------------------------
 3) GLOBAL CONTAINER  
 Центрирует MiniApp на ПК.  
 На мобильных — занимает всю ширину.
-----------------------------------------------------------
*/
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--space-4);
}

/*  
-----------------------------------------------------------
 4) HEADINGS & TEXT  
 Чёткая типографика в стиле iOS.
-----------------------------------------------------------
*/
h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: var(--space-4);
}

h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-3);
}

p {
    font-size: 16px;
    line-height: 1.45;
    margin-bottom: var(--space-3);
}

.text-secondary {
    color: var(--color-text-secondary);
}

/*  
-----------------------------------------------------------
 5) BUTTONS  
 Основные кнопки MiniApp.  
 Мягкая анимация нажатия.
-----------------------------------------------------------
*/
.button {
    width: 100%;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Primary кнопка (акцентная) */
.button-primary {
    background: var(--color-accent);
    color: white;
}

.button-primary:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-secondary {
    background: #E8BFB5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #D9A79A, #C8927F);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(232, 191, 181, 0.45);
}

/*  
-----------------------------------------------------------
 6) CARDS  
 Карточки для услуг, мастеров и записей.
-----------------------------------------------------------
*/
.card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
}

.card:hover {
    transform: translateY(-2px);
}

/*  
-----------------------------------------------------------
 7) INPUTS  
 Чистые поля ввода в стиле Telegram + iOS.
-----------------------------------------------------------
*/
.input {
    width: 100%;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg-light);
    font-size: 16px;
    margin-bottom: var(--space-4);
}

.input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: #fff;
}

/*  
-----------------------------------------------------------
 8) DIVIDERS  
 Линии-разделители между элементами.
-----------------------------------------------------------
*/
.divider {
    width: 100%;
    height: 1px;
    background: var(--color-border);
    margin: var(--space-4) 0;
}

/*  
-----------------------------------------------------------
 9) ANIMATIONS  
 Лёгкие эффектные появления.
-----------------------------------------------------------
*/
.fade-in {
    animation: fadeIn var(--transition-medium);
}

@keyframes fadeIn {
    from { opacity: 0; translate: 0 10px; }
    to   { opacity: 1; translate: 0 0; }
}

.slide-up {
    animation: slideUp var(--transition-slow);
}

@keyframes slideUp {
    from { opacity: 0; translate: 0 20px; }
    to   { opacity: 1; translate: 0 0; }
}

/*  
-----------------------------------------------------------
 10) NAVBAR (если понадобится)
-----------------------------------------------------------
*/
.navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    background: #fff;
    padding: var(--space-3);
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--color-border);
}

/*  
-----------------------------------------------------------
 11) UTILS  
 Маленькие удобные CSS классы.
-----------------------------------------------------------
*/
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }

.center { text-align: center; }
.hidden { display: none !important; }
/* --- Главный контейнер --- */
.home-container {
    padding: 40px 24px;
    text-align: center;
    color: #FFFFFF;
    position: relative;
    z-index: 100;
}

/* --- Название салона (премиальный стиль) --- */
.salon-title {
    font-size: 32px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* --- Адрес под названием --- */
.salon-address {
    font-size: 16px;
    color: #333;
    margin-bottom: 24px;
    font-weight: 500;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9), 0 0 4px rgba(255, 255, 255, 0.7);
}

/* --- Премиальная кнопка (White with black text) --- */
.btn-primary {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    background: #FFFFFF;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.3s ease;
}

/* Hover эффект - розовый */
.btn-primary:hover {
    background: #e05b85;
    color: #FFFFFF;
    box-shadow: 0 8px 20px rgba(224, 91, 133, 0.4);
    transform: translateY(-2px);
}

/* Эффект нажатия */
.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Плавная анимация появления */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
/*
-------------------------------------------------------------------------------------------------------------
КАРТОЧКИ категории и услуги

-------------------------------------------------------------------------------------------
*/

/* Контейнер */
.services-container {
    padding: 24px;
    position: relative;
    z-index: 100;
}

/* Заголовок страницы */
.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 18px;
}

/* Категория */
.category-card {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    overflow: hidden;
}

/* Заголовок категории */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: #1A1A1A;
}

.category-arrow {
    font-size: 14px;
    color: #6F6F6F;
}

/* Услуга */
.service-card {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #F0EDE9;
}

.service-card:last-child {
    border-bottom: none;
}

/* Чекбокс */
.service-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #E8BFB5;
    margin-right: 12px;
}

/* Текст услуги */
.service-info {
    flex-grow: 1;
}

.service-name {
    font-size: 16px;
    font-weight: 500;
}

.service-meta {
    font-size: 14px;
    color: #6F6F6F;
}

/* Картинка услуги */
.service-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-left: 16px;
}

/*-------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------МАСТЕРА-ШИ-ФУ!!!!!!!!!!!!!!!!!!!!!!!!!!---------------------------------------
-------------------------------------------------------------------------------------------------------------------------*/

.masters-container {
    padding: 24px;
    position: relative;
    z-index: 100;
}

.master-card {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: 0.2s;
    overflow: hidden;
    gap: 12px;
}

.master-selected {
    border: 2px solid #E8BFB5;
    box-shadow: 0 6px 18px rgba(232,191,181,0.25);
}

.master-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #D4AF37;
    cursor: pointer;
}

.master-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #D4AF37;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-weight: bold;
    flex-shrink: 0;
    overflow: hidden;
}

.master-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.master-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.master-rating {
    font-size: 14px;
    color: #888;
    text-align: left;
}

.master-rating span:first-child {
    color: #FFD700;
}

.master-experience {
    font-size: 13px;
    color: #666;
    text-align: left;
}

.master-specialization {
    font-size: 12px;
    color: #666;
    text-align: left;
}

.master-meta {
    display: flex;
    flex-direction: row;
    gap: 8px;
    font-size: 12px;
    color: #888;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
}

.master-meta > span {
    white-space: nowrap;
    text-align: left;
}

/*----------------------------------------------------------------------------------------------------
------------------------------------------------------------ЗАПИСИ 30-сетка-------------------------------------
--------------------------------------------------------------------------------------------------*/
.calendar-container {
    padding: 24px;
    padding-bottom: 160px;
    position: relative;
    z-index: 1;
    margin-bottom: 100px;
    min-height: calc(100vh - 200px);
}

/* Шапка с информацией о записи */
.header-section {
    position: relative;
    z-index: 2;
    background: white;
    padding-bottom: 8px;
    border-radius: 8px;
}

.context-info {
    border-radius: 8px;
}

.filter-panel {
    border-radius: 8px;
}

.booking-info {
    background: #f8f9fa !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin-bottom: 16px !important;
    font-size: 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Панель подтверждения внизу */
.summary-panel {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border-top: 1px solid #ddd !important;
    padding: 16px !important;
    padding-top: 24px !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
    z-index: 999 !important;
    pointer-events: auto !important;
}

.summary-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.summary-total {
    font-weight: 600;
    font-size: 18px;
    color: #D4AF37;
    min-width: 80px;
    text-align: right;
}

.summary-time-row {
    margin-bottom: 12px;
}

.divider {
    border: none;
    border-bottom: 1px solid #ddd;
    margin: 12px 0;
}

.calendar-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 24px;
    gap: 12px;
    position: relative;
    z-index: 100;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.calendar-item {
    min-width: 48px;
    width: 48px;
    height: 48px;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 8px;
    border: 2px solid transparent;
    padding: 4px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: 0.2s;
    position: relative;
}

.calendar-selected {
    background: linear-gradient(135deg, #E8BFB5, #D9A79A);
    color: white;
    border-color: #4CAF50 !important;
    box-shadow: 0 6px 16px rgba(232,191,181,0.4);
}

.calendar-weekday {
    font-size: 10px;
    margin-bottom: 2px;
    color: #6F6F6F;
}

.calendar-weekday.today {
    color: #D9A79A;
}

.calendar-day {
    font-size: 14px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.calendar-day-past {
    color: #bbb;
    opacity: 0.5;
}

/* Индикаторы статуса внутри ячеек календаря */
.day-indicator {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    z-index: 1;
}

.indicator-free { 
    background: #4CAF50; 
}

.indicator-low { 
    background: #FFC107; 
}

.indicator-busy { 
    background: #F44336; 
}

.indicator-dayoff { 
    background: #9E9E9E; 
}
.time-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 140px;
}

/* Группировка слотов по часам */
.time-hour-group {
    margin-bottom: 16px;
}

.time-hour-label {
    font-size: 12px;
    color: #999;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.time-slots-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 8px;
}

/* Стили временных слотов */
.time-slot {
    position: relative;
    padding: 12px 8px;
    background: #F4F2EF;
    border: 1.5px solid transparent;
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

/* Слоты на часах (XX:00) */
.time-slot-hour {
    border-color: #D4AF37;
    background: #fff9f0;
    font-weight: 600;
}

/* Слоты на получасах (XX:30) */
.time-slot-half {
    border-color: #e0e0e0;
}

.time-slot:hover:not(.slot-selected) {
    border-color: #D4AF37;
    background: #fff9f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.15);
}

/* Выделенный слот */
.time-selected,
.slot-selected {
    background: linear-gradient(135deg, #D4AF37, #C19A2E) !important;
    color: #FFFFFF !important;
    border-color: #D4AF37 !important;
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35) !important;
    transform: scale(1.03);
    position: relative;
}

.slot-selected::before {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 14px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
}

/* Время окончания в слоте */
.slot-time {
    font-size: 15px;
    color: inherit;
}

.slot-end-time {
    font-size: 10px;
    color: inherit;
    opacity: 0.7;
    font-weight: 400;
    line-height: 1.2;
}

.slot-selected .slot-time,
.slot-selected .slot-end-time {
    color: #FFFFFF !important;
}

.slot-selected .slot-end-time {
    opacity: 0.9;
}

/* Индикатор получасового слота - УБРАН, теперь не используется */

/* Стили для быстрых слотов */
.quick-day-slots {
    margin-bottom: 24px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.quick-day-slots:hover {
    background: #f5f5f5;
}

.quick-slot-btn {
    position: relative;
    padding: 10px 14px;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 90px;
}

.quick-slot-hour {
    border-color: #D4AF37;
    background: #fff9f0;
    font-weight: 600;
}

.quick-slot-half {
    border-color: #e8e8e8;
}

.quick-slot-btn:hover:not(.slot-selected) {
    border-color: #D4AF37;
    background: #fff9f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.15);
}
/*-----------------------------------------------------------------------------------------------------------------
---------------------------------------------------Подтверждение сделки--------------------------------------------
-------------------------------------------------------------------------------------------------------------------*/
.confirm-container {
    padding: 24px;
    position: relative;
    z-index: 100;
}

/* Карточка подтверждения */
.confirm-card {
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 130px;
}

/* Заголовки внутри карточки */
.confirm-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Раздел */
.confirm-block {
    margin-bottom: 16px;
}

.confirm-divider {
    height: 1px;
    background: #EFEDEB;
    margin: 12px 0;
}

/* Строки данных */
.confirm-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.confirm-price {
    font-weight: 600;
}

/*-----------------------------------------------------------------------------------------------------------------
---------------------------------------------------Одновременная запись (Concurrent Booking)---------------------
-------------------------------------------------------------------------------------------------------------------*/
.concurrent-booking .service-card {
    position: relative;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.concurrent-booking .service-card:hover {
    border-color: #D4AF37;
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.15);
    transform: translateY(-2px);
}

.concurrent-booking .service-card.service-selected {
    border-color: #D4AF37;
    background: linear-gradient(135deg, #fff9f0, #fffbf5);
}

.concurrent-booking .category-filter {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.concurrent-booking .category-filter:hover {
    border-color: #D4AF37;
    background: #fff9f0;
}

.concurrent-booking .category-filter.active {
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    color: white;
    border-color: #D4AF37;
}

.concurrent-booking .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.concurrent-booking .modal-content {
    background: white;
    color: #000;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
}

.concurrent-booking .input-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.concurrent-booking .input-field:focus {
    outline: none;
    border-color: #D4AF37;
}

/* ========================================
   💳 Payment Modal Styles
   ======================================== */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.payment-modal-content {
    background: white;
    border-radius: 8px;
    padding: 28px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.payment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.payment-icon {
    font-size: 32px;
}

.payment-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.payment-message {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.payment-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.payment-amount .label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.payment-amount .value {
    font-size: 26px;
    font-weight: 700;
    color: white;
}

.payment-details {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.payment-details p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.payment-details strong {
    color: #333;
    font-weight: 600;
}

.payment-actions {
    display: flex;
    gap: 12px;
}

.payment-actions button {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-pay {
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    color: white;
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-cancel-payment {
    background: #f0f0f0;
    color: #666;
}

.btn-cancel-payment:hover {
    background: #e0e0e0;
}

/* =========================================================
   ГЛОБАЛЬНАЯ КНОПКА "ВЫХОД В МЕНЮ"
   ========================================================= */
.global-exit-button {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 9999;
    
    display: flex;
    align-items: center;
    gap: 8px;
    
    padding: 10px 16px;
    background: var(--exit-btn-bg);
    color: var(--exit-btn-text);
    border: none;
    border-radius: 8px;
    
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    
    box-shadow: 0 4px 12px var(--exit-btn-shadow);
    backdrop-filter: blur(10px);
    
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.global-exit-button.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.global-exit-button:hover {
    background: var(--exit-btn-hover);
    transform: translateX(0) translateY(-2px);
    box-shadow: 0 6px 16px var(--exit-btn-shadow);
}

.global-exit-button:active {
    transform: translateX(0) translateY(0);
    box-shadow: 0 2px 8px var(--exit-btn-shadow);
}

.global-exit-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.global-exit-button span {
    white-space: nowrap;
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
    .global-exit-button {
        top: 12px;
        left: 12px;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .global-exit-button svg {
        width: 18px;
        height: 18px;
    }
}

/* Адаптация для Telegram Mini App (safe area) */
@supports (padding: env(safe-area-inset-top)) {
    .global-exit-button {
        top: calc(16px + env(safe-area-inset-top));
        left: calc(16px + env(safe-area-inset-left));
    }
}


/* === СТИЛИ МАСТЕР-ПАНЕЛИ === */

.master-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.master-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-color);
}

.master-panel-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.master-panel-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding: 4px;
}

.master-panel-tabs .tab-btn {
    padding: 12px 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.master-panel-tabs .tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.master-panel-tabs .tab-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.master-panel-tabs .badge {
    background: #f44336;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    margin-left: 4px;
}

.master-panel-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-tab {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.profile-card {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 4px solid white;
}

.contacts-edit {
    padding: 20px;
}

.contacts-edit form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-category {
    margin-bottom: 24px;
}

.service-category h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f5f5f5;
    border-radius: 8px;
}

.service-item.mine {
    background: #e3f2fd;
    border-left: 4px solid var(--primary-color);
}

.schedule-day {
    padding: 16px;
    margin-bottom: 12px;
    background: #fafafa;
    border-radius: 8px;
}

.schedule-day h4 {
    margin-bottom: 12px;
    color: var(--primary-color);
}

.schedule-day input[type="time"],
.schedule-day input[type="checkbox"] {
    margin: 4px 8px;
}

.clients-list {
    list-style: none;
    padding: 0;
}

.client-item {
    padding: 16px;
    margin-bottom: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.notifications-list {
    list-style: none;
    padding: 0;
}

.notification-item {
    padding: 16px;
    margin-bottom: 12px;
    background: #fff9e6;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.notification-item.read {
    background: #f5f5f5;
    border-left-color: #9e9e9e;
}

.notification-item.unread {
    background: #fff3cd;
    font-weight: 500;
}

.notif-message {
    display: block;
    margin-bottom: 8px;
}

.notif-date {
    font-size: 12px;
    color: #666;
}

.btn-logout {
    padding: 10px 20px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-logout:hover {
    background: #d32f2f;
}

@media (max-width: 768px) {
    .profile-tab {
        grid-template-columns: 1fr;
    }
    
    .master-panel-tabs {
        flex-wrap: nowrap;
        overflow-x: scroll;
    }
}


/* РљРЅРѕРїРєРё РєР°Р»РµРЅРґР°СЂСЏ */


/* ====================================
   ClientSearch Component Styles
   ==================================== */

/* Р’РєР»Р°РґРєРё СЂРµР¶РёРјР° (РїРѕРёСЃРє/СЃРѕР·РґР°РЅРёРµ) */
.client-mode-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 16px;
}

.mode-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-tab:hover {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.05);
}

.mode-tab.active {
    color: #D4AF37;
    border-bottom-color: #D4AF37;
}

/* Р¤РѕСЂРјР° СЃРѕР·РґР°РЅРёСЏ РЅРѕРІРѕРіРѕ РєР»РёРµРЅС‚Р° */
.new-client-form .form-group {
    margin-bottom: 16px;
}

.new-client-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.new-client-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.new-client-form input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.new-client-form .btn-primary {
    width: 100%;
    padding: 12px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.new-client-form .btn-primary:hover {
    background: #45a049;
}

.new-client-form .btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* Responsive РґР»СЏ ClientSearch */
@media (max-width: 480px) {
    .mode-tab {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* =========================================================
   ГЛОБАЛЬНАЯ КНОПКА "НАЗАД"
   ========================================================= */

.global-back-button {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 1000;
    
    display: flex;
    align-items: center;
    gap: 6px;
    
    padding: 10px 16px;
    background: var(--exit-btn-bg);
    color: var(--exit-btn-text);
    border: none;
    border-radius: 8px;
    
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    
    box-shadow: 0 4px 12px var(--exit-btn-shadow);
    transition: all 0.3s ease;
    
    /* По умолчанию скрыта */
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
}

.global-back-button.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.global-back-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hover и Active состояния */
.global-back-button:hover:not(:disabled) {
    background: var(--exit-btn-hover);
    transform: translateX(0) translateY(-2px);
    box-shadow: 0 6px 16px var(--exit-btn-shadow);
}

.global-back-button:active:not(:disabled) {
    transform: translateX(0) translateY(0);
    box-shadow: 0 2px 8px var(--exit-btn-shadow);
}

/* Иконка */
.global-back-button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Мобильная версия: только иконка */
@media (max-width: 480px) {
    .global-back-button {
        bottom: 12px;
        left: 12px;
        padding: 10px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .global-back-button span {
        display: none;
    }
    
    .global-back-button svg {
        width: 20px;
        height: 20px;
    }
}

/* Safe area для Telegram Mini App */
@supports (padding: env(safe-area-inset-bottom)) {
    .global-back-button {
        bottom: calc(16px + env(safe-area-inset-bottom));
        left: calc(16px + env(safe-area-inset-left));
    }
}

/* ARIA и доступность */
.global-back-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* =========================================================
   TOAST NOTIFICATIONS (Всплывающие уведомления)
   ========================================================= */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: white;
    color: #000;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    min-width: 250px;
    max-width: 400px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid #000;
}

.toast-success {
    background: white;
    color: #000;
    border-left-color: #4caf50;
}

.toast-error {
    background: white;
    color: #000;
    border-left-color: #f44336;
}

.toast-warning {
    background: white;
    color: #000;
    border-left-color: #ff9800;
}

.toast-info {
    background: white;
    color: #000;
    border-left-color: #2196f3;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* =========================================================
   ADMIN PANEL - Feature Toggles & Action Logs
   ========================================================= */

/* Dashboard sections */
.dashboard-section {
    background: white;
    color: #000;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    color: #000 !important;
}

.section-header h2 {
    color: #000 !important;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.badge {
    background: #e0e0e0;
    color: #000 !important;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

/* Feature Toggles */
.feature-toggles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.toggle-info {
    flex: 1;
}

.toggle-name {
    color: #000 !important;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.toggle-description {
    color: #333 !important;
    font-size: 12px;
    margin-bottom: 4px;
}

.toggle-category {
    color: #666 !important;
    font-size: 11px;
    font-style: italic;
}

/* Action Logs */
.action-logs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-entry {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.log-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.log-content {
    flex: 1;
}

.log-description {
    color: #000 !important;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
}

.log-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.log-time,
.log-user,
.log-type {
    color: #333 !important;
    font-size: 12px;
}

.log-type {
    background: #e0e0e0;
    color: #000 !important;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Empty state */
.empty-message {
    color: #333 !important;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

@media (max-width: 768px) {
    .toggle-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .log-entry {
        flex-direction: column;
        gap: 8px;
    }
}

/* =========================================================
   TABLE HEADERS - Global fix for all tables
   ========================================================= */
table thead th {
    color: #000 !important;
}

table th {
    color: #000 !important;
}

table td {
    color: #333 !important;
}

/* =========================================================
   WebApp Reschedule Notifications
   ========================================================= */
.webapp-notification-block {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.webapp-notification-block h3 {
    color: #1976d2 !important;
}

.webapp-notification-block p {
    color: #333 !important;
}

.btn-confirm-reschedule:hover {
    background: #45a049 !important;
}

.btn-decline-reschedule:hover {
    background: #e53935 !important;
}

.btn-force-reschedule:hover {
    background: #1976d2 !important;
}

.btn-cancel-reschedule-request:hover {
    background: #f57c00 !important;
}

.reschedule-actions {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Статус pending_reschedule badge */
.status-badge.pending-reschedule,
.appointment-status.pending_reschedule {
    background: #e3f2fd !important;
    color: #1976d2 !important;
    border: 1px solid #2196f3;
}


/* =========================================================
   COST BREAKDOWN - РАЗБИВКА СТОИМОСТИ С АКЦИЯМИ
   ========================================================= */

.cost-breakdown {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.13) 0%, rgba(118, 75, 162, 0.13) 100%);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 15px;
}

.cost-row:last-child {
    border-bottom: none;
}

.cost-row span:first-child {
    color: var(--text-secondary);
}

.cost-row span:last-child {
    font-weight: 500;
    color: var(--text-primary);
}

/* Строка со скидкой - выделяем зеленым */
.cost-row.discount-applied {
    color: #4ade80;
    font-weight: 500;
}

.cost-row.discount-applied span:first-child {
    color: #4ade80;
}

.cost-row.discount-applied span:last-child {
    color: #22c55e;
    font-weight: 600;
}

/* Итоговая строка - делаем крупнее и выразительнее */
.cost-row.total {
    font-size: 1.1em;
    font-weight: bold;
    border-top: 2px solid rgba(212, 175, 55, 0.3);
    border-bottom: none;
    margin-top: 8px;
    padding-top: 12px;
}

.cost-row.total span {
    color: var(--primary-color);
    font-weight: 700;
}

/* Предоплата - выделяем фиолетовым фоном */
.cost-row.prepayment {
    background: rgba(102, 126, 234, 0.2);
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.cost-row.prepayment span:first-child {
    color: #a78bfa;
    font-weight: 600;
}

.cost-row.prepayment span:last-child {
    color: #c4b5fd;
    font-weight: 700;
    font-size: 1.1em;
}

/* Остаток к оплате */
.cost-row.remaining {
    padding: 10px 0;
    margin-top: 4px;
}

.cost-row.remaining span:first-child {
    color: var(--text-secondary);
}

.cost-row.remaining span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

/* Адаптация для светлой темы */
[data-theme="light"] .cost-breakdown {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-color: rgba(102, 126, 234, 0.2);
}

[data-theme="light"] .cost-row {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .cost-row.total {
    border-top-color: rgba(212, 175, 55, 0.5);
}

[data-theme="light"] .cost-row.prepayment {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.25);
}

/* Адаптация для розовой темы */
[data-theme="pink"] .cost-breakdown {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.1) 0%, rgba(255, 20, 147, 0.1) 100%);
    border-color: rgba(255, 105, 180, 0.3);
}

[data-theme="pink"] .cost-row.discount-applied span {
    color: #ec4899;
}

[data-theme="pink"] .cost-row.prepayment {
    background: rgba(255, 105, 180, 0.15);
    border-color: rgba(255, 105, 180, 0.4);
}

[data-theme="pink"] .cost-row.prepayment span:first-child {
    color: #db2777;
}

[data-theme="pink"] .cost-row.prepayment span:last-child {
    color: #be185d;
}

/* === СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА ЭКСПОРТА === */

.export-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.export-modal {
    background: var(--bg-primary);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.export-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.export-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.export-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.export-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.export-modal-body {
    padding: 24px;
}

.export-form-group {
    margin-bottom: 20px;
}

.export-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.export-date-input,
.export-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}

.export-date-input:focus,
.export-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.export-info {
    padding: 12px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid #667eea;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-top: 16px;
}

.export-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

.export-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.export-btn-cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.export-btn-cancel:hover {
    background: var(--bg-tertiary);
}

.export-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.export-btn-confirm:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.export-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.export-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Адаптация для светлой темы */
[data-theme="light"] .export-modal {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .export-date-input,
[data-theme="light"] .export-select {
    background: #f7f9fc;
}

/* Адаптация для розовой темы */
[data-theme="pink"] .export-btn-confirm {
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
}

[data-theme="pink"] .export-btn-confirm:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.4);
}

[data-theme="pink"] .export-info {
    background: rgba(255, 105, 180, 0.1);
    border-left-color: #ff69b4;
}

[data-theme="pink"] .export-date-input:focus,
[data-theme="pink"] .export-select:focus {
    border-color: #ff69b4;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}


/* =========================================================
   CLIENT BOOKING CALENDAR - FullCalendar для клиентов
   ========================================================= */

/* Контейнер календаря клиента */
#clientCalendar {
    background: white;
    border-radius: 8px;
    padding: 12px;
    padding-bottom: 140px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Легенда календаря */
.calendar-legend {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 12px;
    flex-wrap: wrap;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Кастомизация FullCalendar для клиента */
#clientCalendar .fc {
    font-family: 'Inter', sans-serif;
}

#clientCalendar .fc-toolbar-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

#clientCalendar .fc-button {
    background: white;
    border: 1px solid #ddd;
    color: #333;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

#clientCalendar .fc-button:hover {
    background: #f0f0f0;
    border-color: #D4AF37;
}

#clientCalendar .fc-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#clientCalendar .fc-daygrid-day {
    cursor: pointer;
    transition: background 0.2s;
    aspect-ratio: 1 / 1;
    min-height: 40px;
    height: 40px;
    width: 40px;
}

/* Цветовая маркировка дней */
#clientCalendar .client-cal-green .fc-daygrid-day-frame {
    background: rgba(76, 175, 80, 0.15);
}

#clientCalendar .client-cal-yellow .fc-daygrid-day-frame {
    background: rgba(255, 193, 7, 0.15);
}

#clientCalendar .client-cal-red .fc-daygrid-day-frame {
    background: rgba(244, 67, 54, 0.15);
}

#clientCalendar .client-cal-gray .fc-daygrid-day-frame {
    background: rgba(224, 224, 224, 0.3);
    opacity: 0.6;
}

/* Полностью занятые дни - блокируем клик */
#clientCalendar .client-cal-disabled {
    pointer-events: none;
    cursor: not-allowed;
}

#clientCalendar .client-cal-disabled .fc-daygrid-day-frame {
    background: rgba(244, 67, 54, 0.2);
    opacity: 0.7;
}

/* Иконки статуса дня */
.day-status-icon {
    font-size: 12px;
    line-height: 1;
    display: block;
    text-align: center;
}

/* CSS-индикаторы статуса доступности */
.status-indicator {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease-in-out;
    z-index: 1;
    order: 1;
    margin: 0 auto;
}

.status-indicator.status-green {
    background-color: #4CAF50;
}

.status-indicator.status-yellow {
    background-color: #FFC107;
}

.status-indicator.status-red {
    background-color: #F44336;
}

.status-indicator.status-gray {
    background-color: #9E9E9E;
}

/* Fallback эмодзи для старых браузеров */
.status-indicator::after {
    content: attr(data-emoji);
    position: absolute;
    top: -2px;
    left: -2px;
    font-size: 12px;
    opacity: 0;
}

@supports not (border-radius: 50%) {
    .status-indicator::after {
        opacity: 1;
    }
    .status-indicator {
        background: none;
    }
}

/* Информация о слотах */
.day-slots-info {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
    font-weight: 500;
}

/* Hover эффекты */
#clientCalendar .client-cal-day:not(.client-cal-disabled):hover .fc-daygrid-day-frame {
    box-shadow: 0 0 0 2px #D4AF37 inset;
    transform: scale(1.02);
}

/* Прошедшие даты */
.date-past {
    color: #999 !important;
    opacity: 0.6;
    pointer-events: none;
}

.date-past .fc-daygrid-day-number {
    color: #999 !important;
}

.date-past .fc-daygrid-day-frame {
    background: rgba(158, 158, 158, 0.05) !important;
}

/* Адаптация под темы */
[data-theme="dark"] #clientCalendar {
    background: var(--bg-card);
}

[data-theme="dark"] #clientCalendar .fc-toolbar-title {
    color: var(--text-primary);
}

[data-theme="dark"] #clientCalendar .fc-button {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] #clientCalendar .fc-button:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

[data-theme="pink"] #clientCalendar .client-cal-green .fc-daygrid-day-frame {
    border-left-color: #ff69b4;
}

[data-theme="pink"] #clientCalendar .fc-button:hover {
    border-color: #ff69b4;
}

/* Мобильная адаптация */
@media (max-width: 480px) {
    #clientCalendar .fc-toolbar-title {
        font-size: 14px;
    }
    
    #clientCalendar .fc-button {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    #clientCalendar .fc-daygrid-day {
        min-height: 35px;
        height: 35px;
        width: 35px;
    }
    
    #clientCalendar .fc-daygrid-day-number {
        font-size: 11px;
    }
    
    .day-status-icon {
        font-size: 8px;
    }
    
    .day-slots-info {
        font-size: 9px;
    }
}

/* =========================================================
   BOOKING CONFIG - Временные слоты и панель выбранного
   ========================================================= */

/* Контейнер временных слотов */
.timeslots-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    margin-bottom: 20px;
}

/* Панель выбранного времени (после слотов) */
#selectedDateTime {
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    margin-top: 20px;
    margin-bottom: 20px;
    clear: both;
}

/* Секция комментариев (всегда после панели Выбрано) */
.notes-section {
    width: 100%;
    position: relative;
    z-index: 1;
    clear: both;
}

/* Временные слоты - убираем конфликты позиционирования */
#timeSlotsList {
    position: relative;
    z-index: 2;
}

.time-slot-btn {
    display: inline-block;
    user-select: none;
}

/* Исправление перекрытия панели Выбрано */
.booking-config-container #selectedDateTime {
    background: rgba(232, 245, 232, 0.95);
    backdrop-filter: blur(2px);
}

/* Мобильная адаптация */
@media (max-width: 480px) {
    #selectedDateTime {
        padding: 10px;
    }
    
    .notes-section textarea {
        min-height: 80px;
    }
}

