:root {
  color-scheme: light;
  --bg: #c6ccd3;
  --chrome: #d9dde2;
  --surface: #f7f7f7;
  --surface-2: #e9edf2;
  --ink: #15181c;
  --muted: #52606c;
  --line: #aab3bd;
  --line-strong: #778491;
  --teal: #1e5f8f;
  --green: #2f6f3a;
  --blue: #1f4f82;
  --gold: #9b6b18;
  --red: #a2382f;
  --soft-teal: #dcebf6;
  --soft-blue: #d8e4f1;
  --soft-gold: #f0e2bf;
  --soft-red: #eed5d3;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.78) inset, 0 1px 3px rgba(20, 28, 35, 0.18);
  --radius: 3px;
  --app-font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--app-font-family);
  font-size: 13px;
  line-height: 1.34;
}

button,
input,
select {
  font: inherit;
}

.currency-input-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  width: 100%;
}

.currency-input-shell.no-gap {
  gap: 0;
}

.currency-input-prefix {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-right: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 800;
}

.currency-input-shell input {
  min-width: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(360px, 500px) minmax(420px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 6px 12px;
  background: linear-gradient(#eef1f4, #cfd5dc);
  border-bottom: 1px solid #7d8792;
  box-shadow: 0 1px 0 #fff inset;
}

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

.brand-mark {
  flex: 0 0 auto;
  width: auto;
  height: 76px;
  background: transparent;
  border: 0;
  overflow: visible;
}

.brand-mark img {
  display: block;
  max-width: 92px;
  max-height: 100%;
  object-fit: contain;
  background: transparent;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 14px;
}

.brand p,
.muted {
  color: var(--muted);
}

.global-controls {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(190px, 1fr) minmax(220px, 1.2fr);
  gap: 10px;
}

label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 30px;
  padding: 5px 7px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(31, 79, 130, 0.22);
}

.readonly-field,
input[readonly] {
  color: #27313a;
  background: #e5e9ee;
  border-color: #9ea8b3;
}

.user-panel {
  min-width: 220px;
}

.user-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.layout {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  min-height: calc(100vh - 89px);
}

.sidebar {
  position: sticky;
  top: 89px;
  align-self: start;
  height: calc(100vh - 89px);
  padding: 10px 8px;
  overflow-y: auto;
  background: linear-gradient(90deg, #d3d8de, #c4cbd2);
  border-right: 1px solid #7d8792;
}

.nav-button,
.ghost-button,
.solid-button,
.chip-button {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
}

.nav-button {
  width: 100%;
  margin-bottom: 4px;
  padding: 7px 8px;
  color: #1e2b36;
  background: #e5e9ed;
  border-color: #a5aeb8;
  text-align: left;
  box-shadow: 0 1px 0 #fff inset;
}

.nav-button.is-active {
  color: #fff;
  background: linear-gradient(#2f6f9e, #1f4f82);
  border-color: #153c61;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.solid-button {
  padding: 6px 10px;
  color: #fff;
  background: linear-gradient(#2f6f9e, #1e527e);
  border-color: #163f63;
}

.ghost-button,
.chip-button {
  padding: 6px 10px;
  color: var(--ink);
  background: linear-gradient(#ffffff, #dfe4e9);
  border-color: var(--line);
  box-shadow: 0 1px 0 #fff inset;
}

.chip-button.is-active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.link-button {
  border: 0;
  background: transparent;
  color: #1f5f9f;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
  text-align: left;
}

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

.content {
  min-width: 0;
  padding: 12px 14px 28px;
}

.view-head,
.panel-head,
.actions,
.chip-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.view-head,
.panel-head {
  justify-content: space-between;
}

.view-head {
  margin-bottom: 8px;
  padding: 5px 8px;
  color: #fff;
  background: linear-gradient(#2f6f9e, #1f4f82);
  border: 1px solid #143b60;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.view-head h2 {
  font-size: 15px;
  line-height: 1.15;
}

.view-head p {
  font-size: 11px;
  line-height: 1.2;
}

.view-head .muted {
  color: #dceaf5;
}

.actions,
.chip-row {
  flex-wrap: wrap;
}

.report-menu {
  position: relative;
  flex: 0 0 auto;
}

.report-menu-trigger {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: #fff;
  background: linear-gradient(#285d8c, #173f65);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.report-menu-trigger::-webkit-details-marker {
  display: none;
}

.report-menu-panel {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 280px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(20, 28, 35, 0.22);
}

.report-menu-heading {
  padding: 5px 7px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-menu-item {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 36px;
  padding: 7px 8px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  text-align: left;
}

.report-menu-item:hover:not(:disabled),
.report-menu-item:focus-visible {
  background: var(--surface-2);
}

.report-menu-item span {
  font-weight: 900;
}

.report-menu-item small {
  color: var(--muted);
}

.template-builder-preview {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-soft);
}

.builder-preview-head {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 12px;
  align-items: center;
  border-bottom: 4px solid var(--primary);
  padding-bottom: 10px;
}

.builder-preview-head img {
  max-width: 82px;
  max-height: 64px;
  object-fit: contain;
  background: transparent;
}

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

.builder-preview-grid > div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: var(--panel);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

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

.kpi {
  min-height: 76px;
  padding: 9px 10px;
}

.kpi .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi .value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 900;
}

.kpi .note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.panel-head {
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}

h4 {
  margin: 16px 0 8px;
  font-size: 0.92rem;
}

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

.grid-2.wide-left {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
}

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

.module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 10px;
  align-items: start;
}

.jobbook-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.jobbook-list {
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 94px);
  overflow: auto;
}

.job-results {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.job-result {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 7px 8px;
  color: var(--ink);
  background: linear-gradient(#ffffff, #e3e7ec);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.job-result.is-active {
  color: #fff;
  background: linear-gradient(#2f6f9e, #1f4f82);
  border-color: #153c61;
}

.job-result.is-active .muted {
  color: #dceaf5;
}

.tab-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  min-height: 30px;
  padding: 6px 9px;
  color: var(--ink);
  background: linear-gradient(#ffffff, #dfe4e9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
}

.tab-button.is-active {
  color: #fff;
  background: linear-gradient(#2f6f9e, #1f4f82);
  border-color: #153c61;
}

.tab-panel {
  min-height: 300px;
}

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

.resource-card {
  display: grid;
  gap: 4px;
  min-height: 86px;
}

.resource-card .label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.resource-card .value {
  font-size: 20px;
  font-weight: 900;
}

.admin-stack {
  display: grid;
  gap: 12px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.whatsapp-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.whatsapp-sidebar,
.whatsapp-chat-panel {
  min-height: 64vh;
}

.whatsapp-contact,
.whatsapp-thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
}

.whatsapp-bot-card {
  margin-bottom: 10px;
  border-color: #2a75bb;
  background: #edf5ff;
}

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

.whatsapp-thread.is-active {
  border-color: #1d7d4d;
  background: #e2f2e8;
}

.whatsapp-thread-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.whatsapp-messages {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 46vh;
  max-height: 58vh;
  overflow: auto;
  padding: 8px;
  background: #eef3ef;
  border: 1px solid var(--line);
}

.whatsapp-message {
  max-width: min(680px, 86%);
  background: transparent;
  border: 0;
}

.whatsapp-message-row,
.messenger-contact-main {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: flex-start;
}

.messenger-contact-main {
  align-items: center;
}

.messenger-avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
}

.messenger-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f3a5f;
  background: #dcebf7;
  font-size: 12px;
  font-weight: 900;
}

.whatsapp-message-bubble {
  min-width: 0;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #cad4cd;
  border-radius: 7px;
}

.whatsapp-message.is-own {
  justify-self: end;
}

.whatsapp-message.is-own .whatsapp-message-row {
  flex-direction: row-reverse;
}

.whatsapp-message.is-own .whatsapp-message-bubble {
  background: #d9f5cf;
}

.whatsapp-message.is-target {
  border-color: #0b74e5;
  box-shadow: 0 0 0 3px rgba(11, 116, 229, 0.18);
}

.whatsapp-message p {
  margin: 4px 0;
}

.messenger-sender-name {
  display: inline-block;
  margin-bottom: 2px;
}

.whatsapp-audio {
  display: block;
  width: min(320px, 100%);
  margin: 6px 0 2px;
}

.message-read-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.message-read-receipt {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  background: #c01624;
  border: 0;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.message-read-list {
  display: inline-flex;
  max-width: min(260px, 54vw);
  padding: 3px 7px;
  color: #7a121b;
  background: #fff1f2;
  border: 1px solid #efb0b7;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: normal;
}

.whatsapp-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-top: 10px;
  align-items: end;
}

.whatsapp-recording-controls {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.messenger-new-message-dot {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: inline-flex;
  min-width: 76px;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: #fff;
  background: #0b74e5;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(11, 116, 229, 0.34);
  font-weight: 900;
  cursor: pointer;
}

.messenger-new-message-dot:hover,
.messenger-new-message-dot:focus-visible {
  background: #075db8;
  outline: 3px solid rgba(11, 116, 229, 0.24);
  outline-offset: 2px;
}

.crew-whatsapp-panel {
  margin-bottom: 10px;
}

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

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

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

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: linear-gradient(#f5f7f9, #dfe4e9);
  font-size: 11px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: var(--soft-teal);
}

.status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 6px;
  border-radius: 2px;
  background: var(--soft-blue);
  color: #17446f;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(31, 79, 130, 0.22);
}

.status.ok {
  color: #1f5d24;
  background: #dff0dd;
}

.status.warn {
  color: #7a5317;
  background: var(--soft-gold);
}

.status.bad {
  color: #8a2e23;
  background: var(--soft-red);
}

.status.dark {
  color: #fff;
  background: var(--ink);
}

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

.board-col {
  min-width: 0;
}

.card-list {
  display: grid;
  gap: 7px;
}

.record-card {
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 #fff inset;
}

.record-card.is-hot {
  border-color: #d29a8d;
  background: var(--soft-red);
}

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

.field-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.migration-progress {
  position: relative;
  height: 24px;
  margin-top: 12px;
  overflow: hidden;
  background: #dfe5eb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 #fff inset;
}

.migration-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--green));
  transition: width 180ms ease;
}

.migration-progress span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.migration-process {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.equipment-list-edit,
.equipment-list-create,
.equipment-add-grid {
  margin-top: 10px;
}

.equipment-list-panel {
  margin-top: 10px;
  margin-bottom: 10px;
}

.equipment-list-tabs {
  margin-top: 8px;
}

.equipment-list-workspace .equipment-lines-wrap {
  margin-top: 10px;
}

.equipment-paste-actions {
  margin-top: 8px;
}

.pop-stock-window {
  margin-top: 10px;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.pop-stock-title {
  min-height: 32px;
  padding: 7px 10px;
  color: #fff;
  background: linear-gradient(#2f6f9e, #1f4f82);
  border-bottom: 1px solid #153c61;
  font-size: 13px;
  font-weight: 900;
}

.pop-stock-title span {
  font-weight: 700;
}

.pop-stock-tabs,
.pop-stock-categories {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 8px 10px 0;
  border-bottom: 1px solid var(--line);
}

.pop-stock-categories {
  align-items: stretch;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  overflow-x: auto;
}

.pop-tab,
.pop-category {
  min-height: 28px;
  padding: 5px 9px;
  color: var(--ink);
  background: linear-gradient(#ffffff, #dfe4e9);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.pop-category {
  min-height: 28px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
}

.pop-tab.is-active,
.pop-category.is-active {
  color: #fff;
  background: linear-gradient(#2f6f9e, #1f4f82);
  border-color: #153c61;
  box-shadow: var(--shadow);
}

.pop-stock-toolbar {
  display: grid;
  grid-template-columns: minmax(52px, 72px) minmax(44px, 58px) minmax(220px, 1fr) auto minmax(210px, 280px) 34px 34px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.pop-stock-toolbar input,
.pop-stock-toolbar select {
  min-height: 30px;
  padding: 5px 7px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
}

.pop-code-slot {
  background: #e5e9ee !important;
}

.pop-check {
  display: flex;
  grid-auto-flow: column;
  grid-template-columns: auto auto;
  gap: 4px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pop-check input {
  width: 14px;
  min-height: 14px;
  padding: 0;
}

.pop-accept,
.pop-reject {
  display: grid;
  width: 30px;
  min-height: 26px;
  place-items: center;
  padding: 0;
  background: linear-gradient(#ffffff, #dfe4e9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 18px;
  font-weight: 900;
}

.pop-accept {
  color: #008000;
}

.pop-reject {
  color: #b00000;
}

.pop-stock-grid {
  max-height: 360px;
  overflow: auto;
  background: var(--surface);
  border: 0;
  border-top: 0;
}

.pop-stock-grid table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 12px;
}

.pop-stock-grid th,
.pop-stock-grid td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
}

.pop-stock-grid th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(#edf1f5, #dce3ea);
  color: #2a333c;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pop-stock-grid tbody tr {
  cursor: default;
}

.pop-stock-grid tbody tr:hover {
  background: var(--soft-blue);
}

.pop-stock-grid tbody tr.is-selected {
  background: #1f4f82;
  color: #fff;
}

.pop-stock-grid tbody tr.is-selected td {
  color: #fff;
}

.stock-picker-indicator {
  width: 18px;
  text-align: center;
  font-weight: 900;
}

.number-cell {
  text-align: right;
}

.lockable-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.lockable-section:disabled {
  opacity: 0.72;
}

.locked-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 10px;
  padding: 7px 8px;
  background: var(--soft-gold);
  border: 1px solid #c6a45b;
  border-radius: var(--radius);
}

.schedule-shell {
  display: grid;
  gap: 10px;
}

.schedule-form {
  grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(110px, 0.5fr) minmax(220px, 1.5fr) minmax(120px, 0.6fr);
}

.hot-job-open {
  cursor: zoom-in;
}

.stack-actions {
  display: grid;
  gap: 5px;
  min-width: 76px;
}

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

.auth-shell {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: center;
}

.auth-card {
  width: min(460px, 100%);
  padding: 14px;
}

.demo-logins,
.login-note {
  display: grid;
  gap: 2px;
}

.demo-logins {
  margin-top: 14px;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
}

.wide-field {
  grid-column: span 2;
}

.admin-editor,
.workflow-panel {
  margin-bottom: 10px;
}

.address-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.crew-schedule-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  gap: 10px;
  align-items: start;
}

.address-edit-actions {
  margin-top: 10px;
}

.address-toolbar input {
  flex: 1 1 260px;
  min-width: 220px;
}

.admin-user-editor {
  margin-top: 10px;
  padding: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.permission-grid {
  max-height: 300px;
}

.checkbox-tile {
  display: flex;
  min-height: 28px;
  gap: 7px;
  align-items: center;
  padding: 5px 7px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
}

.checkbox-tile input {
  width: auto;
  min-height: 0;
}

.rider-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.32fr) minmax(620px, 1fr);
  gap: 10px;
  align-items: start;
}

.rider-card-list {
  margin-top: 10px;
}

.rider-editor-panel {
  overflow: hidden;
}

.rider-sheet {
  --rider-primary: var(--blue);
  --rider-accent: var(--green);
  --rider-soft: var(--soft-blue);
  color: #000;
  background: #fff;
  border: 1px solid #111;
  box-shadow: var(--shadow);
}

.rider-header {
  display: grid;
  grid-template-columns: 160px minmax(220px, 0.8fr) minmax(360px, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-top: 4px solid #111;
}

.rider-logo {
  display: grid;
  min-height: 152px;
  place-items: start center;
}

.rider-logo img {
  max-width: 140px;
  max-height: 150px;
  object-fit: contain;
}

.rider-title {
  display: grid;
  gap: 6px;
  align-self: start;
  padding-top: 4px;
}

.rider-title input {
  min-height: 38px;
  color: #000;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rider-title span {
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.rider-meta {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(190px, 1fr);
  align-items: stretch;
}

.rider-meta label {
  display: contents;
}

.rider-meta label > span {
  display: grid;
  align-items: center;
  justify-items: end;
  min-height: 28px;
  padding: 3px 6px;
  color: #000;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid #111;
  border-right: 0;
  border-bottom: 0;
}

.rider-meta label > input,
.rider-meta .inline-fields {
  min-height: 28px;
  border-radius: 0;
  border-color: #111;
  border-bottom: 0;
}

.rider-meta label:nth-last-child(1) > span,
.rider-meta label:nth-last-child(1) > input {
  border-bottom: 1px solid #111;
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.inline-fields input {
  border: 0;
  border-right: 1px solid #111;
  border-radius: 0;
}

.inline-fields input:last-child {
  border-right: 0;
}

.rider-table-wrap {
  border: 0;
  border-radius: 0;
}

.rider-table {
  min-width: 860px;
  color: #000;
  font-size: 13px;
}

.rider-table th,
.rider-table td {
  padding: 3px;
  border: 1px solid #111;
  vertical-align: top;
}

.rider-table th {
  text-align: center;
  font-style: italic;
}

.rider-table input,
.rider-table textarea {
  min-height: 28px;
  color: #000;
  background: #fff;
  border-color: #c4c9cf;
  border-radius: 0;
}

.rider-table textarea {
  resize: vertical;
}

.requested-head {
  color: #000;
  background: var(--rider-accent);
  font-style: normal !important;
  text-transform: uppercase;
}

.supplied-head {
  color: #000;
  background: #9cc4e3;
  font-style: normal !important;
  text-transform: uppercase;
}

.availability-head,
.rider-table th:last-child {
  color: #000;
  background: #ff5555;
}

.rider-section-row td {
  padding: 0;
  background: #000;
}

.rider-section-row input {
  color: #fff;
  background: #000;
  border: 0;
  font-weight: 900;
  text-align: center;
}

.rider-availability-cell {
  display: grid;
  gap: 4px;
}

.upload-preview {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(120px, 1fr) minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
}

.upload-preview img {
  max-width: 150px;
  max-height: 86px;
  object-fit: contain;
  background: transparent;
  border: 1px solid var(--line);
}

.danger-button {
  color: #7a201a;
}

button[hidden] {
  display: none;
}

.gantt,
.crew-gantt {
  display: grid;
  gap: 6px;
}

.crew-filter-panel {
  margin-bottom: 10px;
}

.crew-filter-bar {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(280px, 1fr);
  gap: 10px;
}

.crew-sheet-head,
.crew-sheet-filters,
.crew-match-card {
  display: grid;
  grid-template-columns: minmax(110px, 0.65fr) minmax(120px, 0.75fr) minmax(260px, 1.6fr);
}

.crew-sheet-head {
  min-width: 560px;
  color: #000;
  background: #fff;
  border: 1px solid #111;
  border-bottom: 0;
  font-size: 18px;
  font-weight: 900;
  text-decoration: underline;
}

.crew-sheet-head span,
.crew-sheet-filters span {
  min-height: 32px;
  padding: 4px 5px;
  border-right: 1px solid #111;
}

.crew-sheet-head span:last-child,
.crew-sheet-filters span:last-child {
  border-right: 0;
}

.crew-sheet-filters {
  min-width: 560px;
  height: 22px;
  background: #f0f2f4;
  border: 1px solid #111;
}

.crew-sheet-filters span::after {
  float: right;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: #65717c;
  content: "\25BE";
  font-size: 9px;
  line-height: 14px;
  text-align: center;
  background: #fff;
  border: 1px solid #9ba5af;
}

.crew-match-list {
  display: grid;
  gap: 0;
  overflow: auto;
}

.crew-match-card {
  min-width: 560px;
  padding: 0;
  color: #000;
  background: #fff;
  border: 1px solid #111;
  border-top: 0;
  text-align: left;
}

.crew-match-card > span {
  min-height: 52px;
  padding: 5px;
  border-right: 1px solid #111;
}

.crew-match-card > span:last-child {
  border-right: 0;
}

.crew-match-card.is-available {
  background: #f6f7f8;
}

.crew-role {
  font-weight: 800;
}

.crew-chart-panel,
.transport-schedule-panel {
  margin-bottom: 10px;
}

.crew-chart-wrap {
  max-height: 68vh;
}

.crew-chart-table {
  min-width: 1280px;
}

.crew-chart-table th {
  background: linear-gradient(#edf1f5, #dce3ea);
  color: #2a333c;
}

.crew-role-col,
.crew-name-col {
  min-width: 150px;
  background: var(--surface-2) !important;
}

.crew-day-cell {
  width: 155px;
  min-width: 155px;
  padding: 6px;
  vertical-align: top;
}

.crew-day-cell select,
.crew-day-cell input {
  min-height: 26px;
  margin-bottom: 4px;
  padding: 3px 5px;
  font-size: 12px;
}

.crew-day-cell input[readonly] {
  background: #eef3f8;
  color: var(--muted);
}

.crew-rate-comparison {
  display: grid;
  gap: 2px;
  margin: 2px 0 5px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-size: 11px;
  line-height: 1.25;
}

.crew-day-cell.is-open {
  background: #f8fafc;
}

.crew-day-cell.is-booked {
  background: var(--soft-blue);
}

.crew-booking {
  display: grid;
  gap: 4px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 #fff inset;
}

.format-preview,
.stationery-preview-card {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.stationery-preview-card img {
  max-width: 180px;
  max-height: 110px;
  object-fit: contain;
  background: transparent;
}

.admin-template-tabs {
  margin-bottom: 10px;
}

.transport-manager-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.transport-schedule-dock {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  position: sticky;
  top: 89px;
  z-index: 12;
}

.transport-blue-header {
  align-items: center;
  background: #0b3a78;
  color: white;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 10px;
}

.transport-blue-header strong {
  display: block;
  font-size: 16px;
  line-height: 1.15;
}

.transport-blue-header span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.transport-blue-header .checkbox-tile {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
}

.transport-manager-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  padding: 8px;
}

.transport-manager-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.transport-manager-grid.compact .transport-manager-card {
  gap: 4px;
  padding: 6px;
}

.transport-manager-grid.compact .transport-manager-card label span,
.transport-manager-grid.compact .manager-phone {
  font-size: 12px;
}

.manager-phone {
  color: var(--blue);
  font-weight: 900;
  text-decoration: underline;
}

.transport-gps-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(320px, 0.9fr);
  gap: 10px;
  align-items: start;
}

.driver-nav-panel {
  overflow: hidden;
}

.driver-nav-hero {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-link-button {
  display: inline-grid;
  min-width: 142px;
  place-items: center;
  text-decoration: none;
}

.driver-map {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.38) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.38) 1px, transparent 1px),
    linear-gradient(135deg, #dcebf6, #e9edf2);
  background-size: 42px 42px, 42px 42px, auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.map-road {
  position: absolute;
  background: #53616d;
  border: 4px solid #f7f7f7;
  box-shadow: 0 0 0 1px #8e99a4;
}

.map-road-main {
  left: 7%;
  top: 50%;
  width: 86%;
  height: 28px;
  transform: rotate(-12deg);
}

.map-road-side {
  left: 46%;
  top: 18%;
  width: 28px;
  height: 70%;
  transform: rotate(22deg);
}

.map-pin,
.map-vehicle {
  position: absolute;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.map-pin {
  width: 34px;
  height: 34px;
  background: var(--red);
}

.map-origin {
  left: 13%;
  top: 56%;
}

.map-destination {
  right: 13%;
  top: 34%;
  background: var(--green);
}

.map-vehicle {
  left: 48%;
  top: 48%;
  width: 64px;
  height: 28px;
  background: var(--blue);
  border-radius: var(--radius);
  font-size: 11px;
}

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

.route-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.route-step-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
  font-weight: 900;
}

.driver-trip-list {
  display: grid;
  gap: 8px;
  max-height: 70vh;
  overflow: auto;
}

.driver-trip-card {
  display: grid;
  gap: 6px;
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 #fff inset;
}

.driver-trip-card.is-active {
  border-color: #245b88;
  background: var(--soft-blue);
}

.gantt-row {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.gantt-date {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.gantt-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  background: #e1e5ea;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.gantt-track i {
  position: absolute;
  top: 2px;
  bottom: 2px;
  display: block;
  background: linear-gradient(#4e86b4, #245b88);
  border: 1px solid #174567;
  border-radius: 2px;
}

.transport-sheet {
  background: #fff;
  border: 1px solid #000;
  box-shadow: var(--shadow);
}

.transport-banner {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  min-height: 118px;
  color: #fff;
  background: #082c68;
  border-bottom: 1px solid #000;
}

.transport-banner img {
  width: 76px;
  height: 106px;
  margin-left: 65px;
  object-fit: contain;
  background: transparent;
}

.transport-banner h2 {
  justify-self: center;
  color: #fff;
  font-size: 26px;
  text-decoration: underline;
}

.transport-contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.85fr 1.15fr 0.85fr 0.85fr;
  border-bottom: 1px solid #000;
}

.contact-label,
.contact-value {
  min-height: 40px;
  padding: 4px 6px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  font-weight: 800;
}

.contact-label {
  display: grid;
  align-items: center;
  justify-items: end;
  color: #fff;
  background: #082c68;
  text-decoration: underline;
}

.contact-value {
  display: grid;
  align-items: center;
  justify-items: center;
  color: #000;
  background: #99d4df;
  white-space: pre-line;
  text-align: center;
}

.transport-table-wrap {
  border: 0;
  border-radius: 0;
}

.transport-sheet-table {
  min-width: 920px;
  color: #000;
  font-size: 14px;
}

.transport-sheet-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #fff;
  background: #082c68;
  border: 1px solid #000;
  text-align: center;
  text-decoration: underline;
}

.transport-sheet-table th::after {
  float: right;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: #65717c;
  content: "\25BE";
  font-size: 9px;
  line-height: 14px;
  text-align: center;
  background: #fff;
  border: 1px solid #9ba5af;
}

.transport-sheet-table td {
  min-height: 74px;
  padding: 6px 4px;
  background: #fff;
  border: 1px solid #000;
  text-align: center;
  vertical-align: middle;
}

.transport-sheet-table td:last-child {
  text-align: left;
  white-space: normal;
}

.transport-time {
  font-weight: 900;
}

.transport-vehicle-cell {
  background: #e3b6f4 !important;
  font-weight: 900;
  white-space: pre-line;
}

.transport-alert-row td {
  background: #ffc400;
  font-weight: 900;
}

.strong {
  font-weight: 900;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 10px 12px;
  color: #fff;
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .topbar,
  .layout,
  .module-grid,
  .jobbook-layout,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .jobbook-list {
    position: static;
    max-height: none;
  }

  .sidebar {
    position: sticky;
    top: 154px;
    display: flex;
    height: auto;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 14px;
    background: var(--bg);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .transport-schedule-dock {
    top: 154px;
  }

  .nav-button {
    flex: 0 0 auto;
    width: auto;
    margin-bottom: 0;
  }

  .global-controls,
  .kpi-grid,
  .board,
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .address-workspace,
  .crew-schedule-layout,
  .crew-filter-bar,
  .transport-manager-grid,
  .transport-gps-layout,
  .rider-layout,
  .route-step-grid {
    grid-template-columns: 1fr;
  }

  .pop-stock-toolbar {
    grid-template-columns: minmax(52px, 72px) minmax(44px, 58px) minmax(220px, 1fr) auto 32px 32px;
  }

  .pop-warehouse {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .topbar,
  .content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    position: static;
    gap: 10px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    height: 52px;
  }

  .brand-mark img {
    max-width: 66px;
  }

  .layout {
    min-height: auto;
  }

  .sidebar {
    top: 0;
    z-index: 4;
    padding: 8px 10px;
  }

  .transport-schedule-dock {
    top: 0;
  }

  .nav-button,
  .ghost-button,
  .solid-button,
  .chip-button,
  .tab-button,
  input,
  select {
    min-height: 44px;
  }

  .nav-button,
  .tab-button {
    padding: 10px 12px;
  }

  .user-panel {
    min-width: 0;
  }

  .user-chip {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

  .global-controls,
  .kpi-grid,
  .board,
  .whatsapp-layout,
  .form-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .whatsapp-compose,
  .whatsapp-contact {
    grid-template-columns: 1fr;
  }

  .whatsapp-layout {
    gap: 0;
  }

  .whatsapp-sidebar {
    min-height: 0;
    max-height: 32dvh;
    overflow: auto;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    -webkit-overflow-scrolling: touch;
  }

  .whatsapp-contact-list {
    display: none;
  }

  .whatsapp-thread-list {
    gap: 6px;
  }

  .whatsapp-thread {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px;
    border-radius: 0;
  }

  .whatsapp-chat-panel {
    display: flex;
    flex-direction: column;
    min-height: 68dvh;
    height: calc(100dvh - 190px);
    overflow: hidden;
    padding: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .whatsapp-chat-panel > .panel-head {
    position: sticky;
    top: 0;
    z-index: 2;
    flex: 0 0 auto;
    padding: 10px 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .whatsapp-chat-panel > .panel-head .actions {
    justify-content: flex-end;
  }

  .whatsapp-chat-panel > .panel-head .muted {
    display: none;
  }

  .whatsapp-messages {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 12px 10px;
    border: 0;
    border-radius: 0;
    background:
      linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
      #dfe9df;
    -webkit-overflow-scrolling: touch;
  }

  .whatsapp-message {
    max-width: 82%;
    border: 0;
  }

  .whatsapp-message-bubble {
    padding: 8px 10px;
    border: 0;
    border-radius: 14px 14px 14px 4px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  }

  .whatsapp-message.is-own .whatsapp-message-bubble {
    border-radius: 14px 14px 4px 14px;
  }

  .whatsapp-message-row {
    gap: 6px;
  }

  .whatsapp-message .messenger-avatar {
    width: 28px;
    height: 28px;
  }

  .messenger-sender-name {
    display: inline-block;
    margin-bottom: 1px;
    font-size: 11px;
  }

  .whatsapp-message-bubble > .muted {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 3px;
    font-size: 10px;
  }

  .whatsapp-audio {
    width: min(250px, 72vw);
  }

  .message-read-wrap {
    margin-left: 4px;
  }

  .message-read-receipt {
    width: 17px;
    height: 17px;
    font-size: 10px;
  }

  .message-read-list {
    position: absolute;
    right: 8px;
    bottom: 34px;
    max-width: 72vw;
    border-radius: 10px;
  }

  .whatsapp-compose {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
    flex: 0 0 auto;
    margin-top: 0;
    padding: 8px;
    background: #f8fafc;
    border-top: 1px solid var(--line);
  }

  .whatsapp-compose textarea {
    min-height: 44px;
    max-height: 96px;
    resize: none;
    border-radius: 999px;
    padding: 11px 14px;
  }

  .whatsapp-recording-controls {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .help-tab-row,
  .tab-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    flex: 0 0 auto;
  }

  .wide-field {
    grid-column: auto;
  }

  .view-head,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .transport-banner {
    grid-template-columns: 80px 1fr;
    min-height: 92px;
  }

  .transport-banner img {
    width: 58px;
    height: 78px;
    margin-left: 10px;
  }

  .transport-banner h2 {
    font-size: 18px;
    text-align: center;
  }

  .transport-contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rider-header,
  .rider-meta {
    grid-template-columns: 1fr;
  }

  .rider-meta label > span {
    justify-items: start;
    border-right: 1px solid #111;
  }

  .rider-title input {
    font-size: 20px;
  }

  .contact-label {
    justify-items: start;
  }

  .pop-stock-toolbar {
    grid-template-columns: 60px 56px 1fr 32px 32px;
  }

  .pop-search,
  .pop-check,
  .pop-warehouse {
    grid-column: 1 / -1;
  }

  table {
    min-width: 680px;
  }
}

.stock-thumb {
  align-items: center;
  background: #e9eef5;
  border: 1px solid #bcc8d6;
  border-radius: 6px;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  object-fit: cover;
  overflow: hidden;
  width: 64px;
}

.stock-thumb-placeholder {
  color: #17395f;
  font-weight: 800;
}

.autosize-textarea {
  line-height: 1.35;
  min-height: 44px;
  resize: vertical;
  white-space: pre-wrap;
  width: 100%;
}

.transport-filter-row {
  gap: 10px;
  margin: 10px 0;
}

.risk-signal-card summary {
  cursor: pointer;
  list-style-position: inside;
}

.risk-signal-detail {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.transport-date-filters,
.transport-status-filters {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.transport-filter-line {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.transport-description-input {
  min-width: 280px;
}

.checkbox-tile.compact {
  min-height: 38px;
  padding: 7px 10px;
}

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

.modal-backdrop {
  align-items: center;
  background: rgba(7, 20, 35, 0.32);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 1000;
}

.modal-card {
  background: color-mix(in srgb, var(--panel) 96%, white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 18px;
  width: min(1080px, 100%);
}

.quote-review-modal h4 {
  margin: 0 0 10px;
}

.modal-actions {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.readonly-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.inline-file {
  display: inline-grid;
  gap: 4px;
  min-width: 220px;
}

.equipment-lines-wrap td:nth-child(n+5),
.equipment-lines-wrap input,
.nowrap-input {
  white-space: nowrap;
}

.terms-box {
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.quote-terms {
  margin-top: 12px;
}
