:root {
  color-scheme: dark;
  --bg: #05080a;
  --surface: #0d1117;
  --surface-alt: #151b21;
  --ink: #f8fafc;
  --muted: #aab6b2;
  --line: rgba(166, 255, 0, 0.22);
  --strong-line: rgba(255, 122, 0, 0.5);
  --primary: #a6ff00;
  --primary-dark: #74d600;
  --amber: #ff7a00;
  --blue: #38bdf8;
  --red: #ff3b30;
  --green: #75ff00;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.45), 0 0 22px rgba(166, 255, 0, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(166, 255, 0, 0.16), transparent 26%),
    radial-gradient(circle at 92% 8%, rgba(255, 122, 0, 0.18), transparent 30%),
    linear-gradient(180deg, #030506 0%, #090d10 46%, #05080a 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(5, 8, 10, 0.72), rgba(5, 8, 10, 0.94)),
    url("assets/inout-logo.png?v=40") center / cover no-repeat;
}

.login-panel {
  display: grid;
  gap: 14px;
  width: min(100%, 390px);
  padding: 24px;
  border: 1px solid rgba(166, 255, 0, 0.36);
  border-radius: 8px;
  background: rgba(9, 12, 15, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.login-panel h1 {
  margin: 0;
  font-size: 1.65rem;
}

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

.login-form {
  display: grid;
  gap: 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 122, 0, 0.44);
  background: rgba(3, 5, 6, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.34);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: cover;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(166, 255, 0, 0.54);
  box-shadow: 0 0 18px rgba(166, 255, 0, 0.2), 0 0 18px rgba(255, 122, 0, 0.16);
}

.login-logo {
  width: 160px;
  height: 160px;
}

.brand h1 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.1;
  color: #ffffff;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.user-badge {
  display: grid;
  gap: 2px;
  min-width: 92px;
  padding: 7px 10px;
  border: 1px solid rgba(166, 255, 0, 0.28);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.92);
}

.user-badge span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.user-badge small {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.sync-badge {
  display: grid;
  gap: 2px;
  min-width: 128px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 122, 0, 0.32);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(13, 17, 23, 0.92);
}

.sync-badge span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.sync-badge small {
  overflow: hidden;
  max-width: 180px;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-badge.shared {
  border-color: rgba(166, 255, 0, 0.62);
  background: rgba(166, 255, 0, 0.08);
}

.sync-badge.saving span {
  color: var(--amber);
}

.install-button[hidden] {
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 84px;
  display: grid;
  gap: 8px;
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(13, 17, 23, 0.56);
  text-align: left;
  cursor: pointer;
}

.nav-button:hover {
  border-color: rgba(166, 255, 0, 0.26);
  background: rgba(166, 255, 0, 0.08);
}

.nav-button.active {
  color: #0a0d0f;
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), #68d900);
  font-weight: 700;
  box-shadow: 0 0 18px rgba(166, 255, 0, 0.22);
}

.nav-count {
  min-width: 28px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #0a0d0f;
  background: var(--amber);
  font-size: 0.76rem;
  text-align: center;
}

.nav-section-label {
  margin: 8px 4px 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main {
  min-width: 0;
}

body.staff-app-mode {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(166, 255, 0, 0.08), transparent 24%, transparent 76%, rgba(255, 122, 0, 0.08)),
    #020405;
}

body.staff-app-mode .topbar,
body.staff-app-mode .sidebar {
  display: none;
}

body.staff-app-mode .layout {
  display: block;
  min-height: 100vh;
  padding: 0;
}

body.staff-app-mode .main {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 15, 16, 0.98), rgba(4, 7, 8, 1)),
    #05080a;
}

body.staff-app-mode .view {
  display: block;
  gap: 0;
}

@media (min-width: 540px) {
  body.staff-app-mode {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 18px 0;
  }

  body.staff-app-mode .app-shell {
    width: 100%;
  }

  body.staff-app-mode .layout {
    min-height: auto;
  }

  body.staff-app-mode .main {
    height: min(900px, calc(100vh - 36px));
    min-height: 720px;
    overflow-y: auto;
    border: 1px solid rgba(166, 255, 0, 0.34);
    border-radius: 28px;
    box-shadow:
      0 28px 80px rgba(0, 0, 0, 0.72),
      0 0 0 8px rgba(255, 255, 255, 0.03);
  }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  min-width: 0;
  max-width: 100%;
}

.metric {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 26, 31, 0.98), rgba(9, 12, 15, 0.98));
  box-shadow: var(--shadow);
}

