/* Studioleie – felles stil for forside, katalog, kundesider, firmaadmin og plattformadmin.
   Designretning A med Puls-farger: oransje og sort på hvit bakgrunn.
   Juster de to profilfargene her (--accent og --ink), resten følger etter. */
:root {
  --accent: #f26b1d;        /* Puls-oransje */
  --ink: #111111;           /* sort */
  --bg: #ffffff; --surface: #ffffff; --soft: #f5f4f2; --muted: #5c5c5c;
  --line: #e6e4e1; --field: #d6d3cf; --grid: #efedea;
  --accent-ink: #111111;    /* sort tekst på oransje (hvit tekst på oransje er for svak kontrast) */
  --accent-hover: #ff7d33; --accent-soft: #fff1e8; --link: #b5480c;
  --warn: #a8431d; --warn-soft: #fbeae4; --ok: #23634f; --ok-soft: #e9f4ef;
  --r-sm: 8px; --r: 10px; --r-lg: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.5; font-size: 15px; }
a { color: var(--link); }
a:hover { color: var(--ink); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 28px; font-weight: 700; margin: 8px 0 18px; }
h2 { font-size: 19px; font-weight: 700; margin: 28px 0 12px; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.inline { display: inline; }
code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* Topp */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; border-radius: var(--r); background: var(--accent); color: var(--ink); display: grid; place-items: center; font-size: 15px; }
.mainnav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.mainnav a, .linkbtn { color: var(--muted); text-decoration: none; }
.mainnav a:hover, .linkbtn:hover { color: var(--ink); }
.mainnav a.btn { color: var(--accent-ink); }
.linkbtn { background: none; border: 0; cursor: pointer; padding: 0; font: inherit; }
.mainnav select { width: auto; padding: 4px 6px; border-radius: 6px; font-size: 13px; }
main.wrap { padding-top: 24px; padding-bottom: 64px; min-height: 70vh; }
.footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 13px; }

/* Knapper */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: var(--accent-ink);
  border: 1.5px solid var(--accent); border-radius: var(--r); padding: 11px 18px; min-height: 44px; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #2b2b2b; border-color: #2b2b2b; color: #fff; }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: 13px; border-radius: var(--r-sm); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.danger { background: var(--warn); border-color: var(--warn); }
.btn:focus-visible, .tabs a:focus-visible, .sidenav a:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Skjema */
form p { margin: 0 0 14px; }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=month], input[type=search], input[type=url], input[type=tel], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--field); border-radius: var(--r); background: #fff;
  font: inherit; font-size: 15px; color: var(--ink); }
input[type=color] { width: 64px; height: 40px; padding: 2px; border: 1px solid var(--field); border-radius: var(--r-sm); background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-color: var(--accent); }
input[type=checkbox] { width: auto; margin-right: 6px; accent-color: var(--accent); }
.helptext { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 4px; }
.errorlist { color: var(--warn); margin: 4px 0; padding-left: 18px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 20px; }
.form-grid .full, .form-grid p:has(textarea), .form-grid p:has(ul) { grid-column: 1 / -1; }
ul#id_studios, .checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
ul#id_studios label { font-weight: 400; display: inline; font-size: 14px; }

/* Kort og layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.split { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.tile img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--soft); }
.tile .ph { aspect-ratio: 16/9; background: var(--soft); }
.tile .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.tile .body .btn { align-self: flex-start; margin-top: auto; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: #eaf5ee; color: #1d6b3a; text-decoration: none; }
.badge.warn { background: var(--accent-soft); color: var(--link); }
.badge.grey { background: var(--soft); color: var(--muted); }
.hero { padding: 40px 0 24px; }
.hero h1 { font-size: 40px; max-width: 18em; letter-spacing: -.02em; }
.search { display: flex; gap: 10px; flex-wrap: wrap; }
.search input[type=search] { flex: 1 1 260px; }
.search select { width: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; text-decoration: none; color: var(--ink); }
a.stat:hover { border-color: var(--accent); color: var(--ink); }
.stat b { display: block; font-size: 24px; letter-spacing: -.01em; }
.stat span { color: var(--muted); font-size: 13px; }

/* Tabeller */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: top; }
th { background: var(--soft); font-size: 12px; font-weight: 600; color: var(--muted); }
tbody tr:hover td { background: #fbfaf8; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; background: var(--soft); border-top: 1px solid var(--line); }
.prices { margin: 0; padding: 0; list-style: none; }
.prices li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--grid); padding: 5px 0; }
.prices s { color: var(--muted); margin-right: 6px; }

