:root {
  --page: #f4f5ff;
  --panel: #ffffff;
  --ink: #1d1e28;
  --muted: #697087;
  --line: #e4e7f2;
  --soft: #f4efff;
  --hostinger: #5f3ee8;
  --hostinger-soft: #eee8ff;
  --brand: #8c124d;
  --brand-hot: #d91f67;
  --brand-dark: #171821;
  --graphite: #292b31;
  --teal: #0f8f78;
  --amber: #c98914;
  --shadow: 0 16px 36px rgba(34, 39, 75, 0.08);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(23, 24, 33, .08), transparent 30%),
    linear-gradient(145deg, rgba(217, 31, 103, .09), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, var(--page) 54%, #eef0ff 100%);
  color: var(--ink);
  font-family: Helvetica, "Noto Sans Malayalam", "Manjari", Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }

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

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  min-height: 100vh;
  padding: 12px;
}

.sidebar {
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.brand {
  display: grid;
  gap: 12px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
}

.brand img {
  width: 158px;
  max-width: 100%;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 7px;
}

.brand strong,
.brand span { display: block; }

.brand strong { line-height: 1.25; }

.brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar nav {
  display: grid;
  gap: 5px;
  padding: 10px 9px;
}

.sidebar a {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  border-radius: 6px;
  color: #4b5067;
  font-weight: 800;
  padding: 7px 10px;
}

.sidebar a span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 6px;
  background: #f4f6fb;
  color: #7b8196;
  font-size: 10px;
}

.sidebar a.active,
.sidebar a:hover {
  background: var(--hostinger-soft);
  color: var(--hostinger);
}

.sidebar a.active span,
.sidebar a:hover span {
  background: var(--hostinger);
  color: #fff;
}

.workspace { min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.topbar h1 {
  margin: 6px 0 3px;
  font-size: 30px;
  line-height: 1.05;
}

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

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--hostinger);
  font-size: 12px;
  font-weight: 900;
  padding: 5px 10px;
}

.badge {
  background: #eef6f4;
  color: var(--teal);
}

.ops-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--brand-dark) 0 5px, transparent 5px),
    linear-gradient(135deg, rgba(23, 24, 33, .07), rgba(217, 31, 103, .08) 45%, rgba(95, 62, 232, .06)),
    #fff;
  color: var(--ink);
  padding: 22px;
  box-shadow: var(--shadow);
}

.ops-panel h2 {
  margin: 10px 0 8px;
  font-size: 34px;
  line-height: 1.08;
}

.ops-panel p {
  max-width: 720px;
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.ops-panel .pill {
  background: var(--hostinger-soft);
  color: var(--hostinger);
}

.ops-panel img {
  width: 100%;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px;
}

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

.stat-grid article,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
}

.stat-grid article {
  position: relative;
  overflow: hidden;
}

.stat-grid article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand-dark), var(--brand-hot));
}

.stat-grid.compact article { padding: 14px; }

.stat-grid span,
.muted,
label span,
table span,
.section-head p {
  color: var(--muted);
  font-size: 13px;
}

.stat-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1.1;
}

.grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

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

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

.section-head h2,
.card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.section-head p { margin: 4px 0 0; }

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .88);
  padding: 10px;
}

.settings-tabs a,
.settings-tab {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4e5268;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(36, 40, 60, .04);
}

.settings-tabs a.active,
.settings-tab.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-hot));
  box-shadow: 0 14px 28px rgba(162, 0, 79, .16);
}

.settings-tabs a:hover,
.settings-tab:hover {
  border-color: rgba(217, 31, 103, .35);
  color: var(--brand);
}

.settings-tabs a.active:hover,
.settings-tab.active:hover {
  color: #fff;
}

.settings-tab-help {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

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

.role-summary-list p {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.role-summary-list b,
.role-summary-list span {
  display: block;
}

.role-summary-list b {
  color: var(--ink);
  margin-bottom: 4px;
}

.role-summary-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.erp-dashboard-panels {
  align-items: start;
}

.erp-product-form {
  margin: 16px 0;
}

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

.erp-passport-head h2 {
  margin: 10px 0 4px;
  font-size: 28px;
}

.erp-passport-head p {
  margin: 0;
  color: var(--muted);
}

.erp-passport-head img,
.passport-hero > img {
  width: 128px;
  height: 128px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  object-fit: contain;
}

.mini-qr {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 4px;
}

.branch-stock-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.branch-stock-strip span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 800;
}

.branch-stock-strip b {
  color: var(--ink);
}

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

.check-option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

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

.qc-result-grid p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px;
}

.qc-result-grid b,
.qc-result-grid span {
  display: block;
}

.qc-result-grid b {
  color: var(--muted);
  margin-bottom: 4px;
}

.qc-result-grid .passed b {
  color: var(--teal);
}

.qc-result-grid .failed b {
  color: var(--danger);
}

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

label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  outline: 0;
}

textarea {
  min-height: 86px;
  padding-top: 10px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--hostinger);
  box-shadow: 0 0 0 3px rgba(217, 31, 103, .14);
}

.switch-field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  font-weight: 800;
}

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

.yes-no-switch label {
  margin: 0;
  display: block;
  cursor: pointer;
}

.yes-no-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.yes-no-switch span {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.yes-no-switch label:hover span {
  border-color: rgba(217, 31, 103, .4);
  box-shadow: 0 10px 24px rgba(28, 35, 50, .08);
  transform: translateY(-1px);
}

.yes-no-switch input:checked + span {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-hot));
  color: #fff;
  box-shadow: 0 14px 28px rgba(162, 0, 79, .2);
}

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

.accessory-checks label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.accessory-checks input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.accessory-checks span {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4f566c;
  font-weight: 900;
  padding: 0 15px;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.accessory-checks span::before {
  content: "";
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid #cbd2e3;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.accessory-checks label:hover span {
  border-color: rgba(217, 31, 103, .35);
  box-shadow: 0 10px 24px rgba(28, 35, 50, .08);
  transform: translateY(-1px);
}

.accessory-checks input:checked + span {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-hot));
  color: #fff;
  box-shadow: 0 14px 28px rgba(162, 0, 79, .18);
}

.accessory-checks input:checked + span::before {
  content: "✓";
  border-color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .16);
}

.table-search {
  max-width: 240px;
  min-height: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--hostinger);
  border-radius: 6px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand), var(--brand-hot));
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
  padding: 9px 14px;
  white-space: nowrap;
}

.btn.ghost {
  background: #fff;
  color: var(--hostinger);
  border-color: var(--line);
}

.btn.small {
  min-height: 32px;
  font-size: 12px;
  padding: 6px 10px;
}

.settings-tabs .btn.small {
  min-height: 44px;
  border-radius: 8px;
  font-size: 13px;
  padding: 0 18px;
}

.btn.danger {
  color: #b42318;
}

.btn.whatsapp {
  border-color: #25d366;
  background: #25d366;
  color: #073b1f;
}

.btn.whatsapp.alt {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.btn.whatsapp.dark {
  border-color: var(--graphite);
  background: var(--graphite);
  color: #fff;
}

.job-update-button {
  min-height: 48px;
  min-width: 108px;
  border: 1px solid #b87500;
  border-radius: 10px;
  background: linear-gradient(145deg, #fff36a 0%, #ffd234 44%, #f3a000 100%);
  box-shadow: 0 6px 0 #a66500, 0 12px 22px rgba(180, 105, 0, .22);
  color: #251900;
  font-size: 15px;
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
  transform: translateY(-2px);
}

.job-update-button:hover {
  transform: translateY(0);
  box-shadow: 0 3px 0 #a66500, 0 8px 16px rgba(180, 105, 0, .2);
}

.whatsapp-bill-button {
  min-height: 44px;
  border: 1px solid #128c4a;
  border-radius: 10px;
  background: linear-gradient(145deg, #2fe47a, #18b85f);
  box-shadow: 0 5px 0 #0b7a3e, 0 12px 22px rgba(18, 140, 74, .18);
  color: #062613;
  font-size: 13px;
  font-weight: 1000;
}

.whatsapp-bill-button:hover {
  transform: translateY(1px);
  box-shadow: 0 3px 0 #0b7a3e, 0 8px 16px rgba(18, 140, 74, .16);
}

.wa-glyph {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #0b7a3e;
}

.wa-glyph svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.job-update-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.workflow-actions {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.workflow-actions form {
  margin: 0;
}

.btn.workflow {
  min-height: 28px;
  border-color: #eadff2;
  background: #fff6fb;
  color: #9a0054;
  padding: 5px 8px;
}

.btn.workflow:hover {
  border-color: var(--brand-hot);
  background: linear-gradient(135deg, #5b143d, #a00058 52%, #ee0b60);
  color: #fff;
}

.job-progress-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  margin: 14px 0 16px;
}

.job-progress-track > em {
  display: none;
}

.job-progress-step {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 116px;
  border: 1px solid #e5e9f4;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  text-align: center;
}

.job-progress-step .progress-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background: #eef3ff;
  color: #2563eb;
}

.job-progress-step .progress-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.job-progress-step b {
  font-size: 12px;
  text-transform: uppercase;
}

.job-progress-step span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.stage-reception {
  --stage-a: #3a8df7;
  --stage-b: #1d63e9;
  --stage-soft: #edf5ff;
  --stage-shadow: rgba(31, 115, 232, .26);
}

.stage-diagnosis {
  --stage-a: #865cf4;
  --stage-b: #5d2fd8;
  --stage-soft: #f2ecff;
  --stage-shadow: rgba(103, 56, 216, .28);
}

.stage-approval {
  --stage-a: #f53b82;
  --stage-b: #dc125b;
  --stage-soft: #fff0f6;
  --stage-shadow: rgba(230, 30, 105, .28);
}

.stage-repair {
  --stage-a: #ff9d3c;
  --stage-b: #f2731e;
  --stage-soft: #fff2e6;
  --stage-shadow: rgba(245, 134, 41, .28);
}

.stage-final-test {
  --stage-a: #61ca7e;
  --stage-b: #36ad61;
  --stage-soft: #ecfbf1;
  --stage-shadow: rgba(66, 185, 108, .26);
}

.stage-delivery {
  --stage-a: #36c5bd;
  --stage-b: #169b95;
  --stage-soft: #e9fbfa;
  --stage-shadow: rgba(34, 170, 165, .26);
}

.job-progress-step.complete {
  border-color: #bcebd5;
  background: #f3fff8;
}

.job-progress-step.complete .progress-icon {
  background: #dff8ea;
  color: #159055;
}

.job-progress-step.active {
  border-color: #d91f67;
  background: #fff4f8;
  box-shadow: 0 14px 30px rgba(217, 31, 103, .12);
}

.job-progress-step.active .progress-icon {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand), var(--brand-hot));
  color: #fff;
}

.job-progress-step.partial,
.job-progress-step.missed {
  border-color: #ffd7a7;
  background: #fff9ef;
}

.job-progress-step.partial .progress-icon,
.job-progress-step.missed .progress-icon {
  background: #fff0d7;
  color: #c46a0d;
}

.row-progress {
  width: 96px;
  height: 7px;
  margin: 7px 0 4px;
  border-radius: 999px;
  background: #edf0f7;
  overflow: hidden;
}

.row-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand), var(--brand-hot));
}

.stage-mini-card {
  display: inline-grid;
  grid-template-columns: 32px minmax(86px, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 150px;
  margin-top: 7px;
  padding: 8px;
  border: 1px solid rgba(226, 232, 246, .95);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--stage-soft, #f7f8fc), #fff 76%);
  box-shadow: 0 10px 22px var(--stage-shadow, rgba(80, 80, 120, .1));
}

.stage-mini-card > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .9) 0 10%, transparent 26%),
    linear-gradient(145deg, var(--stage-a, var(--brand)), var(--stage-b, var(--brand-hot)));
  color: #fff;
  box-shadow: 0 9px 18px var(--stage-shadow, rgba(80, 80, 120, .16));
}

.stage-mini-card svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stage-mini-card b {
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
}

.stage-mini-card .row-progress {
  grid-column: 2;
  width: 100%;
  margin: 2px 0 0;
  background: #eef2f8;
}

.stage-mini-card .row-progress i {
  background: linear-gradient(90deg, var(--stage-b, var(--brand-dark)), var(--stage-a, var(--brand-hot)));
}

.inline-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.inline-form input {
  width: min(220px, 100%);
  min-height: 36px;
}

.customer-picker {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbff;
  padding: 12px;
}

.section-head.compact {
  align-items: center;
  margin-bottom: 0;
  padding: 0;
  border: 0;
}

.section-head.compact h2 {
  font-size: 16px;
}

.quick-customer-fields {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.quick-customer-fields h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.sop-panel {
  display: grid;
  gap: 14px;
  border: 1px solid #d9d7ff;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(23, 24, 33, .05), rgba(217, 31, 103, .07), rgba(15, 143, 120, .04)), #fff;
  padding: 14px;
}

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

.check-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  padding: 12px;
}

.check-card h3 {
  margin: 0 0 9px;
  color: var(--brand-dark);
  font-size: 14px;
}

.check-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 8px;
  color: #464b61;
  font-size: 13px;
  font-weight: 800;
}

.check-option:last-child {
  margin-bottom: 0;
}

.check-option input {
  width: 16px;
  min-height: 16px;
  margin-top: 1px;
}

.flash {
  margin-bottom: 14px;
  border-radius: 6px;
  background: #eef6f4;
  color: #0f6b5b;
  font-weight: 800;
  padding: 12px;
}

