@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins/Poppins-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins/Poppins-ExtraBold.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins/Poppins-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins/Poppins-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins/Poppins-SemiBoldItalic.ttf") format("truetype");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree/Figtree-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree/Figtree-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree/Figtree-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #5868fe;
  --primary-dark: #4352e6;
  --primary-soft: #eeeeff;
  --brand-black: #231f20;
  --ink: #445675;
  --muted: #536079;
  --line: #e4e8f0;
  --panel: #ffffff;
  --page: #f7f7f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-weight: 300;
  letter-spacing: 0;
}

body:has(.modal-backdrop:not(.hidden)) {
  overflow: hidden;
}

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

strong {
  font-weight: 600;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
}

.aura {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
  opacity: 0.78;
}

.aura-blue {
  top: -185px;
  left: -205px;
  background: radial-gradient(circle, #f2f3f5 0, #f7f8fa 58%, rgba(255, 255, 255, 0) 70%);
}

.aura-warm {
  right: -190px;
  bottom: -225px;
  background: radial-gradient(circle, #eeefff 0, #f7f8ff 56%, rgba(255, 255, 255, 0) 70%);
}

.login-card {
  width: min(420px, calc(100vw - 32px));
  padding: 30px 28px 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.12);
}

.brand-kicker {
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  letter-spacing: 5px;
  margin-bottom: 6px;
}

.wordmark {
  margin: 0 0 20px;
  text-align: center;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.wordmark-dark {
  color: var(--brand-black);
}

.wordmark-red {
  color: var(--primary);
}

.wordmark small {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 4px;
}

.input-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  height: 40px;
  margin-bottom: 14px;
  padding: 0 12px;
  border: 1px solid #d8dde7;
  border-radius: 8px;
  background: #fafafa;
  color: #747b89;
}

.input-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: #f0f2f5;
  color: var(--ink);
  padding: 4px 8px;
}

.primary-button,
.primary-link,
.button-small,
.icon-button {
  border: 0;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  height: 40px;
  border-radius: 7px;
  margin-top: 6px;
}

.primary-button.compact {
  width: auto;
  min-width: 120px;
  padding: 0 18px;
}

.login-card p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-card .login-step-label {
  margin: -4px 0 14px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 298px 1fr;
  background: var(--page);
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 23px 17px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 0 8px;
  color: var(--ink);
  text-decoration: none;
  min-height: 56px;
}

.sidebar-brand-badge,
.brand-mark,
.avatar {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

.brand-mark {
  width: 178px;
  height: auto;
  object-fit: contain;
  background: transparent;
}

.sidebar-brand-logo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.sidebar-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.sidebar-nav-primary,
.sidebar-nav-secondary {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-nav-secondary {
  margin-top: auto;
  padding-top: 18px;
}

.sidebar-brand-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 13px;
  letter-spacing: 1.6px;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-wordmark {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.sidebar-brand-text small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 41px;
  margin: 0 4px;
  padding: 0 14px 0 12px;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}

.nav-link span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 18px;
  line-height: 1;
}

.nav-link span i {
  display: block;
  width: 18px;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.nav-link.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-link.active::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 4px;
  border-radius: 999px;
  background: var(--primary);
}

.workspace {
  min-width: 0;
}

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.search {
  width: 360px;
  max-width: 46vw;
  height: 38px;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: #f7f7f8;
  color: #6d778d;
}

.search input {
  border: 0;
  outline: 0;
  background: transparent;
  color: #8792a8;
}

.global-search {
  position: relative;
  z-index: 80;
}

.global-search span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.global-search input {
  width: 100%;
  font-size: 15px;
}

.global-search input::placeholder {
  color: #a9b3c4;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(760px, calc(100vw - 48px));
  max-height: min(68vh, 620px);
  overflow: auto;
  padding: 8px;
  border: 1px solid #d7e1f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(20, 32, 70, 0.18);
}

.global-search-results.hidden {
  display: none;
}

.global-search-group + .global-search-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #edf1f8;
}

.global-search-group h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 3px;
  color: #445675;
  font-size: 13px;
  font-weight: 600;
}

.global-search-group h3 span {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.global-search-item {
  display: grid;
  grid-template-columns: minmax(130px, 1.1fr) minmax(112px, 0.8fr) minmax(220px, 2fr);
  align-items: center;
  gap: 14px;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 6px;
  color: #0b1530;
  text-decoration: none;
}

.global-search-item:hover,
.global-search-item:focus {
  background: #f4f7ff;
  outline: 0;
}

.global-search-item strong,
.global-search-item em,
.global-search-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-item strong {
  color: var(--primary);
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}

.global-search-item em {
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}

.global-search-item span {
  color: #445675;
  font-size: 12px;
}

.global-search-empty {
  padding: 16px;
  color: #697894;
  font-size: 14px;
  text-align: center;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.profile .topbar-wallet {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid #d7e2f4;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--ink);
  cursor: pointer;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(20, 32, 70, 0.06);
}

.profile .topbar-wallet i {
  color: var(--primary);
}

.profile .topbar-wallet span {
  font-size: 13px;
  font-weight: 500;
}

.profile .topbar-wallet strong {
  font-size: 14px;
}

body.wallet-modal-open {
  overflow: hidden;
}

.wallet-modal-card {
  width: min(920px, calc(100vw - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8e2f4;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(11, 21, 58, 0.28);
}

.wallet-modal-card .modal-title {
  padding: 24px 28px 0;
}

.wallet-modal-card .modal-title h2 {
  color: var(--ink);
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 28px;
  font-weight: 700;
}

.wallet-modal-body {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 20px;
  padding: 24px 28px 28px;
}

.wallet-balance-panel,
.wallet-topup-panel,
.wallet-history-panel {
  border: 1px solid #dce6f5;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.wallet-balance-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px;
  background: linear-gradient(145deg, #edf4ff 0%, #ffffff 72%);
}

.wallet-balance-panel span,
.wallet-topup-panel h3,
.wallet-history-title h3 {
  color: var(--ink);
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.wallet-balance-panel strong {
  color: var(--ink);
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.wallet-balance-panel p {
  margin: 0;
  color: #61718d;
  font-size: 14px;
  line-height: 1.6;
}

.wallet-topup-panel,
.wallet-history-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
}

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

.wallet-topup-form .channel-money-input input {
  width: 100%;
  background: transparent;
}

.wallet-history-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wallet-history-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #3566ff;
  font-size: 13px;
  font-weight: 600;
}

.wallet-history-list {
  display: grid;
  gap: 12px;
}

.wallet-history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #e3ebf8;
  border-radius: 16px;
  background: #fff;
}

.wallet-history-item div {
  display: grid;
  gap: 4px;
}

.wallet-history-item strong,
.wallet-history-item em {
  color: var(--ink);
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
}

.wallet-history-item span {
  color: #6d7d99;
  font-size: 12px;
}

.wallet-history-item.is-credit em {
  color: #1a9b55;
}

.wallet-history-item.is-debit em {
  color: #d14c5f;
}

.wallet-empty-state {
  padding: 18px;
  border: 1px dashed #d7e2f4;
  border-radius: 16px;
  color: #697894;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 900px) {
  .wallet-modal-card {
    width: min(680px, calc(100vw - 24px));
  }

  .wallet-modal-body {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .wallet-modal-card .modal-title {
    padding: 20px 20px 0;
  }
}

.profile a {
  color: var(--muted);
  text-decoration: none;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  padding: 3px;
}

.content {
  padding: 18px 20px 48px;
}

.page-heading h1 {
  margin: 0 0 6px;
  font-size: 27px;
}

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

.page-heading-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-heading-actions p {
  margin-bottom: 0;
}

.page-heading-actions .primary-link {
  flex: 0 0 auto;
  margin-top: 3px;
}

.task-stream-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.task-stream-heading p {
  margin-bottom: 0;
}

.task-stream-controls {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  margin: 0;
}

.task-stream-controls .segmented-control {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 3px;
  border: 1px solid #d8e2f3;
  border-radius: 7px;
  background: #fff;
}

.task-stream-controls .segmented-control a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  color: #405174;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.task-stream-controls .segmented-control a.active {
  background: #4f63ff;
  color: #fff;
}

.task-stream-controls label {
  display: inline-grid;
  gap: 0;
  color: #405174;
  font-size: 12px;
  font-weight: 800;
}

.task-stream-controls label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.task-stream-controls select {
  min-width: 190px;
  min-height: 40px;
  border: 1px solid #d8e2f3;
  border-radius: 7px;
  background: #fff;
  color: #071033;
  font: inherit;
  font-size: 14px;
  padding: 0 10px;
}

.panel {
  padding: 22px 30px 30px;
  border-radius: 18px;
  background: var(--panel);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-title h2 {
  margin: 0;
  font-size: 14px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
}

.primary-button:hover,
.primary-link:hover,
.button-small:hover,
.icon-button:hover {
  background: var(--primary-dark);
}

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

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 14px;
}

.orders-content {
  padding: 18px 20px 48px;
}

.orders-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.orders-table-wrap {
  overflow-x: auto;
}

.orders-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 14px;
}

.orders-table th,
.orders-table td {
  padding: 14px 10px;
  font-size: 14px;
  vertical-align: middle;
}

.orders-table th {
  color: #445675;
  font-size: 14px;
  font-weight: 600;
}

.orders-table td {
  color: #030823;
  font-weight: 100;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: #f8faff;
}

.orders-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
}

.orders-table td:first-child,
.orders-table th:first-child {
  width: 34px;
  text-align: center;
}

.orders-table-flg td:first-child,
.orders-table-flg th:first-child {
  width: 48px;
  text-align: center;
}

.flg-list-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8b94a8;
  font-size: 17px;
  font-weight: 600;
}

.flg-list-indicator-sent {
  color: #009b3a;
}

.flg-list-indicator-pending {
  color: #8b94a8;
}

.orders-table th:nth-child(2) { width: 130px; }
.orders-table th:nth-child(3) { width: 115px; }
.orders-table th:nth-child(4) { width: 190px; }
.orders-table th:nth-child(5) { width: 110px; }
.orders-table th:nth-child(6) { width: 230px; }
.orders-table th:nth-child(7) { width: 105px; }
.orders-table th:nth-child(8) { width: 95px; }
.orders-table th:nth-child(9) { width: 165px; }
.orders-table th:nth-child(10) { width: 132px; }
.orders-table th:nth-child(11) { width: 132px; }

.orders-table th:nth-child(9),
.orders-table td:nth-child(9),
.orders-table th:nth-child(10),
.orders-table td:nth-child(10) {
  text-align: center;
}

.customers-table th:nth-child(1) { width: 120px; }
.customers-table th {
  font-size: 14px;
}

.customers-table th:nth-child(2) { width: 210px; }
.customers-table th:nth-child(3) { width: 250px; }
.customers-table th:nth-child(4) { width: auto; }
.customers-table th:nth-child(5),
.customers-table th:nth-child(6),
.customers-table th:nth-child(7) {
  width: 72px;
  text-align: center;
}
.customers-table td:nth-child(5),
.customers-table td:nth-child(6),
.customers-table td:nth-child(7) {
  text-align: center;
}
.customers-table th:nth-child(8) { width: 132px; }

.suppliers-table th:nth-child(1) { width: 230px; }
.suppliers-table th:nth-child(2) { width: 130px; }
.suppliers-table th:nth-child(3) { width: 130px; }
.suppliers-table th:nth-child(4) { width: 260px; }
.suppliers-table th:nth-child(5) { width: auto; }
.suppliers-table th:nth-child(6) { width: 110px; }

.products-table th:nth-child(1) { width: 96px; }
.products-table th:nth-child(2) { width: 160px; }
.products-table th:nth-child(3) { width: auto; }
.products-table th:nth-child(4) { width: 130px; }
.products-table th:nth-child(5) { width: 130px; }
.products-table th:nth-child(6) { width: 110px; }
.products-table th:nth-child(7) { width: 140px; }
.products-table th:nth-child(8) { width: 110px; }

.suppliers-table td {
  white-space: nowrap;
  font-weight: 600;
}

.products-table td {
  white-space: nowrap;
  font-weight: 600;
}

.suppliers-table .count-pill {
  font-weight: 600;
}

.supplier-inline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-table-image {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f6fb;
}

.supplier-inline strong,
.supplier-inline span,
.supplier-inline a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.supplier-inline .order-link {
  font-weight: 700;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.status-dot.active {
  background: #eaf8ef;
  color: #10903a;
}

.status-dot.inactive {
  background: #fff3e8;
  color: #ff5a00;
}

.supplier-checkbox {
  align-content: start;
}

.supplier-checkbox input {
  width: 22px;
  height: 22px;
  min-width: 22px;
  accent-color: var(--primary);
}

.supplier-detail-form > .supplier-sections {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
}

.supplier-detail-form .supplier-card {
  overflow: visible;
}

.supplier-detail-form .supplier-card-address {
  grid-column: 1 / -1;
}

.supplier-detail-form .supplier-field-grid {
  gap: 14px 16px;
}

.supplier-detail-form .supplier-main-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.supplier-detail-form .supplier-contact-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.supplier-detail-form .supplier-address-grid {
  grid-template-columns: minmax(190px, 0.8fr) minmax(280px, 1.5fr) minmax(180px, 0.9fr);
}

.supplier-detail-form .supplier-field-address {
  grid-column: span 1;
}

.supplier-detail-form .supplier-field,
.supplier-detail-form .supplier-field-grid .detail-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  min-height: 0;
  border-bottom: 0;
}

.supplier-detail-form .supplier-field span,
.supplier-detail-form .supplier-field-grid .detail-field span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.supplier-detail-form .supplier-field input,
.supplier-detail-form .supplier-field-grid .detail-field input {
  width: 100%;
  height: 38px;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.supplier-detail-form .supplier-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(85, 98, 255, 0.12);
}

.supplier-detail-form .supplier-checkbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  border: 1px solid #d7e1f2;
  border-radius: 7px;
  padding: 0 10px;
  background: #f8fbff;
}

.supplier-detail-form .supplier-checkbox input {
  width: 24px;
  height: 24px;
}

@media (max-width: 1180px) {
  .supplier-detail-form > .supplier-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .supplier-detail-form .supplier-main-grid,
  .supplier-detail-form .supplier-contact-grid,
  .supplier-detail-form .supplier-address-grid {
    grid-template-columns: 1fr;
  }
}

.quote-line-item {
  position: relative;
}

.customer-quote-field-grid {
  grid-template-columns: minmax(180px, 1.35fr) minmax(210px, 1.7fr) 84px minmax(116px, 0.9fr) 54px 96px 92px;
}

.customer-detail-form .payment-grid-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  outline: 0;
}

.customer-detail-form .payment-status-pill input {
  color: #ff5a00;
}

.quote-remove-line {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #9aa4ba;
  cursor: pointer;
}

.line-paste-button {
  display: grid;
  place-items: center;
  position: relative;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border: 1px solid #d8e2f5;
  border-radius: 7px;
  padding: 0;
  background: #fff;
  color: #125cff;
  cursor: pointer;
  box-shadow: 0 3px 7px rgba(20, 32, 70, 0.04);
}

.line-paste-button:hover {
  background: #eef4ff;
}

.line-add-paste-button .paste-add-mark,
.accessories-add-button .paste-add-mark {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  color: #125cff;
  font-size: 8px;
  box-shadow: 0 0 0 1px #d8e2f5;
}

.accessories-add-button .paste-add-mark {
  right: 6px;
  bottom: 4px;
}

.quote-remove-line:hover {
  background: #fff2f5;
  color: #cf2146;
}

.quote-line-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 18px 16px;
}

.line-item-add-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
}

.quote-add-line {
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0 14px;
  border-radius: inherit;
  color: inherit;
  white-space: nowrap;
}

.customer-documents {
  display: grid;
  gap: 14px;
}

.customer-documents-panel {
  grid-column: 1 / -1;
}

