/* ============================================
   ИгроРум Web — Global Styles
   ============================================ */

:root {
    --primary: #2E7D32;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --primary-container: #C8E6C9;
    --secondary: #FF8F00;
    --surface: #FAFAFA;
    --surface-variant: #F5F5F5;
    --surface-card: #FFFFFF;
    --background: #F8F9FA;
    --on-surface: #1C1B1F;
    --on-surface-variant: #6B6B6B;
    --error: #D32F2F;
    --success: #2E7D32;
    --available: #4CAF50;
    --booked: #E57373;
    --pending: #FFB74D;
    --active: #42A5F5;
    --mine: #7C4DFF;
    --buffer: #FF9800;
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    /* Soft, slightly green-tinted layered shadows to match the chat cloud */
    --shadow-sm: 0 6px 18px -10px rgba(24,50,30,0.14), 0 1px 3px rgba(24,50,30,0.05);
    --shadow-md: 0 10px 30px -12px rgba(24,50,30,0.18), 0 2px 8px -4px rgba(24,50,30,0.10);
    --shadow-lg: 0 24px 60px -20px rgba(24,50,30,0.22), 0 8px 24px -12px rgba(24,50,30,0.14);
    --card-border: 1px solid rgba(46,125,50,0.08);
    --transition: 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(900px 500px at 50% -120px, rgba(46,125,50,0.10), transparent 65%),
        linear-gradient(180deg, #fafcfa 0%, #f0f5f1 100%);
    background-attachment: fixed;
    color: var(--on-surface);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: transparent;
    position: relative;
    overflow-x: hidden;
}

/* ============================================
   Typography
   ============================================ */
.display-lg { font-size: 32px; font-weight: 700; line-height: 1.2; }
.headline-md { font-size: 24px; font-weight: 600; line-height: 1.3; }
.headline-sm { font-size: 20px; font-weight: 600; line-height: 1.3; }
.title-lg { font-size: 18px; font-weight: 600; }
.title-md { font-size: 16px; font-weight: 500; }
.body-lg { font-size: 16px; font-weight: 400; }
.body-md { font-size: 14px; font-weight: 400; }
.body-sm { font-size: 12px; font-weight: 400; }
.label-lg { font-size: 14px; font-weight: 500; }
.label-md { font-size: 12px; font-weight: 500; }

.text-primary { color: var(--primary); }
.text-muted { color: var(--on-surface-variant); }
.text-error { color: var(--error); }
.text-center { text-align: center; }

@font-face {
    font-family: 'Material Icons Round';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('/fonts/MaterialIconsRound.woff2') format('woff2');
}

/* ============================================
   Material Icons
   ============================================ */
.mi {
    font-family: 'Material Icons Round';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--surface-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: var(--card-border);
    padding: 20px;
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-flat { box-shadow: none; border: 1px solid #E0E0E0; }

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    box-shadow: 0 4px 12px rgba(46,125,50,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 16px rgba(46,125,50,0.4); }
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: rgba(46,125,50,0.05); }

.btn-text {
    background: transparent;
    color: var(--primary);
    padding: 8px 16px;
}
.btn-text:hover { background: rgba(46,125,50,0.05); }

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-full { width: 100%; }

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.btn-icon:hover { box-shadow: var(--shadow-md); }

/* ============================================
   Inputs
   ============================================ */
.input-group {
    position: relative;
    margin-bottom: 16px;
}
.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--on-surface-variant);
    margin-bottom: 6px;
}
.input-field {
    width: 100%;
    padding: 14px 16px;
    padding-left: 44px;
    border: 2px solid #E0E0E0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 16px;
    background: var(--surface-card);
    transition: border-color var(--transition);
    outline: none;
}
.input-field:focus { border-color: var(--primary); }
.input-field::placeholder { color: #BDBDBD; }

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--on-surface-variant);
    font-size: 20px;
    pointer-events: none;
}
.input-group.has-label .input-icon { top: calc(50% + 10px); }

.input-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--on-surface-variant);
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.input-group.has-label .input-toggle { top: calc(50% + 10px); }

/* ============================================
   Chips / Tabs
   ============================================ */
