:root {
  --color-primary: #009CFF;
  --color-primary-hover: #0087E0;
  --color-primary-light: #DDF3FF;
  --color-secondary: #38BDF8;
  --color-secondary-light: #E0F7FF;
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --border-color: #E2E8F0;
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius-control: 12px;
  --radius-card: 16px;
  --radius-modal: 24px;
  --shadow-card: 0 10px 30px rgba(15, 23, 42, .06);
  --shadow-card-hover: 0 16px 42px rgba(15, 23, 42, .10);
  --shadow-modal: 0 24px 70px rgba(15, 23, 42, .18);
  --transition-fast: 160ms ease;
  --transition-normal: 220ms ease;
  --green: #009CFF;
  --green-dark: #0087E0;
  --teal: #38BDF8;
  --teal-dark: #009CFF;
  --ink: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --surface: #ffffff;
  --bg: #F8FAFC;
  --amber: #F59E0B;
  --red: #EF4444;
  --blue: #009CFF;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mixer-tasks-page{display:grid;gap:14px;max-width:1180px;margin:0 auto;padding:0 12px 90px}.mixer-task-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.mixer-task-card{border:1px solid var(--line,#dbe3ee);border-left:4px solid #2494dc;border-radius:12px;padding:14px;background:#fff;display:grid;gap:10px}.mixer-task-card.completed{border-left-color:#22a35a}.mixer-task-card.canceled{border-left-color:#c84b55;opacity:.82}.mixer-task-card-head,.mixer-task-material,.mixer-task-actions{display:flex;justify-content:space-between;align-items:center;gap:10px}.mixer-task-card-head>div,.mixer-task-material{min-width:0}.mixer-task-card-head b,.mixer-task-material strong{overflow-wrap:anywhere}.mixer-task-material{align-items:flex-start;flex-direction:column}.mixer-task-material>b{font-size:1.35rem}.mixer-task-meta{display:flex;flex-wrap:wrap;gap:6px 12px;color:var(--muted,#667085);font-size:.86rem}.mixer-task-actions button{min-height:44px}.mixer-task-form{align-items:end}.mixer-task-form>button{min-height:44px}
@media(max-width:600px){.mixer-tasks-page{padding-inline:8px;gap:10px}.mixer-task-grid{grid-template-columns:1fr}.mixer-task-card{padding:12px}.mixer-task-form{grid-template-columns:1fr}.mixer-task-card-head{align-items:flex-start}}

.unified-tasks-page{display:grid;gap:14px;max-width:1180px;margin:0 auto;padding:0 12px 90px}.unified-task-create{display:grid;gap:14px}.unified-equipment-select{display:grid;gap:6px}.unified-equipment-select select{min-height:48px}.unified-task-filters{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px;margin-bottom:14px}.unified-task-filters label{display:grid;gap:5px}.unified-task-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.unified-task-card{display:grid;gap:10px;border:1px solid var(--line);border-left:4px solid var(--blue);border-radius:14px;padding:14px;background:var(--surface)}.unified-task-card.completed{border-left-color:var(--success)}.unified-task-card.canceled{border-left-color:var(--danger);opacity:.82}.unified-task-head,.unified-task-content{display:flex;justify-content:space-between;gap:10px}.unified-task-head>div,.unified-task-content{display:grid;min-width:0}.unified-task-head b{font-size:1.1rem}.unified-task-head span,.unified-task-content span{color:var(--muted);overflow-wrap:anywhere}.unified-task-content>b{font-size:1.25rem}.unified-task-meta{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:.85rem;color:var(--muted)}
@media(max-width:600px){.unified-tasks-page{padding-inline:8px;gap:10px}.unified-task-filters{grid-template-columns:1fr 1fr}.unified-task-grid{grid-template-columns:1fr}.unified-task-card{padding:12px}.unified-task-head{align-items:flex-start}.unified-task-create .settings-form{grid-template-columns:1fr}}

/* Unified workplace/equipment QR catalog */
.equipment-qr-filters {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.5fr) minmax(180px, .8fr);
  gap: 12px;
  margin: 16px 0;
}

.equipment-qr-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted, #64748b);
  font-size: 12px;
  font-weight: 700;
}

.equipment-qr-filters input,
.equipment-qr-filters select {
  width: 100%;
  min-height: 42px;
}

.equipment-code-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #0576d8;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.equipment-qr-preview {
  display: block;
  width: 64px;
  height: 64px;
  padding: 3px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.equipment-qr-preview img {
  display: block;
  width: 100%;
  height: 100%;
}

.equipment-qr-actions,
.equipment-qr-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.equipment-qr-actions button {
  min-height: 34px;
  padding: 7px 10px;
}

.equipment-qr-modal .modal-card {
  width: min(480px, calc(100vw - 24px));
  text-align: center;
}

.equipment-qr-modal-image {
  display: block;
  width: min(260px, 70vw);
  height: min(260px, 70vw);
  margin: 0 auto 12px;
}

.equipment-qr-modal h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 8vw, 48px);
  letter-spacing: .04em;
}

.equipment-qr-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0 0 18px;
  text-align: left;
}

.equipment-qr-details div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e7ebf0;
}

.equipment-qr-details dt {
  color: #64748b;
  font-weight: 700;
}

.equipment-qr-details dd {
  margin: 0;
  font-weight: 800;
}

.equipment-qr-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.equipment-qr-modal-actions .primary {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .equipment-qr-filters {
    grid-template-columns: 1fr;
  }

  .equipment-qr-table {
    min-width: 840px;
  }

  .equipment-qr-modal-actions {
    grid-template-columns: 1fr;
  }

  .equipment-qr-modal-actions .primary {
    grid-column: auto;
  }
}

