:root {
  --bg: #0b1114;
  --bg-soft: #10191d;
  --panel: #141f24;
  --panel-strong: #19262d;
  --panel-soft: #111a1f;
  --ink: #f2f6f6;
  --muted: #9aacb4;
  --line: #2b3c44;
  --line-bright: #3b525c;
  --teal: #12b6a6;
  --teal-dark: #0b857a;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --red: #ef4444;
  --green: #22c55e;
  --steel: #607280;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(135deg, rgba(18, 182, 166, 0.12), transparent 28%),
    linear-gradient(225deg, rgba(245, 158, 11, 0.10), transparent 30%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 96px),
    linear-gradient(180deg, #080d10 0%, #0b1114 48%, #11191d 100%);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

[hidden] {
  display: none !important;
}

body.booting {
  overflow: hidden;
}

body.booting .app-shell {
  opacity: 0;
  transform: scale(0.985);
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(18, 182, 166, 0.12), transparent 32%),
    linear-gradient(225deg, rgba(245, 158, 11, 0.08), transparent 34%),
    #080d10;
  transition: opacity 0.42s ease, visibility 0.42s ease;
}

.splash-screen.splash-done {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.splash-logo-wrap {
  display: grid;
  justify-items: center;
  gap: 22px;
  animation: splashLogoIn 1.2s ease both;
}

.splash-logo-wrap img {
  width: min(360px, 76vw);
  height: auto;
  filter: drop-shadow(0 24px 44px rgba(0, 0, 0, 0.42));
}

.splash-line {
  position: relative;
  width: min(320px, 66vw);
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.splash-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--teal), #ffffff, transparent);
  transform: translateX(-100%);
  animation: splashLine 1.35s ease forwards;
}

.admin-login {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(5, 10, 12, 0.74);
  backdrop-filter: blur(12px);
}

.device-setup {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(5, 10, 12, 0.78);
  backdrop-filter: blur(12px);
}

.login-card {
  display: grid;
  gap: 14px;
  width: min(430px, 100%);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  padding: 22px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 62%),
    #11191d;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-logo {
  width: 220px;
  max-width: 78vw;
  height: auto;
}

.login-card h2 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
}

.login-copy {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.login-error {
  min-height: 18px;
  color: #fecaca;
  font-size: 12px;
  font-weight: 800;
}

.login-users {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.login-users span {
  padding: 7px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.device-setup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.device-setup-actions .primary-button {
  grid-column: 1 / -1;
}

.device-setup-actions #deviceSetupPanelLogin {
  grid-column: 1 / -1;
}

body.device-locked {
  overflow-x: hidden;
}

body.device-locked .app-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: 0;
}

body.device-locked .topbar,
body.device-locked .view-tabs,
body.device-locked .page-heading {
  display: none;
}

body.device-locked .workspace {
  min-height: 100vh;
}

body.device-locked #changeTabletMachine {
  display: none;
}

body.device-locked .tablet-device,
body.device-locked .forklift-device {
  margin: 0 auto;
}

.app-shell {
  width: min(1580px, 100%);
  margin: 0 auto;
  padding: 18px;
  transition: opacity 0.34s ease, transform 0.34s ease;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 92px;
  padding: 16px 18px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    #11191d;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.brand-logo {
  display: grid;
  place-items: center;
  width: 210px;
  height: 92px;
  flex: 0 0 auto;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: none;
  overflow: hidden;
}

.brand-logo img {
  display: block;
  width: auto;
  height: 76px;
  max-width: 190px;
  max-height: 76px;
  object-fit: contain;
}

.brand h1,
.page-heading h2,
.section-title h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  color: #ffffff;
  font-size: 21px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar .eyebrow {
  color: #8bf4e8;
}

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

.clock {
  min-width: 92px;
  padding: 10px 12px;
  color: #e6fffb;
  text-align: center;
  background: rgba(18, 182, 166, 0.12);
  border: 1px solid rgba(18, 182, 166, 0.34);
  border-radius: var(--radius);
}

