:root {
  --bg: #f6f1ec;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #fffaf6;
  --surface-deep: #151515;
  --surface-deeper: #110f10;
  --text: #211c1c;
  --muted: #645858;
  --brand-red: #e00000;
  --brand-red-deep: #930000;
  --brand-blush: #ffdad7;
  --brand-cream: #f5d3a1;
  --line: rgba(73, 37, 37, 0.14);
  --shadow: 0 20px 60px rgba(126, 32, 32, 0.16);
}

/* Stock and warehouse workspace */
.stock-header {
  align-items: end;
}

.stock-panel {
  margin-top: 0;
}

.stock-tab-section[hidden] {
  display: none;
}

.stock-workspace {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  margin-top: 24px;
}

.stock-workspace__content {
  min-width: 0;
}

.stock-anchor-nav {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 30px rgba(50, 24, 24, 0.06);
}

.stock-anchor-nav__label {
  padding: 2px 6px 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stock-anchor-nav__actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(var(--brand-red-rgb), 0.1);
}

.stock-anchor-nav__button {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(255, 250, 245, 0.92);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.stock-anchor-nav__button:hover { transform: translateY(-1px); color: var(--text); }
.stock-anchor-nav__button.is-active { border-color: transparent; color: #fff; background: linear-gradient(135deg, rgba(var(--brand-red-rgb), 0.95), rgba(245, 166, 35, 0.95)); box-shadow: 0 12px 24px rgba(var(--brand-red-rgb), 0.2); }
.stock-anchor-nav__button--action {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}
.stock-anchor-nav__button--primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-deep));
  box-shadow: 0 12px 24px rgba(var(--brand-red-rgb), 0.18);
}

#stock-warehouses-section,
#stock-products-section,
#stock-movements-section { scroll-margin-top: 128px; }

.stock-panel__count,
.stock-warehouse-card__ref {
  color: var(--brand-red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stock-warehouse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.stock-warehouse-card {
  display: grid;
  gap: 12px;
  min-height: 210px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--brand-red) 18%, var(--line));
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), var(--brand-blush));
}

.stock-warehouse-card--closed { opacity: 0.68; }
.stock-warehouse-card__top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.stock-warehouse-card h3 { margin: 0; font-size: 1.25rem; }
.stock-warehouse-card p { margin: 0; color: var(--muted); }
.stock-warehouse-card .button { margin-top: auto; width: fit-content; }
.stock-products-table-wrap {
  overflow: hidden;
  border: 1px solid rgba(var(--brand-red-rgb), 0.11);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
}

.stock-products-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.stock-products-table th {
  padding: 15px 18px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  background: rgba(var(--brand-blush-rgb), 0.24);
  border-bottom: 1px solid rgba(var(--brand-red-rgb), 0.1);
}

.stock-products-table td {
  padding: 17px 18px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(73, 37, 37, 0.1);
  background: rgba(255, 255, 255, 0.74);
}

.stock-products-table tbody tr:last-child td { border-bottom: 0; }
.stock-products-table tbody tr { transition: background 180ms ease; }
.stock-products-table tbody tr:hover td { background: rgba(var(--brand-blush-rgb), 0.2); }
.stock-products-table__action-heading,
.stock-products-table__action { text-align: right; }

.stock-product-reference {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--brand-red-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(var(--brand-red-rgb), 0.08);
  font-variant-numeric: tabular-nums;
}

.stock-product-name {
  display: grid;
  gap: 4px;
}

.stock-product-name strong { font-size: 1rem; }

/* Stock distribution on a tracked product card. */
.product-stock-panel { padding: 26px; }
.product-stock-panel__heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.product-stock-panel__heading h2 { margin: 3px 0 7px; }
.product-stock-panel__heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.product-stock-panel__count {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--brand-red-deep);
  background: rgba(var(--brand-red-rgb), 0.08);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.product-stock-panel__actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.product-stock-table { min-width: 680px; }
.stock-products-table th.product-stock-table__quantity,
.stock-products-table td.product-stock-table__quantity { text-align: center; }
.stock-products-table td.product-stock-table__quantity .stock-quantity { justify-content: center; }
.product-stock-table__action { width: 72px; text-align: right; }
.product-stock-table__location { color: var(--muted); }
.product-stock-panel__empty,
.product-stock-panel__message {
  margin: 0;
  padding: 18px;
  border: 1px dashed rgba(var(--brand-red-rgb), 0.18);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  line-height: 1.55;
}
.product-stock-panel__empty { display: grid; gap: 5px; }
.product-stock-panel__empty strong { color: var(--text); }
.product-stock-panel__empty p { margin: 0; }
.stock-product-name span { color: var(--muted); font-size: 0.84rem; }

.stock-quantity {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--brand-red);
  font-variant-numeric: tabular-nums;
}

.stock-quantity strong { font-size: 1.15rem; }
.stock-quantity small { color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.stock-quantity--negative strong { color: #bd2c2c; }
.stock-quantity--negative small { color: #a32a2a; }

.stock-movements-table-wrap {
  overflow: hidden;
  border: 1px solid rgba(var(--brand-red-rgb), 0.11);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
}

.stock-movements-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.stock-movements-table th {
  padding: 15px 16px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  background: rgba(var(--brand-blush-rgb), 0.24);
  border-bottom: 1px solid rgba(var(--brand-red-rgb), 0.1);
}

.stock-movements-table td {
  padding: 16px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(73, 37, 37, 0.1);
  background: rgba(255, 255, 255, 0.74);
}

.stock-movements-table tbody tr:last-child td { border-bottom: 0; }
.stock-movements-table tbody tr { transition: background 180ms ease; }
.stock-movements-table tbody tr:hover td { background: rgba(var(--brand-blush-rgb), 0.2); }
.stock-movements-table__quantity-heading,
.stock-movements-table__quantity { text-align: right; }

.stock-movement-date {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.stock-movement-kind {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #166534;
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(22, 163, 74, 0.12);
  white-space: nowrap;
}

.stock-movement-kind.stock-movement--out {
  color: #9f1239;
  background: rgba(225, 29, 72, 0.11);
}

.stock-movement-product {
  display: grid;
  gap: 4px;
}

.stock-movement-product strong { font-size: 0.86rem; }
.stock-movement-product span,
.stock-movement-warehouse,
.stock-movement-note { color: var(--muted); font-size: 0.88rem; }
.stock-movement-note { display: inline-block; max-width: 250px; line-height: 1.45; }
.stock-movements-table__quantity strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.stock-movement--in { color: #16794a; }
.stock-movement--out { color: #bd2f32; }

/* Warehouse detail */
.stock-warehouse-header {
  align-items: end;
  margin-bottom: 18px;
}

.stock-warehouse-header__title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stock-warehouse-header__title h1 {
  margin: 0 0 5px;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.16;
}

.stock-warehouse-header__title p { margin: 0; }

.stock-warehouse-header__location {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.stock-warehouse-header__location span {
  color: var(--brand-red-deep);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.stock-warehouse-header__mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  background: linear-gradient(145deg, var(--brand-red), #f5a623);
  box-shadow: 0 10px 22px rgba(var(--brand-red-rgb), 0.22);
}

.stock-warehouse-header__reference {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--brand-red-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(var(--brand-red-rgb), 0.08);
}

.stock-warehouse-header__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
}

.stock-warehouse-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stock-warehouse-overview__card {
  display: grid;
  gap: 5px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.11);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(var(--brand-blush-rgb), 0.26));
  box-shadow: 0 12px 26px rgba(50, 24, 24, 0.05);
}

.stock-warehouse-overview__card--contact { background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(245, 211, 161, 0.3)); }
.stock-warehouse-overview__label { color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.stock-warehouse-overview__card strong { color: var(--text); font-size: clamp(1.35rem, 2.2vw, 2rem); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stock-warehouse-overview__card small { color: var(--muted); font-size: 0.86rem; font-weight: 700; }

.stock-warehouse-panel { padding: 26px; }
.stock-warehouse-panel + .stock-warehouse-panel { margin-top: 18px; }

.stock-warehouse-panel__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.stock-warehouse-panel__heading h2,
.stock-warehouse-information h2 { margin: 3px 0 7px; }
.stock-warehouse-panel__heading p { margin: 0; color: var(--muted); line-height: 1.55; }

.stock-warehouse-panel__count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--brand-red-deep);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  background: rgba(var(--brand-red-rgb), 0.08);
}

.stock-warehouse-products-table__quantity-heading,
.stock-warehouse-products-table__quantity { text-align: right; }
.stock-warehouse-products-table__quantity .stock-quantity { justify-content: flex-end; }
.stock-warehouse-movements-table { min-width: 850px; }

.stock-warehouse-empty {
  display: grid;
  justify-items: start;
  gap: 9px;
  padding: 22px;
  border: 1px dashed rgba(var(--brand-red-rgb), 0.18);
  border-radius: 18px;
  background: rgba(255, 250, 245, 0.66);
}

.stock-warehouse-empty strong { font-size: 1rem; }
.stock-warehouse-empty p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.55; }

.stock-warehouse-information {
  display: grid;
  grid-template-columns: minmax(190px, 0.36fr) minmax(0, 1fr);
  gap: 26px;
  margin-top: 18px;
  padding: 24px 26px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
}

.stock-warehouse-information__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(var(--brand-red-rgb), 0.1);
  border-radius: 16px;
  background: rgba(var(--brand-red-rgb), 0.1);
}

.stock-warehouse-information__grid > div {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 88px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.stock-warehouse-information__grid span { color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.stock-warehouse-information__grid strong { display: block; line-height: 1.45; }

@media (max-width: 640px) {
  .stock-header { align-items: stretch; }
  .stock-header .app-header__actions { width: 100%; }
  .stock-header .app-header__actions .button { width: 100%; }
  .stock-warehouse-card .button { width: 100%; justify-content: center; }
  .stock-workspace { grid-template-columns: 1fr; gap: 14px; }
  .stock-anchor-nav { position: static; grid-template-columns: 1fr; }
  .stock-anchor-nav__button { width: 100%; }
  .stock-products-table-wrap { overflow: visible; border: 0; background: transparent; }
  .stock-products-table,
  .stock-products-table tbody,
  .stock-products-table tr,
  .stock-products-table td { display: block; width: 100%; min-width: 0; }
  .stock-products-table thead { display: none; }
  .stock-products-table tbody { display: grid; gap: 12px; }
  .stock-products-table tr { padding: 16px; border: 1px solid rgba(var(--brand-red-rgb), 0.11); border-radius: 18px; background: rgba(255, 255, 255, 0.78); }
  .stock-products-table td { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border: 0; background: transparent; text-align: right; }
  .stock-products-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
  .stock-products-table__action { justify-content: stretch; padding-top: 14px; margin-top: 6px; border-top: 1px solid rgba(var(--brand-red-rgb), 0.1); }
  .stock-products-table__action::before { display: none; }
  .stock-products-table__action .button { width: 100%; }
  .stock-product-name { text-align: right; }
  .stock-movements-table-wrap { overflow: visible; border: 0; background: transparent; }
  .stock-movements-table,
  .stock-movements-table tbody,
  .stock-movements-table tr,
  .stock-movements-table td { display: block; width: 100%; min-width: 0; }
  .stock-movements-table thead { display: none; }
  .stock-movements-table tbody { display: grid; gap: 12px; }
  .stock-movements-table tr { padding: 16px; border: 1px solid rgba(var(--brand-red-rgb), 0.11); border-radius: 18px; background: rgba(255, 255, 255, 0.78); }
  .stock-movements-table td { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 0; border: 0; background: transparent; text-align: right; }
  .stock-movements-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
  .stock-movements-table__quantity { justify-content: stretch; padding-top: 14px; margin-top: 6px; border-top: 1px solid rgba(var(--brand-red-rgb), 0.1); }
  .stock-movements-table__quantity::before { display: none; }
  .stock-movements-table__quantity strong { width: 100%; font-size: 1.2rem; text-align: center; }
  .stock-movement-product { text-align: right; }
  .stock-movement-note { max-width: 62%; }
  .stock-warehouse-header { align-items: stretch; }
  .stock-warehouse-header__actions { justify-content: stretch; width: 100%; }
  .stock-warehouse-header__actions .button { flex: 1 1 0; justify-content: center; }
  .stock-warehouse-overview { grid-template-columns: 1fr; gap: 10px; }
  .stock-warehouse-overview__card { min-height: 108px; }
  .stock-warehouse-panel { padding: 20px 16px; }
  .stock-warehouse-panel__heading { display: grid; gap: 12px; margin-bottom: 16px; }
  .stock-warehouse-panel__count { width: fit-content; }
  .stock-warehouse-products-table__quantity { justify-content: stretch; padding-top: 14px; margin-top: 6px; border-top: 1px solid rgba(var(--brand-red-rgb), 0.1); }
  .stock-warehouse-products-table__quantity::before { display: none; }
  .stock-warehouse-products-table__quantity .stock-quantity { width: 100%; justify-content: center; }
  .stock-warehouse-information { grid-template-columns: 1fr; gap: 16px; padding: 20px 16px; }
  .stock-warehouse-information__grid { grid-template-columns: 1fr; }
  .product-stock-panel { padding: 20px 16px; }
  .product-stock-panel__heading { display: grid; gap: 12px; margin-bottom: 16px; }
  .product-stock-panel__actions { justify-content: flex-start; flex-wrap: wrap; }
  .product-stock-panel__count { width: fit-content; }
  .product-stock-table__quantity { justify-content: stretch; padding-top: 14px; margin-top: 6px; border-top: 1px solid rgba(var(--brand-red-rgb), 0.1); }
  .product-stock-table__quantity::before { display: none; }
  .product-stock-table__quantity .stock-quantity { width: 100%; justify-content: center; }
  .product-stock-table__action { justify-content: center; }
  .product-stock-table__action::before { display: none; }
}

@media (min-width: 641px) and (max-width: 980px) {
  .stock-workspace { grid-template-columns: 1fr; }
  .stock-anchor-nav {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stock-anchor-nav__label { grid-column: 1 / -1; }
  .stock-anchor-nav__actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stock-anchor-nav__actions .stock-anchor-nav__label {
    grid-column: 1 / -1;
  }
  .stock-warehouse-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stock-warehouse-information { grid-template-columns: 1fr; }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Bahnschrift", "Aptos", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(var(--brand-cream-rgb), 0.72), transparent 26%),
    radial-gradient(circle at top right, rgba(var(--brand-red-rgb), 0.18), transparent 24%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.96) 0%, rgba(var(--brand-blush-rgb), 0.34) 52%, rgba(var(--brand-cream-rgb), 0.22) 100%);
}

body.modal-open {
  overflow: hidden;
}

body.sidebar-mobile-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 40%, rgba(var(--brand-red-rgb), 0.06) 40% 48%, transparent 48% 100%),
    linear-gradient(20deg, transparent 0 72%, rgba(21, 21, 21, 0.04) 72% 100%);
  pointer-events: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Franklin Gothic Demi", "Bahnschrift SemiBold", sans-serif;
  line-height: 0.98;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 5.3rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.18rem;
}

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

.panel__label,
.app-header__eyebrow,
.login-brand__badge,
.login-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-red-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: white;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-deep) 100%);
  box-shadow: 0 18px 40px rgba(var(--brand-red-rgb), 0.24);
}

