/* Lagrets sidspecifika komponenter ovanpå /shared/components.css (bara tokens, inga råa färger).
   De mobila execution-sidorna (egenuttag, plock, snabbsaldo, fota) delar EN uppsättning: .exec-*
   (förut dubblerad som .snabb-* och .uttag-*). */

/* ───────── Mobil execution: en fråga i taget, stora ytor ───────── */
.exec-wrap { max-width: 32rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
.exec-fraga { font-size: 1.125rem; font-weight: 650; margin: 0 0 0.75rem; }
.exec-sok-wrap { position: relative; }
.exec-sok {
  width: 100%; min-height: 56px; padding: 0.85rem 2.75rem 0.85rem 1rem; font-size: 1.125rem;
  background: var(--card); color: var(--fg); border: 2px solid var(--hairline); border-radius: var(--radius);
}
.exec-sok:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.exec-sok-wrap .spinner { position: absolute; right: 1rem; top: 50%; margin-top: -9px; }
.exec-vald { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.exec-vald.is-klar { background: var(--ok-tone); box-shadow: none; }
.exec-namn { font-size: 1.125rem; font-weight: 650; }
.exec-plats { font-size: 1.5rem; font-weight: 700; color: var(--accent-ink); margin: 0.4rem 0; }
.exec-stepper { display: flex; align-items: stretch; gap: 0.75rem; margin: 0.75rem 0 1rem; }
.exec-stepbtn {
  flex: 0 0 64px; min-height: 64px; border: 0; border-radius: var(--radius); background: var(--fill); color: var(--fg);
  font-size: 1.75rem; font-weight: 650; cursor: pointer;
}
.exec-stepbtn:active { background: var(--fill-press); }
.exec-stepbtn:disabled { opacity: 0.45; cursor: not-allowed; }
.exec-stepper-sm .exec-stepbtn { flex-basis: 56px; min-height: 48px; font-size: 1.4rem; }
.exec-qty {
  flex: 1; min-width: 0; text-align: center; font-size: 2rem; font-weight: 700; background: var(--card); color: var(--fg);
  border: 2px solid var(--hairline); border-radius: var(--radius); -moz-appearance: textfield;
}
.exec-qty::-webkit-outer-spin-button, .exec-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.exec-qty:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.exec-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 1.25rem; }
.exec-stat { text-align: center; background: var(--bg-2); border-radius: var(--radius-sm); padding: 0.6rem 0.25rem; }
.exec-stat-val { font-size: 1.4rem; font-weight: 700; }
.exec-stat-lbl { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
.exec-delta { margin-top: 0.6rem; text-align: center; font-weight: 650; }
.exec-klart { text-align: center; padding: 2rem 1rem; }
.klart-ikon {
  display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 1rem;
  border-radius: 999px; background: var(--ok-tone); color: var(--ok); font-size: 2.5rem;
}
.klart-rad { font-size: 1.2rem; font-weight: 650; margin-bottom: 0.25rem; }
.exec-actions { display: grid; gap: 0.75rem; margin-top: 1rem; }
.antal-big { font-size: 1.5rem; font-weight: 700; }

/* ───────── Startsida (launcher) ───────── */
.launcher { max-width: 45rem; margin: 0 auto; padding: 1.25rem; }
.launcher-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.launcher-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; min-height: 8rem; padding: 1.25rem 0.75rem;
  background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); color: var(--fg); text-decoration: none; text-align: center;
  transition: box-shadow var(--duration-quick) var(--ease-smooth-out), transform var(--duration-micro) var(--ease-smooth-out);
}
.launcher-tile:hover { box-shadow: var(--shadow-card-hover); }
.launcher-tile:active { transform: scale(0.97); }
.launcher-tile-icon { color: var(--accent-ink); }
.launcher-tile-icon svg { width: 44px; height: 44px; }
.launcher-tile-label { font-weight: 650; }
.launcher-tile-accent { grid-column: 1 / -1; min-height: 6rem; background: var(--accent-fill); color: #fff; }
.launcher-tile-accent .launcher-tile-icon { color: #fff; }
@media (min-width: 560px) { .launcher-grid { grid-template-columns: repeat(3, 1fr); } }

/* ───────── Dashboard ───────── */
.warnings { display: grid; gap: 1px; margin-bottom: 1.25rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); background: var(--hairline); }
.warning-item { display: flex; align-items: center; gap: 0.75rem; min-height: var(--tap); padding: 0.6rem 1rem; background: var(--card); color: var(--fg); text-decoration: none; border-left: 4px solid var(--info); }
.warning-item:hover { background: var(--bg-2); }
.warning-danger { border-left-color: var(--danger); }
.warning-warning { border-left-color: var(--warn); }
.warning-module { min-width: 5rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-2); }
.warning-text { flex: 1; }
.widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.widget { display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.widget.is-offline { opacity: 0.75; }
.widget-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.widget-header h2 { margin: 0; font-size: 1.0625rem; }
.widget-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.widget-stat-full { grid-column: 1 / -1; }
.widget-stat-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget-stat-value { font-size: 1.4rem; font-weight: 700; line-height: 1.15; }
.widget-stat-value.is-sm { font-size: 1.05rem; }
.widget-stat.is-warn .widget-stat-value { color: var(--warn); }
.widget-stat.is-danger .widget-stat-value { color: var(--danger); }
.widget-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--hairline); }
.belaggning { width: 100%; height: 8px; margin-top: 0.4rem; accent-color: var(--accent-fill); }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h2::before { content: "▾ "; color: var(--fg-2); }
details.card:not([open]) > summary h2::before { content: "▸ "; }