.view-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.view-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px;
  color: #d7e2e5;
  font-weight: 800;
  background: rgba(20, 31, 36, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.view-tab span {
  color: var(--teal);
  font-size: 11px;
}

.view-tab.active {
  color: #031312;
  background: var(--teal);
  border-color: #65e8dd;
}

.view-tab.active span {
  color: #05201d;
}

.view-tab.locked {
  opacity: 0.76;
}

.workspace {
  min-height: 640px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 18px;
}

.page-heading h2 {
  color: #ffffff;
  font-size: 27px;
}

.page-note {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  min-height: 116px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 62%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.metric-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 700;
}

.metric-value {
  margin: 0;
  color: #ffffff;
  font-size: 29px;
  font-weight: 900;
}

.metric-foot {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 14px;
  margin-bottom: 14px;
}

.management-grid {
  align-items: start;
}

.lower-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.55fr);
}

.stock-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(310px, 0.55fr);
}

.lab-grid {
  grid-template-columns: minmax(330px, 0.48fr) minmax(0, 0.9fr);
}

.maintenance-grid {
  grid-template-columns: minmax(330px, 0.48fr) minmax(0, 0.9fr);
}

.surface {
  min-width: 0;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 68%),
    rgba(20, 31, 36, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.raw-stock-panel {
  margin-bottom: 14px;
}

.access-panel {
  margin-bottom: 14px;
}

.report-panel {
  margin-bottom: 14px;
}

.product-history-panel {
  margin-bottom: 14px;
}

.report-date-control {
  display: grid;
  gap: 6px;
  min-width: 210px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.report-summary-card {
  min-height: 86px;
  padding: 13px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.report-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.report-summary-card strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 24px;
}

.report-summary-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.report-block {
  min-width: 0;
  padding: 13px;
  background: rgba(15, 23, 27, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.report-block.wide {
  grid-column: 1 / -1;
}

.report-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.report-block-title h4 {
  margin: 0;
  color: #ffffff;
  font-size: 15px;
}

.report-block-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.report-table th,
.report-table td {
  padding: 9px 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.report-table th {
  color: #d9fffb;
  font-size: 11px;
  text-transform: uppercase;
}

.report-table strong {
  color: #ffffff;
}

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

#reportProduction .table-wrap,
#reportShipments .report-list,
#reportActivities .report-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}

#reportActivities .report-list {
  max-height: 430px;
}

#reportProduction .table-wrap::-webkit-scrollbar,
#reportShipments .report-list::-webkit-scrollbar,
#reportActivities .report-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#reportProduction .table-wrap::-webkit-scrollbar-track,
#reportShipments .report-list::-webkit-scrollbar-track,
#reportActivities .report-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

#reportProduction .table-wrap::-webkit-scrollbar-thumb,
#reportShipments .report-list::-webkit-scrollbar-thumb,
#reportActivities .report-list::-webkit-scrollbar-thumb {
  background: rgba(18, 182, 166, 0.45);
  border-radius: 999px;
}

.product-history-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
}

.product-history-list {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 620px;
  overflow: auto;
  padding-right: 3px;
}

.product-history-button {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 74px;
  padding: 11px;
  color: var(--ink);
  text-align: left;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-history-button strong {
  color: #ffffff;
}

.product-history-button span,
.product-history-button small {
  color: var(--muted);
  font-size: 12px;
}

.product-history-button.active {
  color: #031312;
  background: var(--teal);
  border-color: #65e8dd;
}

.product-history-button.active strong,
.product-history-button.active span,
.product-history-button.active small {
  color: #031312;
}

.product-history-detail {
  min-height: 280px;
}

.report-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.report-item strong {
  color: #ffffff;
}

.report-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.user-access-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.user-card {
  min-height: 116px;
  padding: 13px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.user-card strong {
  display: block;
  margin-bottom: 5px;
  color: #ffffff;
}

.user-card span,
.user-card small {
  display: block;
  color: var(--muted);
  line-height: 1.4;
}

.material-panel {
  margin-bottom: 14px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title h3 {
  color: #ffffff;
  font-size: 17px;
}

.section-kpi {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: #d9fffb;
  font-weight: 800;
  white-space: nowrap;
  background: rgba(18, 182, 166, 0.14);
  border: 1px solid rgba(18, 182, 166, 0.36);
  border-radius: var(--radius);
}

.raw-stock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.raw-card {
  min-height: 138px;
  padding: 14px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.raw-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.raw-card h4 {
  margin: 0;
  color: #ffffff;
  font-size: 15px;
}

.raw-value {
  margin: 12px 0 8px;
  color: #ffffff;
  font-size: 25px;
  font-weight: 900;
}

.raw-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.material-form {
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) minmax(150px, 0.7fr) minmax(120px, 0.55fr) minmax(140px, 0.65fr) minmax(140px, 0.65fr) auto;
  gap: 10px;
  align-items: end;
}

.recipe-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 27, 0.74);
}

.recipe-fields[hidden] {
  display: none;
}

.recipe-fields legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.material-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  margin-top: 14px;
  padding-right: 4px;
}

.material-catalog .empty-state,
.shipment-product-grid .empty-state {
  grid-column: 1 / -1;
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.35fr);
  gap: 10px;
  margin-top: 14px;
}

.catalog-summary {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.material-pill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  color: #dce8eb;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.material-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.material-pill strong {
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-pill .material-meta,
.material-pill small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-pill .material-meta {
  color: var(--muted);
  font-size: 11px;
}

.material-pill small {
  color: #fca5a5;
  font-size: 10px;
  font-weight: 800;
}

.material-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.material-rename-button,
.material-delete-button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 11px;
  white-space: nowrap;
}

.material-rename-button {
  color: #d9fffb;
  background: rgba(18, 182, 166, 0.13);
  border-color: rgba(18, 182, 166, 0.45);
}

.material-delete-button:not(:disabled) {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(248, 113, 113, 0.55);
}

.material-delete-button:disabled {
  opacity: 0.42;
}

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

.machine-row,
.forklift-item,
.stock-alert,
.activity-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
}