.button--ghost {
  color: var(--text);
  border: 1px solid rgba(33, 28, 28, 0.14);
  background: rgba(255, 255, 255, 0.62);
}

.button--info-edit {
  color: #6a3a10;
  border: 1px solid rgba(198, 120, 20, 0.24);
  background: linear-gradient(135deg, rgba(255, 237, 201, 0.96), rgba(255, 248, 231, 0.92));
  box-shadow: 0 12px 24px rgba(198, 120, 20, 0.14);
}

.button--reopen-edit {
  color: #7b4a00;
  border: 1px solid rgba(214, 131, 18, 0.28);
  background: linear-gradient(135deg, rgba(255, 228, 168, 0.98), rgba(255, 244, 219, 0.94));
  box-shadow: 0 12px 24px rgba(214, 131, 18, 0.18);
}

.button--return {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.button--return img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.button--danger {
  color: white;
  border: 1px solid rgba(146, 25, 25, 0.18);
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
  box-shadow: 0 14px 30px rgba(185, 28, 28, 0.22);
}

.button--warning-soft {
  color: #7a4a00;
  border: 1px solid rgba(217, 119, 6, 0.28);
  background: linear-gradient(135deg, rgba(255, 233, 173, 0.98), rgba(255, 248, 227, 0.94));
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.16);
}

.client-table__row--warning {
  background: linear-gradient(135deg, rgba(255, 247, 214, 0.86), rgba(255, 238, 200, 0.74));
  box-shadow: inset 5px 0 0 rgba(245, 158, 11, 0.82);
}

.client-table__row--warning td {
  background: transparent;
}

.button--block {
  width: 100%;
}

.button--small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.92rem;
}

.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.14);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 22px rgba(var(--brand-red-rgb), 0.1);
}

.icon-action img {
  width: 20px;
  height: 20px;
}

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

.table-actions--header {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.line-batch-form {
  display: inline-flex;
}

.line-batch-form[hidden] {
  display: none !important;
}

.line-quantity-form {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.line-quantity-form strong {
  min-width: 26px;
  text-align: center;
}

.line-quantity-form__button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.16);
  border-radius: 999px;
  color: var(--brand-red-deep);
  font: inherit;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(var(--brand-blush-rgb), 0.24));
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.line-quantity-form__button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(var(--brand-red-rgb), 0.12);
}

.line-quantity-form__button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.line-quantity-form__submit {
  min-height: 32px;
  padding: 0 12px;
}

.icon-action--delivery {
  border-color: rgba(37, 99, 235, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.98));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

.icon-action--order-open {
  border-color: rgba(14, 116, 144, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 254, 255, 0.98));
  box-shadow: 0 12px 24px rgba(14, 116, 144, 0.12);
}

.button--delivery-focus {
  color: #8a5b00;
  border: 1px solid rgba(245, 158, 11, 0.42);
  background:
    radial-gradient(circle at top, rgba(254, 240, 138, 0.58), rgba(255, 255, 255, 0.98) 58%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(254, 249, 195, 0.96));
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.16),
    0 0 22px rgba(250, 204, 21, 0.24),
    0 16px 34px rgba(217, 119, 6, 0.18);
}

.button--delivery-focus:hover {
  color: #7c4a03;
  border-color: rgba(245, 158, 11, 0.54);
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.22),
    0 0 28px rgba(250, 204, 21, 0.32),
    0 18px 38px rgba(217, 119, 6, 0.22);
}

.icon-action--settings {
  border-color: rgba(217, 119, 6, 0.18);
  background: linear-gradient(135deg, #f59e0b 0%, #fb923c 100%);
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.24);
}

.icon-action--settings:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #fb923c 100%);
}

.login-page {
  overflow-x: hidden;
}

.login-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 18px;
}

.login-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 460px);
  gap: 28px;
  align-items: stretch;
  min-height: calc(100vh - 60px);
}

.login-brand,
.login-card,
.workspace-panel,
.menu-card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-brand {
  position: relative;
  overflow: hidden;
  padding: 42px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 211, 161, 0.95), transparent 25%),
    linear-gradient(155deg, rgba(255, 250, 246, 0.94), rgba(255, 255, 255, 0.78));
}

.login-brand p {
  max-width: 58ch;
  font-size: 1.05rem;
}

.login-brand__panel {
  margin-top: 30px;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 239, 236, 0.74));
}

.login-brand__panel img {
  display: block;
  width: 72%;
  max-width: 320px;
  margin: 0 auto;
}

.login-card {
  align-self: center;
  padding: 34px;
  border-radius: 32px;
  background: rgba(255, 252, 249, 0.84);
}

.login-card__copy {
  margin-top: 12px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

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

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

.field:has(> input[name="payment_bank_name"]) > span {
  font-size: 0;
}

.field:has(> input[name="payment_bank_name"]) > span::before {
  content: "Banque";
  font-size: 0.92rem;
}

.field:has(> input[name="payment_emitter_hidden"]) {
  display: none;
}

.form-grid:has(input[name="payment_emitter_hidden"]) {
  display: none;
}

.field small {
  color: var(--muted);
  font-size: 0.82rem;
}

.field input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(33, 28, 28, 0.14);
  border-radius: 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
}

.field textarea,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid rgba(33, 28, 28, 0.14);
  border-radius: 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  resize: vertical;
}

.field input[type="file"] {
  min-height: 58px;
  padding: 8px;
  border-style: dashed;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 243, 0.92));
}

.field input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-deep) 100%);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(var(--brand-red-rgb), 0.18);
  border-color: rgba(var(--brand-red-rgb), 0.4);
}

.form-alert {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 0.94rem;
}

.form-alert--error {
  color: #7d1313;
  background: rgba(224, 0, 0, 0.08);
  border: 1px solid rgba(224, 0, 0, 0.18);
}

.form-alert--success {
  color: #0b5d39;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.18);
}

.form-alert--info {
  color: #1f2937;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.product-status-guide {
  margin-top: 16px;
}

.product-status-guide p {
  margin: 0 0 10px;
}

.product-status-guide ul {
  margin: 0;
  padding-left: 18px;
}

.product-status-guide li + li {
  margin-top: 8px;
}

.app-page {
  min-height: 100vh;
}

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

.app-shell__overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(17, 15, 16, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: 28px;
  height: 100vh;
  min-height: 100vh;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(20, 16, 17, 0.98), rgba(29, 20, 21, 0.95)),
    var(--surface-deeper);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 220ms ease, width 220ms ease, padding 220ms ease;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 90;
}