.chip-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.chip {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #E0E0E0;
    border-radius: var(--radius-lg);
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--on-surface-variant);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
}
.chip.active {
    background: var(--primary-container);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.status-chip.paid { background: #E8F5E9; color: var(--primary); }
.status-chip.active { background: #E3F2FD; color: #1976D2; }
.status-chip.pending { background: #FFF3E0; color: #E65100; }
.status-chip.cancelled { background: #FFEBEE; color: var(--error); }
.status-chip.completed { background: var(--surface-variant); color: var(--on-surface-variant); }

/* ============================================
   Screen Layout
   ============================================ */
.screen {
    min-height: 100vh;
    padding: 24px;
    padding-bottom: 90px;
    animation: screenIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes screenIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.screen-auth {
    background: linear-gradient(to bottom, var(--primary-container), var(--background), var(--background));
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
    padding-bottom: 40px;
}

.screen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.screen-header .back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--surface-card);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--on-surface);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   Bottom Navigation
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--surface-card);
    border-top: 1px solid #E0E0E0;
    display: flex;
    justify-content: space-around;
    padding: 8px 16px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--on-surface-variant);
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    transition: color var(--transition);
    border-radius: 12px;
}
.nav-item.active {
    color: var(--primary);
}
.nav-item .mi { font-size: 26px; }

/* ============================================
   Home Screen
   ============================================ */
.home-hero {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: 24px;
    min-height: 220px;
    color: white;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.home-hero > * {
    position: relative;
    z-index: 1;
}
.home-hero::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.home-hero .hero-title { font-size: 20px; font-weight: 700; }
.home-hero .hero-sub { font-size: 14px; opacity: 0.9; margin-top: 4px; }
.home-hero .hero-price {
    margin-top: 16px;
    font-size: 24px;
    font-weight: 700;
}
.home-hero .hero-btn {
    margin-top: 16px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}
.home-hero .hero-btn:hover { background: rgba(255,255,255,0.3); }

.home-greeting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.home-greeting h1 { font-size: 26px; font-weight: 700; }

.access-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.access-card.active-access {
    background: #E8F5E9;
    border: 1px solid var(--primary-light);
}
.access-card.inactive-access {
    background: #FFF3E0;
    border: 1px solid var(--pending);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--surface-card);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    font-family: inherit;
}
.quick-action:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.quick-action .mi { font-size: 32px; color: var(--primary); }
.quick-action span { font-size: 13px; font-weight: 500; color: var(--on-surface); }

/* ============================================
   Booking / Calendar
   ============================================ */
.calendar {
    background: var(--surface-card);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.calendar-header h3 { font-size: 16px; font-weight: 600; }
.calendar-nav {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    color: var(--on-surface);
}
.calendar-nav:hover { background: var(--surface-variant); }

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}
.calendar-weekdays span {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--on-surface-variant);
    padding: 4px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    background: none;
    color: var(--on-surface);
    transition: all var(--transition);
    font-family: inherit;
}
.calendar-day:hover:not(.disabled):not(.empty) { background: var(--primary-container); }
.calendar-day.today { border: 2px solid var(--primary); }
.calendar-day.selected { background: var(--primary); color: white; }
.calendar-day.disabled { color: #CCC; cursor: default; }
.calendar-day.empty { cursor: default; }

.slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 20px;
}
.slot {
    padding: 8px 4px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}
.slot.available { background: #E8F5E9; color: var(--primary-dark); }
.slot.available:hover { background: var(--primary-light); color: white; }
.slot.booked { background: #FFCDD2; color: #B71C1C; cursor: not-allowed; }
.slot.mine { background: #EDE7F6; color: #4A148C; }
.slot.selected { background: var(--primary); color: white; box-shadow: 0 2px 8px rgba(46,125,50,0.3); }
.slot.past { background: #EEEEEE; color: #BDBDBD; cursor: not-allowed; }
.slot.buffer { background: #FFF3E0; color: #E65100; cursor: not-allowed; }

.slot-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.slot-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--on-surface-variant);
}
.slot-legend-item .dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

/* ============================================ */
/* Timeline & Time Picker (dynamic scheduling)  */
/* ============================================ */
.time-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--on-surface-variant);
    margin-bottom: 20px;
}

.time-picker-section {
    margin-bottom: 20px;
}
.time-picker-section label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.time-picker-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}

.time-option {
    padding: 8px 14px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    color: var(--on-surface);
}
.time-option:hover {
    border-color: var(--primary);
    background: #E8F5E9;
}
.time-option.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(46,125,50,0.3);
}

.duration-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.duration-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 18px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    background: var(--surface-card);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    min-width: 80px;
}
.duration-option:hover {
    border-color: var(--primary);
    background: #E8F5E9;
}
.duration-option.selected {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(46,125,50,0.3);
}
.duration-option .duration-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface);
}
.duration-option .duration-price {
    font-size: 12px;
    color: var(--on-surface-variant);
    margin-top: 2px;
}
.duration-option.selected .duration-label,
.duration-option.selected .duration-price {
    color: white;
}

/* Picker Container — Position context for sliding panels */
.picker-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    min-height: 250px;
}

/* Time and Duration Picker Panels — Slide Animation */
.time-picker-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}
.time-picker-panel.hidden {
    transform: translateX(-120%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.duration-picker-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}
.duration-picker-panel.visible {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    z-index: 3;
}

.duration-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 0;
}

.duration-back-btn {
    background: none;
    border: none;
    padding: 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--on-surface);
}
.duration-back-btn:hover {
    background: var(--surface-variant);
}
.duration-back-btn:active {
    background: #E0E0E0;
}

/* ============================================
   Booking Progress Bar
   ============================================ */
.booking-progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--surface-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.progress-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface-variant);
    color: var(--on-surface-variant);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition);
}

.progress-step.active .progress-number {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(46,125,50,0.3);
}

.progress-step.done .progress-number {
    background: var(--primary);
    color: white;
}

.progress-label {
    font-size: 12px;
    color: var(--on-surface-variant);
    text-align: center;
    max-width: 60px;
}