.metric:nth-child(even) {
  border-color: rgba(255, 122, 0, 0.34);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--primary);
  text-shadow: 0 0 14px rgba(166, 255, 0, 0.18);
}

.view {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.view > * {
  min-width: 0;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.34fr);
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(166, 255, 0, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(166, 255, 0, 0.14), rgba(255, 122, 0, 0.08)),
    #070b0e;
  box-shadow: var(--shadow);
}

.portal-hero.owner-hero {
  border-color: rgba(166, 255, 0, 0.42);
}

.portal-hero.company-hero {
  border-color: rgba(56, 189, 248, 0.42);
}

.portal-hero.client-hero {
  border-color: rgba(166, 255, 0, 0.52);
}

.portal-hero.customer-hero {
  border-color: rgba(56, 189, 248, 0.36);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(166, 255, 0, 0.1), rgba(255, 122, 0, 0.08)),
    #070b0e;
}

.portal-hero.admin-hero {
  border-color: rgba(255, 122, 0, 0.48);
}

.portal-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-hero h2 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.08;
}

.portal-hero p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.portal-live-box {
  display: grid;
  gap: 8px;
  align-content: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(3, 5, 6, 0.62);
}

.portal-live-box span,
.portal-card-head span,
.portal-metric span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-live-box strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}

.portal-metric {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(166, 255, 0, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 26, 31, 0.98), rgba(9, 12, 15, 0.98));
  box-shadow: var(--shadow);
}

.portal-metric strong {
  color: var(--primary);
  font-size: 1.5rem;
  line-height: 1;
}

.portal-grid {
  display: grid;
  gap: 12px;
}

.portal-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(166, 255, 0, 0.24);
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.98), rgba(7, 10, 13, 0.98));
  box-shadow: var(--shadow);
}

.portal-card-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.portal-card-button:hover {
  border-color: rgba(166, 255, 0, 0.56);
  background: rgba(166, 255, 0, 0.08);
}

.customer-area-grid {
  align-items: stretch;
}

.customer-area-card {
  align-content: start;
  min-height: 190px;
}

.customer-area-card.locked {
  opacity: 0.7;
}

.customer-card-meta {
  align-self: end;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.customer-job-list {
  display: grid;
  gap: 8px;
}

.customer-job-row em {
  min-width: 72px;
  text-align: center;
}

.portal-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.portal-card-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 1.02rem;
  text-align: right;
}

.portal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.portal-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.6fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(3, 5, 6, 0.42);
}

.portal-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-row em {
  justify-self: end;
  padding: 3px 7px;
  border-radius: 999px;
  color: #071005;
  background: var(--primary);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-row em.pending {
  background: var(--amber);
}

.portal-action-list {
  display: grid;
  gap: 8px;
}

.portal-action {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 122, 0, 0.28);
  border-radius: 8px;
  color: var(--ink);
  background: #0b1014;
  text-align: left;
  cursor: pointer;
}

.portal-action:hover {
  border-color: rgba(166, 255, 0, 0.48);
  background: rgba(166, 255, 0, 0.08);
}

.portal-action span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.client-card {
  align-content: start;
}

.client-job-list {
  display: grid;
  gap: 8px;
}

.client-job-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.55fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(3, 5, 6, 0.42);
}

.client-job-row strong,
.client-job-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-job-row strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.client-job-row span {
  color: var(--muted);
  font-size: 0.8rem;
}

.client-job-row em {
  justify-self: end;
  padding: 3px 7px;
  border-radius: 999px;
  color: #071005;
  background: var(--primary);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.client-job-row em.pending {
  background: var(--amber);
}

.client-job-row.empty {
  grid-template-columns: 1fr;
  color: var(--muted);
  font-size: 0.84rem;
}

.view-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.view-header > div {
  min-width: 0;
  flex: 1 1 240px;
}

.view-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.view-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.98), rgba(7, 10, 13, 0.98));
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header h3 {
  margin: 0;
  font-size: 0.98rem;
}

.panel-body {
  padding: 16px;
}

