:root {
  --brand-red: #e30513;
  --brand-red-dark: #b9020d;
  --ink: #222221;
  --charcoal: #3c3c3b;
  --muted: #6f7378;
  --line: #d9dde2;
  --soft-line: #e8ebef;
  --band: #f3f5f7;
  --white: #ffffff;
  --green: #0a9b45;
  --yellow: #e0a700;
  --blue: #1769aa;
  --shadow: 0 16px 48px rgba(32, 35, 39, 0.12);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--charcoal);
  background: var(--band);
}

body {
  margin: 0;
  min-height: 100%;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--band);
}

.login-shell {
  width: min(100%, 520px);
}

.login-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-brand {
  width: 100%;
  border-right: 0;
  border-bottom: 8px solid var(--white);
  background: var(--brand-red);
}

.login-form {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.login-form h1 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
}

.login-form p {
  margin: -8px 0 4px;
  color: var(--muted);
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-error {
  min-height: 20px;
  color: var(--brand-red);
  font-weight: 800;
}

body[data-level="3"] .level-operator,
body[data-level="3"] .level-admin,
body[data-level="4"] .level-operator,
body[data-level="4"] .level-admin,
body[data-level="2"] .level-admin {
  display: none;
}

.user-admin-only {
  display: none;
}

body[data-can-manage-users="1"] .user-admin-only {
  display: grid;
}

.main-nav .user-admin-only {
  display: none;
}

body[data-can-manage-users="1"] .main-nav .user-admin-only {
  display: inline-flex;
}

.level1-only {
  display: none;
}

body[data-level="1"] .level1-only {
  display: grid;
}

body[data-level="1"] .main-nav .level1-only {
  display: inline-flex;
}

.personnel-only {
  display: none;
}

body[data-level="1"] .personnel-only,
body[data-level="2"] .personnel-only,
body[data-level="3"] .personnel-only {
  display: grid;
}

body[data-level="1"] .main-nav .personnel-only,
body[data-level="2"] .main-nav .personnel-only,
body[data-level="3"] .main-nav .personnel-only {
  display: inline-flex;
}

[hidden] {
  display: none !important;
}

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

button {
  cursor: pointer;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: stretch;
  gap: 24px;
  color: var(--white);
  background: var(--brand-red);
  box-shadow: 0 8px 20px rgba(120, 0, 8, 0.18);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-block {
  width: 242px;
  min-height: 76px;
  padding: 16px 24px 13px;
  color: var(--white);
  border-right: 10px solid var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #ff0000;
}

.brand-script {
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
  font-style: italic;
}

.brand-sub {
  font-size: 16px;
  line-height: 1;
  text-align: right;
  text-transform: uppercase;
  font-weight: 600;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  padding: 12px 0;
}

.nav-item,
.outline-light,
.ghost-button,
.red-button,
.outline-red,
.tablet-action,
.route-button,
.call-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item {
  padding: 0 15px;
  color: var(--white);
  background: transparent;
  font-weight: 700;
}

.nav-item.active,
.nav-item:hover {
  color: var(--ink);
  background: var(--white);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 18px;
}

.user-badge {
  display: grid;
  justify-items: end;
  color: var(--white);
  line-height: 1.1;
}

.user-badge strong,
.user-badge small {
  display: block;
}

.user-badge small {
  opacity: 0.82;
  font-size: 11px;
}

.outline-light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.85);
  padding: 0 14px;
  font-weight: 700;
}

.outline-light:hover {
  color: var(--brand-red);
  background: var(--white);
}

.ghost-button {
  width: 40px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.ghost-button.dark {
  color: var(--charcoal);
  background: var(--band);
  border-color: var(--line);
  width: auto;
  padding: 0 11px;
}

.red-button,
.outline-red {
  padding: 0 16px;
  font-weight: 800;
}

.red-button {
  color: var(--white);
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.red-button:hover {
  background: var(--brand-red-dark);
  border-color: var(--brand-red-dark);
}

.outline-red {
  color: var(--brand-red);
  background: var(--white);
  border-color: var(--brand-red);
}

.outline-red:hover {
  color: var(--white);
  background: var(--brand-red);
}

.small {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 13px;
}

.full {
  width: 100%;
}

.app-shell {
  width: min(1800px, 100%);
  margin: 0 auto;
  padding: 18px;
}

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

.kpi-tile,
.panel,
.tablet-card,
.tablet-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.kpi-tile {
  min-height: 106px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.kpi-tile strong {
  display: block;
  color: var(--ink);
  font-size: 36px;
  line-height: 1;
  margin: 5px 0;
}

.kpi-tile small {
  color: var(--muted);
}

.kpi-icon {
  width: 34px;
  height: 34px;
  color: var(--brand-red);
}

.work-grid {
  display: grid;
  grid-template-columns:
    minmax(280px, 340px)
    minmax(260px, 330px)
    minmax(520px, 1fr)
    minmax(300px, 380px);
  grid-template-areas: "admin tools stage fleet";
  gap: 14px;
  align-items: start;
}

body[data-active-view="orders"] .work-grid {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  grid-template-areas: "tools stage";
}

body:not([data-active-view="orders"]) .work-grid {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "stage";
}

body[data-active-view="organization"] .app-shell {
  width: 100%;
  max-width: none;
}

.admin-rail {
  grid-area: admin;
}

.left-rail {
  grid-area: tools;
}

.center-stage {
  grid-area: stage;
}

.right-rail {
  grid-area: fleet;
}

.admin-rail,
.left-rail,
.right-rail,
.center-stage {
  display: grid;
  gap: 14px;
}

.panel {
  padding: 18px;
  min-width: 0;
}

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

.panel-head.tight {
  align-items: center;
  margin-bottom: 12px;
}

.panel h2,
.panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

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

.panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.drop-zone {
  min-height: 190px;
  border: 2px dashed #c8cdd3;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  color: var(--charcoal);
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

.drop-zone.dragging {
  border-color: var(--brand-red);
  background: #fff7f7;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-icon {
  width: 58px;
  height: 58px;
  border: 2px solid var(--brand-red);
  color: var(--brand-red);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  margin-bottom: 8px;
}

.drop-zone small {
  max-width: 250px;
  color: var(--muted);
}

.upload-status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--brand-red);
  font-size: 13px;
  font-weight: 700;
}

.upload-status.success {
  color: var(--success);
}

.upload-status.error {
  color: var(--danger);
}

.search-line {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  margin-bottom: 12px;
  background: var(--white);
}

.search-line input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
}

.order-list {
  display: grid;
  gap: 8px;
  max-height: 485px;
  overflow: auto;
  padding-right: 4px;
}

.order-row {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  text-align: left;
}

.order-row.active {
  border-color: #f2b2b7;
  background: #fff0f1;
}

.order-row strong,
.tablet-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.order-row small,
.tablet-head small,
.data-table small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.order-row em {
  color: var(--brand-red);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9ba1a8;
  display: inline-block;
  flex: 0 0 auto;
}

.status-dot.done,
.status-dot.working {
  background: var(--green);
}

.status-dot.moving,
.status-dot.info {
  background: var(--blue);
}

.status-dot.danger {
  background: var(--brand-red);
}

.empty-state {
  padding: 22px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state.large {
  min-height: 420px;
  display: grid;
  place-items: center;
}

.order-hero {
  min-height: 150px;
  margin: -18px -18px 18px;
  padding: 24px;
  color: var(--white);
  background: var(--brand-red);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.order-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.hero-edit {
  background: rgba(255, 255, 255, 0.1);
}

.order-hero h1 {
  margin: 6px 0;
  color: var(--white);
  font-size: clamp(26px, 3vw, 46px);
  line-height: 1;
  font-weight: 700;
}

.order-hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  margin: 0;
}

.order-no {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill,
.mini-pill {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.status-pill {
  align-self: start;
  padding: 8px 13px;
  color: var(--ink);
  background: var(--white);
  font-size: 12px;
}

.status-pill.working,
.status-pill.done {
  color: var(--green);
}

.status-pill.moving,
.status-pill.info {
  color: var(--blue);
}

.status-pill.danger {
  color: var(--brand-red);
}

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

.split-detail {
  margin-top: 14px;
  align-items: start;
}

.detail-block {
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
}

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

dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 9px 14px;
  margin: 14px 0 0;
}

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

dd {
  margin: 0;
  color: var(--ink);
}

.stacked-label,
.manual-form label,
.tablet-config label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--white);
  text-transform: none;
  font-weight: 500;
}

textarea {
  resize: vertical;
}

.tablet-assignment {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  background: var(--band);
  border-radius: var(--radius);
}

.team-picker {
  display: grid;
  gap: 8px;
}

.form-grid > .wide,
.team-picker.wide {
  grid-column: 1 / -1;
}

.team-picker-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.team-picker-head strong,
.team-picker-head span {
  display: block;
}

.team-picker-head strong {
  color: var(--ink);
}

.team-picker-head span {
  color: var(--muted);
  font-size: 12px;
}

.team-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.team-table.small {
  grid-template-columns: 1fr;
  max-height: 220px;
}

.team-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--soft-line);
  border-radius: 6px;
  background: var(--white);
  color: var(--charcoal);
  text-transform: none;
}