.machine-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  min-height: 164px;
}

.machine-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.machine-name {
  margin: 0;
  color: #ffffff;
  font-weight: 900;
}

.machine-detail {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 999px;
  background: var(--steel);
}

.status-working {
  color: #03180c;
  background: var(--green);
}

.status-break {
  color: #241300;
  background: var(--amber);
}

.status-maintenance,
.status-critical {
  color: #ffffff;
  background: var(--red);
}

.status-idle {
  background: #64717a;
}

.status-loaded {
  color: #031326;
  background: #74a9ff;
}

.status-good {
  color: #03180c;
  background: var(--green);
}

.status-watch {
  color: #241300;
  background: var(--amber);
}

.status-due {
  color: #031312;
  background: #67e8f9;
}

.status-overdue {
  color: #ffffff;
  background: var(--red);
}

.status-complete {
  color: #03180c;
  background: var(--green);
}

.select-line {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.58;
}

.stack-form {
  display: grid;
  gap: 13px;
}

.shipment-items-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(15, 23, 27, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.shipment-items-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
  font-weight: 900;
}

.shipment-items {
  display: grid;
  gap: 10px;
}

.shipment-product-grid {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.shipment-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  align-items: center;
  padding: 11px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.shipment-choice.compact {
  min-height: 42px;
  padding: 8px 10px;
}

.shipment-choice.selected {
  border-color: rgba(18, 182, 166, 0.78);
  box-shadow: 0 0 0 2px rgba(18, 182, 166, 0.12);
}

.shipment-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #ffffff;
  font-weight: 900;
}

.shipment-check input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  accent-color: var(--teal);
}

.shipment-check span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-lines {
  display: grid;
  gap: 5px;
}

.shipment-line {
  color: #e7eeee;
  white-space: nowrap;
}