.scan-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.35fr);
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label,
.field > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  color: var(--ink);
  background: #090d10;
}

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

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

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #071005;
  background: linear-gradient(135deg, var(--primary), #67d700);
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  background: linear-gradient(135deg, #c7ff42, var(--primary-dark));
}

.button.secondary {
  color: var(--ink);
  border-color: var(--strong-line);
  background: #10151a;
}

.button.secondary:hover {
  background: var(--surface-alt);
}

.button.warning {
  color: #0b0b0b;
  background: linear-gradient(135deg, var(--amber), #ffb000);
}

.button.danger {
  color: #ffffff;
  background: var(--red);
}

.button.ghost {
  color: var(--primary);
  background: transparent;
}

.button.ghost:hover {
  background: rgba(166, 255, 0, 0.08);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
}

.segment {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  color: var(--ink);
  background: #0b1014;
  cursor: pointer;
}

.segment.active {
  color: #071005;
  border-color: var(--primary);
  background: var(--primary);
  font-weight: 800;
}

.reason-current {
  display: grid;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  color: var(--primary);
  background: #090d10;
  font-weight: 800;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.reason-button {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  color: var(--ink);
  background: #0b1014;
  text-align: left;
  cursor: pointer;
}

.reason-button.active {
  color: #071005;
  border-color: var(--primary);
  background: var(--primary);
  font-weight: 800;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.workflow-card {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  color: var(--ink);
  background: #0b1014;
  text-align: left;
  cursor: pointer;
}

.workflow-card strong {
  font-size: 0.95rem;
}

.workflow-card span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.workflow-card.active {
  color: #071005;
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), #72d900);
}

.workflow-card.active span {
  color: #173000;
}

.staff-phone {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 100dvh;
  max-width: none;
  margin: 0;
  padding: max(10px, env(safe-area-inset-top)) 10px calc(88px + env(safe-area-inset-bottom));
}

.staff-appbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -10px -10px 0;
  padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  border-bottom: 1px solid rgba(255, 122, 0, 0.26);
  background: rgba(3, 5, 6, 0.94);
  backdrop-filter: blur(14px);
}

.staff-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.staff-brand img {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(166, 255, 0, 0.5);
  border-radius: 8px;
  object-fit: cover;
}

.staff-brand div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.staff-brand strong {
  font-size: 1rem;
  line-height: 1;
}

.staff-brand span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.staff-appbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.staff-admin-link {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 122, 0, 0.44);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(16, 21, 26, 0.92);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.staff-logout-link {
  border-color: rgba(166, 255, 0, 0.42);
}

.staff-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.staff-top h2 {
  margin: 2px 0 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.staff-top p,
.staff-home-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.staff-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(166, 255, 0, 0.28);
  border-radius: 8px;
  background: #070b0e;
  box-shadow: var(--shadow);
}

.staff-status-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(16, 21, 26, 0.86);
}

.staff-status-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.staff-status-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-kit-control {
  display: grid;
  gap: 0;
  padding: 0 2px;
}

.staff-kit-control h2 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1;
}

.staff-kit-control p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.staff-home-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(166, 255, 0, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(166, 255, 0, 0.13), rgba(255, 122, 0, 0.08)),
    #090d10;
  box-shadow: var(--shadow);
}

.staff-home-title h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 0.95;
}

.staff-home-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.staff-home-stat {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(3, 5, 6, 0.62);
}

.staff-home-stat span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.staff-home-stat strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-kicker {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.staff-count {
  display: grid;
  place-items: center;
  min-width: 74px;
  min-height: 62px;
  border: 1px solid rgba(166, 255, 0, 0.44);
  border-radius: 8px;
  background: rgba(166, 255, 0, 0.08);
}

.staff-count strong {
  color: var(--primary);
  font-size: 1.65rem;
  line-height: 1;
}

.staff-count span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.staff-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.staff-home-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.staff-action {
  display: grid;
  align-content: space-between;
  justify-items: start;
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  color: var(--ink);
  background: #0b1014;
  text-align: left;
  cursor: pointer;
}

.staff-action strong {
  font-size: 1.12rem;
}

.staff-action small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
}

.staff-action-code {
  display: inline-grid;
  place-items: center;
  min-width: 31px;
  height: 24px;
  border: 1px solid rgba(166, 255, 0, 0.42);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 900;
  background: rgba(166, 255, 0, 0.08);
}

.staff-home-action {
  grid-template-columns: 1fr;
  align-content: start;
  align-items: start;
  min-height: 82px;
  gap: 6px;
  padding: 8px;
  border-color: rgba(166, 255, 0, 0.3);
  background:
    linear-gradient(90deg, rgba(166, 255, 0, 0.08), transparent 55%),
    #0b1014;
}

.staff-home-action:nth-child(even) {
  border-color: rgba(255, 122, 0, 0.42);
}

.staff-action-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.staff-action-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-action-copy small {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.18;
  white-space: normal;
}