.customer-documents-table {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.customer-documents-table table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.customer-documents-table th,
.customer-documents-table td {
  min-width: 0;
  padding: 10px 8px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.customer-documents-table th:nth-child(1),
.customer-documents-table td:nth-child(1) {
  width: 130px;
}

.customer-documents-table th:nth-child(2),
.customer-documents-table td:nth-child(2) {
  width: 150px;
}

.customer-documents-table th:nth-child(4),
.customer-documents-table td:nth-child(4) {
  width: 150px;
}

.customer-documents-table th:nth-child(5),
.customer-documents-table td:nth-child(5) {
  width: 110px;
  text-align: right;
}

.customer-documents-table td:first-child span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-documents-table .order-status-label {
  white-space: normal;
  overflow-wrap: anywhere;
}

.add-customer-quote-link {
  justify-self: end;
}

.count-pill {
  color: #071044;
  font-weight: 800;
}

.brand-heading {
  text-align: center;
}

.brand-heading div,
.pair-cell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.brand-heading div {
  margin-top: 0;
  color: #1b2547;
  font-size: 14px;
}

.order-link {
  color: #004dff;
  font-weight: 600;
  text-decoration: none;
}

.order-link-sq {
  color: #bf1e2e;
}

.order-link-so {
  color: #ff5a00;
}

.order-link-inv {
  color: #008f3a;
}

.orders-table td:nth-child(2) strong,
.orders-table td:nth-child(2) span {
  display: block;
}

.orders-table td:nth-child(2) span {
  margin-top: 7px;
}

.order-date-cell {
  display: grid;
  gap: 7px;
}

.order-date-cell span {
  font-weight: 100;
}

.customer-cell,
.payment-cell,
.updated-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.payment-cell {
  width: 100%;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.customer-cell strong {
  font-weight: 600;
}

.customer-cell span,
.payment-cell span,
.updated-cell span {
  color: #071134;
  overflow-wrap: anywhere;
  white-space: normal;
}

.payment-cell span {
  white-space: nowrap;
  overflow-wrap: normal;
}

.brand-logo {
  display: block;
  max-height: 36px;
  margin: 0 auto;
}

.brand-text {
  display: inline-flex;
  justify-content: center;
  max-width: 100%;
  color: #071134;
  font-size: 12px;
  font-weight: 100;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
}

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

.brand-po-cell-logo-only {
  align-items: center;
}

.brand-po-slot {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.brand-po-cell-logo-only .brand-po-slot {
  align-content: center;
}

.brand-po-cell-logo-only .brand-po-meta {
  display: none;
}

.brand-po-meta {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-top: 2px;
  min-height: 24px;
}

.brand-po-meta .po-list-chip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.po-list-link {
  max-width: 100%;
  color: #e05a00;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.po-list-link-due {
  color: #e05a00;
}

.po-list-link-received {
  color: #07883d;
}

.po-due-link {
  color: inherit;
  font-weight: 600;
}

.po-received-link {
  color: #07883d;
  font-size: 14px;
  font-weight: 600;
}

.profit-margin-list {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  background: #eafbf1;
  color: #078a39;
  font-weight: 100;
}

.salesman-list-cell {
  color: #071134;
  font-weight: 100;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dash {
  color: #061144;
  font-weight: 800;
}

.order-status-label {
  display: inline-block;
  font-weight: 600;
  line-height: 1.3;
  white-space: pre-line;
}

.payment-cell .ok {
  color: #05a329;
  font-weight: 600;
}

.payment-cell .pending {
  color: #ff5a00;
  font-weight: 600;
}

.payment-cell .warn {
  color: #5868fe;
  font-weight: 900;
}

.payment-cell:has(.ok) span {
  color: #05a329;
  font-weight: 600;
}

.payment-cell:has(.pending) span {
  color: #ff5a00;
  font-weight: 600;
}

.payment-cell:has(.warn) span {
  color: #5868fe;
  font-weight: 900;
}

.order-status-label.awaiting-payment {
  color: #bf1e2e;
}

.order-status-label.awaiting-processing {
  color: #ff5a00;
}

.order-status-label.invoice-status {
  color: #05a329;
}

.order-actions {
  vertical-align: middle;
  text-align: center;
  white-space: nowrap;
}

.order-actions button {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #071044;
  cursor: pointer;
  vertical-align: middle;
  margin: 0 5px;
}

.order-actions i {
  font-size: 14px;
}

.orders-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 6px 0;
  font-size: 14px;
}

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

.pagination a,
.pagination span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #111938;
  font-size: 14px;
  text-decoration: none;
}

.pagination a.active {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination a.disabled {
  color: #c8cfdd;
  pointer-events: none;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: #445675;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

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

.actions form {
  margin: 0;
}

.button-small,
.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  min-height: 38px;
  border-radius: 8px;
}

.icon-button {
  min-width: 44px;
  font-size: 17px;
}

.icon-button i {
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.74);
}

.modal-card {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 18px 20px 20px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.modal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
}

.modal-title h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
}

.modal-close {
  color: var(--ink);
  font-size: 27px;
  line-height: 1;
  text-decoration: none;
}

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

.user-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 100;
}

.user-form input,
.user-form select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 100;
}

.user-form input::placeholder {
  color: #6b7280;
  font-weight: 400;
}

.user-form .check {
  display: flex;
  align-items: center;
  align-self: center;
  min-height: 34px;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
}

.user-form .check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.form-actions > * {
  flex: 1;
}

.form-actions .primary-button.compact {
  width: 100%;
  height: 42px;
  margin-top: 0;
  font-size: 14px;
  font-weight: 800;
}

.secondary-button {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 42px;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.secondary-button:hover {
  background: var(--primary-dark);
}

.alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
}

.alert.hidden {
  display: none;
}

.alert-success {
  color: #155724;
  background: #e7f7eb;
}

.alert-error {
  color: #842029;
  background: #f8d7da;
}

.alert-note {
  color: #8a5a00;
  background: #fff3d8;
}

.hero-alert-slot {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  margin-top: 22px;
}

.hero-inline-alert {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  min-width: 0;
  max-width: 620px;
  min-height: 42px;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 1;
  visibility: visible;
  transition: opacity 160ms ease, visibility 160ms ease;
}

.hero-inline-alert.hidden {
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.settings-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 16px;
}

.settings-list {
  align-self: start;
}

.settings-detail-panel {
  min-width: 0;
}

.settings-detail-body {
  display: grid;
  gap: 14px;
}

.settings-detail-title {
  align-items: center;
}

.settings-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.settings-page-actions {
  padding-top: 0;
}

.settings-save-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.settings-table-wrap {
  width: 100%;
  max-height: 62vh;
  overflow: auto;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
}

.settings-table th,
.settings-table td {
  padding: 10px;
  border-bottom: 1px solid #dce5f4;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.settings-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  color: #071033;
  font-weight: 800;
}

.settings-table input,
.settings-table select,
.settings-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  padding: 7px 9px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 100;
}

.settings-table input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  accent-color: var(--primary);
}

.settings-table input:focus,
.settings-table select:focus,
.settings-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(85, 98, 255, 0.12);
}

.settings-row-actions {
  display: flex;
  justify-content: flex-start;
}

.settings-add-row {
  width: auto;
}

.settings-new-row {
  background: #f8fbff;
}

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

.settings-panel h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.settings-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.settings-form {
  display: grid;
  gap: 14px;
}

.settings-form label {
  display: grid;
  gap: 8px;
  font-size: 15px;
}

.settings-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  max-height: 62vh;
  overflow: auto;
  padding: 2px;
}

.settings-form .settings-checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dce5f4;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.settings-checkbox-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.settings-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  padding: 10px;
  color: var(--ink);
  font: inherit;
  line-height: 1.35;
}

.settings-code-field textarea {
  min-height: 360px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre;
}

.settings-note-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.settings-note-list p {
  margin: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #dce5f4;
  border-radius: 7px;
  background: #f8fbff;
  color: #405174;
  line-height: 1.35;
}

.postcode-settings-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid #d7e3f7;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(246, 250, 255, 0.98) 0%, rgba(255, 255, 255, 1) 58%),
    linear-gradient(135deg, rgba(83, 120, 255, 0.07), rgba(32, 192, 201, 0.06));
  box-shadow: 0 16px 32px rgba(16, 34, 76, 0.06);
}

.postcode-settings-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.postcode-settings-intro h3 {
  margin: 0 0 6px;
  color: #071033;
  font-size: 19px;
  line-height: 1.15;
}

.postcode-settings-intro p {
  margin: 0;
  max-width: 720px;
  color: #46577a;
  font-size: 14px;
  line-height: 1.5;
}

.postcode-settings-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

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

.postcode-settings-notes p {
  margin: 0;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid #d9e4f7;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #405174;
  line-height: 1.45;
}

.postcode-settings-notes strong {
  color: #071033;
}

.postcode-settings-grid {
  gap: 14px 18px;
}

.postcode-settings-grid .detail-field span {
  color: #243457;
}

.task-stream-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 16px;
}

.task-stream-list {
  align-self: start;
}

.task-stream-nav {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.task-stream-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d9e4f5;
  border-radius: 7px;
  color: #071033;
  text-decoration: none;
  font-weight: 100;
}

.task-stream-nav a.active,
.task-stream-nav a:hover {
  border-color: #4f63ff;
  background: #f4f7ff;
  color: #004fff;
}

.task-stream-nav strong {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  border-radius: 7px;
  background: #edf4ff;
  color: #004fff;
  font-size: 14px;
  font-weight: 600;
}

.task-stream-body {
  display: grid;
}

.task-stream-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 12px;
  border-bottom: 1px solid #dce5f4;
}

.task-stream-summary h3 {
  margin: 0;
}

.task-stream-type {
  display: block;
  margin: 0;
  color: #071033;
  font-size: 14px;
  font-weight: 400;
}

.task-stream-summary h3 {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
}

.task-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 7px;
  color: #56657f;
  font-size: 14px;
}

.task-meta-row span,
.task-meta-row em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-style: normal;
  line-height: 1.2;
}

.task-meta-row em {
  padding: 3px 8px;
  border-radius: 7px;
  background: #fff4e6;
  color: #ff5a00;
  font-weight: 800;
}

.task-meta-row i {
  color: #4f63ff;
  font-size: 12px;
}

.task-completed-meta {
  color: #187545;
}

.task-stream-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-stream-actions form {
  margin: 0;
}

.nav-link.task-stream-nav-link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  padding-right: 72px;
}

.nav-link.task-stream-nav-link em {
  font-style: normal;
}

.nav-link .task-stream-badges {
  display: inline-flex;
  align-items: center;
  flex-flow: row nowrap;
  gap: 5px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  width: auto;
  height: auto;
  font-size: 14px;
  line-height: 1;
}

.nav-link .task-stream-badges strong {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 28px;
  height: 22px;
  border-radius: 7px;
  background: #edf4ff;
  color: #004fff;
  font-size: 14px;
  font-weight: 600;
}

.nav-link .task-stream-badges .task-stream-department-badge {
  cursor: pointer;
}

.nav-link .task-stream-badges .task-stream-department-badge:focus-visible {
  outline: 2px solid #4f63ff;
  outline-offset: 2px;
}

.task-stream-clickable {
  cursor: pointer;
}

.task-stream-clickable:hover {
  background: #f8fbff;
}

.detail-content {
  padding: 18px 20px 80px;
}

.order-detail-form {
  margin: 0;
}

.detail-hero {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: -18px -20px 18px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 248, 0.98);
}

.detail-hero h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 6px;
}

.hero-title-row .order-status-label {
  font-size: 16px;
  line-height: 1.15;
}

.detail-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}

.back-link,
.secondary-action {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 22px;
}

.detail-actions .primary-button.compact,
.detail-actions .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  height: 42px;
  box-sizing: border-box;
  margin-top: 0;
  padding-right: 16px;
  padding-left: 16px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
  font-weight: 600;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: #fff;
  color: #111938;
  font-weight: 600;
  cursor: pointer;
}

.secondary-action:disabled,
.primary-button:disabled,
.disabled-action {
  opacity: 0.48;
  cursor: not-allowed;
}

.send-flg-action-sent {
  border-color: #dce4f2;
  background: #f8faff;
  color: #858ea3;
  box-shadow: none;
  cursor: pointer;
}

.send-flg-action-sent i {
  color: #8b94a8;
}

.disabled-action {
  pointer-events: none;
}

.detail-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  align-items: start;
}

.top-address-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.top-address-pair .address-body {
  min-height: 186px;
}

.segment-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #bde3f2;
  border-radius: 6px;
  background: #fff;
}

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

.segment-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  gap: 14px;
  padding: 0 12px;
  border-bottom: 1px solid #bde3f2;
  background: #dff2fa;
  color: #226b8f;
}

.segment-title h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.segment-tax-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: #0c1c4c;
  font-size: 12px;
  font-weight: 800;
}

.segment-tax-code select {
  width: 96px;
  height: 28px;
  border: 1px solid #c9d5ea;
  border-radius: 7px;
  padding: 0 8px;
  background: #fff;
  color: #061337;
  font-size: 12px;
  font-weight: 100;
}

.segment-paste-button {
  margin-left: auto;
  width: 34px;
  min-width: 34px;
  min-height: 30px;
  padding: 0;
  border: 1px solid #c9d5ea;
  border-radius: 7px;
  background: #fff;
  color: #125cff;
  box-shadow: 0 3px 8px rgba(20, 32, 70, 0.08);
}

.segment-paste-button i {
  color: #125cff;
  font-size: 14px;
}

.segment-title > span,
.segment-title > strong {
  color: #31516a;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: right;
}

.segment-title .order-status-label {
  font-size: 14px;
  text-align: right;
}

.segment-body {
  padding: 16px 18px 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.account-grid {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.address-grid {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.address-body {
  display: grid;
  gap: 14px;
}

.address-list {
  display: grid;
  gap: 3px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.address-name {
  margin-bottom: 3px;
  font-size: 15px;
  font-weight: 600;
}

.address-edit-fields.hidden,
.address-list.hidden {
  display: none;
}

.address-actions {
  display: flex;
}

.address-edit-toggle {
  min-width: 86px;
}

.vehicle-grid {
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.6fr) minmax(220px, 1.3fr) minmax(110px, 0.6fr);
}

.fulfilment-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.detail-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.detail-field span,
.detail-field > label,
.money-input .sr-only {
  color: #445675;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.detail-field input,
.detail-field select,
.money-input input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}

.detail-field input:focus,
.detail-field select:focus,
.detail-field textarea:focus {
  outline: 0;
  border-color: #8797ff;
  box-shadow: 0 0 0 3px rgba(88, 104, 254, 0.14);
}

.product-editor-panel {
  margin-bottom: 18px;
}

.product-create-modal {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, #f7fbff 0, #ffffff 180px);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.product-create-shell {
  display: grid;
}

.product-create-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px 22px;
  border-bottom: 1px solid #dbe6f6;
  background:
    radial-gradient(circle at top right, rgba(88, 104, 254, 0.10), transparent 38%),
    linear-gradient(180deg, rgba(240, 247, 255, 0.95), rgba(255, 255, 255, 0.9));
}

.product-create-copy {
  display: grid;
  gap: 8px;
}

.product-create-kicker {
  color: #5868fe;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-create-copy h2 {
  margin: 0;
  color: #08122b;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 700;
}

.product-create-copy p {
  margin: 0;
  max-width: 620px;
  color: #556581;
  font-size: 15px;
  line-height: 1.6;
}

.product-create-close {
  align-self: center;
}

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

.product-create-form {
  display: grid;
  gap: 22px;
  padding: 28px 30px 30px;
}

.product-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.product-create-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid #e2eaf7;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

.product-create-card-head {
  display: grid;
  gap: 6px;
}

.product-create-card-head h3 {
  margin: 0;
  color: #08122b;
  font-size: 18px;
  font-weight: 700;
}

.product-create-card-head p {
  margin: 0;
  color: #61718f;
  font-size: 14px;
  line-height: 1.6;
}

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

.product-create-media-stack {
  display: grid;
  gap: 16px;
}

.product-editor-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.product-editor-checkbox {
  align-content: start;
}

.product-inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #d9e3f4;
  border-radius: 14px;
  background: #f8fbff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.product-inline-checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.product-editor-form input[type="file"] {
  height: auto;
  padding: 8px 10px;
}

.product-create-form input[type="file"] {
  height: auto;
  padding: 8px 10px;
}

.product-create-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 1px solid #d1dcf2;
  border-radius: 10px;
  padding: 9px 12px;
  background: #f4f7fd;
  color: #1e3568;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.product-editor-preview {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #445675;
  font-size: 14px;
  font-weight: 600;
}

.product-create-image-preview {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 170px;
  padding: 18px;
  border: 1px dashed #c9d8f3;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #fdfefe);
  color: #5f7090;
  text-align: center;
}

.product-create-image-preview img {
  display: block;
  max-width: 100%;
  max-height: 150px;
  border-radius: 14px;
  object-fit: contain;
}

.product-create-image-preview i {
  font-size: 26px;
  color: #8096be;
}

.product-create-image-preview span {
  font-size: 14px;
  font-weight: 600;
}