.flash.danger {
  background: #fee2e2;
  color: #991b1b;
}

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

.whatsapp-flash .btn {
  flex: 0 0 auto;
}

.sop-workflow-card {
  align-self: start;
  border-color: rgba(172, 0, 92, .18);
  background: linear-gradient(145deg, #fff, #fff6fb);
}

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

.workflow-action-list form,
.workflow-action-list button {
  width: 100%;
}

.workflow-action-list button {
  min-height: 58px;
  justify-content: space-between;
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(172, 0, 92, .12);
}

.workflow-action-list button span {
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
}

.workflow-action-list .ghost span {
  color: #8b1a1a;
}

.service-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  border: 1px solid #fecaca;
  border-left: 5px solid #ef4444;
  border-radius: 8px;
  background: #fff1f2;
  color: #7f1d1d;
  padding: 16px 18px;
}

.service-alert > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-alert h2,
.service-alert p {
  margin: 0;
}

.service-alert h2 {
  font-size: 18px;
}

.service-alert p {
  margin-top: 4px;
  color: #991b1b;
  font-weight: 800;
}

.alarm-dot,
.alert-count {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-weight: 950;
}

.alarm-dot {
  width: 38px;
  height: 38px;
  font-size: 12px;
}

.alert-count {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  font-size: 22px;
}

.alert-row {
  margin-left: 0;
  margin-right: 0;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 8px;
}

.alert-row.overdue {
  border: 1px solid #fecaca;
  background: #fff1f2;
}

.alert-row.due-today {
  border: 1px solid #fed7aa;
  background: #fff7ed;
}

.overdue-row td {
  background: #fff1f2;
}

.overdue-row td:first-child {
  border-left: 4px solid #ef4444;
}

.stat-danger {
  border-color: #fecaca !important;
  background: #fff1f2 !important;
}

.stat-danger strong {
  color: #dc2626;
}

.metric-row,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

.list-row:last-child,
.metric-row:last-child { border-bottom: 0; }

.list-row div { display: grid; gap: 4px; }

.workload-total {
  display: grid;
  min-width: 50px;
  min-height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand), var(--brand-hot));
  color: #fff;
  font-size: 22px;
  line-height: 1;
  padding: 0 12px;
}

.tech-work-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

.tech-work-row:last-child { border-bottom: 0; }

.tech-work-row:hover b { color: var(--hostinger); }

.tech-work-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.tech-work-main span,
.tech-work-count span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tech-work-main i {
  display: block;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #eef0f7;
}

.tech-work-main i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand), var(--brand-hot));
}

.tech-work-row.has-overdue .tech-work-main i span {
  background: linear-gradient(90deg, #ef4444, var(--brand-hot));
}

.tech-work-count {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.tech-work-count strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.tech-work-row.has-overdue .tech-work-count strong {
  color: #dc2626;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

thead {
  background: #f3f0ff;
  color: var(--brand-dark);
}

th {
  font-size: 12px;
  text-transform: uppercase;
  color: #565079;
  letter-spacing: 0;
}

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

tbody tr:last-child td { border-bottom: 0; }

tbody tr:hover { background: #faf8ff; }

thead th {
  border-bottom: 1px solid #dad4fa;
}

/*
  Receipt tables intentionally keep stronger borders below for print clarity.
*/
.receipt thead {
  background: #111;
  color: #fff;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(23, 24, 33, .1), transparent 30%),
    linear-gradient(145deg, rgba(217, 31, 103, .11), transparent 44%),
    linear-gradient(180deg, #fff, #f4f5ff);
}

.login-wrap { width: min(430px, 100%); }

.login-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 22px 60px rgba(29, 31, 36, .16);
  padding: 24px;
}

.login-card img {
  width: 220px;
  max-width: 100%;
  border-radius: 6px;
}

.login-card h1,
.login-card p { margin: 0; }

.receipt-page {
  background: #fff;
  padding: 0;
}

.receipt {
  color: #111;
  font-family: Helvetica, Arial, sans-serif;
  border: 1.5px solid #111;
  padding: 10mm;
}

.receipt header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1.5px solid #111;
  padding-bottom: 10px;
}

.receipt header img {
  width: 142px;
  background: #fff;
}

.receipt h1 {
  margin: 0;
  font-size: 24px;
}

.receipt p { margin: 4px 0; }

.receipt-meta,
.receipt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 10px 0;
}

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

.receipt-grid p {
  display: grid;
  gap: 3px;
  border: 1px solid #d7d7d7;
  margin: 0;
  padding: 8px;
}

.receipt table {
  min-width: 0;
  margin: 8px 0;
  font-size: 13px;
}

.receipt th,
.receipt td {
  border: 1px solid #333;
  color: #111;
  font-size: inherit;
  padding: 7px;
  text-transform: none;
}

.receipt th { width: 36%; }

.receipt-note {
  border: 1px dashed #777;
  padding: 9px;
  text-align: center;
}

.receipt footer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 22mm;
}

.receipt footer span {
  border-top: 1px solid #111;
  padding-top: 8px;
  text-align: center;
}

.receipt-page.a5 .receipt {
  font-size: 12px;
  padding: 7mm;
}

.receipt-page.a5 .receipt header img { width: 88px; }

.receipt-page.a5 .receipt h1 { font-size: 18px; }

.receipt-page.a5 .receipt-meta,
.receipt-page.a5 .receipt-grid {
  gap: 5px;
  margin: 7px 0;
}

.receipt-page.a5 .receipt-grid p { padding: 6px; }

.receipt-page.a5 .receipt footer { margin-top: 14mm; }

.job-sheet table th { text-align: left; }

.compact-print .receipt {
  width: 100%;
  min-height: 0;
  font-size: 10px;
  line-height: 1.15;
  padding: 4mm;
}

.compact-print .receipt header {
  gap: 7px;
  padding-bottom: 5px;
}

.compact-print .receipt header img {
  width: 66px;
}

.compact-print .receipt h1 {
  font-size: 13px;
  line-height: 1.05;
}

.compact-print .receipt header p,
.compact-print .receipt header strong {
  font-size: 9px;
  margin: 1px 0;
}

.compact-print .receipt-meta,
.compact-print .receipt-grid {
  gap: 3px;
  margin: 4px 0;
}

.compact-print .receipt-meta {
  grid-template-columns: 1fr 1fr 1fr;
  font-size: 9px;
}

.compact-print .receipt-grid {
  grid-template-columns: repeat(2, 1fr);
}

.compact-print .receipt-grid p {
  gap: 1px;
  min-height: 0;
  padding: 3px 5px;
}

.compact-print .receipt table {
  margin: 4px 0;
  font-size: 9.5px;
  line-height: 1.1;
}

.compact-print .receipt th,
.compact-print .receipt td {
  padding: 3px 5px;
}

.compact-print .receipt-note {
  margin: 4px 0;
  padding: 5px;
  font-size: 9px;
}

.compact-print .receipt footer {
  gap: 14px;
  margin-top: 7mm;
  font-size: 9px;
}

.compact-print .receipt footer span {
  padding-top: 5px;
}

.compact-print .terms-page {
  break-before: page;
  page-break-before: always;
  max-height: none;
  overflow: visible;
  padding: 5mm;
  line-height: 1.28;
}

.terms-page header {
  gap: 8px;
  padding-bottom: 5px;
}

.terms-page header img {
  width: 64px;
}

.terms-page header h1 {
  font-size: 13px;
}

.terms-page header p,
.terms-page header strong {
  font-size: 8.5px;
}

.terms-block {
  margin-top: 7px;
}

.terms-block h2 {
  margin: 0 0 5px;
  border-bottom: 1px solid #111;
  color: #d00000;
  font-size: 12px;
  text-align: center;
  letter-spacing: 0;
  padding-bottom: 4px;
}

.terms-block ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0 2mm 0 8mm;
  list-style: none;
}

.terms-block li {
  position: relative;
  color: #111;
  font-size: 9.6px;
  font-weight: 700;
}

.terms-block li::before {
  content: "❖";
  position: absolute;
  left: -6mm;
  top: 0;
  font-size: 9px;
}

.terms-block.malayalam {
  font-family: Helvetica, "Noto Sans Malayalam", "Arial Unicode MS", Arial, sans-serif;
}

.terms-block.malayalam li {
  font-size: 9.2px;
  line-height: 1.36;
}

.terms-block.english {
  margin-top: 8px;
}

.terms-block.english li {
  font-size: 9.4px;
  line-height: 1.34;
}

.public-bill-page {
  background: #f5f7fb;
  padding: 18px;
}

.public-bill-page .receipt {
  max-width: 148mm;
  margin: 0 auto 18px;
  background: #fff;
}

.public-bill-actions {
  display: flex;
  justify-content: center;
  margin: 0 0 14px;
}

.public-bill-actions button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-red), var(--hostinger));
  color: #fff;
  cursor: pointer;
  font: 900 14px/1 Helvetica, Arial, sans-serif;
  padding: 12px 18px;
}

.receipt-attachments {
  border: 1px solid #d7d7d7;
  margin: 4px 0;
  padding: 4px;
}

.receipt-attachments h2 {
  margin: 0 0 4px;
  font-size: 9px;
  line-height: 1;
}

.receipt-attachments > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.receipt-attachments figure {
  display: grid;
  gap: 2px;
  margin: 0;
}

.receipt-attachments img {
  width: 100%;
  height: 24mm;
  border: 1px solid #ddd;
  object-fit: contain;
}

.receipt-attachments figcaption {
  color: #333;
  font-size: 7.5px;
  line-height: 1.1;
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
  }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid,
  .grid.two,
  .settings-panel-grid,
  .ops-panel,
  .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .app-shell { padding: 10px; }
  .topbar,
  .top-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }
  .topbar h1 {
    font-size: 26px;
  }
  .ops-panel,
  .stat-grid,
  .grid.two,
  .settings-panel-grid,
  .form-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }
  .ops-panel h2 {
    font-size: 28px;
  }
  .sidebar nav { grid-template-columns: 1fr; }
  .table-search { max-width: 100%; }
}

@media print {
  body { background: #fff; }
  .receipt-page.a4 { width: 210mm; }
  .receipt-page.a5 { width: 148mm; }
  .receipt-page { padding: 0; }
  .receipt { box-shadow: none; page-break-inside: avoid; }
  .receipt-page:not(.compact-print) .receipt { min-height: 270mm; }
  .receipt-page.a5:not(.compact-print) .receipt { min-height: 185mm; }
  .compact-print {
    width: 148mm;
    max-height: none;
    overflow: visible;
  }
  .compact-print .receipt:not(.terms-page) {
    max-height: 200mm;
    overflow: hidden;
  }
  .compact-print .terms-page {
    max-height: none;
    overflow: visible;
  }
  .compact-print .receipt table,
  .compact-print .receipt-grid,
  .compact-print .receipt-meta,
  .compact-print .receipt-note,
  .compact-print .receipt footer {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .public-bill-actions {
    display: none;
  }

  .public-bill-page {
    padding: 0;
  }

  .public-bill-page .receipt {
    margin: 0;
  }
}

/* hPanel-inspired shell */
.app-shell {
  display: block;
  min-height: 100vh;
  padding: 0;
  background: #f4f5f8;
}

.hpanel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  border-bottom: 1px solid #dfe1e7;
  background: #fff;
  padding: 0 24px 0 28px;
}

.hpanel-logo {
  display: flex;
  align-items: center;
}

.hpanel-logo img {
  width: 210px;
  max-height: 66px;
  object-fit: contain;
}

.hpanel-top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-offer,
.ai-button,
.circle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
}

.top-offer {
  background: #efe8ff;
  color: var(--hostinger);
  padding: 0 22px;
}

.ai-button {
  border: 1.5px solid var(--hostinger);
  color: var(--brand-dark);
  padding: 0 18px;
}

.circle-button {
  width: 48px;
  border: 1px solid #e3e5eb;
  color: var(--brand-dark);
  background: #fff;
}

.hpanel-body {
  display: grid;
  grid-template-columns: 88px 318px minmax(0, 1fr);
  min-height: calc(100vh - 88px);
}

.icon-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid #dfe1e7;
  background: #fff;
  padding: 16px 10px;
}

.icon-rail a {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 66px;
  border-radius: 8px;
  color: #565b68;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.icon-rail a span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1;
}

.icon-rail a.active {
  background: #f0f0f2;
  color: #1f2128;
}

.icon-rail .rail-bottom {
  margin-top: auto;
}

.sidebar {
  position: static;
  top: auto;
  height: auto;
  overflow-y: auto;
  border: 0;
  border-right: 1px solid #dfe1e7;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  color: #1f2128;
  padding: 16px 14px;
}