.selected-shipment-box {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.selected-shipment-list {
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
  padding-right: 4px;
}

.selected-shipment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.selected-name {
  min-width: 0;
  color: #ffffff;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: #f3f7f8;
  background: #0f171b;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  outline: none;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #647780;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 182, 166, 0.18);
}

.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.primary-button,
.secondary-button,
.warning-button,
.danger-button,
.ghost-button,
.small-button {
  min-height: 44px;
  padding: 10px 14px;
  font-weight: 900;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.primary-button {
  color: #031312;
  background: var(--teal);
  border-color: #6debe0;
}

.primary-button:hover {
  background: #52ded2;
}

.secondary-button {
  color: #e6eef0;
  background: #18242a;
  border-color: var(--line-bright);
}

.warning-button {
  color: #241300;
  background: var(--amber);
  border-color: #ffd48a;
}

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

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.small-button {
  min-height: 34px;
  padding: 7px 10px;
  color: #e6eef0;
  background: #18242a;
  border-color: var(--line-bright);
}

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

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

td {
  color: #e7eeee;
  font-size: 13px;
}

.proof-thumb {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #0f171b;
}

.proof-thumb-button {
  display: inline-grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.proof-thumb-button:hover .proof-thumb,
.proof-preview-button:hover .proof-preview {
  border-color: rgba(18, 182, 166, 0.9);
  box-shadow: 0 0 0 2px rgba(18, 182, 166, 0.16);
}

.activity-list,
.stock-alerts,
.forklift-list {
  display: grid;
  gap: 10px;
}

.activity-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}

.activity-list::-webkit-scrollbar {
  width: 8px;
}

.activity-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.activity-list::-webkit-scrollbar-thumb {
  background: rgba(18, 182, 166, 0.45);
  border-radius: 999px;
}

.activity-item,
.stock-alert {
  padding: 12px;
}

.activity-item strong,
.stock-alert strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
}

.activity-item span,
.stock-alert span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.tablet-machine-setup {
  max-width: 1040px;
  margin: 0 auto;
}

.setup-note {
  margin: -4px 0 16px;
  color: var(--muted);
  line-height: 1.45;
}

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

.tablet-machine-card {
  display: grid;
  gap: 9px;
  min-height: 138px;
  padding: 14px;
  color: var(--ink);
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 68%),
    var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tablet-machine-card:hover {
  border-color: rgba(18, 182, 166, 0.66);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.tablet-machine-card strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
}

.tablet-machine-card span,
.tablet-machine-card small {
  color: var(--muted);
  line-height: 1.35;
}

.tablet-machine-card .status-chip {
  justify-self: start;
  color: #ffffff;
}

.tablet-machine-card .status-working,
.tablet-machine-card .status-good {
  color: #03180c;
}

.tablet-machine-card .status-break,
.tablet-machine-card .status-watch {
  color: #241300;
}

.tablet-machine-lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tablet-machine-lock span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.tablet-machine-lock strong {
  color: #ffffff;
  font-size: 17px;
}

.tablet-device {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px 22px 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, #182229, #06090b);
  border: 1px solid #263942;
  border-radius: 30px;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.48),
    inset 0 0 0 2px rgba(255, 255, 255, 0.035);
}

.tablet-camera {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 56px;
  height: 6px;
  background: #05080a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  transform: translateX(-50%);
}

.tablet-screen {
  min-height: 612px;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(18, 182, 166, 0.08), transparent 36%),
    linear-gradient(225deg, rgba(245, 158, 11, 0.06), transparent 38%),
    #0a1013;
  border: 1px solid #253741;
  border-radius: 20px;
}

.tablet-screen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  margin-bottom: 14px;
  padding: 11px 14px;
  background: rgba(14, 22, 26, 0.96);
  border: 1px solid #22333b;
  border-radius: 12px;
}

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

.tablet-screen-brand img {
  width: 142px;
  height: 48px;
  object-fit: contain;
}

.tablet-screen-brand span {
  display: block;
  margin-bottom: 3px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.tablet-screen-brand strong {
  display: block;
  color: #ffffff;
  font-size: 19px;
}

.tablet-screen-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tablet-screen-meta span,
.tablet-screen-meta strong {
  min-height: 36px;
  padding: 8px 11px;
  color: #d9fffb;
  font-size: 13px;
  font-weight: 900;
  background: rgba(18, 182, 166, 0.14);
  border: 1px solid rgba(18, 182, 166, 0.36);
  border-radius: var(--radius);
}

.tablet-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 0.62fr);
  gap: 14px;
}

.control-panel {
  align-self: start;
}

.tablet-device .control-panel,
.tablet-device .tablet-status {
  min-height: 100%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 68%),
    rgba(16, 25, 29, 0.96);
  border-color: #263b45;
  box-shadow: none;
}