.product-create-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.product-create-note {
  color: #61718f;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .product-create-layout {
    grid-template-columns: 1fr;
  }

  .product-create-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .product-create-hero,
  .product-create-form {
    padding-left: 20px;
    padding-right: 20px;
  }

  .product-create-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .product-create-copy h2 {
    font-size: 26px;
  }

  .product-create-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .product-create-footer .product-editor-actions {
    justify-content: stretch;
  }

  .product-create-footer .product-editor-actions > * {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.product-editor-actions,
.products-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.products-editor-row td {
  padding: 18px;
  background: #fbfcff;
}

.payment-type-select-wrap {
  position: relative;
  display: block;
  min-width: 0;
}

.detail-field .payment-type-select-wrap {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.native-payment-type-select {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.payment-type-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  padding: 0 10px 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.payment-type-trigger:focus-visible,
.payment-type-select-wrap.is-open .payment-type-trigger {
  outline: 0;
  border-color: #5a62ff;
  box-shadow: 0 0 0 3px rgba(90, 98, 255, 0.12);
}

.payment-type-trigger > i {
  color: #071033;
  font-size: 14px;
}

.payment-type-selected,
.payment-type-options button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.payment-type-selected strong,
.payment-type-options strong {
  overflow: hidden;
  color: #071033;
  font-size: 14px;
  font-weight: 100;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-type-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  display: grid;
  overflow: hidden;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 32, 70, 0.18);
}

.payment-type-options button {
  height: 38px;
  border: 0;
  padding: 0 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.payment-type-options button[aria-selected="true"] {
  display: none;
}

.payment-type-options button:hover {
  background: #eef4ff;
}

.v12-finance-options {
  display: grid;
  gap: 12px;
}

.v12-deposit-control {
  display: grid;
  gap: 14px;
}

.v12-deposit-control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  border: 0;
  background: transparent;
  outline: none;
  accent-color: var(--primary);
}

.v12-deposit-control input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: #e5eaf4;
}

.v12-deposit-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 6px rgba(20, 32, 70, 0.18);
  cursor: pointer;
}

.v12-deposit-control input[type="range"]::-moz-range-track {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: #e5eaf4;
}

.v12-deposit-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 6px rgba(20, 32, 70, 0.18);
  cursor: pointer;
}

.v12-deposit-control input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(88, 104, 254, 0.16), 0 2px 6px rgba(20, 32, 70, 0.18);
}

.v12-deposit-control input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(88, 104, 254, 0.16), 0 2px 6px rgba(20, 32, 70, 0.18);
}

.v12-deposit-fields {
  display: grid;
  grid-template-columns: 150px;
  justify-content: start;
  gap: 8px;
  max-width: 100%;
}

.v12-deposit-field {
  display: grid;
  gap: 4px;
}

.v12-deposit-field em {
  color: #66738f;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.v12-money-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  width: 150px;
  height: 42px;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.v12-money-input:focus-within {
  border-color: #5a62ff;
  box-shadow: 0 0 0 3px rgba(90, 98, 255, 0.12);
}

.v12-money-input b {
  padding-left: 13px;
  color: #34415d;
  font-size: 14px;
  font-weight: 500;
}

.v12-money-input input {
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0 12px 0 6px;
  background: transparent;
  color: #071033;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}

.v12-money-input input:focus {
  outline: 0;
}

.v12-finance-note {
  color: #4b5875;
}

.v12-deposit-scale {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #4b5875;
  font-size: 12px;
}

.v12-deposit-scale span {
  display: grid;
  gap: 2px;
}

.v12-deposit-scale span:last-child {
  text-align: right;
}

.v12-deposit-scale strong {
  color: #071033;
  font-size: 14px;
}

.v12-deposit-scale em {
  color: #7b879e;
  font-style: normal;
}

.v12-finance-note {
  margin: 0;
  font-size: 14px;
}

.payment-info-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100px;
}

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

.payment-row {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.payment-row-main {
  display: grid;
  grid-template-columns: minmax(70px, 0.75fr) minmax(90px, 0.9fr) minmax(95px, 0.9fr) minmax(130px, 1.1fr) minmax(190px, 2fr) auto;
  gap: 10px;
  align-items: end;
}

.payment-grid {
  min-width: 0;
}

.payment-row-main div,
.payment-reference {
  min-width: 0;
}

.payment-row-main span,
.payment-reference span {
  display: block;
  margin-bottom: 5px;
  color: #405070;
  font-size: 12px;
  font-weight: 800;
}

.payment-row-main strong,
.payment-reference strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ghost-button {
  min-width: 44px;
  min-height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary);
}

.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ghost-button:hover {
  color: #fff;
}

.ghost-button:disabled:hover {
  background: #fff;
  color: var(--primary);
}


.line-item-add-row .accessories-add-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-height: 34px;
  min-width: 58px;
  padding-right: 18px;
  flex-wrap: nowrap;
}

.line-items-layout {
  display: grid;
  gap: 14px;
}

.line-items {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.line-item {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.item-photo {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid #dce2ed;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.item-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.order-image-open {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.order-image-open:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 3px rgba(88, 104, 254, 0.16);
}

.line-image-prompt {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
}

.line-image-prompt:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 3px rgba(88, 104, 254, 0.16);
}

.item-photo i {
  color: var(--primary);
  font-size: 36px;
}

.item-fields {
  min-width: 0;
  width: 100%;
}

.type-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.item-field-grid {
  grid-template-columns: minmax(170px, 1.1fr) minmax(320px, 2.5fr) 76px minmax(112px, 0.9fr) minmax(122px, 0.95fr) minmax(112px, 0.95fr);
}

.description-input {
  color: #2e3a56;
  background: #f8fafc;
}

.stock-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.stock-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  color: #25304e;
  font-size: 13px;
  font-weight: 400;
}

.payment-check {
  display: grid;
  gap: 12px;
}

.line-payment-check {
  width: min(430px, 100%);
  justify-self: end;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.money-rows {
  display: grid;
  gap: 9px;
}

.money-rows > div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.money-rows > div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.money-rows strong {
  justify-self: end;
  font-size: 16px;
}

.money-input input {
  text-align: right;
}

.detail-field input[type="number"] {
  text-align: right;
}

.balance-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  transform: none;
  z-index: 80;
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 16px 22px;
  background: #fff2f5;
  color: #bf1e2e;
  box-shadow: 0 -8px 28px rgba(20, 32, 70, 0.12);
  text-align: center;
}

.balance-banner.overpaid {
  background: #fff8df;
  color: #805900;
}

.balance-banner.hidden {
  display: none;
}

.balance-banner strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
}

.history-panel {
  margin-top: 14px;
  overflow: hidden;
}

.communications-panel {
  margin-top: 14px;
}

.communication-title-controls {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
}

.communication-title-controls .button-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  min-height: 34px;
  min-width: 0;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: #405174;
}

.communication-title-controls .button-small i {
  font-size: 14px;
  line-height: 1;
  color: #405174;
}

.communication-title-controls .button-small:hover,
.communication-title-controls .button-small:hover i {
  color: #fff;
}

.communication-title-controls .communications-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  padding: 0 8px;
  background: #edf3ff;
  color: #0954d9;
  font-size: 12px;
  font-weight: 600;
}

.segment-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.segment-title > .section-action-button {
  margin-left: auto;
}

.segment-actions > span {
  color: #31516a;
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: right;
}

.section-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  height: 34px;
  border-radius: 8px;
  gap: 6px;
  padding: 0 11px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 5px 12px rgba(20, 32, 70, 0.07);
}

.section-action-button i {
  font-size: 14px;
  color: currentColor;
}

.purchase-order-modal .po-quantity-field {
  width: 74px;
  max-width: 74px;
}

.purchase-order-modal .po-quantity-field select {
  width: 74px;
  appearance: none;
  padding-right: 22px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238293ad' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 6px;
}

.communications-body {
  display: flex;
  flex-direction: column;
  min-height: 100px;
}

.section-body-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.po-line-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.po-line-controls .button-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.po-line-controls .po-own-stock-line.own-stock-available {
  background: #fff8d8;
}

.po-line-controls .po-own-stock-line.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.po-status-chip,
.po-list-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #d7e2f5;
  border-radius: 999px;
  background: #f4f7ff;
  color: #10245a;
  font-size: 14px;
  font-weight: 100;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 3px 7px rgba(20, 32, 70, 0.04);
}

.po-status-due {
  border-color: #ffdca8;
  background: #fff7e8;
  color: #b45309;
}

.po-status-received {
  border-color: #bdeccb;
  background: #eafbf0;
  color: #07883d;
}

.po-status-own {
  border-color: #c9f2d7;
  background: #effcf4;
  color: #087333;
}

.po-pair {
  align-items: flex-start;
}

.po-pair > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.muted-dash {
  color: #9aa4b6;
}

.purchase-orders-panel {
  margin-top: 16px;
}

.fulfilment-panel {
  margin-top: 16px;
}

.purchase-orders-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100px;
}

.po-table-head,
.purchase-order-card {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(220px, 1.5fr) minmax(112px, 0.75fr) minmax(130px, 0.8fr) minmax(110px, 0.75fr) 50px;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.po-table-head {
  min-height: 36px;
  border-bottom: 1px solid #dfe7f4;
}

.po-table-head > span {
  padding: 0 10px 8px;
  color: #445675;
  font-size: 14px;
  font-weight: 600;
}

.purchase-order-card {
  min-height: 42px;
  border-bottom: 1px solid #dfe7f4;
}

.purchase-order-card > * {
  padding: 0 10px;
  font-size: 14px;
  font-weight: 100;
}

.purchase-order-number {
  font-size: 14px;
  font-weight: 600;
}

.purchase-order-number-due {
  color: #e05a00;
}

.purchase-order-number-received {
  color: #07883d;
}

.purchase-order-supplier {
  min-width: 0;
  overflow: hidden;
  color: #061337;
  font-size: 14px;
  font-weight: 100;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-order-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 100;
  white-space: nowrap;
}

.purchase-order-view {
  justify-self: end;
  margin-right: 10px;
}

.fulfilment-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100px;
}

.fulfilment-table-head,
.fulfilment-card {
  display: grid;
  grid-template-columns: minmax(170px, 1.05fr) minmax(90px, 0.55fr) minmax(130px, 0.75fr) minmax(120px, 0.8fr) minmax(80px, 0.55fr) minmax(90px, 0.6fr) minmax(110px, 0.75fr) minmax(100px, 0.65fr) 86px;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.fulfilment-table-head {
  min-height: 36px;
  border-bottom: 1px solid #dfe7f4;
}

.fulfilment-table-head > span {
  padding: 0 10px 8px;
  color: #445675;
  font-size: 14px;
  font-weight: 600;
}

.fulfilment-card {
  min-height: 52px;
  border-bottom: 1px solid #dfe7f4;
  cursor: pointer;
}

.fulfilment-card:hover {
  background: #f8fbff;
}

.fulfilment-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0 10px;
}

.fulfilment-card strong {
  min-width: 0;
  overflow: hidden;
  color: #061337;
  font-size: 14px;
  font-weight: 100;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fulfilment-card span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fulfilment-reference strong {
  color: #0a57e6;
  font-weight: 600;
}

.fulfilment-reference a {
  color: inherit;
  text-decoration: none;
}

.fulfilment-reference a:hover {
  text-decoration: underline;
}

.fulfilment-status {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid #d8e1ff;
  border-radius: 5px;
  background: #f4f7ff;
  color: #10245a;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fulfilment-status-green {
  border-color: #bdeccb;
  background: #eafbf0;
  color: #087333;
}

.fulfilment-status-blue {
  border-color: #c9dcff;
  background: #eef5ff;
  color: #125cff;
}

.fulfilment-status-red {
  border-color: #ffc8cc;
  background: #fff1f2;
  color: #bf1731;
}

.fulfilment-status-amber {
  border-color: #ffe3af;
  background: #fff8e8;
  color: #9d5b00;
}

.fulfilment-actions {
  display: inline-flex;
  justify-self: end;
  gap: 8px;
  padding-right: 10px;
}

.fulfilment-add-button {
  justify-self: end;
  margin: 0;
}

.fulfilment-add-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fulfilment-balance-notice {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin-top: 0;
}

.fulfilment-balance-notice strong {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid #f2c7d5;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff0f4;
  color: #bf1e2e;
  font-size: 14px;
  font-weight: 600;
}

.fulfilment-modal {
  width: min(520px, calc(100vw - 48px));
}

.fulfilment-address-preview {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dbe5f6;
  border-radius: 8px;
  background: #f8fbff;
  text-align: left;
}

.fulfilment-address-preview strong {
  color: #071033;
  font-size: 14px;
  font-weight: 800;
}

.fulfilment-address-preview span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.fulfilment-modal .detail-field input,
.fulfilment-modal .detail-field select {
  text-align: left;
}

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

@media (max-width: 560px) {
  .fulfilment-field-row {
    grid-template-columns: 1fr;
  }
}

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

.po-delivery-address address {
  margin: 0;
  color: #071134;
  font-style: normal;
  line-height: 1.55;
}

.po-direct-panel {
  border-color: #bff1cd;
  background: #fbfffc;
}

.po-direct-note {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #effcf4;
  color: #087333;
  font-size: 12px;
  font-weight: 800;
}

.purchase-order-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.po-admin-message-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
}

.po-admin-message-form input {
  height: 34px;
  border: 1px solid #ccd8ee;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

@media (max-width: 980px) {
  .purchase-order-card {
    grid-template-columns: 100px minmax(0, 1fr) 38px;
    gap: 8px 10px;
  }

  .purchase-order-card .po-status-pill,
  .purchase-order-meta {
    grid-column: span 1;
  }

  .purchase-order-supplier {
    white-space: normal;
  }
}

.po-public-page {
  min-height: 100vh;
  background: #f5f7fb;
}

.po-public-shell {
  width: min(1180px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.po-public-shell > .segment-panel,
.po-public-shell > .po-public-grid {
  margin-bottom: 18px;
}

.po-public-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.po-public-header img {
  width: 250px;
  max-width: 72vw;
  height: auto;
  display: block;
  margin-bottom: 12px;
}

.po-public-header h1 {
  margin: 0;
  font-size: 30px;
}

.po-public-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.po-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
}

.po-public-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.po-public-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.po-public-status .secondary-action,
.po-public-status .primary-button.compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  box-sizing: border-box;
  line-height: 1;
}

.po-public-status .po-staff-action {
  display: flex;
  align-items: center;
  margin: 0;
}

.po-status-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid #d8e1ff;
  border-radius: 5px;
  background: #f4f7ff;
  color: #10245a;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.po-status-green {
  border-color: #bdeccb;
  background: #eafbf0;
  color: #087333;
}

.po-status-amber {
  border-color: #ffe3af;
  background: #fff8e8;
  color: #9d5b00;
}

.po-status-blue {
  border-color: #c9dcff;
  background: #eef5ff;
  color: #125cff;
}

.po-status-red {
  border-color: #ffc8cc;
  background: #fff1f2;
  color: #bf1731;
}

.po-status-neutral {
  border-color: #d8e1ff;
  background: #f4f7ff;
  color: #10245a;
}

.payment-status-pill,
.fulfilment-status,
.po-status-pill {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-grid-row .payment-status-completed,
.fulfilment-card strong.fulfilment-status-green,
.fulfilment-status-green,
.po-status-green {
  background: #eaf8ef;
  color: #10903a;
  box-shadow: inset 0 0 0 1px #d8f1df;
}

.payment-grid-row .payment-status-pending,
.fulfilment-card strong.fulfilment-status-amber,
.fulfilment-status-amber,
.po-status-amber {
  background: #fff3e8;
  color: #ff5a00;
  box-shadow: inset 0 0 0 1px #ffe1c4;
}

.payment-grid-row .payment-status-refunded,
.fulfilment-card strong.fulfilment-status-red,
.fulfilment-status-red,
.po-status-red {
  background: #fff2f5;
  color: #bf1e2e;
  box-shadow: inset 0 0 0 1px #ffd7df;
}

.fulfilment-card strong.fulfilment-status-blue,
.fulfilment-status-blue,
.po-status-blue {
  background: #eef5ff;
  color: #125cff;
  box-shadow: inset 0 0 0 1px #c9dcff;
}

.po-public-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 16px;
}

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

.po-summary p {
  display: grid;
  grid-template-columns: 140px 1fr;
  margin: 0;
  gap: 12px;
}

.po-lines {
  display: grid;
  gap: 14px;
}

.po-public-line {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 14px;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #dfe7f4;
  border-radius: 8px;
  background: #fff;
}

.po-line-quantity-warning {
  border-color: #ffd7df;
  background: #fff8fa;
}

.po-line-image {
  display: flex;
  place-items: center;
  justify-content: center;
  align-items: center;
  align-content: center;
  min-height: 154px;
  color: #071947;
}

.po-line-quantity-warning .po-line-image {
  background: transparent;
}

.po-line-image img {
  display: block;
  width: 150px;
  height: 150px;
  object-fit: contain;
}

.po-image-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.po-image-open:focus-visible {
  outline: 0;
  border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(88, 104, 254, 0.16);
}

.po-line-image i {
  color: #5868fe;
  font-size: 30px;
}

.po-line-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.po-line-table th,
.po-line-table td {
  border-bottom: 1px solid #e4ebf7;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.po-line-table tr:last-child th,
.po-line-table tr:last-child td {
  border-bottom: 0;
}

.po-line-table th {
  width: 160px;
  color: #405274;
  font-size: 14px;
}

.po-line-table td {
  overflow-wrap: anywhere;
  color: #071947;
}

.po-line-qty-row td strong {
  all: unset;
  color: inherit;
  font: inherit;
}

.po-line-quantity-warning .po-line-qty-row td strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #ffd7df;
  border-radius: 999px;
  background: #fff2f5;
  color: #bf1e2e;
  font-weight: 900;
}

.po-update-form,
.po-problem-form {
  display: grid;
  gap: 10px;
}

