/* Lyften. Ljust, lugnt, hög kontrast. Byggt för en verkstad: stora ytor, stora tal. */

/* Inter ligger bredvid appen. Inga anrop till Google. Licens: fonts/Inter-LICENSE.txt */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bakgrund: #F6F2EA;      /* varm off white */
  --yta: #FFFDF8;
  --text: #15181B;          /* nära svart */
  --text-2: #4A5057;
  --linje: #D9D1C3;
  --petrol: #0D4F5C;        /* djup petrolblå, bär varumärket */
  --petrol-mork: #093A44;
  --petrol-ljus: #E1ECEE;

  --gron: #1C7A4A;
  --gron-ljus: #E3F2E9;
  --barnsten: #F0A800;
  --barnsten-ljus: #FDF1D2;
  --rod: #C2271B;
  --rod-ljus: #FBE5E2;

  --radie: 14px;
  --tryck: 56px;            /* minsta höjd för allt man trycker på */
  --font: Inter, "Inter var", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bakgrund);
  color: var(--text);
  font: 18px/1.45 var(--font);
  font-feature-settings: "tnum" 1, "cv11" 1;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
h1 { font-size: 32px; line-height: 1.15; margin: 8px 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 21px; margin: 0 0 8px; }
p { margin: 0; }
a { color: var(--petrol); }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Ram */

