:root { --ink: #0a0a0a; --paper: #f5f5f2; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: 'Archivo', sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .8; }
input::placeholder { color: rgba(245, 245, 242, .45); }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
button { font-family: inherit; }

.anton { font-family: 'Anton', sans-serif; font-weight: 400; text-transform: uppercase; }
.wrap { max-width: 1240px; margin: 0 auto; }
.narrow { max-width: 760px; margin: 0 auto; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 10px 16px;
  background: var(--ink); border-bottom: 2px solid var(--paper);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-family: 'Anton', sans-serif; font-size: 24px; text-transform: uppercase; line-height: .88; }
.brand-tag { font-weight: 800; font-size: 9px; letter-spacing: .42em; margin-top: 5px; display: block; }
.brand-col { display: flex; flex-direction: column; line-height: .88; }
.btn-ghost {
  font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  background: var(--paper); color: var(--ink); padding: 0 18px; min-height: 44px;
  display: flex; align-items: center; border: 0; cursor: pointer;
}

/* Hero */
.hero { padding: 28px 16px; }
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--paper);
  padding: 7px 12px; font-weight: 800; font-size: 11px; letter-spacing: .22em;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--paper); }
h1.hero-title { margin: 0 auto; font-size: clamp(46px, 11vw, 96px); line-height: .95; max-width: 12ch; }
.hero-line { display: block; overflow: hidden; }
.hero-line span { display: block; }
.outline { -webkit-text-stroke: 1.5px var(--paper); color: transparent; }

.mode-row { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 560px; scroll-margin-top: 80px; }
.mode-label { font-size: 15px; font-weight: 500; color: rgba(245, 245, 242, .75); }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--paper); }
.mode-btn {
  min-height: 64px; padding: 10px 12px; border: 0; font-weight: 900; font-size: 14px;
  letter-spacing: .06em; text-transform: uppercase; cursor: pointer; display: flex;
  flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px;
  text-align: left; transition: background .25s, color .25s; background: var(--ink); color: var(--paper);
}
.mode-btn + .mode-btn { border-left: 2px solid var(--paper); }
.mode-btn.on { background: var(--paper); color: var(--ink); }
.mode-sub { font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; opacity: .7; }

/* Barber grid (hero) */
.barber-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.barber-grid.small { gap: 6px; }
.barber-card {
  position: relative; display: block; width: 100%; overflow: hidden; background: #1a1a1a;
  padding: 0; cursor: pointer; text-align: left; border: 0; outline-offset: -3px;
  outline: 3px solid rgba(245, 245, 242, .18);
}
.barber-grid .barber-card { aspect-ratio: 1 / 1.9; max-height: 72vh; }
.barber-grid.small .barber-card { aspect-ratio: 3 / 4.4; }
.barber-card.on { outline-color: var(--paper); }
.barber-card[disabled] { cursor: default; }
.barber-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: opacity .4s, filter .5s; }
.barber-card.off img { filter: grayscale(1) contrast(1.2); opacity: .45; }
.barber-card.unavailable img { opacity: .25; }
.barber-check {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 15px;
  font-weight: 900; border: 2px solid var(--paper); background: transparent;
}
.barber-card.on .barber-check { background: var(--paper); }
.barber-info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 10px 12px; display: flex;
  flex-direction: column; gap: 4px; background: linear-gradient(to top, #0a0a0a 25%, rgba(10, 10, 10, 0)); color: var(--paper);
}
.barber-name { font-family: 'Anton', sans-serif; font-size: clamp(22px, 6.5vw, 56px); text-transform: uppercase; line-height: 1; }
.barber-grid.small .barber-name { font-size: clamp(22px, 6.5vw, 44px); }
.barber-role { font-weight: 800; font-size: clamp(9px, 2.4vw, 12px); letter-spacing: .12em; line-height: 1.3; }