.po-update-form {
  grid-template-columns: 260px auto;
  align-items: end;
}

.po-response-panel {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: end;
  gap: 12px;
}

.po-response-panel > .danger-action {
  justify-content: center;
  min-height: 42px;
  min-width: 240px;
  width: auto;
}

.po-tracking-form {
  display: grid;
  grid-template-columns: 220px 340px auto auto;
  justify-content: start;
  gap: 12px;
  align-items: end;
}

.po-tracking-form .primary-button.compact,
.po-tracking-form .secondary-action,
.po-update-form .secondary-action {
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  box-sizing: border-box;
  line-height: 1;
}

.po-tracking-live {
  display: grid;
  gap: 12px;
  border-top: 1px solid #dfe7f4;
}

.po-tracking-live-summary {
  display: grid;
  grid-template-columns: 120px max-content minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.po-tracking-live-summary > span {
  color: #485778;
  font-size: 14px;
  font-weight: 900;
}

.po-tracking-live-summary p {
  margin: 0;
  color: #485778;
  font-size: 14px;
  font-weight: 700;
}

.po-track-link {
  justify-content: center;
}

.po-tracking-parcels table {
  min-width: 720px;
}

.danger-action {
  border-color: #ffd7df;
  background: #fff2f5;
  color: #bf1e2e;
}

.po-staff-action {
  margin: 0;
}

.po-message-thread {
  display: grid;
  grid-template-rows: minmax(120px, 1fr) auto;
  gap: 18px;
  align-items: end;
  min-height: 280px;
  padding: 14px 14px 12px;
  border-radius: 8px;
  background: #f7fbff;
}

.po-message-list {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 120px;
}

.po-message-list:empty {
  min-height: 132px;
}

.po-message {
  display: grid;
  gap: 5px;
  width: fit-content;
  max-width: min(68%, 640px);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #dce6f5;
  background: #fff;
  box-shadow: 0 3px 9px rgba(20, 32, 70, 0.06);
}

.po-message.admin {
  justify-self: end;
  border-color: #bcf0b8;
  background: #dcffd8;
}

.po-message.supplier {
  justify-self: start;
  background: #fff;
}

.po-message p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.po-message span {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.po-message-form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.po-message-form input {
  min-width: 0;
  height: 38px;
  border: 1px solid #cfd7e6;
  border-radius: 7px;
  padding: 0 10px;
}

.po-message-form input + input {
  grid-column: 1 / 2;
}

.po-message-form textarea {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  resize: none;
  border: 1px solid #d5e0f0;
  border-radius: 10px;
  padding: 12px 14px 10px;
  background: #fff;
  color: #071033;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(20, 32, 70, 0.03);
}

.po-message-form button {
  box-sizing: border-box;
  width: 48px;
  min-width: 48px;
  height: 46px;
  padding: 0;
  border-radius: 10px;
}

.po-message-form button[type="submit"] {
  display: inline-grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border: 0;
  background: #5661ff;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 6px 14px rgba(20, 32, 70, 0.12);
}

.po-message-form button[type="submit"]:hover {
  background: #404be6;
}

.po-message-form button[type="submit"] i {
  display: block;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  margin: 0;
}

.po-message-tool {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #071033;
  cursor: pointer;
  font-size: 19px;
  padding: 0;
}

.po-message-tool:hover {
  color: #125cff;
}

.po-problem-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 19, 55, 0.56);
}

.po-problem-modal.hidden,
.po-receive-modal.hidden,
.po-image-modal.hidden {
  display: none;
}

.po-problem-dialog {
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid #d7e1f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 44px rgba(7, 19, 55, 0.24);
}

.po-problem-dialog .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
}

.po-problem-dialog .modal-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #071033;
  font-size: 22px;
  line-height: 1.2;
}

.po-problem-dialog .modal-header h2 i {
  color: #071033;
  font-size: 21px;
}

.po-problem-dialog .po-problem-close {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  margin: 0;
}

.po-problem-form {
  display: grid;
  gap: 14px;
  padding: 12px 18px 18px;
}

.po-problem-form textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid #cfd7e6;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  outline: 0;
}

.po-problem-form textarea:focus {
  border-color: #8797ff;
  box-shadow: 0 0 0 3px rgba(88, 104, 254, 0.14);
}

.po-receive-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 19, 55, 0.56);
}

.po-receive-form {
  display: grid;
  gap: 14px;
  padding: 12px 18px 18px;
}

.po-receive-form .detail-field > span,
.po-receive-form .detail-field > label {
  font-size: 14px;
  font-weight: 800;
}

.po-receive-form .hidden {
  display: none;
}

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

.po-receive-line-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 12px;
  padding: 12px;
  border: 1px solid #d6dfef;
  border-radius: 8px;
  background: #fff;
  color: #071033;
  cursor: pointer;
}

.po-receive-line-card input {
  grid-row: 1 / span 3;
  align-self: start;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.po-receive-line-card:has(input:checked) {
  border-color: #8797ff;
  box-shadow: 0 0 0 3px rgba(88, 104, 254, 0.12);
}

.po-receive-line-card.is-complete {
  opacity: 0.58;
  cursor: not-allowed;
}

.po-receive-line-summary {
  color: #087333;
  font-size: 14px;
  font-weight: 800;
}

.po-receive-line-card strong,
.po-receive-line-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.po-receive-line-card small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.po-receive-quantity-field select {
  width: 120px;
  min-width: 120px;
}

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

.po-receipt-row {
  display: grid;
  grid-template-columns: 110px 1fr 150px minmax(0, 1.4fr) 190px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dfe7f4;
  border-radius: 8px;
  background: #fff;
}

.po-receipt-row strong {
  color: #087333;
}

.po-receipt-row span,
.po-receipt-row em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.po-receipt-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.po-receipt-row span:empty::after {
  content: "No notes";
  color: #8a94aa;
}

.po-image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 19, 55, 0.56);
}

.po-image-dialog {
  display: grid;
  gap: 12px;
  width: min(680px, 100%);
  border: 1px solid #d7e1f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 44px rgba(7, 19, 55, 0.24);
}

.po-image-dialog .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 0;
}

.po-image-dialog .modal-header h2 {
  margin: 0;
  color: #071033;
  font-size: 20px;
  line-height: 1.2;
}

.po-image-dialog img {
  display: block;
  width: min(560px, calc(100% - 36px));
  max-height: min(70vh, 560px);
  object-fit: contain;
  justify-self: center;
  margin: 0 18px 20px;
}

@media (max-width: 820px) {
  .po-public-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .po-public-header {
    gap: 12px;
  }

  .po-public-header img {
    width: 220px;
    margin-bottom: 8px;
  }

  .po-public-header h1 {
    font-size: 26px;
  }

  .po-title-row {
    align-items: center;
  }

  .po-public-status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 9px;
    width: 100%;
  }

  .po-public-status .secondary-action,
  .po-public-status .primary-button {
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
    box-sizing: border-box;
    justify-content: center;
    font-size: 14px;
    white-space: nowrap;
  }

  .po-staff-action {
    width: 100%;
  }

  .po-response-panel,
  .po-update-form {
    grid-template-columns: 1fr;
  }

  .po-response-panel > .danger-action {
    width: 100%;
    min-width: 0;
  }

  .po-public-grid,
  .po-public-line,
  .po-tracking-form {
    grid-template-columns: 1fr;
  }

  .po-public-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .po-line-image {
    justify-self: start;
    width: 118px;
    min-height: 118px;
  }

  .po-line-image img {
    width: 108px;
    height: 108px;
  }

  .po-summary p {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .po-line-table th,
  .po-line-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 7px 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .po-public-line,
  .po-line-table,
  .po-line-table tbody,
  .po-line-table tr {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  .po-line-table th {
    border-bottom: 0;
    padding-bottom: 2px;
  }

  .po-receipt-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .po-receipt-row em {
    text-align: left;
  }

  .po-line-table td {
    overflow-wrap: anywhere;
    word-break: break-word;
    padding-top: 0;
  }

  .po-message {
    max-width: 88%;
  }

  .po-message-form {
    gap: 7px;
  }

  .po-message-tool {
    width: 30px;
    min-width: 30px;
  }
}

@media print {
  .po-update-form,
  .po-message-form,
  .po-public-status button {
    display: none !important;
  }

  .po-public-page {
    background: #fff;
  }
}

.communication-compose-form {
  display: grid;
  gap: 12px;
}

.communication-compose-form.hidden,
.communication-view.hidden,
.communication-subject-field.hidden,
.communication-view-subject-wrap.hidden,
.communication-inline-reply.hidden,
.communication-inline-email-reply.hidden,
.communication-omni-reply-actions.hidden,
.communication-emoji-picker.hidden,
.communication-inline-file.hidden,
.wysiwyg-toolbar.hidden,
.communication-editor.hidden,
.communication-attachments-field.hidden,
.communication-compose-form textarea.hidden,
.communication-send-button.hidden,
.communication-reply-button.hidden,
.communication-omni-switch.hidden,
.communication-complete-task.hidden {
  display: none !important;
}

.communication-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 0 auto;
  max-width: 100%;
}

.communication-title-actions .communication-modal-close {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
}

.communication-title-actions .communication-complete-task {
  min-width: 122px;
  min-height: 38px;
  height: 38px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #cfd8ea;
  border-radius: 8px;
  background: #fff;
  color: #405174;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.communication-title-actions .communication-omni-switch {
  min-height: 38px;
  height: 38px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #cfd8ea;
  border-radius: 8px;
  background: #fff;
  color: #405174;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.communication-title-actions .communication-complete-task:hover {
  background: #f4f7fc;
  border-color: #b9c7df;
}

.communication-title-actions .communication-complete-task.is-invisible {
  visibility: hidden;
  pointer-events: none;
}

.communication-compose-grid {
  grid-template-columns: minmax(150px, 190px) minmax(230px, 0.8fr) minmax(0, 1fr);
}

.communication-compose-grid.email-compose-grid {
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
}

.communication-compose-form textarea,
.communication-editor {
  min-height: 46px;
  resize: none;
  border: 1px solid #cfd8ea;
  border-radius: 7px;
  padding: 14px 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.65;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #8d9bb3 #eef3fb;
}

.communication-editor {
  outline: none;
}

.communication-message-field {
  gap: 0;
}

.communication-message-field > span {
  margin-bottom: 7px;
}

.communication-compose-form textarea.communication-input-scroll,
.communication-editor.communication-input-scroll,
.communication-inline-reply textarea.communication-input-scroll {
  overflow-y: auto;
}

.communication-compose-form textarea::-webkit-scrollbar,
.communication-editor::-webkit-scrollbar,
.communication-inline-reply textarea::-webkit-scrollbar {
  width: 10px;
}

.communication-compose-form textarea::-webkit-scrollbar-track,
.communication-editor::-webkit-scrollbar-track,
.communication-inline-reply textarea::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #eef3fb;
}

.communication-compose-form textarea::-webkit-scrollbar-thumb,
.communication-editor::-webkit-scrollbar-thumb,
.communication-inline-reply textarea::-webkit-scrollbar-thumb {
  border: 2px solid #eef3fb;
  border-radius: 999px;
  background: #8d9bb3;
}

.communication-compose-form textarea::-webkit-scrollbar-thumb:hover,
.communication-editor::-webkit-scrollbar-thumb:hover,
.communication-inline-reply textarea::-webkit-scrollbar-thumb:hover {
  background: #6f7f99;
}

.communication-editor:empty::before {
  content: attr(data-placeholder);
  color: #8a96ad;
}

.wysiwyg-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfd8ea;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  margin-bottom: 0;
  padding: 6px;
  background: #f8fbff;
}

.wysiwyg-toolbar button {
  width: 34px;
  height: 34px;
  border: 1px solid #d8e2f2;
  border-radius: 6px;
  background: #fff;
  color: #10214a;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(20, 32, 70, 0.06);
}

.wysiwyg-toolbar button:hover {
  border-color: #b9c9ef;
  color: #0b4fff;
}

.wysiwyg-toolbar-spacer {
  flex: 1;
}

.wysiwyg-toolbar + .communication-editor {
  margin-top: 0;
  border-top: 0;
  border-radius: 0 0 7px 7px;
}

.attachment-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px dashed #bfcbe2;
  border-radius: 8px;
  padding: 9px 12px;
  background: #f8fbff;
  color: #405174;
  cursor: pointer;
}

.attachment-picker i {
  color: #0b4fff;
}

.attachment-picker strong {
  color: #0b4fff;
  font-size: 14px;
}

.attachment-picker em {
  color: #6b7890;
  font-size: 14px;
  font-style: normal;
  font-weight: 100;
}

.attachment-picker input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.communication-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.communication-thread {
  display: grid;
  gap: 0;
}

.communication-item {
  display: grid;
  grid-template-columns: 76px minmax(150px, 210px) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 98px;
  border: 0;
  border-bottom: 1px solid #e4ebf7;
  border-radius: 0;
  padding: 14px 16px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.communication-item:hover {
  background: #fbfdff;
  box-shadow: inset 3px 0 0 #4f63ff;
}

.communication-item.has-task {
  background: #f9fbff;
}

.communication-item.failed {
  box-shadow: inset 3px 0 0 #d22b3f;
  background: #fff8f8;
}

.communication-type-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid #dce6f5;
  border-radius: 12px;
  background: #f6f9ff;
  color: #0b4fff;
  font-size: 28px;
  box-shadow: 0 8px 18px rgba(20, 32, 70, 0.08);
}

.communication-item.email .communication-type-icon {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, #fff);
}

.communication-item.sms .communication-type-icon {
  color: #1689d8;
  background: #f1faff;
}

.communication-item.whatsapp .communication-type-icon {
  color: #128c3a;
  background: #e9fbf0;
}

.communication-item.has-task .communication-type-icon {
  color: #f49b16;
  background: #fff8e8;
}

.communication-type-block,
.communication-summary {
  display: grid;
  gap: 3px;
}

.communication-type-block strong,
.communication-summary h3 {
  margin: 0;
  color: #405174;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.15;
}

.communication-type-block span {
  color: #8a96a8;
  font-size: 15px;
  font-weight: 600;
}

.communication-item h3 {
  color: #405174;
  font-size: 18px;
}

.communication-item.has-task h3 {
  color: var(--muted);
}

.communication-summary p {
  margin: 0;
  color: #405174;
  font-size: 14px;
  font-weight: 100;
}

.communication-summary .communication-preview {
  color: #6b7890;
  font-size: 14px;
}

.communication-status-pill {
  justify-self: start;
  margin-top: 3px;
  border-radius: 5px;
  padding: 2px 6px;
  background: #eef3fb;
  color: #405174;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  text-transform: capitalize;
}

.communication-status-pill.status-sent,
.communication-status-pill.status-received,
.communication-status-pill.status-opened {
  background: #e8f7ea;
  color: #15923a;
}

.communication-status-pill.status-failed {
  background: #fff1f1;
  color: #d22b3f;
}

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

.communication-row-actions .button-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 38px;
  border-color: #cfd8ea;
  border-radius: 8px;
  color: #6b7890;
  background: #fff;
  box-shadow: 0 5px 12px rgba(20, 32, 70, 0.08);
}

.communication-attachment-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.communication-modal-actions {
  align-items: center;
}

.communication-modal-actions .communication-action-spacer {
  flex: 1 1 auto;
}

.communication-modal-actions .primary-button,
.communication-modal-actions .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 132px;
  margin-top: 0;
}

.communication-modal-actions .secondary-button {
  border: 1px solid #cfd8ea;
  background: #fff;
  color: #405174;
}

.communication-modal-actions .secondary-button:hover {
  background: #f4f7fc;
}

.communication-modal-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.communication-modal-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  min-width: 0;
}

.communication-modal-heading h2 {
  flex: 0 1 auto;
  min-width: 0;
}

.communication-modal-contact {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #53627f;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.communication-modal-contact:not(:empty)::before {
  content: "·";
  margin-right: 10px;
  color: #8a96ad;
}

.communication-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
}

.communication-pagination button,
.communication-pagination span {
  border: 1px solid #dbe5f5;
  border-radius: 8px;
  padding: 7px 10px;
  background: #fff;
  color: #10214a;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.communication-pagination button {
  cursor: pointer;
}

.communication-pagination button.disabled,
.communication-pagination button:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.communication-dialog {
  width: min(78vw, calc(100vw - 36px));
  min-width: 840px;
  overflow: hidden;
  height: calc(100vh - 96px);
  max-height: calc(100vh - 96px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.communication-dialog.communication-email-mode {
  width: min(94vw, 1500px);
}

.communication-dialog.communication-omni-mode {
  width: min(82vw, calc(100vw - 96px));
  max-width: calc(100vw - 96px);
  min-width: 0;
}

.payment-modal.communication-dialog.communication-omni-mode {
  width: min(82vw, calc(100vw - 96px));
  max-width: calc(100vw - 96px);
}

.communication-modal.communication-omni-mode:not(.communication-email-reply-open) .payment-modal.communication-dialog {
  box-sizing: border-box;
  padding-bottom: 18px !important;
}

.communication-modal-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.communication-modal-body > .communication-view:not(.hidden),
.communication-modal-body > .communication-compose-form:not(.hidden) {
  min-height: 0;
  align-self: stretch;
}

.modal-body.communication-modal-body {
  padding: 16px 16px 0;
}

.communication-modal-body,
.communication-view-frame {
  scrollbar-width: thin;
  scrollbar-color: #9aa7bd #f2f6fb;
}

.communication-modal-body::-webkit-scrollbar,
.communication-view-frame::-webkit-scrollbar {
  width: 8px;
}

.communication-modal-body::-webkit-scrollbar-track,
.communication-view-frame::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #f2f6fb;
}

.communication-modal-body::-webkit-scrollbar-thumb,
.communication-view-frame::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid #f2f6fb;
  background: #9aa7bd;
}