.progress-line {
    flex: 0.5;
    height: 2px;
    background: var(--surface-variant);
    transition: all var(--transition);
}

.progress-line.done {
    background: var(--primary);
}

/* ============================================
   Booking Steps Container & Steps
   ============================================ */
.booking-steps-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    min-height: 400px;
}

.booking-step {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%); /* All hidden steps off-screen right */
}

.booking-step.visible {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0); /* Visible step in center */
}

.booking-step.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%); /* Hidden steps always right */
}

.step-content {
    padding: 20px;
    background: var(--surface-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--on-surface);
}

.step-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.step-back-btn:hover {
    background: var(--primary-container);
}

.booking-summary-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}



.booking-summary {
    background: var(--surface-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}
.booking-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}
.booking-summary-row .label { color: var(--on-surface-variant); font-size: 14px; }
.booking-summary-row .value { font-weight: 600; font-size: 14px; }
.booking-summary .total {
    border-top: 1px solid #E0E0E0;
    margin-top: 8px;
    padding-top: 12px;
}
.booking-summary .total .value { font-size: 20px; color: var(--primary); }

/* ============================================
   Payment
   ============================================ */
.card-preview {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    border-radius: var(--radius-md);
    padding: 24px;
    color: white;
    margin: 0 auto 20px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.card-preview .card-chip {
    width: 40px;
    height: 28px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 6px;
    margin-bottom: 20px;
}
.card-number { font-size: 20px; letter-spacing: 3px; font-weight: 500; margin-bottom: 16px; }
.card-bottom { display: flex; justify-content: space-between; }
.card-bottom .card-label { font-size: 10px; opacity: 0.6; text-transform: uppercase; }
.card-bottom .card-value { font-size: 14px; font-weight: 500; }

/* ============================================
   History / Bookings list
   ============================================ */
.booking-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--surface-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all var(--transition);
}
.booking-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.booking-card .booking-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
}
.booking-card .booking-icon .mi { color: var(--primary); }
.booking-card .booking-info { flex: 1; }
.booking-card .booking-info .date { font-weight: 600; font-size: 15px; }
.booking-card .booking-info .time { font-size: 13px; color: var(--on-surface-variant); }
.booking-card .booking-price { font-weight: 700; color: var(--primary); }

/* ============================================
   Door / Lock
   ============================================ */
.door-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 32px auto;
    transition: all 0.3s ease;
    position: relative;
}
.door-circle.idle {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 8px 32px rgba(46,125,50,0.4);
    animation: pulse-door 2s infinite;
}
.door-circle.opening {
    background: linear-gradient(135deg, var(--secondary), #F57C00);
    box-shadow: 0 8px 32px rgba(255,143,0,0.4);
}
.door-circle.opened {
    background: linear-gradient(135deg, var(--active), #1976D2);
    box-shadow: 0 8px 32px rgba(66,165,245,0.4);
}
.door-circle.error {
    background: linear-gradient(135deg, #EF5350, #C62828);
    box-shadow: 0 8px 32px rgba(211,47,47,0.4);
}
.door-circle.disabled {
    background: linear-gradient(135deg, #9E9E9E, #757575);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    cursor: not-allowed;
}
.door-circle .mi { font-size: 64px; color: white; }

@keyframes pulse-door {
    0%, 100% { box-shadow: 0 8px 32px rgba(46,125,50,0.4); }
    50% { box-shadow: 0 8px 48px rgba(46,125,50,0.6); }
}

/* Countdown timer */
.countdown-timer {
    margin: 0 auto 24px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    text-align: center;
    max-width: 240px;
}
.countdown-timer.active {
    background: linear-gradient(135deg, rgba(46,125,50,0.1), rgba(76,175,80,0.1));
    border: 1px solid rgba(46,125,50,0.2);
}
.countdown-timer.before {
    background: linear-gradient(135deg, rgba(255,143,0,0.1), rgba(255,167,38,0.1));
    border: 1px solid rgba(255,143,0,0.2);
}
.countdown-timer.waiting {
    background: linear-gradient(135deg, rgba(66,165,245,0.1), rgba(33,150,243,0.1));
    border: 1px solid rgba(66,165,245,0.2);
}
.countdown-value {
    font-size: 36px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}
.countdown-timer.active .countdown-value { color: var(--primary); }
.countdown-timer.before .countdown-value { color: var(--secondary); }
.countdown-timer.waiting .countdown-value { color: var(--active); }
.countdown-label {
    font-size: 13px;
    color: var(--on-surface-variant);
    margin-top: 4px;
}

.lock-password-card {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}
.lock-password-card .password-display {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--primary-dark);
    margin: 12px 0;
}

/* ============================================
   Profile
   ============================================ */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.profile-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #F0F0F0;
}
.profile-stat:last-child { border-bottom: none; }
.profile-stat .mi { color: var(--primary); }
.profile-stat .stat-label { font-size: 13px; color: var(--on-surface-variant); }
.profile-stat .stat-value { font-weight: 600; }

.profile-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition);
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    color: var(--on-surface);
    text-align: left;
}
.profile-action:hover { background: var(--surface-variant); }
.profile-action .mi { color: var(--on-surface-variant); }
.profile-action:disabled { cursor: not-allowed; }
.push-switch {
    flex-shrink: 0;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: var(--surface-variant, #e5e7eb);
    position: relative;
    transition: background 180ms ease;
    display: inline-block;
}
.push-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.push-switch.on {
    background: var(--primary, #22c55e);
}
.push-switch.on .push-switch-thumb {
    transform: translateX(18px);
}

/* ============================================
   Chat
   ============================================ */

/* Main chat container */
.chat-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
}

/* Messages container - flex column reverse so new messages appear at bottom */
.chat-messages {
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
}

/* Mobile: input at bottom, messages above */
@media (max-width: 767px) {
    .screen:has(.chat-container) {
        display: flex;
        flex-direction: column;
        height: 100vh;
        padding-bottom: 0 !important;
    }

    .screen:has(.chat-container) .chat-container {
        overflow: hidden;
    }

    .screen:has(.chat-container) .screen-header {
        flex-shrink: 0;
    }

    .chat-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: var(--surface);
    }

    .chat-messages {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px 16px;
        padding-bottom: 140px;
    }

    .chat-input-bar {
        position: fixed;
        bottom: 4px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid #E5E7EB;
        padding: 6px 12px;
        display: flex;
        gap: 8px;
        align-items: flex-end;
        width: 100%;
        box-sizing: border-box;
        z-index: 1000;
    }
}

