:root {
  color-scheme: light;
  --ink: #102018;
  --muted: #5c6b63;
  --soft: #edf4ef;
  --surface: #ffffff;
  --panel: #f8fbf8;
  --line: #dce7df;
  --green: #16834a;
  --green-strong: #0f5f34;
  --blue: #246b9f;
  --amber: #b97813;
  --red: #b83b36;
  --slate: #2d3f4d;
  --shadow: 0 10px 28px rgba(28, 52, 39, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #edf4ef;
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

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

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #123d28;
}

.brand-mark img {
  width: 26px;
  height: 26px;
}

.brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mode-pill {
  margin: 14px 8px 12px;
  padding: 9px 10px;
  border: 1px solid #c9dfd1;
  border-radius: 8px;
  background: #f3fbf5;
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 800;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.nav-btn:hover {
  background: #f1f7f2;
  color: var(--ink);
}

.nav-btn.active {
  background: #123d28;
  color: #fff;
}

.nav-count {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(22, 131, 74, 0.12);
  color: var(--green-strong);
  text-align: center;
  font-size: 11px;
  font-weight: 900;
}

.nav-btn.active .nav-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.legacy-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 8px 0;
}

.legacy-links a {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--slate);
  background: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -22px -22px 22px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(220, 231, 223, 0.8);
  background: rgba(237, 244, 239, 0.86);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: 0;
  line-height: 1.02;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.btn:hover {
  border-color: #a8c1ae;
}

.btn.primary {
  border-color: #123d28;
  background: #123d28;
  color: #fff;
}

.btn.warning {
  border-color: #f1d49f;
  background: #fff8e8;
  color: #8a540c;
}

.section {
  display: none;
}

.section.active {
  display: block;
  animation: rise 180ms ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

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

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

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

.panel,
.card,
.metric,
.table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.panel.soft {
  background: var(--panel);
}

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

.eyebrow {
  color: var(--green-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel h2,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.panel h2 {
  font-size: 22px;
}

.panel h3 {
  font-size: 16px;
}

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

.small {
  font-size: 12px;
  line-height: 1.45;
}

.metric {
  padding: 14px;
}

.metric .label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric .value {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: 0;
}

.metric .sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric.good .value,
.status.ready,
.status.paid,
.status.completed {
  color: var(--green-strong);
}

.metric.warn .value,
.status.review,
.status.scheduled {
  color: var(--amber);
}

.metric.bad .value,
.status.issue {
  color: var(--red);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5f1;
  color: var(--slate);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.status.progress {
  background: #e9f2fb;
  color: var(--blue);
}

.status.review,
.status.scheduled,
.status.warning {
  background: #fff4da;
}

.status.issue,
.status.not {
  background: #fdeceb;
}

.status.ready,
.status.paid,
.status.completed,
.status.connected {
  background: #e8f7ed;
}

.activity-list,
.clean-list {
  display: grid;
  gap: 9px;
}

.activity-item,
.clean-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid #e6eee8;
  border-radius: 8px;
  background: #fff;
}

.activity-item strong,
.clean-row strong {
  display: block;
  font-size: 13px;
}

.activity-item span,
.clean-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.columns {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.4fr);
  gap: 14px;
  align-items: start;
}

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

.job-card,
.customer-card,
.crew-card,
.equipment-card,
.report-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

button.job-card,
button.customer-card,
button.crew-card,
button.report-card {
  width: 100%;
}

.job-card:hover,
.customer-card:hover,
.crew-card:hover,
.equipment-card:hover,
.report-card:hover {
  border-color: #a8c1ae;
  box-shadow: 0 8px 18px rgba(28, 52, 39, 0.08);
}

.job-card.active,
.customer-card.active,
.crew-card.active,
.report-card.active {
  border-color: #123d28;
  box-shadow: 0 0 0 2px rgba(18, 61, 40, 0.08);
}

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

.stack {
  display: grid;
  gap: 10px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.filter-btn {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.filter-btn.active {
  border-color: #123d28;
  background: #123d28;
  color: #fff;
}

.detail-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.detail-title h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.05;
}

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

.field {
  padding: 10px;
  border: 1px solid #e6eee8;
  border-radius: 8px;
  background: #fbfdfb;
}

.field label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field strong,
.field p {
  display: block;
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

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

.photo-tile {
  min-height: 112px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #d8e5dc;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
}

.dispatch-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.dispatch-col {
  min-height: 420px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf8;
}

.dispatch-col h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

.dispatch-card {
  display: grid;
  gap: 8px;
  margin-bottom: 9px;
  padding: 11px;
  border: 1px solid #dce7df;
  border-radius: 8px;
  background: #fff;
}

.dispatch-card.has-issues {
  border-color: #f1d49f;
  background: #fffdf7;
}

.dispatch-issues {
  display: grid;
  gap: 7px;
}

.dispatch-notice {
  border-color: rgba(22, 163, 74, 0.24);
  background: var(--pri-light);
  color: var(--pri-dark);
}

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

.select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

select,
input,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.phone-frame {
  max-width: 390px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid #cfded3;
  border-radius: 28px;
  background: #13291d;
  box-shadow: 0 24px 52px rgba(19, 41, 29, 0.22);
}

.phone-screen {
  overflow: hidden;
  border-radius: 18px;
  background: #f8fbf8;
}

.phone-head {
  padding: 16px;
  background: #123d28;
  color: #fff;
}

.phone-head h2 {
  margin: 4px 0 0;
  font-size: 23px;
  line-height: 1.05;
}

.phone-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid #b7c8bc;
  border-radius: 7px;
  color: transparent;
  font-weight: 950;
}

.workflow-step.done .check {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.safety-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.safety-table th,
.safety-table td,
.data-table th,
.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e6eee8;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.safety-table th,
.data-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.packet {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.packet-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0;
  background: #123d28;
  color: #fff;
}

.packet-hero .copy {
  padding: 28px;
}

.packet-hero h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.packet-photo img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.packet-body {
  padding: 22px;
}

.packet-cover {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  background: var(--grad);
  color: #fff;
}

.packet-cover .eyebrow {
  color: #c9f6d8;
}

.packet-cover h2 {
  margin: 5px 0 0;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
}

.packet-cover p {
  margin: 8px 0 0;
  color: #e8fff0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.packet-release {
  min-width: 150px;
  display: grid;
  justify-items: end;
  gap: 7px;
}

.packet-release strong {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

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

.packet-summary > div {
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-md);
  display: grid;
  align-content: start;
  gap: 5px;
  background: rgba(255, 255, 255, 0.86);
}

.packet-summary span {
  color: var(--text3);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.packet-summary strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.packet-section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
}

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

.packet-section-head h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.packet-work p {
  margin: 8px 0 0;
  color: var(--text2);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.packet-billing {
  background: rgba(240, 253, 244, 0.7);
}

.packet-notice {
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(240, 253, 244, 0.9);
  color: var(--pri-dark);
  font-size: 12px;
  font-weight: 900;
}

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

.report-preview {
  min-height: 520px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-preview h2 {
  margin: 0;
  font-size: 28px;
}

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

.report-action-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.report-cover {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
  background: #123d28;
  color: #fff;
}

.report-cover h2 {
  color: #fff;
}

.report-cover p {
  margin: 8px 0 0;
  color: #d7f4df;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.report-meta-grid,
.readiness-grid,
.packet-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.report-meta-grid > div,
.readiness-item,
.packet-status-strip > div {
  padding: 10px;
  border: 1px solid #e6eee8;
  border-radius: 8px;
  background: #fbfdfb;
}

.report-meta-grid span,
.readiness-item span,
.packet-status-strip span,
.report-lines span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-meta-grid strong,
.readiness-item strong,
.packet-status-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.report-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e6eee8;
}

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

.report-lines > div {
  padding: 10px;
  border: 1px solid #e6eee8;
  border-radius: 8px;
  background: #fff;
}

.report-lines strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

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

.assistant-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 14px;
}

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

.question-list button {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.chat-log {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 460px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf8;
}

.bubble {
  max-width: 78%;
  padding: 11px 13px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
}

.bubble.user {
  justify-self: end;
  background: #123d28;
  color: #fff;
  border-color: #123d28;
}

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

.note {
  padding: 10px;
  border: 1px solid #f1d49f;
  border-radius: 8px;
  background: #fff8e8;
  color: #70430a;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.empty {
  padding: 18px;
  border: 1px dashed #b7c8bc;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfdfb;
  font-size: 13px;
}

@media (max-width: 1120px) {
  .os-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .legacy-links {
    max-width: 360px;
  }

  .columns,
  .assistant-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .main {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    margin: -14px -14px 14px;
    padding: 14px;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .locked-app-ribbon {
    display: grid;
  }

  .locked-app-ribbon span {
    text-align: left;
  }

  .mini-kpis {
    justify-content: flex-start;
  }

  .ops-job-row,
  .priority-row {
    grid-template-columns: 1fr;
  }

  .ops-status,
  .priority-row > span:last-child {
    justify-content: flex-start;
    justify-items: start;
  }

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

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

  .packet-cover,
  .packet-section-head {
    display: grid;
  }

  .packet-release {
    min-width: 0;
    justify-items: start;
  }

  .packet-summary,
  .packet-actions {
    grid-template-columns: 1fr;
  }

  .job-record-header,
  .record-section-head {
    display: grid;
  }

  .record-status {
    min-width: 0;
    justify-items: start;
  }

  .closeout-grid,
  .proof-groups,
  .record-two,
  .record-footer-actions {
    grid-template-columns: 1fr;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .field-grid,
  .integration-grid,
  .automation-grid,
  .admin-grid,
  .report-action-row,
  .report-meta-grid,
  .readiness-grid,
  .packet-status-strip,
  .packet-hero {
    grid-template-columns: 1fr;
  }

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

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

  .dispatch-board {
    grid-template-columns: minmax(260px, 1fr);
  }

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

@media print {
  .sidebar,
  .topbar,
  .top-actions,
  .legacy-links {
    display: none !important;
  }

  .os-shell {
    display: block;
  }

  .main {
    padding: 0;
  }

  .section {
    display: none !important;
  }

  #section-packet.active,
  #section-reports.active {
    display: block !important;
  }
}

/* QUAD / VACTRACK MOBILE SHELL */
:root {
  --pri: #16a34a;
  --pri-dark: #14532d;
  --pri-light: #f0fdf4;
  --pri-glow: rgba(22, 163, 74, 0.15);
  --accent: #fde047;
  --accent-dark: #365314;
  --bg: #f0fdf4;
  --surface: #ffffff;
  --surface2: #ecfdf5;
  --border: #bbf7d0;
  --text: #052e16;
  --text2: #166534;
  --text3: #4ade80;
  --success: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --nav-border: rgba(22, 163, 74, 0.1);
  --card-shadow: 0 1px 3px rgba(20, 83, 45, 0.06), 0 4px 16px rgba(20, 83, 45, 0.04);
  --card-shadow-hover: 0 2px 8px rgba(20, 83, 45, 0.08), 0 8px 32px rgba(20, 83, 45, 0.06);
  --grad: linear-gradient(135deg, #16a34a, #14532d);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.1);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
}

html {
  font-family: "Barlow", "Segoe UI", system-ui, sans-serif;
}

body {
  min-height: 100dvh;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% -10%, rgba(34, 197, 94, 0.22), transparent 34%),
    radial-gradient(circle at 0% 18%, rgba(14, 165, 233, 0.1), transparent 28%),
    linear-gradient(180deg, #f7fff9 0%, #eefbf3 42%, #f8fafc 100%);
  color: var(--text);
}

.os-shell {
  display: block;
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(22, 163, 74, 0.1);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.055);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.header-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--grad);
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.14);
}

.header-logo svg {
  width: 18px;
  height: 22px;
}

.header-brand h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-brand p {
  margin: 2px 0 0;
  color: var(--text3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.hdr-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--surface2);
  color: var(--text2);
  transition: all 0.2s var(--ease-out);
}

.hdr-btn svg {
  width: 18px;
  height: 18px;
}

.hdr-btn:active {
  transform: scale(0.94);
}

.hdr-btn .badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.main {
  padding: 0 16px calc(96px + env(safe-area-inset-bottom));
}

.topbar {
  position: static;
  display: block;
  margin: 14px 0;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar h1 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.topbar p {
  margin-top: 5px;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.4;
}

.workbar {
  display: grid;
  gap: 10px;
  margin: 14px 0 10px;
  padding: 4px 2px 0;
}

.workbar h1 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}

.work-summary {
  display: flex;
  gap: 7px;
  margin: 0 -16px;
  padding: 0 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.work-summary::-webkit-scrollbar {
  display: none;
}

.summary-pill {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text2);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.035);
}

.mini-kpis {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.job-board-list,
.priority-list {
  display: grid;
  gap: 8px;
}

.ops-job-row,
.priority-row {
  width: 100%;
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-md);
  display: grid;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  text-align: left;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.03);
}

.ops-job-row {
  grid-template-columns: 58px minmax(0, 1fr) auto;
}

.ops-job-row:hover,
.priority-row:hover {
  border-color: rgba(22, 163, 74, 0.28);
  background: #fff;
  transform: translateY(-1px);
}

.ops-time {
  color: var(--pri-dark);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.ops-main,
.priority-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ops-main strong,
.priority-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-main small,
.priority-row small {
  overflow: hidden;
  color: var(--text2);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-status {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}

.priority-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.priority-row > span:last-child {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.priority-row em {
  color: var(--pri-dark);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

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

.kpi-strip .metric {
  min-height: 86px;
  padding: 12px 9px;
}

.kpi-strip .metric .value {
  margin-top: 4px;
  font-size: 24px;
}

.field-shift-card,
.customer-work-card {
  display: grid;
  gap: 14px;
}

.field-job-summary {
  display: grid;
  gap: 10px;
}

.field-job-summary > div {
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-md);
  display: grid;
  gap: 5px;
  background: rgba(255, 255, 255, 0.74);
}

.field-job-summary label {
  color: var(--text3);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-job-summary strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.field-job-summary span {
  color: var(--text2);
  font-size: 12px;
  font-weight: 800;
}

.field-primary-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 8px;
}

.job-record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.job-record-header h2 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.job-record-header p {
  margin: 6px 0 0;
  color: var(--text2);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.record-status {
  min-width: 158px;
  display: grid;
  justify-items: end;
  gap: 7px;
}

.record-status select {
  width: 100%;
  min-height: 34px;
}

.closeout-grid,
.proof-groups,
.record-two {
  display: grid;
  gap: 12px;
}

.closeout-grid,
.proof-groups {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 14px;
}

.record-section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
}

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

.record-section-head h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.gate-list,
.blocker-list {
  display: grid;
  gap: 7px;
}

.gate-row {
  min-height: 50px;
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
}

.gate-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.gate-row strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.gate-row small {
  color: var(--text2);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.blocker-line {
  padding: 9px 10px;
  border: 1px solid rgba(239, 68, 68, 0.14);
  border-radius: var(--radius-sm);
  background: #fff7f7;
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.blocker-line.ready {
  border-color: rgba(22, 163, 74, 0.16);
  background: rgba(240, 253, 244, 0.9);
  color: var(--pri-dark);
}

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

.record-field {
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: var(--radius-md);
  display: grid;
  align-content: start;
  gap: 5px;
  background: #fff;
}

.record-field label {
  color: var(--text3);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.record-field strong,
.record-field p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.record-field p {
  color: var(--text2);
}

.record-footer-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.top-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
  justify-content: stretch;
}

.btn,
.filter-btn,
.question-list button,
select,
input,
textarea {
  border-radius: var(--radius-sm);
  border-color: var(--border);
}

.btn {
  min-height: 42px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  background: var(--surface);
  color: var(--text);
}

.btn.primary,
.filter-btn.active {
  border-color: var(--pri);
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.16);
}

.mode-pill {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(22, 163, 74, 0.16);
  background: rgba(240, 253, 244, 0.82);
  color: var(--pri-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-notice {
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: var(--radius-sm);
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.nav-group {
  display: flex;
  gap: 7px;
  margin: 0 -16px 14px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav-group::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 12px;
  border: 1.5px solid rgba(15, 23, 42, 0.075);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  color: var(--text2);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
}

.nav-btn.active {
  border-color: var(--pri);
  background: var(--pri);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.16);
}

.nav-count {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: var(--pri-dark);
  text-align: center;
  font-size: 10px;
  font-weight: 900;
}

.nav-btn.active .nav-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.grid.two,
.grid.three,
.grid.four,
.columns,
.assistant-shell,
.admin-grid,
.integration-grid,
.automation-grid,
.report-action-row,
.report-meta-grid,
.readiness-grid,
.packet-status-strip,
.packet-hero {
  grid-template-columns: 1fr;
}

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

.panel,
.card,
.metric,
.table-panel,
.job-card,
.customer-card,
.crew-card,
.equipment-card,
.report-card,
.dispatch-col,
.dispatch-card,
.field,
.report-preview,
.packet,
.chat-log,
.empty,
.note {
  border-color: rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}

.panel,
.metric,
.job-card,
.customer-card,
.crew-card,
.equipment-card,
.report-card,
.dispatch-card,
.field,
.report-preview,
.chat-log {
  background: var(--surface);
}

.panel {
  padding: 18px;
  margin-top: 14px;
}

.panel.soft,
.dispatch-col,
.chat-log {
  background: rgba(255, 255, 255, 0.62);
}

.eyebrow,
.card-title,
.metric .label,
.field label,
.safety-table th,
.data-table th {
  color: var(--text3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.panel h2 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.metric {
  min-height: 118px;
  padding: 16px 14px;
  text-align: center;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.metric .value {
  margin-top: 7px;
  color: var(--pri);
  font-size: 31px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.metric .sub {
  color: var(--text2);
  font-size: 10px;
  line-height: 1.3;
}

.metric.warn .value {
  color: var(--warn);
}

.metric.bad .value {
  color: var(--danger);
}

.status {
  min-height: 22px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--pri-light);
  color: var(--pri-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status.progress {
  background: #e0f2fe;
  color: #0b3b66;
}

.status.warning,
.status.review,
.status.scheduled {
  background: #fef9c3;
  color: #854d0e;
}

.status.issue {
  background: #fef2f2;
  color: #991b1b;
}

.status.ready,
.status.paid,
.status.completed {
  background: #dcfce7;
  color: #166534;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.1);
}

.job-card,
.customer-card,
.crew-card,
.equipment-card,
.report-card,
.dispatch-card {
  padding: 14px;
  transition: all 0.2s var(--ease-out);
}

.job-card:hover,
.customer-card:hover,
.crew-card:hover,
.equipment-card:hover,
.report-card:hover {
  border-color: var(--pri);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.job-card.active,
.customer-card.active,
.crew-card.active,
.report-card.active {
  border-color: var(--pri);
  background: linear-gradient(135deg, var(--pri-light), var(--surface));
  box-shadow: 0 0 0 3px var(--pri-glow);
}

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

.field {
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
}

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

.photo-tile {
  border-radius: 14px;
}

.dispatch-board {
  grid-template-columns: 1fr;
  overflow: visible;
}

.dispatch-col {
  min-height: auto;
  padding: 12px;
}

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

select,
input,
textarea {
  min-height: 42px;
  padding: 11px 13px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--pri);
  box-shadow: 0 0 0 3px var(--pri-glow);
}

.phone-frame {
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.phone-screen {
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.phone-head {
  padding: 18px;
  background: var(--grad);
  color: #fff;
}

.phone-head h2 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.workflow-step {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  transition: all 0.2s var(--ease-out);
}

.workflow-step.done {
  border-color: var(--pri);
  background: linear-gradient(135deg, var(--pri-light), var(--surface));
}

.check {
  border-radius: 7px;
}

.table-panel {
  overflow-x: auto;
}

.packet {
  border-radius: var(--radius-xl);
}

.packet-hero {
  background: var(--grad);
}

.report-preview {
  min-height: 420px;
}

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

.bubble.user {
  background: var(--pri);
  border-color: var(--pri);
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--nav-border);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.bottom-nav-inner {
  width: min(100%, 520px);
  display: flex;
  justify-content: space-around;
}

.nav-tab {
  position: relative;
  min-width: 48px;
  padding: 6px 7px;
  border: 0;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: transparent;
  color: var(--text3);
  transition: all 0.2s var(--ease-out);
}

.nav-tab:active {
  transform: scale(0.9);
}

.nav-tab .nav-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text3);
  transition: all 0.25s var(--ease-spring);
}

.nav-tab svg {
  width: 18px;
  height: 18px;
}

.nav-tab span:last-child {
  color: var(--text3);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-tab.active {
  color: var(--pri);
}

.nav-tab.active .nav-ico {
  background: var(--pri);
  color: #fff;
  box-shadow: 0 2px 8px var(--pri-glow);
}

.nav-tab.active span:last-child {
  color: var(--pri);
  font-weight: 900;
}

.role-switcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: -2px 0 12px;
}

.locked-app-ribbon {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 12px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-left: 4px solid var(--pri);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.locked-app-ribbon strong {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.locked-app-ribbon span {
  color: var(--text2);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

.role-chip {
  min-height: 52px;
  padding: 8px 6px;
  border: 1.5px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--surface);
  color: var(--text2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
  transition: all 0.2s var(--ease-out);
}

.role-chip svg {
  width: 17px;
  height: 17px;
}

.role-chip.active {
  border-color: var(--pri);
  background: var(--pri);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.18);
}

.app-boundary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 15px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}

.app-boundary.locked {
  display: block;
  border-left: 4px solid var(--pri);
}

.app-boundary h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.app-boundary p {
  margin: 6px 0 0;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
}

.portal-link-row {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
}

.portal-link-row strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.portal-link-row span {
  display: block;
  margin-top: 3px;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
}

.route-link {
  display: block;
  max-width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: var(--radius-sm);
  overflow: hidden;
  color: var(--pri-dark);
  background: var(--pri-light);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.route-link:hover {
  border-color: var(--pri);
  color: var(--pri);
}

.employee-shell .header-logo,
.employee-shell .btn.primary,
.employee-shell .filter-btn.active,
.employee-shell .nav-tab.active .nav-ico {
  background: linear-gradient(135deg, #16a34a, #0f766e);
}

.customer-shell .header-logo,
.customer-shell .btn.primary,
.customer-shell .filter-btn.active,
.customer-shell .nav-tab.active .nav-ico {
  background: linear-gradient(135deg, #2563eb, #0f766e);
}

.customer-shell .nav-btn.active {
  border-color: #2563eb;
  background: #2563eb;
}

.customer-shell .portal-cta {
  background: linear-gradient(135deg, #2563eb, #0f766e);
}

.employee-time .review-actions {
  grid-template-columns: 1fr;
}

.hub-hero,
.customer-portal-hero {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.96));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.hub-hero {
  display: grid;
  grid-template-columns: 1fr;
}

.hub-hero > div:first-child,
.customer-portal-hero {
  padding: 20px 18px;
}

.hub-hero h2,
.customer-portal-hero h2,
.employee-portal h2 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.hub-hero p,
.customer-portal-hero p,
.employee-portal p {
  margin: 8px 0 0;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.hub-photo {
  min-height: 170px;
}

.hub-photo img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
}

.portal-card {
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-xl);
  display: grid;
  gap: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
  transition: all 0.2s var(--ease-out);
}

.portal-card:hover {
  border-color: var(--pri);
  transform: translateY(-1px);
  box-shadow: var(--card-shadow-hover);
}

.portal-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--pri-light);
  color: var(--pri);
}

.portal-icon svg {
  width: 21px;
  height: 21px;
}

.portal-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.portal-card p {
  margin: 0;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.portal-cta {
  min-height: 38px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.16);
}

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

.timeline-list > div {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
}

.timeline-list span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--pri);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.timeline-list strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.timeline-list p {
  grid-column: 2;
  margin: -4px 0 0;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
}

.portal-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.14);
  flex-shrink: 0;
}

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

.action-pill {
  min-height: 58px;
  padding: 10px;
  border: 1.5px solid rgba(15, 23, 42, 0.075);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
}

.action-pill:active {
  transform: scale(0.96);
}

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

.review-actions .btn {
  min-height: 44px;
  white-space: normal;
  line-height: 1.2;
}

.customer-portal-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.customer-progress > div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.075);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.customer-progress span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--pri-light);
  color: var(--pri);
  font-size: 11px;
  font-weight: 900;
}

.customer-progress .done span {
  background: var(--pri);
  color: #fff;
}

.customer-progress strong {
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 380px) {
  .role-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.four,
  .action-grid-lite,
  .review-actions {
    grid-template-columns: 1fr;
  }

  .app-boundary {
    flex-direction: column;
  }
}

@media (min-width: 720px) {
  .os-shell {
    width: min(100%, 520px);
  }

  .bottom-nav-inner {
    width: min(100%, 520px);
  }

  .grid.three,
  .integration-grid,
  .automation-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .columns,
  .assistant-shell {
    grid-template-columns: 1fr;
  }
}