.staff-action.active {
  color: #071005;
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), #78dd00);
}

.staff-secondary-actions {
  display: grid;
  gap: 7px;
}

.staff-fix-label-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 39px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 122, 0, 0.32);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(16, 21, 26, 0.72);
  text-align: left;
  cursor: pointer;
}

.staff-fix-label-action .staff-action-copy strong {
  font-size: 0.88rem;
}

.staff-fix-label-action .staff-action-copy small {
  font-size: 0.68rem;
}

.staff-fix-label-action .staff-action-code {
  min-width: 27px;
  height: 22px;
  border-color: rgba(255, 122, 0, 0.34);
  color: var(--muted);
  font-size: 0.64rem;
  background: rgba(255, 122, 0, 0.06);
}

.staff-add-kit-action {
  border-color: rgba(166, 255, 0, 0.34);
  background:
    linear-gradient(90deg, rgba(166, 255, 0, 0.08), transparent 70%),
    rgba(16, 21, 26, 0.72);
}

.staff-add-kit-action .staff-action-code {
  color: var(--primary);
  border-color: rgba(166, 255, 0, 0.42);
  background: rgba(166, 255, 0, 0.08);
}

.staff-info-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(166, 255, 0, 0.22);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.96);
  box-shadow: var(--shadow);
}

.staff-current-job-card {
  border-color: rgba(255, 122, 0, 0.36);
}

.staff-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.staff-card-heading > span:first-child {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.staff-job-status,
.staff-issue-total {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(166, 255, 0, 0.36);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(166, 255, 0, 0.08);
  font-size: 0.68rem;
  font-weight: 900;
}

.staff-job-status.closed {
  color: var(--amber);
  border-color: rgba(255, 122, 0, 0.48);
  background: rgba(255, 122, 0, 0.08);
}

.staff-job-status.pending {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.staff-current-ref {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-info-card p {
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.18;
}

.staff-card-meta {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.staff-card-meta strong {
  color: var(--ink);
}

.staff-issue-list {
  display: grid;
  gap: 4px;
}

.staff-issue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.staff-issue-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.staff-issue-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-issue-row strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.staff-utility-action {
  width: auto;
  min-height: 50px;
}

.staff-live-job-strip {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.9);
}

.staff-live-job-strip span,
.staff-exception-note {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.staff-live-job-strip strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-utility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.staff-exception-note {
  text-align: right;
}

.staff-exception-note.clean {
  color: var(--primary);
}

.staff-card {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.96);
  box-shadow: var(--shadow);
}

.staff-step-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.96);
}

.staff-step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #071005;
  background: var(--primary);
  font-weight: 900;
}

.staff-step-body {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.staff-step-body h3,
.staff-extra-card h3 {
  margin: 0;
  font-size: 0.98rem;
}

.staff-scan-row,
.staff-bulk-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.6fr);
  gap: 8px;
}

.staff-bulk-form {
  grid-template-columns: minmax(0, 1fr) 74px auto;
}

.staff-small-action {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.84rem;
}

.staff-vehicle-form {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 122, 0, 0.52);
  border-radius: 8px;
  background: rgba(255, 122, 0, 0.08);
}

.staff-vehicle-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.staff-vehicle-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.staff-vehicle-grid label:last-child {
  grid-column: 1 / -1;
}

.staff-vehicle-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.staff-bulk-form select,
.staff-bulk-form input,
.staff-vehicle-grid input,
.staff-scan-row select,
.staff-step-body select {
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  color: var(--ink);
  background: #090d10;
}

.staff-scan-confirm {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(166, 255, 0, 0.52);
  border-radius: 8px;
  color: var(--primary);
  background: rgba(166, 255, 0, 0.09);
}

.staff-scan-confirm strong {
  font-size: 1rem;
}

.staff-extra-card {
  border-color: rgba(255, 122, 0, 0.58);
  background: rgba(255, 122, 0, 0.1);
}

.staff-label-status,
.staff-fix-form {
  display: grid;
  gap: 9px;
}

.staff-label-status p {
  margin: 0;
  color: var(--muted);
}

.staff-fix-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.staff-add-kit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.staff-bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 14;
  display: grid;
  margin: 0 -12px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(166, 255, 0, 0.28);
  background: rgba(3, 5, 6, 0.94);
  backdrop-filter: blur(14px);
}

.staff-back {
  justify-self: start;
}

.staff-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 0.55fr);
  gap: 10px;
}