.app-sidebar__controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 4;
  padding-bottom: 8px;
  background: linear-gradient(180deg, rgba(20, 16, 17, 0.98), rgba(20, 16, 17, 0.86) 72%, rgba(20, 16, 17, 0));
  backdrop-filter: blur(6px);
}

.sidebar-control,
.sidebar-fab,
.sidebar-mobile-trigger {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.sidebar-control {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

body.sidebar-collapsed .sidebar-control--collapse span {
  display: inline-block;
  transform: rotate(180deg);
}

.sidebar-control:hover,
.sidebar-fab:hover,
.sidebar-mobile-trigger:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
}

.sidebar-control--mobile {
  display: none !important;
}

.app-logo {
  display: block;
  padding: 16px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  transition: padding 220ms ease, border-radius 220ms ease;
}

.app-logo--white {
  background: white;
  box-shadow:
    inset 0 0 0 1px rgba(17, 15, 16, 0.08),
    0 16px 34px rgba(17, 15, 16, 0.16);
}

.app-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.app-nav {
  display: grid;
  gap: 10px;
}

.app-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.app-nav__link::after,
.logout-form .button--ghost::after {
  content: "";
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.app-nav__link[data-short="TB"]::after {
  background-image: url("../images/home.svg");
}

.app-nav__link[data-short="CL"]::after {
  background-image: url("../images/client.svg");
}

.app-nav__link[data-short="DV"]::after {
  background-image: url("../images/devis.svg");
}

.app-nav__link[data-short="PD"]::after {
  background-image: url("../images/product.svg");
}

.app-nav__link[data-short="CM"]::after {
  background-image: url("../images/orders.svg");
}

.app-nav__link[data-short="EX"]::after {
  background-image: url("../images/shipping.svg");
}

.app-nav__link[data-short="PL"]::after,
.app-nav__link[data-short="CL"]::after {
  background-image: url("../images/client.svg");
}

.app-nav__link[data-short="FC"]::after {
  background-image: url("../images/facture.svg");
}

.app-nav__link[data-short="BK"]::after {
  background-image: url("../images/bank.svg");
}

.app-nav__link[data-short="SK"]::after {
  background-image: url("../images/storage.svg");
}

.app-nav__link[data-short="ST"]::after {
  background-image: url("../images/settings.svg");
}

.app-nav__label,
.logout-form__label {
  transition: opacity 180ms ease, transform 180ms ease;
}

.app-nav__link:hover,
.app-nav__link--active {
  color: white;
  background: linear-gradient(135deg, rgba(var(--brand-red-rgb), 0.92), rgba(var(--brand-red-deep-rgb), 0.88));
  transform: translateX(2px);
}

.logout-form {
  margin-top: auto;
}

.logout-form .button--ghost {
  justify-content: space-between;
  gap: 12px;
  color: #ff4d4d;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.logout-form .button--ghost::after {
  background-image: url("../images/deconnexion.svg");
}

.logout-form .button--ghost:hover {
  color: #ff6a6a;
}

.app-main {
  padding: 24px;
  position: relative;
}

.sidebar-fab,
.sidebar-mobile-trigger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.sidebar-fab {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 140;
}

.sidebar-mobile-trigger {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 95;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 92px minmax(0, 1fr);
}

body.sidebar-collapsed .app-sidebar {
  padding: 18px 14px;
}

body.sidebar-collapsed .app-sidebar__controls {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-control--collapse {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
}

body.sidebar-collapsed .app-logo {
  padding: 10px;
  border-radius: 20px;
}

body.sidebar-collapsed .app-nav__link {
  justify-content: center;
  gap: 0;
  padding: 0;
}

body.sidebar-collapsed .app-nav__link::before {
  content: none;
}

body.sidebar-collapsed .app-nav__label,
body.sidebar-collapsed .logout-form__label {
  opacity: 0;
  transform: translateX(-8px);
  position: absolute;
  pointer-events: none;
}

body.sidebar-collapsed .logout-form .button--ghost {
  justify-content: center;
  gap: 0;
  padding: 0;
}


body.sidebar-collapsed .sidebar-fab {
  display: inline-flex;
}

body.sidebar-collapsed .sidebar-fab {
  left: 22px;
}

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

.user-chip {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.user-chip span {
  color: var(--muted);
  font-size: 0.9rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.workspace-grid--detail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.workspace-grid--edit {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: start;
}

.workspace-panel {
  padding: 26px;
  border-radius: 28px;
  background: var(--surface);
}

.workspace-panel--compact {
  padding: 20px;
}

.workspace-panel--hero {
  background:
    linear-gradient(160deg, rgba(255, 250, 246, 0.92), rgba(255, 255, 255, 0.74)),
    var(--surface);
}

.workspace-panel--spotlight {
  background:
    radial-gradient(circle at top right, rgba(var(--brand-red-rgb), 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 249, 247, 0.92), rgba(255, 255, 255, 0.74));
}

.workspace-panel--brand {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 239, 236, 0.78));
}

.workspace-panel--brand img {
  width: min(100%, 420px);
  height: auto;
}

.workspace-panel--table {
  margin-top: 18px;
}

.detail-stack--order .workspace-panel--table:has(> .empty-state) {
  display: none;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 320px;
  gap: 18px;
}

.setup-panel--main {
  background:
    radial-gradient(circle at top right, rgba(var(--brand-red-rgb), 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255, 252, 249, 0.96), rgba(255, 255, 255, 0.76));
}

.setup-panel--aside {
  position: sticky;
  top: 24px;
  align-self: start;
  background:
    radial-gradient(circle at top right, rgba(245, 211, 161, 0.45), transparent 32%),
    linear-gradient(180deg, rgba(255, 249, 246, 0.96), rgba(255, 255, 255, 0.8));
}

.form-section-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.form-section-card__head {
  display: grid;
  gap: 6px;
}

.form-section-card__head strong {
  font-size: 1rem;
}

.form-section-card__head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.setup-points {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.setup-point {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.setup-point strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-deep) 100%);
}

.setup-point span {
  font-weight: 700;
}

.detail-column {
  display: grid;
  gap: 18px;
  align-content: start;
  align-self: start;
}

.detail-column--form {
  position: sticky;
  top: 24px;
}

.detail-stack {
  display: grid;
  gap: 18px;
}

.detail-hero {
  background:
    linear-gradient(160deg, rgba(255, 250, 246, 0.94), rgba(255, 255, 255, 0.78)),
    var(--surface);
}

.detail-hero__intro {
  max-width: 70ch;
}

.detail-hero--with-logo .customer-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.customer-logo-card {
  display: grid;
  gap: 10px;
  min-width: 180px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.customer-logo-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.customer-logo-card img {
  max-width: 180px;
  max-height: 92px;
  width: auto;
  height: auto;
}

.detail-panel h2 {
  margin-top: 10px;
}

.detail-hero__linked {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.detail-hero__linked span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-hero__linked a {
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
}

.detail-hero__linked a:hover {
  color: rgb(var(--brand-red-rgb));
}

.detail-hero__linked small {
  color: var(--muted);
}

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

.detail-hero__linked-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.detail-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.detail-list__item {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-list__item dt {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-list__item dd {
  margin: 0;
  font-weight: 700;
}

.detail-list--compact {
  gap: 10px;
}

.detail-list--compact .detail-list__item {
  padding-bottom: 10px;
}

/* Product information uses balanced columns to avoid empty grid gaps. */
.product-detail-grid {
  display: block;
  columns: 2 360px;
  column-gap: 18px;
}

.product-detail-grid .detail-panel {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  padding: 22px;
  vertical-align: top;
  break-inside: avoid;
  box-shadow: 0 14px 32px rgba(67, 36, 36, 0.07);
}

.product-detail-grid .detail-list {
  gap: 0;
  margin-top: 14px;
}

.product-detail-grid .detail-list__item {
  gap: 5px;
  padding: 11px 0;
}

.product-detail-grid .detail-list__item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

@media (max-width: 760px) {
  .product-detail-grid { columns: 1; }
  .product-detail-grid .detail-panel { margin-bottom: 14px; padding: 20px 16px; }
}

.banking-hero-panel,
.banking-cheque-panel {
  display: grid;
  gap: 28px;
}

body:has(#bank-accounts-section) .app-header h1 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
}

.banking-anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 34px rgba(19, 15, 16, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.banking-anchor-nav__button {
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  background: rgba(255, 250, 245, 0.92);
  color: var(--muted);
  padding: 12px 18px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.banking-anchor-nav__button:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--brand-red-rgb), 0.24);
  color: var(--foreground);
}

.banking-anchor-nav__button.is-active {
  background: linear-gradient(135deg, rgba(var(--brand-red-rgb), 0.95), rgba(245, 166, 35, 0.95));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 16px 28px rgba(var(--brand-red-rgb), 0.24);
}

#bank-accounts-section,
#banking-receipts-section {
  scroll-margin-top: 128px;
}

.banking-hero-panel__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.banking-transfer-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.banking-transfer-button img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.banking-cheque-panel .header-actions [data-modal-open="create-cheque-receipt-modal"] {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.banking-cheque-panel .header-actions [data-modal-open="create-cheque-receipt-modal"]::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

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

.bank-account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.bank-account-card {
  display: grid;
  grid-template-rows: minmax(76px, auto) minmax(92px, auto) auto 1fr auto;
  gap: 16px;
  padding: 22px;
  height: 100%;
  align-content: start;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 247, 241, 0.78)),
    var(--surface);
  box-shadow:
    0 20px 42px rgba(19, 15, 16, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.bank-account-card--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background:
    linear-gradient(160deg, rgba(255, 251, 235, 0.98), rgba(255, 243, 199, 0.84)),
    var(--surface);
  box-shadow:
    0 20px 42px rgba(245, 158, 11, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.bank-account-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bank-account-card__status-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.bank-account-card__view-button {
  flex-shrink: 0;
}

.bank-account-card__head h3 {
  margin: 6px 0 0;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bank-account-card__status-actions .status-badge {
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.bank-account-card__status-actions .status-badge--success {
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #15803d);
  border-color: rgba(21, 128, 61, 0.9);
}

.bank-account-card__status-actions .status-badge--danger {
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-color: rgba(185, 28, 28, 0.92);
}

.bank-account-card__balance {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 16px 18px;
  min-height: 92px;
  border-radius: 22px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.14);
  background: rgba(255, 255, 255, 0.76);
}

.bank-account-card__balance--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, rgba(255, 252, 239, 0.98), rgba(255, 244, 211, 0.92));
}

.bank-account-card__balance span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bank-account-card__balance strong {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.bank-account-card__chips,
.banking-static-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bank-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.18);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.bank-chip--success {
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #15803d);
  border-color: rgba(21, 128, 61, 0.92);
  box-shadow: 0 12px 24px rgba(21, 128, 61, 0.18);
}

.bank-chip--danger {
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-color: rgba(185, 28, 28, 0.92);
  box-shadow: 0 12px 24px rgba(185, 28, 28, 0.18);
}

.banking-static-row--separated {
  margin-top: 18px;
  margin-bottom: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(var(--brand-red-rgb), 0.12);
}

.bank-account-card__note {
  margin: 0;
  padding: 14px 16px;
  min-height: 86px;
  display: flex;
  align-items: flex-start;
  margin-top: auto;
  border-radius: 18px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  line-height: 1.6;
}

.bank-account-card__note--warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, rgba(255, 250, 230, 0.98), rgba(255, 242, 199, 0.9));
  color: #8a5600;
  font-weight: 600;
}

.bank-account-card__transactions-button {
  width: 100%;
  justify-content: center;
  gap: 10px;
}

.bank-account-card__transactions-button img {
  width: 18px;
  height: 18px;
}

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

.banking-transactions-hero__chips {
  margin-top: 18px;
}

.bank-transactions-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
}

.bank-transactions-filter .field {
  min-width: 220px;
}

.bank-transactions-amount--debit {
  color: #b91c1c;
  font-weight: 700;
}

.bank-transactions-amount--credit {
  color: #15803d;
  font-weight: 700;
}

.bank-account-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1.12fr);
  gap: 18px;
}