.tablet-device .section-title {
  margin-bottom: 14px;
}

.tablet-device label {
  color: #b8c8ce;
  font-size: 11px;
  letter-spacing: 0;
}

.tablet-device input,
.tablet-device textarea {
  min-height: 50px;
  background: #090f12;
  border-color: #253741;
}

.tablet-device textarea {
  min-height: 142px;
}

.tablet-status {
  display: grid;
  gap: 16px;
}

.machine-focus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 238px;
  padding: 22px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(18, 182, 166, 0.92), rgba(12, 23, 27, 0.98)),
    repeating-linear-gradient(45deg, transparent 0 20px, rgba(255, 255, 255, 0.05) 20px 21px);
  border: 1px solid rgba(18, 182, 166, 0.42);
  border-radius: var(--radius);
}

.focus-title {
  margin: 0 0 8px;
  font-size: 34px;
  font-weight: 900;
}

.focus-text {
  margin: 0;
  color: #d6f5f0;
  font-size: 15px;
  line-height: 1.45;
}

.focus-number {
  min-width: 152px;
  text-align: center;
}

.focus-number strong {
  display: block;
  font-size: 66px;
  line-height: 0.95;
}

.focus-number span {
  color: #d6f5f0;
  font-weight: 800;
}

.stamp-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.stamp-button {
  min-height: 42px;
  padding: 8px 10px;
  color: #e6eef0;
  font-weight: 900;
  background: rgba(7, 13, 16, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
}

.stamp-button.active {
  color: #031312;
  background: #8bf4e8;
  border-color: #c8fffa;
}

.tablet-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.large-action {
  min-height: 88px;
  font-size: 15px;
}

.tablet-device .large-action {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.tablet-device .large-action.confirm-pending {
  color: #241300;
  background: #facc15;
  border-color: #ffe7a3;
}

.tablet-device [data-machine-action="end"] {
  grid-column: span 2;
}

.forklift-device {
  position: relative;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 18px 22px 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, #182229, #06090b);
  border: 1px solid #263942;
  border-radius: 30px;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.48),
    inset 0 0 0 2px rgba(255, 255, 255, 0.035);
}

.forklift-screen {
  min-height: 640px;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(18, 182, 166, 0.08), transparent 36%),
    linear-gradient(225deg, rgba(245, 158, 11, 0.06), transparent 38%),
    #0a1013;
  border: 1px solid #253741;
  border-radius: 20px;
}

.forklift-split {
  display: grid;
  grid-template-columns: minmax(300px, 0.38fr) minmax(0, 0.62fr);
  gap: 14px;
}

.forklift-list-panel,
.forklift-detail-panel {
  min-width: 0;
  min-height: 520px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 68%),
    rgba(16, 25, 29, 0.96);
  border: 1px solid #263b45;
  border-radius: var(--radius);
}

.forklift-panel-head,
.forklift-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.forklift-panel-head h3,
.forklift-detail-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: 19px;
}

.forklift-detail-head span:not(.status-chip) {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.forklift-shipment-list {
  display: grid;
  gap: 10px;
  max-height: 452px;
  overflow: auto;
  padding-right: 4px;
}

.forklift-shipment-card {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 104px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.forklift-shipment-card.selected {
  border-color: rgba(18, 182, 166, 0.78);
  box-shadow: 0 0 0 2px rgba(18, 182, 166, 0.18);
}

.forklift-shipment-card strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.3;
}

.forklift-shipment-card small {
  color: var(--muted);
  line-height: 1.35;
}

.forklift-shipment-card .status-chip {
  justify-self: start;
}

.forklift-material-box {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.forklift-material-box p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.forklift-material-box .shipment-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 7px 9px;
  white-space: normal;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}

.forklift-material-box .shipment-line span {
  color: var(--teal);
  font-weight: 900;
  white-space: nowrap;
}

.forklift-proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.36fr);
  gap: 14px;
  align-items: stretch;
}

.forklift-proof-preview {
  min-height: 260px;
}

.forklift-proof-preview span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-weight: 900;
}

