/* ===================================
   Nails Booking App - Luxury Minimal
   =================================== */

/* CSS Variables */
:root {
    /* Luxury minimal palette */
    --color-bg: #FAFAFA;
    --color-surface: #FFFFFF;
    --color-primary: #1A1A1A;
    --color-primary-light: #333333;
    --color-accent: #C9A87C; /* Gold accent */
    --color-accent-light: #E8DCC8;
    --color-text: #1A1A1A;
    --color-text-secondary: #888888;
    --color-text-muted: #BBBBBB;
    --color-border: #EEEEEE;
    --color-border-dark: #E0E0E0;
    --color-success: #2D8A5F;
    --color-danger: #D64545;
    --color-warning: #E6A23C;

    /* Admin panel colors */
    --admin-bg: #FAFAFA;
    --admin-card: #FFFFFF;
    --admin-accent: #1A1A1A;
    --admin-danger: #D64545;
    --admin-text-light: #888888;
    --admin-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);

    /* Typography */
    --font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows - very subtle */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);

    --safe-area-top: env(safe-area-inset-top, 20px);
    --safe-area-bottom: env(safe-area-inset-bottom, 20px);

    /* Transitions - smooth and elegant */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: var(--font-weight-normal);
    letter-spacing: -0.01em;
}

/* App Container */
.app {
    max-width: 440px;
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--safe-area-bottom);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Header */
.header {
    text-align: center;
    padding: var(--space-xl) 0 var(--space-lg);
}

.header--with-cover {
    padding-top: 0;
}

.header__cover {
    width: calc(100% + var(--space-lg) * 2);
    margin-left: calc(var(--space-lg) * -1);
    margin-right: calc(var(--space-lg) * -1);
    height: 200px;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    background-size: cover;
    background-position: center;
    margin-bottom: var(--space-lg);
    box-shadow: none;
    border: none;
}

.header__title {
    font-size: 32px;
    font-weight: var(--font-weight-light);
    color: var(--color-text);
    letter-spacing: -0.02em;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

.header__description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-top: var(--space-sm);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    font-weight: var(--font-weight-light);
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Month Navigation */
.month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    background: transparent;
    margin-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.month-nav__btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0.6;
}

.month-nav__btn:hover {
    opacity: 1;
    background: var(--color-border);
}

.month-nav__btn:active {
    transform: scale(0.92);
}

.month-nav__title {
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Today Button */
.today-btn {
    display: block;
    margin: 0 auto var(--space-lg);
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.today-btn:hover {
    background: var(--color-text);
    color: var(--color-surface);
    border-color: var(--color-text);
}

.today-btn:active {
    transform: scale(0.97);
}

/* Calendar */
.calendar {
    background: transparent;
    padding: 0;
}

.calendar__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.calendar__weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    padding: var(--space-sm) 0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

/* Calendar Day */
.calendar__day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: var(--font-weight-normal);
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.calendar__day:hover {
    background: var(--color-border);
}

.calendar__day:active {
    transform: scale(0.92);
}

.calendar__day--empty {
    cursor: default;
}

.calendar__day--empty:hover {
    background: transparent;
}

.calendar__day--other-month {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.calendar__day--today {
    background: var(--color-border);
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

.calendar__day--today:hover {
    background: var(--color-border-dark);
}

/* Day number */
.calendar__day-number {
    font-size: 15px;
    line-height: 1;
}

/* Day Dots - статус слотов */
.day-dots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    max-width: 20px;
    margin-top: 3px;
}

.day-dot {
    width: 4px;
    height: 4px;
    border-radius: var(--radius-full);
}

.day-dot--free {
    background: var(--color-success);
}

.day-dot--busy {
    background: var(--color-danger);
}

/* День полностью занят */
.calendar__day--full {
    opacity: 0.5;
}

.calendar__day--full:hover {
    opacity: 0.7;
}

/* Сегодняшний день если полностью занят */
.calendar__day--today.calendar__day--full {
    opacity: 0.7;
}

.calendar__day--today.calendar__day--full:hover {
    opacity: 0.8;
}

/* Day Badge - для выходных */
.day-badge {
    font-size: 10px;
    color: var(--color-text-muted);
    line-height: 1;
    margin-top: 2px;
}

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.overlay--visible {
    opacity: 1;
    visibility: visible;
}

/* Bottom Sheet */
.bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-md) var(--space-lg) calc(var(--safe-area-bottom) + var(--space-xl));
    transform: translateY(100%);
    transition: transform var(--transition-slow);
    z-index: 200;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.08);
}