.communication-modal-body::-webkit-scrollbar-thumb:hover,
.communication-view-frame::-webkit-scrollbar-thumb:hover {
  background: #75839b;
}

.communication-view {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  position: relative;
}

.communication-view-meta {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #dce6f5;
  border-radius: 8px;
  overflow: hidden;
}

.communication-view-meta span {
  padding: 10px 12px;
  border-right: 1px solid #dce6f5;
  color: #405174;
  font-size: 14px;
  font-weight: 800;
}

.communication-view-meta span:last-child {
  border-right: 0;
}

.communication-view-frame {
  width: 100%;
  min-height: 0;
  border: 1px solid #dce6f5;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  color: #18223f;
  font-size: 14px;
  line-height: 1.55;
  overflow: auto;
}

.communication-chat-frame {
  min-height: 716px;
  background: #f7fbff;
  padding: 14px;
  overscroll-behavior: contain;
  overflow-x: hidden;
  overflow-y: auto;
}

.communication-omni-mode .communication-chat-frame {
  min-height: 716px;
  padding-right: 14px;
  overflow-x: hidden;
  overflow-y: auto;
}

.communication-omni-mode .communication-view {
  height: 100%;
  gap: 4px;
}

.communication-email-mode .communication-chat-frame {
  min-height: 716px;
  height: min(716px, calc(100vh - 290px));
  padding-bottom: 96px;
}

.communication-email-reply-open .communication-view {
  grid-template-rows: minmax(0, 0.78fr) auto minmax(0, 0.96fr);
  gap: 12px;
  padding-bottom: 14px;
}

.communication-modal.communication-omni-mode.communication-email-reply-open .communication-view {
  padding-bottom: 18px;
}

.communication-email-reply-open .communication-view-frame {
  grid-row: 1;
  height: 100%;
  min-height: 0;
}

.communication-email-reply-open .communication-omni-reply-actions {
  grid-row: 2;
}

.communication-email-reply-open .communication-inline-email-reply {
  grid-row: 3;
}

.communication-email-reply-open .communication-view-subject-wrap,
.communication-email-reply-open .communication-view-attachments {
  display: none !important;
}

.communication-email-reply-open .communication-chat-frame {
  height: 100%;
  min-height: 0;
  padding-bottom: 20px;
}

.communication-chat-thread {
  display: grid;
  gap: 10px;
}

.communication-chat-row.incoming + .communication-chat-row.outgoing,
.communication-chat-row.outgoing + .communication-chat-row.incoming {
  margin-top: 10px;
}

.communication-chat-row {
  display: flex;
  min-width: 0;
  max-width: 100%;
}

.communication-chat-row.incoming {
  justify-content: flex-start;
}

.communication-chat-row.outgoing {
  justify-content: flex-end;
}

.communication-chat-bubble {
  max-width: min(680px, 78%);
  border: 1px solid #d9e4f3;
  border-radius: 8px;
  padding: 10px 12px 6px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(20, 32, 70, 0.05);
}

.omni-chat-frame .communication-chat-bubble {
  max-width: min(680px, 78%);
  padding: 0 12px 6px;
  overflow: hidden;
}

.omni-chat-frame .communication-chat-row:has(.communication-chat-channel-email) .communication-chat-bubble {
  width: min(720px, 100%);
  max-width: min(720px, 100%);
  padding: 0;
  overflow: hidden;
}

.omni-chat-frame .communication-chat-row.outgoing .communication-chat-bubble:has(.communication-chat-channel-whatsapp) {
  border-color: #bcf0b8;
  background: #dcffd8;
}

.omni-chat-frame .communication-chat-row.outgoing .communication-chat-bubble:has(.communication-chat-channel-whatsapp) .communication-chat-channel-whatsapp {
  border-bottom-color: transparent;
  background: #dcffd8;
}

.omni-chat-frame .communication-chat-row.outgoing .communication-chat-bubble:has(.communication-chat-channel-sms) {
  border-color: #b9dcff;
  background: #dff0ff;
}

.omni-chat-frame .communication-chat-row.outgoing .communication-chat-bubble:has(.communication-chat-channel-sms) .communication-chat-channel-sms {
  border-bottom-color: transparent;
  background: #dff0ff;
}

