:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #eef6f2;
    --ink: #172033;
    --muted: #697386;
    --line: #dfe5ef;
    --primary: #14213d;
    --blue: #114285;
    --blue-dark: #0b3064;
    --green: #0f9f6e;
    --danger: #dc2626;
    --shadow: 0 18px 45px rgba(17, 24, 39, .08);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input, select { font: inherit; }

.public-header { height: 74px; padding: 0 max(5vw, 24px); display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--blue); box-shadow: 0 5px 18px rgba(17,66,133,.18); }
.public-header a { text-decoration: none; }
.public-header > a:last-child { padding: 10px 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; font-size: 13px; font-weight: 700; }
.public-brand { display: flex; gap: 12px; align-items: center; }
.public-brand-logo { width: 40px; height: 40px; object-fit: contain; display: block; }

.directory-hero, .booking-hero { padding: 64px max(7vw, 24px); }
.directory-hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; background: linear-gradient(135deg, #eef4ff, #f5f7fb 55%, #e9f8f1); }
.directory-hero h1, .booking-hero h1, .receipt-shell h1 { margin: 12px 0; font-size: clamp(40px, 6vw, 76px); line-height: 1; letter-spacing: -.04em; }
.directory-hero em { color: var(--blue); font-style: normal; }
.directory-hero p { max-width: 600px; color: var(--muted); font-size: 18px; }
.eyebrow, .shop-place, .step { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.directory-hero button, .booking-meta button, .reserve-button { padding: 13px 18px; border: 0; border-radius: 8px; color: #fff; background: var(--blue); font-weight: 700; cursor: pointer; }

.location-filter { margin: 0 max(7vw, 24px) 28px; padding: 20px; display: flex; align-items: end; gap: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.location-filter label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.location-filter select { min-width: 220px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.location-filter > a { padding-bottom: 11px; color: var(--blue); font-size: 13px; font-weight: 700; }

.barbershop-grid { padding: 0 max(7vw, 24px) 70px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.barbershop-card { padding: 22px; display: grid; grid-template-columns: 120px 1fr; gap: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.shop-monogram { min-height: 150px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, var(--blue), var(--blue-dark)); font-size: 36px; font-weight: 800; }
.barbershop-card h2 { margin: 8px 0; font-size: 27px; }
.barbershop-card p { min-height: 42px; color: var(--muted); }
.barbershop-card a { color: var(--blue); font-weight: 800; text-decoration: none; }
.empty-directory { grid-column: 1 / -1; padding: 70px; text-align: center; }

.booking-hero { position: relative; min-height: 360px; display: flex; align-items: center; color: #fff; background: linear-gradient(135deg, var(--blue-dark), var(--blue)); background-size: cover; background-position: center; background-repeat: no-repeat; }
.booking-hero.has-banner { background-image: linear-gradient(180deg, rgba(10,20,40,.30) 0%, rgba(10,20,40,.55) 50%, rgba(10,20,40,.85) 100%), var(--hero-banner); }
.booking-hero-inner { width: 100%; max-width: 1200px; margin: 0 auto; }
.booking-hero > a, .booking-hero-inner > a { color: #cbdcf4; font-size: 13px; }
.booking-hero h1 { margin-bottom: 8px; max-width: 16ch; }
.booking-hero p { max-width: 60ch; color: #cbdcf4; }
.booking-hero.has-banner h1, .booking-hero.has-banner p, .booking-hero.has-banner .eyebrow { text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.booking-meta { margin-top: 25px; display: flex; gap: 10px; flex-wrap: wrap; }
.booking-meta span, .booking-meta button { padding: 11px 15px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; color: #fff; background: rgba(255,255,255,.08); }
.preview-notice { padding: 13px 24px; color: #7c4a03; background: #fff4d6; text-align: center; font-size: 14px; font-weight: 700; }

.booking-shell { padding: 36px max(5vw, 20px); display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; }
.slots-panel, .reserve-panel { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.barber-picker { margin-bottom: 18px; padding: 15px; border-radius: 10px; background: #eef4ff; }
.barber-picker label { display: grid; grid-template-columns: auto minmax(180px, 280px); align-items: center; gap: 14px; color: var(--blue); font-weight: 800; }
.barber-picker select { padding: 11px; border: 1px solid #bfd0ea; border-radius: 8px; color: var(--ink); background: #fff; }
.month-nav { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding-bottom: 15px; border-bottom: 1px solid var(--line); text-align: center; }
.month-nav h2 { margin: 0; }
.month-nav a, .month-nav-disabled { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; text-decoration: none; font-size: 22px; }
.month-nav a { color: #fff; background: var(--blue); }
.month-nav-disabled { color: #aeb7c5; background: #edf0f5; }
.month-nav a:last-child { justify-self: end; }
.slot-days { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.slot-day { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.slot-day h3 { margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; color: var(--blue); text-transform: uppercase; }
.slot-day h3 span { font-size: 25px; }
.slot-day > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.slot { padding: 9px 4px; border: 1px solid var(--line); border-radius: 7px; color: var(--blue); background: #fff; cursor: pointer; }
.slot:hover, .slot.selected { border-color: var(--green); color: #fff; background: var(--green); font-weight: 700; }
.no-slots { grid-column: 1 / -1; padding: 60px 20px; color: var(--muted); text-align: center; }

.reserve-panel h2 { margin-bottom: 5px; }
.reserve-panel > p { color: var(--muted); }
.reserve-panel form, .reserve-panel label { display: grid; gap: 7px; }
.reserve-panel form { gap: 15px; }
.reserve-panel label { color: var(--ink); font-size: 13px; font-weight: 700; }
.reserve-panel input { padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.reserve-panel input:focus { outline: 2px solid rgba(17,66,133,.2); border-color: var(--blue); }
.sinpe-note { padding: 15px; display: grid; gap: 5px; border-left: 4px solid var(--green); border-radius: 8px; background: var(--surface-soft); }
.sinpe-note span, .reserve-panel small { color: var(--muted); }
.public-errors { padding: 12px; border-radius: 8px; color: #991b1b; background: #fee2e2; }
.reserve-button { background: var(--green); }

.receipt-shell { max-width: 760px; margin: 70px auto; padding: 50px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.receipt-status { padding: 8px 12px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; color: #991b1b; background: #fee2e2; font-weight: 700; }
.receipt-status.confirmed { color: #166534; background: #dcfce7; }
.receipt-status.cancelled { color: #555; background: #eee; }
.receipt-status span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.receipt-time { color: var(--blue); font-size: 40px; }
.receipt-details { margin: 35px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line); text-align: left; }
.receipt-details div { padding: 18px; display: grid; gap: 7px; background: #fff; }
.receipt-details small { color: var(--muted); }

@media (max-width: 900px) {
    .directory-hero { align-items: start; flex-direction: column; }
    .barbershop-grid, .booking-shell { grid-template-columns: 1fr; }
    .booking-shell { padding: 18px; }
    .slot-days { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .public-header strong { display: none; }
    .location-filter { align-items: stretch; flex-direction: column; }
    .location-filter select { width: 100%; min-width: 0; }
    .barbershop-card { grid-template-columns: 82px 1fr; }
    .shop-monogram { min-height: 125px; font-size: 28px; }
    .slot-days { grid-template-columns: 1fr 1fr; }
    .directory-hero, .booking-hero { padding: 38px 20px; }
    .directory-hero h1, .booking-hero h1 { font-size: 40px; }
    .directory-hero button { width: 100%; min-height: 48px; }
    .barbershop-grid { padding: 0 12px 40px; grid-template-columns: 1fr; }
    .barbershop-card { padding: 15px; gap: 14px; }
    .booking-shell { display: flex; flex-direction: column; }
    .slots-panel, .reserve-panel { padding: 16px; }
    .barber-picker label { grid-template-columns: 1fr; }
    .barber-picker select, .reserve-panel input, .reserve-button { min-height: 48px; }
    .slot { min-height: 44px; }
    .month-nav h2 { font-size: 18px; }
    .reserve-panel { order: 2; }
    .receipt-shell { margin: 18px; padding: 28px 20px; }
    .receipt-details { grid-template-columns: 1fr; }
}
