/* FixDesk — Careem-inspired design system
   Bright green + deep ink, big radii, pill buttons, generous air. */

:root {
  --green: #00E783;
  --green-soft: #7CF3BE;
  --green-dark: #00B865;
  --ink: #0B1F15;
  --ink-2: #3D5A4C;
  --mint: #E9FBF2;
  --mint-2: #F5FDF9;
  --paper: #FFFFFF;
  --bg: #FAFDFB;
  --line: #E2F0E8;
  --amber: #FFC93C;
  --red: #E5484D;
  --r-lg: 24px;
  --r-md: 16px;
  --shadow: 0 6px 24px rgba(11, 31, 21, 0.07);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
/* iOS Safari only honours horizontal clipping when it sits on <html> too —
   without it, any 1px-too-wide element lets the page pan into blank space. */
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1400px; }
.ic { width: 20px; height: 20px; flex: 0 0 auto; }
.mut { color: var(--ink-2); }
.small { font-size: 13px; }
.prewrap { white-space: pre-wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 0; cursor: pointer; font: 600 15px/1 var(--font);
  padding: 12px 22px; border-radius: 999px; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--green); color: var(--ink); box-shadow: 0 4px 14px rgba(0, 231, 131, .35); }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1d3a2b; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--mint); }
.btn-lg { padding: 16px 30px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn .ic { width: 17px; height: 17px; }

/* ---------- Cards, badges ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 16px; }
.card-title .ic { color: var(--green-dark); }
.card-title .mut { font-size: 13px; font-weight: 400; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 12.5px/1 var(--font); padding: 6px 12px; border-radius: 999px;
  background: var(--mint); color: var(--ink);
}
.badge .ic { width: 14px; height: 14px; }
.badge.loc { background: #EEF4FF; color: #23408E; }
.badge.loc-out { background: #FFF1E0; color: #9A4E12; }
.badge.signed { background: var(--mint); color: #056B3F; }
.badge.unsigned { background: #FDEEEE; color: #9E2B2F; }
.st-received { background: var(--mint); color: #056B3F; }
.st-diagnosing { background: #FFF6DE; color: #8A6410; }
.st-awaiting_approval { background: #FFF0E4; color: #9A4E12; }
.st-awaiting_customer { background: #FFEFF6; color: #A02D62; }
.st-awaiting_parts { background: #F1EBFF; color: #5B3AA6; }
.st-in_repair { background: #E4F1FF; color: #1D5CA8; }
.st-ready { background: #00E783; color: #0B1F15; }
.st-delivered { background: #EDF2EF; color: #3D5A4C; }
.st-returned { background: #E9EDF5; color: #44507A; }
.st-unrepairable { background: #FDEEEE; color: #9E2B2F; }

.ok-box, .err-box {
  display: flex; align-items: center; gap: 10px; border-radius: var(--r-md);
  padding: 14px 18px; margin-bottom: 18px; font-weight: 500;
}
.ok-box { background: var(--mint); color: #056B3F; }
.err-box { background: #FDEEEE; color: #9E2B2F; }

/* ---------- Forms ---------- */
label { display: block; font: 600 13.5px/1.3 var(--font); color: var(--ink); margin-bottom: 14px; }
label input, label textarea, select, .flexline input {
  display: block; width: 100%; margin-top: 6px;
  font: 400 15px/1.4 var(--font); color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--paper); outline: none; transition: border .12s ease;
}
label input:focus, label textarea:focus, select:focus { border-color: var(--green); }
select { width: auto; padding-right: 34px; }
label select, .field select { width: 100%; } /* fill the column like inputs do */
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-label { display: block; font: 600 13.5px/1.3 var(--font); margin-bottom: 6px; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 4px; }

.seg { display: flex; gap: 8px; }
.seg label { flex: 1; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; padding: 0; border: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 10px; border-radius: var(--r-md); border: 1.5px solid var(--line);
  font-weight: 600; font-size: 14px; transition: all .12s ease;
}
.seg input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg input:checked + span .ic { color: var(--green); }