.omni-chat-frame .communication-chat-row.outgoing .communication-chat-bubble:has(.communication-chat-channel-email) {
  border-color: color-mix(in srgb, var(--primary) 35%, #fff);
  background: color-mix(in srgb, var(--primary) 12%, #fff);
}

.omni-chat-frame .communication-chat-row.outgoing .communication-chat-bubble:has(.communication-chat-channel-email) .communication-chat-channel-email {
  border-bottom-color: color-mix(in srgb, var(--primary) 15%, #d9e4f3);
  background: color-mix(in srgb, var(--primary) 12%, #fff);
}

.communication-chat-row.outgoing .communication-chat-bubble {
  border-color: #b9dcff;
  background: #dff0ff;
}

.whatsapp-chat-frame .communication-chat-row.outgoing .communication-chat-bubble {
  border-color: #bcf0b8;
  background: #dcffd8;
}

.email-chat-frame .communication-chat-bubble {
  width: min(720px, 100%);
  max-width: min(720px, 100%);
  min-width: 0;
  overflow: visible;
}

.email-chat-frame .communication-chat-row.outgoing .communication-chat-bubble {
  border-color: color-mix(in srgb, var(--primary) 35%, #fff);
  background: color-mix(in srgb, var(--primary) 12%, #fff);
}

.communication-chat-subject {
  display: block;
  margin-bottom: 8px;
  color: #071033;
  font-size: 13px;
  font-weight: 600 !important;
}

.communication-chat-channel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0 -12px 8px;
  padding: 5px 10px;
  width: calc(100% + 24px);
  border-bottom: 1px solid rgba(20, 32, 70, 0.06);
  border-radius: 7px 7px 0 0;
  background: #eef3ff;
  color: #405174;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-align: left;
}

.communication-chat-channel-email {
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary);
}

.communication-chat-channel-sms {
  background: #e9f4ff;
  color: #1263b7;
}

.communication-chat-channel-whatsapp {
  background: #dcffd8;
  color: #128548;
}

.communication-chat-email-body {
  color: #071033;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.communication-chat-email-body > div {
  max-width: 100% !important;
}

.communication-chat-email-body .viewer-stripe-payment-email > div > div:first-child {
  padding: 18px 22px 2px !important;
}

.communication-chat-email-body .viewer-stripe-payment-email > div > div:first-child img[alt*="Wheelbase"] {
  width: 190px !important;
  max-width: 70% !important;
  margin: 0 !important;
}

.communication-chat-email-body .viewer-stripe-payment-email > div > div:nth-child(2) {
  padding-top: 14px !important;
}

.communication-chat-email-body table {
  max-width: 100% !important;
}

.viewer-stripe-quote-box {
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid #dfe7f4;
  border-radius: 8px;
  background: #fff;
}

.viewer-stripe-quote-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: start;
  border-bottom: 1px solid #dfe7f4;
  background: #f8fbff;
}

.viewer-stripe-quote-header strong {
  padding: 12px 14px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.viewer-stripe-quote-header strong:last-child {
  text-align: right;
}

.viewer-stripe-quote-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 104px;
  align-items: start;
  border-bottom: 1px solid #e5e7eb;
}

.viewer-stripe-quote-row:last-child {
  border-bottom: 0;
}

.viewer-stripe-quote-image {
  padding: 11px 0 11px 14px;
}

.viewer-stripe-quote-image img {
  width: 44px !important;
  height: 44px !important;
  object-fit: cover;
  border-radius: 6px;
}

.viewer-stripe-quote-copy {
  min-width: 0;
  padding: 11px 10px;
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
}

.viewer-stripe-quote-copy *,
.viewer-stripe-quote-copy strong,
.viewer-stripe-quote-copy span {
  display: block !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.viewer-stripe-quote-copy strong {
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

.viewer-stripe-quote-copy span {
  margin-top: 2px;
  color: #6b7280 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.viewer-stripe-quote-amount {
  min-width: 0;
  padding: 11px 14px 11px 8px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.communication-chat-email-body .viewer-quote-summary-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 104px;
  width: 100% !important;
}

.communication-chat-email-body .viewer-quote-summary-title,
.communication-chat-email-body .viewer-quote-summary-total {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.communication-chat-email-body .viewer-quote-summary-total {
  text-align: right !important;
}

.communication-chat-email-body .viewer-quote-line-row {
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) 104px;
  width: 100% !important;
}

.communication-chat-email-body .viewer-quote-line-image,
.communication-chat-email-body .viewer-quote-line-copy,
.communication-chat-email-body .viewer-quote-line-amount {
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.communication-chat-email-body .viewer-quote-line-copy,
.communication-chat-email-body .viewer-quote-line-copy * {
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.communication-chat-email-body .viewer-quote-line-copy strong,
.communication-chat-email-body .viewer-quote-line-copy span {
  display: block !important;
}

.communication-chat-email-body .viewer-quote-line-amount {
  text-align: right !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.communication-chat-email-body p {
  margin: 0 0 10px;
}

.communication-chat-email-body p:last-child {
  margin-bottom: 0;
}

.communication-chat-row.failed .communication-chat-bubble,
.whatsapp-chat-frame .communication-chat-row.failed .communication-chat-bubble {
  border-color: #f3b8c0;
  background: #fff3f4;
}

.communication-chat-bubble > p {
  margin: 0;
  color: #071033;
}

.communication-chat-attachments {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.communication-chat-attachments img {
  display: block;
  max-width: min(320px, 100%);
  max-height: 260px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.communication-chat-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #d5e0f0;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.62);
  color: #125cff;
  font-size: 14px;
  text-decoration: none;
}

.communication-chat-bubble > p a,
.communication-chat-bubble > a,
.communication-chat-bubble .communication-chat-subject + a {
  color: #125cff;
  text-decoration: underline;
  word-break: break-all;
}

.communication-chat-footer {
  display: block;
  margin-top: 4px;
  color: #53627f;
  font-size: 11px;
  text-align: right;
}

.omni-chat-frame .communication-chat-bubble .communication-chat-channel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: -1px -13px 8px;
  min-height: 26px;
  width: calc(100% + 26px);
  border-bottom-color: transparent;
  padding: 3px 10px 2px 13px;
  color: #405174;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

.omni-chat-frame .communication-chat-bubble .communication-chat-channel-whatsapp {
  color: #128548;
}

.omni-chat-frame .communication-chat-bubble .communication-chat-channel-sms {
  color: #1263b7;
}

.omni-chat-frame .communication-chat-bubble .communication-chat-channel-email {
  color: var(--primary);
}

.omni-chat-frame .communication-chat-bubble:has(.communication-chat-channel-email) .communication-chat-channel-email {
  align-items: center;
  margin: 0;
  width: 100%;
  min-height: 30px;
  border-radius: 7px 7px 0 0;
  border-bottom: 0;
  padding: 0 12px;
  background: color-mix(in srgb, var(--primary) 12%, #fff);
}

.omni-chat-frame .communication-chat-bubble:has(.communication-chat-channel-email) .communication-chat-subject {
  margin: 0;
  padding: 8px 12px 10px;
  color: var(--muted);
}

.omni-chat-frame .communication-chat-bubble:has(.communication-chat-channel-email) .communication-chat-email-body {
  padding: 10px 12px 8px;
}

.omni-chat-frame .communication-chat-bubble:has(.communication-chat-channel-email) .communication-chat-footer {
  padding: 0 12px 8px;
}

.communication-chat-footer.failed {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: #53627f;
  font-weight: 400;
}

.communication-chat-footer.processing {
  color: #53627f;
  font-weight: 400;
}

.communication-chat-footer em {
  font-style: normal;
}

.communication-failed-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #f3b8c0;
  border-radius: 999px;
  background: #fff3f4;
  color: #b42332;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.communication-failed-pill.copied::after {
  content: "Copied";
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 6px 8px;
  border-radius: 7px;
  background: #071033;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 10px 25px rgba(7, 16, 51, 0.2);
}

.communication-failed-pill::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  width: min(360px, 70vw);
  height: 12px;
}

.communication-failed-tooltip {
  position: absolute;
  display: block;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 6;
  width: min(360px, 70vw);
  padding: 10px 12px;
  border: 1px solid #f3b8c0;
  border-radius: 8px;
  background: #fff;
  color: #842029;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  box-shadow: 0 14px 34px rgba(132, 32, 41, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  transform: translateY(3px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}

.communication-failed-tooltip strong {
  display: block;
  font: inherit;
  text-align: left;
}

.communication-failed-tooltip small {
  display: block;
  margin-top: 7px;
  color: #53627f;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.communication-failed-pill:hover .communication-failed-tooltip,
.communication-failed-pill:focus-visible .communication-failed-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.communication-failed-pill.copied .communication-failed-tooltip small {
  color: #187545;
}

.communication-failed-pill.copied .communication-failed-tooltip small::before {
  content: "Copied";
  display: block;
  margin-bottom: 2px;
}

.communication-inline-reply {
  display: grid;
  grid-template-columns: 34px 34px 1fr 46px;
  align-items: end;
  gap: 10px;
  margin-top: 0;
  padding: 6px 0;
  position: relative;
}

.communication-view:not(.communication-email-reply-open):has(.communication-inline-reply:not(.hidden)) {
  --communication-reply-space: 0px;
  gap: 0;
  padding-bottom: 0;
}

.communication-view:not(.communication-email-reply-open):has(.communication-inline-reply:not(.hidden)) .communication-chat-frame {
  height: 100%;
  min-height: 0;
  padding-bottom: 16px;
}

.communication-omni-mode .communication-view:not(.communication-email-reply-open):has(.communication-inline-reply:not(.hidden)) .communication-chat-frame {
  height: 100%;
  min-height: 0;
}

.communication-view:not(.communication-email-reply-open) > .communication-inline-reply:not(.hidden) {
  position: relative;
  z-index: 5;
  margin-top: 0;
  padding: 12px 0;
  background: #fff;
}

.communication-omni-reply-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 12px 0;
}

.communication-modal.communication-omni-mode:not(.communication-email-reply-open) .communication-view:has(.communication-inline-reply.hidden) .communication-omni-reply-actions:not(.hidden) {
  padding: 16px 0 0;
}

.communication-omni-reply-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  max-width: 100%;
  border: 1px solid #cfd8ea;
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
  color: #071033;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.communication-omni-reply-actions button i {
  flex: 0 0 auto;
}

.communication-omni-reply-actions button:hover {
  border-color: #b9c7df;
  background: #f7f9fd;
}

.communication-omni-reply-actions button.active[data-reply-channel="email"] {
  border-color: color-mix(in srgb, var(--primary) 40%, #cfd8ea);
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary);
}

.communication-omni-reply-actions button.active[data-reply-channel="sms"] {
  border-color: #b9dcff;
  background: #dff0ff;
  color: #1263b7;
}

.communication-omni-reply-actions button.active[data-reply-channel="whatsapp"] {
  border-color: #bcf0b8;
  background: #dcffd8;
  color: #128548;
}

.communication-omni-reply-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.communication-omni-mode .communication-inline-reply {
  align-items: end;
  margin-top: 0;
  padding: 10px 0;
}

.communication-omni-mode .communication-view:not(.communication-email-reply-open) {
  --communication-reply-space: 0px;
  padding-bottom: 12px;
}

.communication-omni-mode .communication-view:not(.communication-email-reply-open) > .communication-inline-reply:not(.hidden) {
  padding: 10px 0 12px;
}

.communication-omni-mode .communication-omni-reply-actions:not(.hidden) + .communication-inline-reply:not(.hidden) {
  margin-top: 0;
}

.communication-inline-reply textarea {
  min-height: 44px;
  resize: none;
  border: 1px solid #d5e0f0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: #071033;
  font: inherit;
  line-height: 1.35;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #8d9bb3 #eef3fb;
  box-shadow: inset 0 1px 0 rgba(20, 32, 70, 0.03);
}

.communication-inline-reply textarea:focus {
  outline: 0;
  border-color: #5a62ff;
  box-shadow: 0 0 0 3px rgba(90, 98, 255, 0.12);
}

.communication-inline-email-reply {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  row-gap: 0;
  width: min(996px, calc(92% - 56px));
  max-width: min(996px, calc(92% - 56px));
  height: 100%;
  min-height: 0;
  overflow: visible;
  margin-left: auto;
  margin-right: 56px;
  padding: 10px 0 0;
  position: relative;
}

.communication-email-reply-open .communication-inline-email-reply,
.communication-email-reply-open .communication-inline-email-reply input,
.communication-email-reply-open .communication-inline-email-reply button,
.communication-email-reply-open .communication-inline-email-reply .communication-editor,
.communication-email-reply-open .communication-inline-email-reply .reply-email-card,
.communication-email-reply-open .communication-inline-email-reply .reply-email-signature {
  font-size: 14px;
}

.communication-inline-email-reply .wysiwyg-toolbar {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.communication-inline-email-subject-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
  margin: 0 0 8px;
}

.communication-inline-email-subject-field span {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.communication-inline-email-subject-field input {
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.35;
}

.communication-inline-email-subject-field input:focus {
  outline: 0;
  border: 0;
  box-shadow: none;
}

.communication-inline-email-editor {
  grid-column: 1;
  grid-row: 3;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  background: #f3f6fb;
  overflow-y: auto;
}

.communication-inline-email-send {
  grid-column: 1;
  grid-row: 3;
  justify-self: end;
  align-self: end;
  width: 46px;
  min-width: 46px;
  height: 44px;
  margin: 0;
  padding: 0;
  position: absolute;
  right: -56px;
  bottom: 0;
}

.communication-inline-email-editor .reply-email-shell {
  min-height: 100%;
  padding: 24px;
  background: #f3f6fb;
}

.communication-inline-email-editor .reply-email-card {
  max-width: 720px;
  min-height: calc(100% - 48px);
  margin: 0 auto;
  padding: 26px 30px;
  border: 1px solid #d9e4f3;
  border-radius: 8px;
  background: #fff;
  color: #071033;
  line-height: 1.65;
}

.communication-inline-email-editor .reply-email-card p {
  margin: 0 0 14px;
}

.communication-inline-email-editor .reply-email-edit-point {
  min-height: 1.65em;
}

.communication-inline-email-editor .reply-email-signature {
  margin-top: 20px;
  padding-top: 0;
  color: #405174;
  line-height: 1.35;
}

.communication-inline-email-editor .reply-email-signature p {
  margin: 0 0 9px;
}

.communication-inline-email-editor .reply-email-signature img {
  display: block;
  width: 155px;
  max-width: 70%;
  height: auto;
  margin-top: 4px;
}

.communication-chat-email-body img {
  display: block;
  max-width: 100%;
  height: auto;
}

.communication-chat-email-body img[alt*="Wheelbase"],
.communication-chat-email-body img[src*="wheelbase-logo"] {
  margin-bottom: 0 !important;
}

.communication-inline-send {
  display: inline-grid;
  place-items: center;
  align-self: end;
  width: 46px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: #5661ff;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(20, 32, 70, 0.12);
}

.communication-inline-send:hover {
  background: #404be6;
}

.communication-inline-email-reply .communication-inline-email-send {
  display: inline-grid;
  place-items: center;
  width: 46px;
  min-width: 46px;
  height: 44px;
}

.communication-inline-attach,
.communication-inline-emoji {
  display: inline-grid;
  place-items: center;
  align-self: end;
  width: 34px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #071033;
  cursor: pointer;
  font-size: 19px;
}

.communication-inline-attach:hover,
.communication-inline-emoji:hover {
  color: #125cff;
}

.communication-emoji-picker {
  position: absolute;
  right: 56px;
  bottom: 54px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(10, 30px);
  gap: 4px;
  max-width: 340px;
  border: 1px solid #d5e0f0;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(20, 32, 70, 0.18);
}

.communication-emoji-picker button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

.communication-emoji-picker button:hover {
  background: #eef4ff;
}

.communication-inline-file {
  grid-column: 3 / 5;
  margin-top: -4px;
  color: #53627f;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.communication-view-frame img {
  max-width: 100%;
  height: auto;
}

.communication-view-frame pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
}

.email-quoted-thread {
  margin-top: 16px;
}

.email-quoted-thread summary {
  display: inline-flex;
  align-items: center;
  height: 20px;
  border-radius: 999px;
  padding: 0 8px 4px;
  background: #eef3fb;
  color: #6b7890;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.email-quoted-thread summary::-webkit-details-marker {
  display: none;
}

.email-quoted-thread blockquote,
.email-quoted-thread .gmail_quote {
  margin: 10px 0 0;
  border-left: 3px solid #d8e2f2 !important;
  padding-left: 12px !important;
  color: #58657d;
}

@media (max-width: 900px) {
  .communication-dialog {
    width: calc(100vw - 24px);
    min-width: 0;
  }

  .communication-compose-grid {
    grid-template-columns: 1fr;
  }
}

.communication-view-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.communication-view-attachments a {
  border: 1px solid #dce6f5;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: #0b4fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.history-list {
  max-height: 360px;
  overflow: auto;
}

.empty-history {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(190px, 0.9fr) minmax(260px, 2fr) minmax(170px, 0.8fr);
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.history-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.history-item strong {
  color: var(--muted);
  font-size: 14px;
}

.history-item > span,
.history-item em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
}

.history-item p {
  margin: 0;
  color: #18223f;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.history-item > span {
  justify-self: end;
  text-align: right;
}

.topbar {
  height: 56px;
  border-bottom-color: #dfe6f4;
  box-shadow: 0 1px 8px rgba(20, 32, 70, 0.08);
}

.search {
  width: 360px;
  height: 34px;
  border: 1px solid #dfe5f2;
  border-radius: 7px;
  background: #f9fbff;
  box-shadow: 0 4px 12px rgba(20, 32, 70, 0.06);
}

.detail-content {
  padding: 22px 30px 80px;
}

.detail-hero {
  margin: -22px -30px 20px;
  padding: 20px 30px 18px;
  background: rgba(246, 248, 252, 0.96);
  backdrop-filter: blur(10px);
}

.detail-hero h1 {
  font-size: 31px;
  letter-spacing: 0;
}

.back-link {
  color: #064bb6;
}

.hero-title-row .order-status-label {
  border-radius: 8px;
  padding: 5px 12px;
  line-height: 1.05;
}

.hero-title-row .order-status-label.awaiting-processing {
  border: 1px solid #ff7a2a;
  background: #fff7f1;
  color: #ff5b00;
}

.hero-title-row .order-status-label.awaiting-payment {
  border: 1px solid #ffd7df;
  background: #fff2f5;
  color: #bf1e2e;
}

.hero-title-row .order-status-label.invoice-status {
  border: 1px solid #d5f1df;
  background: #effaf3;
  color: #11883a;
}

.secondary-action {
  min-height: 42px;
  border-color: #d7dfef;
  border-radius: 9px;
  box-shadow: 0 7px 16px rgba(20, 32, 70, 0.08);
}

.primary-button.compact {
  min-height: 42px;
  border-radius: 9px;
  background: linear-gradient(135deg, #5e5bff, #496dff);
  box-shadow: 0 9px 18px rgba(64, 89, 255, 0.26);
}

.detail-sections {
  gap: 14px;
}

.order-detail-form:not(.customer-detail-form) > .detail-sections {
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr) minmax(0, 1fr);
}

.order-detail-form.supplier-detail-form > .detail-sections {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.order-detail-form:not(.customer-detail-form) > .detail-sections > .top-address-pair {
  grid-column: span 2;
}

.customer-detail-form:has(.top-address-pair) > .detail-sections {
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr) minmax(0, 1fr);
}

.customer-detail-form:has(.top-address-pair) > .detail-sections > .top-address-pair {
  grid-column: span 2;
}

.segment-panel {
  border-color: #d7e1f2;
  border-radius: 10px;
  box-shadow: 0 7px 18px rgba(20, 32, 70, 0.08);
}

.address-panel {
  overflow: visible;
}

.segment-title {
  min-height: 45px;
  border-bottom-color: #dfe7f4;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: #08143a;
}

.segment-title h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}

.segment-title h2 i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #eaf0ff;
  color: #145cff;
  font-size: 14px;
}

.segment-title > span {
  border-radius: 8px;
  padding: 4px 8px;
  background: #edf3ff;
  color: #0954d9;
  font-size: 13px;
}

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

.account-grid .detail-field {
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid #dfe7f4;
}

.account-grid .detail-field:last-child,
.account-grid .detail-field:nth-last-child(2):nth-child(odd) {
  border-bottom: 0;
}

.account-grid .detail-field span {
  color: #445675;
}

.account-grid .detail-field input {
  height: 30px;
  border: 0;
  background: transparent;
  font-weight: 100;
}

.supplier-detail-form > .supplier-sections {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.supplier-detail-form {
  width: 100%;
  max-width: none;
}

.supplier-left-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.supplier-detail-form .supplier-card {
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(7, 16, 51, 0.06);
}

.supplier-detail-form .supplier-card-address {
  grid-column: auto;
}

.supplier-detail-form .supplier-field-grid,
.supplier-detail-form .supplier-main-grid,
.supplier-detail-form .supplier-contact-grid,
.supplier-detail-form .supplier-address-grid {
  display: grid;
  gap: 14px 16px;
}

.supplier-detail-form .supplier-main-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supplier-detail-form .supplier-contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supplier-detail-form .supplier-address-grid {
  grid-template-columns: 1fr;
}

.supplier-detail-form .supplier-field-country {
  grid-column: auto;
}

.supplier-detail-form .supplier-field-grid .detail-field,
.supplier-detail-form .supplier-field {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 38px;
  gap: 12px;
  border-bottom: 1px solid #dfe7f4;
}

.supplier-detail-form .supplier-field-grid .detail-field:nth-last-child(-n + 2),
.supplier-detail-form .supplier-field:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.supplier-detail-form .supplier-field-grid .detail-field span,
.supplier-detail-form .supplier-field span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.supplier-detail-form .supplier-field-grid .detail-field input,
.supplier-detail-form .supplier-field input,
.supplier-detail-form .supplier-field select {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 100;
}

.supplier-detail-form .supplier-phone-ext-control {
  display: grid;
  grid-template-columns: 230px 32px 72px;
  align-items: center;
  column-gap: 10px;
  min-width: 0;
  width: 100%;
}

.supplier-detail-form .supplier-phone-ext-control .supplier-phone-input {
  width: 100%;
}

.supplier-detail-form .supplier-phone-ext-field .supplier-phone-ext-control .supplier-ext-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  color: #445675;
  font-size: 14px;
  font-weight: 100;
  line-height: 30px;
}

.supplier-detail-form .supplier-phone-ext-control .supplier-ext-input {
  text-align: left;
}

.supplier-detail-form .supplier-field-grid .detail-field input:focus,
.supplier-detail-form .supplier-field input:focus,
.supplier-detail-form .supplier-field select:focus {
  outline: none;
  box-shadow: inset 0 -2px 0 rgba(85, 98, 255, 0.42);
}

.supplier-detail-form .supplier-checkbox {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 38px;
  border: 0;
  border-bottom: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.supplier-detail-form .supplier-checkbox input {
  justify-self: start;
  width: 22px;
  height: 22px;
  accent-color: var(--primary);
}

@media (max-width: 1180px) {
  .supplier-detail-form > .supplier-sections,
  .supplier-detail-form .supplier-main-grid,
  .supplier-detail-form .supplier-contact-grid,
  .supplier-detail-form .supplier-address-grid {
    grid-template-columns: 1fr;
  }

  .supplier-detail-form .supplier-field-grid .detail-field,
  .supplier-detail-form .supplier-field,
  .supplier-detail-form .supplier-checkbox {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .supplier-detail-form .supplier-field-country {
    grid-column: auto;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }
}

.payment-row {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 0;
}

.payment-grid-head,
.payment-grid-row {
  display: grid;
  grid-template-columns:
    minmax(190px, 1.35fr)
    minmax(124px, 0.9fr)
    minmax(112px, 0.78fr)
    minmax(136px, 0.95fr)
    minmax(220px, 1.55fr)
    minmax(146px, 1fr)
    minmax(86px, 0.6fr)
    minmax(96px, 0.66fr)
    minmax(110px, 0.76fr)
    38px;
  column-gap: 16px;
  min-width: 0;
}

.payment-grid-head {
  min-height: 36px;
  align-items: end;
  border-bottom: 1px solid #dfe7f4;
}

.payment-grid-row {
  min-height: 42px;
  align-items: center;
  border-bottom: 1px solid #dfe7f4;
}

.payment-detail-checks span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  padding: 4px 7px;
  background: #f5f8ff;
  color: #304162;
  font-size: 11px;
  font-weight: 700;
}

.payment-detail-checks .check-pass {
  background: #eaf8ef;
  color: #078332;
}

.payment-detail-checks .check-fail {
  background: #fff2f2;
  color: #c42032;
}

.payment-grid-head > span,
.payment-grid-row > div,
.payment-grid-row > button {
  padding: 0;
}

.payment-grid-head > span {
  padding-bottom: 8px;
  color: #445675;
  font-size: 14px;
  font-weight: 600;
}

.payment-check-cell strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  border-radius: 5px;
  padding: 4px 7px;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.payment-check-cell .check-pass {
  background: #eaf8ef;
  color: #078332;
}

.payment-check-cell .check-fail {
  background: #fff2f2;
  color: #c42032;
}

.payment-grid-row strong,
.payment-reference strong {
  display: block;
  color: #061337;
  font-size: 14px;
  font-weight: 100;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-grid-row strong.payment-method {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  font-weight: 100;
  text-overflow: ellipsis;
}

.payment-grid-row strong.payment-method .payment-method-logo {
  flex: 0 0 42px;
}

.payment-status-pill {
  display: inline-block;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 10px;
  line-height: 1.2;
}

.payment-grid-row .payment-status-completed {
  background: #eaf8ef;
  color: #10903a;
  box-shadow: inset 0 0 0 1px #d8f1df;
}

.payment-grid-row .payment-status-pending {
  background: #fff3e8;
  color: #ff5a00;
  box-shadow: inset 0 0 0 1px #ffe1c4;
}

.payment-grid-row .payment-status-refunded {
  border: 1px solid #ffd7df;
  background: #fff2f5;
  color: #bf1e2e;
}

.payment-status-pill,
.fulfilment-status,
.po-status-pill {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 100;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-grid-row .payment-status-completed,
.fulfilment-status-green,
.po-status-green {
  background: #eaf8ef;
  color: #10903a;
  box-shadow: inset 0 0 0 1px #d8f1df;
}

.payment-grid-row .payment-status-pending,
.fulfilment-status-amber,
.po-status-amber {
  background: #fff3e8;
  color: #ff5a00;
  box-shadow: inset 0 0 0 1px #ffe1c4;
}

.payment-grid-row .payment-status-refunded,
.fulfilment-status-red,
.po-status-red {
  background: #fff2f5;
  color: #bf1e2e;
  box-shadow: inset 0 0 0 1px #ffd7df;
}

.fulfilment-status-blue,
.po-status-blue {
  background: #eef5ff;
  color: #125cff;
  box-shadow: inset 0 0 0 1px #c9dcff;
}

.payment-method {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.payment-method-logo {
  display: inline-grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 20px;
  margin-right: 0;
  border-radius: 4px;
  background: #f6f8ff;
  color: #635bff;
  font-size: 10px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px #dfe7ff;
}

.payment-method-logo i {
  font-size: 14px;
  line-height: 1;
}

.payment-method-logo-paypal {
  background: #f2fbff;
  color: #2a6f98;
  box-shadow: inset 0 0 0 1px #d7effb;
}

.payment-method-logo-stripe {
  background: #f7f5ff;
  color: #6557c7;
  box-shadow: inset 0 0 0 1px #e3dcff;
}

.payment-method-logo-v12 {
  background: #fff5ed;
  color: #936141;
  box-shadow: inset 0 0 0 1px #f3dbc8;
}

.payment-method-logo-ebay {
  background: #fffbea;
  color: #80681f;
  box-shadow: inset 0 0 0 1px #eadf9f;
}

.payment-method-logo-snap {
  background: #f6ffec;
  color: #557a26;
  box-shadow: inset 0 0 0 1px #dcefb9;
}

.payment-method-logo-pdq {
  background: #fbf3ff;
  color: #7b559b;
  box-shadow: inset 0 0 0 1px #ead7f7;
}

.payment-method-logo-cash {
  background: #ecfffb;
  color: #24756c;
  box-shadow: inset 0 0 0 1px #c7eee8;
}

.payment-method-logo-balance {
  background: #fff3f6;
  color: #9a5870;
  box-shadow: inset 0 0 0 1px #f0d4df;
}

.payment-method-logo-card {
  color: #0b49d8;
  font-style: italic;
  letter-spacing: -0.5px;
}

.payment-method-logo-text {
  color: #334164;
  font-size: 13px;
  font-weight: 600;
}

.payment-view-button {
  align-self: center;
  justify-self: center;
  min-width: 28px;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #125cff;
  box-shadow: none;
}

.payment-view-button:hover {
  background: transparent;
  box-shadow: none;
}

.payment-row {
  cursor: pointer;
}

.payment-add-button,
.line-add-button {
  justify-self: end;
  width: auto;
  min-width: 0;
  min-height: 32px;
  border-color: #d8e2f5;
  color: var(--primary);
  box-shadow: 0 5px 12px rgba(20, 32, 70, 0.1);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 16, 51, 0.45);
}

.modal-backdrop.hidden {
  display: none;
}

.payment-modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid #cfdaf0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 32, 70, 0.28);
}

.payment-detail-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(780px, calc(100vw - 48px));
}

.modal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #dce5f4;
  background: #f8fbff;
}

.modal-title h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #071033;
  font-size: 18px;
  font-weight: 600;
}

.modal-title h2 i {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #eef4ff;
  color: #125cff;
  font-size: 14px;
}

.modal-body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 16px;
}

.payment-modal.communication-dialog .modal-body.communication-modal-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.payment-modal.communication-dialog .communication-modal-body > .communication-view:not(.hidden) {
  align-self: stretch;
  height: 100%;
  min-height: 0;
}

.communication-modal.communication-omni-mode .payment-modal.communication-dialog .modal-body.communication-modal-body {
  padding-bottom: 18px;
}

.communication-modal.communication-omni-mode:not(.communication-email-reply-open) .payment-modal.communication-dialog .communication-view {
  box-sizing: border-box;
  height: 100%;
  padding-bottom: 0;
}

.communication-modal.communication-omni-mode:not(.communication-email-reply-open) .payment-modal.communication-dialog .communication-view > .communication-inline-reply:not(.hidden) {
  padding-bottom: 0;
  margin-bottom: 0;
}

.payment-modal.communication-dialog.communication-omni-mode .modal-body.communication-modal-body,
.communication-modal.communication-omni-mode .payment-modal.communication-dialog .modal-body.communication-modal-body {
  box-sizing: border-box;
  grid-template-rows: minmax(0, 1fr) 22px !important;
  padding-bottom: 0 !important;
}

.payment-modal.communication-dialog.communication-omni-mode .modal-body.communication-modal-body::after,
.communication-modal.communication-omni-mode .payment-modal.communication-dialog .modal-body.communication-modal-body::after {
  content: "";
  display: block;
  min-height: 22px;
}

.communication-modal.communication-omni-mode.communication-email-reply-open .payment-modal.communication-dialog .modal-body.communication-modal-body {
  grid-template-rows: minmax(0, 1fr) !important;
}

.communication-modal.communication-omni-mode.communication-email-reply-open .payment-modal.communication-dialog .modal-body.communication-modal-body::after {
  display: none;
  min-height: 0;
}

.payment-modal.communication-dialog.communication-omni-mode .communication-view:not(.communication-email-reply-open),
.communication-modal.communication-omni-mode:not(.communication-email-reply-open) .payment-modal.communication-dialog .communication-view {
  box-sizing: border-box;
  height: auto !important;
  min-height: 0;
}

.payment-modal.communication-dialog.communication-omni-mode .communication-view:not(.communication-email-reply-open) > .communication-inline-reply:not(.hidden),
.communication-modal.communication-omni-mode:not(.communication-email-reply-open) .payment-modal.communication-dialog .communication-view > .communication-inline-reply:not(.hidden) {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.communication-modal.communication-omni-mode:not(.communication-email-reply-open) .payment-modal.communication-dialog .communication-inline-reply:not(.hidden) {
  margin-top: 18px !important;
  transform: translateY(-18px);
}

.communication-modal.communication-sms-mode .payment-modal.communication-dialog .communication-view,
.communication-modal.communication-whatsapp-mode .payment-modal.communication-dialog .communication-view {
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 72vh;
}

.communication-modal.communication-sms-mode .payment-modal.communication-dialog .communication-view-meta,
.communication-modal.communication-sms-mode .payment-modal.communication-dialog .communication-view-subject-wrap,
.communication-modal.communication-sms-mode .payment-modal.communication-dialog .communication-view-attachments,
.communication-modal.communication-whatsapp-mode .payment-modal.communication-dialog .communication-view-meta,
.communication-modal.communication-whatsapp-mode .payment-modal.communication-dialog .communication-view-subject-wrap,
.communication-modal.communication-whatsapp-mode .payment-modal.communication-dialog .communication-view-attachments {
  display: none !important;
}

.communication-modal.communication-sms-mode .payment-modal.communication-dialog .communication-chat-frame,
.communication-modal.communication-whatsapp-mode .payment-modal.communication-dialog .communication-chat-frame {
  min-height: 0;
}

.payment-detail-modal .modal-body {
  overflow: auto;
}

.payment-detail-modal .modal-body::-webkit-scrollbar {
  width: 10px;
}

.payment-detail-modal .modal-body::-webkit-scrollbar-track {
  background: #f3f6fb;
}

.payment-detail-modal .modal-body::-webkit-scrollbar-thumb {
  border: 2px solid #f3f6fb;
  border-radius: 999px;
  background: #9aa7bd;
}

.order-image-modal {
  width: min(680px, calc(100vw - 28px));
}

.order-image-modal .modal-body {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 18px;
}

.order-image-modal img {
  display: block;
  width: min(560px, 100%);
  max-height: min(70vh, 560px);
  object-fit: contain;
}

#stripe-payment-modal.payment-mode-link .modal-body {
  min-height: 380px;
}

#stripe-payment-modal.payment-mode-manual .modal-body {
  min-height: 380px;
}

.accessory-modal {
  max-width: 520px;
}

.accessory-options {
  grid-template-columns: 1fr;
  gap: 10px;
}

.accessory-options button {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d7e1f2;
  border-radius: 8px;
  background: #fff;
  color: #071033;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(24, 39, 75, 0.06);
}

.accessory-options button:hover {
  border-color: #8aa7ff;
  background: #f8fbff;
}

.accessory-options img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.accessory-options button > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.accessory-options strong {
  font-size: 14px;
}

.accessory-options em {
  color: #53627f;
  font-size: 12px;
  font-style: normal;
}

.payment-modal .hidden {
  display: none !important;
}

.payment-modal .detail-field .money-field.compact-money-field {
  display: inline-flex;
  align-items: center;
  width: 150px;
  height: 42px;
  border: 1px solid #cbd7ed;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(20, 32, 70, 0.03);
}

.payment-modal .detail-field .money-field.compact-money-field:focus-within {
  border-color: #5a62ff;
  box-shadow: 0 0 0 3px rgba(90, 98, 255, 0.12);
}

.payment-modal .detail-field .money-field.compact-money-field b {
  padding-left: 13px;
  color: #071033;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.payment-modal .detail-field .money-field.compact-money-field input#stripe-payment-amount {
  flex: 1;
  width: auto;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0 12px 0 6px;
  background: transparent;
  color: #071033;
  font-size: 15px;
  text-align: left;
  box-shadow: none;
  appearance: textfield;
}

.payment-modal .detail-field .money-field.compact-money-field input#stripe-payment-amount:focus {
  outline: 0;
}

.payment-modal .detail-field .money-field.compact-money-field input#stripe-payment-amount[readonly] {
  cursor: default;
  font-weight: 600;
}

.payment-modal .detail-field .money-field.compact-money-field:has(input#stripe-payment-amount[readonly]):focus-within {
  border-color: #cbd7ed;
  box-shadow: inset 0 1px 0 rgba(20, 32, 70, 0.03);
}

.stripe-card-field {
  min-height: 42px;
  padding: 12px 13px;
  border: 1px solid #cbd7ed;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(20, 32, 70, 0.03);
}

.stripe-card-field.StripeElement--focus {
  border-color: #5a62ff;
  box-shadow: 0 0 0 3px rgba(90, 98, 255, 0.12);
}

.payment-link-options {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce5f4;
  border-radius: 7px;
  background: #fbfdff;
}

.payment-link-options > span {
  color: #485778;
  font-size: 14px;
  font-weight: 600;
}

.payment-link-options label {
  display: grid;
  grid-template-columns: auto 78px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
  min-height: 28px;
  color: #071033;
  font-size: 14px;
}

.payment-link-options input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.payment-link-options strong {
  font-size: 14px;
}

.payment-link-options em {
  min-width: 0;
  color: #485778;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-link-options input:disabled ~ strong,
.payment-link-options input:disabled ~ em {
  color: #9aa7bd;
}

.stripe-payment-message {
  min-height: 20px;
  margin: 0;
  color: #485778;
  font-size: 14px;
}

.stripe-payment-message.is-error {
  color: #b42318;
}

.stripe-payment-message.is-success {
  color: #078332;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #dce5f4;
  background: #fbfdff;
}

.payment-detail-content {
  display: grid;
  gap: 12px;
}

.payment-detail-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.payment-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #dfe7f4;
  border-radius: 7px;
  overflow: hidden;
}

.payment-detail-grid > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  min-height: 38px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #dfe7f4;
}