#adminDaySheet {
    z-index: 360;
}

.bottom-sheet--visible {
    transform: translateY(0);
}

.bottom-sheet__handle {
    width: 32px;
    height: 4px;
    background: var(--color-border-dark);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-lg);
}

.bottom-sheet__content {
    max-width: 400px;
    margin: 0 auto;
}

.bottom-sheet__title {
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--color-text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Slots */
.slots {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slot:hover {
    border-color: var(--color-text);
}

.slot:active {
    transform: scale(0.98);
    background: var(--color-bg);
}

.slot__time {
    font-size: 16px;
    font-weight: var(--font-weight-normal);
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.slot__status {
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.slot__status--free {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.slot__status--booked {
    background: var(--color-text);
    color: var(--color-surface);
}

.slot--booked {
    border-color: var(--color-border);
    opacity: 0.5;
    cursor: default;
}

.slot--booked:hover {
    border-color: var(--color-border);
}

.slot--blocked {
    pointer-events: none;
    cursor: not-allowed;
}

/* Booking Form */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-label {
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-input {
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    color: var(--color-text);
    background: transparent;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--color-primary);
    background: var(--color-surface);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-input--textarea {
    resize: none;
    min-height: 80px;
}

.form-input--error {
    border-color: var(--color-danger);
}

.form-error {
    font-size: 12px;
    color: var(--color-danger);
    min-height: 16px;
}

/* Buttons */
.btn {
    padding: var(--space-md) var(--space-lg);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn--primary {
    background: var(--color-text);
    color: var(--color-surface);
    border-color: var(--color-text);
}

.btn--primary:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
}

.btn--primary:active {
    transform: scale(0.98);
}

.btn--secondary {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border-dark);
}

.btn--secondary:hover {
    background: var(--color-bg);
    border-color: var(--color-text);
}

.btn--danger {
    background: transparent;
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.btn--danger:hover {
    background: var(--color-danger);
    color: var(--color-surface);
}

.btn--danger:active {
    transform: scale(0.98);
}

.btn--outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn--outline:hover {
    border-color: var(--color-text);
}

.btn--success {
    background: #34c759;
    color: white;
    border-color: #34c759;
}

/* Booking Info */
.booking-info {
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.booking-info__row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.booking-info__row:last-child {
    border-bottom: none;
}

.booking-info__label {
    font-size: 11px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.booking-info__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* Admin Panel - Luxury Minimal */
.admin-panel {
    position: fixed;
    inset: 0;
    background: var(--color-surface);
    z-index: 300;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
}

.admin-panel--visible {
    transform: translateX(0);
}

.admin-panel .app {
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
}

/* Admin Description */
.admin-description {
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* Admin Buttons */
.admin-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.admin-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    font-size: 11px;
    transition: all var(--transition-fast);
}

.admin-buttons .btn:hover {
    border-color: var(--color-text);
}

.admin-buttons .btn--primary {
    background: var(--color-text);
    color: var(--color-surface);
    border-color: var(--color-text);
}

.admin-buttons .btn--primary:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
}

.admin-buttons .btn--danger {
    background: transparent;
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.admin-buttons .btn--danger:hover {
    background: var(--color-danger);
    color: var(--color-surface);
}

.admin-buttons .btn--outline {
    grid-column: 1 / -1;
}

/* Admin Overlay */
.admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 350;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.admin-overlay.overlay--visible {
    opacity: 1;
    visibility: visible;
}

/* Admin Day Slots */
.admin-day-slots {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Заголовок "Записи" */
.admin-day-slots__title {
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Карточки записей - Minimal */
.admin-slot {
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all var(--transition-fast);
}

.admin-slot:hover {
    border-color: var(--color-border-dark);
}

.admin-slot--free {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.6;
}

.admin-slot--booked {
    border-left: 2px solid var(--color-accent);
}

.admin-slot__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

/* Время */
.admin-slot__time {
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    line-height: 1.2;
}

.admin-slot__status {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: var(--font-weight-normal);
}

/* Кнопка удаления */
.admin-slot__delete {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-danger);
    background: transparent;
    color: var(--color-danger);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-slot__delete:hover {
    background: var(--color-danger);
    color: var(--color-surface);
    transform: scale(1.05);
}

.admin-slot__delete:active {
    background: var(--admin-danger);
    color: white;
    transform: scale(0.98);
}

.admin-slot__info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-slot__row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-slot__label {
    font-size: 12px;
    color: var(--admin-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Имя клиента - средний размер */
.admin-slot__row--name .admin-slot__value {
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text);
}

/* Телефон - чуть менее акцентный */
.admin-slot__row--phone .admin-slot__value {
    font-size: 16px;
    font-weight: 500;
    color: var(--admin-accent);
}

/* Комментарий - серый текст, меньший размер */
.admin-slot__row--comment .admin-slot__value {
    font-size: 14px;
    font-weight: 400;
    color: var(--admin-text-light);
    line-height: 1.5;
}

.admin-slot__value {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    word-break: break-word;
}

.admin-slot__phone {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 16px;
}

.admin-slot__phone:active {
    text-decoration: underline;
}

/* Confirm Modal - Minimal */
.confirm-modal {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 400;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.confirm-modal--visible {
    opacity: 1;
    visibility: visible;
}

.confirm-modal__content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 320px;
    width: 100%;
    text-align: center;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.confirm-modal--visible .confirm-modal__content {
    transform: translateY(0);
}

.confirm-modal__text {
    font-size: 15px;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
    font-weight: var(--font-weight-normal);
}

.confirm-modal__actions {
    display: flex;
    gap: var(--space-sm);
}

.confirm-modal__actions .btn {
    flex: 1;
    padding: var(--space-md);
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

/* Selection */
::selection {
    background: rgba(255, 107, 157, 0.3);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   Settings Screen - Luxury Minimal
   =================================== */
.settings-screen {
    position: fixed;
    inset: 0;
    background: var(--color-surface);
    z-index: 380;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
}

.settings-screen--visible {
    transform: translateX(0);
}

.settings-screen__header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--safe-area-top) var(--space-md) var(--space-md);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    z-index: 10;
}

.settings-screen__back {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    opacity: 0.6;
}

.settings-screen__back:hover {
    opacity: 1;
    background: var(--color-border);
}

.settings-screen__title {
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.settings-screen__body {
    padding: var(--space-lg);
    padding-bottom: calc(var(--safe-area-bottom) + var(--space-xl));
    max-width: 440px;
    margin: 0 auto;
}

/* Settings Section */
.settings-section {
    background: transparent;
    border-bottom: 1px solid var(--color-border);
    padding: 0 0 var(--space-lg);
    margin-bottom: var(--space-lg);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section__title {
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

/* Settings Field */
.settings-field {
    margin-bottom: var(--space-md);
}

.settings-field:last-child {
    margin-bottom: 0;
}

.settings-field--row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-field--half {
    display: inline-block;
    width: calc(50% - 8px);
}

.settings-row {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.settings-label {
    display: block;
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.02em;
}

.settings-field--row .settings-label {
    margin-bottom: 0;
}

.settings-input {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    color: var(--color-text);
    background: transparent;
    transition: all var(--transition-fast);
    outline: none;
}

.settings-input:focus {
    border-color: var(--color-text);
    background: var(--color-bg);
}

.settings-input--textarea {
    resize: vertical;
    min-height: 80px;
}

.settings-input--small {
    width: 80px;
    padding: var(--space-sm) var(--space-md);
    text-align: center;
}

.settings-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: calc(var(--space-sm) * -1);
}

/* Cover Upload */
.cover-upload {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.cover-upload__preview {
    width: 100%;
    height: 120px;
    border: 1px dashed var(--color-border-dark);
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cover-upload__preview:hover {
    border-color: var(--color-primary);
    background-color: rgba(255, 107, 157, 0.05);
}

.cover-upload__preview--has-image {
    border-style: solid;
    border-color: var(--color-primary);
}

.cover-upload__placeholder {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.cover-upload__remove {
    align-self: flex-start;
}

/* Char Counter */
.char-counter {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-left: 8px;
}

.char-counter--warning {
    color: var(--color-warning);
}

.char-counter--limit {
    color: var(--color-danger);
}

.settings-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--color-text);
    cursor: pointer;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.settings-tab {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.02em;
}

.settings-tab--active {
    background: var(--color-text);
    color: var(--color-surface);
}

/* Settings Mode Panels */
.settings-mode {
    padding-top: var(--space-sm);
}

.settings-mode--hidden {
    display: none;
}

/* Slots List Editor */
.slots-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.slot-editor {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.slot-editor__time {
    width: 90px;
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    text-align: center;
    background: transparent;
}

.slot-editor__separator {
    color: var(--color-text-muted);
    font-size: 14px;
}

.slot-editor__delete {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    margin-left: auto;
    font-size: 16px;
}

.slot-editor__delete:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: var(--color-surface);
}

.slot-editor__delete:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Days Checkboxes */
.days-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.days-checkboxes label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.days-checkboxes label:hover {
    border-color: var(--color-text);
}

.days-checkboxes label:has(input:checked) {
    background: var(--color-text);
    border-color: var(--color-text);
    color: var(--color-surface);
}

.days-checkboxes input {
    width: 14px;
    height: 14px;
    accent-color: var(--color-surface);
}

.days-checkboxes label:has(input:checked) input {
    accent-color: var(--color-text);
}

/* Color Palette - Minimal */
.color-palette--compact {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: nowrap;
    overflow-x: auto;
}

.color-palette--compact .color-palette__item {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.color-palette__item {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.color-palette__item:hover {
    border-color: var(--color-text);
}

.color-palette__item--active {
    border-color: var(--color-text);
    border-width: 2px;
}

.color-palette__check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.color-palette__item--active .color-palette__check {
    opacity: 1;
}

/* Theme Backgrounds - Luxury muted tones */

/* Пыльная роза / Dusty Rose */
body.theme-pink {
    background: linear-gradient(180deg, #F5F0EE 0%, #EDE5E3 100%);
}

/* Французский серый / French Gray */
body.theme-blue {
    background: linear-gradient(180deg, #F0F2F4 0%, #E8EBED 100%);
}

/* Шалфей / Sage */
body.theme-mint {
    background: linear-gradient(180deg, #F2F4F2 0%, #E8ECE8 100%);
}

/* Шампань / Champagne */
body.theme-peach {
    background: linear-gradient(180deg, #F7F5F0 0%, #F0EBE3 100%);
}

/* Лаванда / Muted Lavender */
body.theme-lavender {
    background: linear-gradient(180deg, #F3F2F5 0%, #ECEAEF 100%);
}

/* Слоновая кость / Ivory */
body.theme-lemon {
    background: linear-gradient(180deg, #F8F7F2 0%, #F2F0E8 100%);
}

/* Custom color theme */
body.theme-custom {
    background: var(--custom-bg-color, #FAFAFA);
}

/* Settings Collapse - раскрывающийся блок */
.settings-section--collapsible {
    padding: 0;
    overflow: hidden;
}

.settings-collapse-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.settings-collapse-header:hover {
    background: rgba(108, 99, 255, 0.05);
}

.settings-collapse-header__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-collapse-header__icon {
    color: var(--color-text-secondary);
    transition: transform var(--transition-normal);
}

.settings-section--collapsible.expanded .settings-collapse-header__icon {
    transform: rotate(180deg);
}

.settings-collapse-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
    padding: 0 16px;
}

.settings-section--collapsible.expanded .settings-collapse-body {
    max-height: 800px;
    padding: 0 16px 16px;
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker {
    width: 100px;
    height: 44px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.color-picker:hover {
    border-color: var(--admin-accent);
}

.color-picker:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

/* Button Variants for Settings */
.btn--small {
    padding: 10px 16px;
    font-size: 14px;
}

.btn--full {
    width: 100%;
}

/* Day-off badge */
.day-badge--off {
    color: var(--color-text-muted);
}

.calendar__day--off {
    opacity: 0.5;
}

.calendar__day--off:hover {
    background: rgba(142, 142, 147, 0.1);
}

/* Slots Empty Message */
.slots__empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-secondary);
    font-size: 16px;
}

/* Slots Loading */
.slots__loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-secondary);
    font-size: 14px;
}

/* Orphaned slot styling */
.admin-slot--orphaned {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.1), rgba(255, 149, 0, 0.05));
    border: 1px dashed var(--color-warning);
}

.admin-slot__orphan-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--color-warning);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* Admin slot variants */
.admin-slot--dayoff,
.admin-slot--empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--admin-text-light);
    font-size: 16px;
    background: var(--admin-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--admin-shadow);
    border: 2px dashed var(--color-border);
}

.admin-slot__orphaned-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-warning);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 10px;
    padding-top: 16px;
    border-top: 1px dashed var(--color-border);
}

/* Admin day controls */
.admin-day-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.admin-day-controls .btn {
    flex: 1;
    min-width: 120px;
}

/* Blocked slot styling */
.admin-slot--blocked {
    background: #FFF5F5;
    border: 2px dashed var(--color-danger);
    opacity: 0.8;
}

.admin-slot--blocked .admin-slot__status {
    color: var(--color-danger);
    font-weight: 600;
}

.admin-slot--blocked-booked {
    border-left: 4px solid var(--color-danger);
}

.admin-slot__unblock {
    background: none;
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.admin-slot__unblock:hover {
    background: var(--color-danger);
    color: white;
}

.admin-slot__block {
    background: none;
    border: 1px solid var(--color-text-secondary);
    color: var(--color-text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.admin-slot__block:hover {
    background: var(--color-text-secondary);
    color: white;
}

.admin-slot__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Calendar day-off styling */
.calendar__day--dayoff {
    opacity: 0.4;
}

.calendar__day--dayoff:hover {
    background: rgba(142, 142, 147, 0.1);
}

/* Calendar past date styling - прошедшие даты */
.calendar__day--past {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.calendar__day--past .day-badge,
.calendar__day--past .day-dots {
    display: none;
}

/* За пределами окна записи */
.calendar__day--beyond {
    opacity: 0.3;
}

/* Slot editor time input */
.slot-editor__time {
    width: 90px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    text-align: center;
    background: var(--color-surface);
}

.slot-editor__time:focus {
    outline: none;
    border-color: var(--color-primary);
}

.slot-editor__start,
.slot-editor__end {
    width: 90px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    text-align: center;
    background: var(--color-surface);
}

.slot-editor__start:focus,
.slot-editor__end:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ===================================
   Adaptive Styles for Mobile
   =================================== */
@media (max-width: 430px) {
    /* Admin panel - один столбец для карточек */
    .admin-buttons {
        grid-template-columns: 1fr;
    }

    .admin-buttons .btn--outline {
        grid-column: 1;
    }

    /* Карточки записей - адаптивные отступы */
    .admin-slot {
        padding: 16px;
    }

    .admin-slot__time {
        font-size: 18px;
    }

    .admin-slot__row--name .admin-slot__value {
        font-size: 16px;
    }

    .admin-slot__row--phone .admin-slot__value {
        font-size: 15px;
    }

    /* Описание админки */
    .admin-description {
        font-size: 13px;
        padding: 14px;
    }

    /* Bottom sheet для админки */
    #adminDaySheet {
        max-height: 90vh;
    }
}

@media (max-width: 375px) {
    /* Для совсем маленьких экранов */
    .admin-slot__delete {
        padding: 8px 12px;
        font-size: 13px;
    }

    .admin-slot__delete svg {
        width: 14px;
        height: 14px;
    }

    .admin-buttons .btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .admin-buttons .btn svg {
        width: 16px;
        height: 16px;
    }
}

/* ===================================
   Auth Screen
   =================================== */
.auth-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: linear-gradient(180deg, var(--color-bg) 0%, #F0EFED 100%);
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-title {
    font-size: 28px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-normal);
}

.auth-form {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.auth-form--hidden {
    display: none;
}

.auth-form-title {
    font-size: 20px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.auth-switch {
    margin-top: var(--space-lg);
    text-align: center;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.auth-switch a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: opacity var(--transition-fast);
}

.auth-switch a:hover {
    opacity: 0.7;
}

.form-error--general {
    display: block;
    text-align: center;
    margin-bottom: var(--space-md);
}

.form-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: var(--font-weight-normal);
}

/* Full width button modifier */
.btn--full {
    width: 100%;
}

/* ===================================
   Back to Admin Button
   =================================== */
.back-to-admin-btn {
    position: fixed;
    bottom: calc(var(--safe-area-bottom) + 20px);
    right: 20px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 20px;
    background: var(--color-primary);
    color: var(--color-surface);
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    font-family: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    z-index: 100;
}

.back-to-admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.back-to-admin-btn:active {
    transform: scale(0.95);
}

.back-to-admin-btn svg {
    flex-shrink: 0;
}

/* ===================================
   Auth Screen Responsive
   =================================== */
@media (max-width: 430px) {
    .auth-screen {
        padding: var(--space-md);
        align-items: flex-start;
        padding-top: calc(var(--safe-area-top) + 60px);
    }

    .auth-form {
        padding: var(--space-md);
    }

    .auth-title {
        font-size: 24px;
    }
}

/* ===================================
   Admin Booking Form
   =================================== */
#adminBookingOverlay {
    z-index: 1100;
}

#adminBookingSheet {
    z-index: 1101;
}

.admin-slot__book {
    padding: 6px 12px;
    background: var(--color-primary);
    color: var(--color-surface);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    font-family: inherit;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.admin-slot__book:hover {
    opacity: 0.85;
}

.admin-slot__book:active {
    opacity: 0.7;
}

.admin-booking-buttons {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.admin-booking-buttons .btn {
    flex: 1;
}

.admin-slot--free .admin-slot__actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.admin-slot--free .admin-slot__status {
    display: none;
}

/* ===================================
   Services Editor
   =================================== */
.services-list {
    margin: var(--space-md) 0;
}

.service-editor {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.service-editor__row {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.service-editor__row:last-child {
    margin-bottom: 0;
}

.service-editor__name {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--color-surface);
}

.service-editor__price,
.service-editor__duration {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    text-align: center;
    background: var(--color-surface);
}

.service-editor__price::placeholder,
.service-editor__duration::placeholder {
    font-size: 12px;
}

.service-editor__delete {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-danger);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-editor__name:focus,
.service-editor__price:focus,
.service-editor__duration:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ===================================
   Service Select in Booking Form
   =================================== */
.service-select-group {
    margin-bottom: var(--space-md);
}

.service-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.service-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ===================================
   Link Modal
   =================================== */
.link-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-lg);
}

.link-modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.link-modal__title {
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.link-modal__desc {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.link-modal__input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: var(--color-bg);
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.link-modal__input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.link-modal__btn {
    width: 100%;
}