.team-row.foreman {
  border-color: #f2b4ba;
  background: #fff5f6;
}

.team-row input {
  width: auto;
  flex: 0 0 auto;
}

.team-row strong,
.team-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-row strong {
  color: var(--ink);
  font-size: 13px;
}

.team-row small {
  color: var(--muted);
  font-size: 11px;
}

.service-type-chip {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 6px 0 0;
  padding: 0 8px;
  color: var(--brand-red);
  background: #fff0f1;
  border: 1px solid #f3c3c7;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.instruction-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--charcoal);
  font-size: 13px;
}

.instruction-list li + li {
  margin-top: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.data-table th,
.data-table td {
  padding: 10px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: top;
}

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

.data-table.compact td:first-child {
  width: 56px;
}

.mini-pill {
  min-width: 70px;
  min-height: 24px;
  padding: 0 8px;
  color: var(--muted);
  background: var(--band);
  font-size: 11px;
}

.mini-pill.done {
  color: var(--green);
  background: #e8f7ee;
}

.mini-pill.warning {
  color: #8a5a00;
  background: #fff4cc;
}

.mini-pill.info {
  color: var(--blue);
  background: #e8f1ff;
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
}

.timeline-mark {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--white);
}

.timeline-mark.gps {
  border-color: var(--brand-red);
  background: var(--brand-red);
}

.timeline-row strong {
  color: var(--ink);
}

.timeline-row small,
.timeline-row p {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.manual-entry[hidden] {
  display: none;
}

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

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

.service-builder {
  border-top: 1px solid var(--soft-line);
  padding-top: 14px;
}

.customer-service-suggestions {
  margin-bottom: 10px;
}

.suggestion-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.suggestion-chip-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.suggestion-chip {
  min-height: 32px;
  max-width: 280px;
  padding: 0 10px;
  color: var(--brand-red);
  background: #fff7f7;
  border: 1px solid #f1b9be;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

#serviceRows {
  display: grid;
  gap: 10px;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 100px 100px 44px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

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

.service-row .remove-service {
  grid-column: -2 / -1;
  grid-row: 1;
}

.service-suggestion[hidden] {
  display: none;
}

.suggestion-button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-red);
  background: #fff7f7;
  border: 1px solid #f1b9be;
  border-radius: 6px;
  font-weight: 800;
  text-align: left;
  overflow: hidden;
}

.suggestion-button small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-block {
  grid-column: 1 / -1;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.attachment-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px;
  color: var(--charcoal);
  text-decoration: none;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.attachment-card img {
  width: 82px;
  height: 62px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.attachment-card .text-claim-thumb {
  width: 82px;
  height: 62px;
  display: grid;
  place-items: center;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff4f5;
}

.attachment-card strong,
.attachment-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-card small {
  color: var(--muted);
  font-size: 12px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.tablet-fleet {
  display: grid;
  gap: 12px;
}

.tablet-card {
  padding: 14px;
}

.tablet-head {
  display: grid;
  grid-template-columns: 28px 1fr 12px;
  align-items: center;
  gap: 10px;
}

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

.tablet-meta span {
  color: var(--muted);
  font-size: 12px;
}

.tablet-meta strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.remote-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.remote-actions button {
  min-height: 38px;
  color: var(--brand-red);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.remote-actions button:hover {
  background: #fff0f1;
  border-color: #ef9da4;
}

.system-panel {
  background: var(--charcoal);
  color: var(--white);
}

.customer-db-summary {
  display: grid;
  gap: 12px;
}

.db-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.db-metrics article {
  min-height: 76px;
  padding: 12px;
  background: var(--band);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
}

.db-metrics strong {
  display: block;
  color: var(--brand-red);
  font-size: 26px;
  line-height: 1;
}

.db-metrics span,
.latest-import span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.latest-import {
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
}

.latest-import strong {
  display: block;
  color: var(--ink);
  overflow-wrap: anywhere;
}

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

.db-quality,
.db-maintenance-row,
.security-detail-box,
.security-recommendations {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #fafbfc;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
}

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

.db-quality strong,
.db-maintenance-row strong,
.security-detail-box strong {
  color: var(--ink);
}

.db-maintenance-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.security-panel {
  display: grid;
  gap: 12px;
}

.security-status-panel {
  display: grid;
  gap: 10px;
}

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

.security-status-grid article {
  min-height: 68px;
  padding: 10px;
  background: var(--band);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
}

.security-status-grid strong {
  display: block;
  color: var(--brand-red);
  font-size: 22px;
  line-height: 1;
}

.security-status-grid span,
.security-recommendations span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.customer-browser {
  display: grid;
  gap: 18px;
}

.customer-browser-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
  align-items: end;
}

.customer-browser-head h2,
.customer-browser-head p,
.customer-detail-head h3,
.customer-detail-head p {
  margin: 0;
}

.customer-browser-head p,
.customer-detail-head p,
.customer-list-meta {
  color: var(--muted);
}

.customer-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--white);
}

.customer-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.page-actions .customer-search {
  min-width: min(360px, 100%);
}

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

.customer-directory-stats article {
  min-width: 0;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
}

.customer-directory-stats strong {
  display: block;
  color: var(--brand-red);
  font-size: 26px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.customer-directory-stats span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-directory {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: calc(100vh - 315px);
  min-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.customer-record {
  flex: 0 0 auto;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.customer-record.open {
  border-color: #efb1b7;
  box-shadow: 0 10px 28px rgba(32, 35, 39, 0.08);
}

.customer-record-head {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--charcoal);
  background: var(--white);
  border: 0;
  text-align: left;
  cursor: pointer;
}

.customer-record-head:hover {
  background: #fff7f7;
}

.customer-caret {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  position: relative;
}

.customer-caret::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--brand-red);
  border-bottom: 2px solid var(--brand-red);
  transform: rotate(45deg);
}

.customer-record.open .customer-caret::after {
  top: 7px;
  transform: rotate(225deg);
}

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

.customer-main strong,
.site-row strong,
.contact-row strong {
  display: block;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.customer-main small,
.site-row small,
.contact-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.customer-meta-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  color: var(--muted);
  background: var(--band);
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.customer-record-body {
  display: grid;
  min-width: 0;
  gap: 14px;
  padding: 0 14px 14px 52px;
}

.customer-profile-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.customer-profile-grid div {
  min-height: 68px;
  padding: 10px;
  background: #fafbfc;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
}

.customer-profile-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-profile-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.customer-detail-columns {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 14px;
}

.customer-detail-columns h3 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 14px;
}

.site-list,
.contact-list {
  display: grid;
  gap: 8px;
}

.site-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--charcoal);
  background: #fafbfc;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
}