.forklift-confirm-actions {
  display: grid;
  align-content: start;
  gap: 10px;
}

.forklift-photo-button,
.forklift-loaded-button {
  display: grid;
  place-items: center;
  min-height: 76px;
  text-align: center;
}

.forklift-photo-button .file-input {
  display: none;
}

.forklift-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
  gap: 16px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 70%),
    rgba(20, 31, 36, 0.94);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.forklift-main h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 18px;
}

.forklift-main p {
  margin: 4px 0;
  color: var(--muted);
}

.forklift-actions {
  display: grid;
  align-content: start;
  gap: 10px;
}

.file-input {
  min-height: 46px;
  padding: 10px;
  background: #0f171b;
}

.proof-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #0f171b;
  border: 1px dashed var(--line-bright);
  border-radius: var(--radius);
}

.proof-preview-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.proof-preview-button .proof-preview {
  display: block;
}

.proof-preview-button > span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 7px 10px;
  color: #031312;
  font-size: 12px;
  font-weight: 900;
  background: var(--teal);
  border-radius: 999px;
}

.stock-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lab-alerts {
  display: grid;
  gap: 10px;
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}

.lab-alert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lab-alert-card.urgent {
  border-color: rgba(239, 68, 68, 0.58);
}

.lab-alert-card.warning {
  border-color: rgba(245, 158, 11, 0.62);
}

.lab-alert-card strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
}

.lab-alert-card span,
.lab-alert-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.lab-days {
  min-width: 92px;
  align-self: center;
  padding: 9px 10px;
  color: #031312;
  text-align: center;
  font-weight: 900;
  background: var(--teal);
  border-radius: var(--radius);
}

.lab-days.overdue {
  color: #ffffff;
  background: var(--red);
}

.lab-days.today {
  color: #241300;
  background: var(--amber);
}

.lab-progress {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  color: #e6eef0;
  font-weight: 800;
  white-space: nowrap;
  background: #18242a;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
}

.lab-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.maintenance-alerts {
  display: grid;
  gap: 10px;
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}

.maintenance-alert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.maintenance-alert-card.urgent {
  border-color: rgba(239, 68, 68, 0.58);
}

.maintenance-alert-card.warning {
  border-color: rgba(245, 158, 11, 0.62);
}

.maintenance-alert-card strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
}

.maintenance-alert-card span,
.maintenance-alert-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.maintenance-days {
  min-width: 92px;
  align-self: center;
  padding: 9px 10px;
  color: #031312;
  text-align: center;
  font-weight: 900;
  background: var(--teal);
  border-radius: var(--radius);
}

.maintenance-days.overdue {
  color: #ffffff;
  background: var(--red);
}

.maintenance-days.today {
  color: #241300;
  background: var(--amber);
}

.maintenance-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-panel {
  position: fixed;
  top: 126px;
  right: 18px;
  z-index: 65;
  width: min(430px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 150px));
  overflow: auto;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 64%),
    #11191d;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notification-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.notification-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
}

.notification-list {
  display: grid;
  gap: 9px;
}

.notification-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.notification-item.urgent {
  border-color: rgba(239, 68, 68, 0.62);
}

.notification-item.warning {
  border-color: rgba(245, 158, 11, 0.62);
}

.notification-item strong {
  color: #ffffff;
}

.notification-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.bar-track {
  width: 100%;
  min-width: 140px;
  height: 8px;
  overflow: hidden;
  background: #0f171b;
  border: 1px solid #273942;
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  border-radius: 999px;
}

.bar-fill.warning {
  background: linear-gradient(90deg, var(--amber), #facc15);
}

.bar-fill.critical {
  background: linear-gradient(90deg, var(--red), #fb7185);
}

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

.empty-state {
  padding: 16px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line-bright);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

body.proof-modal-open {
  overflow: hidden;
}

.proof-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
}

.proof-modal[hidden] {
  display: none;
}

.proof-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 10, 0.82);
  border: 0;
  backdrop-filter: blur(10px);
}

.proof-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(1080px, 96vw);
  max-height: 92vh;
  padding: 14px;
  background: #10191d;
  border: 1px solid rgba(18, 182, 166, 0.42);
  border-radius: 12px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.proof-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.proof-modal-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
}

