/* =========================================================
   GRUNDER
   ========================================================= */
:root {
  --bg: #faf6f0;
  --bg-alt: #f2eae0;
  --surface: #ffffff;
  --text: #2b2521;
  --muted: #6f655d;
  --line: #e6dccf;
  --accent: #a8573b;
  --accent-dark: #8a4530;
  --accent-soft: #f4e3da;
  --gold: #c8a465;
  --success: #3d7a4f;
  --success-soft: #e3f1e6;
  --danger: #b23b3b;
  --danger-soft: #f7e1e1;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(43, 37, 33, 0.08);
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0 0 0.5rem; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: min(1120px, 100% - 2.5rem); margin: 0 auto; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.muted { color: var(--muted); }
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 620px; margin-bottom: 2.5rem; }
.section-head p:last-child { color: var(--muted); }

/* =========================================================
   KNAPPAR
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.3rem; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 0.95rem; line-height: 1; transition: all 0.18s ease;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-lg { padding: 0.95rem 1.8rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 240, 0.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; color: var(--text); }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.4rem 0.6rem; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; overflow: hidden; padding: 6rem 0 5rem; }
.hero .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 520px; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 1.8rem 0 1.2rem; }
.open-status { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.open-status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.open-status.closed .dot { background: var(--danger); }
.hero-art { position: relative; aspect-ratio: 1 / 1.1; }
.hero-art .blob {
  position: absolute; inset: 0; border-radius: 48% 52% 60% 40% / 45% 40% 60% 55%;
  background: linear-gradient(135deg, var(--accent-soft), #e8cdb8 50%, var(--gold));
}
.hero-art svg { position: absolute; inset: 15%; width: 70%; height: 70%; color: var(--accent-dark); }
.hero-badge {
  position: absolute; bottom: 8%; left: -4%; background: var(--surface); padding: 0.9rem 1.2rem;
  border-radius: var(--radius); box-shadow: var(--shadow); font-size: 0.9rem; line-height: 1.35;
}
.hero-badge strong { display: block; font-family: var(--font-head); font-size: 1.15rem; }

/* =========================================================
   TJÄNSTER
   ========================================================= */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.4rem; transition: transform 0.18s, box-shadow 0.18s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.service-card h3 { margin: 0; }
.service-card .desc { color: var(--muted); font-size: 0.95rem; flex: 1; margin: 0; }
.service-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px dashed var(--line); }
.service-meta .price { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; }
.service-meta .dur { color: var(--muted); font-size: 0.9rem; }

/* =========================================================
   BOKNING
   ========================================================= */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.booking { display: grid; grid-template-columns: 1fr 300px; overflow: hidden; }
.booking-main { padding: 2rem; min-height: 460px; display: flex; flex-direction: column; }
.booking-side { background: var(--bg-alt); padding: 2rem 1.6rem; border-left: 1px solid var(--line); }
.booking-side h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.summary { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.summary li { display: grid; gap: 0.15rem; font-size: 0.95rem; }
.summary .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.summary .val { font-weight: 600; }
.summary .val.empty { color: var(--muted); font-weight: 400; font-style: italic; }
.summary-total { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-weight: 600; }

.steps { list-style: none; display: flex; gap: 0.4rem; margin: 0 0 1.8rem; padding: 0; counter-reset: step; }
.steps li {
  flex: 1; counter-increment: step; font-size: 0.78rem; font-weight: 600; color: var(--muted);
  padding-top: 0.6rem; border-top: 3px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.steps li::before { content: counter(step) ". "; }
.steps li.done { border-color: var(--gold); color: var(--text); }
.steps li.active { border-color: var(--accent); color: var(--accent); }

.step { display: none; flex: 1; }
.step.active { display: block; animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step h3 { margin-bottom: 0.25rem; }
.step .hint { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.2rem; }

.choice-list { display: grid; gap: 0.6rem; }
.choice {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem 1.1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; transition: border-color 0.15s, background 0.15s; background: var(--surface);
}
.choice:hover { border-color: var(--gold); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice .name { font-weight: 600; }
.choice .sub { color: var(--muted); font-size: 0.85rem; }
.choice .right { text-align: right; white-space: nowrap; }

/* Kalender */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.cal-head h4 { margin: 0; font-size: 1.1rem; text-transform: capitalize; }
.cal-nav { background: var(--surface); border: 1px solid var(--line); border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; }
.cal-nav:hover:not(:disabled) { border-color: var(--text); }
.cal-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 0.3rem 0; }
.cal-day {
  aspect-ratio: 1; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--surface);
  display: grid; place-items: center; font-weight: 500; font-size: 0.95rem; position: relative;
}
.cal-day:not(:disabled):hover { border-color: var(--gold); }
.cal-day:disabled { color: #c9bfb3; background: transparent; cursor: not-allowed; text-decoration: line-through; }
.cal-day.today::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.cal-day.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.cal-day.empty { visibility: hidden; }
.cal-legend { display: flex; gap: 1.2rem; margin-top: 0.8rem; font-size: 0.8rem; color: var(--muted); }

/* Tider */
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.5rem; }
.time-slot { padding: 0.65rem 0.4rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-weight: 600; }
.time-slot:hover { border-color: var(--gold); }
.time-slot.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.empty-state { padding: 2rem; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius-sm); }

/* Formulär */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.7rem 0.85rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 80px; }
.field .error { color: var(--danger); font-size: 0.8rem; margin-top: 0.3rem; display: none; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .error { display: block; }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; color: var(--muted); }
.consent input { margin-top: 0.3rem; }