.website-switcher {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.website-switcher label {
  margin: 0;
  color: #262833;
  font-size: 16px;
  font-weight: 900;
}

.website-switcher button,
.side-search {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  border: 1px solid #e2e4ea;
  border-radius: 8px;
  background: #fff;
  color: #2d3038;
  padding: 0 14px;
}

.website-switcher button {
  justify-content: space-between;
  cursor: default;
}

.website-switcher b {
  color: #4e5260;
  font-size: 18px;
}

.side-search {
  gap: 12px;
  margin-bottom: 16px;
}

.side-search span {
  color: #555a67;
  font-weight: 900;
}

.side-search input {
  min-height: 0;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.sidebar nav {
  gap: 6px;
  padding: 0;
}

.sidebar nav a {
  display: grid;
  grid-template-columns: 32px 1fr 16px;
  min-height: 48px;
  gap: 12px;
  border-radius: 8px;
  color: #2f333d;
  font-size: 15px;
  padding: 8px 12px;
}

.sidebar nav a span {
  width: 28px;
  height: 28px;
  background: transparent;
  color: #555a67;
  font-size: 12px;
}

.sidebar nav a b {
  font-weight: 900;
}

.sidebar nav a em {
  color: #6d7280;
  font-style: normal;
}

.sidebar nav a.active,
.sidebar nav a:hover {
  background: #efeff2;
  color: #1f2128;
}

.sidebar nav a.active span,
.sidebar nav a:hover span {
  background: transparent;
  color: #1f2128;
}

.workspace {
  min-width: 0;
  max-width: 1450px;
  padding: 36px 56px 70px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: #626775;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 22px;
}

.breadcrumb span::after {
  content: ">";
  color: #808592;
  margin-left: 12px;
}

.breadcrumb strong {
  color: #1f2128;
}

.page-heading {
  margin-bottom: 20px;
}

.page-heading h1 {
  margin: 0 0 6px;
  color: #1f2128;
  font-size: 30px;
  line-height: 1.08;
}

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

.card,
.stat-grid article {
  border-color: #dedfe5;
  background: #fff;
  box-shadow: none;
}

.card {
  padding: 0;
  overflow: hidden;
}

.card > h2,
.card > .section-head {
  border-bottom: 1px solid #e6e7ec;
  margin: 0;
  padding: 20px 22px;
}

.card > h2 + *,
.card > .section-head + * {
  margin-top: 0;
}

.card > :not(.section-head):not(h2) {
  margin-left: 22px;
  margin-right: 22px;
}

.card > :last-child {
  margin-bottom: 22px;
}

.card > form,
form.card {
  padding: 0;
}

form.card > .form-grid,
form.card > label,
form.card > .btn,
form.card > button {
  margin-left: 22px;
  margin-right: 22px;
}

form.card > button,
form.card > .btn {
  margin-bottom: 22px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin: 0 22px 22px;
}

.photo-grid figure {
  display: grid;
  gap: 7px;
  margin: 0;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f5f8;
}

.photo-grid figcaption {
  color: var(--muted);
  font-size: 12px;
}

.ops-panel {
  border-color: #dedfe5;
  background: #fff;
  box-shadow: none;
}

.ops-panel::before {
  content: "";
  position: absolute;
}

.table-wrap {
  border-color: #e0e2e8;
}

@media (max-width: 1120px) {
  .hpanel-body {
    grid-template-columns: 78px 270px minmax(0, 1fr);
  }

  .workspace {
    padding: 28px 28px 56px;
  }
}

@media (max-width: 860px) {
  .hpanel-top {
    height: auto;
    min-height: 76px;
    gap: 12px;
    padding: 14px;
  }

  .hpanel-logo img {
    width: 140px;
  }

  .hpanel-top-actions {
    gap: 8px;
  }

  .top-offer {
    display: none;
  }

  .hpanel-body {
    grid-template-columns: 1fr;
  }

  .icon-rail {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid #dfe1e7;
  }

  .icon-rail .rail-bottom {
    display: none;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #dfe1e7;
  }

  .workspace {
    padding: 24px 14px 44px;
  }
}

/* Service operations model */
.app-shell {
  display: block;
  min-height: 100vh;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(23, 24, 33, .08), transparent 30%),
    linear-gradient(145deg, rgba(217, 31, 103, .09), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, var(--page) 54%, #eef0ff 100%);
}

.hpanel-top {
  display: none;
}

.hpanel-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.icon-rail {
  display: none;
}

.sidebar {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 36px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
  padding: 18px 14px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.sidebar-logo img {
  width: 190px;
  max-width: 100%;
  object-fit: contain;
}

.website-switcher,
.side-search {
  display: none;
}

.side-section-title {
  margin: 10px 10px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.sidebar nav {
  display: grid;
  gap: 6px;
  padding: 0;
}

.sidebar nav a {
  display: grid;
  grid-template-columns: 30px 1fr 16px;
  align-items: center;
  min-height: 42px;
  gap: 10px;
  border-radius: 8px;
  color: #52586f;
  font-size: 14px;
  font-weight: 850;
  padding: 8px 10px;
}

.sidebar nav a span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: #f1f3fb;
  color: #6b7088;
  font-size: 11px;
}

.sidebar nav a b {
  font-weight: 900;
}

.sidebar nav a em {
  color: #8a90a3;
  font-style: normal;
}

.sidebar nav a.active,
.sidebar nav a:hover {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand), var(--brand-hot));
  color: #fff;
  box-shadow: 0 16px 28px rgba(140, 18, 77, .25);
}

.sidebar nav a.active span,
.sidebar nav a:hover span {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.sidebar nav a .nav-icon,
.icon-rail a .nav-icon {
  background: var(--icon-bg, #f1f3fb);
  color: var(--icon-color, #5f3ee8);
}

.sidebar nav a .nav-icon svg,
.icon-rail a .nav-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar nav a.active .nav-icon,
.sidebar nav a:hover .nav-icon,
.icon-rail a.active .nav-icon,
.icon-rail a:hover .nav-icon {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.icon-dashboard { --icon-bg: #e9f2ff; --icon-color: #1f73e8; }
.icon-jobs { --icon-bg: #fff0f6; --icon-color: #d91f67; }
.icon-technician { --icon-bg: #e9fbfa; --icon-color: #159a91; }
.icon-qc,
.icon-qc_mobile { --icon-bg: #ebfbf0; --icon-color: #269656; }
.icon-customers { --icon-bg: #f0ebff; --icon-color: #6738d8; }
.icon-masters,
.icon-stock { --icon-bg: #fff3e8; --icon-color: #d97817; }
.icon-leads { --icon-bg: #eaf7ff; --icon-color: #0f83c7; }
.icon-payments { --icon-bg: #fff4dc; --icon-color: #ba760f; }
.icon-finance { --icon-bg: #edf7ed; --icon-color: #278344; }
.icon-notifications { --icon-bg: #fff1f2; --icon-color: #dc2626; }
.icon-settings { --icon-bg: #eef0f7; --icon-color: #4f5b74; }
.icon-branch { --icon-bg: #f2efff; --icon-color: #5f3ee8; }
.icon-logout { --icon-bg: #fee2e2; --icon-color: #991b1b; }

.branch-nav {
  margin-bottom: 18px;
}

.workspace {
  min-width: 0;
  max-width: none;
  padding: 0;
}

.breadcrumb {
  display: none;
}

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

.page-heading h1 {
  margin: 0 0 6px;
  font-size: 32px;
  line-height: 1.05;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-search {
  display: flex;
  align-items: center;
  min-width: 260px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  padding: 0 14px;
}

.page-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand), var(--brand-hot));
  color: #fff;
  font-weight: 900;
  padding: 0 16px;
  white-space: nowrap;
}

.page-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--hostinger);
  font-weight: 950;
}

.page-avatar svg,
.circle-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-circle {
  color: var(--hostinger);
}

.model-alert.service-alert {
  margin-bottom: 18px;
  border: 1px solid #fecaca;
  border-left: 5px solid #ff304c;
  border-radius: 8px;
  background: #fff1f2;
  box-shadow: var(--shadow);
}

.service-stage-roadmap {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.service-stage-roadmap article {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 14px;
}

.service-stage-roadmap article.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand), var(--brand-hot));
}

.service-stage-roadmap span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 999px;
  background: var(--hostinger-soft);
  color: var(--hostinger);
  font-size: 11px;
  font-weight: 950;
  padding: 0 8px;
}

.service-stage-roadmap article.active span {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.service-stage-roadmap h3 {
  margin: 12px 0 5px;
  font-size: 15px;
}

.service-stage-roadmap p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.service-stage-roadmap article.active p {
  color: rgba(255, 255, 255, .78);
}

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

.dashboard-stat {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.dashboard-stat.primary {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .13), transparent 45%),
    linear-gradient(135deg, var(--brand-dark), var(--brand) 54%, var(--brand-hot));
}

.dashboard-stat em {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--hostinger-soft);
  color: var(--hostinger);
  font-style: normal;
  font-weight: 950;
}

.dashboard-stat.primary em {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.dashboard-stat h3 {
  margin: 14px 0 6px;
  font-size: 13px;
}

.dashboard-stat strong {
  display: block;
  font-size: 28px;
  line-height: 1.08;
}

.dashboard-stat p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-stat.primary p {
  color: rgba(255, 255, 255, .78);
}

.dashboard-stat .delta {
  float: right;
  border-radius: 999px;
  background: #e8fbf5;
  color: var(--teal);
  font-size: 11px;
  font-weight: 950;
  padding: 5px 8px;
}

.dashboard-stat .delta.hot {
  background: #ffe8e8;
  color: #ff304c;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-main,
.dashboard-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

.model-card.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.model-card.card > .section-head {
  border: 0;
  padding: 0;
  margin-bottom: 18px;
}

.model-card.card > :not(.section-head):not(h2) {
  margin-left: 0;
  margin-right: 0;
}

.model-card.card > :last-child {
  margin-bottom: 0;
}

.workload-total {
  min-width: auto;
  min-height: 28px;
  border-radius: 999px;
  background: #f4f5fb;
  color: #595f76;
  font-size: 12px;
  padding: 0 12px;
}

.tech-work-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 86px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px;
}

.tech-work-row.has-overdue {
  border-color: #fecaca;
  background: #fff7f9;
}

.tech-avatar,
.queue-row > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand), var(--brand-hot));
  color: #fff;
  font-weight: 950;
}

.tech-work-main i {
  margin-top: 2px;
}

.queue-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px;
}

.queue-row.overdue {
  border-color: #fecaca;
  background: #fff1f2;
}

.queue-row b,
.queue-row small {
  display: block;
}

.queue-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.queue-row em {
  border-radius: 999px;
  background: #eef6f4;
  color: var(--teal);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  padding: 6px 9px;
}

.queue-row.overdue em {
  background: #ffecec;
  color: #dc2626;
}

.split-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 13px;
}

.split-row + .split-row {
  margin-top: 12px;
}

.split-row strong {
  display: block;
  font-size: 24px;
}

.split-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.split-row i {
  display: block;
  overflow: hidden;
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: #eef0f7;
}

.split-row i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand), var(--brand-hot));
}

@media (max-width: 1180px) {
  .hpanel-body,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .service-stage-roadmap {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .page-heading,
  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .page-search {
    min-width: 0;
  }

  .dashboard-stat-grid,
  .service-stage-roadmap {
    grid-template-columns: 1fr;
  }

  .tech-work-row,
  .queue-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .tech-work-count,
  .queue-row em {
    grid-column: 2;
    justify-self: start;
  }
}

/* Technician mobile desk */
.technician-mobile-page .hpanel-top,
.technician-mobile-page .icon-rail,
.technician-mobile-page .sidebar {
  display: none;
}

.technician-mobile-page .hpanel-body {
  display: block;
  padding: 12px;
}

.technician-mobile-page .workspace {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
}

.technician-mobile-page .page-heading {
  margin: 0 0 10px;
}

.technician-mobile-page .page-actions {
  display: none;
}

.technician-mobile-page .page-heading h1 {
  font-size: 24px;
}

.service-mobile-home {
  display: grid;
  gap: 14px;
}

.service-mobile-home header {
  display: grid;
  gap: 8px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(140, 18, 77, .08), rgba(217, 31, 103, .04)),
    #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.service-mobile-home h1,
.service-mobile-home p {
  margin: 0;
}

.service-mobile-home h1 {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.service-mobile-home p {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.service-mobile-home .btn {
  justify-self: start;
}

.service-mobile-team {
  display: grid;
  gap: 12px;
}

.service-person-tile {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e3e8f4;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 14px;
}

.service-person-tile > span {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-hot));
  color: #fff;
  font-size: 22px;
  font-weight: 950;
}

.service-person-tile h2,
.service-person-tile p {
  margin: 0;
}

.service-person-tile h2 {
  font-size: 24px;
  line-height: 1.05;
}

.service-person-tile p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.service-person-tile strong {
  display: grid;
  justify-items: end;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.service-person-tile small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.service-person-tile footer {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.service-person-tile em {
  border-radius: 999px;
  background: #f7f3ff;
  color: var(--hostinger);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
  padding: 8px 6px;
}

.tech-mobile-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: end;
  position: relative;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 24, 33, .08), rgba(217, 31, 103, .1), rgba(95, 62, 232, .05)),
    #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.tech-mobile-hero h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.08;
}

.tech-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #f7f3ff;
  color: var(--hostinger);
  font-size: 12px;
  font-weight: 950;
  padding: 0 11px;
}

.tech-logout-button {
  justify-self: end;
  min-height: 36px;
  border: 1px solid #f1d7e3;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-size: 13px;
  font-weight: 950;
  padding: 8px 13px;
}

.tech-mobile-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.tech-mobile-user-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.tech-mobile-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 0;
}

.tech-mobile-search input {
  min-height: 44px;
}

.tech-mobile-tabs {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  margin-bottom: 14px;
}

.tech-mobile-tabs a {
  flex: 0 0 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  padding: 10px 12px;
}

.tech-mobile-tabs a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand), var(--brand-hot));
  border-color: transparent;
}

.tech-mobile-tabs span {
  font-weight: 900;
}

.tech-mobile-tabs b {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #f2efff;
  color: var(--hostinger);
  font-size: 13px;
}