.proof-modal-card img {
  width: 100%;
  max-height: calc(92vh - 112px);
  object-fit: contain;
  background: #05090b;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: min(390px, calc(100vw - 36px));
  padding: 13px 15px;
  color: #031312;
  font-weight: 900;
  background: var(--teal);
  border: 1px solid #a4fff7;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes splashLogoIn {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.9);
  }

  58% {
    opacity: 1;
    transform: translateY(0) scale(1.03);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splashLine {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 1180px) {
  .metric-grid,
  .raw-stock-grid,
  .report-summary-grid,
  .material-form,
  .machine-admin-grid,
  .tablet-machine-grid,
  .user-access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .layout-grid,
  .lower-grid,
  .report-grid,
  .product-history-layout,
  .stock-grid,
  .lab-grid,
  .maintenance-grid,
  .forklift-split,
  .forklift-proof-grid,
  .tablet-layout {
    grid-template-columns: 1fr;
  }

  .tablet-device {
    width: 100%;
  }

  .forklift-device {
    width: 100%;
  }

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

@media (max-width: 760px) {
  .app-shell {
    padding: 10px;
  }

  .topbar,
  .page-heading,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

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

  .report-date-control {
    min-width: 0;
  }

  .tablet-device {
    padding: 14px;
    border-radius: 22px;
  }

  .forklift-device {
    padding: 14px;
    border-radius: 22px;
  }

  .tablet-screen {
    min-height: auto;
    padding: 12px;
    border-radius: 15px;
  }

  .forklift-screen {
    min-height: auto;
    padding: 12px;
    border-radius: 15px;
  }

  .tablet-screen-top {
    align-items: stretch;
    flex-direction: column;
  }

  .tablet-screen-brand img {
    width: 120px;
  }

  .tablet-screen-meta {
    justify-content: flex-start;
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo {
    width: 198px;
    height: 88px;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions > * {
    flex: 1 1 auto;
  }

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

  .metric-grid,
  .raw-stock-grid,
  .material-form,
  .catalog-tools,
  .material-catalog,
  .machine-admin-grid,
  .tablet-machine-grid,
  .user-access-grid,
  .shipment-product-grid,
  .form-row,
  .stamp-control,
  .tablet-actions {
    grid-template-columns: 1fr;
  }

  .tablet-device [data-machine-action="end"] {
    grid-column: auto;
  }

  .shipment-choice {
    grid-template-columns: 1fr;
  }

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

  .tablet-machine-lock {
    align-items: stretch;
    flex-direction: column;
  }

  .lab-alert-card {
    grid-template-columns: 1fr;
  }

  .lab-days,
  .maintenance-days {
    justify-self: start;
  }

  .maintenance-alert-card {
    grid-template-columns: 1fr;
  }

  .login-actions {
    grid-template-columns: 1fr;
  }

  .admin-login,
  .device-setup {
    padding: 8px;
  }

  .login-card {
    width: 100%;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    gap: 10px;
    padding: 16px;
  }

  .login-logo {
    width: 170px;
    max-width: 68vw;
  }

  .login-card h2 {
    font-size: 19px;
  }

  .login-copy {
    font-size: 12px;
    line-height: 1.35;
  }

  .login-actions,
  .device-setup-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-top: 8px;
    background: #11191d;
  }

  .device-setup-actions {
    grid-template-columns: 1fr;
  }

  .login-users {
    grid-template-columns: 1fr;
  }

  .recipe-fields {
    grid-template-columns: 1fr;
  }

  .page-heading h2 {
    font-size: 23px;
  }

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

  .forklift-list-panel,
  .forklift-detail-panel {
    min-height: auto;
    padding: 12px;
  }

  .forklift-panel-head,
  .forklift-detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .forklift-proof-preview {
    min-height: 210px;
  }

  .machine-focus {
    grid-template-columns: 1fr;
  }

  .focus-number {
    text-align: left;
  }
}

@media (max-width: 440px) {
  .view-tabs {
    grid-template-columns: 1fr;
  }

  .brand h1 {
    font-size: 19px;
  }

  .surface,
  .metric {
    padding: 14px;
  }
}