.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

/* Bekräftelse */
.confirm { text-align: center; padding: 1rem 0; }
.confirm .check { width: 68px; height: 68px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; margin: 0 auto 1rem; }
.confirm .code { display: inline-block; font-family: var(--font-head); font-size: 2rem; letter-spacing: 0.2em; padding: 0.4rem 1.2rem; background: var(--bg-alt); border-radius: var(--radius-sm); margin: 0.6rem 0 1rem; }
.confirm-details { text-align: left; max-width: 380px; margin: 0 auto 1.5rem; display: grid; gap: 0.4rem; font-size: 0.95rem; }
.confirm-details div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px dashed var(--line); }

.notice { padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); font-size: 0.92rem; margin-bottom: 1rem; }
.notice-info { background: var(--accent-soft); color: var(--accent-dark); }
.notice-success { background: var(--success-soft); color: var(--success); }
.notice-error { background: var(--danger-soft); color: var(--danger); }
.notice-warn { background: #fff4d6; color: #7a5a00; }

.cancel-box { margin-top: 1.5rem; }
.cancel-box summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.cancel-box .card { padding: 1.5rem; margin-top: 1rem; }
.inline-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 180px; padding: 0.7rem 0.85rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); text-transform: uppercase; }

/* =========================================================
   OM & KONTAKT
   ========================================================= */
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: start; }
.info-card { padding: 1.8rem; }
.info-card h3 { margin-bottom: 1rem; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 0.45rem 0; border-bottom: 1px dashed var(--line); font-size: 0.95rem; }
.hours td:last-child { text-align: right; font-weight: 600; }
.hours tr.today td { color: var(--accent); }
.hours .closed { color: var(--muted); font-weight: 400; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: 0.9rem; align-items: flex-start; }
.contact-list .ico { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.contact-list .lbl { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

.site-footer { padding: 2.5rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* =========================================================
   ADMIN
   ========================================================= */
.admin-body { background: var(--bg-alt); }
.admin-shell { width: min(1100px, 100% - 2rem); margin: 2rem auto; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.admin-bar h1 { font-size: 1.8rem; margin: 0; }
.login-card { max-width: 400px; margin: 10vh auto; padding: 2.4rem; }
.tabs { display: flex; gap: 0.4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.tab { padding: 0.7rem 1.1rem; background: none; border: none; border-bottom: 3px solid transparent; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tab.active { color: var(--accent); border-color: var(--accent); }
.panel { display: none; }
.panel.active { display: block; }
.toolbar { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.toolbar input[type="date"] { padding: 0.55rem 0.7rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.toolbar .spacer { flex: 1; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { padding: 1.1rem 1.3rem; }
.stat .num { font-family: var(--font-head); font-size: 2rem; line-height: 1; }
.stat .lbl { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.3rem; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.93rem; vertical-align: top; }
.table th { background: var(--bg); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }
.table .time { font-weight: 700; white-space: nowrap; }
.table .sub { display: block; color: var(--muted); font-size: 0.82rem; }
.table tr.cancelled td { opacity: 0.5; text-decoration: line-through; }
.table tr.block td { background: #fff8ea; }
.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.badge-active { background: var(--success-soft); color: var(--success); }
.badge-cancelled { background: var(--danger-soft); color: var(--danger); }
.badge-block { background: #fff0c8; color: #7a5a00; }

.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.6rem; }
.week-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem; min-height: 140px; }
.week-day.today { border-color: var(--accent); }
.week-day.closed { background: transparent; opacity: 0.6; }
.week-day h4 { font-family: var(--font-body); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.5rem; }
.week-day h4 span { display: block; font-size: 1.2rem; color: var(--text); letter-spacing: 0; }
.week-item { font-size: 0.78rem; padding: 0.3rem 0.45rem; border-radius: 5px; background: var(--accent-soft); margin-bottom: 0.3rem; line-height: 1.3; }
.week-item.block { background: #fff0c8; }
.week-item b { display: block; }

.admin-form { padding: 1.6rem; max-width: 620px; }
.admin-form .form-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }

/* =========================================================
   RESPONSIVT
   ========================================================= */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { width: min(340px, 80%); margin: 1rem auto 0; justify-self: center; }
  .booking { grid-template-columns: 1fr; }
  .booking-side { border-left: none; border-top: 1px solid var(--line); }
  .two-col, .split { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: 1fr; }
  .week-day { min-height: 0; }
}
@media (max-width: 700px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); flex-direction: column; padding: 1.2rem; border-bottom: 1px solid var(--line); align-items: stretch; }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .section { padding: 3.5rem 0; }
  .hero { padding: 3.5rem 0 3rem; }
  .booking-main { padding: 1.4rem; }
  .form-grid { grid-template-columns: 1fr; }
  .steps li { font-size: 0; }
  .steps li::before { font-size: 0.78rem; }
  .hero-badge { left: 0; }
}