/* Tablet & Desktop: card styling */
@media (min-width: 768px) {
    #app {
        max-width: none;
        width: 100%;
    }

    .chat-container {
        background: var(--surface-card);
        border: 1px solid var(--border, #E5E7EB);
        box-shadow: var(--shadow-md);
        border-radius: 20px;
        padding: 20px;
        margin: 20px auto;
        max-width: none;
        width: 98%;
        height: 60vh;
    }

    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 12px 0;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .chat-input-bar {
        display: flex;
        gap: 8px;
        padding: 12px 0;
        align-items: flex-end;
        width: 100%;
        margin: 0;
    }
}

.chat-date-separator {
    text-align: center;
    margin: 16px 0 8px;
    font-size: 12px;
    color: var(--on-surface-variant);
    position: relative;
}

.chat-date-separator span {
    background: var(--surface);
    padding: 2px 12px;
    border-radius: 12px;
    background: var(--surface-variant);
    font-weight: 500;
}

.chat-bubble {
    max-width: min(80%, 480px);
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.chat-bubble.client {
    background: var(--primary);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble.admin {
    background: var(--surface-card);
    border: 1px solid #E0E0E0;
    color: var(--on-surface);
    border-bottom-left-radius: 4px;
}

.chat-bubble .time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
}

.chat-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 6px;
    cursor: pointer;
    object-fit: cover;
}

.chat-image-preview {
    position: relative;
    padding: 8px;
    background: var(--surface-variant);
    border-radius: 12px 12px 0 0;
}

.chat-image-preview img {
    max-height: 120px;
    border-radius: 8px;
    object-fit: cover;
}

.chat-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-icon-outline {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #E0E0E0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: var(--on-surface-variant);
    transition: var(--transition);
}

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

.chat-input-bar textarea {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #E0E0E0;
    border-radius: 20px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    max-height: 120px;
    outline: none;
    line-height: 1.4;
    overflow-y: auto;
}

.chat-input-bar textarea:focus {
    border-color: var(--primary);
}

/* ============================================
   Notifications
   ============================================ */
.notification-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--surface-card);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}
.notification-card.unread { border-left: 3px solid var(--primary); }
.notification-card .notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notification-card.unread .notif-icon { background: var(--primary-container); color: var(--primary); }
.notification-card:not(.unread) .notif-icon { background: var(--surface-variant); color: var(--on-surface-variant); }

/* ============================================
   Dialogs
   ============================================ */
.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: 200;
    animation: fadeOverlay 0.2s ease;
    padding: 24px;
}
@keyframes fadeOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}
.dialog {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    animation: slideUp 0.25s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-container);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 24px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.spinner-small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--on-surface-variant);
}
.empty-state .mi { font-size: 56px; opacity: 0.3; display: block; margin-bottom: 16px; }

/* ============================================
   Success Animation
   ============================================ */
.success-check {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: bounceIn 0.5s ease;
}
.success-check .mi { font-size: 56px; color: white; }
@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ============================================
   Toast
   ============================================ */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--on-surface);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    z-index: 300;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s;
    pointer-events: none;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CCC; border-radius: 4px; }

/* ============================================
   Responsive
   ============================================ */
/* ============================================
   App Shell (Preact)
   ============================================ */
.app-shell {
    min-height: 100vh;
    position: relative;
}
.screen-container {
    min-height: 100vh;
}

/* ============================================
   Auth Screens
   ============================================ */