.bank-account-detail-panel {
  width: 100%;
}

.banking-cheque-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.banking-cheque-panel {
  margin-top: 10px;
}

.banking-cheque-subpanel {
  position: relative;
  overflow: hidden;
  align-content: start;
  padding: 28px;
  border-radius: 30px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 249, 244, 0.82)),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow:
    0 18px 36px rgba(19, 15, 16, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.banking-cheque-subpanel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(var(--brand-red-rgb), 0.9), rgba(245, 166, 35, 0.9));
}

.banking-cheque-subpanel--history::before {
  background: linear-gradient(90deg, rgba(245, 166, 35, 0.95), rgba(var(--brand-red-rgb), 0.7));
}

.banking-cheque-subpanel .table-header {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(var(--brand-red-rgb), 0.1);
}

.banking-cheque-subpanel__summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
}

.banking-cheque-subpanel__summary strong {
  color: var(--foreground);
}

.banking-cheque-subpanel__summary--warning {
  border-color: rgba(245, 166, 35, 0.34);
  background: linear-gradient(135deg, rgba(255, 245, 217, 0.98), rgba(255, 233, 186, 0.92));
  color: #6e4b00;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.banking-cheque-subpanel__summary--warning strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(255, 193, 7, 0.18);
  color: #5d3d00;
  box-shadow: inset 0 0 0 1px rgba(245, 166, 35, 0.2);
}

.banking-cheque-subpanel .table-wrap {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.08);
  background: rgba(255, 255, 255, 0.84);
}

.banking-receipt-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 18px 0;
  padding-top: 6px;
}

.banking-transfer-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.98) 0%, rgba(255, 243, 199, 0.96) 100%);
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.12);
  color: #8a5600;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}

.banking-transfer-hint::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b 0%, #facc15 100%);
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.22);
  color: #fffdf5;
  font-size: 0.88rem;
  font-weight: 800;
}

.banking-transfer-hint strong {
  color: #7c3f00;
  font-weight: 800;
}

#create-internal-transfer-modal .form-grid .field:nth-child(6),
#create-internal-transfer-modal .form-grid .field:nth-child(7) {
  display: none;
}

#create-internal-transfer-modal .form-grid .field:nth-child(8) {
  order: 5;
}

#create-internal-transfer-modal .form-grid .field:nth-child(5) {
  order: 6;
}

.banking-receipt-document-panel {
  padding: 24px 26px;
  border-radius: 26px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.1);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 242, 0.78));
  box-shadow: 0 16px 32px rgba(19, 15, 16, 0.05);
  order: 1;
}

.banking-receipt-download-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.banking-receipt-download-button img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.banking-receipt-checks-header {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(var(--brand-red-rgb), 0.1);
}

.banking-receipt-detail-panel {
  display: none;
}

.banking-receipt-detail-panel .detail-panel,
.banking-receipt-detail-panel-bottom .detail-panel {
  width: 100%;
}

.banking-receipt-detail-panel-bottom {
  grid-template-columns: 1fr;
}

#receipt-detail-modal .modal-panel--wide {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#receipt-detail-modal.modal-shell {
  place-items: start center;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#receipt-detail-modal .modal-panel {
  margin: 10px 0 24px;
  max-height: none;
  overflow: visible;
}

#account-detail-modal .modal-panel__header {
  position: static;
  top: auto;
}

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

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

.contact-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.contact-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.contact-card span {
  color: var(--muted);
  font-size: 0.94rem;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
}

.documents-dropdown {
  position: relative;
  flex: 0 1 auto;
}

.documents-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
}

.documents-dropdown[open] .documents-dropdown__toggle {
  border-color: rgba(var(--brand-red-rgb), 0.26);
  box-shadow:
    0 0 0 2px rgba(var(--brand-red-rgb), 0.12),
    0 18px 34px rgba(var(--brand-red-rgb), 0.22);
}

.documents-dropdown__toggle::-webkit-details-marker {
  display: none;
}

.documents-dropdown__arrow {
  display: inline-block;
  line-height: 1;
  transition: transform 180ms ease;
}

.documents-dropdown[open] .documents-dropdown__arrow {
  transform: rotate(180deg);
}

.documents-dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 8px;
  min-width: 220px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 36px rgba(17, 15, 16, 0.14);
}

.documents-dropdown[open] .documents-dropdown__menu {
  border-color: rgba(var(--brand-red-rgb), 0.22);
  box-shadow:
    0 0 0 1px rgba(var(--brand-red-rgb), 0.08),
    0 20px 42px rgba(17, 15, 16, 0.16);
}

.documents-dropdown__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid transparent;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.documents-dropdown__item:hover {
  transform: translateY(-1px);
  background: rgba(255, 248, 244, 0.98);
  border-color: rgba(var(--brand-red-rgb), 0.12);
}

.documents-dropdown__item img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.documents-dropdown__menu form {
  margin: 0;
}

.documents-dropdown__item--action {
  width: 100%;
  justify-content: space-between;
  font: inherit;
  cursor: pointer;
  text-align: left;
  white-space: normal;
  line-height: 1.3;
}

.documents-dropdown--actions .documents-dropdown__toggle {
  min-width: 180px;
  justify-content: space-between;
  color: #fff7ed;
  border: 1px solid rgba(194, 96, 8, 0.3);
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 58%, #fbbf24 100%);
  box-shadow:
    0 16px 34px rgba(217, 119, 6, 0.24),
    0 0 0 0 rgba(251, 191, 36, 0.34);
  animation: actionTogglePulse 2.6s ease-in-out infinite;
}

.documents-dropdown--actions[open] .documents-dropdown__toggle {
  border-color: rgba(194, 96, 8, 0.44);
  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.18),
    0 18px 38px rgba(217, 119, 6, 0.28);
}

.documents-dropdown--actions .documents-dropdown__menu {
  min-width: 320px;
}

.documents-dropdown--actions .documents-dropdown__item--action {
  min-height: 52px;
  padding: 0 16px;
  border-width: 1px;
  border-style: solid;
  box-shadow: none;
}

.documents-dropdown--actions .documents-dropdown__item--action.button--success {
  color: #f3fff7;
  border-color: rgba(17, 94, 63, 0.35);
  background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
  box-shadow: 0 12px 24px rgba(21, 128, 61, 0.18);
}

.documents-dropdown--actions .documents-dropdown__item--action.button--primary {
  color: #fff7f3;
  border-color: rgba(var(--brand-red-rgb), 0.22);
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-deep) 100%);
  box-shadow: 0 12px 24px rgba(var(--brand-red-rgb), 0.18);
}

.documents-dropdown--actions .documents-dropdown__item--action.button--danger {
  color: #fff5f5;
  border-color: rgba(146, 25, 25, 0.18);
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
  box-shadow: 0 12px 24px rgba(185, 28, 28, 0.18);
}

.documents-dropdown--actions .documents-dropdown__item--action.button--reopen-edit {
  color: #7b4a00;
  border-color: rgba(214, 131, 18, 0.28);
  background: linear-gradient(135deg, rgba(255, 228, 168, 0.98), rgba(255, 244, 219, 0.94));
  box-shadow: 0 12px 24px rgba(214, 131, 18, 0.12);
}

.documents-dropdown--actions .documents-dropdown__item--action.button--info-edit {
  color: #6a3a10;
  border-color: rgba(198, 120, 20, 0.24);
  background: linear-gradient(135deg, rgba(255, 237, 201, 0.96), rgba(255, 248, 231, 0.92));
  box-shadow: 0 12px 24px rgba(198, 120, 20, 0.1);
}

.documents-dropdown--actions .documents-dropdown__item--action.button--delivery-focus {
  color: #f3fff7;
  border-color: rgba(17, 94, 63, 0.35);
  background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
  box-shadow: 0 12px 24px rgba(21, 128, 61, 0.18);
}

.documents-dropdown--actions .documents-dropdown__item--action:hover {
  transform: translateY(-1px);
}

.documents-dropdown--actions .documents-dropdown__item--action.button--success:hover {
  background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
  box-shadow: 0 14px 28px rgba(21, 128, 61, 0.22);
}

.documents-dropdown--actions .documents-dropdown__item--action.button--primary:hover {
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-deep) 100%);
  box-shadow: 0 14px 28px rgba(var(--brand-red-rgb), 0.22);
}

.documents-dropdown--actions .documents-dropdown__item--action.button--danger:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
  box-shadow: 0 14px 28px rgba(185, 28, 28, 0.24);
}

.documents-dropdown--actions .documents-dropdown__item--action.button--reopen-edit:hover {
  background: linear-gradient(135deg, rgba(255, 228, 168, 0.98), rgba(255, 244, 219, 0.94));
  box-shadow: 0 14px 28px rgba(214, 131, 18, 0.18);
}

.documents-dropdown--actions .documents-dropdown__item--action.button--info-edit:hover {
  background: linear-gradient(135deg, rgba(255, 237, 201, 0.96), rgba(255, 248, 231, 0.92));
  box-shadow: 0 14px 28px rgba(198, 120, 20, 0.16);
}

.documents-dropdown--actions .documents-dropdown__item--action.button--delivery-focus:hover {
  background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
  box-shadow: 0 14px 28px rgba(21, 128, 61, 0.22);
}