.staff-site-field {
  grid-column: 1 / -1;
}

.staff-reason-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.staff-reason-grid .reason-button {
  min-height: 42px;
  padding: 7px 8px;
  font-size: 0.82rem;
  text-align: center;
}

.staff-scan {
  gap: 10px;
}

.staff-video {
  min-height: 168px;
}

.staff-video video {
  height: 190px;
}

.staff-scan-buttons,
.staff-submit-row,
.staff-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.staff-status {
  min-height: 44px;
  font-weight: 800;
}

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

.staff-section-head h3 {
  margin: 0;
}

.staff-empty {
  display: grid;
  place-items: center;
  min-height: 84px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(166, 255, 0, 0.04);
  font-weight: 800;
}

.staff-queue-list {
  display: grid;
  gap: 8px;
}

.staff-queue-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090d10;
}

.staff-queue-card div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.staff-queue-card strong,
.staff-queue-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-queue-card small {
  color: var(--muted);
}

.staff-queue-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.staff-qty {
  display: grid;
  grid-template-columns: 38px 62px 38px 44px;
  gap: 5px;
  align-items: center;
}

.staff-one {
  display: grid;
  place-items: center;
  min-width: 48px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary);
  background: rgba(166, 255, 0, 0.06);
}

.session-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.session-strip div {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(166, 255, 0, 0.06);
}

.session-strip span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.session-strip strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scanner-box {
  display: grid;
  gap: 10px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #16211f;
}

.video-shell video {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.video-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #dce8e5;
  text-align: center;
}

.scan-line {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 18px rgba(166, 255, 0, 0.9);
}

.status-message {
  min-height: 36px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #0b1014;
}

.status-message.success {
  color: var(--primary);
  border-color: rgba(166, 255, 0, 0.44);
  background: rgba(166, 255, 0, 0.08);
}

.status-message.error {
  color: #ff8a80;
  border-color: rgba(255, 59, 48, 0.42);
  background: rgba(255, 59, 48, 0.1);
}

.status-message.warn {
  color: #ffc266;
  border-color: rgba(255, 122, 0, 0.48);
  background: rgba(255, 122, 0, 0.1);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #090d10;
  font-size: 0.76rem;
  text-transform: uppercase;
}

tbody tr:hover {
  background: rgba(166, 255, 0, 0.05);
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.muted {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #071005;
  background: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.pill.yard {
  color: #071005;
  background: var(--primary);
}

.pill.vehicle {
  color: #090d10;
  background: #ffffff;
}

.pill.site {
  color: #090d10;
  background: var(--amber);
}

.pill.maintenance {
  color: #090d10;
  background: #ffb000;
}

.pill.missing,
.pill.damaged {
  color: #ffffff;
  background: var(--red);
}

.location-list {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.location-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.queue-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px dashed var(--strong-line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 122, 0, 0.05);
  text-align: center;
}

.qty-input {
  width: 84px;
}

.qty-control {
  display: grid;
  gap: 7px;
  min-width: 190px;
}

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

.stepper-button {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  color: var(--ink);
  background: #0b1014;
  font-weight: 800;
  cursor: pointer;
}

.stepper-button:hover {
  background: var(--surface-alt);
}

.large-action {
  min-height: 48px;
  padding-inline: 18px;
}

.split-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(140px, 180px)) auto;
  gap: 10px;
  align-items: end;
}

.asset-form,
.vehicle-form {
  display: grid;
  gap: 12px;
}

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.fleet-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.98), rgba(9, 12, 15, 0.98));
}

.fleet-card h3 {
  margin: 0;
  font-size: 1rem;
}

.fleet-card dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px 10px;
  margin: 0;
}

.fleet-card dt {
  color: var(--muted);
}

.fleet-card dd {
  margin: 0;
}

.label-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px) repeat(4, auto);
  gap: 10px;
  align-items: end;
}

.tag-action-panel {
  margin: 12px 0 16px;
  border: 1px solid rgba(166, 255, 0, 0.34);
  border-radius: 8px;
  background: rgba(166, 255, 0, 0.06);
}

.tag-action-panel .panel-header {
  padding: 12px;
}

.tag-action-panel .panel-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.tag-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

.tag-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.tag-detail-grid p {
  margin: 4px 0 0;
  color: var(--muted);
}

.tag-form {
  padding-top: 4px;
}

.labels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.labels-grid.single {
  grid-template-columns: minmax(260px, 420px);
}

.stock-label {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 12px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  color: #111827;
  background: #ffffff;
}

