@font-face {
  font-family: "Graphik Web";
  src:
    url("/fonts/graphik/Graphik-Regular-Web.woff2") format("woff2"),
    url("/fonts/graphik/Graphik-Regular-Web.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Graphik Web";
  src:
    url("/fonts/graphik/Graphik-Semibold-Web.woff2") format("woff2"),
    url("/fonts/graphik/Graphik-Semibold-Web.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Graphik Web";
  src:
    url("/fonts/graphik/Graphik-Bold-Web.woff2") format("woff2"),
    url("/fonts/graphik/Graphik-Bold-Web.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Graphik Web", "Graphik", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --bg: #efecf8;
  --ink: #231f20;
  --muted: rgba(35, 31, 32, 0.7);
  --accent: #5c3cb5;
  --accent-dark: #392080;
  --blue: #0065c1;
  --green: #3fc564;
  --green-dark: #25763c;
  --red: #fd5443;
  --red-dark: #c71d0c;
  --yellow: #ffd80a;
  --surface: #ffffff;
  --surface-soft: #efecf8;
  --border: rgba(92, 60, 181, 0.2);
  --shadow: 0 18px 40px rgba(57, 32, 128, 0.17);
  --ring: 0 0 0 4px rgba(92, 60, 181, 0.2);
  /* Berøringsflater (se DESIGN_SYSTEM.md): minst 48px for alle klikkbare mål */
  --touch-target-min: 48px;
  --touch-input-height: 64px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  background: var(--bg, #efecf8);
  min-height: 100vh;
}

.touch-shell {
  width: min(980px, 100% - 24px);
  margin: 16px auto 40px;
  display: grid;
  gap: 16px;
}

.touch-top {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.back-links {
  display: grid;
  gap: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 14px;
  text-decoration: none;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-weight: 500;
  border: 1px solid var(--border);
}

.top-admin-link {
  justify-self: end;
}

.title-wrap {
  display: grid;
  gap: 4px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 1.4px;
  color: var(--muted);
  font-weight: 500;
}

h1 {
  margin: 2px 0;
  font-size: clamp(30px, 4.2vw, 46px);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.08;
}

h2 {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 34px);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.1;
}

p {
  margin: 0;
  color: var(--muted);
}

.user-box {
  display: grid;
  align-items: center;
  justify-items: end;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.shared-user-box {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 240px;
}

.shared-user-box.is-waiting {
  justify-items: center;
}

.shared-user-meta {
  display: grid;
  gap: 2px;
  text-align: right;
}

.shared-user-meta strong {
  color: var(--ink);
  font-size: 15px;
}

.shared-user-meta span:last-child {
  font-size: 12px;
  color: var(--muted);
}

.shared-user-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--accent-dark);
}

.shared-user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.shared-touch-auth-root {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 90;
}

.shared-touch-auth-root.is-open {
  display: flex;
}

.shared-touch-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 31, 32, 0.42);
  backdrop-filter: blur(6px);
}

.shared-touch-auth-card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 24px));
  border-radius: 28px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 60px rgba(35, 31, 32, 0.24);
  display: grid;
  gap: 14px;
}

.shared-touch-auth-eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: none;
  color: var(--accent-dark);
  font-weight: 700;
}

.shared-touch-auth-copy,
.shared-touch-auth-hint,
.shared-touch-auth-meta {
  color: var(--muted);
}

.shared-touch-auth-field input {
  min-height: 66px;
  font-size: 20px;
}

.shared-touch-auth-status {
  min-height: 24px;
  color: var(--muted);
  font-weight: 600;
}

.shared-touch-auth-status.is-error {
  color: var(--red-dark);
}

.shared-touch-auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.picker-trigger {
  width: 100%;
  min-height: 98px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: var(--surface-soft);
  font-size: clamp(22px, 3.3vw, 34px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent-dark);
  cursor: pointer;
}

.selected-item {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 12px;
}

.selected-placeholder {
  color: var(--muted);
  text-align: center;
  font-size: 18px;
  padding: 20px;
}

.selected-card {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px;
  align-items: center;
}

.item-media {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 10px;
  align-items: center;
}

.selected-image,
.item-image {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: contain;
  padding: 6px;
}

.avfallstype-image {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: contain;
  padding: 6px;
}