.payment-detail-grid > .payment-detail-section {
  grid-column: 1 / -1;
  min-height: 34px;
  border-right: 0;
  background: #f6f9ff;
}

.payment-detail-grid > .payment-detail-section strong {
  grid-column: 1 / -1;
  color: #071033;
  font-size: 14px;
  font-weight: 900;
}

.payment-detail-grid > div:nth-child(odd) {
  border-right: 1px solid #dfe7f4;
}

.payment-detail-grid > .payment-detail-section:nth-child(odd) {
  border-right: 0;
}

.payment-detail-grid > .payment-detail-json {
  grid-column: 1 / -1;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: start;
  border-right: 0;
}

.payment-detail-grid span {
  color: #485778;
  font-size: 14px;
  font-weight: 600;
}

.payment-detail-grid strong {
  min-width: 0;
  color: #071033;
  font-size: 14px;
  font-weight: 100;
  overflow-wrap: anywhere;
}

.payment-detail-copy-row {
  position: relative;
  cursor: pointer;
}

.payment-detail-copy-row:hover {
  background: #f8fbff;
}

.payment-detail-copy-toast {
  position: absolute;
  right: 10px;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #bfe9cd;
  border-radius: 999px;
  background: #eefbf3;
  color: #078332;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(20, 32, 70, 0.12);
  opacity: 1;
  transition: opacity 220ms ease, transform 220ms ease;
}

.payment-detail-copy-toast.is-error {
  border-color: #f3b8c0;
  background: #fff3f4;
  color: #b42332;
}

.payment-detail-copy-toast.is-fading {
  opacity: 0;
  transform: translateY(-50%) translateY(-4px);
}

.payment-detail-grid .payment-detail-link-value a,
.payment-detail-grid strong > a {
  color: inherit;
  font: inherit;
}

.payment-detail-grid .payment-detail-link-value a:hover,
.payment-detail-grid strong > a:hover {
  color: inherit;
  text-decoration: underline;
}

.payment-detail-grid pre {
  max-height: 240px;
  margin: 0;
  overflow: auto;
  border: 1px solid #dfe7f4;
  border-radius: 6px;
  background: #f8fbff;
  color: #071033;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  padding: 10px;
  white-space: pre-wrap;
}

.fulfilment-detail-stack {
  display: grid;
  gap: 14px;
}

.fulfilment-detail-section {
  overflow: hidden;
  border: 1px solid #dfe7f4;
  border-radius: 7px;
  background: #fff;
}

.fulfilment-detail-section h3 {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #dfe7f4;
  background: #f6f9ff;
  color: #071033;
  font-size: 14px;
  font-weight: 900;
}

.fulfilment-detail-section .payment-detail-grid {
  border: 0;
  border-radius: 0;
}

.fulfilment-detail-section .payment-detail-grid > div:last-child,
.fulfilment-detail-section .payment-detail-grid > div:nth-last-child(2):nth-child(odd) {
  border-bottom: 0;
}

.fulfilment-parcel-table {
  overflow-x: auto;
}

.fulfilment-parcel-table table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #fff;
}

.fulfilment-parcel-table th,
.fulfilment-parcel-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #dfe7f4;
  color: #071033;
  font-size: 14px;
  text-align: left;
  vertical-align: top;
}

.fulfilment-parcel-table th {
  background: #f6f9ff;
  color: #485778;
  font-size: 12px;
  font-weight: 900;
}

.fulfilment-parcel-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fulfilment-event-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fulfilment-event-list li {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border-bottom: 1px solid #dfe7f4;
}

.fulfilment-event-list li:last-child {
  border-bottom: 0;
}

.fulfilment-event-list time {
  color: #485778;
  font-size: 13px;
  font-weight: 800;
}

.fulfilment-event-list div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.fulfilment-event-list strong {
  color: #071033;
  font-size: 14px;
  font-weight: 800;
}

.fulfilment-event-list span {
  color: #485778;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.fulfilment-parcel-table a {
  color: #0a57e6;
  font-weight: 700;
  text-decoration: none;
}

.fulfilment-parcel-table a:hover {
  text-decoration: underline;
}

.payment-detail-grid a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.payment-detail-grid a:hover {
  color: inherit;
  text-decoration: underline;
}

.payment-detail-grid strong.check-pass,
.payment-detail-grid strong.check-fail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 14px;
  font-weight: 100;
}

.payment-detail-grid strong.check-pass {
  background: #eaf8ef;
  color: #078332;
}

.payment-detail-grid strong.check-fail {
  background: #fff2f2;
  color: #c42032;
}

.payment-detail-grid strong em {
  font-style: normal;
  font-weight: 900;
}

.danger-button {
  background: #cf2146;
  box-shadow: 0 12px 26px rgba(207, 33, 70, 0.2);
}

.danger-button:hover {
  background: #b71b3b;
}

.danger-outline-action {
  border-color: #ffc8cc;
  background: #fff6f7;
  color: #b42318;
}

.danger-outline-action:hover {
  border-color: #f39aa5;
  background: #fff0f2;
}

.customer-danger-zone {
  margin-top: 18px;
}

.customer-danger-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.customer-danger-body p,
.customer-delete-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.secondary-action.danger {
  border-color: #ffc8cc;
  background: #fff6f7;
  color: #b42318;
}

.secondary-action.danger:hover {
  border-color: #f39aa5;
  background: #fff0f2;
}

.primary-button.danger {
  background: #cf2146;
  box-shadow: 0 12px 26px rgba(207, 33, 70, 0.2);
}

.primary-button.danger:hover {
  background: #b71b3b;
}

.customer-delete-modal {
  width: min(520px, calc(100vw - 48px));
}

.customer-delete-body {
  gap: 16px;
}

.customer-delete-final {
  display: grid;
  gap: 12px;
}

.customer-delete-final.hidden,
.customer-delete-step-one.hidden {
  display: none;
}

.customer-delete-final-copy {
  color: #b42318;
  font-weight: 600;
}

.unsaved-changes-modal {
  width: min(660px, calc(100vw - 48px));
}

.unsaved-changes-copy {
  margin: 0;
  color: #293755;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.unsaved-changes-modal .modal-actions {
  display: grid;
  grid-template-columns: minmax(108px, 0.8fr) minmax(190px, 1.2fr) minmax(166px, 1fr);
  justify-content: stretch;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.unsaved-changes-modal .modal-actions .primary-button,
.unsaved-changes-modal .modal-actions .secondary-action {
  width: 100%;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding-right: 12px;
  padding-left: 12px;
  white-space: nowrap;
}


.vehicle-strip {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.vehicle-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid #dfe7f4;
  border-radius: 50%;
  background: #fff;
  color: #111938;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(20, 32, 70, 0.08);
}

.vehicle-mark img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.vehicle-grid {
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1.2fr) minmax(150px, 1.2fr) minmax(90px, 0.75fr) minmax(90px, 0.75fr) minmax(80px, 0.65fr) minmax(72px, 0.55fr) minmax(150px, 1.15fr);
  gap: 0;
}

.vehicle-grid .detail-field {
  padding: 0 22px;
  border-left: 1px solid #cad6ed;
}

.vehicle-grid .detail-field input {
  height: auto;
  border: 0;
  padding: 3px 0 0;
  background: transparent;
  text-align: left;
  font-weight: 100;
}

.line-items-layout {
  padding: 10px 18px 14px;
}

.line-items {
  gap: 0;
}

.line-item {
  grid-template-columns: 118px minmax(0, 1fr);
  border: 0;
  border-bottom: 1px solid #dfe7f4;
  border-radius: 0;
  padding: 12px 0;
  background: transparent;
}

.line-item:last-child {
  border-bottom: 0;
}

.item-photo {
  width: 104px;
  border-color: #dfe7f4;
  box-shadow: 0 6px 14px rgba(20, 32, 70, 0.08);
}

.type-pill {
  background: #eeeaff;
  color: #3f29bf;
  font-size: 12px;
  font-weight: 800;
}

.item-field-grid {
  grid-template-columns: minmax(170px, 1.1fr) minmax(320px, 2.5fr) 76px minmax(112px, 0.9fr) minmax(122px, 0.95fr) minmax(112px, 0.95fr);
  gap: 8px;
  align-items: end;
}

