/* ============================================
   BOOKING — DARK TEAL EDITION v2.0 (COMPACT)
   Mobile-First | Font 12px | Dark Teal Theme
   ============================================ */

:root {
    --primary: #0D9488;
    --primary-hover: #0F766E;
    --primary-deep: #115E59;
    --primary-light: #CCFBF1;
    --primary-soft: #99F6E4;
    --primary-ink: linear-gradient(135deg, #0F766E 0%, #134E4A 100%);
    --success: #10B981;
    --success-light: #ECFDF5;
    --success-text: #065F46;
    --warning: #F59E0B;
    --warning-light: #FFFBEB;
    --warning-text: #92400E;
    --danger: #EF4444;
    --danger-light: #FEF2F2;
    --danger-text: #991B1B;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --info-text: #1E40AF;
    --bg-body: #FAFBFC;
    --bg-surface: #FFFFFF;
    --bg-surface-active: #F1F5F9;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --text-white: #FFFFFF;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-teal: 0 4px 12px rgba(13, 148, 136, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --ease: all 0.2s ease;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
html { overscroll-behavior-y: none; scroll-behavior: smooth; }

body {
    font-family: var(--font-ui);
    font-size: 12px;
    background: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

.booking-container { max-width: 560px; margin: 0 auto; padding: 12px; padding-top: calc(12px + env(safe-area-inset-top)); }

/* ============ HEADER ============ */
.booking-header {
    background: var(--primary-ink);
    color: var(--text-white);
    padding: 22px 18px;
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
    text-align: center;
    box-shadow: var(--shadow-teal);
    position: relative;
    overflow: hidden;
}
.booking-header::before {
    content: ''; position: absolute; top: -50%; right: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.booking-logo {
    width: 56px; height: 56px; margin: 0 auto 12px; background: rgba(255, 255, 255, 0.15);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; backdrop-filter: blur(10px); border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden; position: relative; z-index: 1; color: var(--text-white);
}
.booking-logo img { width: 100%; height: 100%; object-fit: cover; }
.booking-header h1 { font-size: 17px; font-weight: 800; margin-bottom: 4px; position: relative; z-index: 1; letter-spacing: -0.02em; color: var(--text-white); }
.booking-header p { font-size: 11px; opacity: 0.9; position: relative; z-index: 1; font-weight: 500; color: var(--text-white); }

/* ============ CABANG ============ */
.cabang-selector {
    background: var(--bg-surface); border-radius: var(--radius-md); padding: 12px; margin-bottom: 12px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.cabang-selector label { display: block; font-size: 10px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.cabang-selector select {
    width: 100%; padding: 10px 32px 10px 12px; font-size: 12px; font-family: inherit; font-weight: 600;
    color: var(--text-main); background: var(--bg-body); border: 1px solid var(--border); 
    border-radius: var(--radius-sm); outline: none; transition: var(--ease);
    min-height: 40px; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230D9488'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
}
.cabang-selector select:active { transform: scale(0.98); background-color: var(--bg-surface-active); }
.cabang-selector select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.cabang-info {
    background: var(--bg-surface); border-radius: var(--radius-md); padding: 12px; margin-bottom: 14px;
    box-shadow: var(--shadow-sm); display: flex; gap: 10px; align-items: center;
    border-left: 3px solid var(--primary); border: 1px solid var(--border);
}
.cabang-icon {
    width: 40px; height: 40px; background: var(--primary-light); color: var(--primary);
    border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.cabang-details { flex: 1; min-width: 0; }
.cabang-name { font-size: 13px; font-weight: 700; color: var(--text-main); margin-bottom: 3px; }
.cabang-meta { font-size: 10.5px; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.cabang-meta span { display: flex; align-items: center; gap: 4px; }
.cabang-meta i { color: var(--primary); font-size: 10px; }

/* ============ FORM CARDS ============ */
.form-card {
    background: var(--bg-surface); border-radius: var(--radius-lg); padding: 14px;
    margin-bottom: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    position: relative;
}
.form-card-title {
    font-size: 12px; font-weight: 700; color: var(--text-main); margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light);
}
.form-card-title i { color: var(--primary); font-size: 13px; }
.form-card-title .step {
    width: 22px; height: 22px; background: var(--primary-ink); color: var(--text-white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-hint-inline { font-size: 10px; color: var(--text-light); font-weight: 400; margin-left: 4px; font-style: italic; text-transform: none; letter-spacing: 0; }

.form-control {
    width: 100%; padding: 10px 12px; font-size: 16px; /* Tetap 16px untuk hindari iOS zoom */
    font-family: inherit; color: var(--text-main);
    background: var(--bg-body); border: 1px solid var(--border); border-radius: var(--radius-sm);
    outline: none; transition: var(--ease); min-height: 40px;
}
.form-control:active { background: var(--bg-surface-active); }
.form-control:focus { border-color: var(--primary); background: var(--bg-surface); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control:disabled, .form-control[readonly] { opacity: 0.7; cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 70px; }

.input-wrapper { position: relative; }
.input-icon-right {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    color: var(--primary); font-size: 14px; pointer-events: none;
}

/* ============ CUSTOMER STATUS ============ */
.customer-status {
    display: flex; align-items: center; gap: 10px; padding: 10px;
    background: var(--bg-body); border-radius: var(--radius-sm); margin-bottom: 10px;
    border-left: 3px solid var(--primary); animation: slideDown 0.25s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.customer-status.found { background: var(--success-light); border-left-color: var(--success); }
.customer-status.not-found { background: var(--info-light); border-left-color: var(--info); }
.customer-status.loading { background: var(--warning-light); border-left-color: var(--warning); }

.customer-status-icon {
    width: 36px; height: 36px; background: var(--bg-surface); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; color: var(--primary);
}
.customer-status.found .customer-status-icon { background: var(--success); color: var(--text-white); }
.customer-status.not-found .customer-status-icon { background: var(--info); color: var(--text-white); }
.customer-status.loading .customer-status-icon { background: var(--warning); color: var(--text-white); }

.customer-status-info { flex: 1; min-width: 0; }
.customer-status-text { font-size: 12px; font-weight: 700; color: var(--text-main); margin-bottom: 2px; }
.customer-status.found .customer-status-text { color: var(--success-text); }
.customer-status.not-found .customer-status-text { color: var(--info-text); }
.customer-status.loading .customer-status-text { color: var(--warning-text); }

.customer-status-detail { font-size: 10px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.customer-status-detail span { display: inline-flex; align-items: center; gap: 4px; }
.customer-status-detail i { font-size: 9px; }
.customer-status-detail .tier-badge {
    padding: 2px 6px; background: var(--warning-light); color: var(--warning-text);
    border-radius: 12px; font-weight: 700; font-size: 9px;
}
/* ✅ Tambahan untuk input states */
.form-control[readonly] {
    background: var(--success-light) !important;
    color: var(--success-text);
    font-weight: 600;
    cursor: not-allowed;
}

.form-control[readonly]:focus {
    border-color: var(--success);
    box-shadow: 0 0 0 3px var(--success-light);
}

/* Hint states - warna dinamis berdasarkan status */
.form-hint-inline.success { color: var(--success) !important; }
.form-hint-inline.warning { color: var(--warning) !important; }
.form-hint-inline.info { color: var(--info) !important; }

/* ✅ Search indicator yang lebih smooth */
.input-icon-right {
    transition: opacity 0.2s ease;
}

.input-icon-right i {
    animation: spinSmooth 0.8s linear infinite;
}

@keyframes spinSmooth {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ✅ Customer status transition */
.customer-status {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* ✅ Suggestions dengan max-height untuk mobile */
.suggestions-list {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.suggestions-list::-webkit-scrollbar {
    width: 4px;
}

.suggestions-list::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 2px;
}

/* ✅ Loading state yang tidak mengganggu layout */
.customer-status.loading {
    min-height: 56px;
}

/* ✅ Input focus ring untuk accessibility */
.form-control:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

/* ✅ Better visual hierarchy untuk form labels */
.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.form-hint-inline {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color 0.2s ease;
}

.form-hint-inline i {
    font-size: 9px;
}

.customer-suggestions {
    background: var(--bg-body); border-radius: var(--radius-sm); padding: 10px;
    margin-bottom: 10px; border: 1px solid var(--border); animation: slideDown 0.25s ease;
}
.suggestions-title { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.suggestions-title i { color: var(--primary); }
.suggestions-list { display: flex; flex-direction: column; gap: 6px; }

.suggestion-item {
    display: flex; align-items: center; gap: 10px; padding: 10px;
    background: var(--bg-surface); border: 1px solid transparent; border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--ease);
}
.suggestion-item:active { transform: scale(0.98); background: var(--bg-surface-active); }
.suggestion-item.selected { border-color: var(--primary); background: var(--primary-light); }

.suggestion-avatar {
    width: 36px; height: 36px; background: var(--primary); color: var(--text-white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-name { font-size: 12px; font-weight: 600; color: var(--text-main); margin-bottom: 2px; }
.suggestion-meta { font-size: 10px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.suggestion-meta span { display: inline-flex; align-items: center; gap: 3px; }
.suggestion-meta i { font-size: 9px; color: var(--primary); }

/* ============ BARBER ============ */
.barber-grid { 
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch; gap: 8px; padding-bottom: 6px; scrollbar-width: none; 
}
.barber-grid::-webkit-scrollbar { display: none; }

.barber-option {
    min-width: 105px; scroll-snap-align: start; flex-shrink: 0;
    padding: 12px 8px; background: var(--bg-body); border: 1px solid var(--border);
    border-radius: var(--radius-md); cursor: pointer; transition: var(--ease); text-align: center;
    min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.barber-option:active { transform: scale(0.96); background: var(--bg-surface-active); }
.barber-option.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: var(--shadow-teal); }
.barber-option input { display: none; }

.barber-avatar {
    width: 44px; height: 44px; margin: 0 auto 8px; background: var(--primary-light); color: var(--primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; overflow: hidden; border: 2px solid var(--border);
}
.barber-avatar img { width: 100%; height: 100%; object-fit: cover; }
.barber-name { font-size: 11.5px; font-weight: 700; color: var(--text-main); margin-bottom: 2px; line-height: 1.2; }
.barber-specialty { font-size: 9.5px; color: var(--text-muted); }

/* Barber "skip" option — biarkan admin yang tentukan */
.barber-option.skip-option {
    min-width: 140px;
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    position: relative;
}
.barber-option.skip-option .barber-avatar {
    background: var(--info-light);
    color: var(--info);
    border-color: var(--info-light);
}
.barber-option.skip-option.selected {
    border-color: var(--info);
    border-style: solid;
    background: var(--info-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.barber-option.skip-option .barber-name { color: var(--info-text); }
.barber-option.skip-option .barber-specialty { color: var(--text-muted); font-style: italic; }

.barber-hint {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
    padding: 6px 10px;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--border-light);
}
.barber-hint i { color: var(--primary); font-size: 10px; margin-right: 3px; }

/* ============ CATEGORY CHIPS ============ */
.category-chips-container {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 8px 0 10px 0; margin: 0 0 10px 0;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.category-chips {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; padding: 0 2px;
}
.category-chips::-webkit-scrollbar { display: none; }

.category-chip {
    flex-shrink: 0; padding: 7px 12px;
    background: var(--bg-body); border: 1px solid var(--border);
    border-radius: 18px; font-size: 10.5px; font-weight: 600; color: var(--text-muted);
    cursor: pointer; transition: var(--ease); white-space: nowrap;
    font-family: inherit; display: flex; align-items: center; gap: 4px;
    -webkit-tap-highlight-color: transparent;
}
.category-chip:active { transform: scale(0.95); }
.category-chip.active {
    background: var(--primary); color: var(--text-white);
    border-color: var(--primary); box-shadow: var(--shadow-teal);
}
.category-chip i { font-size: 10px; }

.layanan-option.hidden { display: none !important; }
.layanan-option { animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

.layanan-list { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; }

.layanan-option {
    position: relative; display: flex; align-items: center;
    padding: 12px; background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); cursor: pointer; transition: var(--ease);
    width: 100%; box-sizing: border-box;
}
.layanan-option:active { transform: scale(0.98); background: var(--bg-surface-active); }
.layanan-option.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: var(--shadow-teal); }
.layanan-option input { display: none; }

.layanan-checkbox {
    position: absolute; top: 12px; right: 12px; width: 18px; height: 18px;
    border: 1.5px solid var(--border); border-radius: 50%; background: var(--bg-surface);
    display: flex; align-items: center; justify-content: center; color: var(--text-white); transition: var(--ease);
}
.layanan-option.selected .layanan-checkbox { background: var(--primary); border-color: var(--primary); transform: scale(1.1); }
.layanan-checkbox i { font-size: 9px; opacity: 0; transition: opacity 0.2s ease; color: white; }
.layanan-option.selected .layanan-checkbox i { opacity: 1; }

.layanan-icon-wrapper {
    width: 36px; height: 36px; background: var(--primary-light); color: var(--primary);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 15px; margin-right: 10px; flex-shrink: 0; transition: var(--ease);
}
.layanan-option.selected .layanan-icon-wrapper { background: var(--primary); color: var(--text-white); }

.layanan-info { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-right: 28px; }
.layanan-name { font-size: 12px; font-weight: 700; color: var(--text-main); margin-bottom: 2px; line-height: 1.3; }
.layanan-meta { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.layanan-meta i { color: var(--primary); font-size: 10px; }
.layanan-price { font-size: 12px; font-weight: 800; color: var(--primary); text-align: right; flex-shrink: 0; margin-left: 6px; }

/* ============ SCHEDULE ============ */
.schedule-info {
    padding: 10px; background: var(--info-light); border-radius: var(--radius-sm);
    margin-top: 10px; font-size: 11px; color: var(--info-text); border-left: 3px solid var(--info);
    display: flex; align-items: center; gap: 8px;
}
.schedule-info.error { background: var(--warning-light); border-left-color: var(--warning); color: var(--warning-text); }
.schedule-info i { font-size: 13px; flex-shrink: 0; }

.time-slots { 
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch; gap: 6px; margin-top: 10px; padding-bottom: 6px; scrollbar-width: none;
}
.time-slots::-webkit-scrollbar { display: none; }

.time-slot {
    min-width: 68px; scroll-snap-align: start; flex-shrink: 0;
    padding: 10px 6px; background: var(--bg-body); border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer; transition: var(--ease);
    text-align: center; font-size: 11.5px; font-weight: 600; color: var(--text-main);
    min-height: 36px; display: flex; align-items: center; justify-content: center;
}
.time-slot:active { transform: scale(0.95); }
.time-slot.selected { background: var(--primary); color: var(--text-white); border-color: var(--primary); font-weight: 700; box-shadow: var(--shadow-teal); }
.time-slot input { display: none; }
.time-slot.disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.time-slot.disabled:active { transform: none; }

.no-slots {
    padding: 18px; text-align: center; color: var(--warning-text); font-size: 12px; font-weight: 500;
    background: var(--warning-light); border-radius: var(--radius-md); 
    display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* ============ SUMMARY & SUBMIT ============ */
.summary-card {
    background: var(--bg-surface); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 100px;
    border: 1.5px solid var(--primary); box-shadow: var(--shadow-teal);
}
.summary-title { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.summary-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 11.5px; }
.summary-label { color: var(--text-muted); }
.summary-value { font-weight: 600; color: var(--text-main); text-align: right; }
.summary-total { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 10px; font-size: 13px; }
.summary-total .summary-value { color: var(--primary); font-size: 16px; font-weight: 800; }

.submit-wrapper {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border); z-index: 100;
    display: flex; justify-content: center;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}
.submit-wrapper-inner { max-width: 560px; width: 100%; }

.btn-submit {
    width: 100%; padding: 12px; background: var(--primary-ink); color: var(--text-white); border: none;
    border-radius: var(--radius-md); font-size: 13px; font-weight: 800; cursor: pointer;
    transition: var(--ease); font-family: inherit; display: flex; align-items: center;
    justify-content: center; gap: 8px; box-shadow: var(--shadow-teal); min-height: 44px;
    letter-spacing: 0.02em;
}
.btn-submit:active:not(:disabled) { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.info-box {
    display: flex; gap: 10px; padding: 10px; background: var(--primary-light);
    border-radius: var(--radius-sm); margin-bottom: 12px; font-size: 11px; color: var(--text-main);
    border: 1px solid var(--primary-soft); line-height: 1.5;
}
.info-box i { color: var(--primary); flex-shrink: 0; margin-top: 1px; font-size: 13px; }

/* ============ LOADING & TOAST ============ */
.loading-state { text-align: center; padding: 24px 16px; color: var(--text-muted); font-size: 12px; }
.loading-state i { font-size: 24px; color: var(--primary); margin-bottom: 8px; }

.toast-container {
    position: fixed; top: calc(16px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 9999;
    display: flex; flex-direction: column; gap: 6px; pointer-events: none; width: 92%; max-width: 380px;
}
.toast {
    background: var(--bg-surface); padding: 10px 12px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
    display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; border-left: 3px solid var(--primary);
    animation: toastSlide 0.25s ease; pointer-events: auto; border: 1px solid var(--border); color: var(--text-main);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }
.toast i { font-size: 15px; flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }
@keyframes toastSlide { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

.loading-overlay {
    display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 9998;
    align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.loading-overlay.active { display: flex; }
.loading-spinner {
    background: var(--bg-surface); padding: 24px 36px; border-radius: var(--radius-lg);
    text-align: center; box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
.loading-spinner i { font-size: 32px; color: var(--primary); margin-bottom: 12px; }
.loading-spinner p { font-size: 12px; color: var(--text-main); font-weight: 600; }

/* ============ FOOTER ============ */
.booking-footer { text-align: center; padding: 18px 12px; font-size: 10px; color: var(--text-light); font-weight: 500; }

/* ============ PWA BANNER ============ */
.pwa-install-banner {
    position: fixed; bottom: calc(72px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    width: calc(100% - 24px); max-width: 480px; background: var(--bg-surface); color: var(--text-main);
    padding: 12px; border-radius: var(--radius-md); box-shadow: var(--shadow-md); z-index: 9997;
    border: 1px solid var(--border); animation: slideUpBanner 0.3s ease;
}
@keyframes slideUpBanner { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

.pwa-banner-content { display: flex; align-items: center; gap: 10px; }
.pwa-banner-icon {
    width: 40px; height: 40px; background: var(--primary-light); color: var(--primary); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; border: 1px solid var(--primary-soft);
}
.pwa-banner-info { flex: 1; min-width: 0; }
.pwa-banner-title { font-size: 12px; font-weight: 700; margin-bottom: 2px; line-height: 1.3; color: var(--text-main); }
.pwa-banner-desc { font-size: 10px; color: var(--text-muted); line-height: 1.4; }
.pwa-banner-actions { display: flex; gap: 6px; flex-shrink: 0; }

.pwa-btn-install {
    padding: 8px 14px; background: var(--primary); color: var(--text-white); border: none;
    border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; cursor: pointer;
    transition: var(--ease); font-family: inherit; display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.pwa-btn-install:active { transform: scale(0.95); }

.pwa-btn-close {
    width: 32px; height: 32px; background: var(--bg-body); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; transition: var(--ease);
    display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.pwa-btn-close:active { background: var(--bg-surface-active); transform: scale(0.95); }

.ios-install-guide {
    position: fixed; bottom: calc(72px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    width: calc(100% - 24px); max-width: 480px; background: var(--bg-surface); border-radius: var(--radius-md);
    box-shadow: var(--shadow-md); z-index: 9997; border: 1px solid var(--border); padding: 14px;
    animation: slideUpBanner 0.3s ease;
}
.ios-guide-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 700; color: var(--text-main); font-size: 12px; }
.ios-guide-header i { font-size: 16px; color: var(--text-main); }
.ios-guide-close { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; }
.ios-guide-steps { list-style: none; counter-reset: step; padding: 0; }
.ios-guide-steps li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11.5px; color: var(--text-muted); counter-increment: step; }
.ios-guide-steps li::before { content: counter(step); width: 20px; height: 20px; background: var(--primary); color: var(--text-white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.ios-guide-steps li strong { color: var(--text-main); }
.ios-guide-steps li i { color: var(--primary); }

/* ============ PDF PREVIEW (hidden) ============ */
.pdf-template {
    position: absolute; left: -9999px; top: -9999px;
    width: 400px; background: white; padding: 24px;
    font-family: var(--font-ui); color: #000;
}
.pdf-header { text-align: center; border-bottom: 2px solid #0D9488; padding-bottom: 12px; margin-bottom: 16px; }
.pdf-logo { font-size: 32px; color: #0D9488; margin-bottom: 4px; }
.pdf-company { font-size: 18px; font-weight: 800; color: #0F172A; margin-bottom: 2px; }
.pdf-branch { font-size: 11px; color: #64748B; }
.pdf-title { font-size: 14px; font-weight: 700; color: #0F766E; margin: 12px 0 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.pdf-code { display: inline-block; background: #CCFBF1; color: #115E59; padding: 6px 12px; border-radius: 6px; font-weight: 800; font-size: 14px; font-family: var(--font-mono); margin-bottom: 12px; }
.pdf-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 11.5px; border-bottom: 1px dashed #E2E8F0; }
.pdf-row:last-child { border-bottom: none; }
.pdf-label { color: #64748B; font-weight: 500; }
.pdf-value { font-weight: 600; color: #0F172A; text-align: right; max-width: 60%; }
.pdf-total { margin-top: 12px; padding: 10px; background: #CCFBF1; border-radius: 8px; }
.pdf-total .pdf-row { border: none; font-size: 14px; }
.pdf-total .pdf-value { color: #0F766E; font-size: 18px; font-weight: 800; }
.pdf-services-list { list-style: none; padding: 0; margin: 4px 0; }
.pdf-services-list li { padding: 4px 0; font-size: 11px; border-bottom: 1px dashed #E2E8F0; display: flex; justify-content: space-between; }
.pdf-services-list li:last-child { border-bottom: none; }
.pdf-notes { padding: 8px; background: #FFFBEB; border-radius: 6px; margin-top: 8px; font-size: 10.5px; color: #92400E; border-left: 3px solid #F59E0B; }
.pdf-footer { text-align: center; margin-top: 20px; padding-top: 12px; border-top: 2px solid #0D9488; font-size: 10px; color: #64748B; line-height: 1.5; }
.pdf-footer strong { color: #0F766E; display: block; margin-bottom: 4px; font-size: 11px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 480px) {
    .booking-container { padding: 10px; padding-bottom: 100px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .booking-header { padding: 18px 14px; border-radius: var(--radius-md); }
    .booking-header h1 { font-size: 15px; }
    .booking-logo { width: 48px; height: 48px; font-size: 20px; }
    .form-hint-inline { display: block; margin-left: 0; margin-top: 4px; }
    .summary-total .summary-value { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}