:root {
  --black: #111;
  --ink: #1d1d1b;
  --muted: #6d6d69;
  --line: #deded9;
  --paper: #fff;
  --offwhite: #f4f3ee;
  --blue: #147fb9;
  --green: #8ec64a;
  --orange: #e68a2e;
  --red: #b64031;
  --shadow: 0 22px 60px rgba(0, 0, 0, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: "Quicksand", Arial, sans-serif; background: #d3c0a3 url("/assets/images/background.jpg") center top / cover fixed; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, .kicker, .eyebrow, legend, nav, .button, .prototype-badge { font-family: "Fjalla One", Impact, sans-serif; font-weight: 400; }
h1, h2, h3, p { margin-top: 0; }

.site-header { height: 146px; background: #fff; border-bottom: 2px solid #111; position: relative; z-index: 20; }
.header-inner { max-width: 1120px; height: 100%; margin: 0 auto; padding: 0 18px; display: flex; align-items: stretch; justify-content: space-between; }
.brand { width: 220px; display: flex; align-items: center; justify-content: center; padding: 8px 0; overflow: hidden; }
.brand img { width: 210px; height: 128px; object-fit: contain; }
nav { display: flex; align-items: stretch; }
nav a { display: flex; align-items: flex-end; padding: 0 24px 22px; text-decoration: none; font-size: 18px; }
nav a:hover, nav a.active { color: #fff; background: #111; }

.hero { color: #fff; text-align: center; padding: 72px 20px 150px; background: linear-gradient(rgba(0,0,0,.23), rgba(0,0,0,.28)); }
.hero-inner { max-width: 920px; margin: 0 auto; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.hero h1 { margin: 0 0 18px; font-size: clamp(42px, 6vw, 74px); line-height: 1.03; letter-spacing: .01em; }
.hero p:not(.eyebrow) { font-size: clamp(17px, 2vw, 22px); font-weight: 600; }
.eyebrow, .kicker { margin-bottom: 8px; letter-spacing: .09em; }
.eyebrow { color: #fff; font-size: 17px; }
.kicker { color: var(--blue); font-size: 14px; }

.booking-shell { max-width: 1160px; margin: -100px auto 90px; display: grid; grid-template-columns: minmax(0, 1fr) 310px; background: #fff; box-shadow: var(--shadow); position: relative; }
.booking-main { padding: 46px 50px 56px; min-width: 0; }
.booking-summary { color: #fff; padding: 46px 30px; background: #111; }
.section-heading, .panel-heading, .admin-titlebar, .map-heading, .step-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading h2, .booking-summary h2, .panel-heading h2 { margin-bottom: 0; font-size: 29px; }
.prototype-badge { padding: 7px 10px; color: #fff; background: var(--green); letter-spacing: .04em; }

.steps { list-style: none; padding: 0; margin: 34px 0 44px; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.steps::before { content: ""; position: absolute; top: 18px; left: 9%; right: 9%; height: 2px; background: var(--line); }
.steps li { color: #888; text-align: center; font-size: 12px; font-weight: 700; text-transform: uppercase; position: relative; }
.steps span { width: 36px; height: 36px; margin: 0 auto 8px; border: 2px solid var(--line); border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 14px; position: relative; z-index: 1; }
.steps li.is-active { color: var(--ink); }
.steps li.is-active span { color: #fff; border-color: #111; background: #111; }
.steps li.is-complete span { color: #fff; border-color: var(--green); background: var(--green); }

.form-step { display: none; }
.form-step.is-active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: .35; transform: translateY(4px); } }
fieldset { padding: 0; border: 0; margin: 0 0 30px; }
legend, .form-step h3 { margin-bottom: 18px; font-size: 21px; }
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.service-card, .date-card { cursor: pointer; position: relative; }
.service-card input, .date-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.service-card-body { min-height: 138px; padding: 18px 18px 16px 58px; display: flex; flex-direction: column; border: 2px solid var(--line); position: relative; transition: .15s ease; }
.service-card:hover .service-card-body, .service-card input:checked + .service-card-body { border-color: var(--black); transform: translateY(-2px); box-shadow: 0 7px 20px rgba(0,0,0,.08); }
.service-card input:checked + .service-card-body::after { content: "✓"; width: 24px; height: 24px; color: #fff; background: var(--green); border-radius: 50%; display: grid; place-items: center; position: absolute; top: 12px; right: 12px; font-weight: 700; }
.service-icon { position: absolute; left: 18px; top: 17px; color: var(--blue); font-size: 24px; }
.service-card strong { padding-right: 24px; }
.service-card small { color: var(--muted); margin: 5px 0 12px; line-height: 1.45; }
.service-card em { color: var(--blue); font-style: normal; font-size: 12px; font-weight: 700; margin-top: auto; text-transform: uppercase; }

.field-grid { display: grid; gap: 18px; margin: 26px 0; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label > span:first-child, .add-day-form label span { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; padding: 13px 14px; color: var(--ink); background: #fff; border: 1px solid #bbb; border-radius: 0; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20,127,185,.12); }
textarea { resize: vertical; }
.full-field { display: block; margin: 24px 0; }
.form-actions { margin-top: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-actions.right { justify-content: flex-end; }
.button { min-height: 46px; padding: 12px 20px; border: 2px solid #111; cursor: pointer; text-decoration: none; letter-spacing: .035em; transition: .15s ease; }
.button.primary { color: #fff; background: #111; }
.button.primary:hover { color: #111; background: var(--green); border-color: var(--green); }
.button.secondary { color: #111; background: #fff; }
.button.secondary:hover { background: #eee; }
.button.location { color: #fff; background: var(--blue); border-color: var(--blue); white-space: nowrap; }
.button.small { min-height: 38px; padding: 8px 12px; font-size: 13px; }
.button:disabled { opacity: .55; cursor: wait; }

.duration-chip { color: #fff; padding: 8px 12px; background: var(--blue); font-size: 12px; font-weight: 700; white-space: nowrap; }
.step-intro p { color: var(--muted); margin-bottom: 0; font-size: 14px; }
.date-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 25px; }
.date-card-body { padding: 17px; border: 2px solid var(--line); display: block; transition: .15s ease; }
.date-card:hover .date-card-body, .date-card input:checked + .date-card-body { border-color: #111; box-shadow: 0 6px 18px rgba(0,0,0,.07); }
.date-card input:checked + .date-card-body { background: #fafbf7; }
.date-top { display: flex; justify-content: space-between; gap: 12px; }
.date-top strong { text-transform: capitalize; }
.date-top em { color: #568a25; font-size: 11px; font-style: normal; font-weight: 700; text-transform: uppercase; }
.date-zone { display: block; color: var(--muted); margin: 6px 0 13px; font-size: 13px; }
.capacity-line { height: 6px; display: block; background: #e8e8e4; }
.capacity-line i { height: 100%; display: block; background: var(--green); }
.date-card small { color: var(--muted); display: block; margin-top: 8px; }
.date-card.is-full { cursor: not-allowed; opacity: .55; }
.date-card.is-full .date-top em { color: var(--red); }

.map-section { padding-top: 28px; margin-top: 30px; border-top: 1px solid var(--line); }
.map-heading p { color: var(--muted); max-width: 520px; font-size: 13px; line-height: 1.5; }
#customer-map { height: 380px; border: 2px solid #111; }
.map-status { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.consent-row { margin-top: 25px; display: flex; align-items: flex-start; gap: 10px; }
.consent-row input { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; }
.consent-row span { margin: 0; font-size: 12px; line-height: 1.5; }
.form-error { margin-top: 18px; padding: 12px; color: #7d2118; background: #f9e5e2; border-left: 4px solid var(--red); }
.bot-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.empty-state { padding: 30px; color: var(--muted); background: var(--offwhite); text-align: center; }

.booking-summary .kicker { color: var(--green); }
.booking-summary dl { margin: 38px 0; }
.booking-summary dl div { padding: 17px 0; border-top: 1px solid #444; }
.booking-summary dt { color: #aaa; font-size: 11px; text-transform: uppercase; }
.booking-summary dd { margin: 5px 0 0; font-weight: 700; }
.booking-summary dd + small { display: block; margin-top: 5px; color: #aaa; font-size: 10px; line-height: 1.4; }
.summary-note { padding: 19px; color: #111; background: var(--green); }
.summary-note p { margin: 8px 0 0; font-size: 13px; line-height: 1.55; }
.admin-preview-link { display: block; margin-top: 26px; color: #bbb; font-size: 12px; }
.success-step { padding: 40px 10px; text-align: center; }
.success-mark { width: 76px; height: 76px; margin: 0 auto 24px; color: #fff; background: var(--green); border-radius: 50%; display: grid; place-items: center; font-size: 40px; font-weight: 700; }
.success-step h2 { font-size: 35px; }
.success-summary { max-width: 420px; margin: 25px auto 30px; padding: 20px; background: var(--offwhite); display: grid; gap: 5px; }

footer { min-height: 125px; padding: 34px max(28px, calc((100% - 1080px) / 2)); color: #ccc; background: #111; display: flex; justify-content: space-between; align-items: center; }
footer div { display: grid; gap: 4px; }
footer strong { color: #fff; font-family: "Fjalla One"; font-size: 20px; }

/* Administration */
.admin-body { background-attachment: fixed; }
.admin-header { height: 112px; }
.admin-header .brand { width: 170px; }
.admin-header .brand img { width: 160px; height: 98px; }
.admin-header nav a { align-items: center; padding-bottom: 0; }
.admin-main { max-width: 1280px; margin: 45px auto 80px; padding: 0 24px; }
.admin-titlebar { color: #fff; margin-bottom: 24px; align-items: center; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.admin-titlebar h1 { font-size: 44px; margin-bottom: 0; }
.admin-titlebar .kicker { color: #fff; }
.admin-user-actions { display: flex; align-items: center; gap: 12px; }
.admin-user-actions span { color: #fff; font-weight: 700; }
.admin-dialog { width: min(560px, calc(100% - 24px)); padding: 30px; border: 0; box-shadow: var(--shadow); }
.admin-dialog::backdrop { background: rgba(0,0,0,.65); }
.admin-dialog form { display: grid; gap: 18px; }
.admin-dialog h2 { margin: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.stats-grid article { min-height: 145px; padding: 24px; background: #fff; box-shadow: 0 8px 25px rgba(0,0,0,.1); display: flex; flex-direction: column; }
.stats-grid article span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.stats-grid article strong { margin: 10px 0 4px; font-family: "Fjalla One"; font-size: 34px; font-weight: 400; }
.stats-grid article small { color: var(--muted); margin-top: auto; }
.admin-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.admin-panel { padding: 27px; background: #fff; box-shadow: 0 8px 25px rgba(0,0,0,.1); }
.panel-heading { align-items: center; margin-bottom: 24px; }
.panel-heading select { width: auto; min-width: 190px; }
.add-day-form { margin-bottom: 22px; padding: 17px; background: var(--offwhite); display: grid; grid-template-columns: 1fr 1fr 1fr 160px; align-items: end; gap: 12px; }
.add-day-form[hidden] { display: none; }
.toggle-field { min-height: 46px; display: flex; align-items: center; gap: 9px; }
.toggle-field input, .service-active input { width: 18px; height: 18px; flex: 0 0 auto; }
.toggle-field span, .service-active span { margin: 0; }
.day-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; }
.admin-days { display: grid; gap: 8px; }
.admin-day { width: 100%; background: #fff; border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; }
.admin-day:hover { border-color: #111; }
.day-select { padding: 14px; background: transparent; border: 0; cursor: pointer; display: grid; grid-template-columns: 145px 1fr 65px; align-items: center; gap: 14px; text-align: left; }
.edit-day { padding: 8px 11px; color: var(--blue); background: #f7f7f4; border: 0; border-left: 1px solid var(--line); cursor: pointer; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.edit-day:hover { color: #fff; background: var(--blue); }
.day-date, .day-capacity span { display: grid; gap: 3px; }
.day-date strong { text-transform: capitalize; }
.admin-day small { color: var(--muted); }
.day-capacity { display: grid; gap: 7px; }
.day-capacity > span { grid-template-columns: 1fr auto; }
.capacity-track { height: 7px; background: #e8e8e4; }
.capacity-track em { height: 100%; display: block; }
.capacity-track .good { background: var(--green); }.capacity-track .warning { background: var(--orange); }.capacity-track .danger { background: var(--red); }
.day-status { padding: 5px 7px; color: #386614; background: #e6f2d9; font-size: 11px; font-weight: 700; text-align: center; text-transform: uppercase; }
.day-status.closed { color: #666; background: #eee; }
#admin-map { height: 440px; border: 1px solid var(--line); }
.services-panel, .zones-panel { margin-bottom: 16px; }
.panel-help { max-width: 760px; margin: -12px 0 22px; color: var(--muted); font-size: 13px; }
.zone-settings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.zone-setting { padding: 15px; background: var(--offwhite); display: grid; grid-template-columns: 1fr 145px 165px; align-items: end; gap: 12px; }
.zone-setting > small { grid-column: 1 / -1; color: var(--muted); }
.add-service-form { margin-bottom: 22px; padding: 17px; background: var(--offwhite); display: grid; grid-template-columns: 1.2fr .65fr .75fr 1.8fr auto; align-items: end; gap: 12px; }
.add-service-form[hidden] { display: none; }
.service-settings { border-top: 1px solid var(--line); }
.service-setting { padding: 15px 10px; display: grid; grid-template-columns: 70px 1.3fr 120px 145px 1.8fr 110px; gap: 12px; align-items: end; border-bottom: 1px solid var(--line); }
.service-setting label > span:first-child { font-size: 11px; }
.service-setting input { padding: 10px; }
.service-active { min-height: 41px; display: flex; align-items: center; gap: 7px; }
.service-setting > small { color: var(--muted); align-self: center; text-align: right; }
.input-suffix { display: grid; grid-template-columns: 1fr auto; align-items: center; border: 1px solid #bbb; }
.input-suffix input { min-width: 0; border: 0; }
.input-suffix em { padding-right: 9px; color: var(--muted); font-size: 11px; font-style: normal; }
.settings-footer { padding-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.settings-footer p { color: var(--muted); margin: 0; font-size: 12px; }
.booking-table-head, .booking-row { display: grid; grid-template-columns: 1.2fr 1.25fr 1.1fr .8fr 1fr; gap: 16px; align-items: center; }
.booking-table-head { padding: 0 14px 10px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.booking-row { padding: 16px 14px; border-top: 1px solid var(--line); }
.booking-row > div { min-width: 0; display: grid; gap: 3px; }
.booking-row small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.status-pill { width: fit-content; padding: 6px 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.status-pill.pending { color: #7b4c0d; background: #fff0d4; }.status-pill.confirmed { color: #386614; background: #e6f2d9; }.status-pill.cancelled, .status-pill.rejected { color: #6a2018; background: #f7dedb; }.status-pill.completed { background: #dcebf5; }
.row-actions { grid-template-columns: repeat(2, max-content); justify-content: end; }
.icon-button { padding: 6px 8px; color: #111; background: #fff; border: 1px solid #aaa; cursor: pointer; text-decoration: none; font-size: 11px; }
.icon-button.confirm { border-color: var(--green); }.icon-button.cancel { color: var(--red); border-color: #d4a7a2; }

/* Inloggning och engångsinstallation */
.auth-body { min-height: 100vh; padding: 35px 16px; display: grid; place-items: center; }
.auth-card { width: min(460px, 100%); padding: 35px 38px 40px; background: #fff; box-shadow: var(--shadow); }
.auth-card .brand { width: 190px; height: 112px; margin: 0 auto 18px; }
.auth-card .brand img { width: 185px; height: 110px; }
.auth-card h1 { margin-bottom: 12px; font-size: 34px; }
.auth-card > p:not(.kicker) { color: var(--muted); font-size: 13px; line-height: 1.55; }
.auth-card form { display: grid; gap: 18px; margin-top: 25px; }
.auth-card .button { width: 100%; margin-top: 6px; }
.auth-help, .auth-back { display: block; margin-top: 22px; font-size: 13px; }
.auth-back { color: var(--muted); }

@media (max-width: 940px) {
  .site-header { height: auto; }
  .header-inner { flex-direction: column; align-items: center; padding: 0; }
  .brand { height: 112px; }
  .brand img { height: 100px; }
  nav { width: 100%; overflow-x: auto; border-top: 1px solid var(--line); }
  nav a { flex: 1 0 auto; justify-content: center; align-items: center; min-height: 52px; padding: 10px 15px; font-size: 15px; }
  .booking-shell { margin-left: 18px; margin-right: 18px; grid-template-columns: 1fr; }
  .booking-summary { order: -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; padding: 25px; }
  .booking-summary > * { margin: 0; }
  .booking-summary dl { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); }
  .booking-summary dl div { padding: 10px; border: 1px solid #444; }
  .summary-note { grid-column: 1 / -1; }
  .admin-layout { grid-template-columns: 1fr; }
  .booking-table-head { display: none; }
  .booking-row { grid-template-columns: 1fr 1fr; align-items: start; }
  .booking-row > div:nth-child(4), .row-actions { justify-content: start; }
  .add-day-form { grid-template-columns: 1fr 1fr; }
  .add-service-form { grid-template-columns: 1fr 1fr; }
  .add-service-form .service-description { grid-column: 1 / -1; }
  .service-setting { grid-template-columns: 70px 1fr 110px 130px; }
  .service-setting .service-description { grid-column: 2 / -1; }
  .service-setting > small { grid-column: 1 / -1; text-align: left; }
  .zone-settings { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .hero { padding: 52px 18px 120px; }
  .hero h1 { font-size: 42px; }
  .booking-shell { margin-top: -75px; margin-left: 10px; margin-right: 10px; }
  .booking-main { padding: 28px 18px 38px; }
  .booking-summary { order: 0; grid-template-columns: 1fr; padding: 24px 18px; }
  .booking-summary dl { grid-column: 1; grid-template-columns: 1fr 1fr; }
  .summary-note { grid-column: 1; }
  .service-grid, .date-grid, .two-columns { grid-template-columns: 1fr; }
  .steps { margin: 28px 0 34px; }
  .steps li { font-size: 9px; }
  .section-heading, .step-intro, .map-heading, .panel-heading, .admin-titlebar { flex-direction: column; }
  .duration-chip { white-space: normal; }
  .map-heading .button { width: 100%; }
  #customer-map { height: 330px; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  footer { flex-direction: column; align-items: flex-start; gap: 20px; }
  .admin-main { padding: 0 10px; margin-top: 24px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid article { min-height: 115px; }
  .admin-panel { padding: 18px 12px; }
  .day-select { grid-template-columns: 1fr 70px; }
  .day-capacity { grid-column: 1 / -1; grid-row: 2; }
  .booking-row { grid-template-columns: 1fr; }
  .add-day-form { grid-template-columns: 1fr; }
  .add-service-form { grid-template-columns: 1fr; }
  .add-service-form .service-description { grid-column: auto; }
  .service-setting { grid-template-columns: 1fr 1fr; padding: 15px 0; }
  .service-setting .service-description, .service-setting > small { grid-column: 1 / -1; }
  .zone-settings { grid-template-columns: 1fr; }
  .settings-footer { align-items: stretch; flex-direction: column; }
  .settings-footer .button { width: 100%; }
  .panel-heading select { width: 100%; }
}
