/* BarberBron — classic barbershop look: charcoal, cream, brass. */
:root {
  --bg: #f7f3ec;          /* warm cream */
  --card: #ffffff;
  --text: #1f1d1a;
  --muted: #7a7266;
  --line: #e7dfd2;
  --dark: #1b1a18;        /* charcoal */
  --dark-2: #2a2824;
  --accent: #b8893b;      /* brass */
  --accent-2: #9a6f28;
  --accent-soft: #f5ecdc;
  --red: #a93226;         /* barber-pole red */
  --danger: #b42318;
  --ok: #2f7d4f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 29, 26, .04), 0 8px 24px rgba(31, 29, 26, .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-2); }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 30px; line-height: 1.15; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 0 0 14px; }
.sub { color: var(--muted); margin: 0 0 24px; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; font-size: 13px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 28px; background: var(--dark); color: #f3ede2;
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 6px 20px rgba(0, 0, 0, .15);
}
.topbar::after { /* thin barber-pole stripe under the bar */
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 10px, #fff 10px 20px, #23407a 20px 30px, #fff 30px 40px);
  opacity: .9;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .01em; min-width: 0; }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--dark); display: grid; place-items: center; flex: none; }
.logo svg { width: 18px; height: 18px; }
nav { display: flex; gap: 6px; align-items: center; flex: none; }
nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: #d9cfbf; font-weight: 500; font-size: 14px; }
nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.lang { display: inline-flex; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; overflow: hidden; margin-left: 4px; }
.lang button { border: none; background: transparent; padding: 5px 11px; cursor: pointer; font-size: 12px; font-weight: 700; color: #bfb4a3; letter-spacing: .04em; }
.lang button.active { background: var(--accent); color: var(--dark); }

main { width: 100%; max-width: 1040px; margin: 0 auto; padding: 36px 20px 64px; flex: 1; }
main.wide { max-width: none; padding: 0 0 64px; }

/* ---------- footer ---------- */
.footer { background: var(--dark); color: #a99f8f; font-size: 13px; padding: 22px 28px; display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.footer a { color: #d9cfbf; text-decoration: none; }
.footer a:hover { color: #fff; }

/* ---------- cards & buttons ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); padding: 9px 16px; border-radius: 10px;
  cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text); text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: #cdbfa8; background: #fffdf9; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--dark); border-color: var(--dark); color: #f7efe2; }
.btn.primary:hover { background: var(--dark-2); }
.btn.gold { background: var(--accent); border-color: var(--accent); color: var(--dark); }
.btn.gold:hover { background: #c79947; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.link { border: none; background: none; color: var(--accent-2); padding: 4px 0; box-shadow: none; }
.btn.link:hover { text-decoration: underline; background: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.empty { color: var(--muted); padding: 18px 0; }

/* ---------- home ---------- */
.hero {
  position: relative; overflow: hidden; color: #f3ede2; text-align: center;
  padding: 84px 20px 96px;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(184, 137, 59, .35), transparent 60%),
    linear-gradient(180deg, #1b1a18 0%, #24211d 100%);
}
.hero::before { /* faint diagonal texture */
  content: ""; position: absolute; inset: 0; opacity: .05;
  background: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 14px);
}
.hero > * { position: relative; }
.hero .eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.hero h1 { font-size: clamp(32px, 5.5vw, 54px); max-width: 760px; margin: 0 auto 14px; color: #fff; }
.hero p { font-size: 17px; color: #cfc5b4; max-width: 560px; margin: 0 auto 30px; }
.hero .btn { padding: 13px 26px; font-size: 15px; }
.section { max-width: 1040px; margin: 0 auto; padding: 56px 20px 0; }
.section-title { text-align: center; margin-bottom: 28px; }
.section-title h2 { font-size: 28px; margin-bottom: 6px; }
.section-title p { color: var(--muted); margin: 0; }
.steps-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how { text-align: center; padding: 26px 20px; }
.how .num { width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-family: var(--serif); font-size: 20px; font-weight: 700; }
.how h3 { margin: 0 0 6px; font-size: 16px; }
.how p { margin: 0; color: var(--muted); font-size: 14px; }
.search { max-width: 420px; margin: 0 auto 22px; display: block; width: 100%; }

/* ---------- grids / choices ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.choice {
  position: relative; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; box-shadow: var(--shadow);
}
.choice:hover { border-color: var(--accent); box-shadow: 0 10px 30px rgba(154, 111, 40, .16); transform: translateY(-2px); }
.choice .title { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.choice .meta { color: var(--muted); font-size: 13px; }
.choice .price { margin-top: 10px; font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--accent-2); }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--dark); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-family: var(--serif); font-size: 17px; margin-bottom: 12px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.shop-card { text-decoration: none; color: inherit; display: block; padding: 0; overflow: hidden; }
.shop-card .cover { height: 84px; background: linear-gradient(135deg, #24211d, #3a332a); position: relative; }
.shop-card .cover::after { content: ""; position: absolute; inset: 0; opacity: .08; background: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 12px); }
.shop-card .avatar { margin: -26px 0 10px 18px; position: relative; z-index: 1; width: 52px; height: 52px; font-size: 19px; box-shadow: 0 0 0 4px #fff; }
.shop-card .body { padding: 0 18px 18px; }
.meta.link { color: var(--accent-2); font-weight: 600; margin-top: 8px; }

/* ---------- booking page ---------- */
.shop-banner {
  background: linear-gradient(135deg, #1b1a18, #2f2a23); color: #f3ede2; border-radius: var(--radius);
  padding: 26px 26px; display: flex; align-items: center; gap: 18px; margin-bottom: 22px; position: relative; overflow: hidden;
}
.shop-banner::after { content: ""; position: absolute; inset: 0; opacity: .06; background: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 14px); pointer-events: none; }
.shop-banner .avatar { margin: 0; width: 60px; height: 60px; font-size: 22px; background: var(--accent); color: var(--dark); box-shadow: 0 0 0 4px rgba(184, 137, 59, .25); }
.shop-banner h1 { color: #fff; margin: 0; font-size: 26px; }
.shop-banner p { margin: 2px 0 0; color: #cfc5b4; font-size: 14px; }

.steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.step { font-size: 13px; padding: 6px 13px; border-radius: 999px; background: #efe8dc; color: var(--muted); font-weight: 600; }
.step.done { background: var(--accent-soft); color: var(--accent-2); }
.step.current { background: var(--dark); color: #f3ede2; }

.dates { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 18px; scrollbar-width: thin; }
.date {
  min-width: 70px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  cursor: pointer; text-align: center; line-height: 1.3; transition: border-color .15s;
}
.date:hover:not(:disabled) { border-color: var(--accent); }
.date .dow { font-size: 12px; color: var(--muted); font-weight: 600; }
.date .num { font-size: 20px; font-weight: 700; font-family: var(--serif); }
.date .cnt { font-size: 11px; color: var(--muted); }
.date.selected { background: var(--dark); border-color: var(--dark); color: #fff; }
.date.selected .dow, .date.selected .cnt { color: var(--accent); }
.date:disabled { opacity: .4; cursor: not-allowed; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.slot { padding: 10px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font-weight: 600; transition: all .12s; }
.slot:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }

.summary { background: var(--accent-soft); border: 1px solid #ecdcbf; border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; line-height: 1.75; }

/* ---------- dashboard: slim icon rail ---------- */
main.dash { max-width: none; padding: 0; display: flex; }
.dash-wrap { display: flex; flex: 1; min-height: calc(100vh - 66px); }
.rail { position: sticky; top: 66px; align-self: flex-start; height: calc(100vh - 66px); width: 68px; flex: none;
  background: var(--dark); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 14px; z-index: 5; }
.rail-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--dark); display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.rail-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rail-item { position: relative; width: 44px; height: 44px; border-radius: 12px; border: none; background: none; color: #a99f8f; cursor: pointer;
  display: grid; place-items: center; transition: background .15s, color .15s; }
.rail-item svg { width: 21px; height: 21px; }
.rail-item:hover { background: #2e2b27; color: #f3ede2; }
.rail-item.active { background: var(--accent); color: var(--dark); }
.rail-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rail-item .badge { position: absolute; top: 2px; right: 0; margin: 0; }
.rail-label { position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-4px, -50%); background: var(--dark); color: #f3ede2;
  font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none; opacity: 0;
  transition: opacity .12s, transform .12s; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.rail-item:hover .rail-label, .rail-item:focus-visible .rail-label { opacity: 1; transform: translate(0, -50%); }
.rail-logout:hover { color: #f0a59b; }
.dash-main { flex: 1; min-width: 0; max-width: 1100px; padding: 30px 36px 64px; }
.dash-title { margin: 0 0 20px; }

/* ---------- QR ---------- */
.choice.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.plans { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }
.plans .save { color: #2c7a3a; font-weight: 600; margin-top: 4px; }
.pay-steps { padding-left: 20px; margin: 0 0 16px; line-height: 1.6; }
.pay-steps li { margin-bottom: 12px; }
.pay-copy { margin-top: 6px; gap: 8px; }
.mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: 1px; }
.pay-card { text-align: center; }
.pay-card .big-ico { font-size: 34px; }
.pay-row { gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pay-pending .pay-row { background: #fbf3e2; border-radius: 10px; padding: 10px 12px; border: 1px solid #ecd6a6; margin-bottom: 8px; }
html[data-theme=dark] .pay-pending .pay-row { background: #2a2418; border-color: #4a3d22; }
.sub-banner .btn { margin-left: 8px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.shop-tile { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.shop-tile.off > :not(.tile-actions) { opacity: .55; }
.shop-tile.off .tile-actions > .btn { opacity: .55; }
.tile-head { gap: 8px; flex-wrap: nowrap; }
.tile-name { font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.tile-sub { overflow-wrap: anywhere; }
.tile-sub-row { gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.tile-left { font-size: 13px; font-weight: 600; }
.tile-left.ok { color: #2c7a3a; } .tile-left.warn { color: #a06a12; } .tile-left.bad { color: #b3261e; }
.tile-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tile-bar i { display: block; height: 100%; border-radius: 3px; }
.tile-bar.ok i { background: #3f9a52; } .tile-bar.warn i { background: #d99a2b; } .tile-bar.bad i { background: #c9473f; }
.tile-actions { gap: 6px; margin-top: 4px; flex-wrap: nowrap; }
.tile-actions .btn { white-space: nowrap; }
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 20; min-width: 190px; background: var(--card, #fff);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.14); padding: 6px; display: flex; flex-direction: column; }
.menu-pop button { text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; font: inherit; font-size: 14px; color: inherit; cursor: pointer; white-space: nowrap; }
.menu-pop button:hover { background: var(--accent-soft, #f4ecdd); }
.menu-pop button.danger { color: #b3261e; }
.sub-banner { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-size: 14px; line-height: 1.5; border: 1px solid; }
.sub-banner.info { background: #eef5ec; border-color: #cfe3c9; color: #2c5a26; }
.sub-banner.warn { background: #fbf3e2; border-color: #ecd6a6; color: #6d4c12; }
.sub-banner.bad { background: #fbeaea; border-color: #efc1c1; color: #7c2020; }
html[data-theme=dark] .sub-banner { filter: brightness(.9); }
.qr-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 26px; background: #fffdf9; }
.avatar, .rail-avatar { overflow: hidden; }
.avatar img, .rail-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-box .photo-pick { width: 96px; height: 96px; font-size: 32px; margin: 0; flex: none; cursor: pointer; }
.photo-box .photo-pick:hover { box-shadow: 0 0 0 3px var(--accent); }
label.btn { cursor: pointer; }
.popup-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; float: left; margin: 0 10px 0 0; }
.qr-box canvas { width: 132px; height: 132px; border-radius: 8px; border: 1px solid var(--line); background: #fff; flex: none; }
.qr-box > div { flex: 1; min-width: 200px; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; max-width: 480px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #4a443b; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  padding: 10px 12px; border: 1px solid #ddd3c3; border-radius: 10px; background: #fffdf9; font-weight: 400; width: 100%;
}
select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a7268' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.hours-row { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 8px; align-items: center; }
.hours-row input[type=time]:disabled { opacity: .4; }
.two-col { max-width: none; grid-template-columns: 1fr 1fr; }
.align-end { display: flex; align-items: flex-end; }
.prefix-input { display: flex; align-items: stretch; border: 1px solid #ddd3c3; border-radius: 10px; overflow: hidden; background: #fffdf9; }
.prefix-input span { padding: 10px 2px 10px 12px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.prefix-input input { border: none !important; flex: 1; min-width: 0; padding-left: 2px !important; outline: none; }
.prefix-input:focus-within { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.narrow { max-width: 420px; margin: 32px auto; }
.narrow .icon-top { width: 52px; height: 52px; border-radius: 50%; background: var(--dark); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.narrow .icon-top svg { width: 24px; height: 24px; }
.sep { border: none; border-top: 1px solid var(--line); margin: 26px 0; }

.success { text-align: center; padding: 40px 20px; }
.success .big { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-size: 34px; }

/* ---------- dashboard ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab { background: none; border: none; padding: 11px 15px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; margin-left: 5px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 4px; font-family: var(--serif); }

.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.col-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.col-head .hours { color: var(--muted); font-size: 12px; font-weight: 600; }
.bk { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 11px 13px; margin-bottom: 9px; background: #fffdf9; }
.bk.cancelled { border-left-color: #cfc6b8; opacity: .55; }
.bk.cancelled .who { text-decoration: line-through; }
.bk .time { font-weight: 700; font-family: var(--serif); font-size: 16px; }
.bk .who { margin: 2px 0; font-weight: 600; }
.bk .meta { color: var(--muted); font-size: 13px; }
.bk .actions { margin-top: 9px; display: flex; gap: 6px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
td.actions { text-align: right; white-space: nowrap; }
tr.muted td { opacity: .55; }

.msg { border-bottom: 1px solid var(--line); padding: 13px 0; }
.msg:last-child { border-bottom: none; }
.msg .head { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 4px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.tag.confirmation { background: #e2f1e7; color: #1f5e3a; }
.tag.reminder { background: #fbefd5; color: #8a5a12; }
.tag.cancellation { background: #fbe3df; color: #8f2318; }
.tag.reschedule { background: #e6e9f4; color: #2c3a6b; }
.tag.test { background: #efe8dc; color: #5a5246; }
.tag.st-queued { background: #efe8dc; color: #5a5246; }
.tag.st-sent { background: #e2f1e7; color: #1f5e3a; }
.tag.st-simulated { background: #e6eef4; color: #23506b; }
.tag.st-failed { background: #fbe3df; color: #8f2318; }
.note { font-size: 13px; color: var(--muted); background: #fbf8f2; border: 1px dashed #ddd3c3; border-radius: 10px; padding: 11px 13px; margin-bottom: 16px; }
.created { border-color: #b7d9c2; background: #f2faf4; margin-bottom: 16px; }
.created pre { white-space: pre-wrap; font-size: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 10px 0; }

/* ---------- modal & toasts ---------- */
dialog { border: none; border-radius: 18px; padding: 0; width: min(580px, 94vw); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(27, 26, 24, .55); backdrop-filter: blur(2px); }
#modal-body { padding: 24px; max-height: 86vh; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h2 { margin: 0; }
.x { border: none; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.x:hover { background: var(--accent-soft); }
#toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 50; }
.toast { background: var(--dark); color: #f3ede2; padding: 12px 16px; border-radius: 12px; max-width: 360px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); border-left: 4px solid var(--accent); animation: pop .2s ease-out; }
.toast.error { border-left-color: #ff7a6b; background: #3a1d19; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  .steps-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 14px; }
  .brand { font-size: 17px; }
  .logo { width: 30px; height: 30px; }
  nav a { padding: 6px 8px; font-size: 13px; }
  main { padding: 24px 14px 50px; }
  h1 { font-size: 25px; }
  .hero { padding: 56px 18px 64px; }
  .two-col { grid-template-columns: 1fr; }
  .shop-banner { padding: 20px; }
  .shop-banner h1 { font-size: 22px; }
  .card { padding: 18px; }
  .footer { padding: 18px 14px; }
}

/* ---------- maps ---------- */
.map { height: 380px; border-radius: var(--radius); border: 1px solid var(--line); position: relative; z-index: 0; isolation: isolate; box-shadow: var(--shadow); background: #e9e4da; }
.map.small { height: 230px; }
.map.pick { height: 300px; cursor: crosshair; }
.pin { background: none; border: none; }
.pin span {
  position: absolute; left: 2px; top: 2px; width: 26px; height: 26px; border-radius: 50% 50% 50% 0;
  background: var(--accent); border: 3px solid var(--dark); transform: rotate(-45deg); box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}
.pin span::after { content: ""; position: absolute; left: 6px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--dark); }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--sans); }
.popup-name { font-family: var(--serif); font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.popup-addr { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.leaflet-container a.popup-link { color: var(--accent-2); font-weight: 700; text-decoration: none; }
.location-card { margin-top: 18px; }
.location-card .addr { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; }
.dir-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 8px; }

/* ---------- walk-in ---------- */
.tag.disc { background: #e3f1e6; color: #1f6b35; text-transform: none; font-weight: 700; vertical-align: 1px; }
.bk .meta s { opacity: .7; }
.disc-price { color: var(--text, inherit); }
.disc-pcts { gap: 6px; flex-wrap: wrap; }
.tag.walkin { background: #efe8dc; color: #5a5246; text-transform: none; font-weight: 600; margin-left: 4px; vertical-align: 1px; }
.staff-pick { display: grid; gap: 8px; }
.pick-row { display: flex !important; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf9; cursor: pointer; font-weight: 400; }
.pick-row:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pick-row.busy { opacity: .6; cursor: not-allowed; }
.pick-row .check { font-size: 15px; }
.pick-row input { accent-color: var(--accent); }

/* Small phones: keep the brand name readable — header links are repeated in the footer */
@media (max-width: 760px) {
  .dash-wrap { flex-direction: column; min-height: 0; }
  .rail { position: sticky; top: 62px; height: auto; width: 100%; flex-direction: row; padding: 8px 12px; gap: 4px; }
  .rail-avatar { display: none; }
  .rail-nav { flex-direction: row; justify-content: space-around; gap: 4px; }
  .rail-item { width: 48px; height: 40px; }
  .rail-label { display: none; }
  .dash-main { padding: 20px 14px 50px; }
}
@media (max-width: 480px) {
  nav a { display: none; }
}

/* ---------- customer settings: floating button ---------- */
body.has-fab main { padding-bottom: 120px; }
.fab-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.fab { width: 56px; height: 56px; border-radius: 50%; background: var(--dark); color: #e8c98c; border: 2px solid var(--accent); cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); transition: transform .2s; }
.fab svg { width: 24px; height: 24px; }
.fab-wrap.open .fab { transform: rotate(90deg); }
.fab-chip { display: flex; align-items: center; gap: 8px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .14); }
.fab-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.fab-pop { position: fixed; right: 18px; bottom: 300px; z-index: 41; width: min(360px, calc(100vw - 36px)); max-height: calc(100vh - 360px); overflow: auto;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28); }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; border: none; background: none; padding: 9px 6px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--dark); }
.switch { width: 46px; height: 26px; border-radius: 13px; border: none; background: #cfc6b8; position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch.on { background: var(--accent); }
.switch.on::after { left: 23px; }
.fab-me { border-top: 1px solid var(--line); padding-top: 10px; flex-wrap: nowrap; }
.mine-list { display: grid; gap: 0; }
.mine-item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.mine-item.off { opacity: .6; }
.mine-item .tag { display: inline-block; margin-top: 4px; }
.mine-actions { display: flex; gap: 6px; flex: none; }
/* keep the button out of the way while typing on a phone */
body:has(input:focus, textarea:focus) .fab-wrap, body:has(input:focus, textarea:focus) .fab-pop { display: none; }
@media (max-width: 640px) {
  .fab-wrap { right: 14px; bottom: 14px; }
  .fab-pop { right: 14px; left: 14px; width: auto; bottom: 290px; max-height: calc(100vh - 380px); }
}

/* ---------- dark theme (customer pages) ---------- */
html[data-theme=dark] {
  --bg: #141311; --card: #1f1d1a; --text: #efe8dc; --muted: #a59b8b; --line: #36312b;
  --accent-soft: #352b1c; --accent-2: #d9a95a; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
html[data-theme=dark] .btn:hover { background: #29261f; border-color: #4a4237; }
html[data-theme=dark] .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--dark); }
html[data-theme=dark] .btn.primary:hover { background: #c79947; }
html[data-theme=dark] input[type=text], html[data-theme=dark] input[type=tel], html[data-theme=dark] input[type=search],
html[data-theme=dark] textarea, html[data-theme=dark] select { background: #181614; border-color: #3d372f; color: var(--text); }
html[data-theme=dark] label { color: #cfc5b4; }
html[data-theme=dark] .step { background: #26231f; }
html[data-theme=dark] .step.current, html[data-theme=dark] .date.selected { background: var(--accent); border-color: var(--accent); color: var(--dark); }
html[data-theme=dark] .date.selected .dow, html[data-theme=dark] .date.selected .cnt { color: var(--dark); }
html[data-theme=dark] .summary { border-color: #4a3c24; }
html[data-theme=dark] .note { background: #1a1815; border-color: #3d372f; }
html[data-theme=dark] .shop-card .avatar { box-shadow: 0 0 0 4px var(--card); }
html[data-theme=dark] .shop-card .cover { background: linear-gradient(135deg, #2b2722, #3f372c); }
html[data-theme=dark] .map { border-color: var(--line); filter: brightness(.85) contrast(1.05); }
html[data-theme=dark] .footer { background: #0e0d0c; }
html[data-theme=dark] .fab-chip.on { color: var(--text); }
html[data-theme=dark] .tag.test { background: #2d2924; color: #cfc5b4; }