.image-fallback {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #efecf8;
  font-weight: 500;
  color: var(--accent-dark);
}

.selected-name {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.012em;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 500;
  background: #ded8f0;
  color: var(--accent-dark);
}

.unit-line {
  font-size: clamp(21px, 2.6vw, 30px);
  text-align: center;
  font-weight: 500;
}

.unit-line strong {
  font-weight: 500;
}

.qty-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 10px;
}

.qty-btn,
.qty-display,
.action-big,
.confirm-btn,
.mini-btn,
.keypad-grid button {
  border: none;
  border-radius: 18px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
}

.qty-btn {
  min-height: 96px;
  font-size: clamp(24px, 3.8vw, 42px);
  color: #fff;
}

.qty-btn.plus {
  background: var(--green-dark);
}

.qty-btn.minus {
  background: var(--red-dark);
}

.qty-display {
  min-height: 96px;
  font-size: clamp(34px, 6vw, 62px);
  background: #fff;
  border: 3px solid var(--accent);
  color: var(--accent-dark);
}

.keypad-wrap {
  border-radius: 16px;
  border: 2px solid var(--border);
  padding: 10px;
  background: #fff;
}

.keypad-wrap.is-hidden {
  display: none;
}

.keypad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.mini-btn {
  min-height: var(--touch-target-min);
  padding: 0 14px;
  border: 1px solid var(--border);
  background: #efecf8;
  color: var(--accent-dark);
  font-size: 16px;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 8px;
}

.keypad-grid button {
  min-height: 74px;
  font-size: clamp(22px, 3.6vw, 34px);
  background: #ded8f0;
  color: var(--accent-dark);
  border: 1px solid var(--border);
}

.keypad-grid .wide {
  grid-column: span 2;
}