/* Flow */
.flow-section { padding: 40px 0 56px; scroll-margin-top: 66px; }
.flow { display: flex; flex-direction: column; gap: 40px; padding: 0 16px; }
.step { display: flex; flex-direction: column; gap: 12px; }
.step-title { font-weight: 800; font-size: 12px; letter-spacing: .26em; }
.step-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.step-note { font-size: 12px; font-weight: 600; color: rgba(245, 245, 242, .65); }

.service-list { display: flex; flex-direction: column; gap: 8px; }
.service-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  padding: 14px 16px; min-height: 66px; cursor: pointer; text-align: left; background: var(--ink);
  color: var(--paper); border: 2px solid var(--paper); transition: background .25s, color .25s;
}
.service-row.on { background: var(--paper); color: var(--ink); }
.service-row.off { color: rgba(245, 245, 242, .3); cursor: default; }
.service-row .name { font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: .02em; }
.service-row .price { font-family: 'Anton', sans-serif; font-size: 24px; grid-column: 2; grid-row: 1; }
.service-row .dur { font-size: 13px; font-weight: 500; opacity: .7; }

.day-scroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
.day-btn {
  flex: 0 0 70px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 12px 4px; cursor: pointer; background: var(--ink); color: var(--paper); border: 2px solid var(--paper);
  transition: background .25s, color .25s;
}
.day-btn.on { background: var(--paper); color: var(--ink); }
.day-wd { font-weight: 800; font-size: 11px; letter-spacing: .14em; }
.day-num { font-family: 'Anton', sans-serif; font-size: 34px; line-height: 1.05; }
.day-mon { font-size: 11px; font-weight: 600; opacity: .65; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.slot-btn {
  min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; font-weight: 700; font-size: 15px; background: transparent; color: var(--paper);
  border: 2px solid rgba(245, 245, 242, .12); cursor: pointer; transition: background .2s, color .2s;
}
.slot-btn.on { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.slot-btn.off { color: rgba(245, 245, 242, .25); border-color: rgba(245, 245, 242, .12); cursor: default; text-decoration: line-through; }
.slot-sub { font-size: 10px; font-weight: 600; opacity: .65; text-decoration: none; }

.name-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.field {
  min-height: 56px; padding: 0 16px; border: 2px solid var(--paper); background: transparent;
  color: var(--paper); font-family: inherit; font-size: 16px; font-weight: 600; outline: none; width: 100%;
}

.summary-box { display: flex; flex-direction: column; gap: 12px; border: 2px solid var(--paper); padding: 16px; margin-top: 20px; }
.summary-top-row { display: flex; align-items: center; gap: 12px; }
.summary-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center 15%; border: 2px solid var(--paper); flex-shrink: 0; }
.summary-title { font-weight: 900; font-size: 16px; text-transform: uppercase; }
.summary-sub { font-size: 13px; font-weight: 500; color: rgba(245, 245, 242, .7); }
.cta {
  min-height: 58px; border: 2px solid var(--paper); background: var(--ink); color: var(--paper);
  font-weight: 900; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; width: 100%;
}
.cta.ready { background: var(--paper); color: var(--ink); }

/* Marquee */
.marquee-wrap { background: var(--paper); color: var(--ink); overflow: hidden; padding: 12px 0; }
.marquee { display: flex; width: max-content; font-family: 'Anton', sans-serif; font-size: 30px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.marquee span { padding-right: 28px; }

/* Footer */
.footer { background: var(--paper); color: var(--ink); padding: 24px 16px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }

/* Ticket overlay */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(10, 10, 10, .92); display: flex; align-items: center; justify-content: center; padding: 20px; }
.ticket { width: 100%; max-width: 400px; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; }
.ticket-photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #222; }
.ticket-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.ticket-badge { position: absolute; left: 0; bottom: 0; background: var(--ink); color: var(--paper); font-weight: 900; font-size: 11px; letter-spacing: .22em; padding: 9px 12px; }
.ticket-body { padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; }
.ticket-title { font-family: 'Anton', sans-serif; font-size: 48px; line-height: .92; text-transform: uppercase; }
.ticket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-top: 2px dashed var(--ink); padding-top: 16px; }
.ticket-grid .k { font-size: 11px; font-weight: 800; letter-spacing: .18em; display: block; }
.ticket-grid .v { font-family: 'Anton', sans-serif; font-size: 24px; text-transform: uppercase; display: block; }
.ticket-btn { min-height: 54px; border: 0; background: var(--ink); color: var(--paper); font-weight: 900; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.ticket-btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }

.hidden { display: none !important; }

/* Admin */
.admin-top { display: flex; align-items: center; gap: 14px; }
.admin-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: center 15%; border: 2px solid var(--paper); flex-shrink: 0; }
.admin-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--paper); }
.admin-tab { min-height: 54px; border: 0; background: var(--ink); color: var(--paper); font-weight: 900; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.admin-tab + .admin-tab { border-left: 2px solid var(--paper); }
.admin-tab.on { background: var(--paper); color: var(--ink); }
.legend { display: flex; gap: 14px; font-size: 12px; font-weight: 700; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 14px; height: 14px; border: 2px solid var(--paper); }
.legend-swatch.closed { border-color: rgba(245, 245, 242, .2); background: repeating-linear-gradient(45deg, rgba(245, 245, 242, .2) 0 2px, transparent 2px 5px); }
.legend-swatch.booked { background: var(--paper); }
.admin-slot { background: transparent; }
.admin-slot.closed { background: repeating-linear-gradient(45deg, rgba(245, 245, 242, .08) 0 2px, transparent 2px 7px); color: rgba(245, 245, 242, .4); border-color: rgba(245, 245, 242, .2); }
.admin-slot.booked { background: var(--paper); color: var(--ink); border-color: var(--paper); cursor: default; }
.service-admin-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--paper); }
.service-admin-row.off { opacity: .5; }
.toggle { width: 52px; height: 30px; border-radius: 999px; border: 2px solid var(--paper); padding: 0; position: relative; cursor: pointer; background: var(--paper); }
.toggle.off { background: transparent; }
.toggle-knob { position: absolute; top: 3px; left: 25px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: left .2s; }
.toggle.off .toggle-knob { left: 3px; background: var(--paper); }
.price-field { display: flex; align-items: center; gap: 4px; border: 2px solid var(--paper); padding: 0 10px; min-height: 48px; }
.price-input { width: 52px; background: transparent; border: 0; color: var(--paper); font-family: 'Anton', sans-serif; font-size: 24px; outline: none; padding: 0; }
.day-count { font-size: 10px; font-weight: 700; opacity: .7; }
.bulk-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.bulk-btn { min-height: 40px; padding: 0 12px; background: transparent; border: 1.5px solid var(--paper); color: var(--paper); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 120px); z-index: 50; background: var(--paper); color: var(--ink); padding: 12px 18px; font-weight: 900; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
.help { font-size: 13px; line-height: 1.5; color: rgba(245, 245, 242, .65); }
.login-main { max-width: 460px; margin: 0 auto; padding: 48px 16px; display: flex; flex-direction: column; gap: 24px; }
.login-title { font-size: clamp(44px, 12vw, 64px); line-height: .95; }
.login-copy { font-size: 16px; line-height: 1.5; color: rgba(245, 245, 242, .75); }
.err-msg { font-size: 13px; font-weight: 600; }
.demo-list { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-btn { min-height: 40px; padding: 0 12px; border: 1.5px solid rgba(245, 245, 242, .4); background: transparent; color: var(--paper); font-size: 13px; font-weight: 600; cursor: pointer; }
.sent-box { background: var(--paper); color: var(--ink); display: flex; flex-direction: column; }
.sent-head { padding: 12px 16px; border-bottom: 1.5px solid var(--ink); display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; }
.sent-body { padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.sent-title { font-family: 'Anton', sans-serif; font-size: 28px; text-transform: uppercase; line-height: 1; }
.link-row { display: flex; gap: 16px; font-size: 14px; font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; color: var(--paper); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; min-height: 44px; }