.report-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.report-tabs button {
  border: 1px solid var(--line, #d7dde5);
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff;
  color: #334155;
  font-weight: 750;
  white-space: nowrap;
}

.report-tabs button.active {
  border-color: #009cff;
  background: #eaf6ff;
  color: #0076c7;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.report-filter-grid .check {
  min-height: 42px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.report-filter-grid .check input { width: auto; }
.warehouse-report-summary { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.warehouse-report-table .warehouse-stock-boxes { text-align: right; font-size: 1.05em; }

.report-warning {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #f1c75b;
  border-radius: 10px;
  background: #fff9e8;
  color: #704d00;
}

.report-warning p { margin: 4px 0 0; }
.report-row-mismatch { background: #fff0f0; }

.warehouse-report-pallets {
  display: grid;
  gap: 8px;
  min-width: 420px;
  padding: 10px 0;
}

.warehouse-report-pallets article {
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #f8fafc;
}

.warehouse-report-pallets article > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.report-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .report-filter-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}

@media (max-width: 560px) {
  .report-filter-grid { grid-template-columns: 1fr; }
  .toolbar-actions { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .warehouse-report-pallets { min-width: 300px; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

.boot-splash {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  margin: 0;
  padding: 24px;
  overflow: hidden;
  color: white;
  text-align: center;
  background:
    radial-gradient(circle at 22% 16%, rgba(102,208,255,.40), transparent 28%),
    linear-gradient(135deg, #33C4FF 0%, #009CFF 46%, #0477E8 100%);
}
.boot-splash img {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  box-shadow: 0 18px 46px rgba(13,27,42,.24);
}
.boot-splash h1 {
  margin: 8px 0 0;
  color: white;
  font-size: 36px;
  font-weight: 900;
}
.boot-splash p {
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: 16px;
  font-weight: 600;
}

.executive-screen {
  min-height: calc(100vh - 96px);
  padding: 28px;
  color: #e5f6ff;
  background:
    radial-gradient(circle at 18% 12%, rgba(0,156,255,.35), transparent 30%),
    linear-gradient(135deg, #08111f 0%, #0d1b2a 52%, #063b65 100%);
}
.executive-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 24px;
}
.executive-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1;
}
.executive-hero span,
.executive-clock span {
  color: rgba(229, 246, 255, .72);
  font-weight: 700;
}
.executive-clock {
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid rgba(226,232,240,.18);
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
}
.executive-clock b,
.executive-clock small {
  display: none;
}
.executive-clock-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
}
.executive-clock button {
  margin: 0;
}
.executive-system-status {
  min-width: 280px;
  padding: 18px 20px;
  border: 1px solid rgba(226,232,240,.18);
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  box-shadow: 0 24px 70px rgba(0,0,0,.16);
}
.executive-system-status b {
  display: block;
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
}
.executive-system-status small {
  display: block;
  margin-top: 8px;
  color: rgba(229,246,255,.72);
  font-weight: 800;
}
.executive-system-status.green { border-color: rgba(16,185,129,.42); }
.executive-system-status.orange { border-color: rgba(245,158,11,.52); }
.executive-system-status.red { border-color: rgba(239,68,68,.58); }
.executive-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 18px;
  align-items: start;
}
.executive-main-column,
.executive-side-column {
  display: grid;
  gap: 18px;
}
.executive-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.executive-kpi-grid article,
.executive-chart-panel,
.executive-material-days,
.executive-alerts,
.executive-events {
  border: 1px solid rgba(226,232,240,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.09);
  box-shadow: 0 24px 70px rgba(0,0,0,.18);
}
.executive-kpi-grid article {
  min-height: 170px;
  padding: 20px;
  display: grid;
  align-content: space-between;
}
.executive-kpi-grid article.ok { border-color: rgba(16,185,129,.45); }
.executive-kpi-grid article.warn { border-color: rgba(245,158,11,.58); }
.executive-kpi-grid article.bad { border-color: rgba(239,68,68,.62); }
.executive-kpi-grid article.neutral { border-color: rgba(102,208,255,.30); }
.executive-kpi-grid article.ok small { color: #6ee7b7; }
.executive-kpi-grid article.warn small { color: #fbbf24; }
.executive-kpi-grid article.bad small { color: #fca5a5; }
.executive-kpi-grid span {
  color: rgba(229,246,255,.72);
  font-size: 15px;
  font-weight: 800;
}
.executive-kpi-grid b {
  color: #fff;
  font-size: clamp(42px, 4vw, 68px);
  line-height: 1;
}
.executive-kpi-grid small {
  color: #66d0ff;
  font-size: 16px;
  font-weight: 800;
}

.production-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 10px;
}

.production-calendar-day {
  min-height: 112px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 6px;
}

.production-calendar-day.ok { border-color: rgba(16,185,129,.45); background: rgba(16,185,129,.06); }
.production-calendar-day.warn { border-color: rgba(245,158,11,.5); background: rgba(245,158,11,.08); }
.production-calendar-day.empty { opacity: .62; }
.production-calendar-day span,
.production-calendar-day small {
  color: var(--text-secondary);
}
.production-calendar-day b {
  font-size: 1.6rem;
  color: var(--text-primary);
}
.production-calendar-day em {
  font-style: normal;
  color: var(--warning);
  font-weight: 700;
}

.monthly-timesheet-wrap {
  max-height: 620px;
}

.monthly-timesheet-table {
  min-width: 1480px;
  font-size: .78rem;
}

.monthly-timesheet-table th,
.monthly-timesheet-table td {
  padding: 5px 6px;
}

.monthly-timesheet-table .center {
  text-align: center;
  font-weight: 700;
}

.monthly-timesheet-table .signature-cell {
  min-width: 150px;
  border-bottom: 1px solid var(--text-secondary);
}
.executive-chart-panel,
.executive-material-days,
.executive-alerts,
.executive-events {
  padding: 22px;
}
.executive-chart-panel h2,
.executive-material-days h2,
.executive-alerts h2,
.executive-events h2 {
  margin: 0;
  color: #fff;
  font-size: 26px;
}
.executive-chart-panel .panel-title-row span { color: rgba(229,246,255,.72); }
.executive-bars {
  height: 300px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  padding-top: 24px;
}
.executive-bar {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 10px;
  align-items: end;
  text-align: center;
}
.executive-bar div {
  min-height: 8px;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #66d0ff 0%, #009cff 100%);
  display: grid;
  align-items: start;
  padding-top: 10px;
}
.executive-bar b { color: #fff; font-size: 18px; }
.executive-bar span { color: rgba(229,246,255,.74); font-weight: 800; }
.executive-material-days > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.executive-material-days article {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(226,232,240,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
}
.executive-material-days article.ok { border-color: rgba(16,185,129,.42); }
.executive-material-days article.warn { border-color: rgba(245,158,11,.55); }
.executive-material-days article.bad { border-color: rgba(239,68,68,.60); }
.executive-material-days span,
.executive-alerts span,
.executive-events span {
  color: rgba(229,246,255,.76);
  font-weight: 800;
}
.executive-material-days b {
  color: #fff;
  font-size: 38px;
  line-height: 1;
}
.executive-material-days small,
.executive-events small {
  color: rgba(229,246,255,.62);
  font-weight: 700;
}
.executive-alerts,
.executive-events {
  align-content: start;
}
.executive-alerts article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(226,232,240,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
}
.executive-alerts article.red { border-color: rgba(239,68,68,.62); }
.executive-alerts article.orange { border-color: rgba(245,158,11,.55); }
.executive-alerts article.green { border-color: rgba(16,185,129,.42); }
.executive-events {
  max-height: 720px;
  overflow: auto;
}
.executive-events article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(226,232,240,.12);
}
.executive-events article:last-child {
  border-bottom: 0;
}
.executive-events time {
  color: #66d0ff;
  font-size: 15px;
  font-weight: 900;
}
.executive-events b {
  display: block;
  color: #fff;
  font-size: 16px;
}
.executive-events span,
.executive-events small {
  display: block;
  margin-top: 3px;
}
.executive-screen.tv-mode {
  min-height: 100vh;
  padding: 26px;
  cursor: none;
}
.executive-screen.tv-mode .executive-hero {
  margin-bottom: 18px;
}
.executive-screen.tv-mode .executive-kpi-grid article {
  min-height: 180px;
}
.executive-screen.tv-mode .executive-events {
  max-height: 680px;
}
body.executive-fullscreen {
  overflow: hidden;
}
body.executive-fullscreen .app-shell,
body.executive-fullscreen .app-main {
  min-height: 100vh;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: linear-gradient(120deg, rgba(15, 143, 91, 0.95), rgba(8, 112, 71, 0.88)), url("/images/warehouse.svg");
  background-size: cover;
  color: white;
}

.auth-brand { align-self: end; padding: 56px; max-width: 760px; }
.brand-mark, .brand span {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px;
  background: white; color: var(--green-dark); font-weight: 900; font-size: 26px;
}
.auth-brand h1 { font-size: clamp(36px, 7vw, 78px); line-height: 0.95; margin: 18px 0; max-width: 760px; }
.auth-brand p { font-size: 20px; line-height: 1.55; max-width: 680px; }
.eyebrow { letter-spacing: 0; text-transform: uppercase; font-weight: 800; opacity: 0.86; }

.auth-panel {
  align-self: center; margin: 28px; padding: 28px; background: rgba(255,255,255,0.96); color: var(--ink);
  border-radius: 8px; box-shadow: 0 24px 80px rgba(0,0,0,.18);
}

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.tabs button, .chips button, nav button {
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 10px 14px; color: var(--ink);
}
.tabs button.active, .chips button.active, nav button.active { background: var(--green); color: white; border-color: var(--green); }

form, label { display: grid; gap: 8px; }
form { gap: 14px; }
label { color: var(--muted); font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); background: white; border-radius: 8px; min-height: 42px;
  padding: 10px 12px; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.primary, .secondary, .ghost, .linklike, .wa {
  border: 1px solid transparent; border-radius: 8px; min-height: 42px; padding: 10px 14px; font-weight: 800;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.primary { background: var(--green); color: white; }
.primary:hover { background: var(--green-dark); }
.primary:disabled { opacity: .5; cursor: not-allowed; }
.secondary { background: #edf7f2; color: var(--green-dark); border-color: #cfe8dc; }
.ghost, .linklike { background: transparent; color: var(--ink); border-color: var(--line); }
.linklike { border: 0; padding-left: 0; justify-content: flex-start; color: var(--green-dark); }
.danger { color: var(--red); }
.full { width: 100%; }
.demo-box { margin-top: 16px; padding: 12px; border-radius: 8px; background: #f0f5f2; color: var(--muted); font-size: 13px; }

.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.topbar {
  position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center;
  gap: 18px; padding: 14px 22px; border-bottom: 1px solid rgba(229,231,235,.9); background: rgba(255,255,255,.94); backdrop-filter: blur(14px);
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
}
.app-topbar {
  position: sticky;
  top: 0;
  grid-column: 2;
  grid-row: 1;
  z-index: 12;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
}
.app-topbar nav { display: none; }
.menu-toggle { display: none; }
.topbar-user {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 0;
  color: var(--text-primary);
  font-weight: 800;
}
.topbar-user span,
.topbar-user small {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-user small {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}
.app-sidebar {
  position: sticky;
  top: 0;
  grid-column: 1;
  grid-row: 1 / span 2;
  height: 100vh;
  overflow-y: auto;
  z-index: 20;
  border-right: 1px solid var(--border-color);
  background: var(--bg-sidebar);
  padding: 18px 14px;
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 14px;
}
.sidebar-close { display: none; }
.side-nav {
  display: grid;
  gap: 12px;
  justify-content: stretch;
}
.side-group {
  display: grid;
  gap: 6px;
}
.side-group-title {
  width: 100%;
  min-height: 34px;
  justify-content: space-between;
  padding: 6px 8px;
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.side-group-title b {
  font-size: 16px;
  color: var(--text-secondary);
}
.side-group-items {
  display: grid;
  gap: 4px;
}
.side-group.collapsed .side-group-items { display: none; }
.side-group-items button {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}
.side-group-items svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-group-items button.active {
  background: var(--color-primary-light);
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--border-color));
  color: var(--color-primary-hover);
}
.access-diagnostics {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 12px;
}
.access-diagnostics b {
  color: var(--text-primary);
  font-size: 13px;
}
.app-main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}
.sidebar-backdrop { display: none; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand > div { min-width: 0; }
.brand b, .brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small, table small { display: block; color: var(--muted); margin-top: 2px; }
nav { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

main { width: min(1440px, 100%); margin: 0 auto; padding: 24px; }
.toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 34px; margin-bottom: 6px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; margin-bottom: 8px; }
p { color: var(--muted); line-height: 1.45; }
.select-inline { min-width: 220px; }

.catalog-search { margin-bottom: 12px; }
.filters { display: grid; gap: 12px; margin-bottom: 18px; }
.catalog-filters { position: sticky; top: 86px; z-index: 4; background: rgba(245,247,245,.96); padding: 10px 0 12px; border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; padding-bottom: 4px; }
.filter-summary { display: none; }
.chips button { white-space: nowrap; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.product-card, .panel, .cart-row, .checkout {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(23,33,28,.04);
}
.product-card { display: grid; overflow: hidden; min-height: 100%; }
.product-card img { width: 100%; height: 190px; object-fit: contain; padding: 16px; background: #FFFFFF; }
.product-body { padding: 16px; }
.row { display: flex; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.sku { color: var(--green-dark); font-weight: 900; font-size: 13px; }
.product-sku { font-size: 18px; line-height: 1.1; letter-spacing: 0; }
.pill {
  display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px; border-radius: 8px;
  font-size: 12px; font-weight: 900; white-space: nowrap;
}
.pill.ok { color: #06613d; background: #ddf5e9; }
.pill.low { color: var(--amber); background: #fff3dc; }
.pill.order { color: var(--blue); background: #e4f0fb; }
.pill.none { color: var(--red); background: #ffe5e5; }

dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 0; }
dt { color: var(--muted); font-size: 12px; font-weight: 800; }
dd { margin: 2px 0 0; font-weight: 800; }
.product-card h3 { font-size: 20px; line-height: 1.16; margin: 12px 0; font-weight: 900; }
.product-metrics { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
.product-metrics div { border: 1px solid #cfe8dc; background: #f1faf5; border-radius: 8px; padding: 10px; }
.product-metrics span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.product-metrics b { display: block; color: var(--ink); font-size: 16px; line-height: 1.1; }
.product-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 16px; align-self: end; }
.product-actions .primary { min-height: 48px; font-size: 15px; }

.product-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.product-meta-line {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}
.search-wrap { position: relative; }
.search-wrap > span { display: none; }
.search-wrap input { padding-left: 12px; }
.add-button i { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 2px solid currentColor; border-radius: 6px; font-style: normal; line-height: 1; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; display: grid; place-items: center; padding: 18px;
}
.modal {
  width: min(980px, 100%); max-height: 92vh; overflow: auto; display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px;
  background: white; border-radius: 8px; padding: 22px; position: relative;
}
.modal-media { display: grid; align-items: start; }
.modal-media img { width: 100%; height: 100%; min-height: 360px; object-fit: contain; padding: 18px; border-radius: 8px; background: #FFFFFF; }
.modal-content { display: grid; align-content: start; }
.modal-main-info p { margin-bottom: 12px; }
.modal-add-button { margin-top: 4px; }
.icon-close { position: absolute; top: 10px; right: 10px; border: 0; background: white; font-size: 30px; line-height: 1; }
.document-viewer-open { overflow: hidden; }
.document-viewer-header {
  position: sticky; top: 0; z-index: 12; grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 58px; margin: -22px -22px 0; padding: calc(7px + env(safe-area-inset-top)) 14px 7px;
  border-bottom: 1px solid var(--line, #d8dee8); background: rgba(255,255,255,.97);
  box-shadow: 0 3px 12px rgba(15,23,42,.08); backdrop-filter: blur(8px);
}
.document-viewer-header > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-viewer-header > div { display: flex; flex: 0 0 auto; gap: 8px; }
.document-viewer-header .document-viewer-print,
.document-viewer-header .document-viewer-close { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 14px; text-decoration: none; }
.access-modal .document-viewer-header { margin: -26px -26px 18px; }
.modal-card .document-viewer-header { margin: -18px -18px 16px; }
.global-scroll-top {
  position: fixed; right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 10020;
  width: 48px; height: 48px; min-height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: #087fda; color: #fff; font-size: 24px; font-weight: 900; line-height: 1;
  box-shadow: 0 6px 20px rgba(15,23,42,.28); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .16s ease;
}
.global-scroll-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.shift-master-shell ~ .global-scroll-top, .employee-shell ~ .global-scroll-top { bottom: calc(82px + env(safe-area-inset-bottom)); }
@media (max-width: 520px) {
  .document-viewer-header { margin: -14px -14px 0; padding-inline: 10px; }
  .access-modal .document-viewer-header { margin: -18px -18px 14px; }
  .modal-card .document-viewer-header { margin: -14px -14px 12px; }
  .document-viewer-header > strong { font-size: 13px; }
  .document-viewer-header .document-viewer-print, .document-viewer-header .document-viewer-close { padding-inline: 11px; }
}
@media print { .document-viewer-header, .global-scroll-top { display: none !important; } }
.detail-list { grid-template-columns: 1fr 1fr; }
.stock-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }

.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.cart-list { display: grid; gap: 12px; }
.cart-row { display: grid; grid-template-columns: 88px 1fr auto auto; gap: 14px; align-items: center; padding: 12px; }
.cart-row img { width: 88px; height: 88px; object-fit: contain; padding: 6px; border-radius: 8px; background: #FFFFFF; }
.qty { display: grid; grid-template-columns: 38px 64px 38px; gap: 4px; align-items: center; }
.qty button { border: 1px solid var(--line); background: white; border-radius: 8px; min-height: 38px; font-weight: 900; }
.qty input { text-align: center; min-height: 38px; padding: 6px; }
.warning { color: var(--amber); background: #fff3dc; border-radius: 8px; padding: 8px; font-weight: 800; font-size: 13px; }
.checkout { padding: 16px; display: grid; gap: 14px; position: sticky; top: 92px; }

.account-grid, .admin-grid { display: grid; grid-template-columns: 380px 1fr; gap: 16px; }
.panel { padding: 16px; overflow: hidden; }
.wide { grid-column: span 1; }
.admin-grid .wide { grid-column: 1 / -1; }
.admin-quick-actions { display: grid; gap: 14px; }
.admin-quick-actions h2 { margin: 0; }
.admin-quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-action-button {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  text-align: left;
  padding: 18px;
  border: 1px solid var(--color-primary-light);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(8, 143, 162, .08);
}
.admin-action-button b { font-size: 18px; line-height: 1.2; }
.admin-action-button span { color: var(--muted); line-height: 1.35; }
.admin-action-button:hover { border-color: var(--color-secondary); background: var(--color-secondary-light); }
.panel.employee-work-status {
  margin-bottom: 16px;
  padding: 12px 14px;
}
.panel.employee-work-status.is-active {
  border-color: color-mix(in srgb, var(--success) 42%, var(--border-color));
}
.employee-work-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.employee-work-status-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}
.employee-work-status-label i {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--muted);
}
.employee-work-status.is-active .employee-work-status-label {
  color: var(--success);
}
.employee-work-status.is-active .employee-work-status-label i {
  background: var(--success);
}
.employee-work-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
}
.employee-work-status-current,
.employee-work-status-month {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 2px 12px 0;
}
.employee-work-status-current {
  padding-left: 0;
}
.employee-work-status-month {
  padding-right: 0;
  border-left: 1px solid var(--border-color);
}
.employee-work-status-current span,
.employee-work-status-month span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.employee-work-status-current b,
.employee-work-status-month b {
  font-size: 16px;
}
.employee-work-status-current b small {
  display: block;
  margin-top: 4px;
  color: inherit;
  font-size: inherit;
}
.employee-work-status-current strong,
.employee-work-status-month strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}
.employee-start-shift-button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.work-status-notice {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 82;
  width: min(360px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--color-primary-light);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
}
.work-status-notice > b {
  font-size: 17px;
}
.work-status-notice > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.work-status-notice > strong {
  font-size: 22px;
}
.work-status-notice button {
  margin-top: 5px;
}
.admin-action-modal { width: min(760px, 100%); }
.admin-action-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-role-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-role-fields[hidden] { display: none; }
.shift-report-form { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.shift-report-form .table-wrap {
  margin-top: 12px;
}
.shift-report-form table input {
  width: 100%;
  min-width: 96px;
  padding: 8px 10px;
}
.shift-report-form textarea {
  min-height: 84px;
}
.shift-report-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.report-meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 12px 0 16px; color: var(--muted); }
.report-meta-line b { color: var(--ink); }
.shift-report-summary { margin-bottom: 16px; }
.production-shift-report { margin-bottom: 18px; }
.production-shift-report-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.production-shift-report .panel-title-row { margin-bottom: 12px; }
.production-shift-report details summary { cursor: pointer; }
.shift-pallet-details { display: grid; gap: 6px; min-width: 340px; margin-top: 8px; padding: 8px; border-radius: 8px; background: var(--surface-soft, #f8fafc); }
.shift-pallet-details > div { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr 1fr; gap: 8px; padding-bottom: 5px; border-bottom: 1px solid var(--border, #e2e8f0); font-size: 12px; }
.report-limitation { margin-top: 12px; padding: 10px 12px; border: 1px solid #f59e0b; border-radius: 8px; background: #fffbeb; color: #92400e; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.work-shift-grid { display: grid; gap: 10px; }
.work-shift-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.work-shift-card div { display: grid; gap: 3px; }
.work-shift-card span, .work-shift-card small { color: var(--muted); }
.modal-error {
  padding: 12px 14px;
  border: 1px solid #F5B7B1;
  border-radius: 8px;
  background: #FFF5F5;
  color: #A61B1B;
  font-weight: 700;
  line-height: 1.35;
}
.modal-error[hidden] { display: none; }
.qr-scanner-modal {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
}
.qr-reader {
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #0f172a;
}
.qr-reader video,
.qr-reader canvas,
.qr-reader img {
  width: 100% !important;
  max-width: 100%;
  border-radius: 14px;
}
.qr-reader-status {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-page);
  color: var(--text-secondary);
  font-weight: 700;
  max-height: 96px;
  overflow: hidden;
  transition: opacity .18s ease, max-height .18s ease, padding .18s ease;
}
.qr-reader-status.processing { background: #eff6ff; color: #1d4ed8; }
.qr-reader-status.success { background: #ecfdf5; color: #047857; }
.qr-reader-status.duplicate { background: #fffbeb; color: #92400e; }
.qr-reader-status.error { background: #fff1f2; color: #be123c; }
.qr-reader-status.dismissed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  visibility: hidden;
}
.qr-session-counters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.qr-session-counters b {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-page);
  text-align: center;
}
.qr-manual-form {
  width: 100%;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-page);
}
.scan-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.scan-stats-grid div {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-page);
}
.scan-stats-grid h3 { margin: 0 0 8px; font-size: 14px; }
.scan-stats-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.scan-stats-grid li { display: flex; justify-content: space-between; gap: 10px; color: var(--text-secondary); }
.scan-stats-grid b { color: var(--text-primary); }
.admin-user-list table { min-width: 820px; }
.admin-row-action { white-space: nowrap; min-height: 34px; padding: 7px 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 12px; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; }
.wa { color: white; background: #1fa855; min-height: 34px; padding: 7px 10px; }

.stock-admin, .compact-form, .edit-list { display: grid; gap: 10px; }
.stock-row { display: grid; grid-template-columns: 110px 1fr 130px 150px; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.stock-qty-row { grid-template-columns: 90px minmax(150px, 1fr) repeat(5, minmax(96px, 120px)) 110px; align-items: end; }
.stock-qty-row label { gap: 4px; }
.stock-qty-row input { min-height: 38px; padding: 7px 9px; }
.stock-row span { color: var(--muted); }
.stock-note { border: 1px solid #cfe8dc; background: #f1faf5; border-radius: 8px; padding: 10px 12px; color: var(--muted); font-weight: 800; }
.stock-note b { color: var(--ink); }
.summary-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.summary-grid div { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.summary-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 4px; }
.summary-grid b { font-size: 24px; }
.dashboard-page .admin-quick-actions { margin-bottom: 16px; }
.dashboard-summary { grid-template-columns: repeat(4, 1fr); }
.forbidden-panel {
  width: min(560px, 100%);
  margin: 48px auto;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(23,33,28,.04);
}
.forbidden-panel h1 { margin: 0; font-size: 56px; color: var(--teal-dark); }
.forbidden-panel h2 { margin: 8px 0; }
.forbidden-panel p { color: var(--muted); }
.stock-report-filters { grid-template-columns: 1.3fr repeat(3, minmax(150px, .7fr)) auto; align-items: center; }
.contractor-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(150px, .75fr));
  gap: 10px;
  align-items: center;
}
.contractor-detail { display: grid; gap: 16px; }
.contractor-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contractor-analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.contractor-analytics-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  padding: 12px;
}
.contractor-analytics-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}
.contractor-analytics-grid b { font-size: 18px; }
.contractor-user-create summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--green-dark);
}
.contractor-user-form { margin-top: 12px; }
.stock-report-table input { min-width: 86px; max-width: 120px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.check input { width: auto; min-height: auto; }
.edit-card { border: 1px solid var(--line); border-radius: 8px; background: #fbfdfb; overflow: hidden; }
.edit-card summary { display: grid; grid-template-columns: 140px 1fr auto; gap: 10px; align-items: center; padding: 12px; cursor: pointer; }
.edit-card summary span { color: var(--muted); }
.edit-card summary em { font-style: normal; color: var(--green-dark); font-weight: 800; }
.product-photo-preview { display: grid; gap: 6px; align-content: start; }
.product-photo-preview img { width: 112px; height: 112px; object-fit: contain; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; }
.product-photo-preview small { color: var(--muted); overflow-wrap: anywhere; }
.edit-form, .settings-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 12px; border-top: 1px solid var(--line); }
.settings-form { grid-template-columns: repeat(2, 1fr); border-top: 0; padding: 0; }
.span-2 { grid-column: span 2; }
.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inline-form select { min-width: 130px; }
button.small { min-height: 36px; padding: 8px 12px; font-size: 13px; }
.timesheet-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.timesheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.timesheet-session-row td {
  background: var(--bg-page);
  color: var(--text-secondary);
}
.session-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}
.session-list span {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 6px 10px;
  font-size: 13px;
}
.export-link { width: fit-content; margin-bottom: 12px; }
.bottom-cart, .mobile-nav { display: none; }
.empty { padding: 32px; background: white; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; }
.notice {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
}
.notice b { color: var(--text-primary); }
.notice span { color: var(--text-secondary); }
.notice.success { border-color: color-mix(in srgb, var(--success) 34%, var(--border-color)); background: color-mix(in srgb, var(--success) 10%, white); }
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 80;
  background: var(--ink); color: white; padding: 12px 16px; border-radius: 8px; box-shadow: 0 14px 40px rgba(0,0,0,.22);
}
.app-footer {
  display: grid;
  gap: 3px;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.app-footer b {
  color: var(--ink);
  font-size: 13px;
}
.app-footer span,
.app-footer small { display: block; }

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.production-receipt-page {
  padding-bottom: 96px;
}

.production-receipt-form .file-picker input[type="file"] {
  margin-top: 8px;
  width: 100%;
}

.file-name-line {
  color: var(--muted);
  font-size: 14px;
}

.error-list {
  margin-top: 16px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
  border-radius: 8px;
  padding: 12px;
}

.error-list p {
  margin: 4px 0;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.production-preview-table {
  max-width: 100%;
}

@media (max-width: 640px) {
  .production-receipt-page .toolbar {
    align-items: stretch;
  }

  .production-receipt-page .toolbar .button-link,
  .panel-title-row .primary {
    width: 100%;
  }

  .production-preview-table {
    overflow: visible;
  }

  .production-preview-table table {
    min-width: 0;
  }

  .production-preview-table table,
  .production-preview-table tbody,
  .production-preview-table tr,
  .production-preview-table td {
    display: block;
    width: 100%;
  }

  .production-preview-table thead {
    display: none;
  }

  .production-preview-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
  }

  .production-preview-table td {
    display: grid;
    grid-template-columns: minmax(112px, 42%) 1fr;
    gap: 10px;
    border-bottom: 0;
    padding: 6px 0;
    min-width: 0;
    word-break: break-word;
  }

  .production-preview-table td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .production-preview-table td:nth-child(1)::before { content: "SKU"; }
  .production-preview-table td:nth-child(2)::before { content: "Наименование"; }
  .production-preview-table td:nth-child(3)::before { content: "Цвет"; }
  .production-preview-table td:nth-child(4)::before { content: "Остаток"; }
  .production-preview-table td:nth-child(5)::before { content: "Добавлено"; }
  .production-preview-table td:nth-child(6)::before { content: "Станет"; }
  .production-preview-table td:nth-child(7)::before { content: "Примечание"; }
}
.cart-toast {
  position: fixed;
  top: 92px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(420px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid #cdeee7;
  border-radius: 8px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 12px 32px rgba(17,24,39,.14);
  transform: translateX(-50%);
  pointer-events: auto;
}
.cart-toast div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.cart-toast b { color: var(--green-dark); font-size: 14px; }
.cart-toast span { color: var(--muted); font-size: 13px; }
.cart-toast button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--green);
  color: white;
  font-weight: 900;
}
.app-update-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 30%, var(--border-color));
  border-radius: 8px;
  background: var(--color-primary-light);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}
.app-update-notice button {
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 900;
}
.cart-pulse { animation: cartPulse .42s ease; }
@keyframes cartPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@media (max-width: 920px) {
  .auth-screen, .cart-layout, .account-grid, .admin-grid, .modal { grid-template-columns: 1fr; }
  .modal { max-height: calc(100vh - 28px); gap: 14px; padding: 16px; }
  .modal-media img { min-height: 0; height: 210px; padding: 12px; }
  .modal-content h2 { font-size: 22px; margin-bottom: 6px; }
  .modal-content h3 { margin: 8px 0 6px; }
  .detail-list { gap: 8px; margin-top: 8px; }
  .auth-brand { padding: 28px; align-self: start; }
  .auth-panel { margin: 0 16px 24px; }
  .topbar { grid-template-columns: 1fr auto; }
  nav { grid-column: 1 / -1; justify-content: start; overflow-x: auto; flex-wrap: nowrap; }
  main { padding: 16px; }
  .catalog-filters { top: 116px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .cart-row { grid-template-columns: 74px 1fr; }
  .cart-row img { width: 74px; height: 74px; }
  .qty { grid-column: 1 / -1; width: 160px; }
  .cart-row .ghost { grid-column: 1 / -1; width: 160px; }
  .checkout { position: static; }
  .stock-row, .stock-qty-row, .edit-card summary, .edit-form, .settings-form { grid-template-columns: 1fr; }
  .summary-grid, .stock-report-filters, .contractor-filters, .contractor-form, .contractor-analytics-grid, .admin-quick-action-grid, .admin-action-form, .admin-role-fields, .shift-report-form, .production-shift-report-filters, .grid.two, .executive-kpi-grid, .executive-layout, .executive-material-days > div { grid-template-columns: 1fr; }
  .shift-pallet-details { min-width: 260px; }
  .shift-pallet-details > div { grid-template-columns: 1fr; }
  .executive-screen { padding: 16px; }
  .executive-hero { display: grid; }
  .executive-clock, .executive-system-status { min-width: 0; text-align: left; }
  .executive-screen.tv-mode { padding: 16px; }
  .executive-events { max-height: none; }
  .executive-bars { min-width: 720px; }
  .shift-report-actions { display: grid; grid-template-columns: 1fr; }
  .work-shift-card { align-items: stretch; flex-direction: column; }
  .admin-action-button { min-height: 88px; }
  .employee-work-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-work-status-head { align-items: center; }
  .employee-work-status-current strong,
  .employee-work-status-month strong { font-size: 17px; }
  .work-status-notice { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .span-2 { grid-column: auto; }
  .bottom-cart {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 15; display: flex; justify-content: space-between; align-items: center;
    min-height: 56px; padding: 12px 16px; border: 0; border-radius: 8px; background: var(--ink); color: white; box-shadow: 0 16px 42px rgba(0,0,0,.24);
  }
  .bottom-cart b { color: #b8f0d1; }
  body { padding-bottom: 78px; }
}

@media (max-width: 560px) {
  body { background: #f7fafb; padding-bottom: 86px; }
  .auth-brand h1 { font-size: 38px; }
  .auth-brand p { font-size: 16px; }
  .form-grid, dl, .detail-list { grid-template-columns: 1fr; }

  .topbar {
    position: static; min-height: 96px; grid-template-columns: 1fr auto; gap: 10px; padding: 20px 18px;
    border-bottom: 0; background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%); color: white; backdrop-filter: none;
    box-shadow: 0 10px 28px rgba(4, 143, 157, .18);
  }
  .topbar .brand { grid-column: 1; grid-row: 1; gap: 12px; min-width: 0; }
  .topbar nav { display: none; }
  .brand span {
    width: 50px; height: 50px; border-radius: 10px; background: white; color: var(--teal-dark); font-size: 28px;
    box-shadow: 0 8px 22px rgba(0,0,0,.12);
  }
  .brand b { display: block; color: white; font-size: 20px; line-height: 1.05; }
  .brand small { display: block; color: rgba(255,255,255,.9); font-size: 14px; font-weight: 800; margin-top: 3px; }
  .logout-button {
    grid-column: 2; grid-row: 1; min-height: 42px; padding: 8px 0 8px 10px; border: 0; background: transparent; color: white;
    font-size: 16px; font-weight: 900;
  }
  .logout-button span { font-size: 27px; line-height: 1; }
  .logout-button b { display: inline; }

  nav { gap: 6px; }
  nav button { flex: 0 0 auto; padding: 7px 9px; font-size: 12px; }
  main { width: 100%; padding: 18px 14px 12px; }
  .catalog-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 128px; align-items: center; gap: 10px; margin-bottom: 14px; }
  .catalog-toolbar h1 { font-size: 25px; line-height: 1.12; margin: 0; letter-spacing: 0; }
  .catalog-toolbar p { display: none; }
  .warehouse-pill {
    position: relative; min-width: 0; height: 48px; display: flex; align-items: center; gap: 5px; padding: 0 10px;
    border: 1px solid #e3e9ec; border-radius: 14px; background: white; color: var(--ink); box-shadow: 0 8px 22px rgba(20,31,38,.05);
    font-size: 0;
  }
  .warehouse-pill > span { display: inline-flex; color: #737d86; font-size: 20px; flex: 0 0 auto; }
  .warehouse-pill select {
    min-height: 0; height: 44px; padding: 0 20px 0 0; border: 0; background: transparent; color: var(--ink);
    font-size: 15px; font-weight: 900; appearance: auto;
  }

  .catalog-search { position: sticky; top: 0; z-index: 6; margin: 0 0 10px; padding: 0; background: #f7fafb; }
  .catalog-filters {
    position: static; top: auto; z-index: auto; gap: 10px; margin: 0 0 16px; padding: 0 0 13px;
    background: transparent; border-bottom: 1px solid #e1e8eb; backdrop-filter: none;
  }
  .search-wrap { position: relative; }
  .search-wrap > span {
    display: grid; place-items: center; position: absolute; left: 17px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; color: #7a838b; font-size: 24px; pointer-events: none;
  }
  .search-wrap input {
    min-height: 56px; padding: 13px 14px 13px 48px; border: 1px solid #dfe7ea; border-radius: 14px; background: white;
    font-size: 15px; box-shadow: 0 8px 22px rgba(20,31,38,.04);
  }
  .filter-summary {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px;
    padding: 0; background: transparent; border: 0; border-radius: 0;
  }
  .filter-label {
    min-height: 48px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid #dfe7ea; border-radius: 14px;
    background: white; color: #7a838b; font-size: 14px; font-weight: 900; box-shadow: 0 8px 22px rgba(20,31,38,.04);
  }
  .filter-summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 15px; }
  .filter-summary .secondary {
    min-height: 44px; padding: 6px 2px 6px 8px; border: 0; background: transparent; color: var(--teal-dark); font-size: 14px; font-weight: 900;
  }
  .chips { display: none; }
  .chips.open { display: flex; flex-wrap: wrap; gap: 7px; overflow: visible; padding: 2px 0 0; }
  .chips.open button {
    flex: 1 1 calc(33.333% - 7px); min-width: 92px; min-height: 38px; padding: 8px 7px; border-radius: 12px;
    font-size: 12px; font-weight: 900;
  }

  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card {
    display: grid; overflow: hidden; min-height: 100%; border: 1px solid #e3e9ec; border-radius: 20px; background: white;
    box-shadow: 0 10px 28px rgba(20,31,38,.08);
  }
  .product-card img { width: 100%; height: 132px; object-fit: contain; padding: 14px 12px 6px; background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%); }
  .product-body { padding: 10px 12px 0; }
  .product-head { display: grid; grid-template-columns: 1fr; gap: 7px; align-items: start; }
  .product-sku { color: var(--teal-dark); font-size: 22px; line-height: 1.05; font-weight: 950; }
  .product-card .pill {
    width: fit-content; max-width: 100%; min-height: 30px; padding: 6px 8px; border-radius: 10px; font-size: 11px; line-height: 1.1;
    white-space: normal; background: #dff8f8; color: #087f8a;
  }
  .product-card .pill.none { color: var(--red); background: #ffeaea; }
  .product-card .pill.low { color: var(--amber); background: #fff3dc; }
  .product-card h3 { color: #151b1f; font-size: 16px; line-height: 1.16; margin: 10px 0 12px; font-weight: 900; }
  .product-metrics { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; border-top: 0; }
  .product-metrics div { border: 0; border-radius: 0; background: transparent; padding: 0; }
  .product-metrics div + div { padding: 0; border-left: 0; }
  .product-metrics span { color: #7a838b; font-size: 12px; font-weight: 900; margin-bottom: 5px; }
  .product-metrics b { color: #111; font-size: 14px; line-height: 1.15; font-weight: 900; }
  .product-card dl { display: none; }
  .product-actions { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); padding: 14px 12px 12px; align-self: end; }
  .product-actions .secondary { display: inline-flex; justify-content: center; min-height: 48px; padding: 9px 8px; border-radius: 12px; font-size: 14px; font-weight: 800; }
  .product-actions .primary {
    min-height: 48px; width: 100%; justify-content: center; padding: 9px 10px; border: 0; border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%); color: white; font-size: 14px; font-weight: 900;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.12), 0 8px 18px rgba(5, 151, 164, .22);
  }
  .add-button { position: relative; }
  .add-button i { position: absolute; right: 9px; width: 27px; height: 27px; border-radius: 7px; font-size: 22px; font-weight: 500; }
  .product-actions .add-button i { display: none; }

  .mobile-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
    min-height: 72px; padding: 8px 10px 9px; border: 1px solid #e3e9ec; border-width: 1px 0 0; border-radius: 18px 18px 0 0;
    background: rgba(255,255,255,.98); box-shadow: 0 -10px 30px rgba(20,31,38,.12); backdrop-filter: blur(12px);
  }
  .mobile-nav-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mobile-nav button {
    position: relative; min-height: 54px; padding: 4px 2px; border: 0; border-radius: 14px; background: transparent; color: #7b858d;
    font-size: 11px; font-weight: 800; line-height: 1.15; display: grid; place-items: center; gap: 3px;
  }
  .mobile-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-nav button.active { background: transparent; color: var(--teal-dark); border-color: transparent; }
  .mobile-nav button.active svg { fill: currentColor; stroke: currentColor; }

  table { min-width: 0; }
  thead { display: none; }
  tr { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  td { display: grid; gap: 6px; border-bottom: 0; padding: 4px 0; }
  td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
  }
  h1 { font-size: 28px; }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
    min-height: 100vh;
  }
  .app-main {
    min-width: 0;
  }
  .app-topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }
  .menu-toggle {
    display: inline-flex;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
  }
  .topbar-user {
    display: none;
  }
  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform .18s ease;
    box-shadow: 16px 0 42px rgba(15,23,42,.18);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close {
    display: inline-flex;
    width: 36px;
    min-height: 36px;
    padding: 0;
    align-items: center;
    justify-content: center;
    font-size: 24px;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 16;
    border: 0;
    background: rgba(15,23,42,.35);
  }
}

.print-station-panel .print-station-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 12px 0;
}

.print-station-toolbar label {
  min-width: 260px;
  margin: 0;
}

.print-station-toolbar span {
  color: var(--muted);
  font-weight: 700;
}

.print-station-actions {
  justify-content: flex-start;
  margin: 12px 0;
}

.print-station-panel table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.print-station-panel .pill.warning {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 720px) {
  .print-station-toolbar,
  .print-station-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .print-station-toolbar label,
  .print-station-actions button {
    width: 100%;
  }
}

/* Warehouse TV dashboard */
.warehouse-tv-root {
  min-height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: #0f1720;
  color: #f5f7fa;
  font-family: Arial, Helvetica, sans-serif;
}

.warehouse-tv-root.hide-cursor {
  cursor: none;
}

.warehouse-tv-canvas {
  width: calc(100vw - 48px);
  height: calc(100vh - 48px);
  margin: 24px;
  transform: translate(var(--tv-offset, 0), var(--tv-offset, 0));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.warehouse-tv-fullscreen {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  border: 1px solid rgba(78, 161, 255, 0.45);
  border-radius: 12px;
  background: rgba(24, 34, 46, 0.9);
  color: #f5f7fa;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 800;
}

:fullscreen .warehouse-tv-fullscreen,
.warehouse-tv-root:fullscreen .warehouse-tv-fullscreen {
  display: none;
}

.warehouse-tv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px 24px;
  border: 1px solid #263444;
  border-radius: 20px;
  background: #18222e;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.warehouse-tv-header p {
  margin: 0 0 4px;
  color: #aab4c0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.warehouse-tv-header h1 {
  margin: 0;
  color: #f5f7fa;
  font-size: clamp(38px, 3.2vw, 72px);
  line-height: 1;
}

.warehouse-tv-status-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  color: #d6dde6;
  font-size: clamp(19px, 1.2vw, 28px);
  font-weight: 700;
}

.warehouse-tv-status-row span,
.warehouse-tv-status-row b,
.warehouse-tv-status-row strong {
  padding: 8px 12px;
  border-radius: 999px;
  background: #202c39;
  white-space: nowrap;
}

.warehouse-tv-status-row b.online {
  color: #35c46a;
}

.warehouse-tv-status-row b.offline,
.warehouse-tv-status-row strong {
  color: #ef5b5b;
}

.warehouse-tv-stage {
  min-height: 0;
  overflow: hidden;
}

.warehouse-tv-screen {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
  animation: warehouseTvFade 0.48s ease;
}

.warehouse-tv-screen.sku-screen {
  grid-template-rows: auto 1fr;
}

@keyframes warehouseTvFade {
  from { opacity: 0; transform: translateY(10px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.warehouse-tv-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.warehouse-tv-section-title h2 {
  margin: 0;
  color: #f5f7fa;
  font-size: clamp(32px, 2.4vw, 58px);
}

.warehouse-tv-section-title span {
  color: #aab4c0;
  font-size: clamp(20px, 1.3vw, 30px);
  font-weight: 800;
}

.warehouse-tv-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.warehouse-tv-card {
  min-height: 280px;
  padding: 24px;
  border: 2px solid #263444;
  border-radius: 22px;
  background: #18222e;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 20px 48px rgba(0,0,0,0.25);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 8px;
}

.warehouse-tv-card.level-critical {
  border-color: rgba(239, 91, 91, 0.78);
  animation: warehouseTvPulse 2.4s ease-in-out infinite;
}

@keyframes warehouseTvPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(239, 91, 91, 0), 0 20px 48px rgba(0,0,0,0.25); }
  50% { box-shadow: 0 0 28px rgba(239, 91, 91, 0.28), 0 20px 48px rgba(0,0,0,0.25); }
}

.warehouse-tv-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d6dde6;
  font-size: clamp(24px, 1.7vw, 40px);
  font-weight: 900;
}

.warehouse-tv-card-top i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6f7c89;
}

.warehouse-tv-card.level-ok .warehouse-tv-card-top i { background: #35c46a; }
.warehouse-tv-card.level-warning .warehouse-tv-card-top i { background: #f2b84b; }
.warehouse-tv-card.level-critical .warehouse-tv-card-top i { background: #ef5b5b; }
.warehouse-tv-card.level-process .warehouse-tv-card-top i { background: #4ea1ff; }

.warehouse-tv-card strong {
  align-self: end;
  color: #f5f7fa;
  font-size: clamp(88px, 7.2vw, 180px);
  line-height: 0.92;
  letter-spacing: 0;
}

.warehouse-tv-card small {
  color: #aab4c0;
  font-size: clamp(22px, 1.4vw, 34px);
  font-weight: 800;
}

.warehouse-tv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #d6dde6;
  font-size: clamp(18px, 1vw, 26px);
}

.warehouse-tv-meta b,
.warehouse-tv-meta span {
  padding: 7px 10px;
  border-radius: 10px;
  background: #202c39;
}

.warehouse-tv-note {
  align-self: end;
  color: #aab4c0;
  font-size: clamp(20px, 1.2vw, 30px);
}

.warehouse-tv-personnel {
  min-height: 0;
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;
  gap: 20px;
}

.warehouse-tv-personnel-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.warehouse-tv-personnel-summary article,
.warehouse-tv-personnel-list article,
.warehouse-tv-empty {
  border: 1px solid #263444;
  border-radius: 18px;
  background: #18222e;
  padding: 18px;
}

.warehouse-tv-personnel-summary span {
  color: #aab4c0;
  font-size: clamp(18px, 1vw, 26px);
  font-weight: 800;
}

.warehouse-tv-personnel-summary b {
  display: block;
  margin-top: 8px;
  color: #f5f7fa;
  font-size: clamp(58px, 4vw, 112px);
  line-height: 1;
}

.warehouse-tv-personnel-list {
  min-height: 0;
  display: grid;
  gap: 10px;
  overflow: hidden;
}

.warehouse-tv-personnel-list article {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr 0.8fr;
  align-items: center;
  gap: 16px;
}

.warehouse-tv-personnel-list b {
  color: #f5f7fa;
  font-size: clamp(20px, 1.2vw, 30px);
}

.warehouse-tv-personnel-list span,
.warehouse-tv-personnel-list small {
  color: #aab4c0;
  font-size: clamp(16px, 0.95vw, 24px);
}

.warehouse-tv-personnel-list em {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(78, 161, 255, 0.18);
  color: #7db9ff;
  font-style: normal;
  font-weight: 900;
  font-size: clamp(16px, 0.9vw, 22px);
}

.warehouse-tv-sku-board {
  min-height: 0;
  border: 1px solid #263444;
  border-radius: 22px;
  background: #18222e;
  overflow: hidden;
}

.warehouse-tv-sku-board table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.warehouse-tv-sku-board th,
.warehouse-tv-sku-board td {
  border-bottom: 1px solid #263444;
  padding: 14px 18px;
  color: #d6dde6;
  font-size: clamp(20px, 1.15vw, 32px);
}

.warehouse-tv-sku-board th {
  color: #aab4c0;
  background: #202c39;
  text-align: left;
  text-transform: uppercase;
  font-size: clamp(16px, 0.9vw, 24px);
}

.warehouse-tv-sku-board td b {
  color: #f5f7fa;
  font-size: clamp(28px, 1.7vw, 44px);
}

.warehouse-tv-sku-board td strong {
  color: #f5f7fa;
  font-size: clamp(30px, 2vw, 52px);
}

.warehouse-tv-sku-board td span {
  display: inline-flex;
  min-width: 150px;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  font-size: clamp(16px, 0.95vw, 24px);
}

.warehouse-tv-sku-board tr.sku-status-ok td span { background: rgba(53, 196, 106, 0.18); color: #35c46a; }
.warehouse-tv-sku-board tr.sku-status-low td span { background: rgba(242, 184, 75, 0.18); color: #f2b84b; }
.warehouse-tv-sku-board tr.sku-status-critical td span { background: rgba(239, 91, 91, 0.18); color: #ef5b5b; }
.warehouse-tv-sku-board tr.sku-status-empty td span { background: rgba(111, 124, 137, 0.2); color: #aab4c0; }
.warehouse-tv-sku-board tr.sku-status-incoming td span { background: rgba(78, 161, 255, 0.18); color: #4ea1ff; }

@media (min-width: 2500px) {
  .warehouse-tv-canvas {
    margin: 40px;
    width: calc(100vw - 80px);
    height: calc(100vh - 80px);
    gap: 28px;
  }

  .warehouse-tv-card {
    min-height: 420px;
  }
}

@media (max-width: 1200px) {
  .warehouse-tv-cards,
  .warehouse-tv-personnel {
    grid-template-columns: 1fr;
  }

  .warehouse-tv-card {
    min-height: 210px;
  }
}


/* Final visual polish: light premium marketplace UI */
:root {
  --color-primary: #009CFF;
  --color-primary-hover: #0087E0;
  --color-primary-light: #DDF3FF;
  --color-secondary: #38BDF8;
  --color-secondary-light: #E0F7FF;
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --border-color: #E2E8F0;
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --radius-control: 12px;
  --radius-card: 16px;
  --radius-modal: 24px;
  --shadow-card: 0 10px 30px rgba(15, 23, 42, .06);
  --shadow-card-hover: 0 16px 42px rgba(15, 23, 42, .10);
  --shadow-modal: 0 24px 70px rgba(15, 23, 42, .18);
  --transition-fast: 160ms ease;
  --transition-normal: 220ms ease;
  --green: #009CFF;
  --green-dark: #0087E0;
  --teal: #38BDF8;
  --teal-dark: #009CFF;
  --ink: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --surface: #FFFFFF;
  --bg: #F8FAFC;
  --amber: #F59E0B;
  --red: #EF4444;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body { background: var(--bg); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #9CA3AF; font-weight: 400; }
.product-card, .panel, .cart-row, .checkout { background: #FFFFFF; border-color: #E5E7EB; box-shadow: 0 10px 30px rgba(17,24,39,.06); }
.product-card img { background: #FFFFFF; }
.sku, .product-sku { color: var(--teal-dark); font-weight: 700; }
.product-card h3 { font-weight: 600; }
.product-metrics span, dt { color: #6B7280; font-weight: 500; }
.product-metrics b, dd { font-weight: 600; }
.pill { border-radius: 999px; font-size: 13px; font-weight: 600; }
.pill.ok, .pill.order { color: #059669; background: #ECFDF5; }
.pill.low { color: #D97706; background: #FFFBEB; }
.pill.none { color: #DC2626; background: #FEF2F2; }
@media (max-width: 560px) {
  body { background: #F8FAFC; padding-bottom: 78px; }
  .topbar {
    min-height: 96px; padding: 18px 18px; background: linear-gradient(135deg, #009CFF 0%, #0477E8 100%);
    box-shadow: 0 8px 22px rgba(0, 156, 255, .16);
  }
  .topbar .brand { gap: 10px; }
  .brand b { font-size: 16px; font-weight: 700; letter-spacing: 0; }
  .brand small { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.88); }
  .logout-button { font-size: 14px; font-weight: 600; }
  .logout-button span { font-size: 24px; }

  main { padding: 16px 14px 12px; }
  .catalog-toolbar { grid-template-columns: minmax(0, 1fr) 132px; gap: 10px; margin-bottom: 12px; }
  .catalog-toolbar h1 { font-size: 28px; font-weight: 700; line-height: 1.08; }
  .warehouse-pill { height: 46px; border-color: #E5E7EB; border-radius: 16px; box-shadow: 0 6px 18px rgba(17,24,39,.04); }
  .warehouse-pill select { height: 42px; font-size: 18px; font-weight: 600; color: #111827; }
  .warehouse-pill > span { color: #6B7280; font-size: 18px; }

  .catalog-search { background: #F8FAFC; margin-bottom: 10px; }
  .search-wrap input {
    min-height: 54px; border-color: #E5E7EB; border-radius: 16px; background: #FFFFFF; font-size: 16px; font-weight: 400;
    box-shadow: 0 7px 18px rgba(17,24,39,.04);
  }
  .search-wrap > span { color: #9CA3AF; font-size: 22px; }
  .catalog-filters { margin-bottom: 14px; padding-bottom: 12px; border-bottom-color: #E5E7EB; }
  .filter-summary { min-height: 48px; gap: 10px; }
  .filter-label { min-height: 44px; padding: 0 14px; border-color: #E5E7EB; border-radius: 15px; color: #6B7280; font-size: 14px; font-weight: 500; }
  .filter-summary b { font-size: 15px; font-weight: 600; }
  .filter-summary .secondary { min-height: 40px; color: var(--teal-dark); font-size: 14px; font-weight: 600; }
  .chips.open button { min-height: 36px; border-color: #E5E7EB; font-size: 12px; font-weight: 500; }

  .catalog-grid { gap: 12px; }
  .product-card { border-color: #E5E7EB; border-radius: 20px; box-shadow: 0 8px 24px rgba(17,24,39,.06); }
  .product-card img { height: 102px; padding: 10px 10px 2px; background: #FFFFFF; object-fit: contain; }
  .product-body { padding: 8px 12px 0; }
  .product-head { gap: 6px; }
  .product-sku { font-size: 26px; font-weight: 700; line-height: 1; }
  .product-card .pill { min-height: 26px; padding: 5px 8px; font-size: 13px; font-weight: 600; border-radius: 999px; }
  .product-card h3 { font-size: 20px; font-weight: 600; line-height: 1.12; margin: 8px 0 10px; }
  .product-meta-line { margin: -3px 0 8px; font-size: 13px; font-weight: 500; }
  .product-metrics span { font-size: 13px; font-weight: 500; color: #6B7280; margin-bottom: 3px; }
  .product-metrics b { font-size: 18px; font-weight: 600; line-height: 1.08; }
  .product-actions { padding: 11px 12px 12px; }
  .product-actions .secondary { min-height: 46px; border-radius: 13px; font-size: 15px; font-weight: 600; }
  .product-actions .primary { min-height: 46px; border-radius: 13px; font-size: 18px; font-weight: 600; box-shadow: 0 8px 18px rgba(0,156,255,.18); }
  .add-button i { width: 26px; height: 26px; right: 9px; font-size: 20px; border-width: 1.5px; }

  .mobile-nav { min-height: 66px; padding: 6px 10px 7px; border-color: #E5E7EB; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 24px rgba(17,24,39,.08); }
  .mobile-nav button { min-height: 52px; color: #9CA3AF; font-size: 14px; font-weight: 500; gap: 2px; }
  .mobile-nav button.active { color: var(--teal-dark); font-weight: 600; }
  .mobile-nav svg { width: 28px; height: 28px; stroke-width: 1.8; }
}

@media (min-width: 561px) {
  h1 { font-size: 28px; font-weight: 700; }
  .product-card { border-radius: 16px; }
  .product-card img { object-fit: contain; background: #FFFFFF; }
  .product-sku { font-size: 26px; font-weight: 700; }
  .product-card h3 { font-size: 20px; font-weight: 600; }
  .product-metrics span { font-size: 13px; font-weight: 500; color: #6B7280; }
  .product-metrics b { font-size: 18px; font-weight: 600; }
  .product-actions .primary { font-size: 18px; font-weight: 600; }
}


/* Compact pass after visual measurement */
@media (max-width: 560px) {
  .product-card img { height: 78px; padding: 7px 10px 0; }
  .product-body { padding: 7px 12px 0; }
  .product-head { gap: 4px; }
  .product-sku { font-size: 25px; line-height: .98; }
  .product-card .pill { min-height: 24px; padding: 4px 8px; font-size: 12.5px; line-height: 1; }
  .product-card h3 { font-size: 19px; line-height: 1.06; margin: 7px 0 8px; }
  .product-meta-line { margin: -2px 0 7px; font-size: 12.5px; }
  .product-metrics span { font-size: 13px; margin-bottom: 2px; }
  .product-metrics b { font-size: 17px; line-height: 1.02; }
  .product-actions { padding: 9px 12px 10px; }
  .product-actions .secondary { min-height: 42px; font-size: 14px; border-radius: 12px; }
  .product-actions .primary { min-height: 42px; font-size: 17px; border-radius: 12px; }
  .add-button i { width: 24px; height: 24px; font-size: 18px; }
}

/* Final mobile typography and header polish */
@media (max-width: 560px) {
  .topbar { min-height: 84px; padding: 10px 10px; align-items: center; gap: 7px; }
  .topbar .brand { flex-direction: row; align-items: center; justify-content: flex-start; gap: 7px; min-width: 0; }
  .brand b { display: block; font-size: 13px; font-weight: 800; line-height: 1.05; }
  .brand small { display: block; font-size: 9px; font-weight: 500; line-height: 1.15; margin-top: 1px; }
  .topbar .lang-switch { gap: 3px; padding: 2px; }
  .topbar .lang-switch span { display: none; }
  .topbar .lang-switch button:not(.active) { display: none; }
  .topbar .lang-switch button { min-height: 26px; padding: 0 6px; font-size: 10px; }
  .logout-button { align-self: center; width: 28px; min-height: 28px; padding: 0; font-size: 13px; font-weight: 600; }
  .logout-button span { font-size: 18px; }

  .catalog-toolbar { grid-template-columns: minmax(0, 1fr) 126px; margin-bottom: 11px; }
  .catalog-toolbar h1 { font-size: 24px; font-weight: 700; line-height: 1.08; }
  .warehouse-pill { height: 42px; padding: 0 9px; }
  .warehouse-pill select { height: 40px; font-size: 16px; font-weight: 600; }
  .warehouse-pill > span { font-size: 16px; }

  .search-wrap input { min-height: 52px; font-size: 16px; }
  .catalog-filters { margin-bottom: 13px; padding-bottom: 11px; }
  .filter-summary { min-height: 44px; }
  .filter-label { min-height: 40px; font-size: 13px; }
  .filter-summary b { font-size: 14px; }
  .filter-summary .secondary { min-height: 38px; font-size: 13px; }

  .product-card img { height: 90px; padding: 5px 8px 0; object-fit: contain; }
  .product-body { padding: 5px 11px 0; }
  .product-head { gap: 3px; }
  .product-sku { font-size: 22px; font-weight: 700; line-height: 1; }
  .product-card .pill { min-height: 22px; padding: 4px 7px; font-size: 11px; font-weight: 600; line-height: 1; }
  .product-card h3 { font-size: 16px; font-weight: 600; line-height: 1.08; margin: 6px 0 7px; }
  .product-meta-line { margin: -2px 0 6px; font-size: 11.5px; }
  .product-metrics span { font-size: 11.5px; font-weight: 500; margin-bottom: 2px; }
  .product-metrics b { font-size: 16px; font-weight: 600; line-height: 1.02; }
  .product-actions { padding: 8px 11px 10px; }
  .product-actions .secondary { min-height: 40px; font-size: 13px; }
  .product-actions .primary { min-height: 40px; font-size: 16px; font-weight: 600; }
  .add-button i { width: 23px; height: 23px; right: 8px; font-size: 18px; }
}

/* Keep mobile header at the previous height after logo-only layout */
@media (max-width: 560px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 96px; padding: 12px 14px; }
  .topbar .lang-switch { grid-column: 2; grid-row: 1; gap: 3px; font-size: 11px; padding: 2px; }
  .topbar .lang-switch span { display: none; }
  .topbar .lang-switch button { min-height: 28px; padding: 0 7px; font-size: 11px; }
  .topbar .logout-button { grid-column: 3; grid-row: 1; padding-left: 4px; }
  .topbar .logout-button b { display: none; }
  .brand b { font-size: 14px; }
  .brand small { font-size: 10px; line-height: 1.1; }
}

/* Premium BEREKE OS login screen */
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  padding: 32px 18px;
  color: #0D1B2A;
  background:
    radial-gradient(circle at 16% 12%, rgba(102,208,255,.38), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(0,156,255,.18), transparent 30%),
    linear-gradient(135deg, #F8FAFC 0%, #FFFFFF 44%, #EAF7FF 100%);
  position: relative;
  overflow: hidden;
}

@media (max-width: 560px) {
  .cart-toast {
    top: 104px;
    left: 14px;
    right: 14px;
    width: auto;
    transform: none;
    padding: 9px 10px;
  }
  .cart-toast b { font-size: 13px; }
  .cart-toast span { font-size: 12px; }
  .cart-toast button { min-height: 32px; padding-inline: 9px; }
}
.auth-screen::before,
.auth-screen::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  height: 240px;
  border: 0;
  border-radius: 50%;
  pointer-events: none;
}
.auth-screen::before {
  bottom: -96px;
  background: linear-gradient(135deg, rgba(51,196,255,.34), rgba(0,156,255,.16));
  transform: rotate(-4deg);
}
.auth-screen::after {
  bottom: -132px;
  background: linear-gradient(135deg, rgba(0,156,255,.20), rgba(102,208,255,.10));
  transform: rotate(5deg);
}
.auth-brand, .tabs, .demo-box { display: none; }
.auth-panel {
  width: min(430px, 100%);
  max-width: calc(100vw - 28px);
  margin: 0;
  padding: 34px;
  background: #FFFFFF;
  color: #0D1B2A;
  border: 1px solid rgba(229,231,235,.86);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(13,27,42,.12);
  z-index: 1;
}
.auth-heading { display: grid; justify-items: center; text-align: center; margin-bottom: 24px; }
.auth-brand-text {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 18px;
}
.auth-heading h1 { margin: 0; font-size: 38px; line-height: 1.08; font-weight: 900; letter-spacing: 0; color: #0D1B2A; }
.auth-heading h1::first-letter { color: #0D1B2A; }
.auth-heading p { margin: 0; color: #64748B; font-size: 16px; line-height: 1.4; font-weight: 800; }
.auth-form { gap: 16px; }
.auth-form label { gap: 8px; color: #64748B; font-size: 13px; font-weight: 700; }
.auth-form input {
  min-height: 52px;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  background: #F8FAFC;
  padding: 13px 14px;
  color: #0D1B2A;
  font-size: 16px;
  font-weight: 400;
  box-shadow: none;
}
.auth-form input::placeholder { color: #9CA3AF; font-size: 16px; font-weight: 400; }
.auth-form input:focus { outline: 3px solid rgba(0,156,255,.14); border-color: #009CFF; background: #FFFFFF; }
.auth-submit {
  min-height: 52px;
  width: 100%;
  margin-top: 2px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #33C4FF 0%, #009CFF 48%, #0477E8 100%);
  color: white;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(0,156,255,.24);
}
.auth-submit:hover { filter: brightness(1.02); }
.auth-help {
  display: grid;
  gap: 4px;
  justify-items: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #F1F5F9;
  color: #64748B;
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
}
.auth-help b { color: #0D1B2A; font-size: 14px; font-weight: 700; }
.auth-whatsapp { margin-top: 6px; color: #009CFF; text-decoration: none; font-size: 14px; font-weight: 800; }
.auth-system-label {
  display: block;
  margin-top: 4px;
  color: #64748B;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}
.auth-footer {
  display: grid;
  gap: 3px;
  margin-top: 22px;
  text-align: center;
  color: #9CA3AF;
  font-size: 12px;
  font-weight: 400;
}
.auth-footer b { color: #0D1B2A; font-size: 13px; }
.auth-footer span, .auth-footer small { display: block; }

@media (max-width: 560px) {
  .auth-screen { min-height: 100vh; padding: 20px 14px; }
  .auth-panel { width: calc(100vw - 28px); max-width: calc(100vw - 28px); margin: 0; padding: 26px 20px; border-radius: 24px; }
  .auth-heading { margin-bottom: 22px; }
  .auth-brand-text { margin-bottom: 16px; }
  .auth-heading h1 { font-size: 32px; }
  .auth-heading p { font-size: 14px; }
  .auth-form { gap: 14px; min-width: 0; }
  .auth-form label { min-width: 0; }
  .auth-form input, .auth-submit, .access-entry-button { width: 100%; max-width: 100%; min-width: 0; min-height: 52px; }
  .auth-help { margin-top: 16px; padding-top: 16px; }
}

/* Access request funnel */
.access-entry-button {
  min-height: 52px;
  border-radius: 14px;
  border-color: #B6E6FF;
  background: #FFFFFF;
  color: #009CFF;
  font-size: 17px;
  font-weight: 800;
  box-shadow: none;
}
.access-entry-button:hover { background: #F0FAFF; }
.access-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .34);
  backdrop-filter: blur(10px);
}
.access-modal {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 26px;
  border: 1px solid #F1F5F9;
  border-radius: 24px;
  background: #FFFFFF;
  color: #111827;
  box-shadow: 0 22px 70px rgba(15, 23, 42, .20);
}
.modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  background: #FFFFFF;
  color: #6B7280;
  font-size: 20px;
  line-height: 1;
}
.access-modal-heading { padding-right: 34px; margin-bottom: 18px; }
.access-modal-heading h2, .access-success h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.16;
  font-weight: 700;
  color: #111827;
}
.access-modal-heading p, .access-success p {
  margin: 0;
  color: #6B7280;
  font-size: 14px;
  line-height: 1.45;
}
.access-form { gap: 13px; }
.access-form label { color: #374151; font-size: 13px; font-weight: 600; }
.access-form input, .access-form select {
  min-height: 50px;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  background: #FFFFFF;
  padding: 12px 14px;
  color: #111827;
  font-size: 15px;
  font-weight: 400;
}
.access-form input:focus, .access-form select:focus {
  outline: 3px solid rgba(26,180,200,.14);
  border-color: var(--color-primary);
}
.access-success { display: grid; gap: 18px; text-align: center; padding: 18px 0 4px; }
.access-requests-panel textarea { min-height: 70px; }
.access-table small { display: block; margin-top: 4px; color: #6B7280; }
.access-create-row td { background: #F8FAFC; }
.access-create-row details { padding: 4px 0; }
.access-create-row summary { cursor: pointer; color: var(--color-primary); font-weight: 700; }
.access-create-form { margin-top: 14px; }
.access-message textarea {
  min-height: 260px;
  white-space: pre-wrap;
  font-family: inherit;
  color: #111827;
}
.force-password-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background: linear-gradient(135deg, var(--color-secondary-light) 0%, #FFFFFF 48%, var(--bg-page) 100%);
}
.force-password-card { width: min(460px, 100%); }
.password-reset-modal { width: min(540px, 100%); }
.reset-password-card {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 16px;
  border: 1px solid #D8EEF1;
  border-radius: 8px;
  background: var(--bg-card);
  text-align: left;
}
.reset-password-card span {
  color: #6B7280;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.reset-password-card b,
.reset-password-card code {
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 720px) {
  .access-modal { padding: 22px 18px; border-radius: 22px; }
  .access-modal-heading h2, .access-success h2 { font-size: 21px; }
  .access-form input, .access-form select { min-height: 48px; font-size: 15px; }
  .modal-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .admin-row-action { width: 100%; }
  .access-table-wrap { overflow: visible; }
  .access-table, .access-table tbody, .access-table tr, .access-table td { display: block; width: 100%; }
  .access-table thead { display: none; }
  .access-table tr[data-access-row], .access-create-row {
    margin-bottom: 12px;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    background: #FFFFFF;
    overflow: hidden;
  }
  .access-table td { border: 0; padding: 9px 12px; }
  .access-create-row td { background: #F8FAFC; }
}


/* Super admin client access workflow */
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-title-row h2 { margin: 0; }
.client-create-button {
  min-height: 46px;
  border-radius: 14px;
  padding-inline: 18px;
  white-space: nowrap;
}
.client-access-modal { width: min(580px, 100%); }
.client-access-form { grid-template-columns: 1fr 1fr; }
.password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.password-control button { min-height: 44px; white-space: nowrap; }
.client-access-text {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 14px;
  font: inherit;
  color: #111827;
  background: #F8FAFC;
}
.whatsapp-access-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-top: 12px;
}
.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 220px;
}
.access-actions .primary,
.access-actions .secondary { min-height: 38px; padding-inline: 12px; }
.legacy-access-create-row { display: none; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--muted);
  font-size: 13px;
}
.lang-switch span {
  padding: 0 6px;
  white-space: nowrap;
}
.lang-switch button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.lang-switch button.active {
  background: var(--teal);
  color: #FFFFFF;
}
.lang-switch.compact span { padding-inline: 2px; }
.profile-language {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

/* Super admin notifications */
.notifications-list {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 24px 28px;
  display: grid;
  gap: 12px;
}
.notification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(23, 33, 28, .05);
}
.notification-card.unread {
  border-color: var(--teal);
  box-shadow: 0 12px 30px rgba(8, 182, 195, .12);
}
.notification-card.read { opacity: .82; }
.notification-main { min-width: 0; }
.notification-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.notification-title-row h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}
.notification-main p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.notification-details {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.notification-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 190px;
}
.row-highlight {
  animation: rowPulse 2.8s ease;
}
.table-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin: 2px 4px 2px 0;
  padding: 7px 10px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.document-archive-panel {
  overflow: visible;
}
.document-filters {
  display: grid;
  grid-template-columns: 170px 190px 170px minmax(220px, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.document-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.document-filters input,
.document-filters select {
  width: 100%;
  min-width: 0;
}
.pallet-grid {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 24px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.pallet-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(23, 33, 28, .05);
}
.pallet-detail-modal {
  width: min(860px, 96vw);
}
.pallet-detail-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: start;
}
.pallet-detail-grid .pallet-qr {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.panel-flat {
  margin-top: 18px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}
.timeline-list {
  display: grid;
  gap: 10px;
}
.timeline-list.compact article {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-page);
}
.timeline-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-page);
}
.timeline-item span,
.timeline-item small {
  color: var(--text-secondary);
  font-size: 13px;
}
.table-qr {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}
.mini-summary {
  margin-top: 10px;
}
.pallet-accept-card {
  display: grid;
  gap: 12px;
}
.pallet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pallet-head h3 {
  margin: 4px 0 0;
  font-size: 20px;
}
.pallet-head p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}
.pallet-qty {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--color-primary-light);
  color: var(--color-primary-hover);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}
.pallet-qr {
  width: 112px;
  height: 112px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.pallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pallet-actions button {
  flex: 1 1 150px;
}
.pallet-accept-button {
  min-height: 54px;
  font-size: 16px;
}
.pallet-accept-button:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}
.tpa-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.tpa-qr-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  text-align: center;
}
.tpa-qr-card img {
  width: 148px;
  height: 148px;
  object-fit: contain;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}
.tpa-qr-card b {
  display: block;
  color: var(--text-primary);
  font-size: 22px;
  letter-spacing: .08em;
}
.tpa-qr-card span,
.tpa-qr-card small {
  display: block;
  color: var(--text-secondary);
  font-weight: 700;
}
.muted-card {
  opacity: .68;
}
.pallet-comment {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-page);
  color: var(--text-secondary);
  font-weight: 700;
}
.pallet-confirm {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--color-primary-light);
  border-radius: 8px;
  background: var(--bg-page);
}
.pallet-confirm b {
  font-size: 16px;
}
.pallet-confirm span {
  color: var(--text-secondary);
  font-weight: 700;
}
.pallet-confirm div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.pallet-shift-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.pallet-shift-panel h2 {
  margin: 0 0 4px;
}
.pallet-shift-panel p,
.pallet-shift-panel small {
  display: block;
  margin: 0;
  color: var(--text-secondary);
  font-weight: 700;
}
.pallet-shift-panel.warning {
  border-color: rgba(245, 158, 11, .35);
  background: #FFFBEB;
}
.pallet-shift-panel.open {
  border-color: rgba(16, 185, 129, .28);
  background: #ECFDF5;
}
.pallet-shift-form {
  display: grid;
  grid-template-columns: 150px 150px 190px auto;
  align-items: end;
  gap: 10px;
}
.pallet-shift-form label {
  display: grid;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}
@keyframes rowPulse {
  0%, 100% { box-shadow: none; }
  18%, 70% { box-shadow: 0 0 0 3px rgba(8, 182, 195, .28); background: #f0fbfc; }
}

@media (max-width: 720px) {
  .panel-title-row { align-items: stretch; flex-direction: column; }
  .client-create-button { width: 100%; }
  .client-access-form { grid-template-columns: 1fr; }
  .password-control { grid-template-columns: 1fr; }
  .client-access-text { min-height: 230px; }
  .access-actions { min-width: 0; flex-direction: column; }
  .access-actions .primary,
  .access-actions .secondary { width: 100%; }
  .notifications-list { padding: 0 14px 92px; }
  .notification-card { grid-template-columns: 1fr; padding: 14px; }
  .notification-title-row { flex-direction: column; gap: 8px; }
  .notification-actions { min-width: 0; flex-direction: row; flex-wrap: wrap; }
  .notification-actions .primary,
  .notification-actions .secondary { flex: 1 1 180px; }
  .document-filters { grid-template-columns: 1fr; }
  .table-action-link { width: 100%; white-space: normal; }
  .pallet-grid { padding: 0 0 14px; grid-template-columns: 1fr; }
  .pallet-card { padding: 16px; border-radius: 8px; }
  .pallet-head { align-items: flex-start; }
  .pallet-head h3 { font-size: 25px; line-height: 1.05; }
  .pallet-head .sku { font-size: 18px; }
  .pallet-qty { font-size: 30px; padding: 14px; }
  .pallet-card .detail-list { grid-template-columns: 1fr; gap: 8px; }
  .pallet-card .detail-list div { padding: 10px 0; }
  .pallet-card .detail-list dt { font-size: 12px; }
  .pallet-card .detail-list dd { font-size: 16px; }
  .pallet-actions { display: grid; grid-template-columns: 1fr; }
  .pallet-actions button,
  .pallet-confirm button { width: 100%; min-height: 56px; }
  .pallet-confirm div { grid-template-columns: 1fr; }
  .pallet-detail-grid { grid-template-columns: 1fr; }
  .pallet-detail-grid .pallet-qr { width: 128px; height: 128px; }
  .pallet-shift-panel { grid-template-columns: 1fr; margin: 0 14px 14px; }
  .pallet-shift-form { grid-template-columns: 1fr; }
  .pallet-shift-form button { min-height: 54px; }
  .mobile-nav button { position: relative; }
  .mobile-nav .notification-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 22px);
    margin-left: 0;
    min-width: 20px;
    height: 20px;
    font-size: 11px;
  }
}

/* BEREKE OS Design System */
html { background: var(--bg-page); }
body {
  background: var(--bg-page);
  color: var(--text-primary);
}

button,
a,
input,
select,
textarea,
.product-card,
.panel,
.cart-row,
.checkout,
.modal,
.access-modal,
.notification-card,
.pallet-card,
.summary-grid div,
.admin-action-button {
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

input,
select,
textarea,
.document-filters input,
.document-filters select,
.access-form input,
.access-form select,
.auth-form input {
  min-height: 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-control);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: none;
}

input::placeholder,
textarea::placeholder,
.auth-form input::placeholder {
  color: #94A3B8;
  font-weight: 400;
}

input:focus,
select:focus,
textarea:focus,
.access-form input:focus,
.access-form select:focus,
.auth-form input:focus {
  outline: 3px solid rgba(0, 156, 255, .16);
  border-color: var(--color-primary);
  background: var(--bg-card);
}

.primary,
.secondary,
.ghost,
.linklike,
.wa,
.admin-row-action,
.table-action-link,
nav button,
.tabs button,
.chips button,
.mobile-nav button,
.auth-submit,
.access-entry-button {
  border-radius: var(--radius-control);
  min-height: 42px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.primary,
.auth-submit,
nav button.active,
.tabs button.active,
.chips button.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #FFFFFF;
}

.primary:hover,
.auth-submit:hover,
nav button.active:hover,
.tabs button.active:hover,
.chips button.active:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-primary-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.secondary,
.access-entry-button,
.table-action-link {
  border-color: var(--color-primary-light);
  background: var(--color-primary-light);
  color: var(--color-primary-hover);
}

.secondary:hover,
.access-entry-button:hover,
.table-action-link:hover {
  border-color: var(--color-secondary);
  background: var(--color-secondary-light);
  color: var(--color-primary-hover);
}

.ghost,
.linklike,
nav button,
.tabs button,
.chips button {
  border-color: var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
}

.ghost:hover,
.linklike:hover,
nav button:hover,
.tabs button:hover,
.chips button:hover {
  border-color: var(--color-primary-light);
  background: var(--bg-page);
  color: var(--color-primary-hover);
}

.danger,
button.danger {
  color: var(--danger);
}

.wa,
.success-button {
  border-color: var(--success);
  background: var(--success);
  color: #FFFFFF;
}

.product-card,
.panel,
.cart-row,
.checkout,
.modal,
.access-modal,
.notification-card,
.pallet-card,
.summary-grid div,
.admin-action-button,
.edit-card,
.stock-note,
.work-shift-card,
.reset-password-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.product-card:hover,
.admin-action-button:hover,
.notification-card:hover,
.pallet-card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-card-hover);
}

.panel,
.notification-card,
.pallet-card,
.summary-grid div,
.admin-action-button {
  padding: 16px;
}

.panel h2,
.panel-title-row h2,
.notification-title-row h2,
.pallet-head h3 {
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: 0;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text-primary);
}

th {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

td {
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

tbody tr:hover td {
  background: var(--color-secondary-light);
}

.table-wrap,
.production-preview-table {
  border-radius: var(--radius-card);
}

.pill {
  min-height: 26px;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 800;
}

.pill.ok,
.pill.active {
  color: #047857;
  background: rgba(16, 185, 129, .14);
}

.pill.order,
.pill.low,
.pill.pending {
  color: #B45309;
  background: rgba(245, 158, 11, .16);
}

.pill.none,
.pill.error {
  color: #B91C1C;
  background: rgba(239, 68, 68, .13);
}

.pill.blocked,
.pill.disabled {
  color: var(--text-secondary);
  background: #F1F5F9;
}

.warning {
  color: #B45309;
  background: rgba(245, 158, 11, .14);
}

.modal-backdrop,
.access-modal-backdrop {
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(10px);
}

.modal,
.access-modal {
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-modal);
}

.modal-x {
  border-color: var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.modal-error {
  border-color: rgba(239, 68, 68, .28);
  background: rgba(239, 68, 68, .08);
  color: #B91C1C;
}

.summary-grid div,
.dashboard-summary div {
  display: grid;
  gap: 4px;
}

.summary-grid span,
.dashboard-summary span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.summary-grid b,
.dashboard-summary b {
  color: var(--text-primary);
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.topbar {
  background: rgba(255, 255, 255, .94);
  border-bottom-color: var(--border-color);
}

.lang-switch {
  border-color: var(--border-color);
  background: var(--bg-card);
}

.lang-switch button.active {
  background: var(--color-primary);
}

.mobile-nav {
  border-color: var(--border-color);
  background: var(--bg-card);
}

.mobile-nav button.active {
  color: var(--color-primary);
}

@media (max-width: 560px) {
  .topbar {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  }
}

/* Executive dashboard runs on a dark background; keep its text contrast local. */
.executive-screen h1,
.executive-screen h2,
.executive-screen h3,
.executive-screen .panel-title-row h2 {
  color: #f8fafc;
}

.executive-screen p,
.executive-screen .panel-title-row span,
.executive-screen .panel-title-row small {
  color: rgba(226, 246, 255, .84);
}

.executive-screen table {
  color: #eaf7ff;
}

.executive-screen th {
  background: rgba(248, 250, 252, .96);
  color: #0f172a;
  border-bottom-color: rgba(248, 250, 252, .58);
}

.executive-screen td {
  color: #eaf7ff;
  border-bottom-color: rgba(226, 232, 240, .42);
}

.executive-screen tbody tr:hover td {
  background: rgba(56, 189, 248, .16);
  color: #ffffff;
}

.executive-screen table small {
  color: rgba(226, 246, 255, .76);
}

.executive-screen .executive-material-days article {
  background: rgba(15, 35, 54, .76);
  border-color: rgba(56, 189, 248, .48);
}

.executive-screen .executive-material-days span,
.executive-screen .executive-material-days small {
  color: rgba(242, 250, 255, .92);
}

.executive-screen .executive-material-days b {
  color: #ffffff;
}

.executive-screen .summary-grid div {
  background: rgba(255, 255, 255, .97);
  color: #0f172a;
}

.executive-screen .summary-grid span {
  color: #334155;
}

.executive-screen .summary-grid b {
  color: #0f172a;
}

.executive-screen .pill.none {
  background: rgba(254, 226, 226, .96);
  color: #dc2626;
}

.executive-screen .pill.ok {
  background: rgba(209, 250, 229, .96);
  color: #047857;
}

.executive-screen .executive-chart-panel h2,
.executive-screen .executive-chart-panel .panel-title-row h2 {
  color: #ffffff !important;
}

.executive-screen .executive-chart-panel .panel-title-row span {
  color: rgba(226, 246, 255, .9) !important;
}

.executive-screen .executive-chart-panel table td,
.executive-screen .executive-chart-panel table td b,
.executive-screen .executive-chart-panel table td span,
.executive-screen .executive-chart-panel table td small {
  color: #f1faff !important;
}

.executive-screen .executive-chart-panel table td small {
  color: rgba(226, 246, 255, .78) !important;
}

.executive-screen .executive-chart-panel table th,
.executive-screen .executive-chart-panel table th b,
.executive-screen .executive-chart-panel table th span,
.executive-screen .executive-chart-panel table th small {
  color: #0f172a !important;
}

.executive-screen .executive-chart-panel table tr,
.executive-screen .executive-chart-panel table td {
  border-bottom-color: rgba(255, 255, 255, .58) !important;
}

/* Materials module */
.materials-page {
  display: grid;
  gap: 18px;
}

.materials-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.materials-tabs button {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-normal);
}

.materials-tabs button.active,
.materials-tabs button:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.material-form {
  margin-bottom: 16px;
}

.material-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.material-status.normal {
  background: color-mix(in srgb, var(--success) 14%, white);
  color: #047857;
}

.material-status.low {
  background: color-mix(in srgb, var(--warning) 18%, white);
  color: #92400e;
}

.material-status.none {
  background: color-mix(in srgb, var(--danger) 12%, white);
  color: #b91c1c;
}

.materials-table td,
.materials-table th {
  white-space: nowrap;
}

.materials-catalog-table input,
.materials-catalog-table select {
  min-width: 110px;
  min-height: 36px;
}

.materials-catalog-table td:nth-child(7) input {
  min-width: 180px;
}

.admin-status-control {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 250px;
}

.admin-status-control select {
  min-height: 36px;
}

.hr-employee-cards-panel {
  display: grid;
  gap: 14px;
}

.hr-employee-tools {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 12px;
  align-items: end;
}

.hr-employee-tools label {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-filters button {
  min-height: 36px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 800;
}

.quick-filters button.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.hr-employee-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.hr-employee-card {
  display: grid;
  gap: 5px;
  min-height: 132px;
  text-align: left;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition-normal);
}

.hr-employee-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.hr-employee-card span {
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 900;
}

.hr-employee-card b {
  font-size: 16px;
}

.hr-employee-card small {
  color: var(--text-secondary);
}

.hr-employee-card .pill {
  justify-self: start;
  font-style: normal;
}

.hr-employee-detail .detail-list {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .materials-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .materials-tabs button {
    width: 100%;
    padding: 0 8px;
  }

  .materials-table td,
  .materials-table th {
    white-space: normal;
  }

  .admin-status-control {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .hr-employee-tools {
    grid-template-columns: 1fr;
  }
}

/* Bereke OS 2.0 navigation shell */
.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns var(--transition-normal);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

.app-shell.observer-shell {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  position: relative;
}

.app-sidebar {
  grid-column: 1;
  grid-row: 1 / 4;
  width: 260px;
  padding: 16px 12px;
  transition: width var(--transition-normal), transform var(--transition-normal);
}

.app-shell.sidebar-collapsed .app-sidebar {
  width: 72px;
}

.app-topbar {
  grid-column: 2;
  grid-row: 1;
  min-height: 72px;
  grid-template-columns: auto minmax(180px, 1fr) minmax(220px, 360px) auto auto auto auto;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255,255,255,.96);
}

.observer-shell .app-topbar {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 20;
  grid-column: auto;
  display: flex;
  min-height: 0;
  padding: 0;
  gap: 10px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.observer-shell .app-main {
  grid-column: 1;
  grid-row: 1;
}

.observer-topbar .brand {
  display: none;
}

.observer-topbar .lang-switch {
  background: rgba(37,99,235,.92);
  border-color: rgba(147,197,253,.35);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.observer-topbar .lang-switch span {
  display: none;
}

.observer-topbar .lang-switch button {
  color: rgba(255,255,255,.78);
}

.observer-topbar .lang-switch button.active {
  background: rgba(255,255,255,.18);
  color: #fff;
}

.observer-topbar .logout-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  background: rgba(15,23,42,.38);
  color: #fff;
}

.observer-topbar .logout-button b {
  display: none;
}

.section-tabs {
  position: sticky;
  top: 72px;
  z-index: 11;
  grid-column: 2;
  grid-row: 2;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(248,250,252,.94);
  backdrop-filter: blur(12px);
}

.section-tabs button {
  min-height: 38px;
  flex: 0 0 auto;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.section-tabs button:hover,
.side-nav-item:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-hover);
}

.section-tabs button.active,
.side-nav-item.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.section-tabs i,
.side-nav-item i,
.app-topbar i,
.mobile-nav i {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  stroke-width: 2.2;
}

.app-main {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
}

main {
  width: 100%;
  max-width: none;
  padding: 22px 24px;
}

.sidebar-head {
  min-height: 52px;
  padding: 0 4px 14px;
}

.sidebar-brand > i {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.sidebar-actions {
  display: flex;
  gap: 4px;
}

.sidebar-collapse,
.sidebar-close,
.header-icon-button,
.menu-toggle {
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav-item {
  width: 100%;
  min-height: 44px;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 850;
}

.app-shell.sidebar-collapsed .app-sidebar {
  padding-inline: 10px;
}

.app-shell.sidebar-collapsed .sidebar-brand div,
.app-shell.sidebar-collapsed .side-nav-item span,
.app-shell.sidebar-collapsed .access-diagnostics {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-head,
.app-shell.sidebar-collapsed .side-nav-item {
  justify-content: center;
}

.app-shell.sidebar-collapsed .sidebar-collapse {
  margin-inline: auto;
}

.app-section-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.app-section-title span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.app-section-title b {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-page);
  color: var(--text-secondary);
}

.header-search input {
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
}

.header-icon-button {
  position: relative;
}

.header-icon-button .notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  margin: 0;
  padding: 0 5px;
  font-size: 10px;
}

.logout-button {
  gap: 7px;
}

.panel,
.product-card,
.cart-row,
.checkout,
.admin-action-button,
.dashboard-card,
.executive-card,
.materials-card {
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

@media (max-width: 900px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    display: block;
  }

  .app-topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    min-height: 68px;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    padding: 10px 14px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 8px 22px rgba(15,23,42,.08);
  }

  .menu-toggle {
    display: inline-flex;
    color: var(--text-primary);
  }

  .header-search,
  .topbar-user {
    display: none;
  }

  .section-tabs {
    top: 68px;
    padding: 9px 14px;
  }

  .app-sidebar,
  .app-shell.sidebar-collapsed .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    padding: 16px 12px;
    transform: translateX(-105%);
    box-shadow: 16px 0 42px rgba(15,23,42,.18);
  }

  .app-sidebar.open,
  .app-shell.sidebar-collapsed .app-sidebar.open {
    transform: translateX(0);
  }

  .app-shell.sidebar-collapsed .sidebar-brand div,
  .app-shell.sidebar-collapsed .side-nav-item span,
  .app-shell.sidebar-collapsed .access-diagnostics {
    display: block;
  }

  .app-shell.sidebar-collapsed .sidebar-head,
  .app-shell.sidebar-collapsed .side-nav-item {
    justify-content: space-between;
  }

  .sidebar-collapse {
    display: none;
  }

  .sidebar-close {
    display: inline-flex;
  }

  main {
    padding: 18px 14px;
  }
}

/* Executive dashboard mobile adaptation */
.executive-dashboard-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.executive-kpi-grid.executive-kpi-six {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.executive-kpi-six article {
  min-width: 0;
}

.executive-kpi-six small {
  overflow-wrap: anywhere;
}

.executive-workplace-map .executive-workplace-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.executive-workplace-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(148,163,184,.25);
  border-left: 5px solid rgba(148,163,184,.75);
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}

.executive-workplace-card.green { border-left-color: #10B981; }
.executive-workplace-card.yellow { border-left-color: #F59E0B; }
.executive-workplace-card.red { border-left-color: #EF4444; }
.executive-workplace-card.gray { border-left-color: #94A3B8; }

.executive-workplace-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.executive-workplace-card-head b {
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.1;
}

.executive-workplace-card-head span {
  flex: 0 0 auto;
  max-width: 58%;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,.08);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-align: right;
}

.executive-workplace-card dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 0;
}

.executive-workplace-card dl div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.executive-workplace-card dt,
.executive-workplace-card dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.executive-workplace-card dt {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.executive-workplace-card dd {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
}

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

.executive-personnel-card {
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(102,208,255,.25);
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.executive-personnel-card summary {
  display: grid;
  gap: 4px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.executive-personnel-card summary::-webkit-details-marker {
  display: none;
}

.executive-personnel-card summary span {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.executive-personnel-card summary b {
  color: var(--text-primary);
  font-size: 30px;
  line-height: 1;
}

.executive-personnel-list {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.executive-personnel-list p {
  display: grid;
  gap: 2px;
  margin: 0;
  color: var(--text-primary);
  font-size: 12px;
}

.executive-personnel-list p span {
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.executive-production-chart,
.executive-workplace-map,
.executive-personnel-panel,
.executive-attention-panel,
.executive-events-panel {
  min-width: 0;
}

.executive-workplace-cards {
  display: none;
}

.executive-mobile-summary {
  display: none;
}

@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body:has(.executive-screen) {
    padding-bottom: 0;
  }

  .executive-screen {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    overflow-x: hidden;
  }

  .executive-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
    padding-top: 0;
  }

  .observer-shell .executive-hero {
    padding-top: 28px;
  }

  .executive-hero h1 {
    font-size: 24px;
    line-height: 1.12;
  }

  .executive-hero .eyebrow {
    font-size: 11px;
    line-height: 1;
    margin-bottom: 4px;
  }

  .executive-hero > div:first-child > span {
    font-size: 13px;
    line-height: 1.1;
  }

  .executive-system-status,
  .executive-clock {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .executive-system-status {
    padding: 8px 10px;
    border-radius: 10px;
  }

  .executive-system-status b {
    font-size: 13px;
    line-height: 1.15;
  }

  .executive-system-status small {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.15;
  }

  .executive-clock {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 7px;
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 10px;
    overflow: visible;
  }

  .executive-clock-item {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .executive-clock-shift {
    flex: 1 1 180px;
  }

  .executive-clock-updated {
    flex: 0 1 auto;
  }

  .executive-clock button,
  .executive-show-all-events,
  .executive-screen button {
    min-height: 44px;
  }

  .executive-layout,
  .executive-main-column,
  .executive-side-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-width: 0;
  }

  .executive-side-column {
    order: -1;
  }

  .executive-side-column .executive-alerts {
    order: -3;
  }

  .executive-side-column .executive-events {
    order: -2;
  }

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

  .executive-mobile-summary article {
    display: grid;
    align-content: center;
    min-height: 92px;
    padding: 12px;
    border: 1px solid rgba(102,208,255,.30);
    border-radius: 8px;
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow-card);
  }

  .executive-mobile-summary span {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .executive-mobile-summary b {
    color: var(--text-primary);
    font-size: 28px;
    line-height: 1.05;
  }

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

  .executive-kpi-grid.executive-kpi-six {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .executive-kpi-grid article {
    min-height: 112px;
    padding: 12px;
    border-radius: 8px;
  }

  .executive-kpi-grid span {
    font-size: 11px;
    line-height: 1.2;
  }

  .executive-kpi-grid b {
    font-size: 24px;
    line-height: 1.05;
  }

  .executive-kpi-grid small {
    font-size: 11px;
    line-height: 1.25;
  }

  .executive-chart-panel,
  .executive-material-days,
  .executive-alerts,
  .executive-events {
    width: 100%;
    min-width: 0;
    padding: 12px;
    border-radius: 8px;
  }

  .executive-chart-panel .panel-title-row {
    align-items: flex-start;
    gap: 4px;
  }

  .executive-chart-panel h2,
  .executive-material-days h2,
  .executive-alerts h2,
  .executive-events h2 {
    font-size: 18px;
    line-height: 1.15;
  }

  .executive-bars {
    min-width: 0;
    width: 100%;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .executive-bar {
    min-width: 40px;
  }

  .executive-bar b {
    font-size: 12px;
  }

  .executive-bar span {
    font-size: 11px;
    white-space: nowrap;
  }

  .executive-material-days > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .executive-material-days article {
    min-height: 88px;
    padding: 10px;
  }

  .executive-alerts {
    gap: 8px;
  }

  .executive-alerts article {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    padding: 10px;
    word-break: break-word;
  }

  .executive-events {
    max-height: none;
    gap: 6px;
  }

  .executive-events article {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0;
  }

  .executive-events time {
    font-size: 12px;
    white-space: normal;
  }

  .executive-events b,
  .executive-events span,
  .executive-events small {
    overflow-wrap: anywhere;
  }

  .executive-workplace-cards {
    display: grid;
    gap: 8px;
  }

  .executive-chart-panel:has(.executive-workplace-cards) .table-wrap {
    display: none;
  }

  .executive-workplace-card {
    gap: 9px;
    padding: 12px;
  }

  .executive-workplace-card-head {
    align-items: center;
  }

  .executive-workplace-card-head b {
    color: var(--text-primary);
    font-size: 18px;
  }

  .executive-workplace-card-head span {
    background: var(--bg-page);
  }

  .executive-workplace-card dl {
    gap: 6px;
  }

  .executive-workplace-card dl div {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 8px;
  }

  .executive-workplace-card dt,
  .executive-workplace-card dd {
  }

  .executive-workplace-card dt {
  }

  .executive-workplace-card dd {
  }

  .executive-workplace-card small {
    color: var(--text-secondary);
    overflow-wrap: anywhere;
  }

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

  .executive-personnel-card summary {
    padding: 12px;
  }

  .executive-personnel-card summary b {
    font-size: 26px;
  }

  .executive-screen .grid.two,
  .executive-screen .summary-grid {
    grid-template-columns: 1fr;
  }

  .executive-screen .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 380px) {
  .executive-kpi-grid,
  .executive-mobile-summary,
  .executive-material-days > div {
    grid-template-columns: 1fr;
  }

  .executive-personnel-grid {
    grid-template-columns: 1fr;
  }

  .executive-workplace-card dl div {
    grid-template-columns: 1fr;
  }
}
/* Warehouse manager dashboard */
.warehouse-dashboard-screen {
  display: grid;
  gap: 18px;
  width: 100%;
}

.warehouse-dashboard-section,
.warehouse-dashboard-grid > .panel,
.warehouse-dashboard-detail {
  border: 1px solid rgba(19, 93, 118, 0.14);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  padding: 18px;
}

.warehouse-dashboard-cards {
  display: grid;
  gap: 14px;
}

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

.warehouse-dash-card {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 18px;
  text-align: left;
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f3fbfb);
  color: #0f172a;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.warehouse-dash-card:hover,
.warehouse-dash-card.active {
  transform: translateY(-2px);
  border-color: #0f766e;
  box-shadow: 0 18px 32px rgba(15, 118, 110, 0.16);
}

.warehouse-dash-card span {
  font-size: 15px;
  font-weight: 800;
}

.warehouse-dash-card b {
  font-size: 42px;
  line-height: 1;
}

.warehouse-dash-card small {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.warehouse-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 18px;
}

.warehouse-personnel-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.warehouse-personnel-list article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.warehouse-personnel-list b {
  color: #0f172a;
}

.warehouse-personnel-list span,
.warehouse-personnel-list small {
  color: #475569;
}

.warehouse-personnel-list em {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
}

.warehouse-sku-board {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  background: #071827;
  color: #e5f6ff;
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.22);
  overflow: hidden;
}

.warehouse-sku-board.fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 1500;
  overflow: auto;
}

.warehouse-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.warehouse-board-head h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
}

.warehouse-board-head p,
.warehouse-board-page {
  margin: 4px 0 0;
  color: #93c5fd;
  font-size: 13px;
}

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

.warehouse-board-actions input,
.warehouse-board-actions select {
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  border-radius: 9px;
  padding: 0 10px;
}

.warehouse-board-actions input::placeholder {
  color: #94a3b8;
}

.warehouse-board-table {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
}

.warehouse-board-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.warehouse-board-table th,
.warehouse-board-table td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  font-size: 14px;
}

.warehouse-board-table th {
  color: #93c5fd;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.warehouse-board-table td b {
  color: #fff;
  font-size: 16px;
}

.warehouse-board-table td span {
  display: inline-flex;
  min-width: 104px;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.warehouse-board-table tr.sku-status-ok td span {
  background: #dcfce7;
  color: #166534;
}

.warehouse-board-table tr.sku-status-low td span {
  background: #fef3c7;
  color: #92400e;
}

.warehouse-board-table tr.sku-status-critical td span {
  background: #fee2e2;
  color: #991b1b;
}

.warehouse-board-table tr.sku-status-empty td span {
  background: #e5e7eb;
  color: #374151;
}

.warehouse-board-table tr.sku-status-incoming td span {
  background: #dbeafe;
  color: #1d4ed8;
}

@media (max-width: 980px) {
  .warehouse-dashboard-cards.three,
  .warehouse-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .warehouse-board-head {
    flex-direction: column;
  }

  .warehouse-board-actions {
    justify-content: flex-start;
  }

  .warehouse-board-table {
    overflow-x: auto;
  }

  .warehouse-board-table table {
    min-width: 820px;
  }
}

@media (max-width: 560px) {
  .warehouse-dashboard-section,
  .warehouse-dashboard-grid > .panel,
  .warehouse-dashboard-detail,
  .warehouse-sku-board {
    padding: 14px;
    border-radius: 12px;
  }

  .warehouse-dash-card {
    min-height: 118px;
  }

  .warehouse-dash-card b {
    font-size: 34px;
  }

  .warehouse-board-actions input,
  .warehouse-board-actions select,
  .warehouse-board-actions button {
    width: 100%;
  }
}
/* Workforce planning and skills matrix */
.workforce-page { display: grid; gap: 16px; }
.workforce-tabs { overflow-x: auto; }
.workforce-period-toolbar { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.workforce-period-toolbar label { min-width: 160px; }
.workforce-planner-wrap,.workforce-skill-wrap { max-height: 68vh; overflow: auto; }
.workforce-planner-table,.workforce-skill-table { min-width: 1100px; }
.workforce-planner-table th,.workforce-planner-table td,.workforce-skill-table th,.workforce-skill-table td { min-width: 92px; }
.workforce-planner-table .sticky-col,.workforce-skill-table .sticky-col { position: sticky; left: 0; z-index: 2; min-width: 230px; background: var(--surface, #fff); }
.workforce-planner-table thead .sticky-col,.workforce-skill-table thead .sticky-col { z-index: 4; }
.workforce-planner-table small,.workforce-skill-table small { display: block; margin-top: 3px; color: var(--muted, #64748b); }
.workforce-day-cell { text-align: center; }
.shift-chip { display: inline-grid; min-width: 42px; margin: 2px; padding: 5px 7px; border: 0; border-radius: 8px; background: #dbeafe; color: #1e3a8a; font-weight: 800; cursor: pointer; }
.shift-chip.night { background: #ede9fe; color: #5b21b6; }
.shift-chip.warning { outline: 2px solid #f59e0b; }
.shift-chip small { font-size: 9px; color: inherit; }
.workforce-editor-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.workforce-editor-grid form { align-content: start; }
.workforce-editor-grid h2 { grid-column: 1 / -1; margin: 0; }
.workforce-editor-grid select[multiple] { min-height: 180px; }
.workforce-skill-table th { vertical-align: bottom; }
.skill-level { text-align: center; font-weight: 700; }
.skill-level.active { background: #dcfce7; color: #166534; }
.skill-level.expired,.skill-level.suspended { background: #fee2e2; color: #991b1b; }
.skill-level.none { background: #f8fafc; color: #94a3b8; }
.staffing-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; margin-top: 14px; }
.staffing-card { display: grid; gap: 5px; padding: 14px; border: 1px solid #cbd5e1; border-left: 5px solid #f59e0b; border-radius: 10px; background: #fff; }
.staffing-card.complete { border-left-color: #22c55e; }
.staffing-card.critical { border-left-color: #ef4444; }
.staffing-card strong { font-size: 24px; }
.hr-employee-skills { margin: 18px 0; padding: 14px; border: 1px solid #dbe2ea; border-radius: 12px; background: #f8fafc; }
.skill-badge-list { display: flex; gap: 8px; flex-wrap: wrap; }
.skill-badge { display: grid; gap: 2px; padding: 8px 10px; border-radius: 9px; background: #dcfce7; color: #166534; font-size: 12px; }
.skill-badge.suspended,.skill-badge.expired { background: #fee2e2; color: #991b1b; }

@media (max-width: 760px) {
  .workforce-period-toolbar { align-items: stretch; }
  .workforce-period-toolbar > * { flex: 1 1 145px; }
  .workforce-editor-grid { grid-template-columns: 1fr; }
  .workforce-planner-wrap,.workforce-skill-wrap { max-height: none; overflow: visible; }
  .workforce-planner-table,.workforce-skill-table { min-width: 0; display: block; }
  .workforce-planner-table thead,.workforce-skill-table thead { display: none; }
  .workforce-planner-table tbody,.workforce-planner-table tr,.workforce-planner-table td,.workforce-skill-table tbody,.workforce-skill-table tr,.workforce-skill-table td { display: block; width: 100%; }
  .workforce-planner-table tr,.workforce-skill-table tr { margin-bottom: 12px; border: 1px solid #dbe2ea; border-radius: 12px; overflow: hidden; background: #fff; }
  .workforce-planner-table td,.workforce-skill-table td { min-width: 0; border: 0; border-bottom: 1px solid #eef2f7; text-align: left; }
  .workforce-planner-table .sticky-col,.workforce-skill-table .sticky-col { position: static; min-width: 0; background: #f8fafc; }
  .workforce-day-cell { min-height: 42px; }
}
/* Finance cash accounting */
.finance-cash-page{display:grid;gap:18px}.finance-tabs{display:flex;gap:8px;overflow:auto;padding:4px 0}.finance-tabs button{white-space:nowrap;border:1px solid var(--line,#d8dee8);background:#fff;border-radius:12px;padding:10px 16px;font-weight:700}.finance-tabs button.active{background:#183b5b;color:#fff;border-color:#183b5b}.cash-account-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:16px}.cash-account-card{background:linear-gradient(145deg,#183b5b,#245f80);color:#fff;border-radius:18px;padding:20px;box-shadow:0 14px 34px rgba(22,53,78,.18)}.cash-account-card>div{display:flex;justify-content:space-between;gap:12px;opacity:.86}.cash-account-card h2{font-size:17px;margin:16px 0 5px}.cash-account-card>strong{display:block;font-size:28px;margin-bottom:18px}.cash-account-card dl{display:grid;gap:8px;margin:0 0 14px}.cash-account-card dl div{display:flex;justify-content:space-between;gap:12px}.cash-account-card dt{opacity:.75}.cash-account-card dd{margin:0;font-weight:700}.cash-account-card small{opacity:.7}.cash-pay-panel{border:2px solid #2d789c}.cash-summary{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
@media(max-width:720px){.finance-tabs{margin-inline:-4px}.cash-account-grid{grid-template-columns:1fr}.cash-account-card>strong{font-size:24px}.finance-cash-page .data-table,.finance-cash-page .data-table tbody,.finance-cash-page .data-table tr,.finance-cash-page .data-table td{display:block}.finance-cash-page .data-table thead{display:none}.finance-cash-page .data-table tr{border:1px solid var(--line,#d8dee8);border-radius:14px;margin:10px 0;padding:10px}.finance-cash-page .data-table td{border:0;padding:6px}}
/* Shift staff list */
.shift-completeness{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}.shift-completeness>div.complete{border-left:4px solid #2b9a66}.shift-completeness>div.warning{border-left:4px solid #d99028;background:#fff8e8}.shift-completeness small{display:block;margin-top:5px;color:var(--muted,#687386)}.shift-warning-list{border-left:4px solid #d99028}.shift-warning-list p{margin:5px 0}.shift-staff-table td>small,.shift-staff-table td>em{display:block;margin-top:4px}.shift-staff-row-form{display:grid;grid-template-columns:minmax(180px,1.4fr) minmax(140px,1fr) 120px 120px 120px 140px minmax(170px,1fr) auto auto;gap:8px;align-items:center}.shift-staff-row-form label{display:grid;gap:3px}.shift-staff-row-form select,.shift-staff-row-form input{width:100%;min-width:0}.shift-staff-row-form .row-actions{display:flex;gap:5px}.unassigned-row{background:#fff4dd}.skill-warning-row{background:#fff0f0}.shift-staff-mobile{display:none}.shift-replacement-panel{border:2px solid #d88736}.shift-staff-read-row{display:grid;grid-template-columns:repeat(7,minmax(100px,1fr));gap:10px}.shift-machine-card{background:#fff;border:1px solid var(--line,#d9e0e8);border-radius:16px;padding:14px}.shift-worker-card{display:grid;gap:4px;border-top:1px solid var(--line,#d9e0e8);padding:11px 0}.shift-worker-card strong{font-size:15px}.shift-worker-card span,.shift-worker-card small{color:var(--muted,#687386)}.shift-worker-card.unassigned{border-left:4px solid #d99028;padding-left:9px}.shift-worker-card.skill-warning{border-left:4px solid #c94d55;padding-left:9px}.shift-worker-card em{color:#a54b15}
@media(max-width:900px){.shift-staff-desktop{display:none}.shift-staff-mobile{display:grid;gap:12px}.shift-completeness{grid-template-columns:repeat(2,minmax(0,1fr))}.workforce-period-toolbar .segmented{display:none}}

.materials-forecast-cards{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:12px}.materials-forecast-cards article{display:grid;gap:6px;padding:16px;border:1px solid var(--line,#d9e0e8);border-radius:16px;background:#fff}.materials-forecast-cards span{color:var(--muted,#687386);font-size:13px}.materials-forecast-cards b{font-size:25px}.materials-forecast-cards .warning{border-left:5px solid #d99028}.materials-forecast-cards .critical{border-left:5px solid #d9534f}.materials-forecast-cards .danger{border-left:5px solid #821b22;background:#fff6f6}.material-filter-bar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;padding:14px;border:1px solid var(--line,#d9e0e8);border-radius:16px;background:#fff}.material-filter-bar label{display:grid;gap:5px;min-width:150px}.material-filter-bar .checkbox-inline{display:flex;min-width:auto;padding-bottom:8px}.material-status-out_of_stock{background:#fff0f1}.material-status-critical{background:#fff5f5}.material-status-reorder_required{background:#fff9e8}.pill.out_of_stock{background:#821b22;color:#fff}.pill.critical{background:#d9534f;color:#fff}.pill.reorder_required{background:#ffe29c;color:#704600}.pill.normal{background:#dff5e9;color:#146b45}.materials-table small,.material-forecast-page table small{display:block;margin-top:4px;color:var(--muted,#687386)}.material-forecast-mobile{display:none}.material-mobile-card{padding:15px;border:1px solid var(--line,#d9e0e8);border-radius:16px;background:#fff}.material-mobile-card h3{margin:3px 0}.material-mobile-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.material-mobile-stats span{display:grid;gap:3px;padding:9px;border-radius:10px;background:#f4f7fa;color:var(--muted,#687386)}.material-mobile-stats b{color:var(--text,#172033)}.material-troubleshooter>article{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:13px 0;border-top:1px solid var(--line,#d9e0e8)}.material-troubleshooter p{margin:4px 0;color:var(--muted,#687386)}.material-document-lines{display:grid;gap:10px;margin-bottom:15px}.material-document-line{display:grid;grid-template-columns:1.4fr 1fr 1fr 1.4fr auto;gap:9px;align-items:end;padding:12px;border:1px solid var(--line,#d9e0e8);border-radius:13px;background:#f8fafc}.material-document-line.receipt{grid-template-columns:1.4fr repeat(5,1fr) auto}.material-document-line label{display:grid;gap:4px}.material-document-line input,.material-document-line select{width:100%;min-width:0}.warning-text{color:#a54b15;font-weight:700}.tag{display:inline-block;margin:2px;padding:3px 7px;border-radius:999px;background:#eaf2ff;color:#25548a;font-size:11px}.negative{color:#b4232d;font-weight:700}.positive{color:#167549;font-weight:700}
@media(max-width:1100px){.materials-forecast-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.material-document-line,.material-document-line.receipt{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.materials-forecast-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.material-forecast-desktop{display:none}.material-forecast-mobile{display:grid;gap:12px}.material-filter-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.material-filter-bar label{min-width:0}.material-troubleshooter>article{display:grid}.material-document-line,.material-document-line.receipt{grid-template-columns:1fr}.materials-tabs{overflow-x:auto;flex-wrap:nowrap}.materials-tabs button{white-space:nowrap}}

.material-catalog-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0}.segmented-control{display:inline-flex;gap:2px;padding:3px;border:1px solid var(--line,#d9e0e8);border-radius:10px;background:#f4f7fa}.segmented-control button{min-height:36px;padding:7px 12px;border:0;border-radius:7px;background:transparent;color:var(--muted,#687386);font-weight:700}.segmented-control button.active{background:#fff;color:var(--primary,#087dd1);box-shadow:0 1px 4px rgba(20,35,60,.12)}.material-catalog-table td:last-child{width:52px;text-align:right}.material-row-archived{opacity:.72;background:#f7f8fa}.material-select-column{width:42px}.material-row-menu{position:relative;display:inline-block}.material-row-menu summary{display:grid;place-items:center;width:36px;height:36px;border:1px solid var(--line,#d9e0e8);border-radius:9px;background:#fff;cursor:pointer;font-size:22px;font-weight:800;list-style:none}.material-row-menu summary::-webkit-details-marker{display:none}.material-row-menu-popover{position:absolute;z-index:30;right:0;top:40px;display:grid;min-width:190px;padding:6px;border:1px solid var(--line,#d9e0e8);border-radius:11px;background:#fff;box-shadow:0 12px 30px rgba(20,35,60,.18);text-align:left}.material-row-menu-popover button{justify-content:flex-start;width:100%;min-height:38px;padding:8px 10px;border:0;border-radius:7px;background:#fff;color:var(--text,#172033);text-align:left}.material-row-menu-popover button:hover{background:#f1f6fb}.material-row-menu-popover .danger-text{color:#b4232d}.material-row-menu-popover button:disabled{color:#9aa4b2;background:#f7f8fa;cursor:not-allowed}.material-catalog-table input[type=checkbox]{width:20px;height:20px}

@media(max-width:760px){.material-catalog-toolbar{align-items:stretch}.material-catalog-toolbar>.toolbar-actions{width:100%}.material-catalog-toolbar>.toolbar-actions button{flex:1}.segmented-control{width:100%}.segmented-control button{flex:1;padding-inline:7px}.material-catalog-table{min-width:760px}.material-row-menu-popover{position:fixed;right:16px;top:auto;margin-top:4px}}

/* Safe correction of actual production shift reports */
.actual-shift-correction-modal{width:min(1180px,calc(100vw - 28px));max-height:94vh;overflow:auto}.actual-correction-blocks{display:grid;grid-template-columns:1fr 1.55fr 1fr;gap:14px;margin:16px 0}.actual-correction-blocks>section{padding:15px;border:1px solid var(--line,#d9e0e8);border-radius:14px;background:#f8fafc}.actual-correction-blocks h3{margin:0 0 12px}.impact-preview{display:grid;gap:8px}.impact-preview p{margin:0}.correction-reason{padding-top:14px;border-top:1px solid var(--line,#d9e0e8)}.revision-card{display:grid;gap:7px;margin-top:10px;padding:13px;border:1px solid var(--line,#d9e0e8);border-radius:12px;background:#fff}.revision-card>span,.revision-card small{display:block;color:var(--muted,#687386)}.revision-card small{margin-top:4px}.shift-pallet-details button{margin-top:7px}
@media(max-width:900px){.actual-correction-blocks{grid-template-columns:1fr}.actual-shift-correction-modal .settings-form{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.actual-shift-correction-modal{width:100%;max-width:100%;max-height:calc(100vh - 36px);border-radius:12px}.actual-shift-correction-modal .settings-form{grid-template-columns:1fr}.actual-shift-correction-modal .span-2{grid-column:auto}.actual-shift-correction-modal .checkbox-inline{display:flex;align-items:flex-start;min-width:0;overflow-wrap:anywhere}.actual-shift-correction-modal .checkbox-inline input{width:auto;flex:0 0 auto}.shift-report-actions>*{width:100%;text-align:center}}

/* Compact expense entry for the expense operator */
.expense-operator-page{display:grid;gap:16px;max-width:760px;margin:0 auto}.expense-operator-toolbar{align-items:end}.expense-operator-editor{border-top:4px solid var(--primary,#087ccf)}.expense-operator-form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.expense-operator-form>label,.expense-amount-field{display:grid;gap:6px}.expense-operator-form label>span,.expense-amount-field label span,.expense-category-picker legend span{color:#c53535}.expense-amount-field{grid-column:1/-1}.expense-amount-field>div{display:grid;grid-template-columns:1fr auto;align-items:center;border:1px solid var(--line,#d9e0e8);border-radius:12px;background:#fff;overflow:hidden}.expense-amount-field input{border:0!important;border-radius:0!important;min-width:0;font-size:28px;font-weight:800;padding:13px}.expense-amount-field b{padding:0 16px;font-size:23px;color:var(--muted,#687386)}.expense-category-picker{grid-column:1/-1;border:0;padding:0;margin:0}.expense-category-picker legend{margin-bottom:7px;font-weight:700}.expense-category-picker>div{display:flex;gap:8px;flex-wrap:wrap}.expense-category-picker label{position:relative}.expense-category-picker input{position:absolute;opacity:0;pointer-events:none}.expense-category-picker label span{display:block;padding:9px 13px;border:1px solid var(--line,#d9e0e8);border-radius:999px;background:#fff;color:var(--text,#172033);font-weight:700;cursor:pointer}.expense-category-picker input:checked+span{border-color:var(--primary,#087ccf);background:#e8f4ff;color:#075c98;box-shadow:0 0 0 2px rgba(8,124,207,.12)}.expense-attachment-field{grid-column:1/-1;padding:12px;border:1px dashed #aebac8;border-radius:12px;background:#f8fafc}.expense-attachment-field small{color:var(--muted,#687386)}.expense-operator-form-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px}.expense-save-button{min-width:190px;min-height:46px}.expense-recent-panel{padding-bottom:18px}.expense-card-list{display:grid;gap:10px}.expense-entry-card{display:grid;gap:9px;padding:14px;border:1px solid var(--line,#d9e0e8);border-radius:14px;background:#fff}.expense-entry-card-main,.expense-entry-meta,.expense-entry-actions{display:flex;justify-content:space-between;gap:10px;align-items:center}.expense-entry-card-main>div{display:grid;gap:2px}.expense-entry-card-main strong{font-size:22px}.expense-entry-card-main span,.expense-entry-meta{color:var(--muted,#687386);font-size:13px}.expense-entry-card p{margin:0;overflow-wrap:anywhere}.expense-entry-actions{justify-content:flex-end}.expense-entry-actions .button-link,.expense-entry-actions button{padding:7px 10px;font-size:12px}.expense-empty{text-align:center;padding:24px 0}
@media(max-width:600px){.expense-operator-page{margin:0;max-width:none;gap:12px}.expense-operator-toolbar{display:grid;gap:12px}.expense-operator-toolbar>button{width:100%}.expense-operator-editor,.expense-recent-panel{padding:14px;border-radius:14px}.expense-operator-form{grid-template-columns:1fr}.expense-operator-form>*{grid-column:1!important}.expense-category-picker>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.expense-category-picker label span{text-align:center;padding:10px 7px}.expense-operator-form-actions{display:grid;grid-template-columns:1fr}.expense-operator-form-actions button{width:100%}.expense-entry-card-main{align-items:flex-start}.expense-entry-meta{display:grid;gap:3px}.expense-entry-actions{flex-wrap:wrap}}

/* Shift master mobile workspace */
.shift-master-home{display:grid;gap:14px;max-width:860px;margin:0 auto}.shift-master-home>.toolbar{margin-bottom:0}.shift-master-work-actions{display:grid;grid-template-columns:2fr 1fr;gap:10px}.shift-master-work-actions button{min-height:54px}.shift-master-worker-count{font-size:24px;color:var(--color-primary)}.shift-master-department-counts{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.shift-master-department-counts span{padding:7px 10px;border-radius:999px;background:var(--bg-page);color:var(--text-secondary)}.shift-master-workers summary{cursor:pointer;font-weight:800;color:var(--color-primary)}.shift-master-worker-list{display:grid;gap:8px;margin-top:12px}.shift-master-worker-list article{display:flex;justify-content:space-between;gap:12px;padding:11px;border:1px solid var(--border-color);border-radius:12px}.shift-master-worker-list article>div{display:grid;gap:3px}.shift-master-worker-list article>div:last-child{text-align:right}.shift-master-worker-list span{color:var(--text-secondary);font-size:12px}.shift-master-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.shift-master-quick-grid button{display:grid;justify-items:start;gap:5px;min-height:106px;padding:15px;text-align:left}.shift-master-quick-grid svg{width:24px;height:24px}.shift-master-quick-grid span{font-size:12px;opacity:.78}.shift-master-create-button{min-height:52px}.print-station-panel td:last-child .small{margin-top:7px}
.shift-master-workers-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.shift-master-workers .panel-title-row small{display:block;margin-top:4px;color:var(--text-secondary)}
@media(max-width:700px){.shift-master-shell .section-tabs{display:none}.shift-master-shell .app-main{padding-bottom:72px}.shift-master-home{padding-bottom:88px}.shift-master-work-actions{grid-template-columns:1fr}.shift-master-quick-grid{grid-template-columns:1fr}.shift-master-quick-grid button{min-height:82px}.shift-master-worker-list article{align-items:flex-start}.shift-master-home+.mobile-nav~.app-footer{padding-bottom:88px}.shift-master-shell .app-footer{padding-bottom:88px}.employee-work-status-month strong{font-size:14px}.shift-master-workers .panel-title-row{align-items:flex-start}.shift-master-workers-summary{width:100%;justify-content:space-between}}
@media(max-width:420px){.shift-master-worker-list article{display:grid}.shift-master-worker-list article>div:last-child{text-align:left}.shift-master-department-counts{display:grid;grid-template-columns:1fr 1fr}.shift-master-department-counts span{min-width:0;overflow-wrap:anywhere}.settings-form{min-width:0}.settings-form>*{min-width:0}}
.hr-role-suggestion {
  border: 1px solid #93c5fd;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hr-role-suggestion[hidden] { display: none; }
.hr-role-suggestion > div { display: flex; flex-wrap: wrap; gap: 8px; }
.hr-role-suggestion button { margin: 0; }

@media (max-width: 640px) {
  .hr-role-suggestion { align-items: stretch; flex-direction: column; }
  .hr-role-suggestion > div { flex-direction: column; }
  .hr-role-suggestion button { width: 100%; }
}

/* Universal employee cabinet */
.employee-brand {
  min-width: 0;
  height: 48px;
  display: flex;
  align-items: center;
}
.employee-brand img {
  width: 148px;
  height: 48px;
  display: block;
  object-fit: contain;
  object-position: left center;
}
.employee-brand-fallback {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
}
.employee-brand-fallback[hidden] { display: none; }
.employee-cabinet {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
  overflow-x: clip;
}
.employee-cabinet > .toolbar { margin-bottom: 0; }
.employee-cabinet-heading h1 { margin-bottom: 5px; }
.employee-cabinet-heading .employee-name { margin: 0; color: var(--text-primary); font-weight: 750; }
.employee-position { display: block; margin-top: 4px; color: var(--text-secondary); }
.employee-work-status-label { flex-wrap: wrap; }
.employee-work-status-label small { width: 100%; color: var(--text-secondary); font-size: 10px; letter-spacing: .08em; }
.employee-status-refresh {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 7px;
  border-radius: 10px;
}
.employee-status-refresh svg { width: 17px; height: 17px; }
.employee-cabinet-actions { display: grid; gap: 10px; }
.employee-primary-action { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 9px; }
.employee-primary-action svg { width: 20px; height: 20px; }
.employee-action-card {
  width: 100%;
  min-height: 78px;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  align-items: center;
  align-content: center;
  gap: 10px;
  padding: 14px;
}
.employee-action-card > svg:first-child { width: 28px; height: 28px; color: var(--color-primary); }
.employee-action-card > svg:last-child { width: 18px; height: 18px; color: var(--text-secondary); }
.employee-action-card span { display: grid; gap: 3px; color: var(--text-primary); }
.employee-action-card b { font-size: 15px; }
.employee-action-card small { color: var(--text-secondary); }
.employee-workplace-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
  padding: 14px;
}
.employee-workplace-status > span,
.employee-workplace-status > small { color: var(--text-secondary); }
.employee-workplace-status > strong { font-size: 19px; }
.employee-workplace-status > button {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
}
.employee-workplace-status > button svg { width: 19px; height: 19px; }
.compact-confirm-modal { width: min(390px, calc(100vw - 28px)); }
.compact-confirm-modal h2 { margin: 0 0 18px; }

@media (max-width: 900px) {
  .employee-topbar { grid-template-columns: auto minmax(72px, 1fr) auto auto auto; gap: 6px; }
  .employee-topbar .employee-brand { justify-content: center; height: 44px; }
  .employee-topbar .employee-brand img { width: min(116px, 28vw); height: 42px; object-position: center; }
  .employee-topbar .header-icon-button,
  .employee-topbar .lang-switch,
  .employee-topbar .logout-button { min-width: 38px; padding-inline: 7px; }
  .employee-shell .section-tabs { display: none; }
  .employee-shell .app-main { padding-bottom: 78px; }
  .employee-shell .app-footer { padding-bottom: 88px; }
}

@media (max-width: 480px) {
  .employee-cabinet { padding: 14px 12px 92px; gap: 12px; }
  .employee-cabinet .panel.employee-work-status { margin-bottom: 0; }
  .employee-cabinet-heading h1 { font-size: 26px; }
  .employee-topbar { padding-inline: 8px; }
  .employee-topbar .employee-brand img { width: min(92px, 25vw); height: 38px; }
  .employee-topbar .logout-button b { display: none; }
  .employee-work-status-current,
  .employee-work-status-month { padding-inline: 8px; }
  .employee-work-status-current { padding-left: 0; }
  .employee-work-status-month { padding-right: 0; }
  .employee-workplace-status { grid-template-columns: 1fr; }
  .employee-workplace-status > button { grid-column: 1; grid-row: auto; width: 100%; margin-top: 7px; }
}

/* Shift master: mandatory shift reports */
.shift-master-reports-page,
.shift-master-reports-summary { min-width: 0; }
.shift-master-reports-page { display: grid; gap: 14px; }
.shift-report-home-list,
.shift-report-history,
.shift-report-rows { display: grid; gap: 9px; }
.shift-report-home-item,
.shift-report-history > button {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-primary);
  text-align: left;
}
.shift-report-home-item > span,
.shift-report-history > button > span { display: flex; min-width: 0; align-items: center; gap: 9px; }
.shift-report-home-item svg { width: 20px; color: var(--color-primary); }
.shift-report-history > button > span { align-items: flex-start; flex-direction: column; gap: 3px; }
.shift-report-history small { color: var(--text-secondary); }
.shift-report-home-item > svg { width: 18px; color: var(--text-secondary); }
.shift-report-home-item .pill,
.shift-report-history .pill { white-space: normal; text-align: center; }
.report-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.report-tabs button { min-height: 44px; border: 1px solid var(--border-color); background: var(--surface); color: var(--text-secondary); }
.report-tabs button.active { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.shift-report-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.shift-report-meta > div { display: grid; gap: 4px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-muted); }
.shift-report-meta span { color: var(--text-secondary); font-size: 12px; }
.shift-report-detail-row { border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; }
.shift-report-detail-row.attention { border-color: var(--color-warning); }
.shift-report-detail-row summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; cursor: pointer; }
.shift-report-detail-row summary > span { display: grid; gap: 3px; min-width: 0; }
.shift-report-detail-row summary small { color: var(--text-secondary); overflow-wrap: anywhere; }
.shift-report-detail-row summary strong { white-space: nowrap; }
.shift-report-detail-row summary strong:has(> span) { display: grid; gap: 2px; text-align: right; }
.shift-report-detail-row summary strong > span:first-child { color: var(--text-secondary); font-size: 12px; font-weight: 650; }
.shift-report-trace,
.shift-report-worker-fact { display: grid; gap: 8px; padding: 0 12px 12px; }
.shift-report-trace article,
.shift-report-worker-fact article { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 9px; background: var(--surface-muted); border-radius: var(--radius-sm); font-size: 12px; }
.shift-report-worker-fact > div:not(.notice) { display: inline-grid; gap: 3px; margin-right: 18px; }
.shift-report-worker-fact > div > span { color: var(--text-secondary); font-size: 12px; }
.shift-report-comment { display: grid; gap: 7px; margin-top: 14px; font-weight: 700; }
.shift-report-comment textarea { width: 100%; resize: vertical; }
.shift-report-confirmation { color: var(--text-secondary); font-size: 13px; }
.shift-report-admin-filters { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; gap: 9px; align-items: end; margin: 12px 0 16px; }
.shift-report-admin-filters label { display: grid; gap: 5px; color: var(--text-secondary); font-size: 12px; }
.shift-report-admin-filters input,
.shift-report-admin-filters select { width: 100%; min-width: 0; }
.shift-master-report-detail .toolbar-actions { margin-top: 12px; flex-wrap: wrap; }
.shift-reports-required-statuses { display: grid; gap: 9px; margin: 14px 0 18px; }
.shift-reports-required-statuses > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

@media (max-width: 700px) {
  .shift-master-reports-page { padding: 12px 10px 92px; overflow-x: clip; }
  .shift-report-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shift-report-home-item { grid-template-columns: minmax(0, 1fr) auto; }
  .shift-report-home-item > svg { display: none; }
  .shift-report-trace article,
  .shift-report-worker-fact article { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shift-master-report-detail .toolbar-actions > * { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .shift-report-admin-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shift-report-admin-filters > button { grid-column: 1 / -1; }
}

@media (max-width: 390px) {
  .shift-report-home-item { grid-template-columns: 1fr; align-items: start; }
  .shift-report-home-item .pill { justify-self: start; }
  .shift-report-meta { grid-template-columns: 1fr; }
  .shift-report-detail-row summary { grid-template-columns: 1fr; }
  .shift-report-detail-row summary strong { white-space: normal; }
  .shift-reports-required-statuses > div { align-items: flex-start; flex-direction: column; }
}
/* Production Supervisor: isolated, read-only stock cabinet */
.production-supervisor-shell {
  min-height: 100vh;
  background: var(--background, #f5f7fb);
  color: var(--text, #14213d);
}

.supervisor-topbar {
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border-bottom: 1px solid var(--line, #dfe5ee);
  position: sticky;
  top: 0;
  z-index: 20;
}

.supervisor-brand { display: grid; gap: 2px; }
.supervisor-brand b { color: #0a2b5c; font-size: 20px; }
.supervisor-brand span { color: var(--muted, #64748b); font-size: 13px; }
.supervisor-topbar-actions { display: flex; align-items: center; gap: 12px; }
.supervisor-topbar-actions .lang-switch { flex-wrap: nowrap; }

.supervisor-stock-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.supervisor-stock-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.supervisor-stock-heading h1 { margin: 0 0 2px; }
.supervisor-stock-heading p { margin: 0; color: var(--muted, #64748b); }
.supervisor-heading-actions { display: flex; align-items: center; gap: 10px; }
.supervisor-heading-actions > button { min-height: 36px; padding: 6px 10px; }
.supervisor-updated { display: grid; grid-template-columns: auto auto; column-gap: 7px; align-items: baseline; color: var(--muted, #64748b); font-size: 12px; line-height: 1.2; }
.supervisor-updated span { grid-column: 1 / -1; }
.supervisor-updated b, .supervisor-updated strong { color: #334155; font-size: 12px; }

.supervisor-stock-search {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line, #dfe5ee);
  border-radius: 12px;
  margin-bottom: 8px;
}
.supervisor-stock-search input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; }
.supervisor-filter-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-bottom: 10px; }
.supervisor-filter-row > label:first-child { display: grid; gap: 3px; color: var(--muted, #64748b); font-size: 11px; }
.supervisor-filter-row select { min-height: 40px; padding: 7px 32px 7px 10px; border: 1px solid var(--line, #dfe5ee); border-radius: 10px; background: #fff; color: inherit; font: inherit; }
.supervisor-zero-toggle { min-height: 40px; display: flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line, #dfe5ee); border-radius: 10px; background: #fff; font-size: 12px; }
.supervisor-zero-toggle input { width: 17px; height: 17px; margin: 0; }

.supervisor-stock-sections {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.supervisor-stock-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  text-align: left;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line, #dfe5ee);
  border-radius: 12px;
}
.supervisor-stock-card > span { font-size: 20px; }
.supervisor-stock-card > b { line-height: 1.15; }
.supervisor-stock-card > strong { font-size: 21px; color: #0a2b5c; }
.supervisor-stock-card.active { border-color: #0b7ce6; box-shadow: 0 0 0 2px rgba(11,124,230,.12); }

.supervisor-stock-list { padding: 12px; }
.supervisor-stock-list .panel-title-row { margin-bottom: 8px; }
.supervisor-stock-list .panel-title-row > span { color: var(--muted, #64748b); font-size: 13px; }
.supervisor-stock-list th, .supervisor-stock-list td { vertical-align: middle; }
.supervisor-stock-status { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-weight: 700; }
.supervisor-stock-status.normal { color: #15803d; }
.supervisor-stock-status.warning { color: #b45309; }
.supervisor-stock-status.critical { color: #b91c1c; }
.supervisor-sku-list { display: none; }
.supervisor-show-more { width: 100%; min-height: 40px; margin-top: 8px; }

@media (max-width: 760px) {
  .supervisor-topbar { align-items: flex-start; flex-direction: column; }
  .supervisor-topbar-actions { width: 100%; justify-content: space-between; }
  .supervisor-topbar-actions .lang-switch span { display: none; }
  .supervisor-stock-page { width: min(100% - 16px, 1180px); padding-top: 10px; }
  .supervisor-stock-heading { align-items: center; }
  .supervisor-stock-heading h1 { font-size: 22px; }
  .supervisor-stock-heading p { display: none; }
  .supervisor-stock-heading .secondary { min-width: 40px; }
  .supervisor-stock-heading .secondary span { display: none; }
  .supervisor-stock-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supervisor-stock-card { min-height: 66px; grid-template-columns: auto minmax(0, 1fr) auto; padding: 8px 9px; }
  .supervisor-stock-card > b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
  .supervisor-stock-card > strong { font-size: 19px; }
  .supervisor-stock-list { padding: 10px; }
  .supervisor-stock-table { display: none; }
  .supervisor-sku-list { display: grid; gap: 6px; }
  .supervisor-sku-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 60px; padding: 8px 10px; border: 1px solid var(--line, #dfe5ee); border-radius: 10px; background: #fff; }
  .supervisor-sku-card > div:first-child { min-width: 0; display: grid; gap: 2px; }
  .supervisor-sku-card b { font-size: 15px; color: #0a2b5c; }
  .supervisor-sku-card span { overflow: hidden; color: var(--muted, #64748b); font-size: 12px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .supervisor-sku-card-meta { display: grid; justify-items: end; gap: 3px; text-align: right; }
  .supervisor-sku-card-meta strong { white-space: nowrap; font-size: 13px; }
  .supervisor-sku-card-meta .supervisor-stock-status { font-size: 11px; }
}

@media (max-width: 420px) {
  .supervisor-filter-row { grid-template-columns: 1fr; }
  .supervisor-zero-toggle { min-height: 36px; }
  .supervisor-stock-card > span { font-size: 18px; }
  .supervisor-stock-card > b { font-size: 11px; }
  .supervisor-stock-card > strong { font-size: 18px; }
}
.live-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.live-search > input[type="search"] {
  width: 100%;
  padding-right: 2.5rem;
}

.live-search-clear {
  position: absolute;
  right: .45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  min-width: 1.8rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
}

.live-search-clear:focus-visible {
  outline: 2px solid var(--primary, #1677ff);
  outline-offset: 1px;
}

/* Production Supervisor: terminal-density mobile layout */
.supervisor-topbar {
  min-height: 52px;
  padding: 6px clamp(8px, 3vw, 24px);
  gap: 8px;
}
.supervisor-menu-button { width: 38px; min-width: 38px; height: 38px; padding: 7px; }
.supervisor-brand { margin-right: auto; }
.supervisor-brand b { font-size: 18px; white-space: nowrap; }
.supervisor-topbar-actions { gap: 6px; }
.supervisor-topbar-actions .lang-switch { gap: 3px; }
.supervisor-topbar-actions .lang-switch button { min-height: 34px; padding: 4px 7px; }
.supervisor-top-refresh { min-height: 36px; padding: 5px 8px; }
.supervisor-stock-page { padding-top: 6px; }
.supervisor-updated-line { display: flex; align-items: center; gap: 5px; min-height: 22px; margin-bottom: 5px; color: var(--muted, #64748b); font-size: 11px; }
.supervisor-updated-line em { display: inline-flex; align-items: center; gap: 3px; margin-right: auto; color: #0a2b5c; font-style: normal; font-weight: 750; }
.supervisor-updated-line em svg { width: 14px; height: 14px; }
.supervisor-updated-line b, .supervisor-updated-line strong { color: #334155; font-size: 11px; }
.supervisor-stock-search { min-height: 40px; margin-bottom: 6px; }
.supervisor-filter-segments { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; margin-bottom: 6px; padding: 3px; border-radius: 10px; background: #e9eef5; }
.supervisor-filter-segments button { min-width: 0; min-height: 32px; padding: 4px 3px; overflow: hidden; border: 0; border-radius: 8px; background: transparent; color: #475569; font-size: 11px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.supervisor-filter-segments button.active { background: #fff; color: #075fae; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.supervisor-list-options { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.supervisor-switch { display: inline-flex; min-width: 0; align-items: center; gap: 6px; font-size: 11px; }
.supervisor-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.supervisor-switch > span { position: relative; width: 32px; min-width: 32px; height: 18px; border-radius: 10px; background: #cbd5e1; transition: background .15s ease; }
.supervisor-switch > span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.25); transition: transform .15s ease; }
.supervisor-switch input:checked + span { background: #0b7ce6; }
.supervisor-switch input:checked + span::after { transform: translateX(14px); }
.supervisor-switch input:focus-visible + span { outline: 2px solid #0b7ce6; outline-offset: 2px; }
.supervisor-switch b { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.supervisor-view-switch { display: inline-flex; flex-shrink: 0; gap: 2px; padding: 2px; border-radius: 8px; background: #e9eef5; }
.supervisor-view-switch button { min-height: 26px; padding: 3px 7px; border: 0; border-radius: 6px; background: transparent; color: #64748b; font-size: 10px; }
.supervisor-view-switch button.active { background: #fff; color: #075fae; box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.supervisor-stock-sections { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
.supervisor-stock-card { min-height: 62px; grid-template-columns: 1fr; justify-items: center; gap: 1px; padding: 5px 2px; text-align: center; }
.supervisor-stock-card > span { font-size: 16px; line-height: 1; }
.supervisor-stock-card > strong { order: 2; font-size: 18px; line-height: 1; }
.supervisor-stock-card > b { order: 3; max-width: 100%; overflow: hidden; font-size: 9px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.supervisor-stock-list { padding: 6px 8px; }
.supervisor-stock-list .panel-title-row { min-height: 22px; margin-bottom: 3px; }
.supervisor-stock-list .panel-title-row h2 { margin: 0; font-size: 14px; }
.supervisor-sku-list { gap: 2px; }
.supervisor-sku-list.card-mode { display: grid; }
.supervisor-sku-list.compact-mode { display: grid; }
.supervisor-sku-list.compact-mode .supervisor-sku-card { display: none; }
.supervisor-compact-row { width: 100%; min-height: 34px; display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; align-items: center; gap: 6px; padding: 4px 5px; border: 0; border-bottom: 1px solid #e7ebf1; border-radius: 0; background: transparent; color: inherit; text-align: left; }
.supervisor-compact-row:active, .supervisor-compact-row.expanded { background: #f0f7ff; }
.supervisor-compact-code { overflow: hidden; font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.supervisor-compact-row > strong { font-size: 13px; white-space: nowrap; }
.supervisor-compact-status { font-size: 12px; text-align: center; }
.supervisor-compact-detail { grid-column: 1 / -1; overflow: hidden; padding: 2px 0 3px; color: #475569; font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.supervisor-sku-card { min-height: 48px; padding: 5px 7px; }
.supervisor-sku-card-meta { gap: 1px; }
.supervisor-side-menu { position: fixed; z-index: 1002; top: 0; left: 0; bottom: 0; width: min(280px, 82vw); display: grid; align-content: start; gap: 14px; padding: 18px; background: #fff; box-shadow: 12px 0 32px rgba(15,23,42,.22); transform: translateX(-105%); transition: transform .18s ease; }
.supervisor-side-menu.open { transform: translateX(0); }
.supervisor-side-menu > div { display: flex; align-items: center; justify-content: space-between; }
.supervisor-side-menu > span { color: #64748b; font-size: 13px; }
.supervisor-side-menu .danger { margin-top: 12px; }
.supervisor-menu-backdrop { position: fixed; z-index: 1001; inset: 0; border: 0; background: rgba(15,23,42,.38); }

@media (max-width: 760px) {
  .supervisor-topbar { flex-direction: row; align-items: center; }
  .supervisor-topbar-actions { width: auto; justify-content: flex-end; }
  .supervisor-topbar-actions .lang-switch span { display: inline; }
  .supervisor-top-refresh span { display: none; }
  .supervisor-stock-page { width: min(100% - 10px, 1180px); padding-top: 4px; }
  .supervisor-stock-card { min-height: 58px; grid-template-columns: 1fr; }
  .supervisor-stock-card > strong { grid-column: auto; }
  .supervisor-stock-list { padding: 5px; }
  .supervisor-sku-card { min-height: 46px; }
}

@media (max-width: 380px) {
  .supervisor-brand b { font-size: 15px; }
  .supervisor-topbar-actions .lang-switch button { padding-inline: 5px; font-size: 10px; }
  .supervisor-filter-segments button { font-size: 10px; }
  .supervisor-switch b { max-width: 142px; }
}
.box-inventory-start form{display:grid;gap:14px}.box-inventory-search{display:block;max-width:520px}.box-inventory-search input{width:100%;height:44px}.box-inventory-select-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px;max-height:360px;overflow:auto}.box-inventory-select-list label{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--line,#d7dde5);border-radius:10px}.box-inventory-select-list label>span:first-of-type{display:grid}.box-inventory-select-list label>span:last-child{margin-left:auto}.box-inventory-select-list small{color:#b45309}.box-inventory-row{display:grid;grid-template-columns:minmax(150px,1.3fr) repeat(3,minmax(100px,.7fr)) minmax(150px,1fr) minmax(160px,1fr);gap:10px;align-items:end;padding:12px 0;border-bottom:1px solid var(--line,#d7dde5)}.box-inventory-row>div:first-child{display:grid}.box-inventory-row label{margin:0}.box-inventory-row strong{display:block;font-size:17px}.box-inventory-row input,.box-inventory-row select{width:100%;min-height:42px}.box-inventory-row .positive{color:#07883e}.box-inventory-row .negative{color:#c62828}.box-inventory-review{position:sticky;bottom:10px;z-index:4;box-shadow:0 12px 35px rgba(15,23,42,.16)}
.box-inventory-source-summary{margin:0;font-weight:700}.box-inventory-source-row{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line,#d7dde5);border-radius:10px;background:var(--surface,#fff)}.box-inventory-source-row>span{display:grid;gap:2px}.box-inventory-source-row>span:last-child{margin-left:auto;text-align:right}.box-inventory-source-row small{color:var(--muted,#667085)}.box-inventory-source-row .warning-text{color:#b45309}.box-inventory-begin{width:100%;min-height:48px;font-weight:800}
@media(max-width:720px){.box-inventory-row{grid-template-columns:1fr 1fr;padding:10px;border:1px solid var(--line,#d7dde5);border-radius:12px;margin:8px 0}.box-inventory-row>div:first-child{grid-column:1/-1}.box-inventory-row label{min-width:0}.box-inventory-row input,.box-inventory-row select{font-size:16px}.box-inventory-row .span-2{grid-column:1/-1}.box-inventory-review{position:static}.box-inventory-review .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.box-inventory-select-list{grid-template-columns:1fr}.box-inventory-begin{position:sticky;bottom:8px;z-index:5;box-shadow:0 8px 24px rgba(15,23,42,.24)}}
/* Warehouse operator mobile receiving */
.warehouse-operator-page{max-width:620px;margin:0 auto;padding-bottom:92px}
.warehouse-operator-heading{margin-bottom:10px}
.warehouse-operator-actions{display:grid;gap:10px}
.warehouse-scan-button{min-height:58px;font-size:16px;letter-spacing:.02em}
.warehouse-transfer-current,.warehouse-transfer-empty{margin:0;padding:14px}
.warehouse-transfer-route{display:flex;align-items:center;justify-content:center;gap:10px;margin:10px 0;padding:9px;border-radius:10px;background:var(--surface-soft,#f4f7fb)}
.warehouse-transfer-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0}
.warehouse-transfer-totals>div{min-width:0;padding:9px;border:1px solid var(--border,#dfe5ec);border-radius:10px;text-align:center}
.warehouse-transfer-totals span{display:block;font-size:11px;color:var(--muted,#667085)}
.warehouse-transfer-totals b{display:block;font-size:20px;line-height:1.15;margin-top:2px}
.warehouse-transfer-last{display:grid;gap:2px;padding:10px;border-radius:10px;background:#eef8f2;border:1px solid #b8e0c6}
.warehouse-transfer-last small{color:#397151}.warehouse-transfer-last b{font-size:18px}.warehouse-transfer-last span{font-size:13px}
.warehouse-transfer-lines{display:grid;gap:6px;margin-top:10px;max-height:290px;overflow:auto}
.warehouse-transfer-line{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-top:1px solid var(--border,#e3e7ed)}
.warehouse-transfer-line span{display:grid;min-width:0}.warehouse-transfer-line small{color:var(--muted,#667085)}
.warehouse-transfer-line button{flex:0 0 auto;min-height:36px;padding:6px 9px}
.warehouse-complete-button{min-height:54px}
.warehouse-transfer-today-list{display:grid;gap:8px}
.warehouse-transfer-today-card{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left;color:inherit}
.warehouse-transfer-today-card>span{display:grid;gap:3px}.warehouse-transfer-today-card small{color:var(--muted,#667085)}
.warehouse-transfer-confirm-no{display:block;font-size:22px;text-align:center;margin:8px 0 14px}
.warehouse-transfer-notice{z-index:10000}
.warehouse-back{margin-bottom:8px}
@media(max-width:520px){
  .warehouse-operator-page{padding-left:8px;padding-right:8px}
  .warehouse-operator-page .employee-work-status{margin-bottom:10px}
  .warehouse-transfer-current,.warehouse-transfer-empty{padding:12px}
  .warehouse-transfer-totals{gap:6px}.warehouse-transfer-totals>div{padding:8px 4px}
  .warehouse-transfer-route{font-size:13px;gap:7px}
  .warehouse-transfer-today-card{padding:12px}
}
/* Unified production equipment tasks */
.unified-task-search{margin-bottom:10px}.unified-task-search input{width:100%;min-height:42px}
.unified-task-create .panel-title-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:8px}.unified-task-create .panel-title-row>button{width:40px;min-width:40px;min-height:40px;padding:0}
.task-progress{height:8px;background:#e8edf3;border-radius:999px;overflow:hidden;margin:10px 0 7px}.task-progress i{display:block;height:100%;background:#1683e5;border-radius:inherit}.unified-task-card.completed .task-progress i{background:#20a464}.task-progress-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;font-size:12px}.task-progress-values span{display:flex;flex-direction:column;color:var(--muted,#667085)}.task-progress-values b{font-size:15px;color:var(--text,#101828)}.task-progress-values .task-overrun b{color:#c2410c}
@media(max-width:430px){.unified-tasks-page .toolbar{gap:8px}.unified-tasks-page .summary-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.unified-tasks-page .summary-grid>div{padding:9px}.unified-task-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.unified-task-grid{grid-template-columns:1fr}.unified-task-card{padding:12px}.task-progress-values{grid-template-columns:repeat(2,minmax(0,1fr))}}
.form-warning{display:grid;gap:4px;margin:10px 0;padding:10px;border:1px solid #f3c078;border-radius:10px;background:#fff7e8;color:#8a4b00;font-weight:700}.form-warning p{margin:0}

/* Production and mixer task operations board */
.task-operations-page{max-width:1240px;gap:12px}.task-page-heading{margin-bottom:0}.task-process-group{overflow:hidden;border:1px solid var(--line,#dbe3ee);border-radius:16px;background:var(--surface,#fff);box-shadow:0 2px 10px rgba(16,24,40,.04)}.task-group-heading{display:flex;width:100%;min-height:64px;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border:0;background:#fff;color:var(--text,#101828);text-align:left;cursor:pointer}.task-group-heading:hover{background:#f8fafc}.task-group-heading>span{display:flex;align-items:center;gap:9px;min-width:0}.task-group-heading svg{width:19px;height:19px;flex:0 0 auto}.task-group-heading b{font-size:18px}.task-group-heading em{padding:4px 9px;border-radius:999px;background:#eaf4ff;color:#1668a8;font-size:12px;font-style:normal;white-space:nowrap}.task-group-heading small{max-width:360px;color:var(--muted,#667085);font-size:12px}.production-process-group{border-top:4px solid #1683e5}.mixer-process-group{border-top:4px solid #6e7f91}.task-group-body{display:grid;gap:12px;padding:0 14px 14px}.production-ops-toolbar{display:flex;align-items:end;justify-content:space-between;gap:10px;padding-top:2px}.production-ops-toolbar label{display:grid;gap:4px;min-width:180px;font-size:12px;color:var(--muted,#667085)}.production-ops-toolbar select{min-height:40px}.production-ops-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.production-ops-card{display:grid;gap:9px;min-width:0;padding:13px;border:1px solid var(--line,#dbe3ee);border-radius:13px;background:#fff}.production-ops-card.has-task{border-left:4px solid #1683e5}.production-ops-card.no-task{background:#f8fafc;border-style:dashed}.production-ops-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.production-ops-head>div{display:grid;min-width:0}.production-ops-head b{font-size:22px;line-height:1.08;letter-spacing:-.02em}.production-ops-head span:not(.task-status-indicator){margin-top:3px;color:var(--muted,#667085);font-size:12px;overflow-wrap:anywhere}.task-status-indicator{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;font-size:12px;font-weight:700;white-space:nowrap}.task-status-indicator i{width:8px;height:8px;border-radius:50%;background:#98a2b3}.task-status-indicator.active{color:#137a4a}.task-status-indicator.active i{background:#20a464}.task-status-indicator.empty{color:#667085}.production-ops-sku{display:grid;min-width:0}.production-ops-sku strong{font-size:19px;overflow-wrap:anywhere}.production-ops-sku span{color:var(--muted,#667085);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.production-ops-facts{display:grid;grid-template-columns:1fr 1fr;gap:7px}.production-ops-facts span{display:grid;gap:1px;padding:7px 8px;border-radius:9px;background:#f3f6f9;color:var(--muted,#667085);font-size:11px}.production-ops-facts b{color:var(--text,#101828);font-size:16px}.production-ops-meta{display:flex;justify-content:space-between;gap:8px;color:var(--muted,#667085);font-size:11px}.production-ops-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.production-ops-actions button{min-height:40px;padding:8px 10px}.production-ops-actions .primary{flex:1}.production-ops-empty{display:grid;min-height:72px;place-items:center;color:var(--muted,#667085);font-size:13px;text-align:center}.mixer-ops-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.mixer-ops-card{display:grid;gap:9px;min-width:0;padding:13px;border:1px solid var(--line,#dbe3ee);border-left:4px solid #64748b;border-radius:13px;background:#fff}.mixer-ops-card.completed{border-left-color:#20a464}.mixer-ops-card.canceled{border-left-color:#c84b55;opacity:.82}.mixer-ops-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.mixer-ops-head>div,.mixer-ops-material{display:grid;min-width:0}.mixer-ops-head b{font-size:18px}.mixer-ops-head small,.mixer-ops-material span{color:var(--muted,#667085)}.mixer-ops-material strong{font-size:17px;overflow-wrap:anywhere}.mixer-ops-material>b{margin-top:5px;font-size:18px}.task-history-button{justify-self:start}.task-history-panel{display:grid;gap:9px;padding-top:10px;border-top:1px solid var(--line,#dbe3ee)}.task-history-panel h3{margin:0}.task-history-list{display:grid;gap:7px}.task-history-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--line,#dbe3ee);border-radius:10px;background:#f8fafc}.task-history-row>div{display:flex;align-items:center;gap:10px;min-width:0}.task-history-row span:not(.pill){color:var(--muted,#667085);font-size:12px}
@media(max-width:1100px){.production-ops-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.mixer-ops-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.task-operations-page{padding-inline:8px;gap:9px}.task-page-heading{align-items:flex-start}.task-page-heading .primary{min-height:42px;padding-inline:10px}.task-group-heading{min-height:58px;padding:11px 12px}.task-group-heading b{font-size:16px}.task-group-heading small{display:none}.task-group-body{padding:0 9px 9px}.production-ops-toolbar{align-items:stretch}.production-ops-toolbar label{min-width:0;flex:1}.production-ops-grid,.mixer-ops-grid{grid-template-columns:1fr}.production-ops-card,.mixer-ops-card{padding:11px;gap:7px}.production-ops-head b{font-size:21px}.production-ops-actions{display:grid;grid-template-columns:minmax(0,1fr) auto auto}.production-ops-actions button{min-height:42px}.task-history-row>div{display:grid;gap:2px}.task-history-row{align-items:flex-start}}
@media(max-width:430px){.task-group-heading>span{gap:6px}.task-group-heading em{padding:3px 7px}.production-ops-card{min-height:0}.production-ops-facts{gap:5px}.production-ops-actions{grid-template-columns:1fr 1fr}.production-ops-actions .primary{grid-column:1/-1}.production-ops-actions .ghost{padding-inline:7px}.mixer-ops-card{min-height:0}}
/* production-box searchable multi-select v160 */
.production-box-sku-picker{display:grid;gap:8px}.production-box-sku-picker>input{width:100%}.production-box-sku-options{display:grid;gap:4px;max-height:260px;overflow:auto;border:1px solid var(--border,#d8dee9);border-radius:10px;padding:6px;background:var(--surface,#fff)}.production-box-sku-options label{display:flex;align-items:center;gap:10px;min-height:44px;padding:7px 9px;border-radius:8px;cursor:pointer}.production-box-sku-options label:hover{background:rgba(0,156,255,.08)}.production-box-sku-options input{width:20px;height:20px;flex:0 0 auto}.production-box-sku-options span{display:grid;min-width:0}.production-box-sku-options small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.production-box-selected{display:grid;gap:6px}.production-box-selected>div{display:flex;flex-wrap:wrap;gap:6px}.production-box-selected span{display:inline-flex;max-width:100%;padding:5px 9px;border-radius:999px;background:rgba(0,156,255,.12);color:var(--text,#172033);font-weight:700;overflow-wrap:anywhere}@media(max-width:430px){.production-box-sku-options{max-height:220px}.production-box-selected span{font-size:12px}.production-box-card .settings-form{grid-template-columns:1fr}}
/* v162 product family pilot */
.family-card .family-metrics b { font-size: 14px; line-height: 1.2; }
.family-card .product-actions .full { width: 100%; min-height: 44px; }
.family-modal .variant-selector { display: flex; flex-wrap: wrap; gap: 10px; margin: 2px 0 12px; }
.family-modal .variant-option { min-height: 48px; min-width: 112px; display: grid; gap: 2px; justify-items: start; padding: 9px 12px; border: 1px solid #CBD5CE; border-radius: 12px; background: #FFFFFF; color: #17211B; }
.family-modal .variant-option span { font-weight: 700; }
.family-modal .variant-option small { color: #667269; font-size: 12px; }
.family-modal .variant-option.active { border-color: #176B43; box-shadow: 0 0 0 2px rgba(23,107,67,.16); background: #F0F8F3; }
.family-modal .variant-option.unavailable { color: #7B8580; background: #F3F5F4; border-style: dashed; }
.family-modal .variant-option.unavailable small { color: #A0443B; }
.family-modal .selected-variant-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #F3F7F4; }
.family-modal .selected-variant-summary strong { text-align: right; }
@media (max-width: 600px) {
  .family-modal { max-height: calc(100dvh - 18px); overflow-y: auto; overscroll-behavior: contain; }
  .family-modal .variant-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .family-modal .variant-option { min-width: 0; width: 100%; }
  .family-modal .modal-add-button { position: sticky; bottom: 0; z-index: 2; min-height: 48px; }
}
@media (max-width: 340px) {
  .family-modal .variant-selector { grid-template-columns: 1fr; }
}
/* v163 client UI — Supervisor-proportion alignment (client scope only) */
.client-shell {
  --client-page-max: 1180px;
  --client-radius-sm: 8px;
  --client-radius-md: 10px;
  --client-card-padding: 12px;
  --client-section-gap: 12px;
  --client-control-height: 44px;
  --client-icon-sm: 16px;
  --client-icon-md: 20px;
  --client-text-xs: 11px;
  --client-text-sm: 12px;
  --client-text-md: 14px;
  --client-title: 26px;
  --client-border: #e1e7ee;
  --client-soft: #f5f8fb;
  --client-accent: #0b7ce6;
  --client-ink: #172033;
  --client-muted: #667085;
}

.client-shell .client-page {
  width: min(var(--client-page-max), 100%);
  padding: 18px 20px 28px;
}
.client-shell .client-page-header {
  align-items: center;
  gap: 10px;
  margin-bottom: var(--client-section-gap);
}
.client-shell .client-page-header h1 {
  margin: 0 0 2px;
  color: var(--client-ink);
  font-size: var(--client-title);
  line-height: 1.12;
  letter-spacing: -.015em;
}
.client-shell .client-page-header p {
  margin: 0;
  font-size: var(--client-text-sm);
  line-height: 1.3;
}
.client-shell .client-catalog-cta {
  min-height: 40px;
  padding: 7px 12px;
}
.client-shell .panel,
.client-shell .product-card,
.client-shell .cart-row,
.client-shell .checkout {
  border-color: var(--client-border);
  border-radius: var(--client-radius-md);
  box-shadow: 0 2px 10px rgba(16, 24, 40, .04);
}
.client-shell .panel {
  padding: var(--client-card-padding);
}
.client-shell .panel h2 {
  margin-bottom: 9px;
  font-size: 17px;
  line-height: 1.2;
}
.client-shell .client-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--client-section-gap);
}
.client-shell .client-dashboard-grid > .panel {
  min-width: 0;
}
.client-shell .client-dashboard-grid > .panel > .catalog-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.client-shell .catalog-toolbar {
  margin-bottom: 8px;
}
.client-shell .warehouse-pill {
  min-width: 170px;
}
.client-shell .warehouse-pill select,
.client-shell .search-wrap input {
  min-height: var(--client-control-height);
}
.client-shell .catalog-search {
  margin-bottom: 7px;
}
.client-shell .catalog-filters {
  top: 70px;
  gap: 7px;
  margin-bottom: 10px;
  padding: 5px 0 8px;
  background: rgba(248, 250, 252, .97);
  border-bottom-color: var(--client-border);
  backdrop-filter: blur(8px);
}
.client-shell .catalog-filters .chips {
  gap: 5px;
  padding-bottom: 0;
}
.client-shell .catalog-filters .chips button {
  min-height: 36px;
  padding: 5px 9px;
  border-radius: var(--client-radius-sm);
  font-size: var(--client-text-sm);
  font-weight: 700;
}
.client-shell .catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}
.client-shell .product-card {
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
}
.client-shell .product-card:hover {
  border-color: #c6d5e5;
  box-shadow: 0 3px 12px rgba(16, 24, 40, .07);
  transform: none;
}
.client-shell .product-card img {
  height: 128px;
  padding: 9px 10px 3px;
  background: #fff;
  object-fit: contain;
}
.client-shell .product-body {
  min-width: 0;
  padding: 10px var(--client-card-padding) 8px;
}
.client-shell .product-head {
  align-items: flex-start;
  gap: 6px;
}
.client-shell .product-sku {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.15;
}
.client-shell .pill {
  min-height: 24px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: var(--client-text-xs);
  line-height: 1.05;
}
.client-shell .product-card h3 {
  min-height: 2.35em;
  margin: 7px 0 5px;
  color: var(--client-ink);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.17;
}
.client-shell .product-meta-line {
  min-height: 2.45em;
  margin: 0 0 7px;
  font-size: var(--client-text-sm);
  font-weight: 500;
  line-height: 1.22;
}
.client-shell .product-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 7px;
}
.client-shell .product-metrics div {
  min-width: 0;
  padding: 6px 7px;
  border-color: #e0e7ee;
  border-radius: var(--client-radius-sm);
  background: var(--client-soft);
}
.client-shell .product-metrics span {
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 650;
}
.client-shell .product-metrics b,
.client-shell .family-card .family-metrics b {
  overflow-wrap: anywhere;
  font-size: var(--client-text-sm);
  line-height: 1.2;
}
.client-shell .product-card dl {
  display: none;
}
.client-shell .product-card .warning-text,
.client-shell .product-card .muted {
  min-height: 2.4em;
  margin: 4px 0 0;
  font-size: var(--client-text-xs);
  line-height: 1.2;
}
.client-shell .product-actions {
  gap: 6px;
  padding: 0 var(--client-card-padding) var(--client-card-padding);
}
.client-shell .product-actions button,
.client-shell .family-card .product-actions .full {
  min-height: var(--client-control-height);
  padding: 7px 9px;
  font-size: 13px;
}
.client-shell .add-button i {
  width: 20px;
  height: 20px;
  border-width: 1.5px;
  border-radius: 5px;
}
.client-shell .empty,
.client-shell .empty-state {
  min-height: 88px;
  display: grid;
  place-items: center;
  padding: 14px;
  color: var(--client-muted);
  font-size: 13px;
  text-align: center;
}
.client-shell .modal-backdrop {
  padding: 10px;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(5px);
}
.client-shell .modal {
  width: min(860px, 100%);
  max-height: calc(100dvh - 20px);
  grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 16px;
  border-radius: var(--client-radius-md);
}
.client-shell .modal-media img {
  min-height: 0;
  height: 280px;
  padding: 10px;
  border: 1px solid var(--client-border);
  border-radius: var(--client-radius-sm);
}
.client-shell .modal-content {
  min-width: 0;
}
.client-shell .modal-main-info h2 {
  margin: 4px 34px 3px 0;
  font-size: 22px;
  line-height: 1.14;
}
.client-shell .modal-main-info p {
  margin-bottom: 8px;
  font-size: var(--client-text-sm);
}
.client-shell .modal-content h3 {
  margin: 9px 0 5px;
  font-size: 14px;
}
.client-shell .icon-close {
  z-index: 3;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--client-border);
  border-radius: var(--client-radius-sm);
  color: var(--client-muted);
  font-size: 24px;
}
.client-shell .family-modal .variant-selector {
  gap: 6px;
  margin: 0 0 8px;
}
.client-shell .family-modal .variant-option {
  min-width: 104px;
  min-height: var(--client-control-height);
  gap: 1px;
  padding: 6px 9px;
  border-radius: var(--client-radius-sm);
}
.client-shell .family-modal .variant-option span {
  font-size: 13px;
}
.client-shell .family-modal .variant-option small {
  font-size: 10px;
}
.client-shell .family-modal .selected-variant-summary {
  min-height: 40px;
  padding: 7px 9px;
  border-radius: var(--client-radius-sm);
}
.client-shell .detail-list {
  gap: 5px;
  margin-top: 7px;
}
.client-shell .detail-list > div {
  min-width: 0;
  padding: 6px 7px;
  border-radius: 7px;
  background: var(--client-soft);
}
.client-shell .detail-list dt {
  font-size: 10px;
}
.client-shell .detail-list dd {
  overflow-wrap: anywhere;
  font-size: 12px;
}
.client-shell .stock-list {
  gap: 5px;
  margin: 6px 0 8px;
}
.client-shell .modal-content > .warning-text,
.client-shell .modal-content > .muted {
  margin: 5px 0 7px;
  font-size: 12px;
}
.client-shell .modal-add-button {
  min-height: var(--client-control-height);
}
.client-shell .cart-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 10px;
}
.client-shell .cart-list {
  gap: 8px;
}
.client-shell .cart-row {
  grid-template-columns: 72px minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 10px;
}
.client-shell .cart-row img {
  width: 72px;
  height: 72px;
  padding: 4px;
}
.client-shell .cart-row h3 {
  margin: 4px 0;
  font-size: 15px;
}
.client-shell .cart-row p {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.25;
}
.client-shell .qty {
  grid-template-columns: 44px 58px 44px;
  gap: 3px;
}
.client-shell .qty button,
.client-shell .qty input {
  min-height: 44px;
}
.client-shell .checkout {
  top: 76px;
  gap: 10px;
  padding: var(--client-card-padding);
}
.client-shell .checkout label,
.client-shell .compact-form label {
  gap: 4px;
  font-size: var(--client-text-sm);
}
.client-shell .checkout textarea {
  min-height: 76px;
}
.client-shell .client-orders-panel {
  padding: 8px;
}
.client-shell .client-orders-panel th {
  padding: 8px;
  font-size: 11px;
}
.client-shell .client-orders-panel td {
  padding: 9px 8px;
  font-size: 12px;
  line-height: 1.3;
}
.client-shell .account-grid {
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 10px;
}
.client-shell .account-grid .detail-list {
  margin-bottom: 10px;
}
.client-shell .compact-form {
  gap: 9px;
}
.client-shell .mobile-nav svg {
  width: var(--client-icon-md);
  height: var(--client-icon-md);
}

@media (max-width: 900px) {
  .client-shell .client-page {
    width: min(100% - 12px, var(--client-page-max));
    padding: 9px 0 calc(76px + env(safe-area-inset-bottom));
  }
  .client-shell .client-page-header {
    min-height: 44px;
    margin-bottom: 8px;
  }
  .client-shell .client-page-header h1 {
    font-size: 21px;
  }
  .client-shell .client-catalog-cta {
    min-height: 40px;
    padding-inline: 10px;
  }
  .client-shell .client-dashboard-grid {
    gap: 8px;
  }
  .client-shell .client-dashboard-grid > .panel > .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .client-shell .catalog-toolbar {
    grid-template-columns: minmax(0, 1fr) 124px;
    gap: 7px;
  }
  .client-shell .warehouse-pill {
    min-width: 0;
  }
  .client-shell .catalog-search {
    position: sticky;
    top: 0;
    z-index: 7;
    margin-bottom: 6px;
    padding-top: 2px;
    background: #f8fafc;
  }
  .client-shell .catalog-filters {
    position: static;
    margin-bottom: 8px;
    padding: 0 0 6px;
  }
  .client-shell .catalog-filters .filter-summary {
    min-height: 40px;
  }
  .client-shell .catalog-filters .chips.open {
    gap: 4px;
    padding-top: 5px;
  }
  .client-shell .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .client-shell .product-card img {
    height: 96px;
    padding: 6px 7px 1px;
  }
  .client-shell .product-body {
    padding: 7px 8px 6px;
  }
  .client-shell .product-sku {
    font-size: 12px;
  }
  .client-shell .pill {
    min-height: 21px;
    padding: 3px 5px;
    font-size: 9px;
  }
  .client-shell .product-card h3 {
    margin: 5px 0 4px;
    font-size: 14px;
  }
  .client-shell .product-meta-line {
    margin-bottom: 5px;
    font-size: 10px;
  }
  .client-shell .product-metrics {
    grid-template-columns: 1fr;
    gap: 3px;
    margin-bottom: 4px;
  }
  .client-shell .product-metrics div {
    padding: 4px 5px;
  }
  .client-shell .product-metrics span {
    display: inline;
    margin-right: 3px;
    font-size: 9px;
  }
  .client-shell .product-metrics b,
  .client-shell .family-card .family-metrics b {
    display: inline;
    font-size: 10px;
  }
  .client-shell .product-card .warning-text,
  .client-shell .product-card .muted {
    display: none;
  }
  .client-shell .product-actions {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 0 8px 8px;
  }
  .client-shell .product-actions button,
  .client-shell .family-card .product-actions .full {
    min-height: 44px;
    padding: 6px;
    font-size: 11px;
  }
  .client-shell .product-actions .add-button {
    grid-template-columns: 1fr auto;
  }
  .client-shell .modal {
    width: min(100%, 560px);
    max-height: calc(100dvh - 10px);
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 10px;
  }
  .client-shell .modal-media img {
    height: 150px;
    padding: 5px;
  }
  .client-shell .modal-main-info h2 {
    margin-top: 2px;
    font-size: 18px;
  }
  .client-shell .family-modal .variant-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .client-shell .family-modal .variant-option {
    min-width: 0;
    width: 100%;
  }
  .client-shell .detail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .client-shell .family-modal .modal-add-button,
  .client-shell .modal .modal-add-button {
    position: sticky;
    bottom: calc(0px + env(safe-area-inset-bottom));
    z-index: 2;
    min-height: 48px;
  }
  .client-shell .cart-layout,
  .client-shell .account-grid {
    grid-template-columns: 1fr;
  }
  .client-shell .cart-row {
    grid-template-columns: 60px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 8px;
  }
  .client-shell .cart-row img {
    width: 60px;
    height: 60px;
  }
  .client-shell .cart-row .qty {
    grid-column: 2 / -1;
    justify-self: start;
  }
  .client-shell .cart-row .ghost {
    grid-column: auto;
    width: auto;
    min-height: 44px;
  }
  .client-shell .checkout {
    position: static;
  }
  .client-shell .client-orders-panel {
    padding: 6px;
  }
  .client-shell .mobile-nav {
    min-height: calc(62px + env(safe-area-inset-bottom));
    padding: 4px 5px calc(4px + env(safe-area-inset-bottom));
  }
  .client-shell .mobile-nav button {
    min-height: 52px;
    padding: 4px 2px;
    border-radius: 8px;
  }
  .client-shell .mobile-nav button span {
    font-size: 10px;
    line-height: 1.05;
  }
}

@media (max-width: 359px) {
  .client-shell .catalog-grid,
  .client-shell .client-dashboard-grid > .panel > .catalog-grid {
    grid-template-columns: 1fr;
  }
  .client-shell .product-card {
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
  }
  .client-shell .product-card img {
    width: 92px;
    height: 104px;
    grid-row: 1 / -1;
  }
  .client-shell .product-actions {
    grid-column: 2;
  }
  .client-shell .family-modal .variant-selector {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1440px) {
  .client-shell .catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.client-shell :where(button, input, select, textarea, a):focus-visible {
  outline: 2px solid var(--client-accent);
  outline-offset: 2px;
}

/* v164 client catalog density polish */
.client-shell .catalog-grid > .product-card h3 {
  display: -webkit-box;
  min-height: 2.34em;
  max-height: 2.34em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.client-shell .catalog-grid > .product-card .pill {
  max-width: 54%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-shell .catalog-grid > .product-card .product-actions button {
  overflow: hidden;
  white-space: nowrap;
}
.client-shell .product-details-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.client-shell .product-details-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.client-shell .family-modal .modal-add-button {
  background: var(--color-primary);
  box-shadow: 0 -4px 10px rgba(255,255,255,.92);
}

@media (max-width: 900px) {
  .client-shell .catalog-grid,
  .client-shell .client-dashboard-grid > .panel > .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .client-shell .catalog-grid > .product-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
  }
  .client-shell .catalog-grid > .product-card img {
    width: 100%;
    height: 104px;
    grid-row: auto;
  }
  .client-shell .catalog-grid > .product-card .product-metrics {
    gap: 1px;
    margin-bottom: 3px;
  }
  .client-shell .catalog-grid > .product-card .product-metrics div {
    min-height: 18px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
    padding: 2px 1px;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    border-radius: 0;
    background: transparent;
  }
  .client-shell .catalog-grid > .product-card .product-metrics div:last-child {
    border-bottom: 0;
  }
  .client-shell .catalog-grid > .product-card .product-metrics span,
  .client-shell .catalog-grid > .product-card .product-metrics b,
  .client-shell .family-card .family-metrics b {
    display: block;
    min-width: 0;
    margin: 0;
    font-size: 10px;
    line-height: 1.15;
  }
  .client-shell .catalog-grid > .product-card .product-metrics b {
    text-align: right;
  }
  .client-shell .catalog-grid > .product-card .product-actions {
    grid-column: auto;
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .client-shell .catalog-grid > .family-card .product-actions {
    grid-template-columns: minmax(0, 1fr);
  }
  .client-shell .catalog-grid > .product-card .product-actions button {
    min-width: 0;
    min-height: 44px;
    padding: 5px 6px;
    font-size: 11px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .client-shell .catalog-grid > .product-card .product-details-button span {
    display: none;
  }
  .client-shell .catalog-grid > .product-card .product-details-button svg {
    width: 18px;
    height: 18px;
  }
  .client-shell .catalog-grid > .family-card .product-actions button {
    width: 100%;
    padding-inline: 4px;
    font-size: 11px;
  }
  .client-shell .family-modal .modal-add-button {
    margin-bottom: env(safe-area-inset-bottom);
  }
}

@media (max-width: 359px) {
  .client-shell .catalog-grid,
  .client-shell .client-dashboard-grid > .panel > .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .client-shell .catalog-grid > .product-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
  }
  .client-shell .catalog-grid > .product-card img {
    width: 100%;
    height: 98px;
    grid-row: auto;
  }
  .client-shell .catalog-grid > .product-card .product-body {
    padding-inline: 6px;
  }
  .client-shell .catalog-grid > .product-card .product-actions {
    grid-column: auto;
    padding-inline: 6px;
  }
  .client-shell .catalog-grid > .product-card .product-meta-line {
    font-size: 9.5px;
  }
  .client-shell .catalog-grid > .product-card .product-actions button {
    font-size: 10.5px;
  }
}


/* v165 client catalog final polish */
.client-shell .catalog-grid > .product-card {
  border-radius: var(--client-radius-md);
}
.client-shell .catalog-grid > .product-card .product-body {
  display: flex;
  min-height: 0;
  flex-direction: column;
}
.client-shell .catalog-grid > .product-card .product-meta-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.client-shell .catalog-grid > .product-card .product-metrics {
  margin-top: auto;
}
.client-shell .catalog-grid > .product-card .product-actions {
  align-items: stretch;
}
.client-shell .catalog-grid > .family-card .product-actions {
  grid-template-columns: minmax(0, 1fr);
}
.client-shell .catalog-grid > .family-card .product-actions button {
  white-space: normal;
  overflow-wrap: anywhere;
}
.client-shell .catalog-grid > .product-card .product-actions button {
  height: 44px;
  min-height: 44px;
  border-radius: var(--client-radius-sm);
}

@media (max-width: 900px) {
  .client-shell .catalog-grid > .product-card img {
    min-height: 104px;
  }
  .client-shell .catalog-grid > .product-card .product-body {
    padding: 7px 8px 5px;
  }
  .client-shell .catalog-grid > .product-card .product-head {
    min-height: 24px;
    align-items: center;
  }
  .client-shell .catalog-grid > .product-card h3 {
    margin: 4px 0 3px;
  }
  .client-shell .catalog-grid > .product-card .product-meta-line {
    min-height: 2.3em;
    max-height: 2.3em;
    margin-bottom: 4px;
    line-height: 1.15;
  }
  .client-shell .catalog-grid > .product-card .product-metrics {
    margin-bottom: 2px;
  }
  .client-shell .catalog-grid > .product-card .product-metrics div {
    min-height: 19px;
  }
  .client-shell .catalog-grid > .product-card .product-actions {
    gap: 5px;
    padding: 0 8px 8px;
  }
  .client-shell .catalog-grid > .family-card .product-actions button {
    justify-self: stretch;
  }
}

@media (max-width: 359px) {
  .client-shell .catalog-grid > .product-card img {
    min-height: 98px;
  }
  .client-shell .catalog-grid > .product-card .product-body {
    padding-inline: 6px;
  }
  .client-shell .catalog-grid > .product-card .product-actions {
    padding-inline: 6px;
  }
}

/* v168 mobile client catalog density */
@media (max-width: 900px) {
  .client-shell .app-topbar {
    min-height: 52px;
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    gap: 4px;
    padding: 4px 8px;
  }
  .client-shell .app-topbar .menu-toggle,
  .client-shell .app-topbar .header-icon-button,
  .client-shell .app-topbar .logout-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }
  .client-shell .app-topbar .app-section-title,
  .client-shell .app-topbar .topbar-user {
    display: none;
  }
  .client-shell .app-topbar .lang-switch {
    min-width: 0;
    justify-self: end;
    gap: 2px;
    padding: 2px;
  }
  .client-shell .app-topbar .lang-switch span {
    display: none;
  }
  .client-shell .app-topbar .lang-switch button {
    min-width: 30px;
    min-height: 40px;
    padding: 3px 5px;
    font-size: 10px;
  }
  .client-shell .app-topbar .logout-button b {
    display: none;
  }
  .client-shell .section-tabs {
    top: 52px;
    gap: 4px;
    padding: 4px 8px;
  }
  .client-shell .section-tabs button {
    min-height: 44px;
    gap: 4px;
    padding: 5px 8px;
    font-size: 11px;
  }
  .client-shell .section-tabs i {
    width: 16px;
    height: 16px;
  }
  .client-shell .client-page {
    padding-top: 5px;
  }
  .client-shell .catalog-toolbar {
    min-height: 44px;
    margin-bottom: 4px;
  }
  .client-shell .catalog-toolbar > div p {
    display: none;
  }
  .client-shell .client-page-header h1 {
    font-size: 18px;
  }
  .client-shell .warehouse-pill,
  .client-shell .warehouse-pill select,
  .client-shell .search-wrap input {
    min-height: 44px;
    height: 44px;
  }
  .client-shell .catalog-search {
    margin-bottom: 3px;
    padding-top: 0;
  }
  .client-shell .catalog-filters {
    margin-bottom: 5px;
    padding-bottom: 3px;
  }
  .client-shell .catalog-filters .filter-summary {
    min-height: 44px;
  }
  .client-shell .catalog-grid > .product-card .product-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .client-shell .catalog-grid > .family-card .product-actions {
    grid-template-columns: minmax(0, 1fr);
  }
  .client-shell .catalog-grid > .product-card .product-actions button {
    min-width: 0;
    padding-inline: 4px;
    font-size: 10.5px;
    text-overflow: clip;
  }
  .client-shell .catalog-grid > .product-card .product-details-button span {
    display: inline;
  }
  .client-shell .catalog-grid > .product-card .product-details-button svg {
    width: 14px;
    height: 14px;
  }
  .client-shell .catalog-grid > .family-card .product-actions button {
    padding-inline: 3px;
    font-size: clamp(9px, 2.8vw, 11px);
    line-height: 1.12;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .client-shell .stock-list {
    margin: 4px 0 8px;
  }
}

@media (max-width: 340px) {
  .client-shell .app-topbar {
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    padding-inline: 4px;
  }
  .client-shell .app-topbar .lang-switch button {
    min-width: 27px;
    padding-inline: 3px;
  }
  .client-shell .section-tabs button {
    padding-inline: 6px;
  }
  .client-shell .catalog-grid > .product-card .product-actions button {
    font-size: 10px;
  }
  .client-shell .catalog-grid > .product-card .product-details-button {
    gap: 2px;
  }
}
.shift-master-reports-page{min-width:0;max-width:100%;overflow-x:hidden}.shift-master-reports-page>*{min-width:0}.shift-report-review-card{display:flex;align-items:center;justify-content:space-between;gap:20px;border-left:5px solid #f59e0b}.shift-report-review-card h2{margin:.25rem 0}.shift-report-review-actions{justify-content:flex-end}.shift-report-review-actions button,.shift-report-review-card button{min-height:44px}.shift-report-confirm-dialog{max-width:520px}.shift-report-confirm-dialog .toolbar-actions{justify-content:flex-end;margin-top:24px}.shift-report-detail-row summary{min-height:44px}
.shift-precheck-card{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px;padding:20px;border:2px solid #f59e0b;border-radius:18px;background:linear-gradient(135deg,#fff7ed,#fffbeb);box-shadow:0 8px 24px rgba(245,158,11,.12)}.shift-precheck-card.success{border-color:#16a34a;background:linear-gradient(135deg,#f0fdf4,#ecfdf5)}.shift-precheck-card.attention{border-color:#dc2626;background:linear-gradient(135deg,#fef2f2,#fff7ed)}.shift-precheck-card h2{margin:.3rem 0 0;font-size:clamp(1rem,2vw,1.25rem)}.shift-precheck-card button{flex:0 0 auto;min-height:48px}
.shift-assignment-banner{display:flex;align-items:center;justify-content:space-between;border-left:5px solid #1683e5}.shift-assignment-banner.view-only{border-left-color:#f59e0b}.shift-assignment-banner h2{margin:3px 0}.shift-assignment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.shift-assignment-grid article{display:grid;gap:4px;padding:12px;border:1px solid var(--border-color);border-radius:12px;background:#f8fafc}.shift-assignment-grid small{color:var(--text-secondary)}.shift-assignment-grid article>button{justify-self:start;margin-top:6px}
.shift-assignment-defaults{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.shift-assignment-defaults label{display:grid;gap:5px}.shift-assignment-defaults select{width:100%}
.shift-report-row-correct{margin:12px;min-height:44px}.shift-report-pallet-correction{box-sizing:border-box;width:min(760px,calc(100vw - 28px));max-height:calc(100vh - 28px);overflow:auto}.shift-report-source-pallets{display:grid;gap:12px;margin-top:16px}.shift-report-source-pallets article{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px;border:1px solid var(--border-color);border-radius:var(--radius-md)}.shift-report-source-pallets article>div{display:grid;gap:4px;min-width:0}.shift-report-source-pallets article span{overflow-wrap:anywhere;color:var(--text-secondary)}.shift-report-source-pallets button{min-height:44px;flex:0 0 auto}.shift-report-pallet-correction form{display:grid;gap:16px}.shift-report-pallet-correction form>label{display:grid;gap:7px}.shift-report-pallet-correction select,.shift-report-pallet-correction input{width:100%;min-width:0}.shift-report-correction-preview{padding:14px;border:1px solid var(--border-color);border-radius:var(--radius-md);background:var(--surface-muted,#f8fafc)}.shift-report-correction-preview>div{display:grid;grid-template-columns:1fr 1fr;gap:12px}.shift-report-correction-preview span{padding:12px;border-radius:10px;background:var(--surface,#fff)}
@media(max-width:600px){.shift-precheck-card,.shift-report-review-card{align-items:stretch;flex-direction:column}.shift-assignment-grid,.shift-assignment-defaults{grid-template-columns:1fr}.shift-precheck-card{padding:16px}.shift-precheck-card button,.shift-report-review-card button{width:100%}.shift-report-review-actions{display:grid;grid-template-columns:1fr}.shift-report-review-actions>*{width:100%;min-height:44px}.shift-report-confirm-dialog{box-sizing:border-box;width:calc(100vw - 24px);max-height:calc(100vh - 24px);overflow:auto}.shift-master-report-detail{padding:14px}.shift-report-meta{grid-template-columns:1fr 1fr}.shift-report-rows{max-width:100%;overflow-x:auto}.shift-report-detail-row{min-width:0}}
@media(max-width:600px){.qr-scanner-backdrop{box-sizing:border-box;padding:8px}.qr-scanner-modal{box-sizing:border-box;width:100%;max-height:calc(100vh - 16px);overflow:auto;padding:16px;gap:10px}.qr-reader{min-height:clamp(210px,42vh,320px)}.qr-scanner-modal .modal-actions{display:grid;grid-template-columns:1fr}.qr-scanner-modal .modal-actions button{width:100%;min-height:44px}.qr-session-counters{gap:8px}.qr-session-counters b{padding:9px 7px}}
@media(max-width:600px){.shift-report-pallet-correction{width:calc(100vw - 24px);max-width:calc(100vw - 24px)}.shift-report-source-pallets article{align-items:stretch;flex-direction:column}.shift-report-source-pallets button,.shift-report-pallet-correction .toolbar-actions>*{width:100%;min-height:44px}.shift-report-correction-preview>div{grid-template-columns:1fr}.shift-report-row-correct{width:calc(100% - 24px)}}
.late-pallet-modal{width:min(760px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:auto}
.shift-master-reports-page [data-action="late-pallet-open"]{min-height:44px}
.late-pallet-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}
.late-pallet-summary>div{padding:12px;border:1px solid var(--border,#dbe3ec);border-radius:12px;background:var(--surface-soft,#f7f9fc)}
.late-pallet-summary dt{font-size:12px;color:var(--muted,#64748b)}
.late-pallet-summary dd{margin:4px 0 0;font-weight:700;overflow-wrap:anywhere}
@media(max-width:600px){.late-pallet-modal{width:calc(100vw - 16px);max-height:calc(100vh - 16px);padding:16px}.late-pallet-summary{grid-template-columns:1fr}.late-pallet-form{grid-template-columns:1fr}.late-pallet-form .span-2{grid-column:auto}.late-pallet-modal .toolbar-actions{display:grid;grid-template-columns:1fr}.late-pallet-modal button{min-height:44px;width:100%}}
.weekly-attendance-management{min-width:0}.weekly-attendance-status{display:inline-flex;align-items:center;min-height:38px;padding:7px 12px;border-radius:999px;background:#e2e8f0;font-weight:800}.weekly-attendance-status.review{background:#fef3c7;color:#92400e}.weekly-attendance-status.approved{background:#dcfce7;color:#166534}.weekly-attendance-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:16px 0}.weekly-attendance-summary>div{display:grid;gap:4px;padding:12px;border:1px solid var(--border-color);border-radius:12px;background:#f8fafc}.weekly-attendance-summary span{color:var(--text-secondary);font-size:12px}.weekly-attendance-employees{display:grid;gap:10px}.weekly-attendance-employees>details{border:1px solid var(--border-color);border-radius:12px;overflow:hidden}.weekly-attendance-employees>details>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:12px;cursor:pointer}.weekly-attendance-employees>details>summary span{display:grid}.attendance-flag{display:inline-block;margin:2px;padding:3px 6px;border-radius:7px;background:#e2e8f0;font-size:11px}.attendance-flag.blocking{background:#fee2e2;color:#991b1b}.attendance-flag.attention{background:#fef3c7;color:#92400e}.attendance-flag.info{background:#dbeafe;color:#1e40af}.attendance-correction form{display:grid;gap:8px;min-width:260px}.attendance-correction label{display:grid;gap:3px}.weekly-attendance-approval{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-top:18px;padding:16px;border:2px solid #0f766e;border-radius:14px;background:#f0fdfa}.weekly-attendance-approval form{display:flex;align-items:end;gap:10px}.weekly-attendance-approval label{display:grid;gap:4px}
@media(max-width:700px){.weekly-attendance-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.weekly-attendance-approval,.weekly-attendance-approval form{align-items:stretch;flex-direction:column}.weekly-attendance-approval button{min-height:44px;width:100%}.weekly-attendance-employees .table-wrap{overflow-x:auto}.weekly-attendance-employees table{min-width:760px}}
.my-weekly-attendance{display:grid;gap:12px}.my-attendance-week{display:grid;gap:12px;padding:14px;border:1px solid var(--border-color);border-radius:14px}.my-attendance-week>header{display:flex;justify-content:space-between;gap:10px}.my-attendance-week>header span{display:grid}.my-attendance-week>header em{font-style:normal;font-weight:800}.my-attendance-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}.my-attendance-days>div{display:grid;gap:3px;padding:8px 4px;text-align:center;background:#f8fafc;border-radius:9px}.my-attendance-days span{font-size:11px;color:var(--text-secondary)}.my-attendance-totals,.my-attendance-actions{display:flex;gap:12px;justify-content:space-between}.my-attendance-actions form{display:grid;gap:7px;flex:1}.my-attendance-actions label{display:grid;gap:4px}.my-attendance-actions textarea{min-height:72px}.my-attendance-sessions{display:grid;gap:5px}.my-attendance-attention{display:grid;gap:5px;padding:10px;background:#fef3c7;border-radius:10px}.attendance-confirmation-management{display:grid;gap:10px;margin:14px 0;padding:14px;border:1px solid var(--border-color);border-radius:12px}.attendance-confirmation-counts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.attendance-confirmation-counts span{display:grid;padding:10px;background:#f8fafc;border-radius:9px}.attendance-confirmation-list{display:grid;gap:7px}.attendance-confirmation-list>details{padding:10px;border:1px solid var(--border-color);border-radius:10px}.attendance-confirmation-list summary{display:flex;justify-content:space-between;gap:10px}.attendance-confirmation-list summary span{display:grid}.attendance-confirmation-list details details small{display:block;overflow-wrap:anywhere;margin:5px 0}
.my-attendance-title{margin:0}.my-attendance-confirmed{display:grid;gap:2px;color:#166534}.my-attendance-confirmed b{font-size:16px}.my-attendance-confirmed span,.my-attendance-legal{color:var(--text-secondary);font-size:12px}.my-attendance-state{font-weight:800}.my-attendance-state.disputed{color:#92400e}.my-attendance-state.reconfirm_required{color:#9a3412}.my-attendance-details{border-top:1px solid var(--border-color);padding-top:10px}.my-attendance-details>summary{cursor:pointer;font-weight:700}.my-attendance-sessions{padding:8px 0;color:var(--text-secondary)}.my-attendance-legal{line-height:1.35}
.my-attendance-shifts{display:grid;gap:7px;padding-top:9px}.my-attendance-shifts>div{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(90px,auto);align-items:center;gap:10px;padding:9px;background:#f8fafc;border-radius:9px}.my-attendance-shifts span{display:grid}.my-attendance-shifts small{color:var(--text-secondary)}
@media(max-width:700px){.my-attendance-week{padding:12px}.my-attendance-week>header,.my-attendance-totals,.my-attendance-actions{flex-direction:column}.my-attendance-days{grid-template-columns:repeat(4,minmax(0,1fr))}.my-attendance-actions button{width:100%;min-height:44px}.attendance-confirmation-counts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.my-attendance-shifts>div{grid-template-columns:minmax(0,1fr) auto}.my-attendance-shifts>div>small{grid-column:1/-1}}
@media(max-width:360px){.my-attendance-days{grid-template-columns:repeat(3,minmax(0,1fr))}.my-attendance-week{padding:10px}.attendance-confirmation-counts{grid-template-columns:1fr}}

/* WT-SHIFT-3J3B: management table stays readable on narrow screens. */
.shift-timesheet-table{min-width:1080px}.shift-timesheet-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.shift-timesheet-details{display:grid;grid-template-columns:minmax(150px,1fr) minmax(220px,2fr);gap:6px 12px;margin:10px 0}.shift-timesheet-details dt{font-weight:700}.shift-timesheet-details dd{margin:0;overflow-wrap:anywhere}.shift-timesheet-disclaimer{font-weight:600}
@media(max-width:760px){.shift-timesheet-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.shift-timesheet-table-wrap{margin-inline:-4px}.shift-timesheet-table{min-width:960px}.shift-timesheet-management .settings-form{grid-template-columns:1fr}.shift-timesheet-management .settings-form button{min-height:44px}.shift-timesheet-details{grid-template-columns:1fr}.shift-timesheet-management details summary{min-height:44px;display:flex;align-items:center}}
@media(max-width:380px){.shift-timesheet-summary{grid-template-columns:1fr}.shift-timesheet-management{padding:12px}.shift-timesheet-table{min-width:900px}}