/* ───────── Tabellrader för avbockning och plock ───────── */
.antal-input { width: 6rem; text-align: right; }
.sok-inline { min-width: 12rem; }

/* ───────── Produktbilder ───────── */
.bild-typval { display: flex; gap: 0.5rem; margin: 1rem 0; padding: 0; border: 0; min-width: 0; }
.bild-typval label {
  flex: 1; display: grid; gap: 0.15rem; min-height: 56px; padding: 0.7rem 0.85rem; cursor: pointer;
  border: 2px solid var(--hairline); border-radius: var(--radius); position: relative;
}
.bild-typval label.vald { border-color: var(--accent); background: var(--accent-tint); }
.bild-typval label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.bild-typval input { position: absolute; opacity: 0; pointer-events: none; }
.bild-forhands { display: block; width: 100%; max-height: 340px; object-fit: contain; margin-top: 1rem; background: var(--bg-2); border-radius: var(--radius); }
.bild-ko { display: grid; gap: 0.75rem; }
.bild-kort { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.85rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.bild-kort.fel { box-shadow: inset 4px 0 0 var(--danger), var(--shadow-card); }
.bild-tumnagel { width: 96px; height: 96px; flex-shrink: 0; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-2); }
.bild-kort-namn { color: var(--fg-2); font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bild-kort-fel { color: var(--danger); font-size: 0.8125rem; margin-top: 0.35rem; overflow-wrap: anywhere; }
@media (max-width: 520px) { .bild-tumnagel { width: 72px; height: 72px; } }

/* ───────── Följesedel (utskrift) ───────── */
.fs-verktyg { max-width: 50rem; margin: 1rem auto; padding: 0 1.5rem; display: flex; gap: 0.75rem; }
.fs-sida { max-width: 50rem; margin: 0 auto 2rem; padding: 2rem 1.5rem; background: #fff; color: #1d1d1f; border-radius: var(--radius); }
.fs-huvud { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.5rem; border-bottom: 3px solid #1d1d1f; }
.fs-huvud h1 { margin: 0; font-size: 1.75rem; letter-spacing: 0.05em; color: #1d1d1f; }
.fs-nr { font-size: 1.25rem; font-weight: 700; }
.fs-parter { display: flex; flex-wrap: wrap; gap: 1rem 3rem; }
.fs-block { margin-bottom: 1.5rem; }
.fs-block h3 { margin: 0 0 0.25rem; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: #5e5e63; }
.fs-dim { color: #5e5e63; }
.fs-tabell { width: 100%; border-collapse: collapse; }
.fs-tabell th { text-align: left; border-bottom: 2px solid #1d1d1f; padding: 0.5rem; font-size: 0.85rem; }
.fs-tabell td { border-bottom: 1px solid #d2d2d7; padding: 0.45rem 0.5rem; }
.fs-tabell .num { text-align: right; }
.fs-pre { white-space: pre-line; }
.fs-signatur { display: flex; gap: 3rem; margin-top: 3rem; }
.fs-signatur > div { flex: 1; border-top: 1px solid #1d1d1f; padding-top: 0.35rem; font-size: 0.85rem; color: #5e5e63; }
@media print {
  .fs-verktyg, .alert, .toasts { display: none !important; }
  body { background: #fff !important; }
  .fs-sida { padding: 0; margin: 0; max-width: none; }
}