/* Meldinger */
.messages { margin-bottom: 16px; display: grid; gap: 8px; }
.msg { padding: 12px 14px; border-radius: var(--r); background: var(--ok-soft); color: var(--ok); }
.msg.error { background: var(--warn-soft); color: var(--warn); }

/* Admin-layout */
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
.sidenav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; align-self: start; }
.sidenav a { padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: 14px; }
.sidenav a:hover { background: var(--soft); color: var(--ink); }
.sidenav a.active { background: var(--ink); color: #fff; font-weight: 600; box-shadow: inset 4px 0 0 var(--accent); }
.sidenav .label { font-size: 12px; font-weight: 600; color: var(--muted); margin: 16px 12px 4px; }
.sidenav .label:first-child { margin-top: 0; color: var(--ink); font-size: 14px; }
@media (max-width: 760px) { .admin-layout { grid-template-columns: 1fr; gap: 16px; } .sidenav { position: static; flex-direction: row; flex-wrap: wrap; } .sidenav .label { display: none; } }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters label { font-size: 12px; }
.filters input, .filters select { width: auto; }
.tabs { display: inline-flex; gap: 0; margin-bottom: 14px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--ink); background: var(--surface); font-size: 14px; border-right: 1px solid var(--line); }
.tabs a:last-child { border-right: 0; }
.tabs a:hover { background: var(--soft); color: var(--ink); }
.tabs a.active { background: var(--ink); color: #fff; }

/* Booking */
.price-box { position: sticky; top: 16px; }
.total-line { display: flex; justify-content: space-between; padding: 5px 0; }
.total-line.big { font-size: 20px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.addon { display: grid; grid-template-columns: 1fr 90px; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--grid); }
.addon:last-child { border-bottom: 0; }
.addon .name { font-weight: 600; }

/* Kalender (samme uttrykk som bookingsiden) */
#calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.fc { --fc-border-color: var(--grid); --fc-today-bg-color: var(--soft); --fc-now-indicator-color: var(--accent); font-size: 13px; }
.fc .fc-button-primary { background: #fff; border-color: var(--line); color: var(--ink); border-radius: var(--r-sm); box-shadow: none !important; }
.fc .fc-button-primary:hover { background: var(--soft); border-color: var(--line); color: var(--ink); }
.fc .fc-button-primary:not(:disabled).fc-button-active, .fc .fc-button-primary:not(:disabled):active { background: var(--ink); border-color: var(--ink); color: #fff; }
.fc .fc-button-group > .fc-button { border-radius: 0; }
.fc .fc-button-group > .fc-button:first-child { border-radius: 8px 0 0 8px; }
.fc .fc-button-group > .fc-button:last-child { border-radius: 0 8px 8px 0; }
.fc .fc-toolbar-title { font-size: 17px; font-weight: 700; }
.fc .fc-col-header-cell-cushion { color: var(--ink); font-weight: 600; text-decoration: none; }
.fc .fc-timegrid-slot-label-cushion { color: var(--muted); font-size: 11px; }
.fc .ev-busy { background: #e3e1db; border-color: #e3e1db; }
.fc .ev-busy .fc-event-main { color: var(--muted); }
.fc .ev-own, .fc .fc-event-mirror { background: var(--accent-soft); border: 2px solid var(--accent); }
.fc .ev-own .fc-event-main, .fc .fc-event-mirror .fc-event-main { color: var(--ink); font-weight: 600; }
.fc .fc-highlight { background: color-mix(in srgb, var(--accent) 18%, transparent); }
@media (max-width: 640px) { .fc .fc-toolbar { flex-wrap: wrap; gap: 8px; } }

/* Utskrift av faktura */
@media print {
  .topbar, .footer, .sidenav, .no-print, .messages { display: none !important; }
  body { background: #fff; }
  .admin-layout { display: block; }
  .card, .table-wrap { border: 0; padding: 0; }
}

/* Felles småting for nye moduler */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.price { font-size: 18px; }
.price.big { font-size: 28px; letter-spacing: -.01em; }
.hero-img { width: 100%; border-radius: var(--r-lg); margin: 4px 0 16px; aspect-ratio: 16/9; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 16px; }
.facts div { background: var(--soft); border-radius: var(--r); padding: 10px 12px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--grid); }
.plain li form { margin: 0; }
.plain-fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.plain-fieldset legend { font-weight: 600; font-size: 13px; margin-bottom: 6px; padding: 0; }
.svc { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--grid); }
.svc label { font-weight: 400; font-size: 14px; margin: 0; }
.svc input[type=number] { width: 70px; }
.meter { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; width: 160px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.meter span { display: block; height: 100%; background: var(--accent); }
.fc .ev-block { background: repeating-linear-gradient(135deg, #e6e4e1 0 6px, #f2f0ed 6px 12px); border-color: #d6d3cf; }
.fc .ev-block .fc-event-main { color: var(--muted); }

/* Møterom: kort med sanntidsstatus */
.mr-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; color: var(--ink); background: #fff; }
.mr-card:hover { border-color: var(--ink); color: var(--ink); }
.mr-card-body { display: flex; flex-direction: column; gap: 2px; }
.mr-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; }
.mr-card.free .mr-dot { background: #1f8a4c; }
.mr-card.busy .mr-dot { background: var(--accent); }
.mr-status { font-weight: 600; font-size: 14px; }
.mr-card.free .mr-status { color: #1d6b3a; }
.mr-card.busy .mr-status { color: var(--link); }

/* Møterom: dagsplan (rom som rader, timer som kolonner) */
.mr-day { border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; background: #fff; }
.mr-day-head, .mr-day-row { display: grid; grid-template-columns: 180px minmax(640px, 1fr); }
.mr-day-head { border-bottom: 1px solid var(--line); background: var(--soft); }
.mr-hours { display: grid; grid-template-columns: repeat(var(--hours), 1fr); font-size: 12px; color: var(--muted); }
.mr-hours span { padding: 8px 6px; border-left: 1px solid var(--grid); }
.mr-day-row { border-bottom: 1px solid var(--grid); }
.mr-day-row:last-child { border-bottom: 0; }
.mr-day-name { padding: 12px 14px; font-weight: 600; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.mr-day-name small { font-weight: 400; color: var(--muted); }
.mr-track { position: relative; min-height: 58px; cursor: copy;
  background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px); background-size: calc(100% / var(--hours)) 100%; }
.mr-track:hover { background-color: #fffaf6; }
.mr-block { position: absolute; top: 6px; bottom: 6px; border-radius: 8px; background: #ebe8e4; color: var(--ink); font-size: 12px;
  padding: 4px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: default; border: 1px solid #ddd9d4; }
.mr-block.mine { background: var(--accent-soft); border: 2px solid var(--accent); }
.mr-block.blocked { background: repeating-linear-gradient(135deg, #e6e4e1 0 6px, #f2f0ed 6px 12px); color: var(--muted); }
.mr-now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); pointer-events: none; }

/* Salgsforside */
.landing main.wrap { padding-top: 0; }
.lp-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--link); margin: 0 0 10px; }
.lp-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; padding: 56px 0 48px; }
.lp-hero h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.02; letter-spacing: -.03em; margin: 0 0 18px; }
.lp-lead { font-size: 18px; color: #333; max-width: 46ch; margin: 0 0 24px; }
.lp-checks { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.lp-checks li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.lp-shot { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0,0,0,.35); background: #fff; }
.lp-shot img { display: block; width: 100%; height: auto; }
.lp-shot-hero { transform: rotate(-1deg); }
.lp-shot-tablet { border: 12px solid var(--ink); border-radius: 28px; }
.lp-band { background: var(--ink); color: #fff; border-radius: 20px; padding: 40px; margin: 8px 0 64px; }
.lp-band h2 { margin: 0 0 24px; font-size: 28px; }
.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.lp-steps b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--ink); font-size: 18px; margin-bottom: 12px; }
.lp-steps h3 { font-size: 19px; margin: 0 0 6px; }
.lp-steps p { margin: 0; color: #cfcfcf; }
.lp-feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; margin: 0 0 80px; }
.lp-reverse .lp-text { order: 2; }
.lp-feature h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 12px; }
.lp-feature p { font-size: 16px; color: #333; }
.lp-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.lp-list li { padding-left: 22px; position: relative; }
.lp-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 3px; background: var(--accent); border-radius: 2px; }
.lp-mini { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); }
.lp-mini:hover { border-color: var(--ink); color: var(--ink); }
.lp-cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: var(--accent); color: var(--ink);
  border-radius: 20px; padding: 36px 40px; margin: 64px 0 0; }
.lp-cta h2 { margin: 0 0 6px; font-size: 28px; }
.lp-cta p { margin: 0; max-width: 56ch; }
.lp-cta .btn { background: var(--ink); border-color: var(--ink); color: #fff; }
.lp-cta .btn:hover { background: #2b2b2b; }
.btn.ghost-light { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost-light:hover { background: var(--ink); color: #fff; }
@media (max-width: 860px) {
  .lp-hero, .lp-feature { grid-template-columns: 1fr; gap: 28px; }
  .lp-reverse .lp-text { order: 0; }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-band, .lp-cta { padding: 28px 22px; }
  .lp-shot-hero { transform: none; }
}