.auth-logo {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 28px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}
.auth-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.auth-logo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(46, 125, 50, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Glass Card
   ============================================ */
.glass-card {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 32px 24px;
    width: 100%;
}

/* ============================================
   Step Bar (Register)
   ============================================ */
.step-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.step-bar .step-dot {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #E0E0E0;
    transition: background var(--transition);
}
.step-bar .step-dot.active {
    background: var(--primary);
}

/* ============================================
   Waiting Call Card
   ============================================ */
.waiting-call-card {
    text-align: center;
    padding: 32px 16px;
}

/* ============================================
   Active Booking Card
   ============================================ */
.active-booking-card {
    border: 2px solid var(--primary-light);
    background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
    margin-bottom: 20px;
}
.scheduled-booking-card {
    border: 2px solid #BDBDBD;
    background: linear-gradient(135deg, #F5F5F5, #EEEEEE);
    margin-bottom: 20px;
}

/* ============================================
   Checkbox Row
   ============================================ */
.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

/* ============================================
   Slide Up Animation
   ============================================ */
.slide-up {
    animation: slideUpIn 0.3s ease;
}
@keyframes slideUpIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Spin Animation (door opening)
   ============================================ */
.spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    #app { max-width: 100%; }
}

/* ============================================
   Tablet (768px+)
   ============================================ */
@media (min-width: 768px) {
    #app {
        max-width: none;
    }

    .screen {
        padding: 32px;
        padding-bottom: 100px;
    }

    .screen-auth {
        padding-top: 80px;
        justify-content: center;
    }

    .glass-card {
        max-width: 440px;
        padding: 40px 32px;
    }

    .slots-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }

    .home-hero {
        padding: 32px;
    }

    .home-hero .hero-title { font-size: 24px; }
    .home-hero .hero-price { font-size: 28px; }

    .bottom-nav {
        max-width: 700px;
    }

    .dialog {
        max-width: 480px;
    }

    .door-circle {
        width: 220px;
        height: 220px;
    }

    .door-circle .mi { font-size: 80px; }

    .chat-bubble { max-width: 65%; }
}

/* ============================================
   Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    #app {
        max-width: 100%;
        display: flex;
        flex-direction: row;
    }

    /* Side navigation for desktop */
    .app-shell {
        display: flex;
        flex-direction: row;
        min-height: 100vh;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
    }

    /* Remove width limit for chat screen */
    .app-shell:has(.chat-container) {
        max-width: none;
    }

    .bottom-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 220px;
        max-width: 220px;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        padding: 32px 12px;
        gap: 4px;
        border-top: none;
        border-right: 1px solid #E0E0E0;
        transform: none;
        z-index: 100;
    }

    .nav-item {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 12px;
        width: 100%;
    }

    .nav-item.active {
        background: var(--primary-container);
    }

    .nav-item .mi { font-size: 24px; }

    .screen-container {
        flex: 1;
        margin-left: 220px;
        min-height: 100vh;
        max-width: 900px;
    }

    /* Remove width limit for chat screen */
    .screen-container:has(.chat-container) {
        max-width: none;
    }

    .screen {
        padding: 28px 40px;
        padding-bottom: 28px;
        min-height: 100vh;
    }

    /* Remove padding for chat screen */
    .screen:has(.chat-container) {
        padding: 0;
    }

    .screen-auth {
        margin-left: 0;
        padding-top: 60px;
    }

    /* Auth screens should be centered, no sidebar offset */
    .app-shell:not(:has(.bottom-nav)) .screen-container {
        margin-left: 0;
        max-width: 100%;
        display: flex;
        justify-content: center;
    }

    .glass-card {
        max-width: 480px;
        padding: 48px 36px;
    }

    /* Booking page: two-column layout on desktop */
    .booking-desktop-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        align-items: start;
    }

    .booking-desktop-layout .calendar {
        margin-bottom: 0;
        padding: 14px;
    }

    .booking-desktop-layout .calendar-day {
        aspect-ratio: unset;
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .booking-desktop-layout .calendar-header {
        margin-bottom: 8px;
    }

    .booking-desktop-layout .calendar-header h3 {
        font-size: 15px;
    }

    .booking-desktop-layout .calendar-weekdays {
        margin-bottom: 4px;
    }

    .booking-desktop-layout .calendar-weekdays span {
        font-size: 11px;
        padding: 2px;
    }

    .booking-desktop-right {
        display: flex;
        flex-direction: column;
    }

    .slots-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 6px;
    }

    .slot {
        padding: 8px 4px;
        font-size: 12px;
    }

    .screen-header {
        margin-bottom: 16px;
    }

    .slot-legend {
        margin-bottom: 10px;
    }

    .booking-summary {
        width: 100%;
        padding: 16px;
        margin-bottom: 12px;
    }

    .booking-summary-row {
        padding: 4px 0;
    }

    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .quick-action {
        padding: 24px 16px;
    }

    .home-hero {
        padding: 36px;
    }

    .home-hero .hero-title { font-size: 26px; }
    .home-hero .hero-price { font-size: 32px; }

    .home-greeting h1 { font-size: 30px; }

    .booking-card {
        padding: 20px;
    }

    .booking-card .booking-info .date { font-size: 16px; }

    .calendar {
        padding: 20px;
    }

    .chat-container {
        height: calc(100vh - 80px);
    }

    .chat-bubble { max-width: 50%; }

    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 44px;
    }

    .toast {
        bottom: 40px;
    }

    .door-circle {
        width: 240px;
        height: 240px;
    }

    .door-circle .mi { font-size: 88px; }

    .card-preview {
        max-width: 400px;
        margin: 0 auto 20px;
    }

    .empty-state {
        padding: 64px 32px;
    }
}

