:root {
  color-scheme: light;
  --bg: #eef3f9;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --surface-strong: #dfe8f5;
  --text: #10233f;
  --muted: #59708f;
  --line: #c7d4e5;
  --navy: #0a1b37;
  --navy-soft: #12305d;
  --blue: #1877ff;
  --blue-strong: #0f5dd3;
  --blue-glow: rgba(24, 119, 255, 0.18);
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --warning: #9a6700;
  --warning-bg: #fff8e1;
  --success: #0f766e;
  --success-bg: #e7f8f6;
  --shadow: 0 18px 54px rgba(10, 27, 55, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(180deg, #f5f8fc 0%, #e9f0f9 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(24, 119, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #f5f8fc 0%, #e9f0f9 100%);
}

body.page-splash {
  overflow-x: hidden;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(24, 119, 255, 0.35);
  outline-offset: 2px;
}

.page-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.layout-shell {
  display: grid;
  gap: 20px;
}

.narrow-shell {
  max-width: 760px;
}

.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(199, 212, 229, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card,
.report-shell,
.tracking-card,
.tracking-summary-card,
.timeline-card,
.auth-card,
.success-card,
.info-card {
  padding: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-strong);
}

h1,
h2 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: 1.1rem;
}

p {
  margin: 0;
}

.lead {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.wrap-text {
  word-break: break-word;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 20px;
}

.info-grid {
  display: grid;
  gap: 16px;
}

.subtle-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 245, 253, 0.96));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, #3ca2ff 100%);
  box-shadow: 0 12px 24px rgba(24, 119, 255, 0.24);
}

.btn-primary[disabled],
.btn-primary.is-loading {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.btn-secondary {
  color: var(--navy);
  background: #e8f0fb;
}

.btn-ghost {
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--line);
}

.btn-lg {
  min-width: 170px;
}

.btn-block {
  width: 100%;
}

.text-link {
  color: var(--blue-strong);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.flash-stack {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: grid;
  gap: 8px;
  width: min(100% - 24px, 760px);
  margin: 12px auto 0;
}

.inline-flash {
  position: static;
  width: 100%;
  margin: 0;
}

.flash,
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  line-height: 1.55;
}

.flash-warning {
  background: var(--warning-bg);
  border-color: #f2d88a;
  color: var(--warning);
}

.flash-error,
.alert-danger {
  background: var(--danger-bg);
  border-color: #f4b4ad;
  color: var(--danger);
}

.alert-list {
  margin: 8px 0 0;
  padding-left: 20px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span,
.summary-grid dt {
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

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

.form-grid {
  display: grid;
  gap: 16px;
}

.field-full,
.summary-full {
  grid-column: 1 / -1;
}

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

.stepper {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.step-pill {
  padding: 12px 14px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf3fb;
  border: 1px solid transparent;
  font-weight: 700;
  text-align: center;
}

.step-pill.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-strong) 100%);
  border-color: rgba(255, 255, 255, 0.22);
}

.report-step {
  display: grid;
  gap: 18px;
}

.upload-card,
.confirmation-card {
  display: grid;
  gap: 14px;
}

.upload-dropzone {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1.5px dashed #7ea7e8;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(232, 240, 251, 0.85), rgba(255, 255, 255, 0.95));
}

.upload-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.upload-title {
  font-weight: 800;
}

.upload-copy,
.upload-hint {
  color: var(--muted);
}

.photo-preview-grid {
  display: grid;
  gap: 12px;
}

.photo-preview-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.photo-preview-card img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.photo-preview-meta {
  min-width: 0;
}

.photo-preview-meta strong,
.photo-preview-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-preview-remove {
  min-height: 44px;
  padding: 0 14px;
  color: var(--danger);
  background: #fff;
  border: 1px solid #efc0ba;
  border-radius: 999px;
}

.summary-grid {
  display: grid;
  gap: 14px;
}

.summary-grid div {
  min-width: 0;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.summary-grid dd {
  margin: 8px 0 0;
  line-height: 1.6;
  white-space: pre-line;
}

.compact-grid dd {
  white-space: normal;
}

.tracking-feedback-card,
.feedback-card {
  padding: 24px;
}

.feedback-card {
  display: grid;
  gap: 20px;
}

.feedback-fieldset {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.feedback-fieldset legend {
  padding: 0;
  font-weight: 700;
  line-height: 1.6;
}

.feedback-stars {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 8px;
}

.feedback-stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feedback-stars label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(24, 119, 255, 0.14);
  background: var(--surface-soft);
  color: #b8c6d9;
  font-size: 2rem;
  transition: transform 0.18s ease, color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.feedback-stars label:hover,
.feedback-stars label:hover ~ label,
.feedback-stars input:checked + label,
.feedback-stars input:checked + label ~ label {
  color: #f4b400;
  background: rgba(24, 119, 255, 0.08);
}

.feedback-stars label:hover {
  transform: translateY(-1px);
}

.feedback-stars input:focus-visible + label {
  outline: 3px solid rgba(24, 119, 255, 0.35);
  outline-offset: 2px;
}

.feedback-rating-legend {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.feedback-result {
  display: grid;
  gap: 14px;
}

.feedback-rating-display {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.feedback-rating-display strong {
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  letter-spacing: 0.06em;
  color: #f4b400;
}

.feedback-rating-display span {
  font-weight: 700;
}

.form-actions {
  justify-content: space-between;
  margin-top: 24px;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(24, 119, 255, 0.12);
  color: var(--blue-strong);
}

.success-badge {
  background: var(--success-bg);
  color: var(--success);
}

.status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.status-meta {
  color: var(--muted);
  font-weight: 600;
}

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 14px;
  align-items: start;
}

.timeline-dot {
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--blue) 0%, var(--navy) 100%);
  box-shadow: 0 0 0 6px rgba(24, 119, 255, 0.1);
}

.timeline-item:not(:last-child) .timeline-dot::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 18px;
  width: 2px;
  height: calc(100% + 14px);
  background: linear-gradient(180deg, rgba(24, 119, 255, 0.35), rgba(16, 35, 63, 0.08));
}

.timeline-content {
  display: grid;
  gap: 4px;
}

.timeline-content span {
  color: var(--muted);
}

.splash-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.splash-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 35, 63, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 35, 63, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 88%);
}

.splash-card-premium {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  display: grid;
  gap: 24px;
  padding: 24px;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(104, 141, 197, 0.24);
  background:
    linear-gradient(155deg, rgba(7, 18, 38, 0.98) 0%, rgba(10, 27, 55, 0.96) 58%, rgba(13, 46, 89, 0.94) 100%);
  color: #fff;
  box-shadow: 0 28px 80px rgba(10, 27, 55, 0.34);
}

.splash-visual {
  position: relative;
  display: grid;
  min-height: 320px;
  align-items: center;
}

.splash-asset-frame {
  position: relative;
  min-height: 320px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    radial-gradient(circle at 70% 30%, rgba(24, 119, 255, 0.28), transparent 34%),
    linear-gradient(180deg, rgba(13, 46, 89, 0.46), rgba(7, 18, 38, 0.18));
  overflow: hidden;
}

.splash-glow {
  position: absolute;
  inset: auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 119, 255, 0.38), rgba(24, 119, 255, 0));
  filter: blur(8px);
}

.splash-glow-left {
  left: -24px;
  bottom: -18px;
}

.splash-glow-right {
  right: -12px;
  top: -10px;
}

.splash-factory-line {
  position: absolute;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(142, 185, 255, 0.55), rgba(255, 255, 255, 0));
}

.splash-factory-line-top {
  top: 82px;
}

.splash-factory-line-bottom {
  bottom: 78px;
}

.splash-gear-shell {
  position: absolute;
  right: -18px;
  top: 30px;
  width: clamp(190px, 46vw, 300px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 119, 255, 0.22), rgba(24, 119, 255, 0.02));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 50px rgba(24, 119, 255, 0.16);
}

.gear-svg {
  fill: #eaf4ff;
}

.gear-svg-large {
  width: 100%;
  height: 100%;
  opacity: 0.88;
}

.gear-ring {
  fill: none;
  stroke: rgba(234, 244, 255, 0.36);
  stroke-width: 8;
}

.gear-core {
  transform-origin: 110px 110px;
  animation: rotate-gear 12s linear infinite;
}

.technician-figure {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 170px;
  height: 250px;
  transform: translateX(-50%);
}

.technician-helmet,
.technician-head,
.technician-body,
.technician-arm,
.technician-tool {
  position: absolute;
}

.technician-helmet {
  left: 48px;
  top: 10px;
  width: 74px;
  height: 40px;
  border-radius: 44px 44px 18px 18px;
  background: linear-gradient(180deg, #d8e4f3 0%, #8aa5c7 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.technician-head {
  left: 56px;
  top: 36px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(180deg, #91a8c7 0%, #5f7392 100%);
}

.technician-body {
  left: 32px;
  top: 76px;
  width: 106px;
  height: 138px;
  border-radius: 34px 34px 24px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 18%),
    linear-gradient(180deg, #3f78d7 0%, #18488d 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.technician-body::before,
.technician-body::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 14px;
  width: 8px;
  border-radius: 999px;
  background: rgba(222, 238, 255, 0.22);
}

.technician-body::before {
  left: 20px;
}

.technician-body::after {
  right: 20px;
}

.technician-arm {
  width: 28px;
  height: 112px;
  border-radius: 18px;
  background: linear-gradient(180deg, #225aaf 0%, #163f79 100%);
}

.technician-arm-left {
  left: 18px;
  top: 92px;
  transform: rotate(16deg);
}

.technician-arm-right {
  right: 20px;
  top: 92px;
  transform: rotate(-30deg);
}

.technician-tool {
  right: -4px;
  top: 146px;
  width: 56px;
  height: 18px;
  border-radius: 10px;
  background: linear-gradient(90deg, #d5dfec 0%, #90a3bc 100%);
  transform: rotate(-32deg);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.technician-tool::before,
.technician-tool::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 4px solid #d5dfec;
  border-radius: 50%;
  transform: translateY(-50%);
}

.technician-tool::before {
  left: -8px;
  border-right-color: transparent;
  border-bottom-color: transparent;
}

.technician-tool::after {
  right: -8px;
  border-left-color: transparent;
  border-top-color: transparent;
}

.splash-content {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 14px;
}

.brand-mark {
  font-weight: 800;
  letter-spacing: 0.12em;
}

.splash-subtitle {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.05rem;
}

.staff-app-shell {
  min-height: 100vh;
  padding-bottom: 92px;
}

.staff-topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  padding: 18px 16px 14px;
  background: rgba(245, 248, 252, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(199, 212, 229, 0.85);
}

.staff-topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.staff-page-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.staff-topbar-subtitle {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  flex-wrap: wrap;
}

.staff-page-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 20px 16px 120px;
  display: grid;
  gap: 18px;
}

.staff-page-intro {
  padding: 16px 18px;
}

.staff-page-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.notification-bell {
  position: relative;
  min-width: 52px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(199, 212, 229, 0.9);
  box-shadow: 0 12px 28px rgba(10, 27, 55, 0.1);
}

.notification-badge,
.staff-nav-badge {
  min-width: 22px;
  min-height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff8b4d 0%, #f04438 100%);
  font-size: 0.75rem;
  font-weight: 800;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
}

.staff-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(10, 27, 55, 0.96);
  box-shadow: 0 -14px 32px rgba(10, 27, 55, 0.2);
}

.staff-nav-link {
  min-height: 52px;
  padding: 10px 8px;
  display: grid;
  place-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  border-radius: 18px;
  text-align: center;
  font-weight: 700;
}

.staff-bottom-nav--management {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding-left: 8px;
  padding-right: 8px;
}

.staff-bottom-nav--management .staff-nav-link {
  padding: 8px 4px;
  font-size: 0.85rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.staff-nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(24, 119, 255, 0.28), rgba(60, 162, 255, 0.18));
}

.staff-count-grid,
.staff-job-grid,
.staff-photo-grid,
.staff-notification-list {
  display: grid;
  gap: 14px;
}

.staff-count-card,
.staff-empty-card,
.staff-detail-card,
.notification-card,
.job-card {
  padding: 20px;
}

.management-toolbar-card,
.management-kpi-card,
.management-metric-card,
.performance-card,
.history-result-card {
  padding: 20px;
}

.staff-count-card span {
  color: var(--muted);
  font-weight: 700;
}

.staff-count-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
}

.staff-section {
  display: grid;
  gap: 14px;
}

.management-toolbar-actions,
.management-drilldown-head,
.management-pagination,
.management-pagination-actions,
.performance-card-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.period-chip-row,
.choice-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.period-chip input,
.choice-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.period-chip span,
.choice-chip span {
  min-height: 44px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
}

.period-chip input:checked + span,
.choice-chip input:checked + span {
  border-color: rgba(24, 119, 255, 0.48);
  background: rgba(24, 119, 255, 0.12);
  color: var(--brand-primary);
}

.management-inline-note,
.management-period-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.management-date-grid,
.history-filter-grid,
.history-result-meta,
.performance-metric-grid {
  display: grid;
  gap: 12px;
}

.management-card-grid,
.performance-card-grid,
.history-result-grid {
  display: grid;
  gap: 14px;
}

.management-kpi-card,
.management-metric-card,
.performance-card,
.history-result-card {
  display: grid;
  gap: 14px;
}

.management-card-grid > *,
.performance-card-grid > *,
.history-result-grid > *,
.management-drilldown-head > * {
  min-width: 0;
}

.management-kpi-card,
.management-metric-card,
.performance-card,
.history-result-card,
.management-drilldown-head {
  overflow-wrap: anywhere;
}

.management-kpi-head,
.performance-card h3 {
  margin: 0;
}

.management-kpi-value,
.management-metric-value {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.management-filter-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.management-filter-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.management-choice-group {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
}

.management-choice-group legend {
  padding: 0;
  font-weight: 800;
  margin-bottom: 2px;
}

.performance-metric-grid,
.history-result-meta {
  margin: 0;
}

.performance-metric-grid div,
.history-result-meta div {
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.performance-metric-grid dd,
.history-result-meta dd {
  margin: 6px 0 0;
}

.job-card {
  display: grid;
  gap: 14px;
}

.job-card.is-urgent {
  border-color: rgba(255, 139, 77, 0.55);
  box-shadow: 0 18px 54px rgba(255, 139, 77, 0.12);
}

.job-card-head,
.notification-card-head,
.notification-card-actions,
.job-card-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.job-card-meta {
  display: grid;
  gap: 10px;
}

.job-card-meta div {
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.job-card-meta dd {
  margin: 6px 0 0;
}

.job-card-problem {
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
}

.staff-photo-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.staff-photo-card {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.staff-photo-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.staff-photo-card figcaption {
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.staff-sticky-actions {
  position: sticky;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  background: rgba(245, 248, 252, 0.94);
  border: 1px solid rgba(199, 212, 229, 0.8);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 42px rgba(10, 27, 55, 0.14);
}

.staff-sticky-actions form {
  display: contents;
}

.staff-sticky-actions .btn {
  flex: 1 1 180px;
}

.action-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.action-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 27, 55, 0.42);
}

.action-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 16px;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: #fff;
  box-shadow: 0 -18px 44px rgba(10, 27, 55, 0.22);
  max-height: 88vh;
  overflow: auto;
}

.action-sheet-close {
  justify-self: end;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.notification-card.is-unread {
  border-color: rgba(24, 119, 255, 0.4);
  box-shadow: 0 18px 54px rgba(24, 119, 255, 0.12);
}

.profile-logout-form {
  margin-top: 20px;
}

body.has-sheet-open {
  overflow: hidden;
}

@keyframes rotate-gear {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 720px) {
  .page-shell {
    padding: 36px 24px 56px;
  }

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

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

  .splash-card-premium {
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    align-items: center;
  }

  .staff-page-shell {
    padding: 28px 24px 120px;
  }

  .staff-count-grid,
  .staff-job-grid,
  .staff-notification-list,
  .management-card-grid,
  .history-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-filter-grid,
  .management-date-grid,
  .history-result-meta,
  .performance-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 719px) {
  .section-head,
  .form-actions,
  .photo-preview-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-actions .btn,
  .form-actions .btn,
  .splash-content .btn {
    width: 100%;
  }

  .photo-preview-card {
    justify-items: start;
  }

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

  .staff-bottom-nav {
    gap: 6px;
  }

  .staff-nav-link {
    font-size: 0.82rem;
  }

  .management-toolbar-actions .btn,
  .management-pagination-actions .btn {
    width: 100%;
  }

  .technician-figure {
    left: 46%;
    bottom: 18px;
    width: 150px;
    height: 226px;
  }

  .splash-gear-shell {
    right: -26px;
    top: 20px;
    width: clamp(180px, 58vw, 240px);
  }

  .splash-asset-frame {
    min-height: 290px;
  }

  .splash-content {
    justify-items: stretch;
  }
}

@media (max-width: 420px) {
  .page-shell {
    padding-inline: 12px;
  }

  .card,
  .hero-card,
  .report-shell,
  .tracking-card,
  .tracking-summary-card,
  .timeline-card,
  .auth-card,
  .success-card,
  .info-card {
    border-radius: 24px;
  }

  .splash-card-premium {
    padding: 20px;
  }

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

  .technician-figure {
    left: 48%;
    width: 136px;
    height: 210px;
  }

  .technician-helmet {
    left: 39px;
    width: 60px;
    height: 34px;
  }

  .technician-head {
    left: 46px;
    top: 32px;
    width: 48px;
    height: 48px;
  }

  .technician-body {
    left: 24px;
    top: 68px;
    width: 88px;
    height: 120px;
  }

  .technician-arm {
    height: 96px;
  }

  .technician-arm-left {
    left: 12px;
    top: 84px;
  }

  .technician-arm-right {
    right: 12px;
    top: 86px;
  }

  .technician-tool {
    right: -4px;
    top: 132px;
    width: 48px;
  }

  .summary-grid div,
  .performance-metric-grid div,
  .history-result-meta div,
  .field input,
  .field select,
  .field textarea {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .gear-core {
    animation: none;
  }

  .btn,
  .btn:hover {
    transition: none;
    transform: none;
  }
}

/* ==========================================================================
   M2-008C release UI polish (appended; overrides earlier rules by source order)
   ========================================================================== */

/* The HTML hidden attribute must always win over component display rules
   (e.g. .report-step { display: grid } previously showed every report step). */
[hidden] {
  display: none !important;
}

:root {
  --muted: #4a6182;
  --amber: #8a5300;
  --amber-bg: #fff3d6;
  --amber-line: #efc15a;
  --orange: #b54708;
  --orange-bg: #fff0e1;
  --orange-line: #f5b07a;
  --critical: #b42318;
  --green: #1d6b3a;
  --green-bg: #e2f4e8;
  --green-line: #9ed2ae;
  --teal: #0f766e;
  --teal-bg: #e1f6f2;
  --teal-line: #8ed6c9;
  --reopen: #6b3fa0;
  --reopen-bg: #f3ecfb;
}

.nowrap {
  white-space: nowrap;
}

.required-mark {
  color: var(--danger);
  font-style: normal;
  font-weight: 800;
}

.optional-mark {
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
  font-size: 0.88em;
}

.required-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.btn-sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.95rem;
}

/* ---- Semantic status badges (colour + text + marker) ---- */
.status-badge {
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  white-space: nowrap;
  font-size: 0.9rem;
}

.status-badge[data-status]::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-reported {
  color: var(--navy-soft);
  background: #e3e9f4;
  border-color: #b8c6dd;
}

.status-accepted {
  color: var(--blue-strong);
  background: #fff;
  border-color: #8db8ff;
}

.status-in_progress {
  color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-strong) 100%);
}

.status-waiting_parts {
  color: var(--amber);
  background: var(--amber-bg);
  border-color: var(--amber-line);
}

.status-waiting_parts[data-status]::before {
  border-radius: 2px;
}

.status-completed {
  color: var(--teal);
  background: var(--teal-bg);
  border-color: var(--teal-line);
}

.status-closed {
  color: var(--green);
  background: var(--green-bg);
  border-color: var(--green-line);
}

.status-closed[data-status]::before {
  content: "✓";
  width: auto;
  height: auto;
  background: none;
  font-weight: 900;
}

/* ---- Priority badges (text + colour + marker) ---- */
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.priority-normal {
  color: #3f5475;
  background: #f1f4f9;
  border-color: #d3dcea;
  font-weight: 700;
}

.priority-urgent {
  color: var(--orange);
  background: var(--orange-bg);
  border-color: var(--orange-line);
}

.priority-urgent::before {
  content: "!";
  font-weight: 900;
}

.priority-critical {
  color: #fff;
  background: var(--critical);
  border-color: var(--critical);
}

.priority-critical::before {
  content: "!!";
  font-weight: 900;
}

.context-badge,
.age-chip,
.period-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.context-badge {
  color: var(--reopen);
  background: var(--reopen-bg);
  border: 1px solid #d6c3ef;
}

.age-chip,
.period-tag {
  color: #2f4668;
  background: #eaf0f8;
}

/* ---- Dashboard count tiles: compact 2x2 on phones ---- */
.staff-count-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.staff-count-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
  border-left: 5px solid var(--line);
}