.site-row:hover {
  border-color: #ef9da4;
  background: #fff7f7;
}

.site-row-main,
.site-row-meta {
  min-width: 0;
}

.site-row-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.site-row-meta em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.contact-row {
  padding: 12px;
  background: #fafbfc;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
}

.customer-browser-grid {
  display: grid;
  grid-template-columns: minmax(260px, 34%) minmax(0, 1fr);
  gap: 16px;
  min-height: 560px;
}

.customer-list-panel,
.customer-detail-panel {
  min-width: 0;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.customer-list-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.customer-list-meta {
  padding: 12px 14px;
  border-bottom: 1px solid var(--soft-line);
  font-size: 13px;
  font-weight: 800;
}

.customer-list {
  max-height: 660px;
  overflow: auto;
}

.customer-row {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  color: var(--charcoal);
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  background: transparent;
  text-align: left;
}

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

.customer-row-main em {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--brand-red);
  color: var(--white);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-row strong,
.customer-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-row span {
  color: var(--muted);
  font-size: 13px;
}

.customer-row:hover,
.customer-row.active {
  background: #fff0f1;
  color: var(--brand-red);
}

.customer-detail-panel {
  padding: 16px;
}

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

.customer-detail-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
}

.customer-detail-head h3 {
  margin-top: 4px;
  font-size: 24px;
}

.customer-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.customer-facts article {
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--white);
}

.customer-facts strong,
.customer-facts span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-facts span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.customer-detail-grid h4 {
  margin: 0 0 10px;
}

.customer-site-picker {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--white);
}

.customer-site-picker label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-site-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.customer-site-detail article {
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.customer-site-detail strong,
.customer-site-detail span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-site-detail span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-data-list {
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
}

.customer-service-lines {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

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

.section-head h4 {
  margin: 0;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.service-line-table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--white);
}

.service-line-table {
  min-width: 1080px;
  border: 0;
}

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

.service-line-table td:nth-child(3),
.service-line-table th:nth-child(3) {
  min-width: 260px;
  white-space: normal;
}

.detail-list {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow: auto;
}

.detail-list article {
  padding: 10px 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--white);
}

.detail-list strong,
.detail-list span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.page-head h2,
.page-head p {
  margin: 0;
}

.page-head p {
  color: var(--muted);
}

.organization-content,
.organization-assignments,
.organization-employee-list {
  display: grid;
  gap: 14px;
}

.organization-content {
  margin-top: 18px;
}

.organization-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.organization-chart {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  padding: 22px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
}

.organization-diagram-switch {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: #f1f4f5;
}

.organization-diagram-switch button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.organization-diagram-switch button.active {
  color: var(--white);
  background: var(--brand-red);
  box-shadow: 0 4px 12px rgba(190, 24, 32, 0.2);
}

.org-scroll-hint {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.org-reference-diagram {
  --org-line: #176b8d;
  position: relative;
  min-width: 1420px;
  padding: 12px 18px 18px;
  color: #09171d;
}

.org-document-brand {
  display: grid;
  justify-content: center;
  margin-bottom: 26px;
  line-height: 0.9;
  text-align: center;
}

.org-document-brand img {
  width: 250px;
  height: 112px;
  object-fit: contain;
  object-position: center;
}

.org-document-brand span {
  color: #e30613;
  font-size: 38px;
  font-style: italic;
  font-weight: 800;
}

.org-document-brand strong {
  color: #35393b;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.org-reference-box {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  min-height: 68px;
  padding: 10px 12px;
  border: 3px solid #102d3a;
  background: #80c6e5;
  text-align: center;
}

.org-reference-box.green { background: #afe19e; }
.org-reference-box.gray { background: #d5d5d5; }
.org-reference-box.pale { background: #dceaf7; }
.org-reference-box.compact { min-width: 215px; }
.org-reference-box.lead { min-height: 96px; font-size: 1.08rem; }
.org-reference-box.department { min-height: 82px; }

.org-reference-box strong,
.org-reference-box span,
.org-reference-box small {
  display: block;
}

.org-reference-box strong { font-size: 0.9rem; }
.org-reference-box span { margin-top: 4px; }
.org-reference-box small { margin-top: 3px; font-size: 0.76rem; }

.org-general-leadership {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 300px);
  justify-content: center;
  gap: 330px;
  margin-bottom: 42px;
}

.org-general-leadership::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(50% - 165px);
  width: 330px;
  border-top: 3px solid var(--org-line);
}

.org-general-support {
  position: relative;
  display: grid;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto 52px;
}

.org-general-support::before {
  content: "";
  position: absolute;
  top: -43px;
  bottom: -53px;
  left: 50%;
  border-left: 3px solid var(--org-line);
}

.org-support-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 190px;
}

.org-support-cell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
}

.org-support-cell.left { justify-content: flex-end; }
.org-support-cell.right { justify-content: flex-start; }
.org-support-cell > .org-reference-box:not(.compact) { width: 270px; }

.org-support-cell::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 95px;
  border-top: 3px solid var(--org-line);
}

.org-support-cell.left::after { right: -95px; }
.org-support-cell.right::after { left: -95px; }

.org-support-cell.has-side-child .org-reference-box.compact::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 31px;
  border-top: 3px solid var(--org-line);
}

.org-support-cell.left .org-reference-box.compact::after { right: -31px; }
.org-support-cell.right .org-reference-box.compact::after { left: -31px; }

.org-division-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  gap: 22px;
  padding-top: 28px;
}

.org-division-grid::before,
.org-department-grid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 7%;
  right: 7%;
  border-top: 3px solid var(--org-line);
}