/* ============================================
   Wide Desktop (1440px+)
   ============================================ */
@media (min-width: 1440px) {
    .app-shell {
        max-width: 1400px;
    }

    .bottom-nav {
        width: 260px;
        max-width: 260px;
        padding: 40px 16px;
    }

    .nav-item {
        padding: 14px 20px;
        font-size: 15px;
    }

    .screen-container {
        margin-left: 260px;
        max-width: 1000px;
    }

    .screen {
        padding: 48px 64px;
    }

    .slots-grid {
        grid-template-columns: repeat(8, 1fr);
    }

    .booking-desktop-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        gap: 20px;
    }

    .booking-desktop-layout .calendar-day {
        width: 40px;
        height: 40px;
    }
}

/* Extend booking */
.btn-extend {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    justify-content: center;
}
.btn-extend:hover {
    background: var(--primary-container, rgba(76,175,80,0.08));
}

.extend-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.extend-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border: 1.5px solid var(--outline, #ddd);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
}
.extend-option:hover {
    border-color: var(--primary);
}
.extend-option.selected {
    border-color: var(--primary);
    background: var(--primary-container, rgba(76,175,80,0.08));
    font-weight: 600;
}
.extend-label {
    color: var(--on-surface, #333);
}
.extend-price {
    color: var(--secondary, #666);
    font-size: 13px;
}

.toast-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}
.toast-inline.toast-success {
    background: var(--primary-container, rgba(76,175,80,0.1));
    color: var(--primary, #2E7D32);
}

/* ============================================
   Page Transitions
   ============================================ */
.screen-container {
    animation: screenContainerIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Dynamic Pricing Badge
   ============================================ */
.price-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.price-badge.peak {
    background: #FFF3E0;
    color: #E65100;
}
.price-badge.offpeak {
    background: #E8F5E9;
    color: var(--primary-dark);
}
.price-badge.discount {
    background: #E3F2FD;
    color: #1565C0;
}

/* ============================================
   Booking Flow Steps
   ============================================ */
.booking-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
    padding: 16px 12px;
    background: var(--surface-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}
.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 64px;
}
.flow-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.flow-step-icon.done {
    background: var(--primary);
    color: white;
}
.flow-step-icon.current {
    background: var(--secondary);
    color: white;
    box-shadow: 0 0 0 4px rgba(255,143,0,0.2);
    animation: flowPulse 2s infinite;
}
.flow-step-icon.upcoming {
    background: var(--surface-variant);
    color: var(--on-surface-variant);
}
@keyframes flowPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255,143,0,0.2); }
    50% { box-shadow: 0 0 0 8px rgba(255,143,0,0.1); }
}
.flow-step-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--on-surface-variant);
    text-align: center;
    line-height: 1.2;
}
.flow-arrow {
    color: #CCC;
    font-size: 16px;
    margin: 0 2px;
    flex-shrink: 0;
}

/* ============================================
   Waitlist & Nearby Slots
   ============================================ */
.waitlist-card {
    background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
    border: 1px solid var(--pending);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}
.nearby-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.nearby-slot {
    padding: 8px 14px;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--primary);
    font-family: inherit;
}
.nearby-slot:hover {
    background: var(--primary);
    color: white;
}

/* ============================================
   Reschedule Bonus
   ============================================ */
.reschedule-bonus {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-md);
    margin-top: 12px;
    font-size: 13px;
    color: var(--primary-dark);
    cursor: pointer;
    transition: all var(--transition);
}
.reschedule-bonus:hover {
    box-shadow: var(--shadow-sm);
}

/* ============================================
   Security: CSP banner
   ============================================ */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #E8F5E9;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 500;
}

/* ============================================
   Access Code Masking
   ============================================ */
.password-masked {
    position: relative;
    cursor: pointer;
}
.password-masked .mask-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    gap: 6px;
    transition: opacity 0.3s;
}

/* ============================================
   Legal screen Requisites
   ============================================ */
.requisites-grid {
    display: grid;
    gap: 12px;
}
.requisite-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #F0F0F0;
    gap: 12px;
}
.requisite-row:last-child { border-bottom: none; }
.requisite-label {
    font-size: 13px;
    color: var(--on-surface-variant);
    flex-shrink: 0;
    min-width: 80px;
}
.requisite-value {
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* ============================================
   Slots searching animation
   ============================================ */
.slots-searching-anim {
    display: flex;
    gap: 8px;
    align-items: center;
}
.slots-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary, #2e7d32);
    animation: slots-bounce 1.2s ease-in-out infinite;
}
.slots-dot:nth-child(2) { animation-delay: 0.2s; }
.slots-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes slots-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ============================================
   Chat screen — robust layout without :has()
   ============================================ */