@keyframes actionTogglePulse {
  0% {
    box-shadow:
      0 16px 34px rgba(217, 119, 6, 0.24),
      0 0 0 0 rgba(251, 191, 36, 0.24);
  }
  50% {
    box-shadow:
      0 18px 38px rgba(217, 119, 6, 0.28),
      0 0 0 8px rgba(251, 191, 36, 0.06);
  }
  100% {
    box-shadow:
      0 16px 34px rgba(217, 119, 6, 0.24),
      0 0 0 0 rgba(251, 191, 36, 0.24);
  }
}

.inline-form {
  margin: 0;
}

.button--success {
  color: white;
  border-color: rgba(17, 94, 63, 0.35);
  background: linear-gradient(135deg, #1f9d68 0%, #136c47 100%);
  box-shadow: 0 14px 30px rgba(19, 108, 71, 0.2);
}

.button--danger-soft {
  color: #a12727;
  border-color: rgba(161, 39, 39, 0.18);
  background: rgba(255, 244, 244, 0.9);
}

.quote-status-panel {
  background:
    linear-gradient(180deg, rgba(255, 250, 246, 0.96), rgba(255, 255, 255, 0.88)),
    var(--surface);
}

.quote-status-panel h2 {
  margin: 8px 0 10px;
}

.status-panel__headline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}

.status-panel__headline h2 {
  margin: 0;
}

.quote-status-panel p {
  max-width: 76ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.delivery-live-banner {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, rgba(255, 248, 235, 0.96), rgba(255, 255, 255, 0.92));
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.12);
}

.delivery-live-banner .status-badge {
  justify-self: start;
}

.delivery-live-banner p {
  margin: 0;
  color: var(--text);
  max-width: 60ch;
}

.delivery-live-banner .button {
  justify-self: start;
}

.shipment-signoff-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 20px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.94));
}

.shipment-signoff-banner p {
  margin: 0;
  color: var(--text);
}

.shipment-overdue-alert {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(255, 243, 214, 0.92));
  box-shadow: 0 18px 38px rgba(217, 119, 6, 0.12);
}

.shipment-overdue-alert__copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.shipment-overdue-alert__copy img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.shipment-overdue-alert__copy strong {
  display: block;
  margin-bottom: 6px;
}

.shipment-overdue-alert__copy p {
  margin: 0;
}

.shipment-detail-grid {
  gap: 12px;
}

.line-type-switcher {
  display: inline-flex;
  margin-bottom: 18px;
}

.choice-card--selectable {
  position: relative;
  cursor: pointer;
}

.choice-card--selectable input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.choice-card--selectable:has(input:checked) {
  border-color: rgba(var(--brand-red-rgb), 0.34);
  box-shadow: 0 18px 34px rgba(var(--brand-red-rgb), 0.14);
  transform: translateY(-2px);
}

.choice-card--tone-success {
  border-color: rgba(34, 197, 94, 0.16);
  background: linear-gradient(180deg, rgba(248, 255, 250, 0.98), rgba(237, 252, 242, 0.92));
  box-shadow: 0 24px 56px rgba(34, 197, 94, 0.1);
}

.choice-card--tone-success:hover {
  border-color: rgba(34, 197, 94, 0.28);
  box-shadow: 0 30px 70px rgba(34, 197, 94, 0.14);
}

.choice-card--tone-success .choice-card__eyebrow,
.choice-card--tone-success strong {
  color: #166534;
}

.choice-card--tone-success:has(input:checked) {
  border-color: rgba(34, 197, 94, 0.42);
  box-shadow: 0 24px 48px rgba(34, 197, 94, 0.18);
}

.choice-card--tone-danger {
  border-color: rgba(239, 68, 68, 0.16);
  background: linear-gradient(180deg, rgba(255, 249, 249, 0.98), rgba(254, 242, 242, 0.94));
  box-shadow: 0 24px 56px rgba(239, 68, 68, 0.08);
}

.choice-card--tone-danger:hover {
  border-color: rgba(239, 68, 68, 0.28);
  box-shadow: 0 30px 70px rgba(239, 68, 68, 0.13);
}

.choice-card--tone-danger .choice-card__eyebrow,
.choice-card--tone-danger strong {
  color: #b42318;
}

.choice-card--tone-danger:has(input:checked) {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 24px 48px rgba(239, 68, 68, 0.16);
}

.choice-card--tone-warning {
  border-color: rgba(245, 158, 11, 0.18);
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.98), rgba(255, 247, 228, 0.94));
  box-shadow: 0 24px 56px rgba(245, 158, 11, 0.1);
}

.choice-card--tone-warning:hover {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 30px 70px rgba(245, 158, 11, 0.15);
}

.choice-card--tone-warning .choice-card__eyebrow,
.choice-card--tone-warning strong {
  color: #b45309;
}

.choice-card--tone-warning:has(input:checked) {
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 24px 48px rgba(245, 158, 11, 0.18);
}

.choice-card--tone-info {
  border-color: rgba(59, 130, 246, 0.18);
  background: linear-gradient(180deg, rgba(244, 250, 255, 0.98), rgba(230, 243, 255, 0.92));
  box-shadow: 0 24px 56px rgba(59, 130, 246, 0.1);
}

.choice-card--tone-info:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 30px 70px rgba(59, 130, 246, 0.15);
}

.choice-card--tone-info .choice-card__eyebrow,
.choice-card--tone-info strong {
  color: #0f4ea8;
}

.choice-card--tone-info:has(input:checked) {
  border-color: rgba(59, 130, 246, 0.42);
  box-shadow: 0 24px 48px rgba(59, 130, 246, 0.18);
}

.contacts-section__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.contact-add-button {
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  color: white;
  font: inherit;
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-deep) 100%);
  box-shadow: 0 18px 36px rgba(var(--brand-red-rgb), 0.22);
}

.contact-add-button span {
  font-weight: 700;
}

.contact-add-button strong {
  font-size: 1.4rem;
  line-height: 1;
}

.contact-add-button--glow,
.button--glow {
  animation: bankSetupGlow 1.9s ease-in-out infinite;
}

.contact-add-button--glow {
  box-shadow:
    0 18px 36px rgba(var(--brand-red-rgb), 0.24),
    0 0 0 6px rgba(var(--brand-red-rgb), 0.1);
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.modal-shell[hidden] {
  /* A closed modal must never leave an invisible layer above the application. */
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 15, 16, 0.55);
  backdrop-filter: blur(8px);
  transition: opacity 220ms ease;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 28px 70px rgba(17, 15, 16, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 252, 249, 0.98), rgba(255, 245, 241, 0.92));
  transform: translateY(0) scale(1);
  transition: transform 220ms ease, opacity 220ms ease, box-shadow 220ms ease;
}

.modal-panel--narrow {
  width: min(100%, 760px);
}

.modal-panel--wide {
  width: min(100%, 1120px);
}

.modal-panel--choice {
  width: min(100%, 860px);
}

.modal-shell--blocking {
  z-index: 1600;
}

.modal-panel--bank-setup {
  width: min(100%, 720px);
  border: 1px solid rgba(var(--brand-red-rgb), 0.16);
  background:
    radial-gradient(circle at top right, rgba(var(--brand-red-rgb), 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 252, 249, 0.99), rgba(255, 245, 241, 0.96));
  box-shadow:
    0 36px 80px rgba(17, 15, 16, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.42) inset;
}

.modal-panel--account-setup {
  width: min(100%, 760px);
  border: 1px solid rgba(245, 158, 11, 0.24);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 28%),
    radial-gradient(circle at top left, rgba(var(--brand-red-rgb), 0.08), transparent 22%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.99), rgba(255, 248, 238, 0.96));
  box-shadow:
    0 38px 84px rgba(17, 15, 16, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.48) inset;
  animation: accountSetupFloat 2.6s ease-in-out infinite;
}

.bank-setup-modal__logout {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
}

.bank-setup-modal__logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(185, 28, 28, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 18px 34px rgba(185, 28, 28, 0.24);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.bank-setup-modal__logout-button:hover {
  transform: translateY(-2px);
  border-color: rgba(185, 28, 28, 0.34);
  box-shadow: 0 22px 40px rgba(185, 28, 28, 0.3);
}

.bank-setup-modal__logout-button img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.bank-setup-modal__content {
  display: grid;
  gap: 16px;
  text-align: center;
  justify-items: center;
}

.bank-setup-modal__content p {
  max-width: 58ch;
  margin: 0;
}

.bank-setup-modal__content strong {
  color: var(--brand-red-deep);
}

.bank-setup-modal__content--info {
  gap: 18px;
}

.bank-setup-modal__signature {
  padding-top: 6px;
}

.bank-setup-modal__logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 10px 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  box-shadow: 0 16px 34px rgba(var(--brand-red-rgb), 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.bank-setup-modal__logo-link:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--brand-red-rgb), 0.22);
  box-shadow: 0 20px 40px rgba(var(--brand-red-rgb), 0.16);
}

.bank-setup-modal__logo {
  display: block;
  width: min(100%, 160px);
  max-width: 160px;
  height: auto;
  object-fit: contain;
}

.bank-setup-modal__action {
  min-width: min(100%, 320px);
}

@keyframes bankSetupGlow {
  0%,
  100% {
    transform: translateY(0);
    box-shadow:
      0 18px 36px rgba(var(--brand-red-rgb), 0.24),
      0 0 0 0 rgba(var(--brand-red-rgb), 0.16);
  }
  50% {
    transform: translateY(-1px);
    box-shadow:
      0 22px 44px rgba(var(--brand-red-rgb), 0.3),
      0 0 0 8px rgba(var(--brand-red-rgb), 0.08);
  }
}

@keyframes accountSetupFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.modal-shell[hidden] .modal-backdrop {
  opacity: 0;
}

.modal-shell[hidden] .modal-panel {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  box-shadow: 0 12px 26px rgba(17, 15, 16, 0.12);
}

.modal-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
  position: sticky;
  top: -28px;
  z-index: 2;
  padding: 0 0 14px;
  background: linear-gradient(180deg, rgba(255, 252, 249, 0.98), rgba(255, 250, 246, 0.96));
  border-bottom: 1px solid rgba(73, 37, 37, 0.08);
}

.modal-close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.modal-close:hover {
  transform: rotate(90deg);
  background: rgba(255, 245, 241, 0.96);
  border-color: rgba(224, 0, 0, 0.18);
}

.client-toolbar,
.client-filters-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.client-filters-panel .mini-stat {
  margin-top: 50px;
}

.quote-filters-panel {
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
}

.quote-filters-panel__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.quote-filters-panel__top--start {
  align-items: flex-start;
}

.quote-filters-panel__top--start .quote-filters-panel__stat {
  align-self: flex-start;
}

.quote-filters-panel__intro {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.quote-filters-panel__stat {
  margin-top: 0;
  min-width: 220px;
}

.section-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.section-switcher--filters {
  margin-bottom: 0;
}

.section-switcher__link {
  min-width: 228px;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 18px;
  border-width: 1px;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.section-switcher__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.11);
}

.section-switcher__link.button--ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
  border-color: rgba(var(--brand-red-rgb), 0.18);
  color: var(--ink);
}