.stock-label .label-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stock-label strong {
  font-size: 1.2rem;
}

.qr-code {
  display: grid;
  place-items: center;
}

.qr-code svg {
  display: block;
  width: min(100%, 132px);
  height: auto;
}

.labels-grid.single .qr-code svg {
  width: min(100%, 300px);
}

.label-action {
  color: #071005;
}

.label-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.import-area {
  display: grid;
  gap: 10px;
}

.exception-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.exception-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(13, 17, 23, 0.86);
}

.exception-card.open {
  color: var(--ink);
  border-color: rgba(255, 122, 0, 0.54);
  background: rgba(255, 122, 0, 0.1);
}

.exception-card span {
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 800;
}

.exception-card strong {
  min-width: 34px;
  color: var(--primary);
  font-size: 1.35rem;
  text-align: right;
}

.resolve-box {
  margin-top: 8px;
  color: var(--muted);
}

.resolve-box summary {
  cursor: pointer;
  font-weight: 900;
}

.resolve-box form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.resolve-box select,
.resolve-box textarea {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #090d10;
}

.control-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.control-flow div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(166, 255, 0, 0.06);
}

.control-flow strong {
  color: var(--primary);
}

.control-flow span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .portal-hero,
  .portal-grid.two,
  .portal-grid.three {
    grid-template-columns: 1fr;
  }

  .portal-metric-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

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

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand,
  .topbar-actions {
    width: 100%;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .layout {
    padding: 12px;
  }

  .sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .portal-metric-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .portal-row {
    grid-template-columns: 1fr;
  }

  .client-job-row {
    grid-template-columns: 1fr;
  }

  .portal-card-head {
    display: grid;
  }

  .portal-card-head strong {
    text-align: left;
  }

  .form-grid,
  .toolbar,
  .label-controls {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: span 1;
  }

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

  .workflow-grid,
  .session-strip,
  .reason-grid,
  .staff-reason-grid,
  .control-flow,
  .tag-choice-grid,
  .tag-detail-grid {
    grid-template-columns: 1fr;
  }

  .staff-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-fields,
  .staff-scan-buttons,
  .staff-submit-row,
  .staff-manual,
  .staff-queue-card,
  .staff-add-kit-grid,
  .staff-vehicle-grid,
  .staff-scan-row,
  .staff-bulk-form {
    grid-template-columns: 1fr;
  }

  .staff-queue-side {
    justify-items: stretch;
  }

  .staff-qty {
    grid-template-columns: 42px minmax(70px, 1fr) 42px 54px;
  }

  body.staff-app-mode .staff-fields {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 0.55fr);
  }

  body.staff-app-mode .staff-reason-grid,
  body.staff-app-mode .staff-action-grid,
  body.staff-app-mode .staff-fix-choice,
  body.staff-app-mode .staff-add-kit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.staff-app-mode .staff-home-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.staff-app-mode .staff-scan-buttons,
  body.staff-app-mode .staff-submit-row,
  body.staff-app-mode .staff-manual {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.staff-app-mode .staff-scan-row {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.6fr);
  }

  body.staff-app-mode .staff-bulk-form {
    grid-template-columns: minmax(0, 1fr) 74px auto;
  }

  .video-shell video {
    height: 230px;
  }
}

@media (max-width: 370px) {
  body.staff-app-mode .staff-fields,
  body.staff-app-mode .staff-reason-grid,
  body.staff-app-mode .staff-action-grid,
  body.staff-app-mode .staff-fix-choice,
  body.staff-app-mode .staff-add-kit-grid,
  body.staff-app-mode .staff-home-status-grid,
  body.staff-app-mode .staff-status-strip,
  body.staff-app-mode .staff-vehicle-grid,
  body.staff-app-mode .staff-scan-row,
  body.staff-app-mode .staff-bulk-form {
    grid-template-columns: 1fr;
  }

  body.staff-app-mode .staff-utility-row {
    align-items: stretch;
    flex-direction: column;
  }

  body.staff-app-mode .staff-exception-note {
    text-align: left;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .topbar,
  .sidebar,
  .summary-grid,
  .view-header,
  .label-controls,
  .panel-header,
  .no-print {
    display: none !important;
  }

  .layout {
    display: block;
    padding: 0;
  }

  .panel {
    border: 0;
    box-shadow: none;
  }

  .panel-body {
    padding: 0;
  }

  .labels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10mm;
  }

  .stock-label {
    break-inside: avoid;
  }
}