.tech-mobile-tabs a.active b {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

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

.tech-mobile-summary article {
  display: grid;
  gap: 2px;
  min-height: 72px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px;
}

.tech-mobile-summary b {
  color: var(--brand);
  font-size: 28px;
  line-height: 1;
}

.tech-mobile-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.tech-mobile-list {
  display: grid;
  gap: 14px;
}

.tech-mobile-job {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.tech-mobile-job.overdue {
  border-color: #fecaca;
  background: #fff7f9;
}

.tech-mobile-job.ready {
  border-color: #bfeee1;
}

.tech-mobile-job header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
}

.tech-mobile-job header h2 {
  margin: 8px 0 4px;
  font-size: 21px;
  line-height: 1.1;
}

.tech-mobile-job header p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.tech-mobile-job header strong {
  border-radius: 999px;
  background: #eef6f4;
  color: var(--teal);
  font-size: 12px;
  padding: 7px 10px;
  white-space: nowrap;
}

.tech-mobile-job.overdue header strong {
  background: #ffecec;
  color: #dc2626;
}

.job-tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  background: var(--hostinger-soft);
  color: var(--hostinger);
  font-size: 11px;
  font-weight: 950;
  padding: 0 9px;
}

.tech-mobile-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px 16px 4px;
}

.tech-mobile-info p {
  display: grid;
  gap: 3px;
  min-height: 58px;
  border: 1px solid #edf0f7;
  border-radius: 8px;
  background: #fbfcff;
  margin: 0;
  padding: 10px;
}

.tech-mobile-info b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.tech-mobile-info span {
  color: var(--ink);
  font-weight: 850;
}

.mobile-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr));
  gap: 10px;
  margin: 12px 16px 6px;
}

.mobile-progress .job-progress-step {
  min-height: 126px;
  align-content: center;
  border-color: rgba(226, 232, 246, .95);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--stage-soft, #f7f8fc), #fff 72%);
  box-shadow: 0 16px 28px rgba(20, 24, 40, .06);
  padding: 14px 10px;
}

.mobile-progress > em {
  display: none;
}

.mobile-progress .progress-icon {
  width: 62px;
  height: 62px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .88) 0 11%, transparent 27%),
    linear-gradient(145deg, var(--stage-a, var(--brand)), var(--stage-b, var(--brand-hot)));
  color: #fff;
  box-shadow: 0 18px 30px var(--stage-shadow, rgba(80, 80, 120, .18));
}

.mobile-progress .progress-icon svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.25;
}

.mobile-progress .job-progress-step b {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
}

.mobile-progress .job-progress-step span {
  display: none;
}

.mobile-progress .job-progress-step.complete {
  border-color: rgba(66, 185, 108, .28);
}

.mobile-progress .job-progress-step.active {
  border-color: var(--stage-a, var(--brand));
  background: linear-gradient(180deg, var(--stage-soft, #fff4f8), #fff 74%);
  box-shadow: 0 18px 36px var(--stage-shadow, rgba(217, 31, 103, .18));
  transform: translateY(-2px);
}

.mobile-progress .job-progress-step.partial,
.mobile-progress .job-progress-step.missed {
  border-color: rgba(245, 134, 41, .24);
}

.mobile-progress .job-progress-step.pending {
  opacity: .68;
  filter: saturate(.82);
}

.tech-sop-checks {
  display: grid;
  gap: 8px;
}

.tech-sop-checks details {
  border: 1px solid #edf0f7;
  border-radius: 8px;
  background: #fbfcff;
  overflow: hidden;
}

.tech-sop-checks summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 950;
  padding: 11px 12px;
}

.tech-sop-checks .check-option {
  padding: 9px 12px;
}

.tech-mobile-update {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px 16px 14px;
}

.tech-mobile-update label {
  margin: 0;
}

.tech-stage-select {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tech-stage-select label {
  display: grid;
  gap: 5px;
  min-height: 104px;
  place-items: center;
  border: 1px solid #e3e8f4;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--stage-soft, #f7f8fc), #fff 76%);
  color: #697087;
  text-align: center;
  padding: 10px 8px;
  box-shadow: 0 12px 24px rgba(20, 24, 40, .05);
}

.tech-stage-select label.active {
  border-color: var(--stage-a, var(--brand));
  background: linear-gradient(180deg, var(--stage-soft, #fff3f7), #fff 72%);
  color: var(--stage-b, var(--brand));
  box-shadow: 0 18px 34px var(--stage-shadow, rgba(217, 31, 103, .18));
  transform: translateY(-1px);
}

.tech-stage-select input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tech-stage-select span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .88) 0 11%, transparent 27%),
    linear-gradient(145deg, var(--stage-a, #3a8df7), var(--stage-b, #1d63e9));
  color: #fff;
  box-shadow: 0 14px 24px var(--stage-shadow, rgba(31, 115, 232, .16));
}

.tech-stage-select label.active span {
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .92) 0 11%, transparent 27%),
    linear-gradient(145deg, var(--stage-a, var(--brand)), var(--stage-b, var(--brand-hot)));
  color: #fff;
}

.tech-stage-select svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tech-stage-select b {
  color: currentColor;
  font-size: 12px;
  line-height: 1;
}

.tech-stage-select small {
  color: #697087;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}

.tech-update-drawer {
  border: 1px solid #edf0f7;
  border-radius: 8px;
  background: #fbfcff;
  overflow: hidden;
}

.tech-update-drawer summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 950;
  padding: 12px;
}

.tech-update-drawer label {
  padding: 0 12px 12px;
}

.tech-mobile-update input,
.tech-mobile-update textarea,
.tech-mobile-update select {
  border-radius: 8px;
  background: #fff;
}

.tech-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.tech-price-grid label {
  padding: 0;
}

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

.tech-mobile-actions .btn {
  flex: 1 1 150px;
}

.tech-mobile-actions.link-actions {
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px;
}

.tech-empty {
  padding: 18px;
}

.tech-empty h2 {
  margin: 0 0 5px;
}

.tech-finished-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 14px;
}

.section-head.compact {
  margin-bottom: 10px;
}

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

.tech-finished-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #edf0f7;
  border-radius: 8px;
  background: #fbfcff;
  color: var(--ink);
  padding: 10px;
}

.tech-finished-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tech-finished-list em {
  border-radius: 999px;
  background: #e9fbf3;
  color: #047857;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  padding: 6px 8px;
}

@media (max-width: 760px) {
  .job-progress-track,
  .mobile-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-progress-step {
    min-height: 96px;
  }

  .technician-mobile-page .hpanel-body {
    display: block;
    gap: 10px;
    padding: 0;
  }

  .technician-mobile-page .hpanel-top,
  .technician-mobile-page .icon-rail {
    display: none;
  }

  .technician-mobile-page .sidebar {
    display: none;
  }

  .technician-mobile-page .sidebar-logo {
    margin-bottom: 8px;
  }

  .technician-mobile-page .sidebar-logo img {
    width: 148px;
  }

  .technician-mobile-page .side-section-title,
  .technician-mobile-page .branch-nav {
    display: none;
  }

  .technician-mobile-page .sidebar nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .technician-mobile-page .sidebar nav a {
    flex: 0 0 auto;
    grid-template-columns: 26px 1fr;
    min-width: 136px;
    min-height: 42px;
  }

  .technician-mobile-page .sidebar nav a em {
    display: none;
  }

  .technician-mobile-page .workspace {
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 10px 10px 18px;
  }

  .technician-mobile-page .page-heading {
    margin: 4px 0 12px;
  }

  .technician-mobile-page .page-heading h1 {
    font-size: 26px;
  }

  .technician-mobile-page .page-actions {
    display: none;
  }

  .tech-mobile-hero {
    grid-template-columns: 1fr;
    margin-bottom: 10px;
    border-radius: 14px;
    padding: 14px;
  }

  .tech-mobile-hero h2 {
    font-size: 23px;
  }

  .tech-mobile-search {
    grid-template-columns: 1fr;
  }

  .tech-mobile-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    margin-bottom: 10px;
  }

  .tech-mobile-tabs a {
    flex: 0 0 108px;
    min-height: 48px;
    border-radius: 12px;
  }

  .tech-mobile-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .tech-mobile-summary article {
    min-height: 58px;
    border-radius: 12px;
    padding: 8px;
  }

  .tech-mobile-summary b {
    font-size: 22px;
  }

  .tech-mobile-job header {
    flex-direction: column;
    padding: 14px;
  }

  .tech-mobile-info {
    grid-template-columns: 1fr;
    padding: 10px 14px 2px;
  }

  .mobile-progress {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 10px 14px 4px;
  }

  .mobile-progress .job-progress-step {
    min-height: 104px;
  }

  .mobile-progress > em {
    display: none;
  }

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

  .tech-stage-select label {
    min-height: 96px;
  }

  .tech-sop-checks details:not([open]) {
    display: none;
  }

  .tech-mobile-actions .btn {
    flex-basis: 100%;
    min-height: 44px;
  }

  .tech-finished-list a {
    grid-template-columns: 1fr auto;
  }

  .tech-finished-list span {
    grid-column: 1 / -1;
  }
}

/* ServiceMate-style SOP dashboard */
.sop-dashboard-page {
  background: #f8f9fd;
}

.sop-dashboard-page .app-shell {
  background: #f8f9fd;
}

.sop-dashboard-page .hpanel-body {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  background: #f8f9fd;
}

.sop-dashboard-page .sidebar {
  top: 0;
  height: 100vh;
  border: 0;
  border-right: 1px solid #e8ebf3;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 247, 255, .96)),
    #fff;
  box-shadow: 12px 0 35px rgba(34, 39, 75, .04);
  padding: 22px 16px;
}

.sop-dashboard-page .sidebar-logo {
  margin-bottom: 30px;
}

.sop-dashboard-page .sidebar-logo img {
  width: 238px;
  max-height: 88px;
}

.sop-dashboard-page .side-section-title,
.sop-dashboard-page .branch-nav {
  display: none;
}

.sop-dashboard-page .sidebar nav {
  gap: 9px;
}

.sop-dashboard-page .sidebar nav a {
  min-height: 44px;
  border-radius: 8px;
  color: #202538;
  font-size: 14px;
  padding: 8px 12px;
}

.sop-dashboard-page .sidebar nav a span {
  border-radius: 8px;
  background: #f2f4fb;
  color: #354158;
}

.sop-dashboard-page .sidebar nav a.active,
.sop-dashboard-page .sidebar nav a:hover {
  background: linear-gradient(135deg, #5b143d, #a00058 52%, #ee0b60);
  color: #fff;
  box-shadow: 0 16px 30px rgba(160, 0, 88, .22);
}

.sop-dashboard-page .workspace {
  max-width: none;
  padding: 22px 28px 28px;
}

.sop-dashboard-page .page-heading {
  align-items: center;
  margin: -22px -28px 24px;
  border-bottom: 1px solid #e8ebf3;
  background: rgba(255, 255, 255, .9);
  padding: 22px 28px 18px;
}

.sop-dashboard-page .page-heading h1 {
  font-size: 28px;
}

.sop-dashboard-page .page-actions {
  gap: 14px;
}

.sop-dashboard-page .page-search {
  min-width: 310px;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f2f3f8;
  color: #6b7285;
  padding: 0;
}

.sop-dashboard-page .page-search input {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #202538;
  font-weight: 800;
  outline: 0;
  padding: 0 18px;
}

.job-search-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
}

.job-search-strip .page-search {
  flex: 1 1 280px;
  max-width: 520px;
  min-width: 0;
  margin: 0;
}

.job-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #5b143d, #a00058 55%, #d51d67);
  box-shadow: 0 12px 24px rgba(160, 0, 88, .18);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  padding: 0 20px;
  white-space: nowrap;
}

.job-search-button:hover {
  box-shadow: 0 15px 28px rgba(160, 0, 88, .24);
  transform: translateY(-1px);
}

.preview-job-search {
  margin: 0 0 18px;
}

.tech-search-form {
  max-width: 720px;
}

@media (max-width: 760px) {
  .job-search-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .job-search-strip .page-search {
    max-width: none;
  }
}

.sop-dashboard-page .page-primary {
  min-height: 42px;
  border: 1px solid #e8e4ff;
  border-radius: 8px;
  background: #fff;
  color: #4430c7;
  box-shadow: 0 10px 22px rgba(73, 65, 130, .06);
}

.sop-dashboard-page .page-avatar {
  background: #392bd0;
  color: #fff;
}

.technician-access-board {
  display: grid;
  gap: 18px;
  margin: 0 0 22px;
  border: 1px solid #e2e6f2;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(140, 18, 77, .06), transparent 42%),
    #fff;
  box-shadow: 0 18px 38px rgba(32, 37, 56, .06);
  padding: 20px;
}

.tech-access-head {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
}

.tech-access-user {
  width: 46px;
  height: 46px;
}

.tech-access-head h1,
.tech-access-head p {
  margin: 0;
}

.tech-access-head h1 {
  margin-top: 8px;
  color: #171821;
  font-size: 28px;
  line-height: 1.08;
}

.tech-access-head p {
  margin-top: 6px;
  color: #697087;
  font-size: 14px;
  font-weight: 800;
}

.tech-branch-lane {
  display: grid;
  gap: 12px;
}

.tech-branch-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0f7;
  padding-bottom: 10px;
}

.tech-branch-title h2,
.tech-branch-title span {
  margin: 0;
}

.tech-branch-title h2 {
  font-size: 22px;
  font-weight: 1000;
}

.tech-branch-title span {
  color: #697087;
  font-size: 13px;
  font-weight: 900;
}

.tech-access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 12px;
}