/* ---------- Public nav ---------- */
.pnav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.pnav-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 20px/1 var(--font); letter-spacing: -0.02em; }
.logo-mark { width: 34px; height: 34px; }
.pnav-links { display: flex; gap: 22px; font-weight: 500; color: var(--ink-2); }
.pnav-links a:hover { color: var(--ink); }
.pnav-cta { margin-left: auto; display: flex; gap: 10px; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--mint-2), var(--bg)); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--mint);
  color: #056B3F; font: 600 13px/1 var(--font); padding: 8px 14px; border-radius: 999px; margin-bottom: 22px;
}
.chip-row .chip { margin-bottom: 0; }
.chip .ic { width: 15px; height: 15px; }
.chip-se { background: #EAF3FB; color: #06407A; }
.chip-se svg { flex: none; border-radius: 2px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); font-weight: 800; margin-bottom: 18px; }
.hero-copy p { font-size: 18px; color: var(--ink-2); max-width: 34em; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-ticks { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.hero-ticks li { display: flex; align-items: center; gap: 7px; }
.hero-ticks .ic { width: 15px; height: 15px; color: var(--green-dark); }
.hero-art svg { width: 100%; height: auto; }

/* ---------- Sections ---------- */
section h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; text-align: center; }
.sect-sub { text-align: center; color: var(--ink-2); margin: 12px auto 0; max-width: 44em; font-size: 17px; }

.feat { padding: 84px 0; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.feat-card .ic { width: 28px; height: 28px; color: var(--green-dark); margin-bottom: 14px; }
.feat-card h3 { font-size: 17px; margin-bottom: 8px; }
.feat-card p { color: var(--ink-2); font-size: 14.5px; }

.how { padding: 40px 0 84px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.how-step { text-align: center; padding: 10px 18px; }
.how-n {
  display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center;
  background: var(--green); color: var(--ink); font: 800 20px/1 var(--font); border-radius: 50%; margin-bottom: 14px;
}
.how-step h3 { font-size: 17px; margin-bottom: 6px; }
.how-step p { color: var(--ink-2); font-size: 14.5px; }

/* ---------- Pricing ---------- */
.pricing { padding: 30px 0 90px; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 46px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; gap: 6px; position: relative; padding: 30px 28px; }
.price-hot { border: 2px solid var(--green); box-shadow: 0 14px 40px rgba(0, 231, 131, .22); }
.price-flag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--green); font: 700 12px/1 var(--font);
  padding: 8px 16px; border-radius: 999px;
}
.price-card h3 { font-size: 18px; }
.price-num { font: 800 30px/1.1 var(--font); letter-spacing: -0.02em; margin: 6px 0 2px; }
.price-blurb { color: var(--ink-2); font-size: 14px; margin-bottom: 14px; }
.price-list { list-style: none; display: grid; gap: 10px; margin-bottom: 22px; flex: 1; }
.price-list li { display: flex; align-items: center; gap: 9px; font-size: 14.5px; }
.price-list .ic { width: 16px; height: 16px; color: var(--green-dark); }

/* ---------- Contact ---------- */
.contact { padding: 0 0 90px; }
.contact-in { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact h2, .contact .sect-sub { text-align: left; }
.contact-form { display: grid; gap: 4px; }

/* ---------- Footer ---------- */
.pfoot { background: var(--ink); color: #CFE7DA; }
.pfoot .logo { color: #fff; }
.pfoot-in { display: flex; justify-content: space-between; gap: 40px; padding: 54px 24px 30px; flex-wrap: wrap; }
.pfoot-tag { margin-top: 12px; font-size: 14px; color: #8FB8A3; }
.pfoot-cols { display: flex; gap: 60px; }
.pfoot-cols h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.pfoot-cols a { display: block; font-size: 14px; color: #8FB8A3; margin-bottom: 8px; }
.pfoot-cols a:hover { color: var(--green); }
.pfoot-base { padding: 18px 24px 26px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #6E9A85; }

/* ---------- Auth pages ---------- */
.auth { padding: 60px 0 90px; background: linear-gradient(180deg, var(--mint-2), var(--bg)); min-height: 60vh; }
.auth-in { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 480px; padding: 36px; }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.auth-sub { color: var(--ink-2); margin-bottom: 22px; }
.auth-alt { margin-top: 18px; font-size: 14px; color: var(--ink-2); text-align: center; }
.auth-alt a { color: var(--green-dark); font-weight: 600; }
.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.plan-opt { position: relative; margin: 0; cursor: pointer; }
.plan-opt input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; padding: 0; border: 0; pointer-events: none; }
.plan-opt span { display: block; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); font-weight: 400; font-size: 14px; }
.plan-opt input:checked + span { border-color: var(--green); background: var(--mint); }

/* ---------- Tracking ---------- */
.track-card { max-width: 520px; }
.track-status { display: flex; gap: 10px; margin: 4px 0 22px; flex-wrap: wrap; }
.timeline { list-style: none; display: grid; gap: 0; margin: 8px 0; }
.timeline li { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::before {
  content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line);
}
.tl-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--green); flex: 0 0 auto; margin-top: 3px; }
.timeline strong { display: block; font-size: 14.5px; }
.timeline small { color: var(--ink-2); font-size: 12.5px; }
.track-note { margin-top: 20px; font-size: 14px; color: var(--ink-2); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--paper); border-right: 1px solid var(--line);
  padding: 18px 16px; display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; /* the menu must never clip Kontrollpanel/Admin/footer on short windows */
}
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 14px;
  border-radius: var(--r-md); font-weight: 600; font-size: 14px; color: var(--ink-2);
}
.side-nav a { transition: background .12s ease, color .12s ease, transform .12s ease; }
.side-nav a:hover { background: var(--mint); color: var(--ink); transform: translateX(2px); }
.side-nav a:hover .ic { color: var(--green-dark); }
.side-nav a.on { background: var(--mint); color: var(--ink); }
.side-nav a.on .ic { color: var(--green-dark); }
/* "Nytt ärende" is the start-here action — always green so it can't be missed */
.side-nav a.side-cta, .side-nav a.side-cta.on { background: var(--green); color: #0B1F15; font-weight: 700; }
.side-nav a.side-cta:hover { background: var(--green-dark); color: #fff; }
.side-nav a.side-cta .ic, .side-nav a.side-cta.on .ic { color: currentColor; }
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.side-shop { font-size: 13px; }
.side-shop strong { display: block; }
.side-shop small { color: var(--ink-2); }

.main { padding: 30px 34px 60px; max-width: 1280px; width: 100%; margin: 0 auto; overflow-x: clip; }
.main-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; padding-right: 56px; /* clear the fixed notification bell */ }
.main-head h1 { font-size: 26px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
  display: grid; gap: 2px; padding: 20px 22px;
  background: linear-gradient(160deg, var(--mint-2) 0%, var(--paper) 55%);
  border-color: #D4EEDF;
  transition: transform .14s ease, box-shadow .14s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(11, 31, 21, .10); }
.stat-n { font: 800 28px/1.1 var(--font); letter-spacing: -0.02em; }
.stat-l { color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.stat-link { transition: transform .1s ease; }
.stat-link:hover { transform: translateY(-2px); }
.stat-green { color: var(--green-dark); }
.stat-amber { color: #B47708; }
.stat-red { color: #C43C40; }

/* Reports */
.bar-list { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: center; font-size: 13.5px; }
.bar-row .bar { height: 12px; border-radius: 999px; background: var(--mint); overflow: hidden; }
.bar-row .bar span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.bar-row strong { font-variant-numeric: tabular-nums; }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font: 600 12.5px/1 var(--font); color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s ease; }
.tbl tbody tr:hover td { background: var(--mint-2); }
.tbl-sticky tbody tr:hover td:last-child { background: var(--mint-2); }
.tlink { font-weight: 700; color: var(--green-dark); }
.tlink:hover { text-decoration: underline; }
.signed-dot .ic { width: 14px; height: 14px; color: var(--green-dark); vertical-align: -2px; }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); display: grid; gap: 14px; justify-items: center; }

.filter-bar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 16px; }
.search .ic { color: var(--ink-2); width: 17px; height: 17px; }
.search input { border: 0; outline: none; flex: 1; padding: 12px 0; font: 400 15px var(--font); background: transparent; }

.plan-note { margin-top: 18px; display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; }
.plan-note .ic { width: 15px; height: 15px; color: var(--green-dark); }
.plan-note a { color: var(--green-dark); font-weight: 600; }
.plan-note-inline { color: var(--ink-2); font-size: 13.5px; align-self: center; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.stack { display: grid; gap: 18px; }
.stack .two-col, .stack .card { margin-bottom: 0; }
.ticket-form { display: grid; gap: 18px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; font-size: 14.5px; }
.kv dt { color: var(--ink-2); font-weight: 500; }
.loc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-form { display: flex; gap: 10px; margin-bottom: 18px; }
.status-form select { flex: 1; }
.note-form { display: flex; gap: 10px; margin-bottom: 16px; }
.note-form input { flex: 1; margin: 0; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); font: 400 15px var(--font); outline: none; }
.note-form input:focus { border-color: var(--green); }
.note { padding: 12px 0; border-top: 1px solid var(--line); }
.note.n-sms, .note.n-email, .note.n-warn {
  padding: 12px 14px; margin: 8px 0; border-top: 0; border-radius: var(--r-md);
  border: 1px solid transparent;
}
.note.n-sms { background: var(--mint); border-color: var(--green-soft); }
.note.n-email { background: #EEF4FF; border-color: #CBDCF6; }
.note.n-warn { background: #FFF6DE; border-color: #F2DFA8; }
.note-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font: 700 11.5px/1 var(--font); text-transform: uppercase; letter-spacing: .4px;
  margin-bottom: 6px; padding: 4px 9px; border-radius: 999px;
}
.note-tag .ic { width: 13px; height: 13px; }
.note-tag.sms { background: var(--green); color: var(--ink); }
.note-tag.email { background: #23408E; color: #fff; }
.note p { font-size: 14.5px; }

/* New-ticket wizard */
.wiz-steps { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.wiz-step {
  display: flex; align-items: center; gap: 8px; font: 600 13.5px/1 var(--font);
  color: var(--ink-2); padding: 9px 16px 9px 10px; border-radius: 999px;
  background: var(--paper); border: 1.5px solid var(--line); opacity: .55;
}
.wiz-step.on { opacity: 1; border-color: var(--green); }
.wiz-dot {
  display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--mint); color: var(--ink); font-weight: 800; font-size: 12px;
}
.wiz-step.on .wiz-dot { background: var(--green); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.type-card { position: relative; margin: 0; cursor: pointer; }
.type-card input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; padding: 0; border: 0; pointer-events: none; }
.type-card span {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 12px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-weight: 400; transition: all .12s ease; background: var(--paper);
}
.type-card .ic { width: 30px; height: 30px; color: var(--ink-2); }
.type-card input:checked + span { border-color: var(--green); background: var(--mint); }
.type-card input:checked + span .ic { color: var(--green-dark); }
#brandPick { width: 100%; margin-top: 6px; }
.chip-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip-item { display: inline-flex; align-items: center; gap: 8px; background: var(--mint); border-radius: 999px; padding: 7px 8px 7px 14px; font: 600 13.5px/1 var(--font); }
.chip-item.locked { background: var(--mint-2); color: var(--ink-2); padding-right: 14px; }
.chip-x { border: 0; background: none; cursor: pointer; color: var(--ink-2); font: 700 14px/1 var(--font); padding: 2px 6px; border-radius: 50%; }
.chip-x:hover { background: #FDEEEE; color: #9E2B2F; }
.inline-add { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-add label { flex: 1; min-width: 140px; margin: 0; }

/* Control panel tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tab-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 600 14px/1 var(--font); color: var(--ink-2);
  padding: 11px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper);
  transition: all .12s ease;
}
.tab-btn .ic { width: 16px; height: 16px; }
.tab-btn:hover { background: var(--mint-2); }
.tab-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab-btn.on .ic { color: var(--green); }

/* Wizard sizing: keep the flow readable, not full-bleed wide */
.ticket-form, .wiz-steps { max-width: 780px; }

/* Device builder cards */
.dev-card { margin-bottom: 16px; }
.dev-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-opt { position: relative; margin: 0; cursor: pointer; }
.pill-opt input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; padding: 0; border: 0; pointer-events: none; }
.pill-opt span {
  display: inline-block; padding: 9px 15px; border: 1.5px solid var(--line);
  border-radius: 999px; font: 600 13.5px/1 var(--font); background: var(--paper);
  transition: all .1s ease; user-select: none;
}
.pill-opt input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill-opt.fault input:checked + span { background: var(--green); color: var(--ink); border-color: var(--green); }
.age-line { font-weight: 600; white-space: nowrap; }
/* Bare inputs outside <label> (e.g. Bokad tid) get the same rounded look */
input[type="datetime-local"], input[type="date"], input[type="time"] {
  font: 400 15px/1.4 var(--font); color: var(--ink);
  padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--paper); outline: none; transition: border .12s ease;
}
input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="time"]:focus { border-color: var(--green); }

/* Device hero on the ticket page — the device should be unmissable */
.dev-hero {
  display: flex; align-items: center; gap: 14px;
  background: var(--mint); border-radius: var(--r-md);
  padding: 14px 16px; margin-bottom: 16px;
}
.dev-hero > .ic { width: 34px; height: 34px; color: var(--green-dark); }
.dev-hero-txt { min-width: 0; }
.dev-hero-txt strong { display: block; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.dev-hero-txt small { color: var(--ink-2); font-size: 13px; }

/* Interactive polish: light green + slight motion (respects reduced motion) */
.doc-gen .btn, .main-head .btn, .filter-bar .btn { transition: transform .12s ease, background .12s ease, box-shadow .12s ease; }
.card { transition: box-shadow .16s ease; }
.badge { transition: background .12s ease; }
details > summary { transition: color .12s ease; }
details > summary:hover { color: var(--green-dark); }
.notif-bell { transition: transform .12s ease, background .12s ease; }
.notif-bell:hover { transform: translateY(-1px) scale(1.04); }
.notif-item { transition: background .1s ease, padding-left .12s ease; }
.notif-item:hover { padding-left: 18px; }
.tlink { transition: color .1s ease; }
@media (prefers-reduced-motion: reduce) {
  .stat, .btn, .side-nav a, .notif-bell, .notif-item, .stat-link { transition: none !important; }
  .stat:hover, .btn:hover, .side-nav a:hover, .notif-bell:hover { transform: none !important; }
}

/* Ticket summary strip */
.tk-summary { margin-bottom: 18px; }
.tk-summary .stat-n.tk-sum-dev { font-size: 19px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 980px) { .tk-summary { grid-template-columns: 1fr 1fr; } }

/* Support thread */
.sup-thread { display: flex; flex-direction: column; gap: 10px; }
.sup-msg { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.sup-msg.shop { background: var(--paper); }
.sup-msg.support { background: var(--mint); border-color: var(--green-soft); }
.sup-meta { font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; }
.sup-sys { text-align: center; font-size: 12.5px; color: var(--ink-2); padding: 2px 0; }

/* Wide tables: keep the action column visible while scrolling sideways */
.tbl-sticky th:last-child, .tbl-sticky td:last-child {
  position: sticky; right: 0; background: var(--paper);
  box-shadow: -10px 0 10px -8px rgba(11, 31, 21, .12);
}
.tbl-sticky tr.grp td { position: static; box-shadow: none; }
tr.grp td { background: var(--mint); font-weight: 800; font-size: 13.5px; padding: 8px 12px; }
tr.grp.sub td { background: var(--mint-2); font-weight: 600; padding-left: 28px; }

/* Notification bell (top right, Facebook-style) */
.notif-wrap { position: fixed; top: 14px; right: 18px; z-index: 400; }
.notif-bell {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--paper); cursor: pointer; box-shadow: var(--shadow); color: var(--ink);
}
.notif-bell:hover { background: var(--mint); }
.notif-bell .ic { width: 20px; height: 20px; }
.notif-count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  border-radius: 999px; background: var(--red); color: #fff;
  font: 700 11px/18px var(--font); text-align: center; padding: 0 4px;
}
.notif-panel {
  position: absolute; top: 50px; right: 0; width: 330px; max-width: calc(100vw - 36px);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 12px 40px rgba(11,31,21,.16); overflow: hidden;
}
.notif-head { font: 700 14px/1 var(--font); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: block; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--mint-2); }
.notif-item small { display: block; color: var(--ink-2); margin-top: 2px; font-size: 12px; }

.side-clock { display: flex; align-items: baseline; gap: 7px; padding: 4px 10px 8px; }
.side-clock strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.side-clock small { font-size: 11.5px; color: var(--mut); }
.fault-plus {
  padding: 9px 15px; border: 1.5px dashed var(--line); border-radius: 999px;
  font: 600 13.5px/1 var(--font); background: var(--paper); color: var(--mut);
  cursor: pointer; transition: all .1s ease;
}
.fault-plus:hover { border-color: var(--ink); color: var(--ink); }
.fault-new { gap: 6px; align-items: center; }
.fault-new input {
  font: 400 14px/1 var(--font); color: var(--ink); padding: 8px 12px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper);
  outline: none; width: 180px;
}
.fault-new input:focus { border-color: var(--green); }