.org-division-grid .org-reference-box::before,
.org-department-column::before {
  content: "";
  position: absolute;
  top: -28px;
  left: 50%;
  height: 28px;
  border-left: 3px solid var(--org-line);
}

.org-austria-lead {
  position: relative;
  width: 320px;
  margin: 0 auto 38px;
}

.org-austria-lead::after {
  content: "";
  position: absolute;
  bottom: -38px;
  left: 50%;
  height: 38px;
  border-left: 3px solid var(--org-line);
}

.org-department-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(175px, 1fr));
  gap: 22px;
  padding-top: 28px;
}

.org-department-column {
  position: relative;
}

.org-department-roles {
  position: relative;
  display: grid;
  gap: 8px;
  padding-top: 16px;
}

.org-department-roles::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 34px;
  left: 50%;
  border-left: 3px solid var(--org-line);
}

.org-version-note {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.78rem;
}

.organization-node {
  min-width: 190px;
  padding: 12px;
  border: 1px solid #9eabb2;
  border-radius: var(--radius);
  background: var(--white);
  text-align: center;
}

.organization-node.assignable {
  border-color: #2784ad;
  background: #eef8fc;
}

.organization-node > span,
.organization-node > b,
.organization-node > small {
  display: block;
  margin-top: 4px;
}

.organization-node > span,
.organization-node > small {
  color: var(--muted);
  font-size: 12px;
}

.organization-children {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.organization-assignments {
  padding-top: 4px;
}

.organization-assignments h3,
.organization-assignments p {
  margin: 0;
}

.organization-assignments p {
  color: var(--muted);
}

.organization-employee-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(360px, 1.8fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
}

.personnel-assignment-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 8px;
}

.personnel-assignment-fields label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

.personnel-assignment-fields select {
  min-width: 0;
}

.employee-app-online,
.employee-app-hours-panel {
  margin-top: 18px;
}

.employee-app-hours-panel {
  padding: 18px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
}

.employee-app-hours-table {
  display: grid;
  max-width: 100%;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.employee-hours-search {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  max-width: 560px;
  font-weight: 800;
}

.employee-hours-search small {
  color: var(--muted);
  font-weight: 500;
}

.employee-app-hours-head,
.employee-app-hours-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.15fr) repeat(3, minmax(190px, 1fr));
  gap: 8px;
  align-items: center;
  min-width: 850px;
}

.employee-app-hours-head {
  padding: 0 10px 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.employee-app-hours-row {
  padding: 9px 10px;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
}

.employee-app-name small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.worktime-file-button,
.employee-location-button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 10px;
  border: 2px solid;
  border-radius: 9px;
  font-weight: 800;
  text-decoration: none;
}

.worktime-file-button small {
  margin-left: auto;
  font-weight: 700;
}

.worktime-file-button.is-empty {
  border-color: #c91d2e;
  background: #fff0f1;
  color: #8c101b;
}

.worktime-file-button.has-entries,
.employee-location-button {
  border-color: #27864a;
  background: #edf9f0;
  color: #176332;
}

.employee-location-button {
  justify-content: center;
  margin-top: 10px;
}

.employee-location-button.unavailable {
  border-color: #aeb7bd;
  background: #f1f3f5;
  color: var(--muted);
}

.organization-employee-row span,
.organization-employee-row small {
  display: block;
}

.organization-employee-row small {
  margin-top: 3px;
  color: var(--muted);
}

.personnel-register-grid {
  display: grid;
  gap: 22px;
}

.personnel-section-head,
.personnel-management-row,
.personnel-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.personnel-section-head {
  justify-content: space-between;
}

.personnel-section-head > div {
  display: grid;
  gap: 4px;
}

.personnel-management-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 10px;
}

.personnel-management-row {
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.personnel-management-row span,
.personnel-management-row small {
  display: block;
}

.personnel-management-row small {
  margin-top: 3px;
  color: var(--muted);
}

.personnel-row-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.personnel-search {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

button.compact {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.tablet-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.worktime-gps-panel {
  margin-top: 16px;
}

.worktime-gps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.worktime-gps-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.worktime-export-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeclock-export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeclock-export-row a {
  flex: 1;
  min-width: 150px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.gps-map-wrap {
  margin-top: 12px;
}

.gps-map {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef3f1;
}

.gps-map iframe {
  width: 100%;
  height: 250px;
  border: 0;
  display: block;
}

.gps-map-open {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  color: var(--white);
  background: var(--brand-red);
  border: 2px solid var(--white);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 18px rgba(34, 34, 33, 0.18);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.gps-booking-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  max-height: 230px;
  overflow: auto;
}

.gps-booking-select {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.gps-booking-select select {
  min-height: 38px;
  width: 100%;
  padding: 0 10px;
  color: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.gps-booking-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 3px 10px;
  align-items: start;
  padding: 10px;
  text-align: left;
  color: var(--charcoal);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
}

.gps-booking-row.active {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 2px rgba(227, 5, 19, 0.12);
}

.gps-booking-row span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.gps-booking-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.35;
}

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

.gps-event-list a {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  color: var(--charcoal);
  text-decoration: none;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--white);
}

.gps-event-list strong,
.gps-event-list span {
  display: block;
}

.gps-event-list span {
  color: var(--muted);
  font-size: 12px;
}

.article-browser {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.article-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}

.article-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.article-group-card {
  display: grid;
  gap: 5px;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fbfcfd;
  color: var(--ink);
  cursor: pointer;
}

.article-group-card.active {
  border-color: var(--brand-red);
  background: #fff3f4;
}

.article-group-card strong,
.article-group-card span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.article-group-card span {
  color: var(--muted);
  font-size: 12px;
}

.article-table-wrap {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
}

.article-table td span,
.article-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.muted-row {
  opacity: 0.55;
}

.delivery-workspace {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

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

.workspace-metrics article,
.delivery-proof-grid article {
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.workspace-metrics strong,
.workspace-metrics span,
.delivery-proof-grid strong,
.delivery-proof-grid span {
  display: block;
}

.workspace-metrics strong,
.delivery-proof-grid strong {
  font-size: 20px;
}

.workspace-metrics span,
.delivery-proof-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.delivery-workspace-grid {
  display: grid;
  grid-template-columns: minmax(280px, 34%) minmax(0, 1fr);
  gap: 16px;
}

.delivery-list {
  max-height: 760px;
  overflow: auto;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.delivery-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  background: transparent;
  color: var(--charcoal);
  text-align: left;
}

.delivery-row:hover,
.delivery-row.active {
  background: #fff0f1;
  color: var(--brand-red);
}

.delivery-row strong,
.delivery-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.delivery-row small {
  color: var(--muted);
}

.delivery-detail {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

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

.delivery-detail-head h2,
.delivery-detail-head p {
  margin: 0;
}

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

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

.delivery-facts div {
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--white);
}

.delivery-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.delivery-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.delivery-subsection {
  display: grid;
  gap: 8px;
}

.delivery-subsection h3,
.delivery-note-history h3 {
  margin: 0;
}

.delivery-time-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  overflow: hidden;
}

.delivery-time-table th,
.delivery-time-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
}

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

.delivery-time-table .total-row td {
  font-weight: 900;
}

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

.delivery-note-history {
  display: grid;
  gap: 10px;
}

.notes-grid {
  display: grid;
  gap: 12px;
}

.note-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

.note-card h3,
.note-card p {
  margin: 0;
}

.note-card h3 {
  margin-top: 4px;
}

.note-card p {
  color: var(--muted);
}

.signature-preview {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--white);
}

.signature-preview img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.signature-preview.large {
  min-height: 170px;
}

.signature-preview.large img {
  max-height: 190px;
}

.ai-assistant-panel {
  display: grid;
  gap: 12px;
}

.order-ai-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #f0c7cb;
  border-radius: var(--radius);
  background: #fff8f8;
}

.order-ai-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.order-ai-head strong,
.order-ai-head small {
  display: block;
}

.order-ai-head strong {
  color: var(--ink);
  font-size: 13px;
}

.order-ai-head small {
  color: var(--muted);
  font-size: 12px;
}

.ai-order-controls {
  display: grid;
  gap: 10px;
}

.ai-order-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-order-select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.ai-selected-order {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fff;
}

.ai-selected-order strong {
  color: var(--ink);
  font-size: 13px;
}

.ai-selected-order span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ai-order-controls.compact {
  gap: 8px;
}

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

.ai-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--band);
}