.item-field-grid .detail-field input,
.item-field-grid .detail-field select {
  height: 34px;
  border-color: #d4def0;
  background: #fff;
  color: #061337;
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 100;
}

.item-field-grid select.line-qty {
  appearance: none;
  padding-right: 22px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238293ad' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 6px;
}

.item-field-grid .detail-field input {
  padding-left: 8px;
  padding-right: 8px;
}

.item-field-grid .detail-field span {
  color: #445675;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.item-field-grid .detail-field:nth-child(3) input {
  background: #fbfcff;
}

.line-product-suggestions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.line-product-suggestion {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid #d7e2f5;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f9fbff;
  color: #0d1d4d;
  text-align: left;
  box-shadow: 0 3px 7px rgba(20, 32, 70, 0.04);
}

.line-product-suggestion strong {
  font-size: 14px;
  font-weight: 700;
}

.line-product-suggestion span {
  font-size: 12px;
  color: #50607f;
}

.line-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.line-meta-strip span,
.stock-strip span {
  border-color: #d7e2f5;
  border-radius: 999px;
  min-height: 24px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #0d1d4d;
  font-size: 13px;
  line-height: 1;
  font-weight: 400;
  box-shadow: 0 3px 7px rgba(20, 32, 70, 0.04);
}

.line-meta-strip .secondary-action,
.line-meta-strip .quote-remove-line {
  margin-left: 0;
}

.line-image-upload-button input {
  display: none;
}

.stock-strip .po-line-controls {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.stock-strip span strong {
  font-weight: 100;
}

.stock-strip span:has(strong) {
  gap: 4px;
}

.stock-strip .quote-remove-line {
  margin-left: 0;
}

.stock-strip .line-paste-button {
  margin-left: auto;
}

.line-meta-strip span:has(.line-profit),
.stock-strip span:has(.line-profit),
.money-rows > div:nth-child(3) strong {
  background: #eaf9ed;
  color: #16812b;
}

.line-meta-strip span:has(.line-margin),
.stock-strip span:has(.line-margin),
.money-rows > div:nth-child(4) strong {
  background: #edf3ff;
  color: #0954d9;
}

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

.payments-bottom-panel {
  grid-column: span 2;
}

.order-notes-panel {
  grid-column: span 2;
}

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

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

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

.order-note-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #ead99f;
  border-radius: 8px;
  padding: 8px;
  background: #fffbea;
  box-shadow: 0 2px 5px rgba(120, 94, 20, 0.05);
}

.order-note-card-new {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  border-color: transparent;
  border-style: solid;
  padding: 0;
  background: #fff;
  box-shadow: none;
}

.order-note-input {
  width: 100%;
  height: 40px;
  border: 1px solid #d6e1f1;
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  color: #071033;
  font: inherit;
  font-size: 14px;
  line-height: 1;
}

.order-note-input:focus {
  outline: 0;
  border-color: #5a62ff;
  box-shadow: 0 0 0 3px rgba(90, 98, 255, 0.12);
}

.order-note-card-new .button-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  min-height: 32px;
  height: auto;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.order-note-saved-input {
  border-color: #e7dbad;
  background: rgba(255, 255, 255, 0.82);
  color: #302a1b;
}

.order-note-meta {
  color: #6f6244;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.order-note-card > .order-note-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.order-note-card > .order-note-actions .button-small {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
}

.order-note-card-new .order-note-textarea {
  border-color: #d6e1f1;
  background: #fff;
  color: #071033;
}

.order-note-card-new .order-note-textarea:focus {
  border-color: #5a62ff;
  box-shadow: 0 0 0 3px rgba(90, 98, 255, 0.12);
}

.order-note-card-new .order-note-footer {
  color: #405174;
}

.order-note-textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid #eadb9b;
  border-radius: 7px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.72);
  color: #3f3210;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}

.order-note-textarea:focus {
  outline: 0;
  border-color: #d2aa2d;
  box-shadow: 0 0 0 3px rgba(210, 170, 45, 0.18);
}

.order-note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #77622b;
  font-size: 12px;
  font-weight: 700;
}

.order-note-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.button-small.danger {
  border-color: #f0c3c8;
  color: #b91c1c;
}

.order-note-card .order-note-actions .button-small.danger {
  border-color: #d8e0ed;
  background: #fff;
  color: #7b879a;
}

.order-note-card .order-note-actions .button-small.danger:hover {
  border-color: #c7d1e0;
  background: #f8fafc;
  color: #4f5f75;
}

.address-body {
  position: relative;
  min-height: 126px;
  padding: 14px 18px 16px;
}

.address-list {
  padding-right: 82px;
  font-size: 15px;
  font-weight: 100;
}

.address-actions {
  position: absolute;
  top: 50px;
  right: 18px;
}

.address-edit-toggle {
  min-height: 32px;
  min-width: 58px;
  padding: 0 12px;
  box-shadow: 0 4px 10px rgba(20, 32, 70, 0.08);
}

.address-edit-fields {
  margin-top: 0;
  padding-right: 0;
  gap: 8px;
}

.address-panel .address-grid {
  grid-template-columns: 1fr;
}

.address-edit-fields .detail-field {
  gap: 0;
  position: relative;
}

.address-edit-fields .detail-field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.address-edit-fields input::placeholder {
  color: #8a94a8;
  opacity: 1;
}

.address-panel .postcode-input {
  max-width: 180px;
}

.postcode-lookup-field {
  position: relative;
  max-width: 180px;
}

.postcode-lookup-message {
  display: block;
  margin-top: 6px;
}

.postcode-lookup-message {
  color: var(--muted);
  font-size: 12px;
}

.postcode-suggestions {
  position: absolute;
  z-index: 60;
  top: calc(100% - 4px);
  left: 0;
  width: min(380px, calc(100vw - 80px));
  max-height: 360px;
  overflow: hidden;
  border: 1px solid #cfd7e6;
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: 0 14px 26px rgba(20, 32, 70, 0.2);
}

.postcode-suggestions.hidden {
  display: none;
}

.postcode-suggestions-list {
  max-height: 308px;
  overflow-y: auto;
}

.postcode-suggestions button {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf1f8;
  padding: 10px 14px;
  background: #fff;
  color: #344056;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.postcode-suggestions button:hover,
.postcode-suggestions button:focus {
  background: #f4f7ff;
}

.postcode-suggestions strong {
  display: block;
  border-top: 1px solid #cfd7e6;
  padding: 10px 14px;
  background: #fafafa;
  color: #344056;
  font-size: 14px;
}

.line-payment-check {
  align-self: start;
}

.address-panel:has(.address-edit-fields:not(.hidden)) .address-actions {
  position: static;
}

.line-payment-check {
  width: auto;
  justify-self: stretch;
  align-self: start;
  border-color: #d7e1f2;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 7px 18px rgba(20, 32, 70, 0.08);
}

.money-rows {
  gap: 0;
}

.money-rows > div {
  grid-template-columns: 1fr auto;
  min-height: 39px;
  border-bottom: 1px solid #dfe7f4;
}

.money-rows > div:last-child {
  border-bottom: 0;
}

.money-rows > div > span {
  color: #0c1c4c;
  font-size: 14px;
  font-weight: 600;
}

.money-rows strong {
  border-radius: 6px;
  padding: 3px 0;
  background: transparent;
  font-size: 16px;
  font-weight: 100;
}

.history-panel .segment-body {
  padding: 14px 18px;
}

.empty-history {
  border: 1px solid #cfe0f7;
  border-radius: 7px;
  padding: 12px 14px;
  background: #f3f8ff;
}

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

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

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

  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
  }

  .search {
    width: 100%;
    max-width: none;
  }

  .balance-banner {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 14px 16px;
  }

  .user-form {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .detail-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-actions {
    justify-content: stretch;
  }

  .detail-actions > * {
    flex: 1;
  }

  .detail-sections {
    grid-template-columns: 1fr;
  }

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

  .order-detail-form:not(.customer-detail-form) > .detail-sections {
    grid-template-columns: 1fr;
  }

  .order-detail-form:not(.customer-detail-form) > .detail-sections > .top-address-pair {
    grid-column: auto;
  }

  .customer-detail-form:has(.top-address-pair) > .detail-sections {
    grid-template-columns: 1fr;
  }

  .customer-detail-form:has(.top-address-pair) > .detail-sections > .top-address-pair {
    grid-column: auto;
  }

  .detail-content {
    padding: 18px 14px 80px;
  }

  .detail-hero {
    margin: -18px -14px 18px;
    padding: 16px 14px;
  }

  .detail-bottom-grid,
  .top-address-pair,
  .vehicle-strip {
    grid-template-columns: 1fr;
  }

  .postcode-settings-intro {
    flex-direction: column;
  }

  .postcode-settings-link {
    width: fit-content;
  }

  .postcode-settings-notes {
    grid-template-columns: 1fr;
  }

  .payments-bottom-panel {
    grid-column: auto;
  }

  .order-notes-panel,
  .payments-wide-panel {
    grid-column: auto;
  }

  .vehicle-grid .detail-field {
    border-left: 0;
    border-top: 1px solid #cad6ed;
    padding: 10px 0;
  }

  .field-grid,
  .account-grid,
  .address-grid,
  .vehicle-grid,
  .fulfilment-grid,
  .item-field-grid {
    grid-template-columns: 1fr;
  }

  .line-item {
    grid-template-columns: 1fr;
  }

  .item-photo {
    max-width: 160px;
  }

  .segment-title {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 12px;
  }

  .line-payment-check {
    width: 100%;
    justify-self: stretch;
  }

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

  .payment-reference {
    grid-column: 1 / -1;
  }

  .payment-row-main .ghost-button {
    grid-column: 1 / -1;
  }

  .settings-grid,
  .settings-note-list,
  .task-stream-layout {
    grid-template-columns: 1fr;
  }

  .task-stream-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .task-stream-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

th,
.detail-field span,
.detail-field > label,
.settings-form label,
.user-form label,
.task-stream-controls label,
.payment-link-options label,
.po-receive-form .detail-field > span,
.po-receive-form .detail-field > label {
  color: #445675;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.channels-page {
  display: grid;
  gap: 24px;
}

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

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

.channel-summary-card .segment-body,
.channel-card .segment-body,
.channel-setup-panel .segment-body,
.channel-pricing-panel .segment-body {
  display: grid;
  gap: 16px;
}

.channel-inline-form,
.channel-search-form,
.channels-setup-form {
  display: grid;
  gap: 16px;
}

.channel-money-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  min-height: 50px;
  border: 1px solid #d6e1f3;
  border-radius: 14px;
  background: #fff;
}

.channel-money-input strong {
  color: var(--ink);
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 16px;
}

.channel-money-input input {
  border: 0;
  padding: 0;
  min-height: auto;
  box-shadow: none;
}

.channel-stat-row,
.channel-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
}

.channel-stat-row strong,
.channel-card-meta strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.channel-stat-row span,
.channel-card-meta span {
  color: #4f6486;
  font-size: 14px;
}

.channel-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.channel-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
}

.channel-status-pill.is-connected {
  color: #0f7b49;
  background: #e9f8ef;
}

.channel-status-pill.is-pending {
  color: #9a5a00;
  background: #fff4dc;
}

.channel-status-pill.is-blocked {
  color: #a63737;
  background: #ffe8e8;
}

.channel-status-pill.is-muted {
  color: #5f7190;
  background: #eef3fb;
}

.channel-card {
  min-height: 240px;
}

.channel-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.channel-card-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 24px;
}

.channel-card-icon.channel-email {
  color: #2959d1;
  background: #e8f0ff;
}

.channel-card-icon.channel-sms {
  color: #0d8a50;
  background: #e8faef;
}

.channel-card-icon.channel-whatsapp {
  color: #0d9b53;
  background: #e6f9ed;
}

.channel-card h2 {
  margin: 0;
}

.channel-card p,
.channel-helper-copy p,
.channel-inline-note {
  margin: 0;
  color: #607390;
}

.channel-inline-note.error {
  color: #a63737;
}

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

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

.channel-search-block {
  padding: 18px;
  border: 1px solid #dbe6f8;
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9ff 100%);
  display: grid;
  gap: 16px;
}

.channel-search-title {
  padding: 0;
  border: 0;
}

.channel-number-results {
  display: grid;
  gap: 10px;
}

.channel-number-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid #d6e1f3;
  border-radius: 14px;
  background: #fff;
}

.channel-number-option.is-selected {
  border-color: #8797ff;
  box-shadow: 0 0 0 2px rgba(113, 135, 255, 0.12);
}

.channel-number-option strong,
.channel-number-option em {
  display: block;
}

.channel-number-option em {
  color: #6a7d9b;
  font-style: normal;
  font-size: 13px;
}

.channel-number-results-inline {
  margin-top: 4px;
}

.email-domain-summary {
  display: grid;
  gap: 18px;
}

.channel-inline-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #314668;
  font-size: 14px;
  line-height: 1.5;
}

.channel-inline-check input {
  margin-top: 3px;
}

.channel-routing-card {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #dbe6f8;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.channel-routing-copy {
  display: grid;
  gap: 4px;
}

.channel-routing-copy strong {
  color: #183153;
  font-size: 14px;
  font-weight: 700;
}

.channel-routing-copy p {
  margin: 0;
  color: #607390;
}

.channel-routing-options {
  display: grid;
  gap: 12px;
}

.channel-routing-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid #d6e1f3;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.channel-routing-option.is-selected {
  border-color: #8797ff;
  box-shadow: 0 0 0 3px rgba(88, 104, 254, 0.08);
  background: #f8faff;
}

.channel-routing-option input {
  margin-top: 3px;
}

.channel-routing-option-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.channel-routing-option-copy strong {
  color: #183153;
  font-size: 14px;
  font-weight: 700;
}

.channel-routing-option-copy small {
  color: #607390;
  font-size: 13px;
  line-height: 1.45;
}

.channel-routing-option-copy code {
  display: block;
  padding: 10px 12px;
  border: 1px solid #d6e1f3;
  border-radius: 10px;
  background: #fff;
  color: #314668;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.channel-routing-custom-field {
  margin-top: 2px;
}

.channel-routing-forward-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.channel-routing-custom-field input[disabled] {
  background: #f5f8fc;
  color: #8a9ab5;
  cursor: not-allowed;
}

.channel-routing-target-field code {
  display: block;
  padding: 10px 12px;
  border: 1px solid #d6e1f3;
  border-radius: 10px;
  background: #f5f8fc;
  color: #314668;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.channel-routing-card .channel-inline-note {
  font-size: 13px;
}

.channel-install-preview {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #dbe6f8;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.channel-install-note {
  margin: 0;
  color: #607390;
}

@media (max-width: 900px) {
  .channel-routing-forward-grid {
    grid-template-columns: 1fr;
  }
}

.email-domain-actions {
  margin: 0;
  padding-left: 20px;
  color: #314668;
  display: grid;
  gap: 8px;
}

.email-domain-check-grid {
  display: grid;
  gap: 10px;
}

.email-domain-check {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #d6e1f3;
  border-radius: 14px;
  background: #fff;
}

.email-domain-check-copy {
  min-width: 0;
}

.email-domain-check-copy strong {
  display: block;
  color: #183153;
}

.email-domain-check-copy p {
  margin: 6px 0 0;
  color: #6a7d9b;
  word-break: break-word;
}

.email-domain-records {
  border: 1px solid #d6e1f3;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.email-domain-record {
  display: grid;
  grid-template-columns: 130px 90px minmax(0, 1.05fr) 90px minmax(0, 1.4fr) minmax(0, 1.4fr);
  gap: 16px;
  padding: 14px 16px;
  border-top: 1px solid #e6eefb;
  align-items: start;
}

.email-domain-record:first-child {
  border-top: 0;
}

.email-domain-record span,
.email-domain-record strong {
  word-break: break-word;
}

.email-domain-copy-cell {
  display: block;
}

.email-domain-copy-value {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  color: #314668;
  cursor: pointer;
  transition: opacity 0.16s ease;
  border-radius: 8px;
  padding: 2px 0;
}

.email-domain-copy-value:hover,
.email-domain-copy-value:focus {
  outline: none;
  opacity: 0.9;
}


.email-domain-copy-value.is-copied {
  opacity: 0.85;
}

.email-domain-copy-feedback {
  display: inline-block;
  margin-top: 8px;
  min-height: 18px;
  color: #087333;
  font-size: 13px;
  font-weight: 700;
}

.email-domain-record-head {
  background: #f6f9ff;
  color: #183153;
}

.email-domain-verify-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 0 0;
}

.email-domain-verify-copy {
  margin: 0;
  color: #5e7191;
}

.communication-title-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 1200px) {
  .channels-summary-grid,
  .channels-summary-grid-compact,
  .channels-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .channels-form-grid {
    grid-template-columns: 1fr;
  }

  .email-domain-check {
    flex-direction: column;
  }

  .email-domain-record {
    grid-template-columns: 1fr;
  }

  .email-domain-record-head {
    display: none;
  }

  .email-domain-verify-form {
    align-items: flex-start;
  }
}