.section-switcher__link--active {
  box-shadow: 0 14px 30px rgba(var(--brand-red-rgb), 0.2);
}

.client-search,
.client-filters-form {
  display: flex;
  flex: 1;
  gap: 14px;
  align-items: end;
}

.field--search {
  flex: 1;
}

.client-search__actions,
.client-filters-actions {
  display: flex;
  gap: 10px;
}

.client-filters-form {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

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

.table-header--stacked {
  align-items: end;
}

.table-header__copy {
  margin: 10px 0 0;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pagination-bar__info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pagination-bar__info span {
  color: var(--muted);
}

.pagination-bar__actions {
  display: flex;
  gap: 10px;
}

.edit-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

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

.segmented-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.segmented-toggle__item {
  border: none;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.segmented-toggle__item.is-active {
  color: white;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-deep) 100%);
  box-shadow: 0 14px 30px rgba(var(--brand-red-rgb), 0.24);
}

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

.product-kind-section {
  display: grid;
  gap: 16px;
}

.input-with-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding-right: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.input-with-suffix input {
  border: none;
  background: transparent;
  box-shadow: none;
}

.input-with-suffix input:focus {
  box-shadow: none;
}

.input-with-suffix em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
  white-space: nowrap;
}

.input-with-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto);
  gap: 10px;
}

.input-with-select input,
.input-with-select select {
  min-width: 0;
}

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

.field__legend {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
}

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

.dimension-grid--product {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(130px, auto);
}

.dimension-grid__unit {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.choice-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 10px;
}

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

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

.choice-card-grid--expired-signed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.choice-card-grid--single {
  grid-template-columns: minmax(320px, 560px);
  justify-content: center;
}

.choice-card {
  text-align: left;
  border: 2px solid rgba(var(--brand-red-rgb), 0.14);
  border-radius: 28px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 245, 241, 0.88));
  box-shadow: 0 24px 56px rgba(var(--brand-red-rgb), 0.12);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.choice-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--brand-red-rgb), 0.28);
  box-shadow: 0 30px 70px rgba(var(--brand-red-rgb), 0.18);
}

.choice-card--active {
  transform: translateY(-4px);
  border-color: rgba(var(--brand-red-rgb), 0.34);
  box-shadow: 0 30px 70px rgba(var(--brand-red-rgb), 0.22);
}

.choice-card__eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.choice-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.choice-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-actions--split {
  justify-content: space-between;
}

.dashboard-intro {
  max-width: 860px;
  margin: 0 auto 22px;
  text-align: center;
}

.app-header__title--dashboard {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.02;
}

.dashboard-intro p {
  margin: 0;
  font-size: 1.08rem;
}

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

.mini-stat {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.mini-stat--compact {
  min-width: 180px;
}

.mini-stat span {
  color: var(--muted);
  font-size: 0.84rem;
}

.mini-stat strong {
  font-size: 1.45rem;
}

.card-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  grid-auto-rows: 1fr;
  gap: 18px;
  margin-top: 18px;
}

.card-menu--single {
  grid-template-columns: minmax(280px, 420px);
}

.menu-card {
  display: grid;
  align-content: start;
  grid-template-rows: auto auto 1fr;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 220px;
  padding: 24px;
  border-radius: 28px;
  border: 2px solid rgba(var(--brand-red-rgb), 0.18);
  box-shadow:
    0 22px 50px rgba(var(--brand-red-rgb), 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 244, 240, 0.86));
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.menu-card::before {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -10px;
  width: clamp(96px, 42%, 172px);
  height: clamp(96px, 42%, 172px);
  background:
    linear-gradient(135deg, rgba(var(--brand-red-rgb), 0.16), rgba(var(--brand-cream-rgb), 0.44));
  opacity: 0.95;
  pointer-events: none;
  -webkit-mask-image: var(--menu-card-icon);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: var(--menu-card-icon);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.menu-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--brand-red-rgb), 0.34);
  box-shadow:
    0 30px 70px rgba(var(--brand-red-rgb), 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.menu-card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: clamp(74px, 32%, 132px);
  height: clamp(74px, 32%, 132px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--brand-cream-rgb), 0.3), rgba(var(--brand-cream-rgb), 0));
  filter: blur(6px);
  pointer-events: none;
}

.menu-card__meta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.menu-card__meta strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.2);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(var(--brand-blush-rgb), 0.3)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 246, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 8px 18px rgba(var(--brand-red-rgb), 0.1);
  color: var(--brand-red-deep);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0;
}

.menu-card h3,
.menu-card p {
  position: relative;
  z-index: 1;
}

.menu-card h3 {
  font-size: 1.5rem;
}

.menu-card p {
  max-width: 28ch;
}

@media (min-width: 1101px) {
  .card-menu > .menu-card:last-child:nth-child(3n + 1) {
    grid-column: 2;
  }
}

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

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

.preview-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.preview-card span,
.connector-pill,
.empty-state,
.status-badge {
  color: var(--muted);
}

.connector-pill {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}

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

.client-table,
.quote-lines-table {
  width: 100%;
  border-collapse: collapse;
}

.client-table th,
.client-table td,
.quote-lines-table th,
.quote-lines-table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.client-table th,
.quote-lines-table th {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quote-summary-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.quote-summary-card strong {
  font-size: 1.45rem;
}

.quote-summary-card--highlight {
  border-color: rgba(198, 120, 20, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 248, 231, 0.96), rgba(255, 255, 255, 0.9)),
    var(--surface);
  box-shadow: 0 18px 36px rgba(198, 120, 20, 0.12);
}

.quote-summary-card--positive strong {
  color: #15803d;
}

.quote-summary-card--negative strong {
  color: #b91c1c;
}

.invoice-payment-overview {
  display: grid;
  gap: 18px;
}

.invoice-payment-overview__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.invoice-payment-overview__item {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.invoice-payment-overview__item span {
  color: var(--muted);
}

.invoice-payment-overview__item strong {
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
}

.invoice-payment-preview {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.14);
  background: linear-gradient(180deg, rgba(255, 250, 246, 0.96), rgba(255, 255, 255, 0.9));
}

.invoice-payment-preview__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.invoice-payment-preview__row span {
  color: var(--muted);
}

.invoice-payment-preview__row strong {
  text-align: right;
}

.invoice-payment-preview__row--highlight {
  padding-top: 10px;
  border-top: 1px solid rgba(var(--brand-red-rgb), 0.12);
}

.invoice-payment-preview__row--highlight strong {
  color: #8a5b00;
}

.modal-copy {
  display: grid;
  gap: 12px;
  color: var(--text);
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .banking-anchor-nav {
    padding: 12px;
  }

  .banking-anchor-nav__button {
    width: 100%;
    justify-content: center;
  }

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

  .bank-account-detail-grid {
    grid-template-columns: 1fr;
  }

  .banking-cheque-layout,
  .banking-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 720px) {
  body:has(#bank-accounts-section) .app-header h1 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .bank-account-grid,
  .banking-cheque-layout,
  .banking-summary-grid,
  .banking-transactions-summary-grid {
    grid-template-columns: 1fr;
  }

  .bank-account-card__head,
  .banking-hero-panel__actions,
  .bank-transactions-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .bank-account-card__status-actions {
    justify-content: flex-start;
  }

  .banking-cheque-subpanel__summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .invoice-payment-overview__grid {
    grid-template-columns: 1fr;
  }

  .invoice-payment-preview__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .invoice-payment-preview__row strong {
    text-align: left;
  }
}

.quote-lines-panel {
  margin-top: 18px;
}

.quote-lines-panel--priority {
  margin-top: -4px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(var(--brand-red-rgb), 0.08);
  border: 1px solid rgba(var(--brand-red-rgb), 0.14);
  text-transform: capitalize;
}

.status-badge--success {
  color: #0f5d3c;
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.18);
}

.status-badge--danger {
  color: #7d1313;
  background: rgba(224, 0, 0, 0.1);
  border-color: rgba(224, 0, 0, 0.18);
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.empty-state--success {
  border: 1px solid rgba(34, 197, 94, 0.18);
  background: rgba(240, 253, 244, 0.92);
  color: #166534;
}

.theme-grid,
.checkbox-grid {
  display: grid;
  gap: 12px;
}

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

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

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

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

.service-access-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-access-list li {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(var(--brand-blush-rgb), 0.16));
  color: var(--ink);
  font-weight: 700;
}

.stock-primary-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 2px 0 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
  font-size: 0.78rem;
  font-weight: 800;
}

.warehouse-choice-list {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.warehouse-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.warehouse-choice:has(input:checked) {
  border-color: rgba(var(--brand-red-rgb), 0.42);
  background: rgba(var(--brand-blush-rgb), 0.2);
}

.warehouse-choice span {
  display: grid;
  gap: 3px;
}

.warehouse-choice small {
  color: var(--muted);
}

.stock-admin-primary-warehouse {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.stock-admin-primary-warehouse > span {
  color: var(--muted);
  line-height: 1.5;
}

.stock-admin-primary-warehouse .edit-form {
  display: grid;
  gap: 12px;
}

#stock-setup-required-title {
  max-width: 18ch;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.12;
}

.theme-option,
.checkbox-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.theme-option input,
.checkbox-card input {
  margin: 0;
}

.theme-option span,
.checkbox-card span {
  font-weight: 700;
}

.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.2);
  background: rgba(255, 255, 255, 0.82);
}

.checkbox-pill input {
  margin: 0;
}

.checkbox-pill span {
  font-weight: 700;
}

.checkbox-pill--soft {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  border-color: rgba(var(--brand-red-rgb), 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 242, 0.82));
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.checkbox-pill--soft input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-red);
}

.checkbox-pill--soft:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--brand-red-rgb), 0.22);
  box-shadow: 0 14px 28px rgba(var(--brand-red-rgb), 0.08);
}

.checkbox-pill--soft:has(input:checked) {
  border-color: rgba(var(--brand-red-rgb), 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(var(--brand-blush-rgb), 0.3));
  box-shadow:
    0 16px 34px rgba(var(--brand-red-rgb), 0.12),
    inset 0 0 0 1px rgba(var(--brand-red-rgb), 0.12);
}

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

.customer-create-intro {
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.1);
  background:
    radial-gradient(circle at top right, rgba(var(--brand-red-rgb), 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 243, 0.9));
}

.customer-create-intro strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.02rem;
}

.customer-create-intro p {
  margin: 0;
}

.expand-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.expand-panel[open] {
  box-shadow: 0 20px 44px rgba(var(--brand-red-rgb), 0.08);
}

.expand-panel__summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 700;
}

.expand-panel__summary::-webkit-details-marker {
  display: none;
}

.expand-panel__summary em {
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.expand-panel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  font-size: 0.95rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-deep) 100%);
  box-shadow: 0 12px 24px rgba(var(--brand-red-rgb), 0.18);
  transition: transform 180ms ease;
}