.tech-access-card {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: hidden;
  border: 1px solid #e2e6f2;
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.tech-access-card.has-overdue {
  border-color: #ffb9c6;
  background: linear-gradient(135deg, #fff1f4, #fff);
}

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

.tech-access-main h3,
.tech-access-main p {
  margin: 0;
}

.tech-access-main h3 {
  font-size: 22px;
  font-weight: 1000;
  line-height: 1.05;
}

.tech-access-main p {
  margin-top: 4px;
  color: #697087;
  font-size: 13px;
  font-weight: 950;
}

.tech-access-main i {
  display: block;
  overflow: hidden;
  height: 7px;
  margin-top: 9px;
  border-radius: 999px;
  background: #edf0f7;
}

.tech-access-main i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-hot));
}

.tech-access-card.has-overdue .tech-access-main i b {
  background: linear-gradient(90deg, #ff304c, var(--brand-hot));
}

.tech-access-main strong {
  display: grid;
  justify-items: end;
  color: #171821;
  font-size: 34px;
  font-weight: 1000;
  line-height: 1;
}

.tech-access-main strong small {
  margin-top: 4px;
  color: #697087;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.tech-stage-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.tech-stage-chips a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 34px;
  border: 1px solid #e5e9f5;
  border-radius: 8px;
  background: #f8f9fd;
  color: #697087;
  font-size: 12px;
  font-weight: 1000;
  padding: 0 9px;
}

.tech-stage-chips a.active {
  border-color: rgba(217, 31, 103, .2);
  background: #fff1f6;
  color: #9a0054;
}

.tech-stage-chips a b {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: #171821;
  font-size: 12px;
  font-weight: 1000;
}

.tech-overdue {
  justify-self: start;
  border-radius: 999px;
  background: #ffe8ee;
  color: #bd123f;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  padding: 7px 10px;
}

.sop-alarm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  border: 1px solid #ffd4dd;
  border-radius: 10px;
  background: #fff1f4;
  box-shadow: 0 14px 32px rgba(137, 16, 64, .06);
  color: inherit;
  padding: 18px 20px;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.sop-alarm:hover {
  border-color: #ff9bb3;
  box-shadow: 0 18px 38px rgba(137, 16, 64, .11);
  transform: translateY(-1px);
}

.sop-alarm > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sop-alarm-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: #b00045;
  font-weight: 950;
}

.sop-alarm h2,
.sop-alarm p {
  margin: 0;
}

.sop-alarm h2 {
  font-size: 18px;
  font-weight: 1000;
}

.sop-alarm p {
  margin-top: 3px;
  color: #40475d;
  font-size: 15px;
  font-weight: 950;
}

.sop-alarm > strong {
  display: grid;
  min-width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff304c, #e6004f);
  color: #fff;
  font-size: 22px;
}

.sop-stage-board {
  display: flex;
  align-items: stretch;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.sop-stage-card {
  --tone: #2563eb;
  --tone-soft: #e9f2ff;
  flex: 1 0 210px;
  min-height: 500px;
  border: 1px solid #e0e6f2;
  border-radius: 10px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 18px 35px rgba(34, 39, 75, .06);
  color: #121621;
  cursor: pointer;
  padding: 20px 16px 14px;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.sop-stage-card:hover {
  border-color: var(--tone);
  box-shadow: 0 24px 48px color-mix(in srgb, var(--tone), transparent 82%);
  transform: translateY(-3px);
}

.sop-stage-card.active {
  border-color: var(--tone);
  background: linear-gradient(180deg, rgba(255, 241, 246, .9), #fff 54%);
  box-shadow: 0 20px 42px rgba(217, 31, 103, .12);
}

.sop-stage-card.tone-blue { --tone: #1f73e8; --tone-soft: #eaf3ff; }
.sop-stage-card.tone-violet { --tone: #6738d8; --tone-soft: #f0ebff; }
.sop-stage-card.tone-pink { --tone: #e61e69; --tone-soft: #fff0f6; }
.sop-stage-card.tone-orange { --tone: #f58629; --tone-soft: #fff3e8; }
.sop-stage-card.tone-green { --tone: #42b96c; --tone-soft: #ebfbf0; }
.sop-stage-card.tone-teal { --tone: #22aaa5; --tone-soft: #e9fbfa; }

.sop-step-number {
  display: inline-grid;
  min-width: 48px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--tone-soft);
  color: var(--tone);
  font-size: 18px;
  font-weight: 950;
}

.sop-step-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  margin: 20px auto 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .75), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--tone), white 14%), var(--tone));
  box-shadow: 0 14px 25px color-mix(in srgb, var(--tone), transparent 62%);
  color: #fff;
}

.sop-step-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sop-stage-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 1000;
  text-transform: uppercase;
}

.sop-stage-card p {
  min-height: 64px;
  margin: 0 0 20px;
  color: #2f374d;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.5;
}

.sop-stage-card ul {
  display: grid;
  gap: 12px;
  min-height: 130px;
  margin: 0;
  padding: 0;
  text-align: left;
  list-style: none;
}

.sop-stage-card li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #364057;
  font-size: 14px;
  font-weight: 950;
}

.sop-stage-card li span {
  display: grid;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--tone);
}

.sop-stage-card li span::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.sop-stage-card footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  border-radius: 8px;
  background: #f7f8fc;
  padding: 10px;
  text-align: left;
}

.sop-stage-card footer span {
  color: #394258;
  font-size: 13px;
  font-weight: 1000;
}

.sop-stage-card footer b,
.sop-stage-card footer em {
  border-radius: 999px;
  background: var(--tone-soft);
  color: var(--tone);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  padding: 5px 8px;
}

.sop-stage-card footer em {
  min-width: 26px;
  text-align: center;
}

.stage-overdue {
  display: inline-flex;
  margin-top: 10px;
  border-radius: 999px;
  background: #fff1f4;
  color: #c3003f;
  font-size: 11px;
  font-weight: 950;
  padding: 5px 8px;
}

.sop-flow-arrow {
  align-self: center;
  color: #697087;
  font-size: 26px;
  font-weight: 400;
}

.sop-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 700px;
  gap: 22px;
  align-items: center;
  margin: 26px 0 20px;
  border: 1px solid #dde5f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 35px rgba(34, 39, 75, .05);
  padding: 18px 20px;
}

.sop-summary-copy h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.sop-summary-copy p {
  max-width: 660px;
  margin: 0;
  color: #4e566d;
  line-height: 1.6;
}

.sop-summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.sop-summary-metrics article {
  min-height: 104px;
  border: 1px solid #ebedf5;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(34, 39, 75, .04);
  padding: 14px;
}

.sop-summary-metrics span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff2e7;
  color: #c36a17;
  font-size: 11px;
  font-weight: 950;
}

.sop-summary-metrics article:nth-child(2) span { background: #e9fbfa; color: #168f85; }
.sop-summary-metrics article:nth-child(3) span { background: #fff4dc; color: #ba760f; }
.sop-summary-metrics article:nth-child(4) span { background: #ebfbf0; color: #269656; }

.sop-summary-metrics b {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.sop-summary-metrics p {
  margin: 2px 0 0;
  color: #697087;
  font-size: 12px;
  font-weight: 750;
}

.sop-ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}

.sop-dashboard-page .model-card.card {
  border-radius: 10px;
  box-shadow: 0 18px 35px rgba(34, 39, 75, .05);
}

.sop-section-work {
  margin: 0 0 18px;
}

.stage-work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 22px 22px;
}

.stage-work-card {
  --tone: #2563eb;
  --tone-soft: #e9f2ff;
  border: 1px solid #e5e9f4;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.stage-work-card.tone-blue { --tone: #1f73e8; --tone-soft: #eaf3ff; }
.stage-work-card.tone-violet { --tone: #6738d8; --tone-soft: #f0ebff; }
.stage-work-card.tone-pink { --tone: #e61e69; --tone-soft: #fff0f6; }
.stage-work-card.tone-orange { --tone: #f58629; --tone-soft: #fff3e8; }
.stage-work-card.tone-green { --tone: #42b96c; --tone-soft: #ebfbf0; }
.stage-work-card.tone-teal { --tone: #22aaa5; --tone-soft: #e9fbfa; }

.stage-work-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #edf0f7;
  color: #161b2b;
  padding: 14px;
  text-decoration: none;
}

.stage-work-head > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--tone-soft);
  color: var(--tone);
  font-weight: 950;
}

.stage-work-head h3,
.stage-work-head p {
  margin: 0;
}

.stage-work-head p {
  color: #687087;
  font-size: 12px;
  font-weight: 800;
}

.stage-work-head strong {
  color: var(--tone);
  font-size: 20px;
}

.stage-work-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.stage-job-row {
  display: grid;
  gap: 3px;
  border: 1px solid #edf0f7;
  border-radius: 8px;
  background: #fafbff;
  color: #202538;
  padding: 10px;
  text-decoration: none;
}

.stage-job-row:hover {
  border-color: var(--tone);
}

.stage-job-row b {
  font-size: 13px;
}

.stage-job-row span,
.stage-job-row em {
  color: #687087;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.stage-job-row.overdue {
  border-color: #ffc2cf;
  background: #fff6f8;
}

@media (max-width: 1280px) {
  .tech-access-head {
    grid-template-columns: 1fr;
  }

  .tech-access-head .job-search-strip,
  .tech-access-head .page-primary {
    justify-self: stretch;
  }

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

  .sop-summary-card,
  .sop-ops-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 900px) {
  .sop-dashboard-page .hpanel-body {
    grid-template-columns: 1fr;
  }

  .sop-dashboard-page .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #e8ebf3;
  }

  .sop-dashboard-page .sidebar nav {
    display: flex;
    overflow-x: auto;
  }

  .sop-dashboard-page .sidebar nav a {
    flex: 0 0 auto;
    min-width: 140px;
  }

  .sop-dashboard-page .workspace {
    padding: 16px;
  }

  .sop-dashboard-page .page-heading {
    margin: -16px -16px 18px;
    padding: 16px;
  }
}

@media (max-width: 680px) {
  .sop-dashboard-page .page-actions {
    display: none;
  }

  .tech-access-grid {
    grid-template-columns: 1fr;
  }

  .tech-access-main {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .tech-access-main strong {
    grid-column: 1 / -1;
    justify-items: start;
  }

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

  .sop-alarm,
  .sop-alarm > div {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .stage-work-grid {
    grid-template-columns: 1fr;
  }

  .sop-stage-card {
    flex-basis: 230px;
    min-height: 480px;
  }
}

.sidebar nav a span.nav-icon,
.icon-rail a span.nav-icon {
  background: var(--icon-bg, #f1f3fb);
  color: var(--icon-color, #5f3ee8);
  font-size: 0;
}

.sidebar nav a span.nav-icon svg,
.icon-rail a span.nav-icon svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar nav a.active span.nav-icon,
.sidebar nav a:hover span.nav-icon,
.icon-rail a.active span.nav-icon,
.icon-rail a:hover span.nav-icon {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

/* Sales QC and warranty */
.qc-ops-panel {
  grid-template-columns: minmax(0, 1fr) 180px;
}

.qc-ops-panel img {
  justify-self: end;
  max-width: 180px;
  border-radius: 8px;
  background: #fff;
}

.qc-stat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.qc-standard-card .check-grid {
  margin-top: 0;
}

.qc-check-preview {
  position: relative;
  margin: 0 0 8px;
  border: 1px solid #edf0f7;
  border-radius: 8px;
  background: #fbfcff;
  color: #464b61;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  padding: 9px 10px 9px 28px;
}

.qc-check-preview::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 13px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cfd5e4;
}

.qc-check-preview.done {
  border-color: #bfeee1;
  background: #f1fbf7;
  color: #0f6b5b;
}

.qc-check-preview.done::before {
  background: var(--teal);
}

.qc-progress {
  display: grid;
  gap: 6px;
  min-width: 150px;
  margin-top: 8px;
}

.qc-progress i {
  display: block;
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #eef0f7;
}

.qc-progress i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--brand-hot));
}

.qc-progress span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.qc-progress.large {
  margin: 2px 0 4px;
}

.qc-progress.large i {
  height: 12px;
}

.qc-mobile-hero {
  background:
    linear-gradient(135deg, rgba(15, 143, 120, .1), rgba(217, 31, 103, .08), rgba(23, 24, 33, .05)),
    #fff;
}

.qc-mobile-update {
  gap: 14px;
}

.qc-mobile-controls {
  margin-bottom: 0;
}

.qc-mobile-check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  counter-reset: qc-sop;
}

.qc-mobile-check-grid .check-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 246, .95);
  background:
    linear-gradient(135deg, rgba(15, 143, 120, .07), rgba(95, 62, 232, .06), rgba(255, 255, 255, .96)),
    #fff;
  padding: 0;
}

.qc-sop-section header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 14px 10px;
}

.qc-sop-section h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 15px;
}

.qc-sop-section header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.qc-sop-section header strong {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #101828;
  color: #fff;
  font-size: 12px;
  box-shadow: 0 12px 22px rgba(16, 24, 40, .16);
}

.qc-section-meter {
  overflow: hidden;
  height: 7px;
  margin: 0 14px 10px;
  border-radius: 999px;
  background: #e8edf7;
}

.qc-section-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #6f4be8);
}

.qc-mobile-check-grid .check-option {
  min-height: 46px;
  border: 1px solid #edf0f7;
  border-radius: 8px;
  background: #fbfcff;
  padding: 9px 10px;
  margin: 0 14px 9px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.qc-mobile-check-grid .check-option:hover {
  border-color: rgba(15, 143, 120, .22);
  background: #fff;
  transform: translateY(-1px);
}

.qc-mobile-check-grid .check-option input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}

