/* Verktyget (/app/). Bygger på /tomtify.css: samma värld som startsidan, i ett lugnare arbetsläge. */

body { min-height: 100vh; background: var(--bg-2); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.625rem; font-weight: 650; letter-spacing: -0.03em; }
h2 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }

/* Toppen */
.topp { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1.25rem; padding: 0 1.25rem; height: 3.5rem; background: color-mix(in srgb, var(--bg) 85%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(12px); backdrop-filter: saturate(1.5) blur(12px); border-bottom: 1px solid var(--linje); }
.topp .ordmarke { font-size: 1.0625rem; }
.topp .ordmarke svg { width: 1.45rem; height: 1.45rem; }
.topp-friskrivning { margin-left: auto; font-size: 0.8125rem; color: var(--text-3); }
.topp-lank { color: var(--text-2); font-size: 0.875rem; font-weight: 500; text-decoration: none; padding: 0.4rem 0.6rem; border-radius: 7px; }
.topp-lank:hover { background: var(--bg-3); color: var(--text); }
.topp-konto { display: flex; align-items: center; gap: 0.25rem; padding-left: 0.75rem; border-left: 1px solid var(--linje); }
.topp-konto-lank { display: flex; align-items: center; gap: 0.55rem; min-height: 2.5rem; padding: 0.25rem 0.5rem 0.25rem 0.3rem; border-radius: 8px; color: var(--text); text-decoration: none; min-width: 0; }
.topp-konto-lank:hover { background: var(--bg-3); }
.topp-avatar { display: grid; place-items: center; width: 1.85rem; height: 1.85rem; flex: none; border-radius: 999px; background: var(--accent-bg); color: var(--accent-text); font-weight: 650; font-size: 0.8125rem; }
.topp-konto-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.topp-byra { font-size: 0.8125rem; font-weight: 600; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topp-epost { font-size: 0.75rem; color: var(--text-3); max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Skalet: objektpanel + arbetsyta */
.skal { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); min-height: calc(100vh - 3.5rem); }
.objektpanel { border-right: 1px solid var(--linje); padding: 1.25rem 0.9rem; display: flex; flex-direction: column; gap: 1.1rem; }
.objektpanel-huvud { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding-inline: 0.35rem; }
.objektpanel h2 { font-size: 0.8125rem; font-weight: 550; color: var(--text-2); letter-spacing: 0; }
.visa-ny { display: none; }
.nytt-objekt { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; background: var(--yta); border: 1px solid var(--linje); border-radius: var(--r-m); box-shadow: var(--skugga-s); }
.valfri { font-weight: 400; color: var(--text-3); }
.nytt-objekt .knapp { align-self: stretch; }

.objektlista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.objektlista button {
  all: unset; box-sizing: border-box; display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 0.5rem; width: 100%;
  padding: 0.55rem 0.7rem; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.objektlista button:hover { background: var(--bg-3); }
.objektlista button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.objektlista [aria-current="true"] { background: var(--yta); border-color: var(--linje); box-shadow: var(--skugga-s); }
.objektlista .namn { font-weight: 550; font-size: 0.9375rem; overflow-wrap: anywhere; }
.objektlista .sub { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--text-3); }
.objektlista .tom { font-size: 0.875rem; color: var(--text-3); padding: 0.25rem 0.7rem; }

/* Arbetsytan */
.arbetsyta { padding: 2rem clamp(1rem, 3vw, 2.5rem) 5rem; display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; max-width: 86rem; }
.kort { background: var(--yta); border: 1px solid var(--linje); border-radius: var(--r-l); box-shadow: var(--skugga-s); padding: 1.35rem 1.5rem 1.5rem; min-width: 0; }
.korthuvud, .sektionshuvud { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1.1rem; }
.korthuvud p, .sektionshuvud p { color: var(--text-2); font-size: 0.9375rem; max-width: 62ch; }
.korthuvud-rad { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; }
.sektionshuvud { margin: 1rem 0 1.1rem; }
.sektionshuvud h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.025em; }

/* Tomt läge */
.tomt-lage { background: var(--yta); border: 1px solid var(--linje); border-radius: var(--r-l); box-shadow: var(--skugga-s); padding: 1.75rem 2rem; max-width: 46rem; }
.tomt-lage h1 { margin-bottom: 0.5rem; }
.tomt-lage > p { color: var(--text-2); }
.tomt-steg { margin: 1.25rem 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 0.8rem; }
.tomt-steg li { counter-increment: s; display: grid; grid-template-columns: 1.75rem 1fr; gap: 0.75rem; align-items: baseline; color: var(--text-2); }
.tomt-steg li strong { color: var(--text); font-weight: 600; }
.tomt-steg li::before { content: counter(s); font-weight: 600; font-size: 0.8125rem; color: var(--accent-text); background: var(--accent-bg); width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border-radius: 50%; line-height: 1; }
.tomt-not { font-size: 0.9375rem; color: var(--text-3); }

/* Objekthuvud och rälsen */
.objekthuvud { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.objekthuvud h1 { font-size: clamp(1.625rem, 2.2vw, 2rem); overflow-wrap: anywhere; }
.objekt-meta { color: var(--text-2); margin-top: 0.25rem; font-size: 0.9375rem; }
.rals { list-style: none; margin: 1.35rem 0 1.5rem; padding: 1rem 1.1rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; background: var(--yta); border: 1px solid var(--linje); border-radius: var(--r-l); box-shadow: var(--skugga-s); }
.rals li { position: relative; display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); column-gap: 0.6rem; align-items: center; }
.rals-prick { grid-row: 1 / span 2; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1.5px solid var(--linje-2); background: var(--yta); display: grid; place-items: center; color: transparent; transition: background-color 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
.rals-prick svg { width: 0.85rem; height: 0.85rem; }
.rals-namn { font-weight: 600; font-size: 0.9375rem; }
.rals-status { grid-column: 2; font-size: 0.8125rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rals-starta { grid-column: 2; justify-self: start; margin-top: 0.45rem; }
.rals li[data-lage="klar"] .rals-prick { background: var(--accent); border-color: var(--accent); color: #fff; }
.rals li[data-lage="aktiv"] .rals-prick { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); background: radial-gradient(circle, var(--accent) 0 3.5px, var(--yta) 4px); }
.rals li[data-lage="aktiv"] .rals-namn { color: var(--accent-text); }
.rals li[data-lage="fel"] .rals-prick { border-color: var(--rod); background: var(--rod-bg); }
.rals li[data-lage="fel"] .rals-status { color: var(--rod); }

/* Underlag */
.underlag-sammandrag { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; flex-wrap: wrap; padding: 0.8rem 1rem; background: var(--yta); border: 1px solid var(--linje); border-radius: var(--r-m); font-size: 0.9375rem; color: var(--text-2); }
.underlag-sammandrag strong { color: var(--text); font-weight: 600; }
.hopfalld .underlag, .hopfalld .kontroll { display: none; }

/* Kontroll av underlaget: det som saknas eller begränsar resultatet (underlagskontroll.js) */
.kontroll { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.kontroll[hidden] { display: none; }
.notis { --n-text: var(--accent-text); --n-bg: var(--accent-bg); --n-ikon: var(--accent-text); display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: 0.75rem; padding: 0.9rem 1.1rem; background: color-mix(in srgb, var(--n-bg) 55%, var(--yta)); border: 1px solid color-mix(in srgb, var(--n-ikon) 30%, var(--linje)); border-radius: var(--r-m); }
.notis[data-niva="stopp"] { --n-text: var(--rod); --n-bg: var(--rod-bg); --n-ikon: var(--rod-ikon); }
.notis[data-niva="varning"] { --n-text: var(--gul); --n-bg: var(--gul-bg); --n-ikon: var(--gul-ikon); }
.notis-ikon { width: 1.25rem; height: 1.25rem; margin-top: 0.05rem; color: var(--n-ikon); }
.notis-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.notis-rubrik { font-weight: 600; font-size: 0.9375rem; color: var(--n-text); }
.notis-brod { color: var(--text-2); font-size: 0.9375rem; max-width: 70ch; }
.notis-adress { display: flex; align-items: flex-end; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.6rem; }
.notis-adress .falt { flex: 1 1 16rem; max-width: 26rem; }
.notis-adress input { background: var(--yta); }
.tomtarea-falt { margin-top: 1rem; max-width: 16rem; }
.beteckning-falt { margin-bottom: 1rem; max-width: 26rem; }
.beteckning-falt .valfri { font-size: 0.8125rem; }
.beteckning-forslag {
  list-style: none; margin: 0; padding: 0.25rem; max-height: 16rem; overflow-y: auto;
  border: 1px solid var(--linje-2); border-radius: var(--r-m); background: var(--yta);
}
.beteckning-forslag li { padding: 0.6rem 0.75rem; border-radius: var(--r-s); cursor: pointer; font-size: 0.9375rem; }
.beteckning-forslag li:hover, .beteckning-forslag li[aria-selected="true"] { background: var(--bg-2); }
.beteckning-meddelande { color: var(--text-2); font-size: 0.8125rem; font-weight: 400; }
.tomtarea-falt .valfri { font-size: 0.8125rem; }
.underlag { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); gap: 1.5rem; align-items: start; }
.slapp {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 4.5rem; padding: 0.9rem 1rem;
  border: 1.5px dashed var(--linje-2); border-radius: var(--r-m); background: var(--bg-2); color: var(--text-2);
  cursor: pointer; text-align: center; font-size: 0.9375rem;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease), color 150ms var(--ease);
}
.slapp .ikon { color: var(--accent-text); }
.slapp strong { color: var(--text); font-weight: 600; }
.slapp:hover { border-color: var(--accent); background: var(--accent-bg); }
.slapp:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.slapp.over { border-color: var(--accent); border-style: solid; background: var(--accent-bg); color: var(--accent-text); }
.slapp.laddar { cursor: progress; border-style: solid; animation: puls 1.4s ease-in-out infinite; }
@keyframes puls { 50% { background: var(--accent-bg); } }

.bildrutnat { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1.1rem 0.9rem; }
.bildrutnat:empty { display: none; }
.bildrutnat > li { position: relative; min-width: 0; }
.tumram { position: relative; border-radius: var(--r-m); overflow: hidden; background: var(--bg-3); box-shadow: 0 0 0 1px var(--linje); }
.tumram > img { width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; }
.tumnr { position: absolute; left: 0.45rem; bottom: 0.45rem; font-size: 0.75rem; font-weight: 600; color: #fff; background: rgba(15, 23, 42, 0.62); padding: 0.12rem 0.4rem; border-radius: 5px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.bildinfo { display: flex; flex-direction: column; gap: 0.05rem; padding: 0.5rem 0.1rem 0; font-size: 0.8125rem; color: var(--text-3); }
.bildinfo .fil { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bildinfo .gps-saknas { color: var(--rod); font-weight: 550; display: inline-flex; gap: 0.3rem; align-items: center; }
.bildinfo .gps-saknas.gps-sok { color: var(--gul); }
.bildinfo .gps-saknas svg { width: 1rem; height: 1rem; flex: none; }
.ta-bort {
  position: absolute; top: 0.45rem; right: 0.45rem; width: 2rem; height: 2rem; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(15, 23, 42, 0.62); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color 140ms var(--ease);
}
.ta-bort svg { width: 1rem; height: 1rem; }
.ta-bort:hover { background: var(--rod-ikon); }

.kartbild:empty { display: none; }
.kartbild { margin-top: 1.1rem; }
.kartbild .tumram > img { aspect-ratio: auto; max-height: 20rem; object-fit: contain; background: var(--bg-3); }

/* Bearbetning */
.bearbetning-rad { display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; }
.bearbetning-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; flex: 1 1 18rem; }
.jobb-text { color: var(--text-2); font-variant-numeric: tabular-nums; }
.jobb-text strong { color: var(--text); font-weight: 600; }
.jobb-text.fel { color: var(--rod); }
.matare { position: relative; height: 8px; margin-top: 1.1rem; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.matare > div { position: relative; height: 100%; width: 100%; background: var(--accent); border-radius: inherit; clip-path: inset(0 100% 0 0 round 999px); transition: clip-path 600ms var(--ease); overflow: hidden; }
.bearbetning[data-status="kor"] .matare > div::after, .bearbetning[data-status="koad"] .matare > div::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: translateX(-100%); animation: svep 1.6s var(--ease) infinite;
}
@keyframes svep { to { transform: translateX(100%); } }
.bearbetning[data-status="klar"] .matare > div { background: var(--gron-ikon); }
.bearbetning[data-status="fel"] .matare > div { background: var(--rod-ikon); }
.bearbetning[data-status="avbruten"] .matare > div { background: var(--text-3); }
.jobb-hjalp { margin-top: 0.7rem; font-size: 0.875rem; color: var(--text-3); }
.jobb-hjalp:empty { display: none; }

/* Resultat */
.resultat-summa { font-size: 0.9375rem; color: var(--text-2); }
.resultat-summa strong { color: var(--text); font-weight: 600; }
.teckenforklaring { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.8125rem; color: var(--text-2); }
.teckenforklaring li { display: flex; align-items: center; gap: 0.4rem; }
.resultatrutnat > li > button { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; position: relative; border-radius: calc(var(--r-m) + 4px); padding: 4px; transition: background-color 160ms var(--ease), box-shadow 160ms var(--ease); }
.resultatrutnat > li > button:hover { background: var(--bg-3); }
.resultatrutnat > li > button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.resultatrutnat > li > button[aria-pressed="true"] { background: var(--accent-bg); box-shadow: 0 0 0 2px var(--accent); }
.resultatrutnat .rod .tumram > img { filter: saturate(0.4) brightness(0.92); }
.resultatinfo { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.55rem 0.2rem 0.2rem; }
.resultat-rad { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.resultat-rad .fil { font-size: 0.8125rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.resultatinfo .orsak { font-size: 0.8125rem; color: var(--text-2); line-height: 1.45; }

/* Stil */
.stil-layout { display: grid; grid-template-columns: minmax(0, 1fr) 21.5rem; gap: 1.5rem; align-items: start; }
.forhands { margin: 0; position: sticky; top: 4.5rem; }
.forhands-ram { position: relative; border-radius: var(--r-l); overflow: hidden; background: var(--bg-3); box-shadow: 0 0 0 1px var(--linje), var(--skugga-m); }
.forhands-ram > canvas { width: 100%; height: auto; }
.forhands-etikett { position: absolute; left: 0.75rem; top: 0.75rem; max-width: calc(100% - 1.5rem); font-size: 0.75rem; font-weight: 550; color: #fff; background: rgba(15, 23, 42, 0.62); padding: 0.2rem 0.5rem; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.forhands-info { margin-top: 0.7rem; font-size: 0.875rem; color: var(--text-2); max-width: 70ch; }
.omdome { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.6rem; font-size: 0.875rem; color: var(--text-2); }
.omdome[hidden] { display: none; }
/* Assisterad placering av röda bilder (assistera.js) */
.assistera { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.6rem; font-size: 0.875rem; color: var(--text-2); }
.assistera[hidden], .assistera [hidden] { display: none; }
.assistera-text { flex: 1 1 100%; margin: 0; }
.assistera-dialog { width: min(1200px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--linje); border-radius: var(--r-l); background: var(--yta); color: var(--text); box-shadow: var(--skugga-l); }
.assistera-dialog::backdrop { background: rgba(15, 23, 42, 0.55); }
.assistera-form { display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem; }
.assistera-topp { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.assistera-topp h2 { margin: 0; font-size: 1.125rem; }
.assistera-form > .hjalp { margin: 0; font-size: 0.875rem; color: var(--text-2); }
.assistera-steg { margin: 0; font-weight: 600; }
.assistera-ytor { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.assistera-ytor figure { margin: 0; display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.assistera-ytor figcaption { font-size: 0.8125rem; color: var(--text-2); }
.assistera-ytor canvas { width: 100%; height: min(55vh, 520px); border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--linje); cursor: crosshair; touch-action: none; }
.assistera-fot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.assistera-fel { flex: 1 1 12rem; color: var(--rod); font-size: 0.875rem; }
@media (max-width: 760px) {
  .assistera-ytor { grid-template-columns: 1fr; }
  .assistera-ytor canvas { height: 38vh; }
}
.omdome .knapp[aria-pressed="true"] { background: var(--accent-bg); border-color: var(--accent); color: var(--text); }
.stilpanel { background: var(--yta); border: 1px solid var(--linje); border-radius: var(--r-l); box-shadow: var(--skugga-s); padding: 0.25rem 1.1rem 0.5rem; }
.stilpanel fieldset { border: 0; border-bottom: 1px solid var(--linje); margin: 0; padding: 1rem 0 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.stilpanel fieldset:last-child { border-bottom: 0; }
.stilpanel legend { float: left; width: 100%; padding: 0; margin-bottom: 0.25rem; font-size: 0.875rem; font-weight: 600; color: var(--text); }
.stilpanel legend .hjalp { font-weight: 400; margin-left: 0.25rem; }
.stilrad { display: grid; grid-template-columns: 7rem minmax(0, 1fr); align-items: center; gap: 0.75rem; font-size: 0.875rem; color: var(--text-2); }
.stilrad-text input { min-height: 2.375rem; padding: 0.4rem 0.6rem; font-size: 0.9375rem; }
.stilrad select { min-height: 2.375rem; padding: 0.35rem 0.5rem; font-size: 0.9375rem; }
.kryss { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9375rem; cursor: pointer; line-height: 1.35; }
.kryss input { margin-top: 0.15rem; }
.kryss:has(input:disabled) { color: var(--text-3); cursor: not-allowed; }
.hjalp { font-size: 0.8125rem; color: var(--text-3); }
.kryss .hjalp { display: block; margin-top: 0.1rem; }

/* Byråns profil */
.logga-falt { display: flex; align-items: center; gap: 0.9rem; }
.logga-prov { flex: none; width: 3.5rem; height: 3.5rem; border-radius: var(--r-m); display: grid; place-items: center; color: var(--text-3); border: 1px dashed var(--linje-2); background: var(--bg-2); }
.logga-prov svg { width: 1.4rem; height: 1.4rem; }
.logga-prov.har-logga { border-style: solid; border-color: var(--linje); background: #fff; }
.logga-prov img { max-width: 80%; max-height: 80%; object-fit: contain; }
.logga-knappar { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.logga-val { cursor: pointer; }
.logga-val:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.farg-rad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.2rem; }
.farg { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.45rem; border: 1px solid var(--linje); border-radius: var(--r-m); font-size: 0.8125rem; font-weight: 500; color: var(--text-2); cursor: pointer; transition: border-color 150ms var(--ease); }
.farg:hover { border-color: var(--linje-2); }
.farg input[type=color] { inline-size: 1.75rem; block-size: 1.75rem; padding: 2px; border-radius: 6px; flex: none; }
.farg:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.farg:has(input:focus-visible) input { outline: none; }
.profil-knappar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; }
.stil-status { font-size: 0.8125rem; color: var(--text-2); }
.stil-status:empty { display: none; }

/* Leverans */
.leverans .korthuvud { margin-bottom: 0.9rem; }
.vald-bild { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; font-size: 0.9375rem; color: var(--text-2); }
.vald-bild:empty { display: none; }
.vald-bild strong, .vald-bild .fil { color: var(--text); font-weight: 600; }
.leverans-rad { display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.leverans-storlek { min-width: 14rem; }
.export-status { margin-top: 0.7rem; font-size: 0.875rem; color: var(--text-2); min-height: 1.25rem; }
.export-status.varning { color: var(--rod); font-weight: 550; }

/* Meddelande */
.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); background: #0f172a; color: #f8fafc; padding: 0.75rem 1.1rem; border-radius: var(--r-m); max-width: calc(100% - 2rem); z-index: 10; box-shadow: var(--skugga-l); font-size: 0.9375rem; animation: in 260ms var(--ease); }
@keyframes in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* Surfplatta */
@media (max-width: 1180px) {
  .stil-layout { grid-template-columns: minmax(0, 1fr) 19rem; }
  .underlag { grid-template-columns: 1fr; }
  .rals { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1rem; }
}

/* Telefon */
@media (max-width: 820px) {
  .topp { padding: 0 1rem; height: 3.25rem; gap: 0.75rem; }
  .topp-friskrivning { display: none; }
  .topp-lank { margin-left: auto; }
  .topp-konto { padding-left: 0.25rem; border-left: 0; }
  .topp-konto-text { display: none; }
  .topp-konto-lank { padding: 0.25rem; }
  .skal { grid-template-columns: 1fr; min-height: 0; }
  .objektpanel { border-right: 0; border-bottom: 1px solid var(--linje); padding: 0.9rem 1rem 1rem; gap: 0.75rem; }
  .objektpanel-huvud { padding-inline: 0; }
  .visa-ny { display: inline-flex; }
  .nytt-objekt { display: none; }
  .objektpanel.visa-formular .nytt-objekt { display: flex; }
  .objektlista { flex-direction: row; overflow-x: auto; gap: 0.5rem; padding-bottom: 0.25rem; scroll-snap-type: x proximity; margin: 0 -1rem; padding-inline: 1rem; }
  .objektlista li { flex: none; scroll-snap-align: start; }
  .objektlista button { width: auto; max-width: 15rem; background: var(--yta); border-color: var(--linje); }
  .objektlista [aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
  .arbetsyta { padding: 1.5rem 1rem 3rem; gap: 1.25rem; }
  .tomt-lage { padding: 1.25rem; }
  .kort { padding: 1.1rem 1rem 1.2rem; }
  .rals { padding: 0.85rem; }
  .bildrutnat { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 0.75rem; }
  .bearbetning-rad .knapp { width: 100%; }
  .stil-layout { grid-template-columns: 1fr; gap: 1rem; }
  .forhands { top: 3.25rem; z-index: 2; background: var(--bg-2); padding: 0.5rem 0 0.6rem; margin-top: -0.5rem; }
  .forhands-ram { border-radius: var(--r-m); }
  .forhands-info { display: none; }
  .leverans-rad .knapp, .leverans-storlek { width: 100%; }
  .objekthuvud { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .objekthuvud .knapp.fara { margin-left: -0.6rem; }
}