.ai-status strong,
.ai-status small {
  display: block;
}

.ai-status small {
  color: var(--muted);
  font-size: 12px;
}

.ai-status.missing {
  background: #fff7f7;
  border-color: #f1b9be;
}

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

.ai-actions button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.ai-policy {
  display: grid;
  gap: 6px;
  padding: 10px;
  color: var(--muted);
  background: #fafbfc;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  font-size: 12px;
}

.ai-policy strong {
  color: var(--ink);
}

.ai-suggestions,
.ai-runs {
  display: grid;
  gap: 8px;
}

.ai-suggestions h3,
.ai-runs h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.ai-suggestion {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.ai-suggestion strong,
.ai-suggestion small {
  display: block;
}

.ai-suggestion strong {
  color: var(--ink);
  font-size: 13px;
}

.ai-suggestion small {
  color: var(--muted);
  font-size: 12px;
}

.ai-run {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.ai-run span {
  color: var(--ink);
  font-weight: 800;
}

.ai-run.failed small {
  color: var(--brand-red);
}

.user-admin-content,
.user-admin-section,
.user-list {
  display: grid;
  gap: 10px;
}

.user-admin-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.user-request,
.user-row {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.user-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.user-request strong,
.user-request small,
.user-row strong,
.user-row small {
  display: block;
}

.user-request strong,
.user-row strong {
  color: var(--ink);
  font-size: 13px;
}

.user-request small,
.user-row small,
.user-request p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.user-request label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.user-row-actions {
  display: grid;
  gap: 8px;
}

.user-row.inactive {
  opacity: 0.62;
}

.edit-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
}

.edit-dialog.wide {
  width: min(1180px, calc(100vw - 28px));
}

.edit-dialog::backdrop {
  background: rgba(32, 35, 39, 0.42);
}

.modal-form {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: var(--white);
}

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

.modal-head h3,
.modal-head p,
.editor-section h4 {
  margin: 0;
}

.modal-head h3,
.editor-section h4 {
  color: var(--ink);
}

.modal-head p {
  margin-top: 4px;
  color: var(--muted);
}

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

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

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-section {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--soft-line);
}

.section-head.compact {
  align-items: center;
}

.section-head.compact h3,
.section-head.compact h4 {
  margin: 0;
}

.editor-table-wrap {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
}

.editor-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.editor-table th,
.editor-table td {
  padding: 8px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: middle;
}

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

.editor-table input {
  min-height: 36px;
  padding: 8px 9px;
}

.editor-table input[type="checkbox"],
.check-label input {
  width: auto;
}

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

.small-square {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  text-transform: none;
}

.article-table td:last-child {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.system-panel h2 {
  color: var(--white);
}

.system-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.system-steps {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.system-steps span {
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(380px, calc(100vw - 36px));
  padding: 13px 16px;
  color: var(--white);
  background: var(--charcoal);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

.toast[data-kind="success"] {
  background: var(--green);
}

.toast[data-kind="error"] {
  background: var(--brand-red);
}

/* Tablet worker surface */
.tablet-body {
  min-height: 100vh;
  background: #dfe3e8;
  display: grid;
  place-items: center;
  padding: 18px;
}

.tablet-frame {
  width: min(100%, 900px);
  min-height: min(1100px, calc(100vh - 36px));
  background: var(--white);
  border: 16px solid #161718;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.tablet-topbar {
  min-height: 74px;
  display: grid;
  grid-template-columns: 48px 96px 1fr 48px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  color: var(--white);
  background: var(--brand-red);
}

.tablet-brand-logo {
  width: 96px;
  height: 48px;
  object-fit: contain;
  object-position: center;
  border-radius: 5px;
}

.tablet-topbar strong,
.tablet-topbar small {
  display: block;
}

.tablet-topbar strong {
  font-size: 18px;
}

.tablet-topbar small {
  color: rgba(255, 255, 255, 0.84);
}

.tablet-menu {
  min-height: 42px;
  border: 0;
  color: var(--white);
  background: transparent;
}

.tablet-menu.close {
  color: var(--charcoal);
}

.tablet-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(22, 23, 24, 0.45);
}

.tablet-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: min(360px, 88vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: var(--white);
  border-right: 1px solid var(--line);
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.22);
  transform: translateX(-104%);
  transition: transform 0.2s ease;
}

.tablet-drawer[aria-hidden="false"] {
  transform: translateX(0);
}

.tablet-drawer-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.tablet-drawer-head strong {
  font-size: 20px;
}

.tablet-drawer-brand-logo {
  width: 132px;
  height: 58px;
  object-fit: contain;
  object-position: center;
}

.offer-brand-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 18px;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}

.offer-brand-banner img {
  width: 138px;
  height: 141px;
  flex: 0 0 138px;
  object-fit: contain;
  object-position: center;
  border-radius: 4px;
}

.offer-brand-banner span {
  display: grid;
  gap: 4px;
}

.offer-brand-banner strong {
  font-size: 20px;
}

.offer-brand-banner small {
  color: rgba(255, 255, 255, 0.72);
}

.offer-editor-brand {
  display: flex;
  justify-content: flex-end;
  height: 176px;
  margin: -22px -22px 18px;
  overflow: hidden;
  background: #5f5f5f;
  border-bottom: 5px solid var(--ink);
}

.offer-editor-brand img {
  width: 172px;
  height: 100%;
  flex: 0 0 172px;
  object-fit: contain;
  object-position: right center;
}

.tablet-drawer-user {
  display: grid;
  gap: 3px;
  padding: 16px 18px;
  background: var(--band);
  border-bottom: 1px solid var(--line);
}

.tablet-drawer-user small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tablet-drawer-user strong {
  color: var(--ink);
  font-size: 18px;
}

.tablet-drawer-user span {
  color: var(--muted);
  font-size: 13px;
}

.tablet-drawer-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 14px;
}

.tablet-drawer-nav button,
.tablet-drawer-logout {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px;
  color: var(--charcoal);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-align: left;
}