.qc-mobile-check-grid .check-option b {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #eef6f4;
  color: var(--teal);
  font-size: 11px;
  font-weight: 950;
}

.qc-mobile-check-grid .check-option input:checked + b {
  background: var(--teal);
  color: #fff;
}

@media (max-width: 1180px) {
  .qc-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .qc-ops-panel,
  .qc-stat-grid,
  .qc-mobile-check-grid {
    grid-template-columns: 1fr;
  }

  .qc-ops-panel img {
    justify-self: start;
    max-width: 140px;
  }

  .qc-standard-card .check-grid {
    grid-template-columns: 1fr;
  }

  .qc-mobile-controls {
    grid-template-columns: 1fr;
  }
}

/* Incoming stock reference theme */
.incoming-stock-page {
  --incoming-blue: #0b68df;
  --incoming-ink: #111827;
  --incoming-line: #e7ebf3;
  background: #f7f9fd;
}

.incoming-stock-page .sidebar {
  background: #fbfcff;
  box-shadow: none;
}

.incoming-stock-page .sidebar nav a.active,
.incoming-stock-page .sidebar nav a:hover,
.incoming-stock-page .page-avatar,
.incoming-stock-page .dashboard-stat.primary {
  background: linear-gradient(135deg, #0d6cdf, #0754c7);
  color: #fff;
  box-shadow: 0 16px 28px rgba(13, 108, 223, .2);
}

.incoming-stock-page .sidebar nav a.active span,
.incoming-stock-page .sidebar nav a:hover span {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.incoming-stock-page .page-primary {
  border-color: #dce8ff;
  color: #0754c7;
}

.incoming-stock-page .btn,
.incoming-stock-page .page-primary:hover {
  border-color: #0d6cdf;
  background: linear-gradient(135deg, #0d6cdf, #0754c7);
}

.incoming-stock-page .btn.ghost {
  border-color: #dce8ff;
  background: #fff;
  color: #0754c7;
}

.incoming-stock-page .qc-ops-panel {
  display: none;
}

.incoming-stock-page .sop-stage-board {
  margin-bottom: 18px;
}

.incoming-stock-page .sop-stage-card {
  min-height: 360px;
}

.incoming-stock-page .sop-stage-card h2 {
  text-transform: none;
}

.incoming-stock-page .qc-stat-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.qc-ops-grid,
.qc-product-sections {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.qc-ops-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
}

.qc-product-sections {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qc-tech-row,
.qc-product-row,
.warranty-graph-row {
  display: grid;
  gap: 12px;
  align-items: center;
  border: 1px solid #edf1f8;
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px;
}

.qc-tech-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  margin-bottom: 10px;
}

.qc-tech-row small,
.qc-product-row small,
.warranty-graph-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.qc-tech-row i,
.warranty-graph-row i {
  display: block;
  overflow: hidden;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: #e9eef8;
}

.qc-tech-row i b,
.warranty-graph-row i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d6cdf, #22aaa5);
}

.qc-tech-row em {
  border-radius: 999px;
  background: #fff3e8;
  color: #c46511;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  padding: 6px 9px;
}

.warranty-graph-row {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 220px) 44px;
  margin-bottom: 10px;
}

.warranty-graph-row span {
  color: #0754c7;
  font-size: 12px;
  font-weight: 950;
  text-align: right;
}

.qc-product-row {
  grid-template-columns: minmax(0, 1fr) auto 52px;
  margin-bottom: 10px;
}

.qc-product-row em {
  color: #0754c7;
  font-style: normal;
  font-weight: 950;
  text-align: right;
}

@media (max-width: 1280px) {
  .incoming-stock-page .qc-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .qc-ops-grid,
  .qc-product-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .incoming-stock-page .qc-stat-grid,
  .warranty-graph-row,
  .qc-product-row,
  .qc-tech-row {
    grid-template-columns: 1fr;
  }
}

/* Exact incoming SOP reference screen */
.reference-sop-page {
  --ref-blue: #0d6cdf;
  --ref-blue-soft: #eaf3ff;
  --ref-green: #20a567;
  --ref-green-soft: #edf9f2;
  --ref-purple: #7b55d9;
  --ref-purple-soft: #f1ecff;
  --ref-orange: #ff861f;
  --ref-orange-soft: #fff3e8;
  --ref-ink: #12172a;
  --ref-muted: #697087;
  --ref-line: #e7ebf3;
  --ref-page: #fbfcff;
  background: var(--ref-page);
  color: var(--ref-ink);
}

.reference-sop-page .app-shell {
  background: var(--ref-page);
}

.reference-sop-page .hpanel-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
  gap: 0;
  padding: 0;
  background: var(--ref-page);
}

.reference-sop-page .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border: 0;
  border-right: 1px solid var(--ref-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  padding: 26px 16px;
}

.reference-sop-page .sidebar-logo {
  display: block;
  margin: 0 0 34px;
}

.reference-sop-page .sidebar-logo img {
  width: 172px;
  max-height: 52px;
  object-fit: contain;
}

.reference-sop-page .ref-nav,
.reference-sop-page .ref-subnav {
  display: grid;
  gap: 10px;
}

.reference-sop-page .ref-subnav {
  position: relative;
  margin: 8px 0 22px 26px;
  padding-left: 18px;
}

.reference-sop-page .ref-subnav::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: #d9deea;
}

.reference-sop-page .ref-nav a,
.reference-sop-page .ref-subnav a {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  border-radius: 7px;
  color: #12172a;
  font-size: 14px;
  font-weight: 850;
  padding: 8px 12px;
}

.reference-sop-page .ref-subnav a {
  grid-template-columns: minmax(0, 1fr);
  min-height: 38px;
  color: #22283a;
  padding-left: 10px;
}

.reference-sop-page .ref-nav a svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reference-sop-page .ref-nav a.active {
  background: var(--ref-blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(13, 108, 223, .22);
}

.reference-sop-page .ref-subnav a.active {
  background: #f0f2ff;
  color: #1857b8;
}

.reference-sop-page .quick-help {
  margin-top: auto;
  border: 1px solid var(--ref-line);
  border-radius: 10px;
  background: #fff;
  padding: 18px;
}

.reference-sop-page .quick-help b {
  display: block;
  margin: 0 0 12px;
  font-size: 14px;
}

.reference-sop-page .quick-help p {
  margin: 0 0 14px;
  color: var(--ref-muted);
  line-height: 1.5;
}

.reference-sop-page .quick-help a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 7px;
  background: var(--ref-blue);
  color: #fff;
  font-weight: 900;
}

.reference-main {
  min-width: 0;
}

.ref-topbar {
  display: grid;
  grid-template-columns: 42px minmax(320px, 520px) auto;
  align-items: center;
  gap: 18px;
  min-height: 70px;
  border-bottom: 1px solid var(--ref-line);
  background: #fff;
  padding: 0 28px;
}

.ref-menu {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #12172a;
  font-size: 24px;
}

.ref-search {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  width: min(520px, 100%);
  min-height: 42px;
  border-radius: 10px;
  background: #f4f5fb;
  color: #707789;
  padding: 0 14px;
}

.ref-search input {
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.ref-admin {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.ref-bell {
  position: relative;
  color: #1e2537;
}

.ref-bell::after {
  content: "3";
  position: absolute;
  right: -8px;
  top: -8px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: #f04455;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.ref-admin-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #1957cf;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.ref-admin-copy b,
.ref-admin-copy span {
  display: block;
}

.ref-admin-copy b {
  font-size: 14px;
}

.ref-admin-copy span {
  color: var(--ref-muted);
  font-size: 11px;
  font-weight: 750;
}

.ref-content {
  padding: 24px 28px 30px;
}

.ref-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.ref-title-row h1 {
  margin: 0 0 7px;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0;
}

.ref-title-row p {
  margin: 0;
  color: #283146;
  font-size: 15px;
  font-weight: 650;
}

.ref-title-actions {
  display: flex;
  gap: 12px;
}

.ref-outline-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid var(--ref-line);
  border-radius: 8px;
  background: #fff;
  color: #1a47a5;
  font-size: 14px;
  font-weight: 850;
  padding: 0 18px;
  cursor: pointer;
}

.ref-outline-button:hover,
.ref-outline-button:focus-visible {
  border-color: #b6c7ee;
  background: #f8fbff;
}

.ref-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 234px;
  gap: 24px;
}

.ref-workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 28px;
  align-items: stretch;
}

.ref-stage-wrap {
  position: relative;
}

.ref-stage-wrap:not(:last-child)::after {
  content: ">";
  position: absolute;
  top: 206px;
  right: -20px;
  color: #4b556b;
  font-size: 28px;
  font-weight: 500;
}

.ref-stage-card {
  --tone: var(--ref-blue);
  --tone-soft: var(--ref-blue-soft);
  --status-tone: var(--tone);
  min-height: 590px;
  border: 1px solid var(--ref-line);
  border-radius: 12px;
  background: #fff;
  padding: 20px 16px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ref-stage-card:hover,
.ref-stage-card:focus-visible,
.ref-stage-card.selected {
  border-color: color-mix(in srgb, var(--tone), #dfe7f5 34%);
  box-shadow: 0 18px 34px color-mix(in srgb, var(--tone), transparent 88%);
}

.ref-stage-card.selected {
  transform: translateY(-2px);
}

.ref-stage-card.green { --tone: var(--ref-green); --tone-soft: var(--ref-green-soft); }
.ref-stage-card.purple { --tone: var(--ref-purple); --tone-soft: var(--ref-purple-soft); }
.ref-stage-card.orange { --tone: var(--ref-orange); --tone-soft: var(--ref-orange-soft); }

.ref-stage-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--tone);
  color: #fff;
  font-weight: 950;
}

.ref-stage-card h2 {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.25;
}

.ref-stage-card h2 span {
  display: block;
  margin-bottom: 6px;
  color: var(--tone);
  font-size: 13px;
  text-transform: uppercase;
}

.ref-stage-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  margin: 0 auto 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .75), transparent 28%),
    var(--tone);
  box-shadow: 0 14px 26px color-mix(in srgb, var(--tone), transparent 65%);
  color: #fff;
}

.ref-stage-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ref-stage-card dl {
  margin: 0 0 18px;
  text-align: left;
}

.ref-stage-card dt {
  margin-bottom: 7px;
  color: #3d4558;
  font-size: 12px;
  font-weight: 750;
}

.ref-owner-chip,
.ref-assignee {
  display: flex;
  align-items: center;
  min-height: 30px;
  border-radius: 6px;
  background: var(--tone-soft);
  color: var(--tone);
  font-size: 12px;
  font-weight: 950;
  padding: 0 12px;
}

.ref-assignee {
  justify-content: space-between;
  background: #f4f5fa;
  color: #30384c;
  font-weight: 800;
}

.ref-check-list {
  display: grid;
  gap: 11px;
  margin: 26px 0 0;
  padding: 0;
  text-align: left;
  list-style: none;
}

.ref-check-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #232b3d;
  font-size: 13px;
  font-weight: 760;
}

.ref-dot {
  display: grid;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--tone);
}

.ref-dot::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.ref-stage-status {
  margin-top: 26px;
  border-radius: 7px;
  background: var(--tone-soft);
  color: color-mix(in srgb, var(--status-tone), #111 18%);
  font-size: 13px;
  font-weight: 850;
  padding: 11px 8px;
}

.ref-side-stack {
  display: grid;
  gap: 24px;
  align-content: start;
}

.ref-panel,
.ref-stage-details {
  border: 1px solid var(--ref-line);
  border-radius: 12px;
  background: #fff;
}

.ref-panel {
  padding: 20px 18px;
}

.ref-panel h3 {
  margin: 0 0 18px;
  font-size: 15px;
}

.ref-progress-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
}

.ref-progress-bar i {
  display: block;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #eef1f8;
}

.ref-progress-bar b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ref-blue);
  transition: width .2s ease;
}

.ref-progress-bar span {
  color: #12172a;
  font-size: 13px;
  font-weight: 950;
}

.ref-rules {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  color: #354057;
  font-size: 12px;
  line-height: 1.45;
  list-style: none;
}

.ref-owner-list,
.ref-legend-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ref-owner-list li,
.ref-legend-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #354057;
  font-size: 13px;
  font-weight: 800;
}

.ref-mini {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 5px;
  background: var(--tone, var(--ref-blue));
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.ref-edit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 20px;
  border: 1px solid #dbe5fb;
  border-radius: 8px;
  color: #1a47a5;
  font-size: 13px;
  font-weight: 850;
  background: #fff;
  cursor: pointer;
  width: 100%;
}

.ref-live-stage {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.ref-live-stage h4 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 14px;
  line-height: 1.25;
}

.ref-live-stage p {
  margin: 0;
  color: #4b556b;
  font-size: 12px;
  line-height: 1.45;
}

.ref-live-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.ref-live-meta p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  color: #4b556b;
  font-size: 12px;
  font-weight: 750;
}

.ref-live-meta span {
  color: #111827;
  text-align: right;
}

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

.ref-action-buttons button {
  min-height: 34px;
  border: 1px solid #dbe5fb;
  border-radius: 7px;
  background: #fff;
  color: #1d4da8;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.ref-action-buttons button:hover,
.ref-edit-button:hover {
  background: #f8fbff;
}

.ref-live-message {
  min-height: 18px;
  margin: 12px 0 0;
  color: #159a69;
  font-size: 12px;
  font-weight: 800;
}

.ref-stage-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 28px;
  padding: 26px 20px;
}