.topp {
  display: flex; align-items: center; gap: 12px;
  max-width: 680px; margin: 0 auto; padding: 14px 16px 6px;
}
.produkt { font-weight: 800; color: var(--petrol); letter-spacing: 0.02em; }
.verkstad { color: var(--text-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loggaut {
  background: none; border: 0; color: var(--text-2); font: inherit; font-size: 16px;
  min-height: 44px; padding: 0 4px; text-decoration: underline; cursor: pointer;
}
.huvud { max-width: 680px; margin: 0 auto; padding: 8px 16px 24px; transition: opacity 0.15s; }
.huvud.laddar { opacity: 0.5; transition-delay: 0.15s; pointer-events: none; }

.meny {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: flex; gap: 8px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: var(--yta); border-top: 1px solid var(--linje);
}
.meny { gap: 4px; padding-left: 8px; padding-right: 8px; }
.meny a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 64px;
  border-radius: var(--radie); font-size: 17px; font-weight: 700;
  color: var(--text-2); text-decoration: none;
}
.meny a.aktiv { background: var(--petrol); color: #fff; }

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 20;
  max-width: 480px; margin: 0 auto; padding: 16px 20px;
  background: var(--text); color: #fff; border-radius: var(--radie);
  font-weight: 600; text-align: center;
}

/* Byggstenar */

.vy { display: grid; gap: 20px; }
.vy > *, .stapel > *, .block > * { min-width: 0; }
.stapel { display: grid; gap: 12px; }
.ingress { font-size: 20px; color: var(--text-2); }
.tips { color: var(--text-2); font-size: 16px; }
.tom { color: var(--text-2); }
.fraga { font-size: 24px; font-weight: 700; line-height: 1.25; }
.etikett, label { font-weight: 600; }
.ruta { background: var(--yta); border: 1px solid var(--linje); border-radius: var(--radie); padding: 16px; }

.falt {
  width: 100%; min-height: var(--tryck); padding: 12px 16px;
  font: inherit; font-size: 20px; color: var(--text);
  background: #fff; border: 2px solid var(--linje); border-radius: var(--radie);
  -webkit-appearance: none; appearance: none;
}
.falt:focus { border-color: var(--petrol); outline: none; box-shadow: 0 0 0 3px var(--petrol-ljus); }
textarea.falt { resize: vertical; }
.falt.datum { font-size: 24px; font-weight: 600; min-height: 64px; }

.knapp {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; min-height: var(--tryck); padding: 12px 20px;
  font: inherit; font-size: 20px; font-weight: 700; text-decoration: none;
  color: #fff; background: var(--petrol);
  border: 2px solid var(--petrol); border-radius: var(--radie); cursor: pointer;
}
.knapp:active { background: var(--petrol-mork); }
.knapp:disabled { background: var(--linje); border-color: var(--linje); color: var(--text-2); cursor: default; }
.knapp.sekundar { background: var(--yta); color: var(--petrol); }
.knapp.sekundar:active { background: var(--petrol-ljus); }
.knapp.fara { background: none; color: var(--rod); border-color: transparent; font-weight: 600; margin-top: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: var(--tryck); padding: 0 18px; font: inherit; font-weight: 600;
  background: var(--yta); color: var(--text); border: 2px solid var(--linje); border-radius: 999px; cursor: pointer;
}
.chip.valt { background: var(--petrol); color: #fff; border-color: var(--petrol); }

/* Skylten: alltid samma ruta så ögat hittar numret direkt */

.skylt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 2px 10px 2px 0; height: 38px;
  background: #fff; color: #111; border: 2px solid #111; border-radius: 6px;
  font-weight: 800; font-size: 21px; letter-spacing: 0.14em; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.skylt::before {
  content: "S"; align-self: stretch; display: grid; place-items: end center;
  width: 18px; padding-bottom: 3px; margin-left: -1px;
  background: #1F4AA8; color: #fff; font-size: 10px; letter-spacing: 0; border-radius: 3px 0 0 3px;
}
.skylt.stor { height: 60px; font-size: 36px; padding-right: 16px; gap: 12px; }
.skylt.stor::before { width: 26px; font-size: 13px; padding-bottom: 6px; }
.skyltrad { display: flex; flex-wrap: wrap; gap: 8px; }
.skyltrad a { text-decoration: none; }

/* Start */

.start { padding-top: 12vh; }
.stor-etikett { font-size: 26px; font-weight: 800; }
.falt.regnr {
  min-height: 84px; font-size: 36px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; text-align: center; resize: none; overflow: hidden;
}
.falt.regnr::placeholder { color: #CDC5B6; }
.falt.regnr.lista {
  font-size: 20px; font-weight: 700; letter-spacing: 0.08em; text-align: left;
  max-height: 40vh; overflow-y: auto; line-height: 1.5;
}

/* Guide */

.guide-huvud { display: grid; gap: 6px; justify-items: start; }
.steg { color: var(--text-2); font-size: 16px; }

.valista { display: grid; gap: 8px; }
.val {
  display: grid; text-align: left; gap: 2px; width: 100%; min-height: 64px; padding: 10px 16px;
  font: inherit; color: var(--text); background: var(--yta);
  border: 2px solid var(--linje); border-radius: var(--radie); cursor: pointer;
}
.val b { font-size: 20px; }
.val small { color: var(--text-2); font-size: 16px; }
.val.valt { border-color: var(--petrol); box-shadow: inset 0 0 0 1px var(--petrol); }

/* Statusrutan. Färgen är budskapet: grönt god tid, bärnsten snart, rött passerat. */

.dagar {
  display: grid; place-items: center; align-content: center;
  min-width: 96px; min-height: 72px; padding: 6px 10px; border-radius: 12px;
  text-align: center; line-height: 1.05;
}
.dagar b { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.dagar small { font-size: 14px; font-weight: 700; margin-top: 2px; }
.dagar.gron { background: var(--gron); color: #fff; }
.dagar.gul { background: var(--barnsten); color: #1E1500; }
.dagar.rod { background: var(--rod); color: #fff; }
.dagar.bokad { background: var(--petrol-ljus); color: var(--petrol-mork); border: 2px solid var(--petrol); }
.dagar.saknas { background: none; color: var(--text-2); border: 2px dashed var(--linje); }
.dagar.stor { min-width: 120px; min-height: 92px; }
.dagar.stor b { font-size: 44px; }
.dagar b.ord, .dagar.stor b.ord { font-size: 22px; letter-spacing: 0; }

/* Listan */

.listhuvud { display: grid; gap: 4px; }
.sammanfattning { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-2); font-weight: 600; }
.prick::before {
  content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  margin-right: 6px; vertical-align: 0;
}
.prick.rod::before { background: var(--rod); }
.prick.gul::before { background: var(--barnsten); }

.fordonslista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rad a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 16px; min-height: 96px;
  background: var(--yta); color: var(--text); text-decoration: none;
  border: 1px solid var(--linje); border-left: 8px solid var(--linje); border-radius: var(--radie);
}
.rad.gron a { border-left-color: var(--gron); }
.rad.gul a { border-left-color: var(--barnsten); }
.rad.rod a { border-left-color: var(--rod); background: var(--rod-ljus); }
.rad.bokad a { border-left-color: var(--petrol); }
.rad a:active { background: var(--petrol-ljus); }
.rad-info { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.rad .bil { font-size: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rad .under { color: var(--text-2); font-size: 15px; }

/* Fordonskortet */

.tillbaka {
  display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none;
}
.tillbaka::before { content: "‹"; font-size: 28px; margin-right: 6px; line-height: 1; }
.kort-huvud { display: grid; gap: 8px; justify-items: start; }
.bil.stor { font-size: 22px; font-weight: 600; }
.andra { font-size: 16px; font-weight: 600; margin-left: 6px; }

.block { background: var(--yta); border: 1px solid var(--linje); border-radius: var(--radie); padding: 16px; display: grid; gap: 14px; }
.block.varning { background: var(--barnsten-ljus); border-color: var(--barnsten); }
.block-huvud { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.datum-text { font-size: 22px; font-weight: 700; }

.lagen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lage-knapp {
  min-height: var(--tryck); font: inherit; font-weight: 700;
  color: var(--text); background: #fff; border: 2px solid var(--linje); border-radius: 12px; cursor: pointer;
}
.lage-knapp.valt { background: var(--petrol); border-color: var(--petrol); color: #fff; }

.kund-namn { font-size: 22px; font-weight: 700; }
.kontakt { display: grid; gap: 8px; }

.historik { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.historik li { display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.utskick-status { margin-left: auto; font-weight: 600; color: var(--text-2); }
.utskick-status.misslyckad { color: var(--rod); }
.utskick-status.levererad { color: var(--gron); }

@media (min-width: 720px) {
  .kontakt { grid-template-columns: 1fr 1fr; }
}

/* Kunder och inkorg */

.kund-rubrik { font-size: 21px; font-weight: 700; }
.bricka {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px;
  border-radius: 999px; background: var(--rod); color: #fff; font-size: 15px; font-weight: 800;
}
.inkorg-hoger { display: grid; justify-items: end; gap: 6px; color: var(--text-2); }

.skylt.liten { height: 28px; font-size: 15px; gap: 6px; padding-right: 8px; }
.skylt.liten::before { width: 13px; font-size: 8px; padding-bottom: 2px; }

.meddelanden { display: grid; gap: 10px; }
.bubbla {
  max-width: 85%; padding: 12px 14px; border-radius: 16px; display: grid; gap: 6px; justify-items: start;
  background: var(--yta); border: 1px solid var(--linje);
}
.bubbla p { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubbla small { color: var(--text-2); font-size: 14px; }
.bubbla.kund { justify-self: start; border-bottom-left-radius: 4px; }
.bubbla.verkstad { justify-self: end; background: var(--petrol-ljus); border-color: var(--petrol-ljus); border-bottom-right-radius: 4px; }

.block.bokning.forfragan { border: 2px solid var(--barnsten); background: var(--barnsten-ljus); }
.block.bokning.bokad { border: 2px solid var(--petrol); }
.bokning-huvud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; min-width: 0; }
.tidrad { display: grid; grid-template-columns: minmax(0, 1fr) 108px 44px; gap: 6px; }
.tidrad .falt { font-size: 17px; padding: 10px 8px; min-width: 0; }
.ta-bort {
  min-height: var(--tryck); font: inherit; font-size: 26px; color: var(--text-2);
  background: none; border: 2px solid var(--linje); border-radius: 12px; cursor: pointer;
}
.tidlista { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-weight: 600; }
.under.stark { color: var(--text); font-weight: 700; }
.under.citat { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Kundsidan */

.bilkort {
  display: grid; gap: 12px; padding: 14px 14px 10px 16px;
  background: var(--yta); border: 1px solid var(--linje); border-left: 8px solid var(--linje); border-radius: var(--radie);
}
.bilkort.gron { border-left-color: var(--gron); }
.bilkort.gul { border-left-color: var(--barnsten); }
.bilkort.rod { border-left-color: var(--rod); background: var(--rod-ljus); }
.bilkort.bokad { border-left-color: var(--petrol); }
.bilkort-huvud { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.besked { font-weight: 600; padding: 12px 14px; border-radius: 12px; background: var(--barnsten-ljus); }
.besked.bokad { background: var(--petrol-ljus); color: var(--petrol-mork); font-size: 19px; }
.knapp.tidval { background: #fff; color: var(--petrol); justify-content: flex-start; text-align: left; }
.knapp.tidval:active { background: var(--petrol-ljus); }
.lank-knapp {
  justify-self: start; min-height: 44px; padding: 0; background: none; border: 0;
  font: inherit; font-weight: 600; color: var(--petrol); text-decoration: underline; cursor: pointer;
}
.kundsida { padding-bottom: 32px; }

/* Flikarna överst i Fordon */

.flikar { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--linje); border-radius: var(--radie); }
.flik {
  display: grid; place-items: center; min-height: var(--tryck); border-radius: 11px;
  font-weight: 700; font-size: 18px; color: var(--text-2); text-decoration: none;
}
.flik.aktiv { background: var(--yta); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

/* Inställningar */

a.loggaut { display: inline-flex; align-items: center; color: var(--text-2); }
.checklista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 600; }
.checklista li { display: flex; gap: 10px; align-items: baseline; }
.checklista li span { width: 20px; flex: none; text-align: center; }
.checklista li.ok span { color: var(--gron); }
.checklista li.saknas { color: var(--text-2); }
.logotyp-forhands { max-width: 220px; max-height: 90px; object-fit: contain; justify-self: start; }
.dold-fil { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.kundsida .logotyp { max-height: 48px; max-width: 200px; object-fit: contain; }

.knapp .sen { display: block; font-size: 15px; font-weight: 600; color: var(--rod); }
.knapp.tidval { flex-wrap: wrap; }

/* Blev den klar? */
.block.uppfoljning { border: 2px solid var(--petrol); background: var(--petrol-ljus); }