.expand-panel[open] .expand-panel__icon {
  transform: rotate(180deg);
}

.expand-panel__content {
  display: grid;
  gap: 16px;
  padding: 0 20px 20px;
}

.form-grid--single {
  grid-template-columns: 1fr;
}

.field--ghost {
  align-content: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(var(--brand-red-rgb), 0.12);
  background: rgba(255, 255, 255, 0.52);
}

.field--ghost small {
  margin-top: 4px;
}

.modal-intro-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  background: linear-gradient(135deg, rgba(var(--brand-red-rgb), 0.08), rgba(255, 255, 255, 0.82));
}

.modal-intro-card p {
  margin: 0;
}

.field-inline-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 12px;
}

.field-inline-group--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr)) 130px;
}

.field-hint-inline {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(var(--brand-red-rgb), 0.08);
  width: fit-content;
}

.field small a {
  color: var(--brand-red-deep);
  font-weight: 700;
  text-decoration: none;
}

.field small a:hover {
  text-decoration: underline;
}

.select-multiple {
  min-height: 144px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.commercial-picker {
  max-height: 280px;
  overflow: auto;
  padding-right: 6px;
}

.field--file input[type="file"] {
  min-height: 60px;
}

.search-field {
  position: relative;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 8;
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 247, 250, 0.98));
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(12px);
}

.search-dropdown::-webkit-scrollbar {
  width: 10px;
}

.search-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.search-dropdown::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: rgba(15, 23, 42, 0.18);
}

.search-dropdown[hidden] {
  display: none;
}

.search-dropdown__option {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 20px;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 244, 246, 0.94));
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.search-dropdown__top,
.search-dropdown__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-dropdown__reference {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-dropdown__badge {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #111827;
  background: rgba(17, 24, 39, 0.06);
  border: 1px solid rgba(17, 24, 39, 0.1);
}

.search-dropdown__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.search-dropdown__price {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111827;
}

.search-dropdown__state {
  font-size: 0.8rem;
  color: var(--muted);
}

.search-dropdown__option span,
.search-dropdown__empty {
  color: var(--muted);
  font-size: 0.84rem;
}

.search-dropdown__option:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(229, 231, 235, 0.72));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.1);
}

.search-dropdown__empty {
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.quote-reminders {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.quote-reminder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 236, 0.88));
  box-shadow: 0 18px 38px rgba(191, 102, 0, 0.12);
  overflow: hidden;
}

.quote-reminder::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--brand);
}

.quote-reminder--draft::before {
  background: #c97200;
}

.quote-reminder--warning::before {
  background: #d97706;
}

.quote-reminder__content {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
  min-width: 0;
}

.quote-reminder__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(120, 53, 15, 0.74);
}

.quote-reminder__message {
  display: block;
  line-height: 1.45;
}

@media (min-width: 901px) {
  .quote-reminder__message {
    white-space: nowrap;
  }
}

.quote-reminder__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(201, 114, 0, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #1f2937;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quote-reminder__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(191, 102, 0, 0.16);
}

.quote-reminder__link img {
  width: 18px;
  height: 18px;
}

.quote-status-help-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 230, 0.94));
  color: #a16207;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.12);
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.quote-status-help-trigger:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: 0 18px 34px rgba(217, 119, 6, 0.16);
}

.status-cell-stack {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-cell-stack--warning {
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(255, 243, 214, 0.94));
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.1);
}

.quote-expiry-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: linear-gradient(135deg, rgba(255, 250, 235, 0.98), rgba(255, 237, 213, 0.96));
  box-shadow: 0 10px 20px rgba(217, 119, 6, 0.12);
  cursor: pointer;
}

.quote-expiry-trigger img,
.expired-proposal-alert__copy img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.expired-proposal-alert {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(255, 243, 214, 0.92));
  box-shadow: 0 18px 38px rgba(217, 119, 6, 0.12);
}

.expired-proposal-alert__copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.expired-proposal-alert__copy strong {
  display: block;
  margin-bottom: 6px;
}

.expired-proposal-alert__copy p {
  margin: 0;
}

.expired-proposal-signed-header {
  display: grid;
  gap: 14px;
}

.expired-proposal-signed-header__intro {
  text-align: center;
}

.expired-proposal-signed-header__intro strong {
  display: block;
  margin-bottom: 8px;
}

.expired-proposal-signed-header__actions {
  display: flex;
  justify-content: center;
}

.expired-proposal-document-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 18px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 223, 0.92));
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.1);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.expired-proposal-document-link:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 20px 40px rgba(217, 119, 6, 0.14);
}

.expired-proposal-document-link img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.expired-proposal-fields[hidden] {
  display: none !important;
}

.expired-proposal-fields--clone {
  display: grid;
  gap: 18px;
}

.expired-proposal-options {
  margin-top: 4px;
  grid-template-columns: 1fr;
}

.expired-proposal-options .checkbox-pill {
  justify-content: flex-start;
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border-radius: 20px;
}

.expired-proposal-certification {
  margin-top: 10px;
}

.form-section-card--clone {
  gap: 20px;
  border-color: rgba(245, 158, 11, 0.16);
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 236, 0.9));
  box-shadow: 0 22px 50px rgba(217, 119, 6, 0.08);
}

.modal-intro-card--warning {
  border-color: rgba(245, 158, 11, 0.18);
  background: linear-gradient(135deg, rgba(255, 248, 223, 0.94), rgba(255, 255, 255, 0.9));
  box-shadow: 0 18px 38px rgba(217, 119, 6, 0.08);
}

.modal-panel--warning {
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: linear-gradient(180deg, rgba(255, 252, 242, 0.98), rgba(255, 245, 225, 0.96));
  box-shadow: 0 28px 70px rgba(146, 64, 14, 0.18);
}

.stock-insufficient-modal .panel__label,
.stock-insufficient-modal h2 {
  color: #9a5a00;
}

.stock-insufficient-modal p strong {
  color: #7a4a00;
}

.stock-revalidation-notice {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(218, 143, 20, 0.35);
  border-radius: 16px;
  background: rgba(255, 244, 218, 0.7);
}

.stock-revalidation-notice > strong { color: #9a5e08; }
.stock-revalidation-notice p { margin: 9px 0 0; }
.stock-revalidation-notice__summary { font-weight: 700; color: #6c4a12; }
.stock-revalidation-list { display: grid; gap: 8px; margin: 15px 0; padding: 0; list-style: none; }
.stock-revalidation-list__item { display: flex; justify-content: space-between; gap: 16px; padding: 11px 12px; border-radius: 11px; background: rgba(255, 255, 255, 0.65); }
.stock-revalidation-list__item--out span { color: #a44920; font-weight: 700; }
.stock-revalidation-list__item--in span { color: #257243; font-weight: 700; }

.stock-reopen-notice {
  margin: 18px 0;
  padding: 15px 16px;
  border: 1px solid rgba(37, 114, 67, 0.2);
  border-radius: 14px;
  background: rgba(232, 247, 236, 0.76);
}

.stock-reopen-notice strong { color: #1f6b3d; }
.stock-reopen-notice p { margin: 7px 0 0; color: #31533d; line-height: 1.55; }

@media (max-width: 620px) {
  .stock-revalidation-list__item { display: grid; gap: 4px; }
}

.expired-quote-modal__body {
  display: grid;
  gap: 12px;
}

.expired-quote-modal__body p {
  margin: 0;
}

.expired-quote-modal__badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.08);
}

.expired-quote-modal__badge img {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.quote-status-guide {
  display: grid;
  gap: 20px;
}

.quote-status-guide__intro {
  text-align: center;
}

.quote-status-guide__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.quote-status-guide__card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 243, 0.9));
  box-shadow: 0 22px 48px rgba(var(--brand-red-rgb), 0.08);
}

.quote-status-guide__badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.quote-status-guide__tone {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(var(--brand-red-rgb), 0.1);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.quote-status-guide__card p {
  margin: 0 0 12px;
}

.quote-status-guide__card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.quote-status-guide__warning {
  margin-top: 2px;
}

.status-badge--quote-accepted {
  color: #0f5d3c;
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(22, 163, 74, 0.22);
}

.status-badge--quote-refused {
  color: #8a1c1c;
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.22);
}

.status-badge--quote-draft {
  color: #114a8b;
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.22);
}

.status-badge--quote-validated {
  color: #8a5b00;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.24);
}

.status-badge--invoice-started {
  color: #9a3412;
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.22);
}

.status-badge--order-validated {
  color: #166534;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.24);
}

.status-badge--tier-supplier {
  color: #114a8b;
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.22);
}

.status-badge--tier-client {
  color: #8a5b00;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.24);
}

.status-badge--tier-prospect {
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.22);
}

.theme-option--fancy {
  position: relative;
  display: block;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.theme-option--fancy input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-option__surface {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.theme-option__swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.theme-option__swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 10px rgba(17, 15, 16, 0.12);
}

.theme-option__text {
  display: grid;
  gap: 4px;
}

.theme-option__text strong {
  font-size: 0.98rem;
}

.theme-option__text small {
  color: var(--muted);
  font-size: 0.82rem;
}

.theme-option--fancy:hover .theme-option__surface {
  transform: translateY(-2px);
  border-color: rgba(var(--brand-red-rgb), 0.22);
}

.theme-option--fancy input:checked + .theme-option__surface {
  border-color: rgba(var(--brand-red-rgb), 0.35);
  box-shadow:
    0 18px 36px rgba(var(--brand-red-rgb), 0.14),
    inset 0 0 0 1px rgba(var(--brand-red-rgb), 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(var(--brand-blush-rgb), 0.2));
}

.checkbox-card--modern {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  justify-content: flex-start;
}

.checkbox-card--modern input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-red);
}

.checkbox-card--modern {
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.checkbox-card--modern:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--brand-red-rgb), 0.16);
}

.checkbox-card--modern:has(input:checked) {
  border-color: rgba(var(--brand-red-rgb), 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(var(--brand-blush-rgb), 0.18));
}

.checkbox-card--paired {
  min-height: 72px;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  grid-column: span 2;
}

.checkbox-card__content {
  display: grid;
  gap: 4px;
}

.checkbox-card__content small {
  color: var(--muted);
  line-height: 1.45;
}

.checkbox-card--inline {
  justify-content: flex-start;
  margin-top: 2px;
}

.logo-preview-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.logo-preview-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.logo-preview-card img {
  max-width: 220px;
  max-height: 100px;
  width: auto;
  height: auto;
}