.ref-stage-details h3 {
  grid-column: 1 / -1;
  margin: 0 0 20px;
  font-size: 15px;
}

.ref-detail-card {
  min-height: 230px;
  border-right: 1px solid var(--ref-line);
  padding: 0 22px;
}

.ref-detail-card:last-child {
  border-right: 0;
}

.ref-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ref-detail-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--tone-soft);
  color: var(--tone);
}

.ref-detail-card h4 {
  margin: 0;
  color: var(--tone);
  font-size: 15px;
}

.ref-detail-card p {
  margin: 0 0 12px;
  color: #354057;
  font-size: 13px;
  line-height: 1.55;
}

.ref-detail-card b {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.ref-detail-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 15px;
  color: #12172a;
  font-size: 12px;
  line-height: 1.35;
}

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

  .ref-side-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ref-workflow {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .ref-stage-wrap::after {
    display: none;
  }
}

@media (max-width: 900px) {
  .reference-sop-page .hpanel-body,
  .ref-topbar,
  .ref-stage-details,
  .ref-side-stack {
    grid-template-columns: 1fr;
  }

  .reference-sop-page .sidebar {
    position: static;
    height: auto;
  }

  .ref-search {
    justify-self: stretch;
  }

  .ref-title-row {
    flex-direction: column;
  }

  .ref-detail-card {
    border-right: 0;
    border-bottom: 1px solid var(--ref-line);
    padding: 18px 0;
  }
}

@media (max-width: 640px) {
  .ref-content,
  .ref-topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .ref-workflow {
    grid-template-columns: 1fr;
  }

  .ref-title-actions,
  .ref-admin-copy {
    display: none;
  }
}

/* Final visible logo sizing */
.sop-dashboard-page .hpanel-body {
  grid-template-columns: 340px minmax(0, 1fr);
}

.sop-dashboard-page .sidebar {
  padding-left: 24px;
  padding-right: 24px;
}

.sop-dashboard-page .sidebar a.sidebar-logo {
  display: flex;
  grid-template-columns: none;
  justify-content: center;
  align-items: center;
  min-height: 112px;
  margin-bottom: 22px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.sop-dashboard-page .sidebar a.sidebar-logo:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.sop-dashboard-page .sidebar a.sidebar-logo img {
  width: 286px;
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .sop-dashboard-page .hpanel-body {
    grid-template-columns: 1fr;
  }

  .sop-dashboard-page .sidebar a.sidebar-logo {
    justify-content: flex-start;
    min-height: auto;
  }

  .sop-dashboard-page .sidebar a.sidebar-logo img {
    width: 220px;
  }
}

/* 2026 polish: keep the TEC PRO logo large and readable on every app page. */
.hpanel-body {
  grid-template-columns: 340px minmax(0, 1fr);
}

.sidebar {
  padding-left: 24px;
  padding-right: 24px;
}

.sidebar a.sidebar-logo,
.sidebar-logo {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  margin-bottom: 22px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.sidebar a.sidebar-logo:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.sidebar a.sidebar-logo img,
.sidebar-logo img,
.sop-dashboard-page .sidebar-logo img,
.technician-mobile-page .sidebar-logo img,
.reference-sop-page .sidebar-logo img {
  width: 286px;
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
}

.hpanel-logo img {
  width: 240px;
  max-height: 78px;
  object-fit: contain;
}

.login-card img {
  width: 260px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .hpanel-body,
  .sop-dashboard-page .hpanel-body {
    grid-template-columns: 1fr;
  }

  .sidebar a.sidebar-logo,
  .sidebar-logo {
    justify-content: flex-start;
    min-height: auto;
  }

  .sidebar a.sidebar-logo img,
  .sidebar-logo img,
  .sop-dashboard-page .sidebar-logo img,
  .technician-mobile-page .sidebar-logo img,
  .reference-sop-page .sidebar-logo img {
    width: 220px;
  }
}

/* v71: compact icon-only service navigation */
.hpanel-body,
.sop-dashboard-page .hpanel-body,
.reference-sop-page .hpanel-body {
  grid-template-columns: 86px minmax(0, 1fr) !important;
  gap: 18px;
  padding: 16px;
}

.sidebar {
  display: none !important;
}

.icon-rail {
  position: sticky;
  top: 16px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: calc(100vh - 32px);
  padding: 12px 8px;
  border: 1px solid #e3e5ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 48px rgba(37, 28, 61, .08);
}

.icon-rail .rail-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 54px;
  margin-bottom: 4px;
  border-radius: 14px;
  background: #fff;
}

.icon-rail .rail-logo img {
  width: 56px;
  max-height: 40px;
  object-fit: contain;
}

.icon-rail a:not(.rail-logo) {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  border-radius: 16px;
  color: #6b7280;
  font-size: 0;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.icon-rail a:not(.rail-logo):hover,
.icon-rail a.active:not(.rail-logo) {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand), var(--brand-hot));
  box-shadow: 0 14px 30px rgba(153, 0, 82, .24);
  color: #fff;
  transform: translateY(-1px);
}

.icon-rail a span.nav-icon {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: var(--icon-bg, #f1f3fb);
  color: var(--icon-color, #5f3ee8);
}

.icon-rail a span.nav-icon svg {
  width: 20px;
  height: 20px;
}

.icon-rail a.active span.nav-icon,
.icon-rail a:hover span.nav-icon {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.icon-rail .rail-bottom {
  margin-top: auto;
}

@media (max-width: 900px) {
  .hpanel-body,
  .sop-dashboard-page .hpanel-body,
  .reference-sop-page .hpanel-body {
    grid-template-columns: 68px minmax(0, 1fr) !important;
    gap: 10px;
    padding: 10px;
  }

  .icon-rail {
    top: 10px;
    height: calc(100vh - 20px);
    border-radius: 16px;
    padding: 10px 6px;
  }

  .icon-rail .rail-logo,
  .icon-rail a:not(.rail-logo) {
    width: 48px;
    height: 48px;
    min-height: 48px;
  }

  .icon-rail .rail-logo img {
    width: 46px;
  }

  .icon-rail a span.nav-icon {
    width: 30px;
    height: 30px;
  }
}

/* Premium stage-aware service job list */
.jobs-table-wrap {
  border-color: #ded8f2;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(255, 246, 251, .72)),
    #fff;
  box-shadow: 0 24px 56px rgba(38, 32, 70, .1);
  padding: 10px;
}

#jobs-table {
  min-width: 1280px;
  border-collapse: separate;
  border-spacing: 0 12px;
  font-size: 15px;
}

#jobs-table thead {
  background: transparent;
}

#jobs-table th {
  border: 0;
  background: linear-gradient(180deg, #f3edff, #e9e2fb);
  color: #463f68;
  font-size: 13px;
  font-weight: 1000;
  padding: 16px 14px;
}

#jobs-table th:first-child {
  border-radius: 14px 0 0 14px;
}

#jobs-table th:last-child {
  border-radius: 0 14px 14px 0;
}

#jobs-table td {
  border-bottom: 1px solid #e4e9f6;
  border-top: 1px solid #eef1f8;
  background: #fff;
  color: #161925;
  font-size: 15px;
  padding: 18px 14px;
}

#jobs-table .job-row td {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .86) 44%, var(--stage-soft, #f8f6ff)),
    #fff;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

#jobs-table .job-row td:first-child {
  border-left: 5px solid var(--stage-a, var(--brand));
  border-radius: 16px 0 0 16px;
  box-shadow: -2px 0 0 rgba(255, 255, 255, .9) inset;
}

#jobs-table .job-row td:last-child {
  border-right: 1px solid #e4e9f6;
  border-radius: 0 16px 16px 0;
}

#jobs-table .job-row:hover td {
  background:
    linear-gradient(180deg, #fff, var(--stage-soft, #f9f6ff)),
    #fff;
  box-shadow: 0 18px 36px var(--stage-shadow, rgba(58, 40, 115, .12));
}

#jobs-table .job-row:hover td:first-child {
  transform: translateX(1px);
}

#jobs-table td b {
  color: #121625;
  font-size: 17px;
  font-weight: 1000;
}

#jobs-table td span {
  color: #596078;
  font-size: 14px;
  font-weight: 780;
  line-height: 1.38;
}

#jobs-table .job-status-badge {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, .75);
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .9) 0 9%, transparent 26%),
    linear-gradient(145deg, var(--stage-a, #36c5bd), var(--stage-b, #169b95));
  box-shadow: 0 12px 24px var(--stage-shadow, rgba(20, 130, 120, .16));
  color: #fff;
  font-size: 13px;
  padding: 6px 14px;
}

#jobs-table .job-stage-text {
  display: inline-flex;
  margin: 7px 0 3px;
  color: var(--stage-b, var(--brand));
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}

#jobs-table .stage-mini-card {
  grid-template-columns: 48px minmax(122px, 1fr);
  min-width: 230px;
  margin-top: 8px;
  border: 1px solid color-mix(in srgb, var(--stage-a, #7c3aed) 36%, #ffffff);
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 6%, rgba(255, 255, 255, .95) 0 12%, transparent 32%),
    linear-gradient(145deg, var(--stage-soft, #f7f3ff), #fff 68%);
  box-shadow: 0 18px 34px var(--stage-shadow, rgba(93, 47, 216, .18));
  padding: 12px;
}

#jobs-table .stage-mini-card > span {
  width: 48px;
  height: 48px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .48),
    0 14px 24px var(--stage-shadow, rgba(93, 47, 216, .22));
}

#jobs-table .stage-mini-card svg {
  width: 24px;
  height: 24px;
}

#jobs-table .stage-mini-card b {
  color: #171925;
  font-size: 14px;
  letter-spacing: 0;
}

#jobs-table .stage-mini-card .row-progress {
  height: 10px;
  margin-top: 5px;
  background: #e9edf6;
  box-shadow: inset 0 1px 2px rgba(28, 34, 56, .08);
}

#jobs-table .stage-mini-card .row-progress i {
  box-shadow: 0 0 16px var(--stage-shadow, rgba(93, 47, 216, .22));
}

#jobs-table .table-actions {
  display: grid;
  min-width: 168px;
  gap: 12px;
}

#jobs-table .job-update-button {
  min-height: 58px;
  min-width: 160px;
  border-radius: 14px;
  font-size: 17px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .78),
    0 8px 0 #a46300,
    0 18px 30px rgba(180, 105, 0, .26);
}

#jobs-table .whatsapp-bill-button {
  min-height: 56px;
  min-width: 190px;
  border-radius: 14px;
  background: linear-gradient(145deg, #39ea81 0%, #23c967 55%, #10a452 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .36),
    0 8px 0 #087a3b,
    0 18px 32px rgba(18, 140, 74, .25);
  color: #062813;
  font-size: 15px;
}

#jobs-table .wa-glyph {
  width: 30px;
  height: 30px;
}

#jobs-table .wa-glyph svg {
  width: 21px;
  height: 21px;
}

#jobs-table .overdue-row td {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .95), #fff1f2),
    #fff1f2;
}

@media (max-width: 760px) {
  .jobs-table-wrap {
    padding: 6px;
  }

  #jobs-table {
    min-width: 1120px;
    font-size: 14px;
  }

  #jobs-table .stage-mini-card {
    min-width: 200px;
  }
}

/* V45: compact TEC PRO gradient job list */
.jobs-table-wrap {
  border-color: #e7dce7;
  background: #fff;
  box-shadow: 0 14px 34px rgba(48, 16, 39, .08);
  padding: 6px;
}

#jobs-table {
  min-width: 1180px;
  border-spacing: 0 8px;
  font-size: 14px;
}

#jobs-table th {
  background: linear-gradient(135deg, #351729 0%, #8a0d4a 52%, #d31869 100%);
  color: #fff;
  font-size: 12px;
  padding: 13px 12px;
  text-shadow: 0 1px 1px rgba(25, 8, 20, .22);
}

#jobs-table td {
  padding: 13px 12px;
  font-size: 14px;
}

#jobs-table .job-row td {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 250, 253, .94)),
    #fff;
}

#jobs-table .job-row td:first-child {
  border-left: 4px solid #b20d57;
  border-radius: 12px 0 0 12px;
}

#jobs-table .job-row td:last-child {
  border-radius: 0 12px 12px 0;
}

#jobs-table .job-row:hover td {
  background:
    linear-gradient(180deg, #fff, #fff7fb),
    #fff;
  box-shadow: 0 10px 24px rgba(143, 13, 76, .1);
}

#jobs-table td b {
  font-size: 16px;
}

#jobs-table td span {
  font-size: 13px;
  font-weight: 760;
}

#jobs-table .job-customer-cell {
  min-width: 210px;
}

#jobs-table .job-customer-name {
  display: inline-block;
  margin-bottom: 4px;
  color: #151520;
  font-size: 17px;
  font-weight: 1000;
  letter-spacing: 0;
}

#jobs-table .job-customer-meta {
  display: grid;
  gap: 3px;
  color: #535b73;
  line-height: 1.22;
}

#jobs-table .job-customer-meta strong {
  color: #8f0d4c;
  font-size: 16px;
  font-weight: 1000;
}

#jobs-table .job-customer-meta em {
  color: #5c637a;
  font-style: normal;
  font-size: 13px;
  font-weight: 850;
}

#jobs-table .job-status-badge {
  min-height: 28px;
  border: 1px solid #f0d6e4;
  background: #fff1f7;
  box-shadow: none;
  color: #8f0d4c;
  font-size: 12px;
  padding: 5px 12px;
}