.tablet-drawer-nav button.active,
.tablet-drawer-nav button:hover {
  color: var(--brand-red);
  background: #fff0f1;
  border-color: #efc0c4;
}

.tablet-drawer-logout {
  margin: 14px;
  color: var(--brand-red);
  border-color: #ef9da4;
  background: var(--white);
}

.tablet-config {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px 18px;
  background: var(--band);
  border-bottom: 1px solid var(--line);
}

.tablet-content {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.tablet-section {
  padding: 18px;
}

.tablet-section small {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 900;
}

.tablet-section h1,
.tablet-section h2,
.tablet-section h3 {
  margin: 3px 0 4px;
  color: var(--ink);
}

.tablet-section h1 {
  font-size: 24px;
}

.tablet-section h2 {
  font-size: 21px;
}

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

.employee-login-section p {
  margin: 0;
  color: var(--muted);
}

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

.tablet-account-section p {
  margin: 0;
  color: var(--muted);
}

.tablet-account-form {
  display: grid;
  gap: 12px;
}

.tablet-account-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tablet-login-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tablet-order-switcher h3 {
  margin-bottom: 12px;
}

.tablet-order-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.tablet-order-tabs button {
  min-height: 64px;
  padding: 10px;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.tablet-order-tabs button.active {
  color: var(--brand-red);
  border-color: #ef9da4;
  background: #fff0f1;
}

.tablet-order-tabs strong,
.tablet-order-tabs small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-section {
  position: relative;
  padding-right: 76px;
}

.destination-section {
  position: relative;
  padding-right: 138px;
}

.call-button,
.route-button {
  position: absolute;
  right: 18px;
  top: 24px;
}

.call-button {
  width: 44px;
  color: var(--brand-red);
  background: var(--white);
  border: 1px solid var(--line);
}

.route-button {
  min-width: 94px;
  color: var(--brand-red);
  background: var(--white);
  border: 1px solid var(--brand-red);
}

.action-section {
  border-color: #f0bcc0;
}

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

.tablet-action {
  min-height: 92px;
  padding: 10px;
  flex-direction: column;
  color: var(--brand-red);
  background: var(--white);
  border-color: #ef9da4;
  text-align: center;
}

.tablet-action:hover,
.tablet-action:focus-visible {
  color: var(--white);
  background: var(--brand-red);
}

.tablet-action strong {
  color: inherit;
  font-size: 13px;
}

.tablet-action small {
  color: inherit;
  text-transform: none;
  font-weight: 600;
  opacity: 0.78;
}

.gps-line {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.tablet-checklist {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.check-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-red);
}

.check-row input:disabled {
  opacity: 0.55;
}

.check-row strong,
.check-row small {
  display: block;
}

.check-row span {
  min-width: 0;
}

.check-row small {
  text-transform: none;
  font-weight: 500;
}

.tablet-instructions {
  margin-top: 6px;
  color: var(--charcoal);
}

.check-row em {
  color: var(--charcoal);
  font-style: normal;
  font-weight: 800;
}

.photo-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.tablet-photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.tablet-photo-list a {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  color: var(--charcoal);
  text-decoration: none;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.tablet-photo-list img {
  width: 54px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
}

.tablet-photo-list .text-claim-thumb {
  width: 54px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  border-radius: 6px;
  background: #fff4f5;
}

.tablet-photo-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 700;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
}

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

.signature-mail-box {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.worktime-live-status {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
}

.worktime-live-status .mini-pill {
  justify-self: start;
}

.worktime-live-status strong {
  color: var(--charcoal);
}

.signature-mail-box.needs-mail {
  border-color: #ef9da4;
  background: #fff0f1;
}

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

.signature-canvas {
  width: 100%;
  height: 210px;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  touch-action: none;
  -ms-touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: contain;
  margin-bottom: 12px;
}

.signature-name-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.signature-name-field input {
  min-height: 46px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 800;
}

.signing-lock {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.footer-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.empty-tablet {
  min-height: 420px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-tablet .icon {
  width: 54px;
  height: 54px;
  color: var(--brand-red);
}

.tablet-history-loading {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
}

.tablet-history-loading .icon {
  width: 38px;
  height: 38px;
  color: var(--brand-red);
}

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

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

.tablet-history-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.tablet-history-card h2,
.tablet-history-card p {
  margin: 0;
}

.tablet-history-card h2 {
  font-size: 18px;
}

.tablet-history-card p,
.tablet-history-card span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.tablet-history-card > strong {
  color: var(--brand-red);
  font-size: 14px;
  white-space: nowrap;
}

.tablet-history-card > em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.tablet-card-action {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--brand-red);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  border: 1px solid rgba(227, 5, 19, 0.5);
  border-radius: 6px;
  background: #fff;
  white-space: nowrap;
}

.tablet-card-action:hover,
.tablet-card-action:focus-visible {
  color: #fff;
  background: var(--brand-red);
  outline: none;
}

.tablet-month-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.tablet-month-totals div {
  padding: 14px;
  border: 1px solid #efc0c4;
  border-radius: var(--radius);
  background: #fff0f1;
}

.tablet-month-totals strong {
  display: block;
  color: var(--brand-red);
  font-size: 20px;
}

.timeclock-section,
.week-calendar-section {
  display: grid;
  gap: 14px;
}

.timeclock-hero {
  padding: 0;
  overflow: hidden;
}

.timeclock-hero::before {
  content: "";
  display: block;
  height: 5px;
  background: var(--line);
}

.timeclock-hero.active::before {
  background: var(--green);
}

.timeclock-hero.pause::before {
  background: var(--yellow);
}

.timeclock-hero.done::before {
  background: var(--brand-red);
}

.timeclock-hero.readonly::before {
  background: var(--muted);
}

.timeclock-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.timeclock-state {
  display: grid;
  gap: 5px;
}

.timeclock-state span {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.timeclock-state strong {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.15;
}

.timeclock-today {
  min-width: 132px;
  padding: 12px 14px;
  text-align: right;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.timeclock-today small,
.timeclock-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.timeclock-today strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.timeclock-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  background: var(--soft-line);
}

.timeclock-button {
  min-height: 88px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 3px;
  align-content: center;
  padding: 14px;
  color: var(--charcoal);
  background: var(--white);
  border: 0;
  border-radius: 0;
  text-align: left;
  white-space: normal;
}

.timeclock-button.ready {
  color: var(--ink);
  background: #fff7f7;
}

.timeclock-button.ready:focus-visible,
.timeclock-button.ready:hover {
  color: var(--white);
  background: var(--brand-red);
}

.timeclock-button:disabled {
  color: #a5abb2;
  cursor: not-allowed;
}

.timeclock-button-mark {
  grid-row: 1 / span 2;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.timeclock-button.ready .timeclock-button-mark {
  background: currentColor;
}

.timeclock-button strong,
.timeclock-button small {
  display: block;
  min-width: 0;
}

.timeclock-button strong {
  font-size: 13px;
  line-height: 1.2;
}

.timeclock-button small {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.72;
}

.timeclock-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--soft-line);
}

.timeclock-metrics article {
  padding: 13px 18px 15px;
  background: #fafbfc;
}

.timeclock-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.week-calendar-head,
.month-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.week-calendar-head h2,
.week-calendar-head p {
  margin: 0;
}

.week-calendar-head h2 {
  color: var(--ink);
  font-size: 18px;
}

.week-calendar-head p {
  color: var(--muted);
  font-size: 13px;
}

.week-nav-button {
  min-height: 38px;
  padding: 0 13px;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
}

.week-nav-button.today-button {
  color: var(--brand-red);
  border-color: var(--brand-red);
}

.week-axis {
  display: grid;
  grid-template-columns: 98px repeat(5, 1fr) 118px;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.week-axis span {
  text-align: center;
}

.week-axis span:first-child {
  grid-column: 2;
}

.week-calendar {
  display: grid;
  gap: 8px;
}

.calendar-day {
  min-width: 0;
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr) 118px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.calendar-day.today {
  border-color: #efc0c4;
  background: #fff7f7;
}

.calendar-day-label strong,
.calendar-day-label span {
  display: block;
}

.calendar-day-label strong {
  color: var(--ink);
  font-size: 13px;
}

.calendar-day-label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.calendar-track-wrap {
  min-width: 0;
}

.calendar-track {
  position: relative;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, transparent, transparent 24.7%, rgba(217, 221, 226, 0.9) 24.8%, rgba(217, 221, 226, 0.9) 25%, transparent 25.1%, transparent 49.7%, rgba(217, 221, 226, 0.9) 49.8%, rgba(217, 221, 226, 0.9) 50%, transparent 50.1%, transparent 74.7%, rgba(217, 221, 226, 0.9) 74.8%, rgba(217, 221, 226, 0.9) 75%, transparent 75.1%),
    #fff;
}

.work-block,
.pause-block,
.drive-block,
.deviation-block {
  position: absolute;
  top: 8px;
  bottom: 8px;
  border-radius: 6px;
}

.work-block {
  background: linear-gradient(90deg, #0a9b45, #25b967);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.pause-block {
  background: #e0a700;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.82), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.drive-block {
  background: linear-gradient(90deg, #ffd84d, #f2b900);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.82), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.deviation-block {
  z-index: 3;
  background: linear-gradient(90deg, #b00020, #e30513);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.order-radius-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.order-radius-line.inside {
  color: #087238;
  border-color: rgba(10, 155, 69, 0.28);
  background: #eefbf3;
}

.order-radius-line.outside {
  color: #b00020;
  border-color: rgba(227, 5, 19, 0.32);
  background: #fff0f2;
}

.inline-link-button {
  width: auto;
  min-height: 30px;
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.order-timebar {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.order-timebar .calendar-track {
  min-height: 34px;
}

.order-timebar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.order-timebar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.order-timebar-legend i {
  width: 12px;
  height: 8px;
  border-radius: 999px;
}

.legend-drive {
  background: #f2b900;
}

.legend-work {
  background: #0a9b45;
}

.legend-deviation {
  background: #b00020;
}

.empty-workday {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9ba1a8;
  font-size: 11px;
  font-weight: 800;
}

.calendar-times {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 800;
}

.calendar-times span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.calendar-times small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.month-total {
  padding: 14px 16px;
  border: 1px solid #efc0c4;
  border-radius: var(--radius);
  background: #fff0f1;
}

.month-total span {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.month-total strong {
  color: var(--brand-red);
  font-size: 20px;
  white-space: nowrap;
}

.icon {
  --icon: none;
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.icon-clipboard {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 2h6a2 2 0 0 1 2 2h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2a2 2 0 0 1 2-2Zm0 4h6V4H9v2Zm-4 0v14h14V6h-2v2H7V6H5Zm4 6h6v2H9v-2Zm0 4h6v2H9v-2Z'/%3E%3C/svg%3E");
}
.icon-users {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm8-1a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7ZM2 21v-2a6 6 0 0 1 12 0v2H2Zm12.5 0v-2.1a7.9 7.9 0 0 0-1.8-5A5 5 0 0 1 22 16.5V21h-7.5Z'/%3E%3C/svg%3E");
}
.icon-tablet {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h10a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3Zm0 2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H7Zm4 13h2v2h-2v-2Z'/%3E%3C/svg%3E");
}
.icon-file {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 2h9l5 5v15H6V2Zm8 2H8v16h10V8h-4V4ZM9 12h8v2H9v-2Zm0 4h8v2H9v-2Z'/%3E%3C/svg%3E");
}
.icon-sync {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17.7 6.3A8 8 0 0 0 4.3 10H2a10 10 0 0 1 16.9-5.1L21 2.8V9h-6.2l2.9-2.7ZM6.3 17.7A8 8 0 0 0 19.7 14H22A10 10 0 0 1 5.1 19.1L3 21.2V15h6.2l-2.9 2.7Z'/%3E%3C/svg%3E");
}
.icon-plus {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 4h2v7h7v2h-7v7h-2v-7H4v-2h7V4Z'/%3E%3C/svg%3E");
}
.icon-search {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 4a6 6 0 1 1 0 12 6 6 0 0 1 0-12Zm0 2a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm5.7 8.3 4 4-1.4 1.4-4-4 1.4-1.4Z'/%3E%3C/svg%3E");
}
.icon-x {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m6.4 5 5.6 5.6L17.6 5 19 6.4 13.4 12 19 17.6 17.6 19 12 13.4 6.4 19 5 17.6l5.6-5.6L5 6.4 6.4 5Z'/%3E%3C/svg%3E");
}
.icon-save {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 3h12l2 2v16H5V3Zm2 2v14h10V7.8L14.2 5H7Zm2 0h4v5H9V5Zm0 10h6v2H9v-2Z'/%3E%3C/svg%3E");
}
.icon-truck {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 5h12v10h2.1L15 12.9V8h3l3 4v5h-2a3 3 0 0 1-6 0H9a3 3 0 0 1-6 0H1v-2h2V5Zm2 2v8.2A3 3 0 0 1 8.8 17H13V7H5Zm12 3v2.1l2.9 2.9H17v-5Zm-11 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm10 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z'/%3E%3C/svg%3E");
}
.icon-play {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 5v14l11-7L8 5Z'/%3E%3C/svg%3E");
}
.icon-check {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m9.2 16.2-4-4L3.8 13.6l5.4 5.4 11-11-1.4-1.4-9.6 9.6Z'/%3E%3C/svg%3E");
}
.icon-location {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a7 7 0 0 1 7 7c0 5.2-7 13-7 13S5 14.2 5 9a7 7 0 0 1 7-7Zm0 2a5 5 0 0 0-5 5c0 2.8 3.1 7.4 5 10.1C13.9 16.4 17 11.8 17 9a5 5 0 0 0-5-5Zm0 3a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z'/%3E%3C/svg%3E");
}
.icon-lock {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 10V7a5 5 0 0 1 10 0v3h2v12H5V10h2Zm2 0h6V7a3 3 0 0 0-6 0v3Zm-2 2v8h10v-8H7Z'/%3E%3C/svg%3E");
}
.icon-phone {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.6 2 11 6.4 8.6 8.8c1.4 2.8 3.8 5.2 6.6 6.6l2.4-2.4 4.4 4.4-2.8 2.8c-.9.9-2.3 1.1-3.5.6C9.7 18.6 5.4 14.3 3.2 8.3 2.7 7.1 2.9 5.7 3.8 4.8L6.6 2Z'/%3E%3C/svg%3E");
}
.icon-menu {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6h16v2H4V6Zm0 5h16v2H4v-2Zm0 5h16v2H4v-2Z'/%3E%3C/svg%3E");
}
.icon-building {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 21V3h10v4h6v14H4Zm2-2h2v-2H6v2Zm0-4h2v-2H6v2Zm0-4h2V9H6v2Zm0-4h2V5H6v2Zm4 12h2v-2h-2v2Zm0-4h2v-2h-2v2Zm0-4h2V9h-2v2Zm0-4h2V5h-2v2Zm4 12h4V9h-4v10Zm1-8h2v2h-2v-2Zm0 4h2v2h-2v-2Z'/%3E%3C/svg%3E");
}
.icon-camera {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8.4 5 10 3h4l1.6 2H20a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h4.4ZM4 7v11h16V7h-5.4L13 5h-2L9.4 7H4Zm8 2.5a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z'/%3E%3C/svg%3E");
}
.icon-clock {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm1 3v5.2l3.4 2-.9 1.7-4.5-2.7V7h2Z'/%3E%3C/svg%3E");
}
.icon-download {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 3h2v10.2l3.6-3.6L18 11l-6 6-6-6 1.4-1.4 3.6 3.6V3Zm-6 16h14v2H5v-2Z'/%3E%3C/svg%3E");
}
.icon-edit {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17.6 3.6a2 2 0 0 1 2.8 2.8L8.8 18H5v-3.8L17.6 3.6ZM7 15v1h1L19 5 18 4 7 15Zm-2 5h14v2H5v-2Z'/%3E%3C/svg%3E");
}

@media (max-width: 1280px) {
  .work-grid {
    grid-template-columns: minmax(270px, 330px) minmax(520px, 1fr) minmax(280px, 360px);
    grid-template-areas:
      "admin stage fleet"
      "tools stage fleet";
  }
  .left-rail {
    align-self: start;
  }
  .tablet-fleet {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 0;
  }
  .brand-block {
    width: 180px;
  }
  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
    padding: 0 14px 12px;
  }
  .kpi-grid,
  .work-grid,
  .admin-rail,
  .right-rail,
  .detail-grid,
  .split-detail,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .work-grid {
    grid-template-areas:
      "admin"
      "tools"
      "stage"
      "fleet";
  }
  .service-row {
    grid-template-columns: 1fr 1fr;
  }
  .service-row .wide {
    grid-column: 1 / -1;
  }
  .schedule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tablet-fleet {
    grid-template-columns: 1fr;
  }
	  .customer-browser-head,
	  .customer-browser-grid,
	  .customer-detail-grid,
	  .customer-directory-stats,
	  .customer-profile-grid,
	  .customer-detail-columns,
	  .delivery-workspace-grid,
	  .delivery-facts,
	  .delivery-proof-grid,
	  .note-card {
	    grid-template-columns: minmax(0, 1fr);
	  }
	  .customer-record-head,
	  .site-row {
	    grid-template-columns: minmax(0, 1fr);
	  }
	  .customer-caret {
	    display: none;
	  }
	  .customer-record-body {
	    padding: 0 12px 12px;
	  }
	  .customer-meta-pill,
	  .site-row-meta {
	    justify-self: start;
	  }
	  .workspace-metrics {
	    grid-template-columns: repeat(3, minmax(0, 1fr));
	  }
	  .customer-list {
	    max-height: 360px;
	  }
  .tablet-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .timeclock-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calendar-day {
    grid-template-columns: 90px minmax(0, 1fr);
  }
  .calendar-times {
    grid-column: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .calendar-times span {
    display: grid;
    gap: 2px;
    justify-content: initial;
  }
  .week-axis {
    grid-template-columns: 90px repeat(5, 1fr);
  }
  .organization-employee-row {
    grid-template-columns: 1fr;
  }
  .personnel-assignment-fields {
    grid-template-columns: 1fr;
  }
  .personnel-row-actions {
    justify-content: flex-start;
  }
  .organization-chart {
    padding: 12px;
  }
  .organization-diagram-switch {
    display: grid;
    width: 100%;
    border-radius: var(--radius);
  }
  .organization-diagram-switch button {
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
  }
  .org-scroll-hint {
    display: block;
  }
}

@media (max-width: 620px) {
  .app-shell,
  .tablet-content {
    padding: 10px;
  }
  .panel {
    padding: 14px;
  }
  .page-head,
  .section-head.compact {
    align-items: stretch;
    flex-direction: column;
  }
  .page-head > *,
  .section-head.compact > * {
    min-width: 0;
  }
  .page-head h2,
  .page-head p {
    overflow-wrap: anywhere;
  }
  .page-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }
  .page-actions > button,
  .page-actions > a,
  .page-actions .customer-search {
    width: 100%;
    min-width: 0;
  }
  .customer-record-body {
    padding-inline: 10px;
  }
  .employee-app-hours-panel {
    padding: 14px;
  }
  .employee-app-hours-head {
    display: none;
  }
  .employee-app-hours-row {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    gap: 10px;
    padding: 14px;
  }
  .worktime-file-button {
    width: 100%;
  }
  .editor-grid,
  .editor-grid.two,
  .editor-grid.three {
    grid-template-columns: minmax(0, 1fr);
  }
  .brand-block {
    width: 100%;
    border-right: 0;
    border-bottom: 8px solid var(--white);
  }
  .main-nav {
    padding: 8px 10px;
  }
  .kpi-grid {
    gap: 10px;
  }
	  .order-hero {
	    flex-direction: column;
	    min-height: auto;
	  }
	  .workspace-metrics {
	    grid-template-columns: 1fr;
	  }
	  .delivery-row {
	    grid-template-columns: 1fr;
	  }
	  .delivery-actions {
	    align-items: stretch;
	    flex-direction: column;
	  }
	  dl {
	    grid-template-columns: 1fr;
	  }
  .tablet-body {
    padding: 0;
    background: var(--white);
  }
  .tablet-frame {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .tablet-config,
  .footer-status,
  .photo-controls,
  .schedule-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
  .tablet-actions {
    grid-template-columns: 1fr;
  }
  .timeclock-hero-main,
  .timeclock-actions,
  .timeclock-metrics,
  .calendar-day {
    grid-template-columns: 1fr;
  }
  .timeclock-today {
    text-align: left;
  }
  .week-calendar-head {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .week-calendar-head > div {
    order: -1;
    width: 100%;
  }
  .week-nav-button {
    flex: 1;
  }
  .week-axis {
    display: none;
  }
  .calendar-times {
    grid-column: auto;
  }
  .tablet-history-card {
    grid-template-columns: 1fr;
  }
  .tablet-history-card > strong {
    white-space: normal;
  }
  .customer-section,
  .destination-section {
    padding-right: 18px;
  }
  .call-button,
  .route-button {
    position: static;
    margin-top: 10px;
  }
  .personnel-section-head,
  .personnel-management-row {
    align-items: stretch;
    flex-direction: column;
  }
}