.chat-screen {
    display: flex !important;
    flex-direction: column !important;
    height: 100svh !important;
    min-height: 0 !important;
    max-height: 100svh !important;
    padding: 0 !important;
    overflow: hidden !important;
    animation: none !important;
}
@media (max-width: 767px) {
    .chat-screen {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        height: 100svh !important;
        min-height: 0 !important;
        max-height: 100svh !important;
        z-index: 1000;
    }
    .chat-screen .chat-input-bar {
        position: relative !important;
        bottom: auto !important;
    }
    html.chat-open { overflow: hidden !important; height: 100% !important; }
    body.chat-open { overflow: hidden !important; position: fixed !important; top: 0; left: 0; right: 0; bottom: 0; width: 100% !important; height: 100% !important; }
}
.chat-screen .screen-header {
    flex-shrink: 0;
    padding: 12px 16px;
    background: var(--surface);
}
.chat-screen .chat-container {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}
.chat-screen .chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px 12px;
}
.chat-screen .chat-input-bar {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: var(--surface);
    border-top: 1px solid #E5E7EB;
    padding: 8px 12px;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    z-index: 10;
}

/* Desktop: centered card (cloud) over soft backdrop */
@media (min-width: 768px) {
    .chat-screen {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw !important;
        height: 100svh !important;
        min-height: 0 !important;
        max-height: 100svh !important;
        z-index: 1000;
        padding: 32px !important;
        background: radial-gradient(1200px 600px at 50% -10%, rgba(46,125,50,0.12), transparent 60%),
                    linear-gradient(180deg, #f3f6f4 0%, #eaf1ec 100%) !important;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
    }
    .chat-screen .screen-header {
        width: min(770px, 100%);
        margin: 0 auto;
        background: transparent;
        padding: 4px 8px 12px;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .chat-screen .chat-container {
        width: min(770px, 100%) !important;
        max-width: min(770px, 100%) !important;
        margin: 0 auto !important;
        background: #ffffff !important;
        border-radius: 20px !important;
        box-shadow: 0 24px 60px -20px rgba(24, 50, 30, 0.25),
                    0 8px 24px -12px rgba(24, 50, 30, 0.15) !important;
        border: 1px solid rgba(46, 125, 50, 0.08) !important;
        overflow: hidden !important;
        flex: 1 1 auto;
        min-height: 0;
        height: auto !important;
    }
    .chat-screen .chat-messages {
        padding: 24px 32px;
        background: linear-gradient(180deg, #ffffff 0%, #fafcfa 100%);
    }
    .chat-screen .chat-input-bar {
        padding: 12px 20px;
        border-top: 1px solid #eef2ef;
        background: #ffffff;
    }
    .chat-bubble { max-width: 70% !important; }
}

/* ============================================
   Smooth entrance animations — fast, subtle
   ============================================ */
@keyframes cardPop {
    from { opacity: 0; transform: translateY(6px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.card-pop {
    animation: cardPop 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    will-change: transform, opacity;
}
.fade-slide {
    animation: fadeSlide 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
/* Auto-apply to the critical attention-grabbing cards so they slide in,
   not pop. Kept snappy (~220ms) to avoid feeling sluggish. */
.active-booking-card,
.pending-payment-card,
.waitlist-card {
    animation: cardPop 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .card-pop, .fade-slide,
    .active-booking-card, .pending-payment-card, .waitlist-card {
        animation: none !important;
    }
}


/* === Cookie consent banner === */
#igro-cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    pointer-events: none;
    animation: cookieSlideUp 360ms cubic-bezier(.2,.8,.2,1);
}
#igro-cookie-banner.cookie-banner-hide {
    animation: cookieSlideDown 240ms ease-in forwards;
}
.cookie-banner-card {
    pointer-events: auto;
    background: #ffffff;
    border: 1px solid rgba(46, 125, 50, 0.18);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18), 0 4px 10px rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 16px 18px;
    max-width: 540px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cookie-banner-text {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.55;
}
.cookie-banner-link { background: transparent; border: none; cursor: pointer; padding: 0; font: inherit; 
    color: #2E7D32;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
    white-space: nowrap;
}
.cookie-banner-link:hover { text-decoration: underline; }
.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cookie-banner-btn {
    flex: 1 1 140px;
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s, box-shadow .15s, background .15s;
    font-family: inherit;
}
.cookie-banner-btn:active { transform: translateY(1px); }
.cookie-banner-accept {
    background: #2E7D32;
    color: #fff;
    box-shadow: 0 4px 12px rgba(46,125,50,.28);
}
.cookie-banner-accept:hover { background: #1B5E20; box-shadow: 0 6px 18px rgba(46,125,50,.36); }
.cookie-banner-reject {
    background: #f1f5f9;
    color: #334155;
}
.cookie-banner-reject:hover { background: #e2e8f0; color: #0f172a; }

@keyframes cookieSlideUp {
    from { transform: translateY(140%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@keyframes cookieSlideDown {
    from { transform: translateY(0); opacity: 1; }
    to   { transform: translateY(120%); opacity: 0; }
}
@media (max-width: 480px) {
    #igro-cookie-banner { left: 8px; right: 8px; bottom: 8px; }
    .cookie-banner-card { padding: 14px 14px; border-radius: 14px; }
    .cookie-banner-text { font-size: 13px; }
}

/* ============================================ */
/* NEOGLASS LOGIN — new.igrorum.ru               */
/* ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

.screen-neoglass-login {
    position: fixed; inset: 0; overflow: hidden;
    background: #0e1a12; color: #fff;
    font-family: 'Manrope','Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    -webkit-font-smoothing: antialiased;
}
.screen-neoglass-login button {
    font-family: inherit; cursor: pointer; border: 0; color: inherit; background: transparent;
}
.screen-neoglass-login input {
    font-family: inherit; outline: none; color: inherit; border: 0;
}

.screen-neoglass-login .ng-bg {
    position: absolute; inset: 0; overflow: hidden; background: #0e1a12;
}
.screen-neoglass-login .ng-blob {
    position: absolute; border-radius: 50%; filter: blur(50px); pointer-events: none;
}
.screen-neoglass-login .ng-b1 { width: 280px; height: 280px; background: #4ade80; top: -100px; left: -80px; opacity: .5; }
.screen-neoglass-login .ng-b2 { width: 220px; height: 220px; background: #a3e635; bottom: 200px; right: -60px; opacity: .35; }
.screen-neoglass-login .ng-b3 { width: 300px; height: 300px; background: #16a34a; bottom: -120px; left: 20%; opacity: .45; }
.screen-neoglass-login .ng-grain {
    position: absolute; inset: 0; opacity: .15; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

.screen-neoglass-login .lg-content {
    position: absolute; inset: 0;
    padding: 60px 22px 30px;
    display: flex; flex-direction: column;
    z-index: 5;
    max-width: 420px; margin: 0 auto;
    overflow-y: auto;
}
.screen-neoglass-login .lg-brand {
    font-size: 11px; font-weight: 800; letter-spacing: 4px; text-transform: uppercase;
    color: rgba(255,255,255,.6); text-align: center;
}
.screen-neoglass-login .lg-greet {
    margin-top: auto;
    color: #fff; font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1.05;
    margin-bottom: 6px;
}
.screen-neoglass-login .lg-greet b {
    background: linear-gradient(135deg,#bef264,#4ade80);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.screen-neoglass-login .lg-sub {
    color: rgba(255,255,255,.6); font-size: 14px; margin-bottom: 22px;
}
.screen-neoglass-login .lg-glass {
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 22px;
    padding: 22px 18px;
    box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.screen-neoglass-login .lg-tabs {
    display: flex; background: rgba(0,0,0,.3); border-radius: 12px; padding: 4px;
    margin-bottom: 14px;
}
.screen-neoglass-login .lg-tabs button {
    flex: 1; padding: 10px; border-radius: 9px; font-size: 13px; font-weight: 700;
    color: rgba(255,255,255,.55); transition: background 150ms, color 150ms;
}
.screen-neoglass-login .lg-tabs button.active {
    background: rgba(255,255,255,.13); color: #fff;
}
.screen-neoglass-login .lg-input {
    width: 100%; background: rgba(0,0,0,.25);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 13px; padding: 14px 16px;
    color: #fff; font-size: 15px; margin-bottom: 8px;
    box-sizing: border-box;
}
.screen-neoglass-login .lg-input::placeholder { color: rgba(255,255,255,.4); }
.screen-neoglass-login .lg-input:focus { border-color: rgba(190,242,100,.5); }
.screen-neoglass-login .lg-error {
    color: #ff7a7a; font-size: 13px; padding: 6px 4px 0; font-weight: 600;
}
.screen-neoglass-login .lg-cta {
    width: 100%; padding: 15px;
    background: linear-gradient(135deg,#bef264,#4ade80);
    color: #0e1a12; border-radius: 13px;
    font-size: 15px; font-weight: 800; letter-spacing: -.2px;
    margin-top: 6px;
    box-shadow: 0 10px 28px rgba(190,242,100,.3);
    transition: transform 80ms, box-shadow 150ms;
}
.screen-neoglass-login .lg-cta:active { transform: scale(.98); }
.screen-neoglass-login .lg-cta:disabled { opacity: .6; cursor: wait; }
.screen-neoglass-login .lg-forgot {
    display: block; width: 100%; text-align: center;
    margin-top: 12px; padding: 6px;
    color: rgba(255,255,255,.55); font-size: 13px;
}
.screen-neoglass-login .lg-forgot:hover { color: #bef264; }
.screen-neoglass-login .lg-bottom {
    text-align: center; margin-top: 24px;
    color: rgba(255,255,255,.7); font-size: 13px;
}
.screen-neoglass-login .lg-bottom a {
    color: #bef264; font-weight: 800; text-decoration: none; margin-left: 4px; cursor: pointer;
}
.screen-neoglass-login .lg-legal {
    text-align: center; margin-top: auto; padding-top: 18px;
    color: rgba(255,255,255,.4); font-size: 11px;
}
.screen-neoglass-login .lg-legal a {
    color: rgba(255,255,255,.55);
    text-decoration: underline; text-underline-offset: 2px;
    margin: 0 6px; cursor: pointer;
}