#jobs-table .job-stage-text {
  margin: 5px 0 2px;
  color: #5f163f;
  font-size: 12px;
}

#jobs-table .stage-mini-card {
  grid-template-columns: 36px minmax(104px, 1fr);
  min-width: 182px;
  margin-top: 6px;
  border: 1px solid #edd9e7;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff8fb 0%, #fff 68%);
  box-shadow: 0 10px 22px rgba(143, 13, 76, .1);
  padding: 9px;
}

#jobs-table .stage-mini-card > span {
  width: 36px;
  height: 36px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .92) 0 10%, rgba(255, 255, 255, .34) 11% 18%, transparent 32%),
    linear-gradient(145deg, var(--stage-a, #865cf4) 0%, var(--stage-b, #5d2fd8) 100%);
  box-shadow:
    inset -7px -8px 14px rgba(30, 15, 80, .16),
    inset 3px 3px 9px rgba(255, 255, 255, .24),
    0 10px 18px var(--stage-shadow, rgba(103, 56, 216, .24));
}

#jobs-table .stage-mini-card svg {
  width: 19px;
  height: 19px;
}

#jobs-table .stage-mini-card b {
  color: #211524;
  font-size: 12px;
}

#jobs-table .stage-mini-card .row-progress {
  height: 7px;
  margin-top: 3px;
  background: #f0edf3;
  box-shadow: none;
}

#jobs-table .stage-mini-card .row-progress i {
  background: linear-gradient(90deg, var(--stage-b, #5d2fd8), var(--stage-a, #865cf4));
  box-shadow: 0 0 10px var(--stage-shadow, rgba(103, 56, 216, .2));
}

#jobs-table .table-actions {
  min-width: 150px;
  gap: 9px;
}

#jobs-table .job-update-button {
  min-height: 46px;
  min-width: 132px;
  border-radius: 11px;
  font-size: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .64),
    0 4px 0 #a46300,
    0 10px 18px rgba(180, 105, 0, .18);
}

#jobs-table .whatsapp-bill-button {
  min-height: 46px;
  min-width: 162px;
  border-radius: 11px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    0 4px 0 #087a3b,
    0 10px 18px rgba(18, 140, 74, .18);
  font-size: 14px;
}

#jobs-table .wa-glyph {
  width: 25px;
  height: 25px;
}

#jobs-table .wa-glyph svg {
  width: 18px;
  height: 18px;
}

/* v75: TEC PRO premium service CRM redesign layer.
   This is intentionally CSS-only so existing PHP, database, billing and SOP logic stay unchanged. */
:root {
  --bg-base-v75: #faf6f0;
  --bg-panel-v75: #ffffff;
  --bg-subtle-v75: #f5f0e8;
  --bg-hover-v75: #f0eadf;
  --ink-1-v75: #1a1d23;
  --ink-2-v75: #4b5160;
  --ink-3-v75: #7b8290;
  --line-v75: #ece6de;
  --line-2-v75: #d8cfc2;
  --brand-v75: #b4123e;
  --brand-deep-v75: #8a0d2f;
  --brand-hot-v75: #e11d48;
  --brand-soft-v75: #ffe4e9;
  --brand-tint-v75: #fff1f4;
  --shadow-xs-v75: 0 1px 2px rgba(26, 29, 35, .05);
  --shadow-sm-v75: 0 2px 8px rgba(26, 29, 35, .06);
  --shadow-md-v75: 0 10px 26px rgba(26, 29, 35, .08);
  --shadow-lg-v75: 0 22px 46px rgba(26, 29, 35, .11);
  --shadow-brand-v75: 0 12px 30px rgba(180, 18, 62, .22);
}

body {
  background:
    radial-gradient(circle at 78% 0%, rgba(225, 29, 72, .10), transparent 24%),
    radial-gradient(circle at 0% 18%, rgba(138, 13, 47, .07), transparent 26%),
    linear-gradient(180deg, #fffaf6 0%, var(--bg-base-v75) 52%, #f4f1ea 100%);
  color: var(--ink-1-v75);
  font-family: "Plus Jakarta Sans", Helvetica, Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .34;
  background-image:
    radial-gradient(rgba(26, 29, 35, .05) .7px, transparent .7px);
  background-size: 18px 18px;
  mix-blend-mode: multiply;
}

h1,
h2,
h3,
.page-heading h1,
.tech-access-main h3,
.sop-stage-card h2,
.card > h2 {
  font-family: "Bricolage Grotesque", "Plus Jakarta Sans", Helvetica, Arial, sans-serif;
  letter-spacing: -.02em;
}

.app-shell,
.sop-dashboard-page .app-shell {
  position: relative;
  z-index: 1;
  background: transparent;
}

.hpanel-top {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 70px;
  border-bottom: 1px solid var(--line-v75);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-xs-v75);
  padding: 0 22px;
}

.hpanel-logo img {
  width: 168px;
  max-height: 52px;
  border: 0;
  padding: 0;
  background: transparent;
  object-fit: contain;
}

.hpanel-top-actions {
  gap: 10px;
}

.top-offer,
.ai-button,
.circle-button,
.page-primary,
.job-search-button {
  min-height: 42px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
}

.top-offer,
.page-primary,
.job-search-button {
  border: 0;
  background: linear-gradient(135deg, var(--brand-v75), var(--brand-deep-v75));
  color: #fff;
  box-shadow: var(--shadow-brand-v75);
}

.top-offer:hover,
.page-primary:hover,
.job-search-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(180, 18, 62, .30);
}

.ai-button {
  border: 1px solid #181a22;
  background: #181a22;
  color: #fff;
  padding: 0 16px;
}

.circle-button,
.page-avatar,
.tech-access-user {
  border: 1px solid var(--line-v75);
  background: var(--bg-subtle-v75);
  color: var(--ink-2-v75);
}

.hpanel-body,
.sop-dashboard-page .hpanel-body,
.reference-sop-page .hpanel-body {
  grid-template-columns: 74px minmax(0, 1fr) !important;
  gap: 20px;
  padding: 18px;
  background: transparent;
}

.icon-rail {
  top: 18px;
  height: calc(100vh - 36px);
  gap: 10px;
  border: 1px solid var(--line-v75);
  border-radius: 20px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md-v75);
  padding: 12px 8px;
}

.icon-rail .rail-logo {
  width: 56px;
  height: 52px;
  margin-bottom: 8px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--brand-v75), var(--brand-hot-v75));
  box-shadow: var(--shadow-brand-v75);
}

.icon-rail .rail-logo img {
  width: 48px;
  max-height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .10));
}

.icon-rail a:not(.rail-logo) {
  width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 15px;
  color: var(--ink-3-v75);
}

.icon-rail a:not(.rail-logo):hover,
.icon-rail a.active:not(.rail-logo) {
  background: var(--brand-tint-v75);
  color: var(--brand-v75);
  box-shadow: inset 3px 0 0 var(--brand-v75), var(--shadow-sm-v75);
  transform: none;
}

.icon-rail a span.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: transparent;
  color: currentColor;
}

.icon-rail a.active span.nav-icon,
.icon-rail a:hover span.nav-icon {
  background: transparent;
  color: currentColor;
}

.workspace,
.sop-dashboard-page .workspace {
  max-width: none;
  padding: 20px 24px 56px;
}

.page-heading {
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.page-heading h1 {
  color: var(--ink-1-v75);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.02;
}

.page-heading p {
  color: var(--ink-2-v75);
  font-size: 15px;
  font-weight: 650;
}

.page-actions {
  gap: 12px;
}

.page-search,
.job-search-strip .page-search {
  min-width: 360px;
  border: 1px solid var(--line-v75);
  border-radius: 14px;
  background: var(--bg-subtle-v75);
  box-shadow: none;
}

.page-search input {
  min-height: 44px;
  color: var(--ink-1-v75);
  font-weight: 700;
}

.page-search:focus-within {
  border-color: var(--brand-v75);
  background: #fff;
  box-shadow: 0 0 0 4px var(--brand-soft-v75);
}

.technician-access-board {
  border: 1px solid var(--line-v75);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 0%, rgba(180, 18, 62, .10), transparent 20%),
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(255, 241, 244, .50)),
    var(--bg-panel-v75);
  box-shadow: var(--shadow-md-v75);
  padding: 22px;
}

.tech-branch-title {
  border-bottom-color: var(--line-v75);
}

.tech-branch-title h2 {
  font-size: 24px;
  font-weight: 800;
}

.tech-branch-title span {
  color: var(--ink-3-v75);
  font-size: 12px;
  font-weight: 800;
}

.tech-access-grid {
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 14px;
}

.tech-access-card {
  border: 1px solid var(--line-v75);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-sm-v75);
  padding: 16px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.tech-access-card:hover {
  border-color: var(--line-2-v75);
  box-shadow: var(--shadow-md-v75);
  transform: translateY(-2px);
}

.tech-access-card.has-overdue {
  border-color: #ffc2cf;
  background: linear-gradient(135deg, #fff1f4, #fff);
}

.tech-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #3a1229, var(--brand-v75), var(--brand-hot-v75));
  color: #fff;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 16px;
  font-weight: 800;
  box-shadow: var(--shadow-brand-v75);
}

.tech-access-main h3 {
  color: var(--ink-1-v75);
  font-size: 24px;
  font-weight: 800;
}

.tech-access-main p {
  color: var(--ink-2-v75);
  font-size: 13px;
  font-weight: 750;
}

.tech-access-main i {
  height: 8px;
  background: #ede9e1;
}

.tech-access-main i b,
.tech-access-card.has-overdue .tech-access-main i b {
  background: linear-gradient(90deg, #30101f, var(--brand-v75), var(--brand-hot-v75));
}

.tech-access-main strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 34px;
}

.tech-stage-chips a {
  min-height: 36px;
  border-color: var(--line-v75);
  border-radius: 10px;
  background: var(--bg-subtle-v75);
  color: var(--ink-2-v75);
  font-size: 12px;
}

.tech-stage-chips a.active {
  border-color: var(--brand-soft-v75);
  background: var(--brand-tint-v75);
  color: var(--brand-v75);
}

.sop-alarm {
  border: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, .22), transparent 24%),
    linear-gradient(135deg, var(--brand-v75), var(--brand-deep-v75) 68%, #5c0721);
  box-shadow: var(--shadow-brand-v75);
  color: #fff;
  padding: 22px 24px;
}

.sop-alarm h2,
.sop-alarm p {
  color: #fff;
}

.sop-alarm p {
  opacity: .82;
}

.sop-alarm-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.sop-alarm > strong {
  min-width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #fff;
  color: var(--brand-v75);
  font-family: "JetBrains Mono", monospace;
  font-size: 28px;
  box-shadow: var(--shadow-md-v75);
}

.sop-stage-board {
  gap: 14px;
  padding-bottom: 12px;
}

.sop-stage-card {
  min-height: 480px;
  border: 1px solid var(--line-v75);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-sm-v75);
  padding: 18px 16px 14px;
}

.sop-stage-card:hover {
  box-shadow: var(--shadow-md-v75);
}

.sop-stage-card.active {
  background: linear-gradient(180deg, var(--tone-soft), #fff 58%);
  box-shadow: 0 0 0 3px var(--tone-soft), var(--shadow-md-v75);
}

.sop-step-number {
  min-width: 50px;
  height: 34px;
  border-radius: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
}

.sop-step-icon {
  width: 78px;
  height: 78px;
  margin: 18px auto 20px;
  box-shadow:
    inset -10px -12px 18px rgba(18, 22, 33, .12),
    inset 4px 5px 12px rgba(255, 255, 255, .30),
    0 16px 28px color-mix(in srgb, var(--tone), transparent 66%);
}

.sop-stage-card h2 {
  font-size: 20px;
  font-weight: 800;
}

.sop-stage-card p {
  color: var(--ink-2-v75);
  font-size: 14px;
  font-weight: 700;
}

.sop-stage-card li {
  color: var(--ink-2-v75);
  font-size: 14px;
  font-weight: 800;
}

.sop-stage-card footer {
  background: var(--bg-subtle-v75);
  border-radius: 12px;
}

.card,
.stat-grid article {
  border-color: var(--line-v75);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-sm-v75);
}

.card > h2,
.card > .section-head {
  border-bottom-color: var(--line-v75);
}

.section-head h2 {
  font-size: 22px;
  font-weight: 800;
}

.section-head p {
  color: var(--ink-3-v75);
  font-weight: 650;
}

#jobs-table th {
  background: linear-gradient(135deg, #351729 0%, var(--brand-deep-v75) 52%, var(--brand-hot-v75) 100%);
}

#jobs-table .job-customer-name,
#jobs-table td b {
  color: var(--ink-1-v75);
  font-weight: 900;
}

#jobs-table .job-customer-meta strong {
  color: var(--brand-v75);
}

@media (max-width: 1280px) {
  .tech-access-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 900px) {
  .hpanel-top {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .hpanel-logo img {
    width: 140px;
  }

  .hpanel-body,
  .sop-dashboard-page .hpanel-body,
  .reference-sop-page .hpanel-body {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    gap: 10px;
    padding: 10px;
  }

  .workspace,
  .sop-dashboard-page .workspace {
    padding: 12px 8px 50px;
  }

  .page-heading h1 {
    font-size: 30px;
  }

  .page-search,
  .job-search-strip .page-search {
    min-width: 0;
    width: 100%;
  }

  .tech-access-grid {
    grid-template-columns: 1fr;
  }

  .sop-stage-card {
    min-height: 430px;
  }
}