/* Model autocomplete */
.ac-wrap { position: relative; }
.ac-wrap input { display: block; width: 100%; margin-top: 6px; font: 400 15px/1.4 var(--font); color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper); outline: none; }
.ac-wrap input:focus { border-color: var(--green); }
.dev-brand-custom { width: 100%; font: 400 15px/1.4 var(--font); color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper); outline: none; }
.dev-brand-custom:focus { border-color: var(--green); }
.ac-panel {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 40; margin-top: 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 12px 30px rgba(11,31,21,.14); overflow: hidden; max-height: 264px; overflow-y: auto;
}
.ac-item { padding: 11px 16px; font-size: 14.5px; cursor: pointer; }
.ac-item + .ac-item { border-top: 1px solid var(--mint-2); }
.ac-item:hover, .ac-item.active { background: var(--mint); }
.ac-item mark { background: none; color: var(--green-dark); font-weight: 700; }

/* Modal (customer found) */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(11,31,21,.45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box { background: var(--paper); border-radius: var(--r-lg); padding: 28px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(11,31,21,.3); }
.modal-box h3 { margin-bottom: 12px; }
.modal-cust { background: var(--mint-2); border-radius: var(--r-md); padding: 14px 16px; font-size: 14.5px; margin-bottom: 18px; line-height: 1.6; }
.modal-actions { display: grid; gap: 8px; }

/* Terms + summary */
.terms-box {
  white-space: pre-wrap; background: var(--mint-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px; font-size: 13.5px; line-height: 1.7;
  max-height: 220px; overflow-y: auto; color: var(--ink-2);
}
.sum-row { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--mint-2); font-size: 14.5px; }
.sum-row:last-child { border-bottom: 0; }
.sum-row strong { color: var(--ink-2); font-size: 13px; }

/* Price rows */
.price-lines { display: grid; gap: 6px; font-size: 14.5px; margin-bottom: 14px; }
.price-lines > div { display: flex; justify-content: space-between; }
.price-lines .total { border-top: 1.5px solid var(--line); padding-top: 8px; font-weight: 800; font-size: 16px; }
.low-stock { color: #9E2B2F; font-weight: 700; }
.cell-input {
  width: 100%; min-width: 90px; font: 400 14px/1.3 var(--font); color: var(--ink);
  padding: 8px 10px; border: 1.5px solid transparent; border-radius: 10px; background: var(--mint-2); outline: none;
}
.cell-input:focus { border-color: var(--green); background: #fff; }
.cell-input.low-stock { background: #FDEEEE; }

.sigpad { width: 100%; height: 180px; border: 2px dashed var(--line); border-radius: var(--r-md); background: #fff; touch-action: none; display: block; }
.sig-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; }
.sig-img { max-height: 150px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; }

.plan-box { display: grid; gap: 10px; }
.plan-box-head { display: flex; justify-content: space-between; font-size: 16px; }
.meter { height: 10px; background: var(--mint); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.card .card { box-shadow: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .card { padding: 18px; }
  input, select, textarea { max-width: 100%; }
  .main-head { flex-wrap: wrap; gap: 10px; }
  .main-head > div { flex-wrap: wrap; }
  .filter-bar { flex-wrap: wrap; }
  .inline-add { flex-wrap: wrap; }
  .inline-add label { min-width: 0 !important; flex: 1 1 45% !important; }
  .wiz-steps { overflow-x: auto; }
  .status-form { flex-wrap: wrap; }
  .price-meta { flex-wrap: wrap; }
  .attach-edit { flex-wrap: wrap; }
  .admin-controls-form { position: static; width: 100%; }
  .main-head h1 { font-size: 22px; }
  .wiz-step { padding: 8px 12px 8px 8px; font-size: 12.5px; }
  .form-actions { position: sticky; bottom: 0; background: linear-gradient(180deg, transparent, var(--bg) 30%); padding: 12px 0; }
  .form-actions .btn { flex: 1; }
  .sum-row { grid-template-columns: 76px 1fr; }
  .hero-in { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 50px; }
  .hero-art { order: -1; max-width: 380px; margin: 0 auto; }
  .feat-grid, .how-grid, .price-grid { grid-template-columns: 1fr; }
  .contact-in { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .frow { grid-template-columns: minmax(0, 1fr); }
  .pnav-links { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: static; height: auto; flex-direction: row; align-items: center;
    padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line);
    flex-wrap: wrap; gap: 10px 16px;
  }
  /* wrap the icons onto extra rows — nothing may hide off-screen */
  .side-nav { display: flex; gap: 2px; flex-wrap: wrap; }
  .side-nav a span { display: none; }
  .side-foot { margin: 0 0 0 auto; display: flex; align-items: center; gap: 10px; }
  .side-shop { display: none; }
  .main { padding: 20px 16px 50px; }
}

/* Masked PIN */
.pin-mask {
  font-family: ui-monospace, monospace; letter-spacing: 2px; cursor: pointer;
  background: var(--mint-2); border: 1px dashed var(--line); border-radius: 8px; padding: 4px 10px;
  user-select: none;
}
.pin-mask[data-shown="1"] { background: #FFF6DE; border-color: var(--amber); }

/* Price sheet (Pris & betalning) */
.price-sheet { margin-bottom: 14px; }
.price-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 2px; border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.price-row.discount span:last-child { color: #C43C40; font-weight: 600; }
.price-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 2px 4px; font: 800 19px/1 var(--font); letter-spacing: -0.01em;
}
.price-total span:last-child { color: var(--green-dark); }
.price-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

/* Composer attachments */
.attach-list { display: grid; gap: 6px; max-height: 130px; overflow-y: auto; }
.attach-item { display: flex; align-items: center; gap: 8px; margin: 0; font: 400 13.5px/1.3 var(--font); cursor: pointer; }
.attach-item input { width: auto; margin: 0; }
.attach-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details > summary.btn { list-style: none; }
details > summary.btn::-webkit-details-marker { display: none; }

/* Document generators + quick warranty */
.doc-gen { display: grid; gap: 10px; margin-bottom: 14px; }
.warranty-quick { display: inline-flex; align-items: center; gap: 8px; }
.warranty-quick select { padding: 7px 30px 7px 12px; font-size: 13px; border-radius: 999px; }

/* Alignment helpers */
.flexline { display: flex; gap: 8px; margin-top: 6px; }
.flexline input, .flexline select { margin-top: 0 !important; }
.seg span { white-space: nowrap; }

/* Language switcher (SV/EN) */
.badge.age-warn { background: #FFF4DC; color: #8A6116; }
.badge.age-late { background: #FDEEEE; color: #9E2B2F; }

.pay-banner { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; margin: -30px -34px 22px; padding: 13px 34px; font: 600 14px/1.4 var(--font); border-bottom: 1px solid; }
@media (max-width: 900px) { .pay-banner { margin: -20px -16px 16px; padding: 12px 16px; } }
.pay-banner.due { background: #FFF4DC; color: #8A6116; border-color: #F2DFAE; }
.pay-banner.late { background: #FDEEEE; color: #9E2B2F; border-color: #F3CDCD; }
.pay-banner .ic { flex: none; }

.faq-list details { border-bottom: 1px solid var(--line); padding: 11px 0; }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary { cursor: pointer; font: 600 14px/1.45 var(--font); color: var(--ink); }
.faq-list summary:hover { color: var(--green-deep, #0B7A45); }
.faq-list details p { margin-top: 8px; }

.admin-tabs { display: flex; gap: 6px; align-items: center; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; font: 600 14px/1 var(--font); color: var(--ink-2); }
.admin-tabs a:hover { background: var(--mint-2); color: var(--ink); }
.admin-tabs a.on { background: var(--ink); color: #fff; }

.aud-hero { padding: 64px 0 40px; }
.sect { padding: 20px 0 70px; }
.aud-steps { margin: 0 0 0 20px; display: grid; gap: 12px; font-size: 15px; line-height: 1.55; }
.aud-steps li::marker { font-weight: 700; color: var(--green-dark); }

.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: #fff; border: 1px solid var(--line); border-radius: 999px; width: max-content; align-self: center; }
.side-foot .lang-switch { justify-self: start; }
.pnav-in .lang-switch { margin-left: auto; }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; font: 700 11.5px/1 var(--font); letter-spacing: .04em; color: var(--ink-2); text-decoration: none; padding: 6px 11px; border-radius: 999px; }
.lang-switch a.on { background: var(--green); color: #0B1F15; }
.lang-switch a:not(.on):hover { color: var(--ink); }

/* Attachment rows with visibility + note */
.attach-rows { display: grid; gap: 10px; }
.attach-row { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.attach-main { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1 1 100%; }
.attach-edit { display: flex; gap: 8px; flex: 1; align-items: center; }
.attach-edit input { flex: 1; margin: 0; padding: 8px 12px; font-size: 13.5px; }
.attach-edit select { width: auto; margin: 0; padding: 8px 30px 8px 12px; font-size: 13px; }
.qr-spin { display: inline-block; width: 14px; height: 14px; border: 2.5px solid var(--mint); border-top-color: var(--green); border-radius: 50%; animation: qrspin 0.8s linear infinite; }
@keyframes qrspin { to { transform: rotate(360deg); } }

/* Priority badges */
.prio-urgent { background: #FFF3D6; color: #8A6100; }
.prio-express { background: #FDEEEE; color: #9E2B2F; }

/* Admin per-shop controls */
.admin-row td { vertical-align: top; }
.admin-controls { position: relative; }
.admin-controls-form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; display: grid; gap: 8px; width: 320px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; box-shadow: 0 14px 40px rgba(11,31,21,.18); }
.ac-line { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; white-space: nowrap; }
.ac-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.ac-check { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; white-space: nowrap; }
.ac-check input { width: auto; margin: 0; }
.admin-controls > summary { list-style: none; }
.admin-controls > summary::-webkit-details-marker { display: none; }

/* USP section illustrations */
.usp { background: var(--mint-2); }
.usp-art { width: 64px; height: 64px; margin-bottom: 14px; }

/* Admin actions: one tight row, no dead space */
.admin-actions { width: 1%; }
.admin-actions-row { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; }
.admin-actions-row .btn { white-space: nowrap; }

/* In-app guide */
.guide { display: grid; gap: 10px; }
.guide details { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0; overflow: hidden; }
.guide summary { cursor: pointer; font-weight: 700; padding: 14px 18px; list-style: none; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary::before { content: "+"; display: inline-block; width: 20px; color: var(--green-dark); font-weight: 800; }
.guide details[open] summary::before { content: "–"; }
.guide details[open] summary { background: var(--mint-2); border-bottom: 1px solid var(--line); }
.guide details p { padding: 12px 18px 4px 38px; font-size: 14.5px; color: var(--ink-2); }
.guide details p:last-child { padding-bottom: 16px; }

/* Wizard review blocks */
.sum-block { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 10px; }
.sum-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 10px; }
.sum-body { font-size: 14.5px; line-height: 1.6; }
.sum-total { background: var(--mint-2); }
.seg { flex-wrap: wrap; }