.connector-state {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.connector-state strong {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.connector-state span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.detail-column--compact .workspace-panel h2 {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
}

.detail-column--compact .workspace-panel p {
  margin: 8px 0 0;
}

.detail-column--compact .connector-state {
  margin-top: 12px;
  padding: 14px;
}

.detail-column--compact .edit-form {
  margin-top: 14px;
}

.connector-state--connected {
  border-color: rgba(22, 163, 74, 0.2);
  background: rgba(22, 163, 74, 0.08);
}

.connector-state--connected strong {
  color: #0f5d3c;
}

.connector-state--broken {
  border-color: rgba(224, 0, 0, 0.2);
  background: rgba(224, 0, 0, 0.08);
}

.connector-state--broken strong {
  color: #7d1313;
}

.connector-state--unconfigured strong {
  color: var(--brand-red-deep);
}

.connector-pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.connector-pill-badge--connected {
  color: #0f5d3c;
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.18);
}

.connector-pill-badge--warning {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.connector-pill-badge--off {
  color: #7d1313;
  background: rgba(224, 0, 0, 0.1);
  border: 1px solid rgba(224, 0, 0, 0.18);
}

.tenant-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tenant-cell__logo,
.tenant-cell__fallback {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  flex: 0 0 54px;
}

.tenant-cell__logo {
  object-fit: cover;
  border: 1px solid var(--line);
  background: white;
}

.tenant-cell__fallback {
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-size: 1.15rem;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-deep) 100%);
}

.tenant-cell__meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.module-tags,
.action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.module-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #0f3d91;
  font-size: 0.84rem;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.modal-copy {
  display: grid;
  gap: 10px;
}

.modal-copy p {
  margin: 0;
}

.signature-choice-panels {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.signature-choice-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 241, 0.88));
}

.signature-choice-panel[hidden] {
  display: none !important;
}

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

.copy-field input {
  flex: 1 1 auto;
}

.modal-intro-card--soft {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(var(--brand-red-rgb), 0.1);
}

.signature-choice-divider {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0 2px;
  text-align: center;
}

.signature-choice-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: rgba(var(--brand-red-rgb), 0.14);
}

.signature-choice-divider span {
  position: relative;
  z-index: 1;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff7f2;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

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

.modal-actions--centered {
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

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

  .header-actions > * {
    flex: 1 1 220px;
  }

  .header-actions > .documents-dropdown {
    max-width: 360px;
  }

  .header-actions .button,
  .header-actions .documents-dropdown__toggle {
    width: 100%;
  }

  .documents-dropdown__menu {
    left: 0;
    right: auto;
    width: min(100%, 360px);
    min-width: 0;
  }

  .documents-dropdown--actions .documents-dropdown__menu {
    width: min(100%, 360px);
    min-width: 0;
  }

  .login-stage,
  .workspace-grid,
  .workspace-grid--detail,
  .workspace-grid--edit,
  .setup-grid,
  .card-menu,
  .preview-grid {
    grid-template-columns: 1fr;
  }

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

  .client-toolbar,
  .client-search,
  .client-filters-panel,
  .client-filters-form,
  .section-switcher {
    flex-direction: column;
    align-items: stretch;
  }

  .quote-filters-panel__top {
    flex-direction: column;
    align-items: stretch;
  }

  .quote-status-guide__grid {
    grid-template-columns: 1fr;
  }

  .detail-column--form {
    position: static;
  }

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

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

  .checkbox-grid--thirdparty {
    grid-template-columns: 1fr;
  }

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

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

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

  .dimension-grid__unit {
    justify-content: flex-start;
  }

  .choice-card-grid {
    grid-template-columns: 1fr;
  }

  .copy-field {
    flex-direction: column;
    align-items: stretch;
  }

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

  .detail-hero--with-logo .customer-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .line-quantity-form {
    flex-wrap: wrap;
    justify-content: flex-start;
    max-width: 100%;
    border-radius: 18px;
    padding: 8px 10px;
  }

  .line-quantity-form__submit {
    width: 100%;
    min-height: 38px;
  }
}

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

  .theme-grid,
  .theme-grid--fancy,
  .checkbox-grid,
  .checkbox-grid--compact {
    grid-template-columns: 1fr;
  }

  .theme-option__surface {
    min-height: 72px;
  }

  .theme-option__text {
    min-width: 0;
  }

  .theme-option__text strong,
  .theme-option__text small {
    overflow-wrap: anywhere;
  }

  .logo-preview-card img {
    max-width: min(100%, 220px);
  }

  .form-section-card {
    padding: 20px;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: auto;
    height: auto;
    max-height: min(78vh, 560px);
    transform: translateY(calc(-100% - 16px));
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 24px 24px;
    overflow: auto;
  }

  body.sidebar-mobile-open .app-sidebar {
    transform: translateY(0);
  }

  body.sidebar-mobile-open .app-shell__overlay {
    opacity: 1;
    visibility: visible;
  }

  .sidebar-control--collapse,
  .sidebar-fab {
    display: none;
  }

  .sidebar-mobile-trigger {
    display: inline-flex;
  }

  .app-logo {
    justify-self: center;
    width: min(100%, 132px);
    padding: 6px 8px;
    border-radius: 18px;
  }

  .app-logo img {
    width: 100%;
    max-height: 40px;
    object-fit: contain;
  }

  .app-main {
    padding-top: 88px;
  }
}

@media (max-width: 640px) {
  .modal-panel--bank-setup {
    width: min(100%, 100%);
    padding: 22px 18px;
    border-radius: 24px;
  }

  .modal-panel--account-setup {
    width: min(100%, 100%);
    padding: 22px 18px;
    border-radius: 24px;
  }

  .bank-setup-modal__logout {
    top: 12px;
    right: 12px;
  }

  .bank-setup-modal__logout-button {
    width: 32px;
    height: 32px;
    border-width: 1px;
  }

  .bank-setup-modal__logout-button img {
    width: 13px;
    height: 13px;
  }

  .bank-setup-modal__content {
    gap: 14px;
  }

  .bank-setup-modal__logo-link {
    width: 100%;
    max-width: 180px;
    padding: 8px 12px;
  }

  .bank-setup-modal__logo {
    width: min(100%, 132px);
    max-width: 132px;
  }

  .bank-setup-modal__action {
    width: 100%;
    min-width: 0;
  }

  .setup-grid {
    gap: 14px;
  }

  .form-section-card {
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
  }

  .theme-option__surface {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .theme-option__swatches {
    flex-wrap: wrap;
  }

  .checkbox-card,
  .checkbox-card--modern,
  .checkbox-card--inline {
    min-height: auto;
    padding: 14px;
    align-items: flex-start;
  }

  .checkbox-card span,
  .checkbox-card__content {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .logo-preview-card {
    justify-items: center;
    text-align: center;
  }

  .logo-preview-card img {
    max-width: min(100%, 180px);
    max-height: 84px;
  }

  .setup-panel--main .button,
  .detail-column .button,
  .edit-form .button {
    width: 100%;
  }

  .client-table__row--warning {
    background: linear-gradient(135deg, rgba(255, 247, 214, 0.94), rgba(255, 238, 200, 0.9));
  }

  .status-cell-stack--warning {
    width: fit-content;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .expired-proposal-alert {
    padding: 16px;
  }

  .expired-proposal-alert__copy {
    flex-direction: column;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .header-actions > *,
  .header-actions > .documents-dropdown {
    width: 100%;
    max-width: none;
    flex: 1 1 100%;
  }

  .documents-dropdown {
    width: 100%;
  }

  .documents-dropdown__toggle {
    width: 100%;
    min-height: 52px;
  }

  .documents-dropdown__menu,
  .documents-dropdown--actions .documents-dropdown__menu {
    position: static;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    min-width: 0;
    margin-top: 10px;
  }

  .documents-dropdown__item,
  .documents-dropdown--actions .documents-dropdown__item--action {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
  }

  .table-wrap {
    overflow: visible;
  }

  .search-dropdown {
    max-height: 300px;
    padding: 12px;
  }

  .search-dropdown__top,
  .search-dropdown__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-dropdown__option {
    padding: 14px 15px;
  }

  .quote-reminder {
    flex-direction: column;
    align-items: flex-start;
  }

  .line-quantity-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    justify-content: start;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
  }

  .line-quantity-form strong {
    min-width: 30px;
  }

  .line-quantity-form__submit {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .menu-card {
    min-height: 196px;
  }

  .menu-card::before {
    right: -2px;
    bottom: -4px;
    width: clamp(88px, 34%, 128px);
    height: clamp(88px, 34%, 128px);
  }

  .menu-card::after {
    right: 14px;
    bottom: 14px;
    width: clamp(64px, 26%, 96px);
    height: clamp(64px, 26%, 96px);
  }

  .sidebar-mobile-trigger {
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 58px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 18px 18px;
    background: linear-gradient(180deg, rgba(17, 15, 16, 0.98), rgba(29, 20, 21, 0.96));
    box-shadow: 0 16px 34px rgba(17, 15, 16, 0.22);
  }

.sidebar-mobile-trigger span {
  display: inline-block;
  transition: transform 180ms ease;
}

body.sidebar-mobile-open .sidebar-mobile-trigger span {
  transform: rotate(180deg);
}

  .sidebar-mobile-trigger span {
  font-size: 1.2rem;
  line-height: 1;
}

  .app-logo {
    width: min(100%, 110px);
    padding: 5px 7px;
    border-radius: 16px;
  }

  .app-logo img {
    max-height: 34px;
  }

  .login-shell,
  .app-main {
    padding: 14px;
  }

  .app-main {
    padding-top: 78px;
  }

  .login-brand,
  .login-card,
  .workspace-panel,
  .menu-card {
    padding: 22px;
    border-radius: 24px;
  }

  .app-header,
  .table-header,
  .contacts-section__header,
  .contact-card__top,
  .modal-panel__header,
  .modal-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .client-search__actions {
    flex-direction: column;
  }

  .client-filters-grid,
  .checkbox-grid--compact,
  .pagination-bar,
  .pagination-bar__actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .section-switcher__link {
    min-width: 100%;
  }

  .modal-shell {
    padding: 12px;
  }

  .modal-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .modal-panel__header {
    top: -20px;
  }

  .client-table thead {
    display: none;
  }

  .client-table,
  .client-table tbody,
  .client-table tr,
  .client-table td,
  .quote-lines-table,
  .quote-lines-table tbody,
  .quote-lines-table tr,
  .quote-lines-table td {
    display: block;
    width: 100%;
  }

  .client-table tr,
  .quote-lines-table tr {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
  }

  .client-table tr.client-table__row--warning {
    border-color: rgba(245, 158, 11, 0.24);
    background: linear-gradient(135deg, rgba(255, 247, 214, 0.94), rgba(255, 238, 200, 0.9));
  }

  .client-table td,
  .quote-lines-table td {
    padding: 8px 0;
    border-bottom: none;
  }

  .quote-lines-table td[data-label="Action"] .button,
  .quote-lines-table td[data-label="Action"] .icon-action {
    width: 100%;
    justify-content: center;
  }

  .client-table td::before,
  .quote-lines-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .quote-lines-table thead {
    display: none;
  }
}