.staff-count-card strong {
  margin-top: 2px;
  font-size: 1.75rem;
  line-height: 1.1;
}

.staff-count-card.tone-reported { border-left-color: var(--navy-soft); }
.staff-count-card.tone-in_progress { border-left-color: var(--blue); }
.staff-count-card.tone-waiting_parts { border-left-color: var(--amber-line); }
.staff-count-card.tone-closed { border-left-color: var(--green-line); }

.staff-count-card.is-priority {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  border-left-color: var(--teal);
  background: linear-gradient(135deg, var(--teal-bg) 0%, #fff 100%);
}

.staff-count-card.is-priority span {
  color: var(--teal);
  font-size: 1.05rem;
  font-weight: 800;
}

.section-count {
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 700;
}

.staff-section {
  scroll-margin-top: 12px;
}

/* ---- Compact job / history cards ---- */
.job-card--compact,
.history-result-card--compact {
  gap: 8px;
  padding: 16px;
}

.job-card--compact.is-urgent {
  border-left: 5px solid var(--critical);
}

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

.job-card-no {
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.job-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-card-equipment {
  margin: 2px 0 0;
  font-size: 1.02rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.job-card-where {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.job-card--compact .job-card-problem,
.history-result-card--compact .job-card-problem {
  margin: 0;
  color: var(--text);
  white-space: normal;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.job-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.job-card-time,
.history-inline-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.history-inline-meta span {
  color: var(--text);
  font-weight: 700;
}

/* ---- Work-order detail: key facts first ---- */
.wo-hero {
  display: grid;
  gap: 12px;
}

.wo-hero-no {
  margin: 0;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.wo-key-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.wo-key-facts div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wo-key-facts dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.wo-key-facts dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.wo-key-facts dd.wo-equipment {
  font-size: 1.12rem;
  font-weight: 800;
}

.wo-problem {
  padding: 10px 12px;
  border: 1px solid #dfe7f2;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.state-banner {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: var(--radius-md);
}

.state-banner--waiting {
  color: var(--amber);
  background: var(--amber-bg);
  border-color: var(--amber-line);
}

.state-banner--completed {
  color: var(--teal);
  background: var(--teal-bg);
  border-color: var(--teal-line);
}

.state-banner--closed {
  color: var(--green);
  background: var(--green-bg);
  border-color: var(--green-line);
}

.wo-more > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-weight: 800;
}

.wo-more[open] > summary {
  margin-bottom: 8px;
}

/* ---- Action sheets ---- */
.action-sheet-close {
  min-height: 44px;
  font-weight: 700;
}

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

.upload-dropzone--compact {
  padding: 16px;
}

.action-sheet .field textarea {
  min-height: 88px;
}

/* ---- Quick Report stepper: compact numbered row ---- */
.stepper {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.step-pill {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  line-height: 1.25;
}

.step-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 900;
}

.step-pill.is-active .step-num {
  color: var(--blue-strong);
  border-color: transparent;
}

/* ---- Guest brand header ---- */
.guest-brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px;
}

.guest-brandbar-text {
  display: grid;
  gap: 1px;
}

.guest-brandbar-text .brand-mark {
  color: var(--blue-strong);
  font-size: 0.75rem;
}

.guest-brandbar-text strong {
  color: var(--navy);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.guest-brandbar-sub {
  color: var(--muted);
  font-size: 0.86rem;
}

.guest-staff-link {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  padding: 6px 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: right;
  text-decoration: none;
}

.guest-staff-link strong {
  color: var(--blue-strong);
  font-size: 0.9rem;
}

/* ---- Success confirmation ---- */
.success-card--confirm {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.success-icon svg {
  width: 76px;
  height: 76px;
}

.success-icon circle {
  fill: var(--green-bg);
  stroke: #1e8a4c;
  stroke-width: 2.5;
}

.success-icon path {
  fill: none;
  stroke: #1e8a4c;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-card--confirm h1 {
  margin: 0;
  color: var(--green);
}

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

.success-wo-no {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.8rem, 8.5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.success-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  color: var(--muted);
}

.success-card--confirm .hero-actions {
  width: 100%;
}

/* ---- KPI / period toolbar: numbers first ---- */
.management-toolbar-card--compact {
  padding: 12px 14px;
}

.period-form {
  display: grid;
  gap: 10px;
}

.period-form .management-date-grid .btn {
  grid-column: 1 / -1;
}

.management-period-label {
  margin: 0;
}

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

.kpi-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  color: inherit;
  text-decoration: none;
}

.kpi-tile h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
}

.kpi-tile .management-kpi-value,
.kpi-tile .management-metric-value {
  margin-top: 2px;
  font-size: 1.55rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.kpi-tile p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.kpi-tile-link {
  margin-top: auto;
  color: var(--blue-strong);
  font-size: 0.88rem;
  font-weight: 800;
}

a.kpi-tile:hover,
a.kpi-tile:focus-visible {
  border-color: rgba(24, 119, 255, 0.5);
}

/* ---- Technician performance: compact hierarchy, no ranking ---- */
.performance-card {
  gap: 10px;
  padding: 16px;
}

.perf-count-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

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

.perf-count-grid div {
  min-width: 0;
  padding: 8px 10px;
  background: var(--surface-soft);
  border: 1px solid #dde6f1;
  border-radius: var(--radius-sm);
}

.perf-count-grid dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.perf-count-grid dd {
  margin: 2px 0 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.perf-subhead {
  margin: 2px 0 -2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.perf-time-list {
  display: grid;
  margin: 0;
}

.perf-time-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #e3eaf4;
}

.perf-time-list dt {
  color: var(--muted);
}

.perf-time-list dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

/* ---- Touch targets and notifications ---- */
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.notification-card {
  gap: 8px;
  padding: 14px 16px;
}

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

.notification-card-actions .btn {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.95rem;
}

/* ---- Splash loading indicator ---- */
.splash-progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.splash-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #3ca2ff 0%, #ffffff 100%);
  transform-origin: left center;
  animation: splash-load 1.8s ease-out forwards;
}

@keyframes splash-load {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (min-width: 720px) {
  .staff-count-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .kpi-tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Bottom navigation becomes a centred dock instead of a stretched phone bar. */
  .staff-bottom-nav {
    left: 50%;
    right: auto;
    bottom: 16px;
    width: min(760px, calc(100% - 48px));
    transform: translateX(-50%);
    border-radius: 22px;
  }
}

/* Phones show short step names; the full name stays available to screen readers. */
.step-short {
  display: none;
}

@media (max-width: 719px) {
  .step-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .step-short {
    display: block;
  }
}

@media (max-width: 380px) {
  .step-short {
    font-size: 0.76rem;
  }

  .guest-brandbar-sub {
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-progress span {
    animation: none;
  }
}

/* ==========================================================================
   M2-009 monthly report, print view and signatories
   ========================================================================== */

.report-entry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  border-left: 5px solid var(--blue);
}

.report-entry-card strong {
  display: block;
  color: var(--navy);
}

.report-entry-card .muted {
  font-size: 0.88rem;
}

.report-entry-arrow {
  color: var(--blue-strong);
  font-size: 1.6rem;
  font-weight: 800;
}

.report-month-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.report-month-form .btn {
  grid-column: 1 / -1;
}

.report-toolbar-links {
  margin: 4px 0 0;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-actions .btn {
  flex: 1 1 200px;
}

.report-notes-form {
  margin-top: 4px;
}

.report-history-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-history-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

/* ---- Report document (screen) ---- */
.report-doc {
  display: grid;
  gap: 18px;
  overflow-wrap: anywhere;
}

.report-doc-header {
  display: grid;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--navy);
}

.report-doc-brand {
  color: var(--blue-strong);
  font-size: 0.78rem;
}

.report-doc-product {
  display: block;
  color: var(--navy);
  letter-spacing: 0.08em;
}

.report-doc-title {
  margin: 4px 0 0;
  font-size: 1.35rem;
  line-height: 1.3;
}

.report-doc-month {
  margin: 2px 0 0;
  color: var(--blue-strong);
  font-size: 1.05rem;
  font-weight: 800;
}

.report-doc-meta {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 0.9rem;
}

.report-doc-meta div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.report-doc-meta dt {
  color: var(--muted);
}

.report-doc-meta dd {
  margin: 0;
  font-weight: 700;
}

.report-section {
  display: grid;
  gap: 10px;
}

.report-section h2 {
  margin: 0;
  padding-bottom: 6px;
  color: var(--navy);
  font-size: 1.08rem;
  border-bottom: 1px solid var(--line);
}

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

.report-stat {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  background: var(--surface-soft);
  border: 1px solid #dde6f1;
  border-radius: var(--radius-sm);
}

.report-stat span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.report-stat strong {
  color: var(--navy);
  font-size: 1.5rem;
}

.report-duration-list {
  display: grid;
  margin: 0;
}

.report-duration-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #e3eaf4;
}

.report-duration-list dt {
  color: var(--muted);
}

.report-duration-list dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.report-footnote,
.report-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.report-empty {
  padding: 12px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
}

.report-table-wrap {
  min-width: 0;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.report-table th,
.report-table td {
  padding: 8px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e3eaf4;
  overflow-wrap: anywhere;
}

.report-table thead th {
  color: #fff;
  background: var(--navy);
  font-size: 0.82rem;
}

.report-sub {
  color: var(--muted);
  font-size: 0.85em;
}

.report-wrap {
  white-space: normal;
}

.report-notes {
  margin: 0;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px 16px;
}

.signature-block {
  display: grid;
  gap: 2px;
  padding-top: 28px;
  text-align: center;
  break-inside: avoid;
}

.signature-block p {
  margin: 0;
}

.signature-line {
  white-space: nowrap;
  overflow: hidden;
}

.signature-name {
  font-weight: 700;
}

.signature-position,
.signature-role,
.signature-date {
  color: var(--muted);
  font-size: 0.9rem;
}

.report-list-toggle > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--blue-strong);
  font-weight: 800;
  background: var(--surface-soft);
  border: 1px solid #dde6f1;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.report-list-toggle[open] > summary {
  margin-bottom: 10px;
}

@media (min-width: 720px) {
  .report-wo-no,
  .report-date {
    white-space: nowrap;
  }
}

/* Tables become labelled cards on phones (no horizontal scrolling). */
@media (max-width: 719px) {
  .report-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

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

  .report-table tr {
    margin-bottom: 10px;
    padding: 10px 12px;
    background: var(--surface-soft);
    border: 1px solid #dde6f1;
    border-radius: var(--radius-sm);
  }

  .report-table th,
  .report-table td {
    padding: 4px 0;
    border: 0;
  }

  .report-table tbody th {
    color: var(--navy);
    font-size: 1rem;
  }

  .report-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
  }
}

@media (min-width: 720px) {
  .report-month-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  }

  .report-month-form .btn {
    grid-column: auto;
  }

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

  .report-doc-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

/* ---- Signatory management ---- */
.signatory-list {
  display: grid;
  gap: 10px;
}

.signatory-card > summary {
  display: grid;
  gap: 2px;
  min-height: 44px;
  cursor: pointer;
}

.signatory-card.is-inactive {
  opacity: 0.7;
}

.signatory-summary-name {
  font-weight: 800;
}

.signatory-summary-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.signatory-card[open] > summary {
  margin-bottom: 10px;
}

.signatory-form-grid {
  display: grid;
  gap: 10px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
}

.checkbox-field input {
  width: 22px;
  height: 22px;
}

@media (min-width: 720px) {
  .signatory-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- Dedicated print page (screen preview) ---- */
body.page-report-print {
  background: #e9eef5;
}

.print-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--navy);
}

.print-toolbar-note {
  color: #ffd98a;
  font-size: 0.9rem;
  font-weight: 700;
}

.report-print-sheet {
  display: grid;
  gap: 16px;
  width: min(210mm, 100% - 24px);
  margin: 16px auto 40px;
  padding: 14mm 12mm;
  background: #fff;
  box-shadow: 0 12px 36px rgba(10, 27, 55, 0.18);
  color: #111827;
  overflow-wrap: anywhere;
}

.report-print-sheet.is-draft {
  background-image: repeating-linear-gradient(-35deg, rgba(10, 27, 55, 0.035) 0 2px, transparent 2px 80px);
}

.report-print-footer {
  padding-top: 8px;
  color: #4b5563;
  font-size: 0.78rem;
  text-align: center;
  border-top: 1px solid #d1d5db;
}

@media (max-width: 719px) {
  .report-print-sheet {
    padding: 16px 12px;
  }
}

/* ---- A4 print ---- */
@page {
  size: A4 portrait;
  margin: 12mm 12mm 14mm;
}

@media print {
  html,
  body,
  body.page-report-print {
    background: #fff !important;
  }

  .print-toolbar,
  .flash-stack,
  .staff-bottom-nav,
  .staff-topbar,
  .staff-sticky-actions,
  .action-sheet,
  .report-actions,
  .report-notes-form,
  .management-toolbar-card {
    display: none !important;
  }

  .report-print-sheet {
    width: auto;
    margin: 0;
    padding: 0;
    box-shadow: none;
    font-size: 10pt;
    background-image: none;
  }

  .report-print-sheet .report-doc-title {
    font-size: 15pt;
  }

  .report-print-sheet .report-section h2 {
    font-size: 11.5pt;
    break-after: avoid;
  }

  .report-print-sheet,
  .report-print-sheet .report-section {
    gap: 8px;
  }

  .report-print-sheet .report-duration-list div {
    padding: 3px 0;
  }

  .report-print-sheet .report-stat {
    padding: 6px 8px;
  }

  .report-print-sheet .signature-block {
    padding-top: 18px;
  }

  .report-print-sheet .report-wo-no {
    white-space: nowrap;
  }

  .report-print-sheet .report-date {
    white-space: normal;
  }

  /* Fixed A4 column plan; the phone rule (max-width: 719px) can match the A4 printable width. */
  .report-print-sheet .report-table tbody th {
    font-size: 8.5pt;
  }

  .report-print-sheet .report-table--wo {
    table-layout: fixed;
  }

  .report-print-sheet .report-table--wo th:nth-child(1) { width: 15%; }
  .report-print-sheet .report-table--wo th:nth-child(2) { width: 11%; }
  .report-print-sheet .report-table--wo th:nth-child(3) { width: 14%; }
  .report-print-sheet .report-table--wo th:nth-child(4) { width: 29%; }
  .report-print-sheet .report-table--wo th:nth-child(5) { width: 11%; }
  .report-print-sheet .report-table--wo th:nth-child(6) { width: 10%; }
  .report-print-sheet .report-table--wo th:nth-child(7) { width: 10%; }

  .report-print-sheet .report-table--wo .report-sub {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .report-print-sheet .report-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-print-sheet .report-stat strong {
    font-size: 14pt;
  }

  /* Force real tables on paper even if a narrow print width triggers the phone layout. */
  .report-print-sheet .report-table {
    display: table;
    font-size: 8.5pt;
  }

  .report-print-sheet .report-table thead {
    display: table-header-group;
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .report-print-sheet .report-table tbody {
    display: table-row-group;
  }

  .report-print-sheet .report-table tr {
    display: table-row;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    break-inside: avoid;
  }

  .report-print-sheet .report-table th,
  .report-print-sheet .report-table td {
    display: table-cell;
    width: auto;
    padding: 4px 5px;
    border-bottom: 1px solid #d1d5db;
  }

  .report-print-sheet .report-table td[data-label]::before {
    content: none;
  }

  .report-print-sheet .report-table thead th {
    color: #111827;
    background: #e5e7eb !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-print-sheet .status-badge {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none !important;
    color: #111827 !important;
    font-size: 8.5pt;
  }

  .report-print-sheet .status-badge::before {
    display: none;
  }

  .report-print-sheet .status-badge {
    display: inline;
    white-space: normal;
  }

  .report-signatures {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-print-sheet .signature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-stat,
  .report-duration-list div {
    break-inside: avoid;
  }
}

/* Same A4 column plan for the on-screen print preview sheet. */
@media (min-width: 720px) {
  .report-print-sheet .report-table--wo {
    table-layout: fixed;
  }

  .report-print-sheet .report-table--wo th:nth-child(1) { width: 15%; }
  .report-print-sheet .report-table--wo th:nth-child(2) { width: 11%; }
  .report-print-sheet .report-table--wo th:nth-child(3) { width: 14%; }
  .report-print-sheet .report-table--wo th:nth-child(4) { width: 29%; }
  .report-print-sheet .report-table--wo th:nth-child(5) { width: 11%; }
  .report-print-sheet .report-table--wo th:nth-child(6) { width: 10%; }
  .report-print-sheet .report-table--wo th:nth-child(7) { width: 10%; }

  .report-print-sheet .report-date {
    white-space: normal;
  }

  .report-print-sheet .report-table--wo .status-badge {
    white-space: normal;
  }
}

/* ---- M2-011: guest tracking code / recovery panel ---- */
.tracking-access {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  text-align: left;
}

.tracking-access-card {
  padding: 24px;
}

.tracking-access-card .tracking-access {
  padding: 0;
  border: 0;
  background: transparent;
}

.tracking-access-title {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}

.tracking-access-label {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.tracking-code {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--blue);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--navy);
  font-family: "Consolas", "SFMono-Regular", "Menlo", monospace;
  /* one line down to 320px wide: 19 monospace symbols incl. separators */
  font-size: clamp(0.92rem, 4.3vw, 1.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
  overflow-x: auto;
  user-select: all;
}

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

.tracking-access-actions .btn {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
}

.tracking-copy-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--success);
  font-weight: 700;
}

.tracking-copy-fallback {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.tracking-copy-fallback input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
}

.tracking-access-guide {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.tracking-access-guide strong {
  color: var(--navy);
}

.tracking-lookup-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

@media (max-width: 400px) {
  .tracking-access {
    padding: 12px;
  }

  .tracking-code {
    padding: 10px 8px;
  }
}

/* ==========================================================================
   M2-013A Premium Industrial design system
   Replaces the M2-013 theme layer. Order: tokens -> foundation -> primitives
   -> app shell -> shared components -> guest pages -> staff pages.
   Tokens are global (print inherits them); every component rule is
   screen-only so the A4 print rules earlier in this file stay authoritative.
   ========================================================================== */
:root {
  --pi-navy: #0b1f3a;
  --pi-navy-2: #102a4c;
  --pi-navy-3: #1a3a63;
  --pi-blue: #1677ff;
  --pi-blue-strong: #0f5fd6;
  --pi-blue-bright: #2f8cff;
  --pi-blue-tint: #e8f1ff;
  --pi-bg: #eef2f7;
  --pi-surface: #ffffff;
  --pi-surface-2: #f6f8fb;
  --pi-text: #10233f;
  --pi-muted: #536987;
  --pi-line: #d9e3ef;
  --pi-line-strong: #c3d1e2;
  --pi-success: #1d7a46;
  --pi-success-bg: #e5f5ec;
  --pi-teal: #0b6f67;
  --pi-teal-bg: #e3f6f3;
  --pi-warning: #a15c00;
  --pi-warning-bg: #fff4dc;
  --pi-warning-line: #f0c46a;
  --pi-danger: #c0271d;
  --pi-danger-bg: #fdecea;
  --pi-orange: #c2570c;
  --pi-orange-bg: #fff1e5;
  --pi-indigo: #3b3fb6;
  --pi-indigo-bg: #eef0ff;
  --pi-space-1: 4px;
  --pi-space-2: 8px;
  --pi-space-3: 12px;
  --pi-space-4: 16px;
  --pi-space-5: 20px;
  --pi-space-6: 24px;
  --pi-space-8: 32px;
  --pi-radius-sm: 8px;
  --pi-radius-md: 10px;
  --pi-radius-lg: 14px;
  --pi-shadow-1: 0 1px 2px rgba(11, 31, 58, 0.06), 0 1px 1px rgba(11, 31, 58, 0.04);
  --pi-shadow-2: 0 8px 24px rgba(11, 31, 58, 0.12);
  --pi-font: "Noto Sans Thai", "Noto Sans Thai UI", "Sarabun", "Leelawadee UI", "Segoe UI", Tahoma, system-ui, sans-serif;
  --pi-dock-height: 64px;

  --bg: var(--pi-bg);
  --surface-soft: var(--pi-surface-2);
  --text: var(--pi-text);
  --muted: var(--pi-muted);
  --line: var(--pi-line);
  --navy: var(--pi-navy);
  --navy-soft: var(--pi-navy-2);
  --blue: var(--pi-blue);
  --blue-strong: var(--pi-blue-strong);
  --shadow: var(--pi-shadow-1);
  --radius-xl: var(--pi-radius-lg);
  --radius-lg: var(--pi-radius-lg);
  --radius-md: var(--pi-radius-md);
  --radius-sm: var(--pi-radius-sm);
}

/* Report header company line: applies to screen and print, never letter-spaced (Thai). */
.report-doc-company {
  margin: 0 0 2px;
  color: var(--pi-muted);
  font-size: 0.82rem;
  letter-spacing: 0;
}

@media screen {
  /* =================================================================== foundation */
  html {
    font-family: var(--pi-font);
    background: var(--pi-bg);
  }

  body {
    background: var(--pi-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  h1, h2, h3 {
    line-height: 1.35;
    letter-spacing: 0;
  }

  :focus-visible {
    outline: 3px solid rgba(22, 119, 255, 0.45);
    outline-offset: 2px;
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
    color: var(--pi-blue-strong);
  }

  .muted, .lead {
    color: var(--pi-muted);
  }

  .ui-icon,
  .nav-icon {
    flex: none;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .nav-icon {
    width: 22px;
    height: 22px;
  }

  /* =================================================================== primitives */
  .card {
    background: var(--pi-surface);
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-lg);
    box-shadow: var(--pi-shadow-1);
    backdrop-filter: none;
  }

  .staff-detail-card,
  .timeline-card,
  .tracking-feedback-card,
  .feedback-card,
  .tracking-card,
  .tracking-summary-card,
  .auth-card,
  .info-card {
    padding: var(--pi-space-4);
  }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--pi-space-2);
    min-height: 48px;
    padding: 0 var(--pi-space-5);
    border: 1px solid transparent;
    border-radius: var(--pi-radius-md);
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }

  .btn:hover { transform: none; }
  .btn-sm { min-height: 44px; padding: 0 var(--pi-space-4); }
  .btn-lg { min-height: 52px; }

  .btn-primary {
    color: #fff;
    background: var(--pi-blue);
    border-color: var(--pi-blue);
    box-shadow: 0 1px 2px rgba(15, 95, 214, 0.25);
  }

  .btn-primary:hover { background: var(--pi-blue-strong); border-color: var(--pi-blue-strong); }

  .btn-secondary {
    color: var(--pi-navy);
    background: var(--pi-surface);
    border-color: var(--pi-line-strong);
  }

  .btn-secondary:hover,
  .btn-ghost:hover {
    color: var(--pi-blue-strong);
    background: var(--pi-surface-2);
    border-color: var(--pi-blue);
  }

  .btn-ghost {
    color: var(--pi-navy);
    background: transparent;
    border-color: var(--pi-line-strong);
  }

  .btn-success { color: #fff; background: var(--pi-success); border-color: var(--pi-success); }
  .btn-success:hover { background: #16633a; }
  .btn-warning { color: #fff; background: var(--pi-warning); border-color: var(--pi-warning); }
  .btn-warning:hover { background: #874c00; }
  .btn-danger { color: #fff; background: var(--pi-danger); border-color: var(--pi-danger); }
  .btn:active { filter: brightness(0.94); }
  .btn[disabled], .btn.is-disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
  .btn.is-loading { cursor: wait; }

  .field > span,
  .field legend {
    color: var(--pi-text);
    font-weight: 700;
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 48px;
    padding: var(--pi-space-3) var(--pi-space-4);
    border: 1px solid var(--pi-line-strong);
    border-radius: var(--pi-radius-md);
    background: var(--pi-surface);
    box-shadow: none;
    line-height: 1.5;
  }

  .field input:focus,
  .field select:focus,
  .field textarea:focus {
    outline: none;
    border-color: var(--pi-blue);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.18);
  }

  .field input[disabled], .field select[disabled], .field textarea[disabled], .field input[readonly] {
    background: var(--pi-surface-2);
    color: var(--pi-muted);
  }

  .alert { border-radius: var(--pi-radius-md); }

  /* Status / priority chips: text always present, colour secondary. */
  .status-badge, .priority-badge, .context-badge, .age-chip {
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .status-badge { min-height: 28px; padding: 0 10px; }
  .status-reported { color: #334e74; background: #eef2f8; border-color: #c9d5e6; }
  .status-accepted { color: var(--pi-indigo); background: var(--pi-indigo-bg); border-color: #c5c9f5; }
  .status-in_progress { color: #fff; background: var(--pi-blue); border-color: var(--pi-blue); }
  .status-waiting_parts { color: var(--pi-warning); background: var(--pi-warning-bg); border-color: var(--pi-warning-line); }
  .status-completed { color: var(--pi-teal); background: var(--pi-teal-bg); border-color: #9fd9cf; }
  .status-closed { color: var(--pi-success); background: var(--pi-success-bg); border-color: #a9d8bc; }
  .priority-normal { color: #44597a; background: #f1f4f9; border-color: #d3dcea; }
  .priority-urgent { color: var(--pi-orange); background: var(--pi-orange-bg); border-color: #f5c29a; }
  .priority-critical { color: #fff; background: var(--pi-danger); border-color: var(--pi-danger); }
  .context-badge { color: var(--pi-orange); background: var(--pi-orange-bg); border: 1px solid #f5c29a; }
  .age-chip { color: var(--pi-muted); background: var(--pi-surface-2); border: 1px solid var(--pi-line); }

  /* =================================================================== staff app shell */
  .staff-app-shell {
    min-height: 100vh;
    padding-bottom: calc(var(--pi-dock-height) + 24px + env(safe-area-inset-bottom));
  }

  .staff-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    padding: 0;
    color: #fff;
    background: var(--pi-navy);
    border-bottom: 0;
    backdrop-filter: none;
  }

  .staff-topbar-inner {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: var(--pi-space-2) var(--pi-space-4) var(--pi-space-3);
  }

  .staff-topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--pi-space-3);
  }

  .staff-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--pi-space-2);
    min-height: 40px;
    color: #fff;
    text-decoration: none;
  }

  .staff-brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #fff;
    background: var(--pi-blue);
    border-radius: 8px;
  }

  .staff-brand-mark .ui-icon { width: 18px; height: 18px; }

  .staff-brand-text {
    display: flex;
    align-items: center;
    gap: var(--pi-space-2);
  }

  .staff-brand-product {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
  }

  .staff-brand-org {
    padding: 0 6px;
    color: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .staff-topbar-tools {
    display: flex;
    align-items: center;
    gap: var(--pi-space-2);
  }

  .notification-bell,
  .staff-avatar {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--pi-radius-md);
    box-shadow: none;
    text-decoration: none;
  }

  .staff-avatar {
    border-radius: 50%;
    background: var(--pi-blue-tint);
    color: var(--pi-navy);
    font-weight: 800;
  }

  .notification-bell:hover { background: rgba(255, 255, 255, 0.15); }

  .notification-badge,
  .staff-nav-badge {
    min-width: 20px;
    min-height: 20px;
    padding: 0 5px;
    color: #fff;
    background: var(--pi-danger);
    border-radius: 999px;
    box-shadow: 0 0 0 2px var(--pi-navy);
    font-size: 0.7rem;
    font-weight: 800;
  }

  .notification-badge { position: absolute; top: -6px; right: -6px; }

  .staff-topbar-context {
    margin-top: var(--pi-space-2);
    padding-top: var(--pi-space-2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .staff-page-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.2rem, 4.6vw, 1.55rem);
    overflow-wrap: anywhere;
  }

  .staff-topbar-subtitle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px var(--pi-space-2);
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.84rem;
  }

  .staff-topbar-subtitle strong { color: #fff; font-weight: 600; }

  .staff-role-chip {
    padding: 0 var(--pi-space-2);
    color: #cfe2ff;
    background: rgba(47, 140, 255, 0.2);
    border-radius: 4px;
    font-size: 0.76rem;
    font-weight: 700;
  }

  .staff-username { color: rgba(255, 255, 255, 0.5); }

  .staff-page-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: var(--pi-space-4) var(--pi-space-4) var(--pi-space-6);
    display: grid;
    gap: var(--pi-space-5);
  }

  /* Mobile: floating control dock */
  .staff-nav-brand { display: none; }

  .staff-bottom-nav,
  .staff-bottom-nav--management {
    position: fixed;
    left: var(--pi-space-2);
    right: var(--pi-space-2);
    bottom: calc(var(--pi-space-2) + env(safe-area-inset-bottom));
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    width: auto;
    padding: 6px;
    background: var(--pi-navy);
    border: 1px solid var(--pi-navy-3);
    border-radius: 18px;
    box-shadow: var(--pi-shadow-2);
    transform: none;
  }

  .staff-bottom-nav--management { grid-template-columns: repeat(5, minmax(0, 1fr)); }

  .staff-nav-link,
  .staff-bottom-nav--management .staff-nav-link {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    min-height: 52px;
    padding: 4px 2px;
    color: rgba(255, 255, 255, 0.62);
    background: transparent;
    border-radius: 13px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .staff-nav-link:hover { color: #fff; }

  .staff-nav-link.is-active {
    color: #fff;
    background: var(--pi-blue);
  }

  .staff-nav-link.is-active::before { content: none; }

  .staff-nav-badge { position: absolute; top: 2px; left: calc(50% + 6px); }

  /* =================================================================== shared components */
  [data-ops-section] { display: grid; gap: var(--pi-space-3); }

  .ops-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px var(--pi-space-2);
    margin: 0;
  }

  .ops-section-head h2 {
    margin: 0;
    color: var(--pi-navy);
    font-size: 1.02rem;
  }

  .ops-section-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: var(--pi-blue-strong);
    background: var(--pi-blue-tint);
    border-radius: 8px;
  }

  .ops-section-note {
    flex-basis: 100%;
    color: var(--pi-muted);
    font-size: 0.84rem;
  }

  .section-count {
    min-width: 26px;
    padding: 0 8px;
    color: var(--pi-navy);
    background: var(--pi-surface);
    border: 1px solid var(--pi-line-strong);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
  }

  .empty-state {
    display: flex;
    align-items: center;
    gap: var(--pi-space-3);
    padding: var(--pi-space-3) var(--pi-space-4);
    color: var(--pi-muted);
    background: var(--pi-surface-2);
    border: 1px dashed var(--pi-line-strong);
    border-radius: var(--pi-radius-md);
  }

  .empty-state-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #8a9ab3;
    background: var(--pi-surface);
    border: 1px solid var(--pi-line);
    border-radius: 50%;
  }

  .empty-state-title { margin: 0; color: var(--pi-text); font-weight: 600; }
  .empty-state-hint { margin: 2px 0 0; font-size: 0.84rem; }

  .staff-empty-card { padding: var(--pi-space-3) var(--pi-space-4); box-shadow: none; }
  .staff-empty-card p { margin: 0; color: var(--pi-muted); }

  /* Job / history cards */
  .staff-job-grid,
  .history-result-grid {
    display: grid;
    gap: var(--pi-space-3);
  }

  .job-card--compact,
  .history-result-card--compact {
    display: grid;
    gap: var(--pi-space-2);
    padding: var(--pi-space-3) var(--pi-space-4);
    border-left: 4px solid var(--pi-line-strong);
    border-radius: var(--pi-radius-md);
    box-shadow: var(--pi-shadow-1);
  }

  .job-card--p-urgent { border-left-color: var(--pi-orange); }
  .job-card--p-critical,
  .job-card--compact.is-urgent { border-left-color: var(--pi-danger); background: var(--pi-surface); }

  .job-card-top { align-items: center; }

  .job-card-no {
    color: var(--pi-navy);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
  }

  .job-card-equipment {
    margin: 0;
    color: var(--pi-text);
    font-size: 1.02rem;
    font-weight: 700;
  }

  .job-card-meta {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .job-card-meta li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: var(--pi-muted);
    font-size: 0.86rem;
  }

  .job-card-meta .ui-icon { width: 15px; height: 15px; margin-top: 3px; color: #8a9ab3; }

  .job-card-where, .job-card-time { font-size: 0.86rem; color: var(--pi-muted); }

  .job-card--compact .job-card-problem,
  .history-result-card--compact .job-card-problem {
    padding: var(--pi-space-2) var(--pi-space-3);
    color: var(--pi-text);
    background: var(--pi-surface-2);
    border-radius: var(--pi-radius-sm);
    font-size: 0.9rem;
  }

  .job-card-foot {
    padding-top: var(--pi-space-2);
    border-top: 1px solid var(--pi-line);
  }

  .job-card-action .ui-icon { width: 16px; height: 16px; }

  .history-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--pi-space-2) var(--pi-space-3);
    margin: 0;
  }

  .history-facts dt {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--pi-muted);
    font-size: 0.76rem;
    font-weight: 600;
  }

  .history-facts dt .ui-icon { width: 13px; height: 13px; }
  .history-facts dd { margin: 0; font-size: 0.86rem; overflow-wrap: anywhere; }
  .history-inline-meta { color: var(--pi-muted); font-size: 0.82rem; }

  /* Timeline: compact service history */
  .timeline-card h2,
  .staff-detail-card h2 {
    display: flex;
    align-items: center;
    gap: var(--pi-space-2);
    margin: 0 0 var(--pi-space-3);
    color: var(--pi-navy);
    font-size: 1rem;
  }

  .timeline-card h2 .ui-icon,
  .staff-detail-card h2 .ui-icon { color: var(--pi-blue-strong); }

  .timeline-list { gap: 0; }

  .timeline-item {
    grid-template-columns: 16px 1fr;
    gap: var(--pi-space-3);
    padding-bottom: var(--pi-space-4);
  }

  .timeline-item:last-child { padding-bottom: 0; }

  .timeline-dot {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    background: var(--pi-surface);
    border: 3px solid var(--pi-blue);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--pi-surface);
  }

  .timeline-item:not(:last-child) .timeline-dot::after {
    left: 4px;
    top: 16px;
    width: 2px;
    height: calc(100% + var(--pi-space-4) + 2px);
    background: var(--pi-line-strong);
  }

  .timeline-item[data-event="REPORTED"] .timeline-dot { border-color: #6b7f9e; }
  .timeline-item[data-event="ASSIGNED"] .timeline-dot,
  .timeline-item[data-event="ACCEPTED"] .timeline-dot { border-color: var(--pi-indigo); }
  .timeline-item[data-event="STARTED"] .timeline-dot,
  .timeline-item[data-event="RESUMED"] .timeline-dot { border-color: var(--pi-blue); background: var(--pi-blue); }
  .timeline-item[data-event="WAITING_PARTS"] .timeline-dot { border-color: var(--pi-warning); background: var(--pi-warning-bg); border-radius: 4px; }
  .timeline-item[data-event="COMPLETED"] .timeline-dot { border-color: var(--pi-teal); }
  .timeline-item[data-event="CLOSED"] .timeline-dot { border-color: var(--pi-success); background: var(--pi-success); }
  .timeline-item[data-event="REOPENED"] .timeline-dot { border-color: var(--pi-orange); background: var(--pi-orange-bg); border-radius: 4px; }
  .timeline-item[data-event="FEEDBACK_SUBMITTED"] .timeline-dot { border-color: #8a9ab3; }

  .timeline-item[data-event="WAITING_PARTS"] .timeline-content,
  .timeline-item[data-event="REOPENED"] .timeline-content {
    padding: 6px 10px;
    border-radius: var(--pi-radius-sm);
  }

  .timeline-item[data-event="WAITING_PARTS"] .timeline-content { background: var(--pi-warning-bg); }
  .timeline-item[data-event="REOPENED"] .timeline-content { background: var(--pi-orange-bg); }
  .timeline-item[data-event="WAITING_PARTS"] .timeline-content strong { color: var(--pi-warning); }
  .timeline-item[data-event="REOPENED"] .timeline-content strong { color: var(--pi-orange); }

  .timeline-content { gap: 1px; min-width: 0; }
  .timeline-content strong { color: var(--pi-text); font-size: 0.95rem; }
  .timeline-content span { color: var(--pi-muted); font-size: 0.84rem; overflow-wrap: anywhere; }
  .timeline-content .timeline-time { font-variant-numeric: tabular-nums; }
  .timeline-content .timeline-detail { color: var(--pi-text); }

  /* Period selector */
  .management-toolbar-card--compact { padding: var(--pi-space-3) var(--pi-space-4); }
  .period-chip { border-radius: var(--pi-radius-sm); }
  .management-period-label { margin: 0; font-size: 0.84rem; color: var(--pi-muted); }

  /* =================================================================== guest pages */
  .guest-app {
    width: min(100%, 600px);
    margin: 0 auto;
    padding: 0 var(--pi-space-4) var(--pi-space-8);
    display: grid;
    gap: var(--pi-space-4);
  }

  .guest-brandbar {
    display: flex;
    align-items: center;
    gap: var(--pi-space-3);
    margin: 0 calc(-1 * var(--pi-space-4));
    padding: var(--pi-space-3) var(--pi-space-4);
    color: #fff;
    background: var(--pi-navy);
  }

  .guest-brand-mark,
  .guest-back {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #fff;
    background: var(--pi-blue);
    border-radius: 9px;
  }

  .guest-back {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-decoration: none;
  }

  .guest-brandbar-text { display: grid; gap: 0; min-width: 0; flex: 1; }
  .guest-brandbar-text .brand-mark { color: #8fbaff; font-size: 0.66rem; letter-spacing: 0.1em; }
  .guest-brandbar-text strong { color: #fff; font-size: 0.95rem; letter-spacing: 0.1em; }
  .guest-brandbar-sub { color: rgba(255, 255, 255, 0.7); font-size: 0.78rem; }

  .guest-staff-link {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 4px 10px;
    color: rgba(255, 255, 255, 0.78);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--pi-radius-sm);
    font-size: 0.72rem;
    line-height: 1.25;
    text-align: left;
  }

  .guest-staff-link strong { color: #fff; font-size: 0.82rem; }

  /* Home */
  .guest-hero-band {
    margin: 0 calc(-1 * var(--pi-space-4));
    padding: 0 var(--pi-space-4) 52px;
    background: linear-gradient(160deg, var(--pi-navy) 0%, var(--pi-navy-2) 70%, #173d6e 100%);
    border-radius: 0 0 24px 24px;
  }

  .guest-hero-band .guest-brandbar { margin: 0 calc(-1 * var(--pi-space-4)); background: transparent; }

  .guest-hero { padding: var(--pi-space-5) 0 0; }

  .guest-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.7rem, 8vw, 2.3rem);
  }

  .guest-hero .lead { margin: var(--pi-space-2) 0 0; color: rgba(255, 255, 255, 0.78); }

  .guest-actions {
    display: grid;
    gap: var(--pi-space-3);
    margin-top: -40px;
  }

  .guest-action {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--pi-space-3);
    min-height: 76px;
    padding: var(--pi-space-4);
    color: var(--pi-text);
    background: var(--pi-surface);
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-lg);
    box-shadow: var(--pi-shadow-2);
    text-decoration: none;
  }

  .guest-action--primary {
    min-height: 96px;
    color: #fff;
    background: var(--pi-blue);
    border-color: var(--pi-blue);
  }

  .guest-action--primary:hover { background: var(--pi-blue-strong); }
  .guest-action--secondary:hover { border-color: var(--pi-blue); }

  .guest-action-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: var(--pi-blue-strong);
    background: var(--pi-blue-tint);
    border-radius: 12px;
  }

  .guest-action--primary .guest-action-icon { color: #fff; background: rgba(255, 255, 255, 0.18); }
  .guest-action-icon .ui-icon { width: 26px; height: 26px; }
  .guest-action-text { display: grid; gap: 2px; }
  .guest-action-text strong { font-size: 1.2rem; }
  .guest-action--primary .guest-action-text strong { font-size: 1.4rem; }
  .guest-action-text span { font-size: 0.86rem; opacity: 0.82; }

  .guest-steps {
    padding: var(--pi-space-4);
    background: var(--pi-surface);
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-lg);
  }

  .guest-steps h2 { margin: 0 0 var(--pi-space-3); font-size: 0.95rem; color: var(--pi-navy); }
  .guest-steps ol { display: grid; gap: var(--pi-space-2); margin: 0; padding: 0; list-style: none; }

  .guest-steps li {
    display: grid;
    grid-template-columns: 26px 22px 1fr;
    align-items: center;
    gap: var(--pi-space-2);
    color: var(--pi-text);
    font-size: 0.9rem;
  }

  .guest-step-no {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: #fff;
    background: var(--pi-navy);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
  }

  .guest-step-icon { color: var(--pi-blue-strong); }

  .guest-staff-gateway {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px var(--pi-space-2);
    padding: var(--pi-space-3) var(--pi-space-4);
    color: var(--pi-muted);
    border: 1px dashed var(--pi-line-strong);
    border-radius: var(--pi-radius-md);
    font-size: 0.84rem;
    text-decoration: none;
  }

  .guest-staff-gateway span { flex: 1 1 200px; }
  .guest-staff-gateway strong { color: var(--pi-blue-strong); }

  /* =================================================================== Quick Report (M2-013B, mockup-fidelity components)
     .qr-shell > .qr-header + .qr-body > .qr-stepper + form > .report-step panels + .qr-action-dock */
  .page-qr {
    --qr-royal: #1450d8;
    --qr-royal-2: #1e6bff;
    --qr-navy-1: #08204f;
    --qr-navy-2: #0e3a8c;
    --qr-field-bg: #f5f8fd;
    --qr-field-line: #dbe4f1;
    --qr-green: #1f9d4c;
    --qr-green-2: #178a3c;
    background: #e9eff8;
  }

  .qr-shell {
    width: min(100%, 480px);
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 70%, #eef4fd 100%);
  }

  /* App bar */
  .qr-header {
    position: sticky;
    top: 0;
    z-index: 20;
    color: #fff;
    background: linear-gradient(135deg, var(--qr-navy-1) 0%, var(--qr-navy-2) 100%);
    box-shadow: 0 2px 10px rgba(8, 32, 79, 0.25);
  }

  .qr-header-inner {
    display: flex;
    align-items: center;
    gap: var(--pi-space-3);
    min-height: 64px;
    padding: var(--pi-space-2) var(--pi-space-4);
  }

  .qr-identity {
    display: grid;
    justify-items: center;
    line-height: 1;
  }

  .qr-identity-sub {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .qr-header-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.28);
  }

  .qr-header-title {
    display: grid;
    flex: 1;
    min-width: 0;
    line-height: 1.25;
  }

  .qr-header-title strong {
    color: #fff;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .qr-header-title strong span { color: #57a2ff; }
  .qr-header-title > span { color: rgba(255, 255, 255, 0.85); font-size: 0.8rem; }

  .qr-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -8px;
    color: #fff;
    border-radius: 50%;
  }

  .qr-close:hover { background: rgba(255, 255, 255, 0.1); }
  .qr-close .ui-icon { width: 22px; height: 22px; }

  .qr-body {
    flex: 1;
    display: grid;
    align-content: start;
    gap: var(--pi-space-3);
    padding: var(--pi-space-4) var(--pi-space-4) 0;
  }

  /* Connected numbered stepper */
  .qr-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 2px 0 var(--pi-space-2);
  }

  .qr-stepper .qr-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 0;
    color: #8a9ab3;
    background: none;
    border: 0;
    border-radius: 0;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
  }

  .qr-stepper .qr-step:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 14px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: #d3dcea;
    z-index: 0;
  }

  .qr-stepper .qr-step.is-active::before,
  .qr-stepper .qr-step.is-done::before { background: var(--qr-royal-2); }

  .qr-stepper .step-num {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: 0;
    color: #8a9ab3;
    background: #fff;
    border: 2px solid #cfd9e8;
    border-radius: 50%;
    font-size: 0.86rem;
    font-weight: 800;
  }

  .qr-stepper .qr-step.is-done .step-num {
    color: #fff;
    background: var(--qr-royal-2);
    border-color: var(--qr-royal-2);
  }

  .qr-stepper .qr-step.is-active { color: var(--qr-navy-1); font-weight: 800; }

  .qr-stepper .qr-step.is-active .step-num {
    color: #fff;
    background: linear-gradient(180deg, var(--qr-royal-2), var(--qr-royal));
    border-color: #fff;
    box-shadow: 0 0 0 3px var(--qr-royal-2), 0 4px 10px rgba(20, 80, 216, 0.35);
  }

  .qr-stepper .step-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }

  /* Step panels */
  .qr-form .report-step { display: grid; gap: var(--pi-space-3); }

  .qr-panel-head h1,
  .qr-panel-head h2 {
    margin: 0;
    color: var(--qr-navy-1);
    font-size: 1.45rem;
    font-weight: 800;
  }

  .qr-panel-head p { margin: 2px 0 0; color: var(--pi-muted); font-size: 0.84rem; line-height: 1.5; }
  .qr-panel-head .required-note { margin-top: 4px; font-size: 0.8rem; }

  .qr-fields { display: grid; gap: var(--pi-space-3); }

  /* Icon-led field group: icon | label over control */
  .qr-field {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas: "icon label" "icon control";
    align-items: center;
    column-gap: var(--pi-space-3);
    row-gap: 6px;
    margin: 0;
    padding: var(--pi-space-3);
    background: #fff;
    border: 1px solid #e3eaf4;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(8, 32, 79, 0.06);
  }

  .qr-field:focus-within { border-color: #9ec0ff; box-shadow: 0 0 0 3px rgba(30, 107, 255, 0.12); }

  .qr-field-label {
    grid-area: label;
    padding: 0;
    color: var(--qr-navy-1);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.35;
  }

  .qr-field-icon {
    grid-area: icon;
    align-self: center;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--qr-navy-2);
  }

  .qr-field-icon .ui-icon { width: 28px; height: 28px; stroke-width: 1.7; }

  .qr-field input,
  .qr-field select,
  .qr-field textarea {
    grid-area: control;
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--pi-text);
    background: var(--qr-field-bg);
    border: 1px solid var(--qr-field-line);
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .qr-field select {
    appearance: none;
    padding-right: 40px;
    background-image: linear-gradient(45deg, transparent 50%, var(--qr-navy-2) 50%), linear-gradient(135deg, var(--qr-navy-2) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
  }

  .qr-field input::placeholder,
  .qr-field textarea::placeholder { color: #93a3ba; }

  .qr-field input:focus,
  .qr-field select:focus,
  .qr-field textarea:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--qr-royal-2);
    box-shadow: 0 0 0 3px rgba(30, 107, 255, 0.18);
  }

  .qr-field--textarea { grid-template-areas: "icon label" "icon control" ". count"; align-items: start; }
  .qr-field--textarea .qr-field-icon { align-self: start; margin-top: 26px; }
  .qr-field textarea { min-height: 120px; resize: vertical; }
  .qr-char-count { grid-area: count; justify-self: end; color: #93a3ba; font-size: 0.74rem; font-variant-numeric: tabular-nums; }

  /* Priority cards (real radios underneath) */
  .qr-priority { min-width: 0; align-items: start; }
  .qr-priority > .qr-field-icon { align-self: start; margin-top: 26px; }
  .qr-priority legend.qr-field-label { float: left; width: 100%; margin-bottom: 0; }
  .qr-priority-options { grid-area: control; display: grid; gap: 8px; }

  .qr-priority-option {
    position: relative;
    display: grid;
    grid-template-columns: 20px 28px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 8px 12px;
    background: var(--qr-field-bg);
    border: 1.5px solid var(--qr-field-line);
    border-radius: 12px;
    cursor: pointer;
  }

  .qr-priority-option input {
    grid-area: auto;
    position: static;
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    accent-color: var(--qr-royal-2);
  }

  .qr-priority-mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #fff;
    border-radius: 50%;
  }

  .qr-priority-mark .ui-icon { width: 16px; height: 16px; stroke-width: 2.4; }
  .qr-priority-text { display: grid; gap: 1px; line-height: 1.3; }
  .qr-priority-text strong { color: var(--qr-navy-1); font-size: 0.95rem; }
  .qr-priority-text small { color: var(--pi-muted); font-size: 0.76rem; }
  .qr-priority-check { display: none; color: var(--qr-royal-2); }
  .qr-priority-check .ui-icon { width: 20px; height: 20px; stroke-width: 2.6; }

  .qr-priority-option--critical .qr-priority-mark { background: #e02b20; }
  .qr-priority-option--urgent .qr-priority-mark { background: #f28a16; }
  .qr-priority-option--normal .qr-priority-mark { background: #f2c21b; color: #5a4300; }
  .qr-priority-option--critical input { accent-color: #e02b20; }
  .qr-priority-option--urgent input { accent-color: #e27a08; }

  .qr-priority-option:has(input:checked) { background: #fff; border-color: var(--qr-royal-2); box-shadow: 0 0 0 3px rgba(30, 107, 255, 0.14); }
  .qr-priority-option--critical:has(input:checked) { border-color: #e02b20; box-shadow: 0 0 0 3px rgba(224, 43, 32, 0.14); }
  .qr-priority-option--urgent:has(input:checked) { border-color: #f28a16; box-shadow: 0 0 0 3px rgba(242, 138, 22, 0.16); }
  .qr-priority-option:has(input:checked) .qr-priority-check { display: grid; }
  .qr-priority-option:has(input:focus-visible) { outline: 3px solid rgba(30, 107, 255, 0.5); outline-offset: 2px; }

  /* Upload surface + thumbnails */
  .qr-upload { display: grid; gap: var(--pi-space-3); }

  .qr-upload-zone {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 28px 16px;
    color: var(--qr-royal);
    background: linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
    border: 2px dashed #9fbaf0;
    border-radius: 16px;
    text-align: center;
  }

  .qr-upload-icon { position: relative; display: grid; place-items: center; width: 64px; height: 56px; color: var(--qr-royal-2); }
  .qr-upload-icon > .ui-icon { width: 48px; height: 48px; stroke-width: 1.6; }

  .qr-upload-plus {
    position: absolute;
    right: 2px;
    bottom: 2px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    color: #fff;
    background: var(--qr-royal-2);
    border: 2px solid #fff;
    border-radius: 50%;
  }

  .qr-upload-plus .ui-icon { width: 12px; height: 12px; stroke-width: 3; }
  .qr-upload-zone .upload-title { color: var(--qr-royal); font-size: 1rem; font-weight: 800; line-height: 1.4; }
  .qr-upload-zone .upload-copy { color: var(--pi-muted); font-size: 0.76rem; }
  .qr-upload-hint { color: var(--pi-muted); font-size: 0.84rem; text-align: center; }

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

  .qr-thumbs .photo-preview-card {
    position: relative;
    display: block;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #dfe6f0;
    border: 1px solid var(--qr-field-line);
    border-radius: 12px;
  }

  .qr-thumbs .photo-preview-card img { width: 100%; height: 100%; object-fit: cover; }
  .qr-thumbs .photo-preview-meta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .qr-thumbs .photo-preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    min-height: 0;
    padding: 0;
    color: #fff;
    background: rgba(8, 32, 79, 0.85);
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
  }

  /* Review */
  .qr-review { display: block; }

  .qr-review-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 4px 14px;
    background: #fff;
    border: 1px solid #e3eaf4;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(8, 32, 79, 0.06);
  }

  .qr-review-list > div {
    margin: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: var(--pi-space-2);
    padding: 10px 0;
    border-bottom: 1px solid #edf1f7;
  }

  .qr-review-list > div:last-child { border-bottom: 0; }

  .qr-review-list dt {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--qr-navy-2);
    font-size: 0.84rem;
    font-weight: 700;
  }

  .qr-review-list dt .ui-icon { width: 18px; height: 18px; margin-top: 1px; color: var(--qr-royal-2); }
  .qr-review-list dd { margin: 0; color: var(--pi-text); font-size: 0.88rem; overflow-wrap: anywhere; }

  .qr-review-priority[data-priority-tone] {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 999px;
    font-weight: 800;
  }

  .qr-review-priority[data-priority-tone="critical"] { color: #fff; background: #e02b20; }
  .qr-review-priority[data-priority-tone="urgent"] { color: #fff; background: #e27a08; }
  .qr-review-priority[data-priority-tone="normal"] { color: #5a4300; background: #f8dc6b; }

  .qr-review-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
  .qr-review-photos:empty { display: none; }
  .qr-review-photos img { width: 48px; height: 48px; object-fit: cover; border: 1px solid var(--qr-field-line); border-radius: 8px; }

  /* Step-1 industrial motif (CSS/SVG only, decorative) */
  .qr-motif {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 2px;
    margin: var(--pi-space-2) calc(-1 * var(--pi-space-4)) 0;
    padding: var(--pi-space-5) var(--pi-space-4) var(--pi-space-4);
    overflow: hidden;
    color: var(--qr-navy-2);
    background:
      radial-gradient(circle at 88% 70%, rgba(30, 107, 255, 0.08) 0 38px, transparent 39px),
      radial-gradient(circle at 88% 70%, transparent 0 52px, rgba(30, 107, 255, 0.06) 53px 58px, transparent 59px),
      linear-gradient(180deg, rgba(238, 244, 253, 0) 0%, #e3ecfa 100%);
    text-align: center;
  }

  .qr-motif-icon { position: absolute; left: 12px; bottom: 6px; width: 72px; height: 72px; color: rgba(30, 107, 255, 0.14); stroke-width: 1.4; fill: none; stroke: currentColor; }
  .qr-motif p { display: grid; margin: 0; font-size: 1rem; line-height: 1.35; }
  .qr-motif p span { color: var(--qr-navy-2); font-weight: 600; }
  .qr-motif p strong { color: var(--qr-navy-1); font-size: 1.15rem; font-weight: 800; }
  .qr-motif small { margin-top: 6px; color: #6f83a3; font-size: 0.64rem; letter-spacing: 0.12em; }

  /* Sticky action dock */
  .qr-action-dock {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    gap: 10px;
    margin: var(--pi-space-4) calc(-1 * var(--pi-space-4)) 0;
    padding: 12px var(--pi-space-4) calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid #e3eaf4;
  }

  .qr-action-dock .btn,
  .qr-success-actions .btn {
    flex: 1 1 0;
    min-height: 52px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
  }

  .qr-action-dock .btn[hidden] { display: none; }

  .qr-btn-next,
  .qr-success-actions .btn-primary {
    color: #fff;
    background: linear-gradient(180deg, var(--qr-royal-2) 0%, var(--qr-royal) 100%);
    border: 0;
    box-shadow: 0 4px 12px rgba(20, 80, 216, 0.3);
  }

  .qr-btn-next:hover { background: linear-gradient(180deg, #2f78ff 0%, #1247c2 100%); }
  .qr-btn-next .ui-icon, .qr-btn-back .ui-icon, .qr-btn-submit .ui-icon { width: 20px; height: 20px; }

  .qr-btn-back,
  .qr-success-actions .btn-secondary {
    color: var(--qr-royal);
    background: #fff;
    border: 1.5px solid var(--qr-royal-2);
  }

  .qr-btn-submit {
    color: #fff;
    background: linear-gradient(180deg, var(--qr-green) 0%, var(--qr-green-2) 100%);
    border: 0;
    box-shadow: 0 4px 12px rgba(23, 138, 60, 0.3);
  }

  .qr-alert { margin: 0; }

  /* Success */
  .qr-success { gap: var(--pi-space-4); padding-bottom: var(--pi-space-6); }
  .qr-success-hero { display: grid; justify-items: center; gap: 6px; padding-top: var(--pi-space-3); text-align: center; }
  .qr-success-hero h1 { margin: 0; color: var(--qr-navy-1); font-size: 1.6rem; font-weight: 800; }
  .qr-success-hero p { margin: 0; color: var(--pi-muted); font-size: 0.92rem; line-height: 1.55; }

  .qr-success-hero .success-icon { position: relative; display: grid; place-items: center; width: 132px; height: 112px; }
  .qr-success-hero .success-icon svg { width: 92px; height: 92px; }
  .qr-success-hero .success-icon circle { fill: var(--qr-green); stroke: none; }
  .qr-success-hero .success-icon path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

  .qr-confetti {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle, #1e6bff 0 3px, transparent 4px) 8% 30% / 12px 12px no-repeat,
      radial-gradient(circle, #f2c21b 0 3px, transparent 4px) 92% 22% / 12px 12px no-repeat,
      radial-gradient(circle, #1f9d4c 0 3px, transparent 4px) 16% 82% / 12px 12px no-repeat,
      radial-gradient(circle, #e02b20 0 2px, transparent 3px) 86% 78% / 10px 10px no-repeat,
      radial-gradient(circle, #1e6bff 0 2px, transparent 3px) 30% 4% / 10px 10px no-repeat,
      radial-gradient(circle, #f28a16 0 2px, transparent 3px) 72% 2% / 10px 10px no-repeat;
  }

  .qr-ticket.success-card--confirm {
    justify-items: center;
    gap: 6px;
    padding: var(--pi-space-4);
    background: #fff;
    border: 1px solid #e3eaf4;
    border-top: 0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(8, 32, 79, 0.06);
    text-align: center;
  }

  .qr-ticket .success-label { margin: 0; color: var(--pi-muted); font-size: 0.84rem; }
  .qr-ticket .success-wo-no { margin: 0; color: var(--qr-navy-1); font-size: clamp(1.6rem, 8vw, 2rem); font-weight: 900; font-variant-numeric: tabular-nums; }

  .qr-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    color: var(--pi-muted);
    font-size: 0.84rem;
  }

  .qr-ticket-meta > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
  .qr-ticket-meta .ui-icon { width: 16px; height: 16px; color: var(--qr-royal-2); }

  .qr-success-actions { display: grid; gap: 10px; }
  .qr-success-actions .btn { width: 100%; }

  .qr-again {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    color: var(--qr-royal);
    font-weight: 700;
    text-decoration: none;
  }

  .qr-again .ui-icon { width: 18px; height: 18px; }

  @media (max-width: 360px) {
    .qr-header-inner { gap: var(--pi-space-2); padding: var(--pi-space-2) var(--pi-space-3); }
    .qr-body { padding: var(--pi-space-3) var(--pi-space-3) 0; }
    .qr-action-dock, .qr-motif { margin-left: calc(-1 * var(--pi-space-3)); margin-right: calc(-1 * var(--pi-space-3)); padding-left: var(--pi-space-3); padding-right: var(--pi-space-3); }
    .qr-stepper .qr-step { font-size: 0.66rem; }
    .qr-field { grid-template-columns: 30px minmax(0, 1fr); column-gap: var(--pi-space-2); padding: 10px; }
    .qr-field-icon { width: 30px; height: 30px; }
    .qr-field-icon .ui-icon { width: 22px; height: 22px; }
    .qr-review-list > div { grid-template-columns: 96px minmax(0, 1fr); }
    .qr-priority-option { grid-template-columns: 18px 24px minmax(0, 1fr) 18px; gap: 8px; padding: 8px 10px; }
    .qr-action-dock .btn { gap: 6px; padding: 0 10px; font-size: 0.92rem; white-space: nowrap; }
    .qr-review-list dt { font-size: 0.8rem; }
  }

  @media (min-width: 481px) {
    .qr-shell { box-shadow: 0 0 0 1px #dbe4f1, 0 12px 40px rgba(8, 32, 79, 0.12); }
  }

  /* Tracking code panel (shared) */
  .tracking-access { border-radius: var(--pi-radius-md); }
  .tracking-code { border: 2px dashed var(--pi-blue); border-radius: var(--pi-radius-sm); }

  /* Tracking lookup / detail */
  .focus-panel { display: grid; gap: var(--pi-space-2); padding: var(--pi-space-5) var(--pi-space-4); }
  .focus-panel h1 { margin: 0; color: var(--pi-navy); font-size: 1.5rem; }

  .focus-panel-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: #fff;
    background: var(--pi-navy);
    border-radius: 14px;
  }

  .focus-panel-icon .ui-icon { width: 26px; height: 26px; }
  .focus-panel-alt { margin-top: var(--pi-space-2); font-size: 0.9rem; }
  .tracking-form .btn { width: 100%; }

  .track-hero {
    display: grid;
    gap: var(--pi-space-3);
    padding: var(--pi-space-4);
    color: #fff;
    background: linear-gradient(160deg, var(--pi-navy) 0%, var(--pi-navy-2) 100%);
    border-radius: var(--pi-radius-lg);
  }

  .track-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--pi-space-3); }
  .track-hero .eyebrow { color: #8fbaff; }
  .track-hero h1 { margin: 0; color: #fff; font-size: clamp(1.4rem, 6.4vw, 1.8rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .track-new-search { color: #cfe2ff; font-size: 0.86rem; white-space: nowrap; }
  .track-hero .status-banner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pi-space-2); }
  .track-hero .status-meta { color: rgba(255, 255, 255, 0.72); font-size: 0.86rem; }

  .track-progress {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: var(--pi-space-2) 0 0;
    padding: 0;
    list-style: none;
  }

  .track-progress li {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.7rem;
    text-align: center;
  }

  .track-progress li:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 13px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 0;
  }

  .track-progress li.is-done::before,
  .track-progress li.is-current::before { background: var(--pi-blue-bright); }

  .track-progress-dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.7);
    background: var(--pi-navy-2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 0.76rem;
    font-weight: 800;
  }

  .track-progress-dot .ui-icon { width: 14px; height: 14px; stroke-width: 2.6; }
  .track-progress li.is-done { color: rgba(255, 255, 255, 0.85); }
  .track-progress li.is-done .track-progress-dot { color: #fff; background: var(--pi-blue-bright); border-color: var(--pi-blue-bright); }
  .track-progress li.is-current { color: #fff; font-weight: 700; }
  .track-progress li.is-current .track-progress-dot { color: var(--pi-navy); background: #fff; border-color: var(--pi-blue-bright); box-shadow: 0 0 0 4px rgba(47, 140, 255, 0.35); }
  .track-progress-label { overflow-wrap: anywhere; line-height: 1.25; }

  .track-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 10px;
    border-radius: var(--pi-radius-sm);
    font-size: 0.86rem;
    font-weight: 700;
  }

  .track-note--waiting { color: var(--pi-warning); background: var(--pi-warning-bg); }

  .track-facts { padding: var(--pi-space-4); }
  .track-facts .wo-key-facts dt { display: flex; align-items: center; gap: 6px; }
  .track-facts .wo-key-facts dt .ui-icon { width: 15px; height: 15px; color: var(--pi-blue-strong); }

  /* Login gateway */
  .auth-gateway {
    width: min(100%, 460px);
    margin: 0 auto;
    padding: 0 var(--pi-space-4) var(--pi-space-8);
    display: grid;
    gap: var(--pi-space-4);
  }

  .auth-brand {
    display: grid;
    justify-items: start;
    gap: 2px;
    margin: 0 calc(-1 * var(--pi-space-4));
    padding: var(--pi-space-6) var(--pi-space-4) 56px;
    color: rgba(255, 255, 255, 0.75);
    background: linear-gradient(160deg, var(--pi-navy) 0%, var(--pi-navy-2) 100%);
    border-radius: 0 0 24px 24px;
    font-size: 0.86rem;
  }

  .auth-brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: var(--pi-space-2);
    color: #fff;
    background: var(--pi-blue);
    border-radius: 12px;
  }

  .auth-brand-mark .ui-icon { width: 24px; height: 24px; }
  .auth-brand .brand-mark { color: #8fbaff; font-size: 0.7rem; letter-spacing: 0.1em; }
  .auth-brand strong { color: #fff; font-size: 1.3rem; letter-spacing: 0.1em; }

  .auth-card {
    margin-top: -44px;
    padding: var(--pi-space-5) var(--pi-space-4);
    box-shadow: var(--pi-shadow-2);
  }

  .auth-card h1 { margin: 4px 0; color: var(--pi-navy); font-size: 1.35rem; }
  .auth-card .lead { font-size: 0.9rem; }
  .auth-card .btn { width: 100%; }

  .auth-back {
    display: flex;
    align-items: center;
    gap: var(--pi-space-2);
    min-height: 48px;
    padding: var(--pi-space-2) var(--pi-space-3);
    color: var(--pi-muted);
    border: 1px dashed var(--pi-line-strong);
    border-radius: var(--pi-radius-md);
    font-size: 0.86rem;
    text-decoration: none;
  }

  .auth-back strong { color: var(--pi-blue-strong); }

  /* =================================================================== staff pages */
  /* My Jobs: compact operational summary strip */
  .ops-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    background: var(--pi-surface);
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-lg);
    box-shadow: var(--pi-shadow-1);
  }

  .ops-summary--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }

  .ops-summary-item {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    min-height: 68px;
    padding: var(--pi-space-2) 2px;
    color: var(--pi-muted);
    border-top: 3px solid var(--pi-line-strong);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
  }

  .ops-summary-item + .ops-summary-item { border-left: 1px solid var(--pi-line); }
  .ops-summary-item strong { order: -1; color: var(--pi-navy); font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
  .ops-summary-item:hover { background: var(--pi-surface-2); }
  .ops-summary-item.tone-reported { border-top-color: #6b7f9e; }
  .ops-summary-item.tone-in_progress { border-top-color: var(--pi-blue); }
  .ops-summary-item.tone-waiting_parts { border-top-color: var(--pi-warning-line); }
  .ops-summary-item.tone-closed { border-top-color: var(--pi-success); }
  .ops-summary-item.tone-completed { border-top-color: var(--pi-teal); background: var(--pi-teal-bg); }
  .ops-section-more { justify-self: start; }

  /* Work-order detail */
  .wo-hero {
    display: grid;
    gap: var(--pi-space-2);
    padding: var(--pi-space-4);
    color: #fff;
    background: linear-gradient(160deg, var(--pi-navy) 0%, var(--pi-navy-2) 100%);
    border: 0;
    border-left: 5px solid var(--pi-line-strong);
    border-radius: var(--pi-radius-lg);
  }

  .wo-hero.job-card--p-urgent { border-left-color: var(--pi-orange); }
  .wo-hero.job-card--p-critical { border-left-color: #ff5a4f; }

  .wo-hero-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--pi-space-2); }
  .wo-hero .eyebrow { color: #8fbaff; }

  .wo-hero-no {
    margin: 0;
    color: #fff;
    font-size: clamp(1.4rem, 6vw, 1.8rem);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  .wo-hero-equipment,
  .wo-hero-where {
    display: flex;
    align-items: flex-start;
    gap: var(--pi-space-2);
    margin: 0;
    overflow-wrap: anywhere;
  }

  .wo-hero-equipment { color: #fff; font-size: 1.08rem; font-weight: 700; }
  .wo-hero-where { color: rgba(255, 255, 255, 0.75); font-size: 0.9rem; }
  .wo-hero-equipment .ui-icon, .wo-hero-where .ui-icon { margin-top: 3px; color: #8fbaff; }
  .wo-hero .age-chip { color: #dbe7f7; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); }

  .wo-state-panel {
    display: grid;
    gap: var(--pi-space-3);
    padding: var(--pi-space-3);
    background: var(--pi-surface);
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-lg);
    box-shadow: var(--pi-shadow-1);
  }

  .state-banner {
    display: grid;
    gap: 2px;
    padding: var(--pi-space-3);
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: var(--pi-radius-md);
  }

  .state-banner strong { display: flex; align-items: center; gap: 6px; }
  .state-banner--active { color: var(--pi-navy); background: var(--pi-blue-tint); border-color: #bcd4fb; border-left-color: var(--pi-blue); }
  .state-banner--waiting { border-left-color: var(--pi-warning); }
  .state-banner--completed { border-left-color: var(--pi-teal); }
  .state-banner--closed { border-left-color: var(--pi-success); }

  .wo-state-panel .staff-sticky-actions {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--pi-space-2);
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .wo-state-panel .staff-sticky-actions .btn { width: 100%; min-height: 52px; }

  .wo-key-facts { display: grid; gap: var(--pi-space-3); margin: 0; }
  .wo-key-facts div { display: grid; gap: 2px; }
  .wo-key-facts dt { color: var(--pi-muted); font-size: 0.8rem; font-weight: 600; }
  .wo-key-facts dd { margin: 0; color: var(--pi-text); overflow-wrap: anywhere; }

  .wo-problem-block {
    display: grid;
    gap: 6px;
    margin-top: var(--pi-space-3);
    padding-top: var(--pi-space-3);
    border-top: 1px solid var(--pi-line);
  }

  .wo-block-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--pi-muted);
    font-size: 0.8rem;
    font-weight: 700;
  }

  .wo-block-label .ui-icon { width: 15px; height: 15px; color: var(--pi-orange); }

  .wo-problem {
    margin: 0;
    padding: var(--pi-space-3);
    color: var(--pi-text);
    background: var(--pi-surface-2);
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-md);
  }

  .wo-result-card { border-top: 3px solid var(--pi-teal); }
  .wo-result-card .wo-block-label { margin-top: var(--pi-space-3); }
  .wo-result-card .wo-block-label .ui-icon { color: var(--pi-teal); }

  .wo-more summary {
    display: flex;
    align-items: center;
    gap: var(--pi-space-2);
    min-height: 32px;
    cursor: pointer;
    color: var(--pi-navy);
    font-weight: 700;
  }

  .wo-more[open] summary { margin-bottom: var(--pi-space-3); }

  /* KPI overview */
  .kpi-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    background: linear-gradient(160deg, var(--pi-navy) 0%, var(--pi-navy-2) 100%);
    border-radius: var(--pi-radius-lg);
  }

  .kpi-board-item {
    display: grid;
    align-content: start;
    gap: 2px;
    min-height: 96px;
    padding: var(--pi-space-3);
    color: #fff;
    text-decoration: none;
  }

  .kpi-board-item + .kpi-board-item { border-left: 1px solid rgba(255, 255, 255, 0.12); }
  .kpi-board-item:hover { background: rgba(255, 255, 255, 0.06); }
  .kpi-board-label { color: rgba(255, 255, 255, 0.75); font-size: 0.78rem; font-weight: 600; line-height: 1.25; }
  .kpi-board-item .management-kpi-value { color: #fff; font-size: clamp(1.7rem, 7vw, 2.4rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
  .kpi-board-desc { display: none; }

  .kpi-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    background: var(--pi-surface);
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-lg);
  }

  .kpi-strip-item {
    position: relative;
    display: grid;
    align-content: start;
    gap: 2px;
    padding: var(--pi-space-3);
    color: var(--pi-text);
    text-decoration: none;
  }

  .kpi-strip-item + .kpi-strip-item { border-left: 1px solid var(--pi-line); }
  .kpi-strip-item:hover { background: var(--pi-surface-2); }
  .kpi-strip-label { color: var(--pi-muted); font-size: 0.76rem; font-weight: 600; line-height: 1.25; }
  .kpi-strip-item .management-kpi-value { color: var(--pi-navy); font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
  .kpi-strip-desc { display: none; }
  .kpi-strip-item .kpi-tile-link { position: absolute; top: 10px; right: 8px; color: #8a9ab3; }
  .kpi-strip-item .kpi-tile-link .ui-icon { width: 14px; height: 14px; }

  .kpi-timing {
    display: grid;
    margin: 0;
    overflow: hidden;
    background: var(--pi-surface);
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-lg);
  }

  .kpi-timing-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--pi-space-3);
    padding: var(--pi-space-3) var(--pi-space-4);
  }

  .kpi-timing-row + .kpi-timing-row { border-top: 1px solid var(--pi-line); }
  .kpi-timing-row dt { display: grid; gap: 1px; min-width: 0; }
  .kpi-timing-title { color: var(--pi-text); font-size: 0.9rem; font-weight: 600; }
  .kpi-timing-flow { font-size: 0.76rem; }
  .kpi-timing-row dd { flex: none; margin: 0; text-align: right; }
  .kpi-timing-row .management-metric-value { color: var(--pi-navy); font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

  .kpi-feedback {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--pi-space-2);
  }

  .kpi-feedback-item {
    display: grid;
    align-content: start;
    gap: 2px;
    padding: var(--pi-space-3);
    color: var(--pi-text);
    background: var(--pi-surface);
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-md);
    text-decoration: none;
  }

  .kpi-feedback-label { color: var(--pi-muted); font-size: 0.76rem; font-weight: 600; line-height: 1.25; }
  .kpi-feedback-item .management-metric-value { color: var(--pi-navy); font-size: 1.3rem; font-weight: 800; }
  .kpi-feedback-item > .muted { display: none; }
  .kpi-feedback-item .kpi-tile-link { font-size: 0.76rem; color: var(--pi-blue-strong); }

  .report-entry-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--pi-space-3);
    padding: var(--pi-space-4);
    color: #fff;
    background: var(--pi-navy-2);
    border: 0;
    border-left: 4px solid var(--pi-blue-bright);
    border-radius: var(--pi-radius-lg);
    text-decoration: none;
  }

  .report-entry-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
  }

  .report-entry-text { display: grid; gap: 2px; }
  .report-entry-card .muted { color: rgba(255, 255, 255, 0.72); font-size: 0.84rem; }
  .report-entry-arrow { color: #fff; }

  /* Performance */
  .performance-card-grid { display: grid; gap: var(--pi-space-3); }
  .performance-card { display: grid; gap: var(--pi-space-3); padding: var(--pi-space-4); }
  .performance-card-head { display: flex; align-items: center; gap: var(--pi-space-3); }
  .perf-identity { flex: 1; min-width: 0; }
  .perf-identity h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
  .perf-identity p { margin: 0; font-size: 0.8rem; }

  .perf-avatar,
  .profile-avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--pi-navy);
    background: var(--pi-blue-tint);
    border-radius: 50%;
    font-weight: 800;
  }

  .period-tag { flex: none; }

  .perf-stat-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-md);
  }

  .perf-stat-strip div {
    display: grid;
    gap: 2px;
    padding: var(--pi-space-2) 4px;
    text-align: center;
    background: var(--pi-surface);
  }

  .perf-stat-strip div + div { border-left: 1px solid var(--pi-line); }
  .perf-stat-strip .perf-stat-now { background: var(--pi-surface-2); }
  .perf-stat-strip dt { display: grid; gap: 1px; color: var(--pi-muted); font-size: 0.7rem; font-weight: 600; line-height: 1.2; }
  .perf-stat-strip dd { margin: 0; color: var(--pi-navy); font-size: 1.15rem; font-weight: 800; }
  .perf-now-tag { color: #8a9ab3; font-size: 0.62rem; font-weight: 500; }

  .perf-time-list { display: grid; gap: 0; margin: 0; }

  .perf-time-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--pi-space-2);
    padding: 6px 0;
    border-bottom: 1px solid var(--pi-line);
  }

  .perf-time-list div:last-child { border-bottom: 0; }
  .perf-time-list dt { display: flex; align-items: center; gap: 6px; color: var(--pi-muted); font-size: 0.86rem; }
  .perf-time-list dt .ui-icon { width: 15px; height: 15px; color: #8a9ab3; }
  .perf-time-list dd { margin: 0; color: var(--pi-text); font-weight: 700; white-space: nowrap; }

  /* History / search */
  .history-search-card { display: grid; gap: var(--pi-space-3); padding: var(--pi-space-4); }

  .search-bar {
    position: relative;
    display: flex;
    align-items: center;
  }

  .search-bar .ui-icon { position: absolute; left: 14px; color: var(--pi-muted); pointer-events: none; }
  .search-bar input { width: 100%; padding-left: 44px !important; min-height: 52px !important; font-size: 1rem; }

  .management-filter-panel {
    padding: var(--pi-space-3);
    background: var(--pi-surface-2);
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-md);
  }

  .management-filter-panel summary { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--pi-navy); font-weight: 700; }
  .choice-chip { border-radius: var(--pi-radius-sm); }
  .management-toolbar-actions .btn-primary { flex: 1 1 160px; }

  /* Notifications */
  .notify-list {
    display: grid;
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
    background: var(--pi-surface);
    border: 1px solid var(--pi-line);
    border-radius: var(--pi-radius-lg);
  }

  .notify-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: var(--pi-space-3);
    padding: var(--pi-space-3) var(--pi-space-4);
    border-left: 4px solid transparent;
  }

  .notify-item + .notify-item { border-top: 1px solid var(--pi-line); }
  .notify-item.is-unread { background: #f4f8ff; border-left-color: var(--pi-blue); }

  .notify-marker {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #8a9ab3;
    background: var(--pi-surface-2);
    border-radius: 50%;
  }

  .notify-item.is-unread .notify-marker { color: #fff; background: var(--pi-blue); }
  .notify-body { display: grid; gap: 2px; min-width: 0; }
  .notify-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .notify-item:not(.is-unread) .notify-head strong { font-weight: 600; color: var(--pi-muted); }

  .notify-unread-tag {
    padding: 0 6px;
    color: #fff;
    background: var(--pi-blue);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
  }

  .notify-message { margin: 0; color: var(--pi-text); font-size: 0.9rem; overflow-wrap: anywhere; }
  .notify-time { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--pi-muted); font-size: 0.78rem; }
  .notify-time .ui-icon { width: 13px; height: 13px; }
  .notify-actions { display: flex; flex-wrap: wrap; gap: var(--pi-space-2); margin-top: var(--pi-space-2); }
  .notify-actions form { display: contents; }

  /* Profile */
  .profile-card { display: grid; gap: var(--pi-space-3); padding: var(--pi-space-4); }
  .profile-identity { display: flex; align-items: center; gap: var(--pi-space-3); }
  .profile-identity h2 { margin: 0; font-size: 1.1rem; }
  .profile-identity p { margin: 0; }
  .profile-avatar { width: 56px; height: 56px; font-size: 1.3rem; color: #fff; background: var(--pi-navy); }
  .profile-facts { display: grid; margin: 0; border-top: 1px solid var(--pi-line); }

  .profile-facts div {
    display: flex;
    justify-content: space-between;
    gap: var(--pi-space-3);
    padding: var(--pi-space-2) 0;
    border-bottom: 1px solid var(--pi-line);
  }

  .profile-facts dt { color: var(--pi-muted); font-size: 0.86rem; }
  .profile-facts dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
  .profile-menu { display: grid; padding: var(--pi-space-2) var(--pi-space-4); }
  .profile-menu h2 { margin: var(--pi-space-2) 0; font-size: 0.9rem; color: var(--pi-muted); }

  .profile-menu-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--pi-space-3);
    min-height: 48px;
    color: var(--pi-navy);
    border-top: 1px solid var(--pi-line);
    font-weight: 600;
    text-decoration: none;
  }

  .profile-menu-item .ui-icon:first-child { color: var(--pi-blue-strong); }
  .profile-logout-form { margin: 0; }

  /* Legacy component rules neutralised for the new compositions */
  .ops-section-head { justify-content: flex-start; margin-bottom: 0; }
  .ops-section-head h2 { flex: 0 1 auto; text-align: left; }
  .kpi-timing .kpi-timing-row { flex-direction: row; align-items: center; background: none; border-radius: 0; box-shadow: none; }
  .kpi-board-item, .kpi-strip-item, .kpi-feedback-item { box-shadow: none; }
  .kpi-board .management-kpi-value, .kpi-strip .management-kpi-value, .kpi-timing .management-metric-value, .kpi-feedback .management-metric-value { margin-top: 0; }
  .report-entry-card strong { color: #fff; }
  .job-card-foot .job-card-action { margin-left: auto; }

  .track-hero .track-new-search { color: #cfe2ff; }
  .perf-stat-strip div { border: 0; border-radius: 0; box-shadow: none; }
  .perf-stat-strip div + div { border-left: 1px solid var(--pi-line); }
  .job-card--compact.is-urgent,
  .job-card--compact.job-card--p-critical { border-color: var(--pi-line); border-left-color: var(--pi-danger); box-shadow: var(--pi-shadow-1); }
  .job-card--compact.job-card--p-urgent { border-color: var(--pi-line); border-left-color: var(--pi-orange); }

  /* KPI markup keeps the stable h3 -> value -> description order; layout comes from grid areas. */
  .kpi-board-item h3 { margin: 0; color: rgba(255, 255, 255, 0.75); font-size: 0.78rem; font-weight: 600; line-height: 1.25; }
  .kpi-strip-item h3 { margin: 0; color: var(--pi-muted); font-size: 0.76rem; font-weight: 600; line-height: 1.25; padding-right: 14px; }
  .kpi-feedback-item h3 { margin: 0; color: var(--pi-muted); font-size: 0.76rem; font-weight: 600; line-height: 1.25; }
  .kpi-timing .kpi-timing-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title value" "flow value";
    align-items: center;
    column-gap: var(--pi-space-3);
    row-gap: 1px;
  }
  .kpi-timing-row h3 { grid-area: title; margin: 0; color: var(--pi-text); font-size: 0.9rem; font-weight: 600; }
  .kpi-timing-row .management-metric-value { grid-area: value; }
  .kpi-timing-row p { grid-area: flow; margin: 0; font-size: 0.76rem; }
  .kpi-feedback-item p { display: none; margin: 0; }

  /* Monthly report (screen) */
  .report-status-card .wo-hero-no { color: var(--pi-navy); }
  .report-status-card { border-top: 4px solid var(--pi-navy); }
  .report-month-form .btn { min-height: 48px; }

  /* Splash: keep the rotating gear inside its frame (decorative, never widens the page). */
  .splash-asset-frame { overflow: hidden; }
}

/* =================================================================== desktop: sidebar operations layout */
@media screen and (min-width: 1024px) {
  .staff-app-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "nav header" "nav main";
    padding-bottom: 0;
  }

  .staff-topbar { grid-area: header; position: sticky; top: 0; }
  .staff-app-shell { background: linear-gradient(90deg, var(--pi-navy) 0, var(--pi-navy) 240px, transparent 240px); }
  .staff-nav-brand .staff-brand-product { font-size: 0.72rem; letter-spacing: 0.08em; white-space: nowrap; }
  .staff-topbar .staff-brand { display: none; }
  .staff-topbar-row { justify-content: flex-end; min-height: 44px; }

  .staff-topbar-inner {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    padding: var(--pi-space-3) var(--pi-space-6);
    width: 100%;
  }

  .staff-topbar-context { margin: 0; padding: 0; border: 0; }
  .staff-page-shell { grid-area: main; width: min(100%, 1180px); padding: var(--pi-space-5) var(--pi-space-6) var(--pi-space-8); }

  .staff-bottom-nav,
  .staff-bottom-nav--management {
    grid-area: nav;
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100vh;
    padding: var(--pi-space-4) var(--pi-space-3);
    background: var(--pi-navy);
    border: 0;
    border-right: 1px solid var(--pi-navy-3);
    border-radius: 0;
    box-shadow: none;
  }

  .staff-nav-brand {
    display: flex;
    align-items: center;
    gap: var(--pi-space-2);
    margin-bottom: var(--pi-space-4);
    padding: 0 var(--pi-space-2) var(--pi-space-4);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .staff-nav-link,
  .staff-bottom-nav--management .staff-nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--pi-space-3);
    min-height: 46px;
    padding: 0 var(--pi-space-3);
    border-radius: var(--pi-radius-md);
    font-size: 0.92rem;
    text-align: left;
  }

  .staff-nav-link.is-active { background: var(--pi-blue); }
  .staff-nav-badge { position: static; margin-left: auto; }

  .staff-job-grid,
  .history-result-grid,
  .performance-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .kpi-board-desc,
  .kpi-strip-desc { display: block; font-size: 0.76rem; }
  .kpi-board-desc { color: rgba(255, 255, 255, 0.6); }
  .kpi-timing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-timing-row:nth-child(2) { border-top: 0; }
  .kpi-timing-row:nth-child(even) { border-left: 1px solid var(--pi-line); }
  .wo-key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wo-key-facts--stack { grid-template-columns: 1fr; }
  .kpi-feedback-item > .muted { display: block; font-size: 0.76rem; }
}

@media screen and (min-width: 1400px) {
  .staff-job-grid,
  .history-result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media screen and (min-width: 600px) and (max-width: 1023px) {
  .staff-job-grid,
  .history-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wo-key-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wo-key-facts--stack { grid-template-columns: 1fr; }
  .staff-bottom-nav, .staff-bottom-nav--management { left: 50%; right: auto; width: 560px; transform: translateX(-50%); }
}

@media screen and (max-width: 360px) {
  .staff-nav-link,
  .staff-bottom-nav--management .staff-nav-link { font-size: 0.66rem; }
  .nav-icon { width: 20px; height: 20px; }
  .staff-page-shell { padding-left: var(--pi-space-3); padding-right: var(--pi-space-3); }
  .guest-app, .auth-gateway { padding-left: var(--pi-space-3); padding-right: var(--pi-space-3); }
  .guest-brandbar, .guest-hero-band, .auth-brand { margin-left: calc(-1 * var(--pi-space-3)); margin-right: calc(-1 * var(--pi-space-3)); }
  .ops-summary-item { font-size: 0.66rem; }
  .ops-summary-item strong { font-size: 1.25rem; }
  .kpi-board-item, .kpi-strip-item { padding: var(--pi-space-2); }
  .perf-stat-strip dt { font-size: 0.62rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* ==========================================================================
   M2-013B Phase B — application-wide mockup-fidelity layer
   Extends the approved Phase A Quick Report language (navy app bar, electric
   blue actions, white panels on pale blue) to every screen. Screen-only: the
   A4 print rules above stay authoritative.
   Components: brand-lockup · app header · bottom dock (guest + staff) ·
   splash · home hero / CTA / tiles / factory-banner · auth · tracking ·
   identity-block · metric-strip / metric-card · job-list / job-item ·
   action-panel · search-panel · empty-state · timeline · staff pages.
   ========================================================================== */
@media screen {
  :root {
    --mx-navy-0: #061634;
    --mx-navy-1: #08204f;
    --mx-navy-2: #0e3a8c;
    --mx-royal: #1450d8;
    --mx-electric: #1e6bff;
    --mx-sky: #57a2ff;
    --mx-page: #e9eff8;
    --mx-panel-line: #dbe4f1;
    --mx-field-bg: #f5f8fd;
    --mx-card-shadow: 0 2px 10px rgba(8, 32, 79, 0.07), 0 1px 2px rgba(8, 32, 79, 0.05);
    --mx-lift-shadow: 0 10px 26px rgba(20, 80, 216, 0.28);
    --mx-dock-h: 68px;
    --mx-col: 480px;
  }

  .page-app,
  .page-staff { background: var(--mx-page); }

  /* ---------------------------------------------------------------- brand lockup */
  .brand-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #fff;
  }

  .brand-lockup-mark {
    flex: none;
    display: grid;
    justify-items: center;
    gap: 2px;
    line-height: 1;
  }

  .brand-lockup-mark img { width: 60px; height: auto; }

  .brand-lockup-org {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .brand-lockup-divider {
    flex: none;
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.28);
  }

  .brand-lockup-product {
    display: grid;
    min-width: 0;
    line-height: 1.25;
  }

  .brand-lockup-product strong {
    color: #fff;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .brand-lockup-product strong span { color: var(--mx-sky); }

  .brand-lockup-sub {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.74rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Phase A header: official mark replaces the text identity */
  .qr-identity-logo { width: 60px; height: auto; }

  /* ---------------------------------------------------------------- guest app header */
  .page-app .guest-brandbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: block;
    margin: 0;
    padding: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--mx-navy-1) 0%, var(--mx-navy-2) 100%);
    border: 0;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(8, 32, 79, 0.25);
  }

  .app-header-inner {
    display: flex;
    align-items: center;
    gap: var(--pi-space-2);
    min-height: 64px;
    padding: var(--pi-space-2) var(--pi-space-4);
  }

  .app-header-home {
    flex: 1;
    min-width: 0;
    color: #fff;
    text-decoration: none;
  }

  .app-header-back,
  .app-header-tool {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 44px;
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
  }

  .app-header-back { margin-left: -8px; }

  .app-header-tool {
    width: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .app-header-back .ui-icon,
  .app-header-tool .ui-icon { width: 22px; height: 22px; }

  .app-header-back:hover,
  .app-header-tool:hover { background: rgba(255, 255, 255, 0.16); }

  /* ---------------------------------------------------------------- guest bottom dock */
  .app-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    width: min(100%, var(--mx-col));
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--mx-panel-line);
    box-shadow: 0 -6px 20px rgba(8, 32, 79, 0.08);
    transform: translateX(-50%);
  }

  .app-nav-link,
  .page-staff .staff-nav-link {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: end;
    gap: 3px;
    min-height: 52px;
    padding: 4px 2px;
    color: #5b6f8c;
    background: transparent;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    word-break: keep-all;
  }

  .app-nav-link .nav-icon,
  .page-staff .staff-nav-link .nav-icon { width: 24px; height: 24px; }

  .app-nav-link:hover { color: var(--mx-royal); }

  .app-nav-link.is-active,
  .page-staff .staff-nav-link.is-active {
    color: var(--mx-royal);
    background: transparent;
    font-weight: 800;
  }

  .app-nav-link.is-active .nav-icon,
  .page-staff .staff-nav-link.is-active .nav-icon { stroke-width: 2.3; }

  .app-nav-fab,
  .page-staff .staff-nav-fab { color: var(--mx-royal); font-weight: 700; }

  .app-nav-fab-btn,
  .staff-nav-fab-btn {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-top: -26px;
    color: #fff;
    background: linear-gradient(180deg, var(--mx-electric) 0%, var(--mx-royal) 100%);
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: var(--mx-lift-shadow);
  }

  .app-nav-fab-btn .nav-icon,
  .staff-nav-fab-btn .nav-icon { width: 26px; height: 26px; stroke-width: 2.6; }

  /* ---------------------------------------------------------------- splash */
  .page-splash { background: var(--mx-navy-0); }

  .splash-v2 {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    justify-items: center;
    width: min(100%, 560px);
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: calc(28px + env(safe-area-inset-top)) var(--pi-space-4) calc(22px + env(safe-area-inset-bottom));
    overflow: hidden;
    color: #fff;
    text-align: center;
    background:
      radial-gradient(ellipse 90% 34% at 50% 6%, #ffffff 0%, #f4f8ff 38%, rgba(214, 229, 255, 0.92) 55%, rgba(120, 165, 240, 0) 78%),
      radial-gradient(circle at 50% 46%, rgba(46, 128, 255, 0.55) 0%, rgba(20, 70, 180, 0.2) 38%, rgba(6, 22, 52, 0) 62%),
      linear-gradient(180deg, #7ea9ec 0%, #2b5fc0 26%, #0d2f78 52%, #081f52 76%, var(--mx-navy-0) 100%);
  }

  .splash-v2-bg {
    position: absolute;
    inset: 36% 0 0;
    z-index: -1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
  }

  .splash-v2-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 52% 38%;
    opacity: 0.32;
    filter: blur(1.5px) saturate(0.6);
    mix-blend-mode: luminosity;
  }

  .splash-v2-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #0d2f78 0%, rgba(8, 31, 82, 0.35) 30%, rgba(6, 22, 52, 0.82) 78%, var(--mx-navy-0) 100%);
  }

  .splash-v2-brand { display: grid; justify-items: center; gap: 4px; }
  .splash-v2-logo { width: min(62vw, 250px); height: auto; }

  .splash-v2-brand h1 {
    margin: 10px 0 0;
    color: var(--mx-navy-1);
    font-size: clamp(1.7rem, 8.6vw, 2.35rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0.01em;
  }

  .splash-v2-brand h1 span { color: var(--mx-electric); }

  .splash-v2-brand p {
    margin: 0;
    color: var(--mx-navy-1);
    font-size: clamp(0.95rem, 4.4vw, 1.15rem);
    font-weight: 600;
  }

  .splash-v2-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 0;
    padding: 14px 0 6px;
  }

  .splash-v2-art { width: min(84vw, 360px); height: auto; filter: drop-shadow(0 18px 30px rgba(0, 10, 40, 0.45)); }

  .splash-v2-tag {
    position: absolute;
    top: 6px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.75;
    text-align: left;
  }

  .splash-v2-tag::after {
    content: "";
    display: block;
    width: 22px;
    height: 3px;
    margin-top: 6px;
    background: var(--mx-electric);
    border-radius: 2px;
  }

  .splash-v2-tag--left { left: 0; }
  .splash-v2-tag--right { right: 0; }

  .splash-v2-loading {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: min(76%, 320px);
    margin-top: 6px;
  }

  .splash-v2 .splash-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
  }

  .splash-v2 .splash-progress span {
    background: linear-gradient(90deg, #1e6bff 0%, #3ea0ff 100%);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(62, 160, 255, 0.8);
  }

  .splash-v2-loading p { margin: 0; color: rgba(255, 255, 255, 0.9); font-size: 0.95rem; }

  .splash-v2-skip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .splash-v2-values {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
  }

  .splash-v2-values li {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 0 2px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.4;
  }

  .splash-v2-values li + li { border-left: 1px solid rgba(255, 255, 255, 0.22); }
  .splash-v2-values .ui-icon { width: 28px; height: 28px; stroke-width: 1.5; }

  /* ---------------------------------------------------------------- guest page column */
  .page-app .guest-app,
  .auth-v2 {
    width: min(100%, var(--mx-col));
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 0 calc(var(--mx-dock-h) + 28px + env(safe-area-inset-bottom));
    display: block;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 60%, #eef4fd 100%);
  }

  /* ---------------------------------------------------------------- guest home */
  .page-app .home-v2-hero {
    margin: 0;
    padding: 0;
    color: #fff;
    overflow: hidden;
    background:
      radial-gradient(circle at 88% 70%, rgba(30, 107, 255, 0.45) 0%, rgba(30, 107, 255, 0) 55%),
      linear-gradient(160deg, var(--mx-navy-1) 0%, var(--mx-navy-2) 100%);
    border-radius: 0;
  }

  .page-app .home-v2-hero .guest-brandbar { position: relative; box-shadow: none; background: transparent; }

  .page-app .home-v2-hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
    gap: 0;
    margin: 0;
    padding: 6px 0 0 var(--pi-space-4);
    color: #fff;
    background: none;
    border: 0;
    box-shadow: none;
    text-align: left;
  }

  .home-v2-hero-copy { padding-bottom: 54px; }

  .page-app .home-v2-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.7rem, 8.4vw, 2.2rem);
    font-weight: 900;
    line-height: 1.18;
  }

  .page-app .home-v2-hero h1 .nowrap { display: block; color: #4da3ff; }

  .home-v2-quote {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .home-v2-hero-art {
    align-self: end;
    margin: 0 0 -6px -26px;
    overflow: hidden;
  }

  .home-v2-art { width: 100%; height: auto; }

  .home-v2-body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    margin-top: -36px;
    padding: 0 var(--pi-space-4);
  }

  .home-v2-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    padding: 16px 16px 16px 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--mx-electric) 0%, var(--mx-royal) 60%, #0f3fb6 100%);
    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    box-shadow: var(--mx-lift-shadow);
    text-decoration: none;
  }

  .home-v2-cta-icon .ui-icon { width: 44px; height: 44px; stroke-width: 2; }
  .home-v2-cta-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
  .home-v2-cta-text strong { font-size: 1.7rem; font-weight: 900; line-height: 1.15; }
  .home-v2-cta-text > span { color: rgba(255, 255, 255, 0.9); font-size: 0.82rem; line-height: 1.35; }
  .home-v2-cta-go .ui-icon { width: 26px; height: 26px; }
  .home-v2-cta:hover { filter: brightness(1.05); }

  .home-v2-cta-note {
    margin: -2px 0 2px;
    color: var(--mx-navy-1);
    font-size: 0.82rem;
    text-align: center;
  }

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

  .home-v2-tile {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 16px 10px 14px;
    color: var(--mx-navy-1);
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 16px;
    box-shadow: var(--mx-card-shadow);
    text-align: center;
    text-decoration: none;
  }

  .home-v2-tile-icon .ui-icon { width: 40px; height: 40px; color: var(--mx-royal); stroke-width: 2; }
  .home-v2-tile strong { font-size: 1.12rem; font-weight: 800; }
  .home-v2-tile > span:last-child { color: var(--pi-muted); font-size: 0.74rem; line-height: 1.35; }
  .home-v2-tile:hover { border-color: #b7cbeb; }

  .home-v2-staff {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 16px;
    background: linear-gradient(180deg, #f1f6fe 0%, #e8f0fc 100%);
    border: 1px solid var(--mx-panel-line);
    border-radius: 16px;
    text-align: center;
  }

  .home-v2-staff h2 { margin: 0; color: var(--mx-navy-1); font-size: 1.08rem; font-weight: 800; }
  .home-v2-staff p { margin: 0 0 10px; color: var(--pi-muted); font-size: 0.82rem; }

  .home-v2-staff-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: min(100%, 250px);
    min-height: 52px;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(180deg, var(--mx-navy-2) 0%, var(--mx-navy-1) 100%);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(8, 32, 79, 0.25);
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
  }

  .home-v2-staff-btn span { flex: 1; text-align: left; }

  .factory-banner {
    position: relative;
    margin: 4px 0 0;
    overflow: hidden;
    border-radius: 16px;
    background: var(--mx-navy-1);
    box-shadow: var(--mx-card-shadow);
    aspect-ratio: 16 / 7;
  }

  .factory-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 40%;
  }

  .factory-banner figcaption {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    padding: 26px 14px 10px;
    color: #fff;
    background: linear-gradient(180deg, rgba(8, 32, 79, 0) 0%, rgba(8, 32, 79, 0.82) 70%);
    line-height: 1.3;
  }

  .factory-banner figcaption strong { font-size: 0.86rem; letter-spacing: 0.06em; }
  .factory-banner figcaption span { color: rgba(255, 255, 255, 0.85); font-size: 0.74rem; }

  .home-v2-steps {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 16px;
    scroll-margin-top: 80px;
  }

  .home-v2-steps h2 { margin: 0 0 8px; color: var(--mx-navy-1); font-size: 1rem; }
  .home-v2-steps ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .home-v2-steps li { display: flex; align-items: center; gap: 10px; color: var(--pi-text); font-size: 0.88rem; }

  .home-v2-step-no {
    flex: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #fff;
    background: var(--mx-royal);
    border-radius: 50%;
    font-weight: 800;
  }

  /* ---------------------------------------------------------------- login */
  .auth-v2-hero {
    position: relative;
    isolation: isolate;
    padding-bottom: 46px;
    overflow: hidden;
    color: #fff;
    background: var(--mx-navy-1);
  }

  .auth-v2-photo {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 55% 45%;
  }

  .auth-v2-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(8, 32, 79, 0.92) 0%, rgba(8, 32, 79, 0.62) 45%, rgba(14, 58, 140, 0.9) 100%);
  }

  .auth-v2-hero .guest-brandbar { position: relative; background: transparent; box-shadow: none; }
  .auth-v2-hero-copy { display: grid; justify-items: start; gap: 8px; padding: 18px var(--pi-space-4) 0; }

  .auth-v2-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    color: #cfe2ff;
    background: rgba(30, 107, 255, 0.28);
    border: 1px solid rgba(87, 162, 255, 0.4);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
  }

  .auth-v2-badge .ui-icon { width: 15px; height: 15px; }
  .auth-v2-hero h1 { margin: 0; color: #fff; font-size: clamp(1.45rem, 7vw, 1.9rem); font-weight: 900; line-height: 1.25; }

  .auth-v2-card {
    position: relative;
    margin: -30px var(--pi-space-4) 0;
    padding: 20px 18px;
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(8, 32, 79, 0.12);
  }

  .auth-v2-card h2 { margin: 0; color: var(--mx-navy-1); font-size: 1.08rem; font-weight: 800; }
  .auth-v2-lead { margin: 4px 0 14px; color: var(--pi-muted); font-size: 0.86rem; }
  .auth-v2-form { display: grid; gap: 14px; }
  .auth-v2-field,
  .track-v2-field,
  .search-panel-field { display: grid; gap: 6px; }

  .auth-v2-label,
  .track-v2-label,
  .search-panel-label { color: var(--mx-navy-1); font-size: 0.88rem; font-weight: 700; }

  .auth-v2-control,
  .track-v2-control,
  .search-panel-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 14px;
    background: var(--mx-field-bg);
    border: 1px solid var(--mx-panel-line);
    border-radius: 12px;
  }

  .auth-v2-control:focus-within,
  .track-v2-control:focus-within,
  .search-panel-control:focus-within {
    background: #fff;
    border-color: var(--mx-electric);
    box-shadow: 0 0 0 3px rgba(30, 107, 255, 0.18);
  }

  .auth-v2-control .ui-icon,
  .track-v2-control .ui-icon,
  .search-panel-control .ui-icon { width: 20px; height: 20px; color: var(--mx-royal); }

  .auth-v2-control input,
  .track-v2-control input,
  .search-panel-control input {
    flex: 1;
    min-width: 0;
    min-height: 50px;
    padding: 0;
    color: var(--pi-text);
    background: transparent;
    border: 0;
    box-shadow: none;
    font-size: 1rem;
    outline: none;
  }

  .auth-v2-submit,
  .track-v2-submit,
  .page-staff .btn-primary,
  .page-staff .wo-assign-card .btn-secondary,
  .page-staff .wo-state-panel .btn-primary,
  .page-staff .action-sheet .btn-primary {
    color: #fff;
    background: linear-gradient(180deg, var(--mx-electric) 0%, var(--mx-royal) 100%);
    border: 0;
    box-shadow: 0 6px 16px rgba(20, 80, 216, 0.28);
  }

  .auth-v2-submit,
  .track-v2-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 54px;
    margin-top: 4px;
    border-radius: 12px;
    font-size: 1.08rem;
    font-weight: 800;
  }

  .auth-v2-back,
  .track-v2-alt {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    margin: 14px var(--pi-space-4) 0;
    padding: 10px 14px;
    color: var(--pi-text);
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 14px;
    font-size: 0.86rem;
    text-decoration: none;
  }

  .auth-v2-back span,
  .track-v2-alt span { flex: 1; }

  .auth-v2-back strong,
  .track-v2-alt strong { color: var(--mx-royal); }

  .auth-v2-back > .ui-icon:first-child,
  .track-v2-alt > .ui-icon:first-child { width: 22px; height: 22px; color: var(--mx-royal); }

  .page-auth .flash-stack,
  .page-app .flash-stack { width: min(100% - 32px, var(--mx-col) - 32px); margin: 12px auto 0; }

  /* ---------------------------------------------------------------- tracking lookup */
  .track-v2-band {
    padding-bottom: 42px;
    color: #fff;
    background:
      radial-gradient(circle at 90% 100%, rgba(30, 107, 255, 0.4) 0%, rgba(30, 107, 255, 0) 55%),
      linear-gradient(160deg, var(--mx-navy-1) 0%, var(--mx-navy-2) 100%);
  }

  .track-v2-band .guest-brandbar { position: relative; background: transparent; box-shadow: none; }

  .track-v2-intro {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px var(--pi-space-4) 0;
  }

  .track-v2-intro-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    color: #fff;
    background: linear-gradient(180deg, var(--mx-electric) 0%, var(--mx-royal) 100%);
    border-radius: 16px;
    box-shadow: var(--mx-lift-shadow);
  }

  .track-v2-intro-icon .ui-icon { width: 30px; height: 30px; stroke-width: 2.2; }
  .track-v2-intro h1 { margin: 0; color: #fff; font-size: 1.5rem; font-weight: 900; line-height: 1.25; }
  .track-v2-intro p { margin: 2px 0 0; color: rgba(255, 255, 255, 0.82); font-size: 0.86rem; }

  .track-v2-panel {
    position: relative;
    margin: -26px var(--pi-space-4) 0;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(8, 32, 79, 0.12);
  }

  .track-v2-lead { margin: 0 0 12px; color: var(--pi-text); font-size: 0.9rem; }
  .track-v2-form { display: grid; gap: 12px; }
  .track-v2-control input { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.04em; }

  .track-v2-hints {
    display: grid;
    gap: 8px;
    margin: 16px 0 0;
    padding: 14px 0 0;
    list-style: none;
    border-top: 1px dashed var(--mx-panel-line);
  }

  .track-v2-hints li { display: flex; gap: 8px; color: var(--pi-muted); font-size: 0.82rem; line-height: 1.45; }
  .track-v2-hints .ui-icon { width: 17px; height: 17px; margin-top: 2px; color: var(--mx-royal); }
  .track-v2-hints .track-v2-hint-warn { color: var(--pi-text); }
  .track-v2-hints .track-v2-hint-warn .ui-icon { color: var(--pi-warning); }

  /* ---------------------------------------------------------------- tracking detail */
  .page-tracking-detail .guest-app > .card,
  .page-tracking-detail .guest-app > section {
    margin-left: var(--pi-space-4);
    margin-right: var(--pi-space-4);
  }

  .page-tracking-detail .guest-app > * + * { margin-top: 12px; }

  .page-tracking-detail .track-hero {
    margin: 0;
    padding: 16px 16px 18px;
    color: #fff;
    background:
      radial-gradient(circle at 100% 0%, rgba(30, 107, 255, 0.45) 0%, rgba(30, 107, 255, 0) 55%),
      linear-gradient(160deg, var(--mx-navy-1) 0%, var(--mx-navy-2) 100%);
    border: 0;
    border-radius: 0 0 22px 22px;
    box-shadow: none;
  }

  .page-tracking-detail .guest-app > .track-hero { margin-left: 0; margin-right: 0; margin-top: 0; }
  .page-tracking-detail .track-hero .eyebrow { color: #9cc6ff; }
  .page-tracking-detail .track-hero h1 { margin: 2px 0 0; color: #fff; font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; }
  .page-tracking-detail .track-new-search { color: #cfe2ff; }
  .page-tracking-detail .status-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; background: transparent; border: 0; padding: 0; }
  .page-tracking-detail .status-meta { color: rgba(255, 255, 255, 0.82); font-size: 0.84rem; }

  .page-tracking-detail .track-progress {
    margin: 16px 0 0;
    padding: 14px 8px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
  }

  .page-tracking-detail .track-progress-label { color: rgba(255, 255, 255, 0.72); }
  .page-tracking-detail .track-progress li.is-current .track-progress-label,
  .page-tracking-detail .track-progress li.is-done .track-progress-label { color: #fff; }
  .page-tracking-detail .track-note { margin: 12px 0 0; }

  .page-tracking-detail .card,
  .page-staff .staff-detail-card,
  .page-staff .timeline-card {
    padding: 16px;
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 16px;
    box-shadow: var(--mx-card-shadow);
  }

  .page-tracking-detail .card h2,
  .page-staff .staff-detail-card h2,
  .page-staff .timeline-card h2,
  .page-staff .wo-more summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--mx-navy-1);
    font-size: 1.02rem;
    font-weight: 800;
  }

  .page-tracking-detail .card h2 .ui-icon,
  .page-staff .staff-detail-card h2 .ui-icon,
  .page-staff .timeline-card h2 .ui-icon,
  .page-staff .wo-more summary .ui-icon {
    width: 32px;
    height: 32px;
    padding: 7px;
    color: var(--mx-royal);
    background: #e8f0fe;
    border-radius: 10px;
  }

  .page-tracking-detail .tracking-feedback-card {
    background: linear-gradient(180deg, #f2fbf5 0%, #ffffff 100%);
    border-color: #bfe5cc;
  }

  /* ---------------------------------------------------------------- timeline (shared) */
  .page-app .timeline-list,
  .page-staff .timeline-list {
    position: relative;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .page-app .timeline-item,
  .page-staff .timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 0 0 14px;
    border: 0;
  }

  .page-app .timeline-item::before,
  .page-staff .timeline-item::before {
    content: "";
    position: absolute;
    top: 34px;
    bottom: 0;
    left: 16px;
    width: 2px;
    background: #d6e2f3;
  }

  .page-app .timeline-item:last-child::before,
  .page-staff .timeline-item:last-child::before { content: none; }

  .page-app .timeline-dot,
  .page-staff .timeline-dot {
    position: static;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: 0;
    color: #fff;
    background: var(--mx-royal);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #fff;
  }

  .page-app .timeline-item:not(:last-child) .timeline-dot::after,
  .page-staff .timeline-item:not(:last-child) .timeline-dot::after { content: none; }

  .page-app .timeline-dot .ui-icon,
  .page-staff .timeline-dot .ui-icon { width: 17px; height: 17px; stroke-width: 2.2; }

  .timeline-item[data-event="WAITING_PARTS"] .timeline-dot { background: #d18a00; }
  .timeline-item[data-event="REOPENED"] .timeline-dot { background: #e0621a; }
  .timeline-item[data-event="COMPLETED"] .timeline-dot { background: #0b8a7f; }
  .timeline-item[data-event="CLOSED"] .timeline-dot { background: #1f9d4c; }
  .timeline-item[data-event="FEEDBACK_SUBMITTED"] .timeline-dot { background: #6b5bd6; }
  .timeline-item[data-event="REPORTED"] .timeline-dot { background: var(--mx-navy-2); }

  .page-app .timeline-content,
  .page-staff .timeline-content { display: grid; gap: 1px; padding-top: 5px; min-width: 0; }
  .page-app .timeline-content strong,
  .page-staff .timeline-content strong { color: var(--mx-navy-1); font-size: 0.94rem; }
  .page-app .timeline-content span,
  .page-staff .timeline-content span { color: var(--pi-muted); font-size: 0.82rem; }

  /* ---------------------------------------------------------------- staff app shell (mobile / tablet) */
  .page-staff .staff-app-shell { padding-bottom: calc(var(--mx-dock-h) + 30px + env(safe-area-inset-bottom)); }

  .page-staff .staff-topbar {
    background:
      radial-gradient(circle at 95% 120%, rgba(30, 107, 255, 0.35) 0%, rgba(30, 107, 255, 0) 55%),
      linear-gradient(135deg, var(--mx-navy-1) 0%, var(--mx-navy-2) 100%);
    box-shadow: 0 2px 10px rgba(8, 32, 79, 0.25);
  }

  .page-staff .staff-topbar-inner { padding: 8px var(--pi-space-4) 12px; }
  .page-staff .staff-topbar-row { min-height: 56px; }
  .page-staff .staff-brand { flex: 1; min-width: 0; min-height: 44px; }
  .page-staff .staff-topbar-context { margin-top: 4px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
  .page-staff .staff-page-title { font-size: 1.16rem; font-weight: 800; }

  .page-staff .notification-bell {
    background: transparent;
    border: 0;
  }

  .page-staff .notification-bell .nav-icon { width: 26px; height: 26px; }
  .page-staff .notification-badge { top: 2px; right: 2px; box-shadow: 0 0 0 2px var(--mx-navy-1); }

  .page-staff .staff-avatar {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.35);
    font-size: 1.05rem;
  }

  /* Home: identity replaces the page-title row (title stays for assistive tech) */
  .page-staff-home .staff-topbar-context {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .page-staff-home .staff-topbar { position: relative; }

  .identity-block {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    margin-top: 6px;
    padding: 10px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .identity-avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    color: var(--mx-navy-1);
    background: linear-gradient(180deg, #ffffff 0%, #d9e7ff 100%);
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    font-size: 1.6rem;
    font-weight: 900;
  }

  .identity-text { display: grid; min-width: 0; line-height: 1.3; }
  .identity-text p { margin: 0; }
  .identity-greet { color: #fff; font-size: 1.05rem; font-weight: 700; }
  .identity-name { overflow-wrap: anywhere; color: #6fb4ff; font-size: 1.3rem; font-weight: 900; }
  .identity-role { color: rgba(255, 255, 255, 0.78); font-size: 0.8rem; }
  .identity-role span { color: rgba(255, 255, 255, 0.55); }

  .identity-block--card { margin: 0; padding: 0; border: 0; }
  .identity-block--card .identity-avatar { color: #fff; background: linear-gradient(180deg, var(--mx-electric) 0%, var(--mx-royal) 100%); border-color: #e8f0fe; box-shadow: var(--mx-lift-shadow); }
  .identity-block--card .identity-name { margin: 0; color: var(--mx-navy-1); font-size: 1.25rem; }
  .identity-block--card .identity-role { color: var(--pi-muted); }
  .identity-block--card .identity-role span { color: #8898b0; }

  /* Staff bottom dock (white, blue active, raised report action) */
  @media (max-width: 1023px) {
    .page-staff .staff-bottom-nav,
    .page-staff .staff-bottom-nav--management {
      left: 0;
      right: 0;
      bottom: 0;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      align-items: end;
      gap: 0;
      width: auto;
      padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
      background: #fff;
      border: 0;
      border-top: 1px solid var(--mx-panel-line);
      border-radius: 0;
      box-shadow: 0 -6px 20px rgba(8, 32, 79, 0.08);
      transform: none;
    }

    .page-staff .staff-nav-desktop-only { display: none; }
    .page-staff .staff-nav-badge { top: 0; left: calc(50% + 4px); box-shadow: 0 0 0 2px #fff; }
  }

  @media (min-width: 600px) and (max-width: 1023px) {
    .page-staff .staff-bottom-nav,
    .page-staff .staff-bottom-nav--management { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border-radius: 18px 18px 0 0; }
  }

  /* ---------------------------------------------------------------- staff content surfaces */
  .page-staff .staff-page-shell { gap: 16px; padding-top: 14px; }

  .page-staff .section-head.ops-section-head { align-items: center; gap: 8px; margin-bottom: 10px; }
  .page-staff .ops-section-head h2 { color: var(--mx-navy-1); font-size: 1.08rem; font-weight: 800; }
  .page-staff .ops-section-icon { color: var(--mx-royal); background: #e8f0fe; border-radius: 10px; }

  .page-staff .section-count {
    min-width: 26px;
    padding: 0 8px;
    color: var(--mx-royal);
    background: #e8f0fe;
    border-radius: 999px;
    font-weight: 800;
    text-align: center;
  }

  /* Metric strip: compact cards, icon / value / label (markup keeps label -> value order) */
  .page-staff .metric-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .page-staff .metric-strip.ops-summary--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }

  .page-staff .metric-card {
    display: grid;
    grid-template-areas: "icon" "value" "label";
    justify-items: center;
    align-content: start;
    gap: 2px;
    min-height: 104px;
    padding: 12px 4px 10px;
    color: var(--mx-navy-1);
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 14px;
    box-shadow: var(--mx-card-shadow);
    text-align: center;
    text-decoration: none;
  }

  .page-staff .metric-card::before,
  .page-staff .metric-card::after { content: none; }
  .page-staff .metric-card > span { grid-area: label; color: var(--mx-navy-1); font-size: 0.74rem; font-weight: 600; line-height: 1.25; }
  .page-staff .metric-card > strong { grid-area: value; color: var(--mx-navy-1); font-size: 1.7rem; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .metric-card-icon { grid-area: icon; display: grid; place-items: center; font-style: normal; }
  .metric-card-icon .ui-icon { width: 30px; height: 30px; stroke-width: 2.1; }
  .metric-card.tone-reported .metric-card-icon { color: var(--mx-royal); }
  .metric-card.tone-reported > strong { color: var(--mx-royal); }
  .metric-card.tone-in_progress .metric-card-icon { color: #ef7d12; }
  .metric-card.tone-waiting_parts .metric-card-icon { color: #e0a100; }
  .metric-card.tone-closed .metric-card-icon { color: #1f9d4c; }
  .metric-card.tone-completed .metric-card-icon { color: #0b8a7f; }
  .page-staff .metric-card:hover { border-color: #b7cbeb; }

  /* Technician's own month (factual counts; colours are category cues, never a judgement) */
  .page-staff .my-month-strip { margin: 0; }
  .page-staff .my-month-card { margin: 0; }
  .page-staff .my-month-card dt { grid-area: label; color: var(--mx-navy-1); font-size: 0.74rem; font-weight: 600; line-height: 1.25; }
  .page-staff .my-month-card dd { grid-area: value; margin: 0; color: var(--mx-navy-1); font-size: 1.7rem; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .page-staff .my-month-card.tone-time dd { display: grid; align-items: center; min-height: 1.87rem; font-size: 0.95rem; font-weight: 800; line-height: 1.2; }
  .my-month-card.tone-received .metric-card-icon { color: var(--mx-royal); }
  .my-month-card.tone-done .metric-card-icon { color: #1f9d4c; }
  .my-month-card.tone-time .metric-card-icon { color: #ef7d12; }
  .my-month-card.tone-open .metric-card-icon { color: #d64545; }
  .my-month-note { margin: 8px 2px 0; color: var(--pi-muted); font-size: 0.74rem; }

  /* Job list rows */
  .page-staff .job-list { gap: 10px; }

  .page-staff .job-item.job-card--compact,
  .page-staff .job-item.history-result-card--compact {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 18px;
    align-items: start;
    gap: 12px;
    padding: 12px 10px 12px 12px;
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 14px;
    box-shadow: var(--mx-card-shadow);
  }

  .job-item-thumb {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--mx-navy-2);
    background: linear-gradient(160deg, #eef4fd 0%, #dbe7f8 100%);
    border: 1px solid #d3e0f3;
    border-radius: 12px;
  }

  .job-item-thumb .ui-icon { width: 28px; height: 28px; stroke-width: 1.7; }
  .job-card--p-critical .job-item-thumb { color: #c0271d; background: linear-gradient(160deg, #fff3f2 0%, #fde1de 100%); border-color: #f6c6c1; }
  .job-card--p-urgent .job-item-thumb { color: #c2570c; background: linear-gradient(160deg, #fff6ee 0%, #ffe6d2 100%); border-color: #f7d2b3; }

  .job-item-main { display: grid; gap: 4px; min-width: 0; }
  .page-staff .job-item .job-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 8px; }
  .page-staff .job-item .job-card-no { color: var(--mx-navy-1); font-size: 0.98rem; font-weight: 800; }
  .page-staff .job-item .job-card-equipment { color: var(--pi-text); font-size: 0.95rem; font-weight: 700; line-height: 1.35; }

  .page-staff .job-item .job-card-problem {
    margin: 0;
    padding: 0;
    color: var(--pi-muted);
    background: transparent;
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .page-staff .job-item .job-card-meta li,
  .page-staff .job-item .job-card-where,
  .page-staff .job-item .job-card-time { font-size: 0.78rem; }
  .page-staff .job-item .status-badge { min-height: 24px; padding: 1px 8px; font-size: 0.72rem; }
  .page-staff .job-item .priority-badge,
  .page-staff .job-item .age-chip,
  .page-staff .job-item .context-badge { min-height: 24px; padding: 1px 8px; font-size: 0.72rem; }
  .page-staff .job-item .job-card-meta { gap: 0; }
  .page-staff .job-item .job-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

  .job-item-link {
    align-self: center;
    display: grid;
    place-items: center;
    width: 18px;
    color: #8ea0bb;
    text-decoration: none;
  }

  .job-item-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .job-item-link .ui-icon { width: 20px; height: 20px; }
  .job-item-link::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
  .job-item-link:focus-visible { outline: none; }
  .job-item-link:focus-visible::after { outline: 3px solid rgba(30, 107, 255, 0.45); outline-offset: 2px; }
  .page-staff .job-item:hover { border-color: #b7cbeb; }
  .page-staff .job-item:hover .job-item-link { color: var(--mx-royal); }

  /* Action panel (stats / reports entry) */
  .action-panel,
  .page-staff .report-entry-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 12px 16px;
    color: var(--mx-navy-1);
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 14px;
    box-shadow: var(--mx-card-shadow);
    text-decoration: none;
  }

  .page-staff .report-entry-card { display: flex; border-left: 1px solid var(--mx-panel-line); }
  .page-staff .report-entry-card strong { color: var(--mx-navy-1); font-size: 1rem; font-weight: 800; }
  .page-staff .report-entry-card .muted { color: var(--pi-muted); font-size: 0.78rem; }
  .page-staff .report-entry-text { flex: 1; min-width: 0; }
  .page-staff .report-entry-icon { background: #e8f0fe; }
  .page-staff .report-entry-arrow { color: #8ea0bb; }

  .action-panel-icon .ui-icon,
  .page-staff .report-entry-icon .ui-icon { width: 30px; height: 30px; color: var(--mx-royal); stroke-width: 2.4; }
  .action-panel-text { display: grid; flex: 1; min-width: 0; }
  .action-panel-text strong { font-size: 1rem; font-weight: 800; }
  .action-panel-text span { color: var(--pi-muted); font-size: 0.78rem; }
  .action-panel > .ui-icon:last-child { width: 22px; height: 22px; color: #8ea0bb; }

  /* Search panel */
  .search-panel {
    padding: 16px;
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 16px;
    box-shadow: var(--mx-card-shadow);
  }

  .search-panel-form { display: grid; gap: 12px; }
  .page-staff .search-panel .btn-primary { min-height: 50px; border-radius: 12px; font-weight: 800; }

  .page-staff .history-search-card .search-bar {
    min-height: 52px;
    background: var(--mx-field-bg);
    border: 1px solid var(--mx-panel-line);
    border-radius: 12px;
  }

  /* Empty state: compact, icon + short Thai message */
  .page-staff .empty-state {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px dashed #c9d7ec;
    border-radius: 14px;
  }

  .page-staff .empty-state-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #7f95b6;
    background: #eef3fb;
    border-radius: 12px;
  }

  .page-staff .empty-state-title { margin: 0; color: var(--mx-navy-1); font-size: 0.9rem; font-weight: 700; }
  .page-staff .empty-state-hint { margin: 2px 0 0; color: var(--pi-muted); font-size: 0.8rem; }

  /* ---------------------------------------------------------------- work-order detail */
  .page-staff .wo-hero {
    padding: 16px;
    color: #fff;
    background:
      radial-gradient(circle at 100% 0%, rgba(30, 107, 255, 0.45) 0%, rgba(30, 107, 255, 0) 55%),
      linear-gradient(160deg, var(--mx-navy-1) 0%, var(--mx-navy-2) 100%);
    border: 0;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(8, 32, 79, 0.22);
  }

  .page-staff .wo-hero .eyebrow { color: #9cc6ff; }
  .page-staff .wo-hero-no { margin: 2px 0 0; color: #fff; font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  .page-staff .wo-hero-equipment { color: #fff; font-size: 1.06rem; font-weight: 700; }
  .page-staff .wo-hero-where { color: rgba(255, 255, 255, 0.82); }
  .page-staff .wo-hero-equipment .ui-icon,
  .page-staff .wo-hero-where .ui-icon { color: #8fc0ff; }
  .page-staff .wo-hero .age-chip,
  .page-staff .wo-hero .context-badge { color: #fff; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.22); }

  .page-staff .wo-state-panel {
    padding: 14px;
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 16px;
    box-shadow: var(--mx-card-shadow);
  }

  .page-staff .wo-state-panel .btn,
  .page-staff .action-sheet .btn { min-height: 50px; border-radius: 12px; font-weight: 800; }

  .page-staff .wo-state-panel .btn-success,
  .page-staff .action-sheet .btn-success {
    color: #fff;
    background: linear-gradient(180deg, #22ad55 0%, #178a3c 100%);
    border: 0;
    box-shadow: 0 6px 16px rgba(23, 138, 60, 0.28);
  }

  .page-staff .wo-key-facts > div { background: var(--mx-field-bg); border-color: var(--mx-panel-line); border-radius: 12px; }
  .page-staff .wo-problem-block { background: var(--mx-field-bg); border-radius: 12px; }
  .page-staff .staff-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .page-staff .staff-photo-card { border-radius: 12px; overflow: hidden; }

  /* ---------------------------------------------------------------- KPI / performance / history */
  .page-staff .period-toolbar,
  .page-staff .management-toolbar-card {
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 16px;
    box-shadow: var(--mx-card-shadow);
  }

  .page-staff .kpi-board {
    background:
      radial-gradient(circle at 100% 0%, rgba(30, 107, 255, 0.4) 0%, rgba(30, 107, 255, 0) 60%),
      linear-gradient(160deg, var(--mx-navy-1) 0%, var(--mx-navy-2) 100%);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(8, 32, 79, 0.2);
  }

  .page-staff .kpi-strip-item,
  .page-staff .kpi-timing,
  .page-staff .kpi-feedback-item,
  .page-staff .performance-card {
    background: #fff;
    border-color: var(--mx-panel-line);
    border-radius: 14px;
    box-shadow: var(--mx-card-shadow);
  }

  .page-staff .kpi-strip-item .management-kpi-value,
  .page-staff .kpi-feedback-item .management-metric-value { color: var(--mx-royal); }

  .page-staff .perf-avatar {
    color: #fff;
    background: linear-gradient(180deg, var(--mx-electric) 0%, var(--mx-royal) 100%);
  }

  .page-staff .perf-stat-strip > div { background: var(--mx-field-bg); border-color: var(--mx-panel-line); }
  .page-staff .perf-stat-strip dd { color: var(--mx-navy-1); }

  /* ---------------------------------------------------------------- notifications / profile */
  .page-staff .notify-item {
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 14px;
    box-shadow: var(--mx-card-shadow);
  }

  .page-staff .notify-list { display: grid; gap: 8px; }
  .page-staff .notify-item + .notify-item { border-top: 1px solid var(--mx-panel-line); }
  .page-staff .notify-item.is-unread + .notify-item { border-top-color: var(--mx-panel-line); }
  .page-staff .notify-message { margin: 2px 0 0; color: var(--pi-text); font-size: 0.88rem; }
  .page-staff .notify-time { margin: 2px 0 0; font-size: 0.78rem; }
  .page-staff .notify-actions { align-items: center; gap: 4px 10px; margin-top: 8px; }
  .page-staff .notify-actions .btn { min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 0.84rem; }
  .page-staff .notify-actions .btn-primary { color: #fff; background: linear-gradient(180deg, var(--mx-electric) 0%, var(--mx-royal) 100%); border: 0; }
  .page-staff .notify-actions .btn-ghost { padding: 0 6px; color: var(--mx-royal); background: transparent; border: 0; text-decoration: underline; text-underline-offset: 3px; }

  .page-staff .notify-item.is-unread { border-color: #b7cdf3; background: linear-gradient(90deg, #f3f7ff 0%, #ffffff 60%); }

  .page-staff .notify-marker {
    color: var(--mx-royal);
    background: #e8f0fe;
    border-radius: 12px;
  }

  .page-staff .notify-item.is-unread .notify-marker { color: #fff; background: linear-gradient(180deg, var(--mx-electric) 0%, var(--mx-royal) 100%); }

  .page-staff .profile-card,
  .page-staff .profile-menu {
    background: #fff;
    border: 1px solid var(--mx-panel-line);
    border-radius: 16px;
    box-shadow: var(--mx-card-shadow);
  }

  /* ---------------------------------------------------------------- narrow phones */
  @media (max-width: 380px) {
    .brand-lockup-mark img,
    .qr-identity-logo { width: 52px; }
    .brand-lockup { gap: 8px; }
    .brand-lockup-product strong { font-size: 0.8rem; }
    .brand-lockup-sub { font-size: 0.68rem; }
    .page-staff .metric-strip.ops-summary--five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .page-staff .metric-card { min-height: 96px; }
    .page-staff .metric-card > strong { font-size: 1.45rem; }
    .page-staff .metric-card > span,
    .page-staff .my-month-card dt { font-size: 0.68rem; }
    .page-staff .my-month-card dd { font-size: 1.45rem; }
    .page-staff .my-month-card.tone-time dd { font-size: 0.82rem; }
    .metric-card-icon .ui-icon { width: 26px; height: 26px; }
    .app-nav-link,
    .page-staff .staff-nav-link { font-size: 0.64rem; }
    .splash-v2-tag { font-size: 0.5rem; letter-spacing: 0.1em; }
    .splash-v2-values li { font-size: 0.5rem; letter-spacing: 0.06em; }
    .home-v2-cta-text strong { font-size: 1.5rem; }
    .home-v2-cta-icon .ui-icon { width: 36px; height: 36px; }
    .home-v2-tile strong { font-size: 1rem; }
    .identity-avatar { width: 52px; height: 52px; }
    .identity-name { font-size: 1.15rem; }
  }

  @media (max-width: 340px) {
    .brand-lockup-divider { display: none; }
    .page-staff .job-item.job-card--compact,
    .page-staff .job-item.history-result-card--compact { grid-template-columns: 44px minmax(0, 1fr) 16px; gap: 10px; }
    .job-item-thumb { width: 44px; height: 44px; }
  }

  /* ---------------------------------------------------------------- tablet / desktop */
  @media (min-width: 481px) {
    .page-app .guest-app,
    .auth-v2 { box-shadow: 0 0 0 1px var(--mx-panel-line), 0 20px 60px rgba(8, 32, 79, 0.12); }
  }

  @media (min-width: 900px) {
    .page-app { background: radial-gradient(circle at 50% 0%, #dfe9f8 0%, var(--mx-page) 60%); }
    .page-app .guest-app,
    .auth-v2 { --mx-col: 520px; width: 520px; }
    .app-bottom-nav { --mx-col: 520px; }
  }

  @media (min-width: 1024px) {
    .page-staff .staff-app-shell { padding-bottom: 0; background: linear-gradient(90deg, #0a2766 0, #0a2766 240px, transparent 240px); }
    .page-staff .staff-bottom-nav,
    .page-staff .staff-bottom-nav--management {
      background: linear-gradient(180deg, var(--mx-navy-1) 0%, #0a2766 100%);
      border-right: 0;
    }

    .page-staff .staff-nav-brand { padding: 4px 6px 16px; }
    .page-staff .staff-nav-brand .brand-lockup-sub { display: none; }

    .page-staff .staff-nav-link,
    .page-staff .staff-bottom-nav--management .staff-nav-link {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 12px;
      min-height: 46px;
      padding: 0 12px;
      color: rgba(255, 255, 255, 0.72);
      font-size: 0.92rem;
      text-align: left;
    }

    .page-staff .staff-nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
    .page-staff .staff-nav-link.is-active { color: #fff; background: linear-gradient(90deg, var(--mx-electric) 0%, var(--mx-royal) 100%); }
    .page-staff .staff-nav-link .nav-icon { width: 22px; height: 22px; }
    .page-staff .staff-nav-fab { order: 10; margin-top: 12px; color: #fff; background: rgba(30, 107, 255, 0.22); border: 1px solid rgba(87, 162, 255, 0.45); }
    .page-staff .staff-nav-fab-btn { width: auto; height: auto; margin: 0; background: none; border: 0; box-shadow: none; }
    .page-staff .staff-nav-fab-btn .nav-icon { width: 22px; height: 22px; }

    .page-staff .staff-topbar .brand-lockup-mark,
    .page-staff .staff-topbar .brand-lockup-divider { display: none; }
    .page-staff .staff-topbar .staff-brand { display: none; }
    .page-staff .staff-topbar-inner { flex-wrap: wrap; }
    .page-staff-home .identity-block { flex-basis: 100%; order: 3; }
    .page-staff .metric-strip { grid-template-columns: repeat(4, minmax(0, 170px)); }
    .page-staff .metric-strip.ops-summary--five { grid-template-columns: repeat(5, minmax(0, 170px)); }
  }
}