.keypad-grid .success {
  background: var(--green-dark);
  color: #fff;
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-secondary-row {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.action-big {
  min-height: 122px;
  font-size: clamp(38px, 7vw, 78px);
}

.action-big.in {
  background: var(--green);
  color: #fff;
}

.action-big.out {
  background: var(--red);
  color: #fff;
}

.action-mid {
  min-height: 82px;
  min-width: min(420px, 82%);
  font-size: clamp(30px, 4.8vw, 52px);
  border: none;
  border-radius: 18px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
}

.action-mid.transfer {
  background: var(--blue);
  color: #fff;
}

.action-status {
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  background: #efecf8;
  border: 1px solid var(--border);
  font-size: 18px;
  color: var(--muted);
}

.field-nav-link {
  justify-self: center;
}

.field-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tools-shell {
  padding-bottom: 36px;
}

/* ── Startsiden for feltverktøyene (feltverktoy.html) ──────────────────────
   Hvit side. Hvert verktøy er et kort i en lys tone av sin egen farge fra
   Attvin-paletten, med ikonet i full farge på en hvit flate. Fargen er en
   aksent: teksten er alltid mørk, og kortene har ingen kant.
   Nettbrett: rutenett med tre kolonner. Telefon: én kolonne med rader. */

body:has(.fs-side) {
  background: #fff;
}

.fs-side {
  --fs-tekst-dempet: rgba(35, 31, 32, 0.64);
  width: min(1040px, 100% - 48px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* Fargene per verktøy: lys flate, ikon i full (eller mørk) tone. */
.fs-farge-lilla {
  --fs-flate: #efecf8;
  --fs-ikon: #5c3cb5;
}

.fs-farge-blaa {
  --fs-flate: #e5f0f9;
  --fs-ikon: #0065c1;
}

.fs-farge-gronn {
  --fs-flate: #d9f3e0;
  --fs-ikon: #25763c; /* full grønn (#3fc564) er for lys som strek på lys flate */
}

.fs-farge-gul {
  --fs-flate: #fff4cc;
  --fs-ikon: #6f5a00; /* mørk gul: full gul har for lite kontrast */
}

/* ── Toppen ── */

.fs-topp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

.fs-logo {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.fs-logo svg {
  display: block;
  width: 96px;
  height: auto;
}

.fs-status {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.fs-hvem {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: #efecf8;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.fs-hvem[hidden] {
  display: none;
}

.fs-hvem svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
}

.fs-nett {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--fs-tekst-dempet);
  font-size: 15px;
  white-space: nowrap;
}

.fs-nett svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.fs-nett.er-uten {
  color: var(--red-dark);
  background: #ffddd9;
  border-radius: 999px;
  padding: 0 14px 0 12px;
  font-weight: 600;
}

.fs-skjult {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.fs-meny-knapp {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-right: -8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fs-tekst-dempet);
  cursor: pointer;
}

.fs-meny-knapp svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.fs-meny-knapp:hover,
.fs-meny-knapp[aria-expanded="true"] {
  background: #efecf8;
  color: var(--accent);
}

.fs-meny-knapp:focus-visible,
.fs-meny a:focus-visible,
.fs-meny button:focus-visible,
.fs-kort:focus-visible,
.fs-knapp:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.fs-meny {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 240px;
  padding: 6px;
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(35, 31, 32, 0.06),
    0 4px 8px rgba(35, 31, 32, 0.04),
    0 16px 36px rgba(57, 32, 128, 0.14);
  display: grid;
}

.fs-meny[hidden] {
  display: none;
}

.fs-meny a,
.fs-meny button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.fs-meny a:hover,
.fs-meny button:hover {
  background: #efecf8;
}

.fs-meny svg {
  width: 22px;
  height: 22px;
  fill: var(--accent);
  flex: none;
}

/* ── Hilsenen ── */

.fs-hode {
  margin: 28px 0 32px;
}

.fs-dag {
  margin: 0 0 4px;
  color: var(--fs-tekst-dempet);
  font-size: 16px;
}

.fs-dag:empty {
  display: none;
}

.fs-tittel {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.fs-merknad {
  margin: 10px 0 0;
  color: var(--fs-tekst-dempet);
  font-size: 16px;
}

.fs-merknad[hidden] {
  display: none;
}

/* ── Verktøyene ── */

.fs-verktoy {
  flex: 1 0 auto;
  display: grid;
  align-content: start;
  gap: 28px;
}

.fs-gruppe-tittel {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--fs-tekst-dempet);
}

.fs-rutenett {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.fs-kort {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 20px;
  min-height: 148px;
  padding: 18px 20px 20px;
  border-radius: 18px;
  background: var(--fs-flate, #efecf8);
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 140ms cubic-bezier(0.2, 0, 0, 1);
}

/* Trykk: kortet går et hakk ned og blir litt mørkere. Raskt inn, mykt ut. */
.fs-kort::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(35, 31, 32, 0.06);
  opacity: 0;
  transition: opacity 160ms ease-out;
  pointer-events: none;
}

.fs-kort:active {
  transform: scale(0.98);
  transition-duration: 60ms;
}

.fs-kort:active::after {
  opacity: 1;
  transition-duration: 40ms;
}

@media (hover: hover) {
  .fs-kort:hover::after {
    opacity: 0.6;
  }
}

.fs-ikon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 1px 1px rgba(35, 31, 32, 0.04),
    0 2px 6px rgba(35, 31, 32, 0.05);
  flex: none;
}

.fs-ikon svg {
  width: 30px;
  height: 30px;
  fill: var(--fs-ikon, var(--accent));
}

.fs-pil {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  transition: transform 160ms cubic-bezier(0.2, 0, 0, 1);
}

.fs-pil svg {
  width: 22px;
  height: 22px;
  fill: var(--fs-ikon, var(--accent));
  opacity: 0.55;
}

@media (hover: hover) {
  .fs-kort:hover .fs-pil {
    transform: translateX(3px);
  }
}

.fs-tekst {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.fs-navn {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.fs-meta {
  font-size: 15px;
  line-height: 1.35;
  color: var(--fs-tekst-dempet);
}

.fs-tom {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 40px 20px;
  border-radius: 18px;
  background: #efecf8;
  color: var(--ink);
  font-size: 18px;
  text-align: center;
}

.fs-tom p {
  margin: 0;
  max-width: 34ch;
}

.fs-knapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.fs-knapp svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.fs-fot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  color: var(--fs-tekst-dempet);
  font-size: 15px;
}

.fs-fot svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
}

/* Stående nettbrett: høyere kort og større ikon, så skjermen ikke blir tom nederst. */
@media (min-width: 600px) and (min-height: 1000px) {
  .fs-kort {
    min-height: 184px;
    padding: 22px 22px 24px;
    gap: 28px;
  }

  .fs-ikon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .fs-ikon svg {
    width: 34px;
    height: 34px;
  }

  .fs-tittel {
    font-size: 38px;
  }

  .fs-hode {
    margin: 40px 0 40px;
  }

  .fs-verktoy {
    gap: 36px;
  }
}

/* Liggende nettbrett med lite høyde: litt lavere kort, så alt får plass. */
@media (min-width: 600px) and (max-height: 860px) {
  .fs-hode {
    margin: 20px 0 30px;
  }

  .fs-kort {
    min-height: 132px;
  }

  .fs-verktoy {
    gap: 22px;
  }
}

/* Telefon: én kolonne med rader, ikonet til venstre. */
@media (max-width: 599px) {
  .fs-side {
    width: calc(100% - 32px);
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .fs-logo svg {
    width: 84px;
  }

  .fs-hode {
    margin: 18px 0 24px;
  }

  .fs-tittel {
    font-size: 28px;
  }

  .fs-verktoy {
    gap: 24px;
  }

  .fs-rutenett {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .fs-kort {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    min-height: 84px;
    padding: 14px 16px;
    border-radius: 16px;
  }

  .fs-ikon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
  }

  .fs-pil {
    position: static;
    margin-left: auto;
    flex: none;
  }

  .fs-pil svg {
    width: 20px;
    height: 20px;
  }

  .fs-ikon svg {
    width: 28px;
    height: 28px;
  }

  .fs-navn {
    font-size: 18px;
  }

  .fs-meta {
    font-size: 14px;
  }

  .fs-hvem {
    font-size: 15px;
    padding: 0 12px 0 10px;
  }

  .fs-nett.er-uten span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .fs-nett.er-uten {
    padding: 0 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fs-kort,
  .fs-kort::after {
    transition: none;
  }

  .fs-kort:active,
  .fs-kort:hover .fs-pil {
    transform: none;
  }
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 31, 32, 0.55);
}

.modal-panel {
  position: relative;
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.commit-panel {
  width: min(700px, 96vw);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.modal-body {
  padding: 14px;
  display: grid;
  gap: 12px;
  overflow-y: auto;
}

.search-input,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--touch-input-height);
  border-radius: 14px;
  border: 2px solid var(--border);
  padding: 12px;
  font-size: 23px;
  font-family: inherit;
}

.field {
  display: grid;
  gap: 6px;
}

.field.is-hidden {
  display: none;
}

.field span {
  font-size: 17px;
  color: var(--muted);
  font-weight: 500;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.item-list {
  display: grid;
  gap: 10px;
}

.item-option {
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #fff;
  min-height: 96px;
  width: 100%;
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
}

.item-option .avfallstype-image {
  width: 64px;
  height: 64px;
  padding: 5px;
}

.item-option .name {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 500;
  line-height: 1.1;
}

.item-option .sub {
  color: var(--muted);
  font-size: 17px;
  margin-top: 6px;
}

.commit-summary {
  font-size: 21px;
  background: #ded8f0;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px;
}

.confirm-btn {
  min-height: 86px;
  font-size: 38px;
  background: var(--green-dark);
  color: #fff;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  border-radius: 12px;
  color: #fff;
  background: #25763c;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 40;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.inout-shell {
  padding-bottom: 24px;
}

.inout-step-panel {
  gap: 12px;
}

.inout-step-content.is-hidden {
  display: none;
}

.inout-step-summary {
  width: 100%;
  min-height: 58px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f5f2ff;
  color: var(--accent-dark);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inout-step-summary.is-hidden {
  display: none;
}

.inout-summary-left {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.inout-summary-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.inout-summary-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inout-summary-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.inout-summary-sub {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.inout-summary-action {
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.inout-summary-action.out {
  background: var(--red-dark);
}

.inout-summary-action.in {
  background: var(--green-dark);
}

.inout-summary-action.transfer {
  background: var(--blue);
}

.inout-summary-action.neutral {
  background: var(--accent);
}

.inout-summary-change {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.inout-summary-media {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inout-summary-item-image,
.inout-summary-fallback,
.inout-summary-type-image,
.inout-summary-type-symbol {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.inout-summary-item-image,
.inout-summary-type-image {
  object-fit: contain;
  padding: 3px;
}

.inout-summary-fallback,
.inout-summary-type-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.inout-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inout-step-hint {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.inout-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.inout-action-btn {
  min-height: 118px;
  padding: 12px 14px;
  border: none;
  border-radius: 16px;
  font-family: inherit;
  display: grid;
  gap: 6px;
  align-content: center;
  text-align: left;
  color: #fff;
  cursor: pointer;
  opacity: 0.86;
}

.inout-action-label {
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 700;
  line-height: 1;
}

.inout-action-desc {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.9);
}

.inout-action-btn.is-active {
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.65) inset;
}

.inout-action-btn.out {
  background: var(--red);
}

.inout-action-btn.in {
  background: var(--green-dark);
}

.inout-action-btn.transfer {
  background: var(--blue);
}

.inout-action-status {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #faf9fe;
  color: var(--muted);
  font-size: 16px;
  padding: 10px 12px;
}

.inout-action-locations {
  display: grid;
  gap: 10px;
}

.inout-next-btn {
  min-height: 78px;
  font-size: clamp(26px, 4.1vw, 38px);
  width: min(460px, 100%);
}

.inout-cta-row {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

.inout-next-btn.is-hidden {
  display: none;
}

.inout-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-top-department-panel.is-hidden {
  display: none;
}

#inout-department-panel {
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 0;
}

#inout-department-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inout-department-top {
  margin-bottom: 4px;
}

.inout-department-top.is-hidden {
  display: none;
}

.inout-department-top .inout-pill {
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
}

.inout-pill {
  min-height: var(--touch-target-min);
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent-dark);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.inout-pill.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.inout-item-list {
  max-height: min(56vh, 540px);
  overflow-y: auto;
}

.inout-item-option {
  grid-template-columns: max-content minmax(0, 1fr) auto;
  text-align: left;
  align-items: stretch;
}

.inout-item-option.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(92, 60, 181, 0.22);
}

.inout-item-main {
  min-width: 0;
}

.inout-item-main .name,
.inout-item-main .sub,
.selected-name {
  overflow-wrap: anywhere;
}

.item-avfallstype-symbol {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 30px;
  line-height: 1;
}

.inout-item-right {
  text-align: right;
}

.inout-item-qty {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-dark);
}

.inout-selection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.inout-summary-chip {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}

.inout-summary-chip span {
  color: var(--muted);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0.6px;
}

.inout-summary-chip strong {
  font-size: 16px;
  line-height: 1.2;
}

.inout-summary-chip.is-done {
  background: #efecf8;
}

.inout-step-panel.is-disabled {
  opacity: 0.55;
}

#open-register-modal,
#confirm-register {
  min-height: 90px;
  font-size: clamp(30px, 5vw, 44px);
  width: min(460px, 100%);
}

#confirm-register.is-full-width {
  width: 100%;
}

#open-register-modal:disabled,
#confirm-register:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#inout-order-no {
  min-height: 72px;
  border-radius: 14px;
  border: 2px solid var(--border);
  padding: 12px;
  font-size: 23px;
  font-family: inherit;
}

#inout-note {
  min-height: 112px;
}

.inout-session-log {
  display: grid;
  gap: 8px;
}

.inout-log-entry {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.inout-log-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inout-log-badge {
  border-radius: 999px;
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.inout-log-badge.in {
  background: var(--green-dark);
}

.inout-log-badge.out {
  background: var(--red-dark);
}

.inout-log-badge.transfer {
  background: var(--blue);
}

.inout-log-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

.inout-log-sub {
  color: var(--muted);
  font-size: 14px;
}

.inout-success-panel {
  width: min(620px, 96vw);
}

.inout-final-panel {
  width: min(620px, 96vw);
}

.inout-item-panel {
  width: min(1020px, 96vw);
}

.inout-item-modal-head {
  padding: 16px 18px;
}

.inout-item-modal-body {
  padding: 16px 18px 18px;
  gap: 14px;
}

.inout-item-search-field {
  margin: 0;
}

.inout-item-modal-filters {
  display: grid;
  gap: 10px;
  padding: 2px 0 2px;
}

.inout-item-modal-body .inout-category-pills {
  gap: 10px;
  row-gap: 10px;
}

.inout-item-list-modal {
  max-height: min(58vh, 600px);
  overflow-y: auto;
  padding: 2px 4px 2px 2px;
  gap: 12px;
}

.inout-item-list-modal .inout-item-option {
  min-height: 106px;
  padding: 12px;
  gap: 12px;
  align-items: center;
  overflow: hidden;
}

.inout-item-list-modal .inout-item-main {
  display: grid;
  gap: 6px;
  align-content: center;
  min-width: 0;
}

.inout-item-list-modal .item-media {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  align-items: center;
  max-width: 150px;
  overflow: visible;
}

.inout-item-list-modal .item-image {
  width: 72px;
  height: 72px;
  padding: 4px;
}

.inout-item-list-modal .avfallstype-image {
  width: 46px;
  height: 46px;
  padding: 3px;
}

.inout-item-list-modal .item-avfallstype-symbol {
  width: 46px;
  height: 46px;
  font-size: 22px;
}

.inout-item-list-modal .name {
  overflow-wrap: anywhere;
  line-height: 1.18;
}

.inout-item-list-modal .sub {
  margin-top: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.inout-item-list-modal .inout-item-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 92px;
}

.inout-item-list-modal .inout-item-qty {
  font-size: 18px;
  line-height: 1.2;
  text-align: right;
}

.inout-final-summary {
  font-size: 18px;
  background: #ede8fb;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px 14px;
}

.inout-final-overview {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px;
  align-items: center;
}

.inout-final-summary .inout-summary-media {
  gap: 8px;
}

.inout-final-summary .inout-summary-item-image {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  padding: 4px;
}

.inout-final-summary .inout-summary-type-image,
.inout-final-summary .inout-summary-type-symbol {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.inout-final-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.inout-final-name {
  font-size: 21px;
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.inout-final-sub {
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.inout-final-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inout-final-pill {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 860px) {
  .touch-top {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .back-links {
    grid-template-columns: 1fr;
  }

  .user-box {
    justify-items: start;
  }

  .shared-user-box,
  .shared-user-box.is-waiting,
  .shared-user-actions,
  .shared-user-meta {
    justify-items: start;
    justify-content: flex-start;
    text-align: left;
  }

  .shared-touch-auth-card {
    padding: 20px 16px;
  }

  .qty-grid {
    grid-template-columns: 1fr 1fr;
  }

  .qty-display {
    grid-column: span 2;
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }

  .search-input,
  .field input,
  .field select,
  .field textarea {
    font-size: 20px;
  }

  .inout-action-grid {
    grid-template-columns: 1fr;
  }

  .inout-step-summary {
    font-size: 16px;
    min-height: 54px;
    padding: 10px 12px;
  }

  .inout-item-option {
    grid-template-columns: 1fr;
  }

  .inout-item-right {
    text-align: left;
  }

  .inout-item-modal-body {
    padding: 12px;
    gap: 12px;
  }

  .inout-item-list-modal {
    padding-right: 2px;
    max-height: min(60vh, 560px);
  }

  .inout-item-list-modal .inout-item-option {
    grid-template-columns: max-content minmax(0, 1fr);
    min-height: 96px;
    padding: 10px;
  }

  .inout-item-list-modal .item-media {
    max-width: 124px;
    gap: 6px;
  }

  .inout-item-list-modal .item-image {
    width: 62px;
    height: 62px;
  }

  .inout-item-list-modal .avfallstype-image,
  .inout-item-list-modal .item-avfallstype-symbol {
    width: 40px;
    height: 40px;
  }

  .inout-item-list-modal .inout-item-right {
    grid-column: 2;
    justify-content: flex-start;
    min-width: 0;
  }

  .inout-selection-summary {
    grid-template-columns: 1fr;
  }

  #inout-order-no {
    font-size: 20px;
  }

  .inout-final-overview {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .inout-final-summary .inout-summary-item-image {
    width: 64px;
    height: 64px;
  }

  .inout-final-summary .inout-summary-type-image,
  .inout-final-summary .inout-summary-type-symbol {
    width: 44px;
    height: 44px;
  }
}
