:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f8;
  --ink: #17202a;
  --muted: #64707d;
  --panel: #ffffff;
  --surface: #ffffff;
  --line: #d7dde3;
  --border: #d7dde3;
  --accent: #1e3a5f;
  --accent-dark: #12294a;
  --danger: #a33b2b;
  --shadow: 0 18px 50px rgba(23, 32, 42, 0.08);
}

/* Accounting overview UX cleanup */
body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc {
  background: linear-gradient(180deg, #fff4f3 0%, #ffe6e4 100%) !important;
  border-color: #b30900 !important;
  color: #8f1f1f !important;
  box-shadow: 0 8px 18px rgba(179, 9, 0, 0.16) !important;
}

body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc span,
body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc svg {
  color: #b30900 !important;
  stroke: #b30900 !important;
}

body.vtsa-page-accounting main.shell:has(.accounting-dashboard),
body.vtsa-page-accounting .shell:has(.accounting-dashboard) {
  padding: 28px 28px 70px !important;
  background: linear-gradient(180deg, #fff9f8 0%, #ffffff 44%, #fffafa 100%) !important;
}

.accounting-dashboard {
  --acc-red: #b83232;
  --acc-red-dark: #8f1f1f;
  --acc-red-soft: #ffe6e4;
  --acc-red-wash: #fff5f4;
  --acc-line: rgba(184, 50, 50, 0.22);
  --acc-ink: #111827;
  --acc-muted: #64748b;
  width: min(100%, 1480px) !important;
  margin: 0 auto !important;
}

.accounting-dashboard .accounting-hero-panel {
  align-items: center !important;
  margin-bottom: 16px !important;
  padding: 30px 34px !important;
  border: 1.5px solid rgba(184, 50, 50, 0.22) !important;
  border-radius: 22px !important;
  background: linear-gradient(135deg, #fff5f4 0%, #ffffff 66%, #ffefed 100%) !important;
  box-shadow: 0 16px 38px rgba(143, 31, 31, 0.075) !important;
}

.accounting-dashboard .accounting-hero-panel h1 {
  margin: 5px 0 8px !important;
  font-size: clamp(40px, 4vw, 58px) !important;
  line-height: 1 !important;
}

.accounting-dashboard .accounting-hero-panel .hero-subtitle {
  max-width: 720px !important;
  font-size: 17px !important;
}

.accounting-page-menu {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.accounting-page-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 66px;
  padding: 14px 15px 14px 18px;
  border: 2px solid rgba(184, 50, 50, 0.22);
  border-radius: 16px;
  background: #ffffff;
  color: var(--acc-ink);
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.045);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.accounting-page-menu a:hover,
.accounting-page-menu a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(184, 50, 50, 0.46);
  background: var(--acc-red-wash);
  box-shadow: 0 14px 28px rgba(143, 31, 31, 0.10);
  outline: none;
}

.accounting-page-menu span {
  color: var(--acc-red-dark);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.12;
}

.accounting-page-menu strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--acc-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(184, 50, 50, 0.20);
}

.accounting-dashboard .accounting-primary-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.accounting-dashboard .accounting-primary-metrics article {
  min-height: 126px !important;
  padding: 20px !important;
  border-color: rgba(184, 50, 50, 0.18) !important;
}

.accounting-control-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.accounting-control-strip article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 14px 17px;
  border: 1px solid rgba(184, 50, 50, 0.18);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 9px 20px rgba(17, 24, 39, 0.04);
}

.accounting-control-strip article.has-issue {
  border-color: rgba(184, 50, 50, 0.34);
  background: #fff1ef;
}

.accounting-control-strip span,
.accounting-context-list span {
  color: #745d5d;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.accounting-control-strip strong {
  color: var(--acc-ink);
  font-size: 23px;
  font-weight: 950;
  line-height: 1;
  text-align: right;
}

.accounting-dashboard .accounting-grid-two {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) !important;
  gap: 16px !important;
}

.accounting-dashboard .accounting-panel.clean,
.accounting-dashboard .accounting-help.clean {
  border-color: rgba(184, 50, 50, 0.18) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.045) !important;
}

.accounting-dashboard .accounting-section-head {
  margin-bottom: 13px !important;
}

.accounting-dashboard .accounting-section-head h2 {
  font-size: 24px !important;
}

.accounting-dashboard .accounting-attention-list {
  gap: 9px !important;
}

.accounting-dashboard .accounting-attention-list div {
  min-height: 52px !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  background: #ffffff !important;
}

.accounting-dashboard .accounting-attention-list div.has-issue {
  background: #fff1ef !important;
}

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

.accounting-context-list div {
  min-height: 96px;
  padding: 15px;
  border: 1px solid rgba(184, 50, 50, 0.15);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fffafa 100%);
}

.accounting-context-list strong {
  display: block;
  margin-top: 8px;
  color: var(--acc-ink);
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
}

.accounting-context-list small {
  display: block;
  margin-top: 6px;
  color: var(--acc-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}

.accounting-dashboard .accounting-table-wrap {
  border-radius: 15px !important;
  overflow-x: auto !important;
}

.accounting-dashboard .accounting-table th {
  background: #fff3f2 !important;
}

.accounting-dashboard .accounting-help.clean summary {
  color: var(--acc-red-dark) !important;
}

@media (max-width: 1180px) {
  .accounting-page-menu,
  .accounting-dashboard .accounting-primary-metrics,
  .accounting-control-strip,
  .accounting-dashboard .accounting-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  body.vtsa-page-accounting main.shell:has(.accounting-dashboard),
  body.vtsa-page-accounting .shell:has(.accounting-dashboard) {
    padding: 16px 10px 48px !important;
  }

  .accounting-dashboard .accounting-hero-panel,
  .accounting-page-menu,
  .accounting-dashboard .accounting-primary-metrics,
  .accounting-control-strip,
  .accounting-dashboard .accounting-grid-two,
  .accounting-context-list,
  .accounting-dashboard .accounting-attention-list {
    grid-template-columns: 1fr !important;
  }

  .accounting-dashboard .accounting-hero-panel {
    padding: 20px !important;
  }

  .accounting-page-menu a,
  .accounting-control-strip article {
    min-height: 58px;
  }
}

/* Accounting calm UX true final override */
body.vtsa-page-accounting main.shell:has(.accounting-dashboard),
body.vtsa-page-accounting .shell:has(.accounting-dashboard) {
  padding: 24px 28px 64px !important;
  background: #f7f5f2 !important;
}

body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc {
  background: #ffffff !important;
  border-color: #b7a0a0 !important;
  color: #7f2a2a !important;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.08) !important;
}

body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc span,
body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc svg {
  color: #9a2f2f !important;
  stroke: #9a2f2f !important;
}

.accounting-dashboard {
  --acc-red: #9a2f2f;
  --acc-red-dark: #7f2a2a;
  --acc-red-soft: #f7eceb;
  --acc-red-wash: #fbf7f6;
  --acc-line: #ddd4ce;
  --acc-ink: #111827;
  --acc-muted: #64748b;
  width: min(100%, 1500px) !important;
  margin: 0 auto !important;
}

.accounting-dashboard .accounting-hero-panel.accounting-calm-header,
.accounting-dashboard .accounting-hero-panel {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 20px !important;
  min-height: 0 !important;
  margin-bottom: 12px !important;
  padding: 18px 22px !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.accounting-dashboard .accounting-hero-panel .eyebrow {
  color: #7f2a2a !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
}

.accounting-dashboard .accounting-hero-panel h1 {
  margin: 3px 0 4px !important;
  color: #111827 !important;
  font-size: 34px !important;
  line-height: 1.05 !important;
}

.accounting-dashboard .accounting-hero-panel .hero-subtitle {
  max-width: 700px !important;
  color: #64748b !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
}

.accounting-dashboard .accounting-hero-actions {
  gap: 8px !important;
}

.accounting-dashboard .accounting-btn {
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  border: 1px solid #cfc6c0 !important;
  background: #ffffff !important;
  color: #253044 !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

.accounting-dashboard .accounting-btn.primary {
  border-color: #9a2f2f !important;
  background: #9a2f2f !important;
  color: #ffffff !important;
}

.accounting-tabs.accounting-page-menu,
.accounting-page-menu {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 0 0 14px !important;
  padding: 6px !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.accounting-tabs.accounting-page-menu a,
.accounting-page-menu a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  min-width: 0 !important;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #475569 !important;
  box-shadow: none !important;
  transform: none !important;
}

.accounting-tabs.accounting-page-menu a:hover,
.accounting-tabs.accounting-page-menu a:focus-visible,
.accounting-page-menu a:hover,
.accounting-page-menu a:focus-visible {
  border-color: #d7ccc5 !important;
  background: #faf8f5 !important;
  box-shadow: none !important;
  transform: none !important;
  outline: none !important;
}

.accounting-tabs.accounting-page-menu a.active,
.accounting-page-menu a.active {
  border-color: #9a2f2f !important;
  background: #f7eceb !important;
  color: #7f2a2a !important;
}

.accounting-tabs.accounting-page-menu span,
.accounting-page-menu span {
  color: inherit !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

.accounting-page-menu strong {
  display: none !important;
}

.accounting-dashboard .accounting-primary-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.accounting-dashboard .accounting-primary-metrics article,
.accounting-dashboard .accounting-metrics article {
  min-height: 104px !important;
  padding: 16px 18px !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.accounting-dashboard .accounting-metrics span,
.accounting-dashboard .accounting-control-strip span,
.accounting-dashboard .accounting-context-list span {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: 0.05em !important;
}

.accounting-dashboard .accounting-metrics strong {
  margin-top: 8px !important;
  color: #111827 !important;
  font-size: 26px !important;
  font-weight: 900 !important;
}

.accounting-dashboard .accounting-metrics small {
  margin-top: 6px !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.accounting-dashboard .accounting-review-grid,
.accounting-dashboard .accounting-grid-two {
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr) !important;
  gap: 12px !important;
}

.accounting-dashboard .accounting-panel.clean,
.accounting-dashboard .accounting-help.clean {
  margin-bottom: 12px !important;
  padding: 18px !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.accounting-dashboard .accounting-section-head {
  align-items: center !important;
  margin-bottom: 12px !important;
}

.accounting-dashboard .accounting-section-head h2 {
  margin-bottom: 3px !important;
  color: #111827 !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
}

.accounting-dashboard .accounting-section-head p {
  color: #64748b !important;
  font-size: 13px !important;
}

.accounting-dashboard .accounting-attention-list {
  grid-template-columns: 1fr !important;
  gap: 7px !important;
}

.accounting-dashboard .accounting-attention-list div,
.accounting-dashboard .accounting-control-strip article,
.accounting-dashboard .accounting-control-strip div,
.accounting-dashboard .accounting-context-list div {
  border: 1px solid #e1d8d2 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.accounting-dashboard .accounting-attention-list div {
  min-height: 42px !important;
  padding: 9px 11px !important;
}

.accounting-dashboard .accounting-attention-list div.has-issue,
.accounting-dashboard .accounting-control-strip article.has-issue,
.accounting-dashboard .accounting-control-strip div.has-issue {
  border-color: #c98585 !important;
  background: #fbf4f3 !important;
}

.accounting-dashboard .accounting-attention-list span {
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}

.accounting-dashboard .accounting-attention-list strong {
  color: #7f2a2a !important;
  font-size: 18px !important;
}

.accounting-dashboard .accounting-register-summary .accounting-control-strip,
.accounting-dashboard .accounting-control-strip {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 !important;
}

.accounting-dashboard .accounting-control-strip article,
.accounting-dashboard .accounting-control-strip div {
  min-height: 54px !important;
  padding: 10px 12px !important;
}

.accounting-dashboard .accounting-control-strip strong {
  color: #111827 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

.accounting-dashboard .accounting-context-list {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.accounting-dashboard .accounting-context-list div {
  min-height: 86px !important;
  padding: 12px !important;
}

.accounting-dashboard .accounting-context-list strong {
  margin-top: 7px !important;
  color: #111827 !important;
  font-size: 21px !important;
  font-weight: 900 !important;
}

.accounting-dashboard .accounting-context-list small {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.accounting-dashboard .accounting-table-wrap {
  border: 1px solid #e1d8d2 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.accounting-dashboard .accounting-table th {
  background: #f6f3ef !important;
  color: #475569 !important;
  font-size: 11px !important;
}

.accounting-dashboard .accounting-table td {
  color: #111827 !important;
  font-size: 13px !important;
}

.accounting-dashboard .table-link {
  color: #7f2a2a !important;
  font-weight: 850 !important;
}

.accounting-dashboard .accounting-help.clean {
  background: #fbfaf8 !important;
}

@media (max-width: 1180px) {
  .accounting-dashboard .accounting-primary-metrics,
  .accounting-dashboard .accounting-review-grid,
  .accounting-dashboard .accounting-grid-two,
  .accounting-dashboard .accounting-context-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  body.vtsa-page-accounting main.shell:has(.accounting-dashboard),
  body.vtsa-page-accounting .shell:has(.accounting-dashboard) {
    padding: 14px 10px 42px !important;
  }

  .accounting-dashboard .accounting-hero-panel.accounting-calm-header,
  .accounting-dashboard .accounting-hero-panel {
    display: grid !important;
    padding: 16px !important;
  }

  .accounting-dashboard .accounting-primary-metrics,
  .accounting-dashboard .accounting-review-grid,
  .accounting-dashboard .accounting-grid-two,
  .accounting-dashboard .accounting-register-summary .accounting-control-strip,
  .accounting-dashboard .accounting-control-strip,
  .accounting-dashboard .accounting-context-list {
    grid-template-columns: 1fr !important;
  }
}

/* Accounting calm UX final override */
body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc {
  background: #ffffff !important;
  border-color: #b7a0a0 !important;
  color: #7f2a2a !important;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.08) !important;
}

body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc span,
body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc svg {
  color: #9a2f2f !important;
  stroke: #9a2f2f !important;
}

body.vtsa-page-accounting main.shell:has(.accounting-dashboard),
body.vtsa-page-accounting .shell:has(.accounting-dashboard) {
  padding: 24px 28px 64px !important;
  background: #f7f5f2 !important;
}

.accounting-dashboard {
  --acc-red: #9a2f2f;
  --acc-red-dark: #7f2a2a;
  --acc-red-soft: #f7eceb;
  --acc-red-wash: #fbf7f6;
  --acc-line: #ddd4ce;
  --acc-ink: #111827;
  --acc-muted: #64748b;
  width: min(100%, 1500px) !important;
  margin: 0 auto !important;
}

.accounting-dashboard .accounting-hero-panel.accounting-calm-header,
.accounting-dashboard .accounting-hero-panel {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 20px !important;
  min-height: 0 !important;
  margin-bottom: 12px !important;
  padding: 18px 22px !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.accounting-dashboard .accounting-hero-panel .eyebrow {
  color: #7f2a2a !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
}

.accounting-dashboard .accounting-hero-panel h1 {
  margin: 3px 0 4px !important;
  color: #111827 !important;
  font-size: 34px !important;
  line-height: 1.05 !important;
}

.accounting-dashboard .accounting-hero-panel .hero-subtitle {
  max-width: 700px !important;
  color: #64748b !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
}

.accounting-dashboard .accounting-hero-actions {
  gap: 8px !important;
}

.accounting-dashboard .accounting-btn {
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  border: 1px solid #cfc6c0 !important;
  background: #ffffff !important;
  color: #253044 !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

.accounting-dashboard .accounting-btn.primary {
  border-color: #9a2f2f !important;
  background: #9a2f2f !important;
  color: #ffffff !important;
}

.accounting-tabs.accounting-page-menu,
.accounting-page-menu {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 0 0 14px !important;
  padding: 6px !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.accounting-tabs.accounting-page-menu a,
.accounting-page-menu a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  min-width: 0 !important;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #475569 !important;
  box-shadow: none !important;
  transform: none !important;
}

.accounting-tabs.accounting-page-menu a:hover,
.accounting-tabs.accounting-page-menu a:focus-visible,
.accounting-page-menu a:hover,
.accounting-page-menu a:focus-visible {
  border-color: #d7ccc5 !important;
  background: #faf8f5 !important;
  box-shadow: none !important;
  transform: none !important;
  outline: none !important;
}

.accounting-tabs.accounting-page-menu a.active,
.accounting-page-menu a.active {
  border-color: #9a2f2f !important;
  background: #f7eceb !important;
  color: #7f2a2a !important;
}

.accounting-tabs.accounting-page-menu span,
.accounting-page-menu span {
  color: inherit !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

.accounting-page-menu strong {
  display: none !important;
}

.accounting-dashboard .accounting-primary-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}

.accounting-dashboard .accounting-primary-metrics article,
.accounting-dashboard .accounting-metrics article {
  min-height: 104px !important;
  padding: 16px 18px !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.accounting-dashboard .accounting-metrics span,
.accounting-dashboard .accounting-control-strip span,
.accounting-dashboard .accounting-context-list span {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: 0.05em !important;
}

.accounting-dashboard .accounting-metrics strong {
  margin-top: 8px !important;
  color: #111827 !important;
  font-size: 26px !important;
  font-weight: 900 !important;
}

.accounting-dashboard .accounting-metrics small {
  margin-top: 6px !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.accounting-dashboard .accounting-review-grid,
.accounting-dashboard .accounting-grid-two {
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr) !important;
  gap: 12px !important;
}

.accounting-dashboard .accounting-panel.clean,
.accounting-dashboard .accounting-help.clean {
  margin-bottom: 12px !important;
  padding: 18px !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.accounting-dashboard .accounting-section-head {
  align-items: center !important;
  margin-bottom: 12px !important;
}

.accounting-dashboard .accounting-section-head h2 {
  margin-bottom: 3px !important;
  color: #111827 !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
}

.accounting-dashboard .accounting-section-head p {
  color: #64748b !important;
  font-size: 13px !important;
}

.accounting-dashboard .accounting-attention-list {
  grid-template-columns: 1fr !important;
  gap: 7px !important;
}

.accounting-dashboard .accounting-attention-list div {
  min-height: 42px !important;
  padding: 9px 11px !important;
  border: 1px solid #e1d8d2 !important;
  border-radius: 7px !important;
  background: #ffffff !important;
}

.accounting-dashboard .accounting-attention-list div.has-issue {
  border-color: #c98585 !important;
  background: #fbf4f3 !important;
}

.accounting-dashboard .accounting-attention-list span {
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}

.accounting-dashboard .accounting-attention-list strong {
  color: #7f2a2a !important;
  font-size: 18px !important;
}

.accounting-dashboard .accounting-register-summary .accounting-control-strip,
.accounting-dashboard .accounting-control-strip {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 !important;
}

.accounting-dashboard .accounting-control-strip article,
.accounting-dashboard .accounting-control-strip div {
  min-height: 54px !important;
  padding: 10px 12px !important;
  border: 1px solid #e1d8d2 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.accounting-dashboard .accounting-control-strip article.has-issue,
.accounting-dashboard .accounting-control-strip div.has-issue {
  border-color: #c98585 !important;
  background: #fbf4f3 !important;
}

.accounting-dashboard .accounting-control-strip strong {
  color: #111827 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

.accounting-dashboard .accounting-context-list {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.accounting-dashboard .accounting-context-list div {
  min-height: 86px !important;
  padding: 12px !important;
  border: 1px solid #e1d8d2 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

.accounting-dashboard .accounting-context-list strong {
  margin-top: 7px !important;
  color: #111827 !important;
  font-size: 21px !important;
  font-weight: 900 !important;
}

.accounting-dashboard .accounting-context-list small {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

.accounting-dashboard .accounting-table-wrap {
  border: 1px solid #e1d8d2 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.accounting-dashboard .accounting-table th {
  background: #f6f3ef !important;
  color: #475569 !important;
  font-size: 11px !important;
}

.accounting-dashboard .accounting-table td {
  color: #111827 !important;
  font-size: 13px !important;
}

.accounting-dashboard .table-link {
  color: #7f2a2a !important;
  font-weight: 850 !important;
}

.accounting-dashboard .accounting-help.clean {
  background: #fbfaf8 !important;
}

@media (max-width: 1180px) {
  .accounting-dashboard .accounting-primary-metrics,
  .accounting-dashboard .accounting-review-grid,
  .accounting-dashboard .accounting-grid-two,
  .accounting-dashboard .accounting-context-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  body.vtsa-page-accounting main.shell:has(.accounting-dashboard),
  body.vtsa-page-accounting .shell:has(.accounting-dashboard) {
    padding: 14px 10px 42px !important;
  }

  .accounting-dashboard .accounting-hero-panel.accounting-calm-header,
  .accounting-dashboard .accounting-hero-panel {
    display: grid !important;
    padding: 16px !important;
  }

  .accounting-dashboard .accounting-primary-metrics,
  .accounting-dashboard .accounting-review-grid,
  .accounting-dashboard .accounting-grid-two,
  .accounting-dashboard .accounting-register-summary .accounting-control-strip,
  .accounting-dashboard .accounting-control-strip,
  .accounting-dashboard .accounting-context-list {
    grid-template-columns: 1fr !important;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1216;
  --ink: #f2f5f8;
  --muted: #a4adba;
  --panel: #171b21;
  --surface: #171b21;
  --line: #2c333d;
  --border: #2c333d;
  --accent: #8cc8ff;
  --accent-dark: #55a8f6;
  --danger: #ff7a6d;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.56);
}

html[data-theme="high-contrast"] {
  color-scheme: dark;
  --bg: #020704;
  --ink: #f4fff7;
  --muted: #c7f6d3;
  --panel: #07120b;
  --surface: #07120b;
  --line: #1f5f34;
  --border: #1f5f34;
  --accent: #00ff6a;
  --accent-dark: #27d95d;
  --danger: #ff4d4d;
  --shadow: 0 18px 50px rgba(0, 255, 106, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(12px);
}

.brand {
  font-weight: 760;
  text-decoration: none;
}

.brand-pill,
.main-nav a {
  border: 2px solid #111;
  border-radius: 8px;
  background: #ffffff;
  color: #111;
  padding: 9px 18px;
  text-decoration: none;
}

.brand-pill {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  min-width: 230px;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
}

.brand-pill img {
  display: block;
  height: 32px;
  object-fit: contain;
  width: 28px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex: 1;
  flex-wrap: wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 760;
}

.main-nav a {
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.topbar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-size: 14px;
  font-weight: 760;
}

.topbar-actions a,
.topbar-actions button {
  color: var(--accent-dark);
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 6px 10px;
  border-radius: 6px;
}

.topbar-actions a:hover,
.topbar-actions button:hover {
  background: rgba(0,0,0,0.04);
}

.link-button {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 32px auto;
}

.shell:has(.home-page) {
  width: min(1480px, calc(100vw - 48px));
}

.shell:has(.sheet-page) {
  width: min(1600px, calc(100vw - 16px));
  margin: 12px auto 24px;
}

.shell:has(.pdf-studio) {
  width: min(1280px, calc(100vw - 32px));
  margin: 20px auto;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.narrow {
  max-width: 760px;
  margin: 0 auto;
}

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

.single-page {
  max-width: 1120px;
  margin: 0 auto;
}

.single-page.loo-page {
  max-width: 1360px;
}

.shell:has(.loo-page) {
  width: min(1440px, calc(100vw - 24px));
  margin: 20px auto;
}

.shell:has(.ci-workflow-page),
.shell:has(.tinv-workflow-page),
.shell:has(.pfi-workflow-page),
.shell:has(.po-workflow-page),
.shell:has(.drs-workflow-page) {
  width: min(1480px, calc(100vw - 32px));
}

.loo-page .panel {
  padding: 22px;
}

.home-page {
  width: 100%;
  margin: 0 auto;
}

.office-tools-heading {
  margin-bottom: 20px;
}

.office-suite-home {
  display: grid;
  gap: 34px;
}

.office-suite-heading {
  margin-bottom: 0;
}

.office-suite-heading h1 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.98;
}

.office-suite-heading p:last-child {
  max-width: 920px;
}

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

.suite-section-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.suite-section-heading h2 {
  font-size: 28px;
  margin: 0 0 6px;
}

.suite-section-heading p {
  color: var(--muted);
  margin: 0;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

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

.office-tools-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  max-width: 720px;
}

.app-card {
  min-height: 172px;
  border: 2px solid #e2e8f2;
  border-radius: 24px;
  background: white;
  color: #030303;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.suite-card {
  min-height: 204px;
}

.app-card:hover {
  border-color: #111;
  box-shadow: 0 16px 36px rgba(23, 32, 42, 0.08);
  transform: translateY(-2px);
}

.app-card strong {
  font-size: clamp(24px, 1.6vw, 32px);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.app-card-copy small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.app-icon.lavender {
  background: #dedbff;
}

.app-icon.blue {
  background: #d8effb;
}

.app-icon.peach {
  background: #ffe4d9;
}

.app-icon.green {
  background: #FCE8DE;
}

.app-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.tool-command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.tool-command-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.tool-command-grid h2 {
  margin: 0 0 10px;
}

.tool-command-grid code {
  display: block;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: anywhere;
}

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

.pdf-editor-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.pdf-editor-result {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.pdf-editor-help {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
}

.deals-page {
  max-width: 1260px;
}

.deal-selector {
  align-items: end;
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.deal-selector label {
  flex: 1;
}

.deal-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 26px;
  overflow: hidden;
}

.deal-summary-card div {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 14px;
}

.deal-summary-card div:nth-child(4n) {
  border-right: 0;
}

.deal-summary-card div:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.deal-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.deal-summary-card strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.file-id-inline {
  font-size: 0.82em;
  font-weight: 600;
  white-space: nowrap;
}

.app-icon {
  width: 66px;
  height: 66px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
}

.app-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-icon.lavender {
  background: #dedbff;
}

.app-icon.blue {
  background: #d8effb;
}

.app-icon.peach {
  background: #ffe4d9;
}

.app-icon.green {
  background: #FCE8DE;
}

.app-icon.indigo {
  background: #dfe6ff;
}

.app-icon.violet {
  background: #f0e4ff;
}

.sheet-page {
  width: 100%;
  margin: 0 auto;
}

.deal-sheet {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 13px;
  overflow: visible;
}

.drs-form-header {
  align-items: center;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.drs-form-header h1 {
  font-size: 24px;
  margin: 0;
}

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

.sheet-section > *,
.sheet-fields,
.deal-overview,
.two-column-sheet,
.calc-strip,
.calc-card-grid,
.split-sheet,
.shipping-grid {
  min-width: 0;
}

.sheet-title,
.sheet-subtitle {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f8f6f1;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  text-align: left;
  text-transform: uppercase;
}

.sheet-subtitle {
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.sheet-section {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

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

.two-column-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr));
  gap: 14px;
}

.sheet-fields {
  display: grid;
  align-content: start;
  gap: 8px 12px;
}

.sheet-fields label,
.deal-overview label,
.calc-strip label,
.shipping-grid label,
.calc-card-grid label {
  display: grid;
  grid-template-columns: minmax(92px, 118px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.deal-sheet label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.deal-sheet input,
.deal-sheet textarea,
.deal-sheet select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 34px;
  border: 1px solid #d8d2c7;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 6px 9px;
  font-size: 13px;
}

.deal-sheet input:focus,
.deal-sheet textarea:focus,
.deal-sheet select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}

.deal-sheet textarea {
  min-height: 82px;
}

.party-card {
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: -2px 0 2px 118px;
  min-width: 0;
  padding: 8px 10px;
}

.party-card strong {
  color: var(--ink);
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
}

.party-card span {
  display: block;
}

.calc-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.calc-card-grid {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 8px 10px;
  padding: 10px;
}

.calc-strip label,
.calc-card-grid label {
  grid-template-columns: minmax(82px, 104px) minmax(0, 1fr);
  gap: 6px;
}

.calc-strip input,
.calc-strip select,
.calc-card-grid input,
.calc-card-grid select {
  min-height: 30px;
  padding: 5px 8px;
}

.calc-card-grid label span {
  font-size: 9px;
  line-height: 1.05;
}

.split-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(min(100%, 250px), 0.65fr);
  gap: 16px;
}

.shipping-grid {
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  border-top: 0;
  display: grid;
  gap: 0;
  padding: 10px;
  background: white;
}

.shipping-grid label {
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
}

.sheet-notes {
  align-self: end;
  background: #f8f6f1;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  padding: 12px;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 16px;
  position: sticky;
  bottom: 0;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(10px);
}

.admin-option-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
}

.admin-option-form .wide-field {
  grid-column: 1 / -1;
}

.drs-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.drs-category-nav a {
  background: white;
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 850;
  letter-spacing: 0;
  padding: 10px 16px;
  text-decoration: none;
  text-transform: uppercase;
}

.drs-category-nav a.active {
  background: #000;
  color: white;
}

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

.drs-option-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 14px;
}

.drs-option-card h2 {
  margin-top: 0;
  text-transform: capitalize;
}

.active-drs-card {
  margin-top: 14px;
}

.drs-card-title {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.drs-card-title h2 {
  margin-bottom: 0;
}

.drs-card-title .muted {
  max-width: 420px;
}

.drs-variable-list {
  border-top: 1px solid var(--line);
  margin-top: 14px;
}

.drs-variable-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.drs-variable-main strong,
.drs-variable-meta span {
  display: block;
}

.drs-variable-main strong {
  overflow-wrap: anywhere;
}

.drs-variable-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 3px;
}

.drs-variable-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.edit-variable {
  position: relative;
}

.edit-variable summary {
  cursor: pointer;
  list-style: none;
}

.edit-variable summary::-webkit-details-marker {
  display: none;
}

.hidden {
  display: none !important;
}

.pdf-studio {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.pdf-studio-header {
  display: grid;
  gap: 10px;
}

.pdf-workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.workflow-step {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 12px;
  min-width: 0;
}

.workflow-step span {
  align-items: center;
  background: #f1f5f9;
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.workflow-step strong {
  font-size: 15px;
}

.workflow-step small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.workflow-step.active {
  border-color: var(--accent);
  box-shadow: 0 14px 32px rgba(21, 128, 119, 0.12);
}

.workflow-step.active span,
.workflow-step.complete span {
  background: var(--accent);
  color: white;
}

.workflow-step.complete {
  background: #f7fbfa;
}

.pdf-studio-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.pdf-studio-sidebar {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.tool-card,
.tool-panel,
.page-thumbnails,
.pdf-viewer,
.pdf-uploader,
.pdf-result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.tool-menu {
  display: grid;
  gap: 10px;
}

.tool-button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  font-weight: 700;
  cursor: pointer;
}

.tool-button.active {
  border-color: var(--accent);
  background: #ecfdf5;
}

.tool-step-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

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

.tool-panel-section h3,
.viewer-header strong {
  margin: 0;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

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

.choice-list label {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
}

.advanced-options {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.advanced-options summary {
  cursor: pointer;
  font-weight: 800;
}

.file-picker {
  display: grid;
  gap: 10px;
}

.file-picker input[type="file"] {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 18px 14px;
  cursor: pointer;
}

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

.help-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.help-list li {
  list-style: disc;
}

.topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8faf7;
  border: 1px solid var(--line);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pdf-topbar {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8faf7;
  font-size: 12px;
  color: var(--ink);
}

.button-primary,
.button-secondary,
.button-secondary[type='button'],
.button-primary[type='button'] {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
}

.button-primary {
  background: var(--accent);
  color: white;
}

.button-secondary {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.button-secondary.tiny {
  border-radius: 9px;
  font-size: 12px;
  min-height: 30px;
  padding: 5px 8px;
}

.danger-soft {
  color: #9f2f24;
}

.button-secondary:hover,
.button-primary:hover {
  opacity: 0.95;
}

.pdf-uploader {
  display: grid;
  justify-items: center;
}

.upload-card {
  text-align: center;
  max-width: 680px;
  width: 100%;
}

.upload-card h2 {
  margin: 0 0 10px;
}

.upload-card p {
  color: var(--muted);
  margin: 0 0 22px;
}

.upload-card input[type='file'] {
  width: 100%;
  opacity: 0;
  position: absolute;
  pointer-events: none;
  height: 0;
}

.pdf-editor-shell {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.viewer-header,
.thumbnails-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.thumbnail-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.viewer-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(54px, auto));
  gap: 8px;
  align-items: center;
}

.preview-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #f8f8f8;
  min-height: 420px;
  display: grid;
  place-items: center;
}

.preview-frame canvas {
  width: 100%;
  height: auto;
  max-width: 100%;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.8);
  color: var(--ink);
  font-weight: 700;
}

.page-thumbnails {
  display: grid;
  gap: 14px;
}

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

.thumb-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: white;
  cursor: pointer;
  text-align: left;
}

.thumb-card.selected {
  border-color: var(--accent);
  background: #ecfdf5;
}

.thumb-card.drag-over {
  border-color: var(--accent-dark);
}

.thumb-canvas-shell {
  width: 74px;
  min-height: 94px;
  overflow: hidden;
  border-radius: 14px;
  background: #f8f8f8;
  display: grid;
  place-items: center;
}

.thumb-canvas-shell canvas {
  width: 100%;
  height: auto;
  display: block;
}

.thumb-meta {
  display: grid;
  gap: 6px;
}

.thumb-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8faf7;
  border: 1px solid var(--line);
  font-size: 12px;
}

.merge-preview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.merge-file-item {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.merge-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pdf-result-card {
  display: grid;
  gap: 12px;
}

.action-summary dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.action-summary dl div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  grid-template-columns: 150px minmax(0, 1fr);
  padding-top: 10px;
}

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

.action-summary dd {
  margin: 0;
}

.recent-outputs {
  display: grid;
  gap: 12px;
}

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

.recent-output-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 130px 170px auto;
  padding: 10px 12px;
}

.step-label {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pdf-result-card a {
  width: fit-content;
}

.pdf-uploader,
.pdf-viewer,
.pdf-studio-main,
.page-thumbnails,
.pdf-topbar,
.action-summary,
.recent-outputs,
.tool-menu {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

@media (max-width: 980px) {
  .suite-grid,
  .office-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .pdf-studio-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .suite-grid,
  .office-tools-grid {
    grid-template-columns: 1fr;
  }

  .pdf-workflow-steps {
    grid-template-columns: 1fr;
  }

  .workflow-step {
    min-height: auto;
  }

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

  .viewer-actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

.edit-variable-form {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
  min-width: 460px;
  padding: 12px;
  position: absolute;
  right: 0;
  z-index: 5;
}

.edit-variable-form .wide-field,
.edit-variable-form button {
  grid-column: 1 / -1;
}

.empty-list {
  color: var(--muted);
  margin: 14px 0 0;
}

.section-heading {
  margin-bottom: 24px;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.12;
  margin-bottom: 8px;
}

h2 {
  font-size: 18px;
  margin: 28px 0 12px;
}

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

.eyeline {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 8px;
}

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

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 24px;
}

.steps article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
  display: grid;
  gap: 6px;
}

.steps strong {
  font-size: 13px;
}

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

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

.signer-entry {
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.signer-entry .remove-signer {
  justify-self: start;
}

.compact-steps {
  grid-template-columns: 1fr;
  margin: 18px 0;
}

.form-step {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding-top: 22px;
}

.form-step:first-child {
  border-top: 0;
  padding-top: 0;
}

.form-step-copy {
  display: grid;
  align-content: start;
  gap: 6px;
}

.form-step-copy strong {
  font-size: 18px;
}

.form-step-copy span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.inline-step-copy {
  gap: 2px;
}

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

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

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

label {
  display: grid;
  gap: 8px;
}

label span,
.field-label {
  color: #2d3743;
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  font: inherit;
}

select:not([multiple]) {
  --vtsa-select-arrow-accent: var(
    --workflow-form-accent,
    var(--document-editor-accent, var(--workflow-accent, var(--accent, #64748b)))
  );
  padding-right: 58px;
  background-color: #ffffff;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M4 7l5 5 5-5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(var(--vtsa-select-arrow-accent), var(--vtsa-select-arrow-accent));
  background-position:
    right 18px center,
    right 10px center;
  background-size: 18px 18px, 34px 34px;
  background-repeat: no-repeat;
  appearance: none;
}

input:focus,
select:focus,
button:focus,
.button:focus {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 2px;
}

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

.metric-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.metric-grid span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.metric-grid strong {
  display: block;
  font-size: 24px;
  margin-top: 4px;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.folder-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 16px;
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.folder-card:hover,
.folder-card.active {
  border-color: var(--ink);
  box-shadow: 0 14px 28px rgba(23, 32, 42, 0.08);
  transform: translateY(-1px);
}

.folder-card span {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  height: 30px;
  justify-content: center;
  width: 42px;
}

.folder-card strong {
  font-size: 20px;
  line-height: 1.05;
}

.folder-card small {
  color: var(--muted);
  line-height: 1.35;
}

.folder-card.drs span {
  background: #ffe4d9;
}

.folder-card.signed span {
  background: #FCE8DE;
}

.folder-card.unsigned span {
  background: #d8effb;
}

.folder-card.general span {
  background: #dedbff;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 140px auto;
  gap: 10px;
  margin: 18px 0;
}

button,
.button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 16px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

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

.compact {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.alert {
  border: 1px solid rgba(163, 59, 43, 0.3);
  background: rgba(163, 59, 43, 0.08);
  color: var(--danger);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.notice {
  border: 1px solid rgba(15, 118, 110, 0.26);
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-dark);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 18px 0 4px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 760;
}

.auth-links.single {
  justify-content: center;
}

.auth-links a {
  color: var(--accent-dark);
  text-decoration: none;
}

.document-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.metadata-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.metadata-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 0.7fr 1.2fr;
  gap: 16px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.signer-row {
  grid-template-columns: 1fr 1.45fr 0.7fr 1fr 1.1fr;
}

.document-row {
  grid-template-columns: 1.35fr 0.65fr 0.85fr 0.95fr 1.15fr;
  align-items: center;
}

.document-edit-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0 24px;
}

.document-edit-form button {
  align-self: end;
}

.drs-file-row {
  grid-template-columns: 1fr 2fr 0.8fr;
  align-items: center;
}

.drs-file-row code {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.document-editor {
  margin-top: 24px;
}

.document-editor-heading {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.document-editor-heading h2 {
  margin: 0 0 6px;
}

.document-editor-heading p {
  margin: 0;
}

.manual-document-form {
  box-shadow: none;
  overflow: hidden;
}

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

.manual-field-grid label {
  grid-template-columns: minmax(108px, 145px) minmax(0, 1fr);
}

.manual-field-grid .manual-wide-field {
  grid-column: 1 / -1;
}

.manual-field-grid .manual-wide-field textarea {
  min-height: 96px;
}

.manual-save-bar {
  align-items: center;
  background: #f8f6f1;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.manual-save-bar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.access-row {
  grid-template-columns: 1fr 1.35fr 1fr 0.75fr 1fr 1.05fr;
  align-items: center;
}

.account-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin: 18px 0 26px;
}

.account-row {
  grid-template-columns: minmax(260px, 1.4fr) 0.65fr 0.65fr 0.8fr 1.2fr;
  align-items: center;
}

.account-edit-form {
  display: contents;
}

.account-edit-form input[name="name"] {
  min-height: 34px;
  width: 100%;
}

.account-edit-form small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.account-check {
  align-items: center;
  margin-bottom: 8px;
  white-space: nowrap;
}

.compact-check {
  align-items: center;
  gap: 6px;
}

.compact-check input,
.account-check input {
  min-height: 18px;
  width: 18px;
}

.version-row {
  grid-template-columns: 0.5fr 1.1fr 1.4fr auto;
  align-items: center;
  font-size: 12px;
  padding: 8px 14px;
  gap: 12px;
}

.version-row code {
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

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

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

.document-row small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-row a {
  color: var(--accent-dark);
  font-weight: 760;
  text-decoration: none;
}

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

.danger-button {
  border-color: rgba(163, 59, 43, 0.35);
  background: white;
  color: var(--danger);
}

.danger-button:hover {
  background: rgba(163, 59, 43, 0.08);
}

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

.row:first-child {
  border-top: 0;
}

.row.head {
  background: #f7f3ea;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.row.deal-document-row {
  align-items: center;
  gap: 12px;
  grid-template-columns:
    minmax(220px, 1.35fr)
    minmax(96px, 0.55fr)
    minmax(90px, 0.5fr)
    minmax(118px, 0.65fr)
    minmax(92px, 0.5fr)
    minmax(70px, 0.38fr)
    minmax(214px, 0.95fr);
}

.row.deal-document-row.head {
  font-size: 11.5px;
  line-height: 1.2;
}

.row.deal-document-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row.deal-document-row .manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.loo-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.loo-create-note {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 18px 0;
}

.loo-create-note span {
  color: var(--muted);
}

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

.loo-status-grid .folder-card {
  min-height: 92px;
  padding: 14px;
}

.loo-status-grid .folder-card strong {
  font-size: 17px;
}

.loo-page .filter-bar {
  grid-template-columns: minmax(240px, 1fr) 180px auto auto;
}

.loo-records-table {
  overflow-x: auto;
}

.row.loo-record-row {
  align-items: center;
  gap: 8px;
  grid-template-columns:
    minmax(82px, 0.58fr)
    minmax(58px, 0.42fr)
    minmax(78px, 0.58fr)
    minmax(78px, 0.58fr)
    minmax(110px, 0.78fr)
    minmax(70px, 0.48fr)
    minmax(82px, 0.52fr)
    minmax(78px, 0.5fr)
    minmax(82px, 0.52fr)
    minmax(246px, 0.96fr);
  font-size: 13.5px;
  line-height: 1.2;
  min-height: 0;
  padding: 8px 10px;
}

.row.loo-record-row.head {
  font-size: 10.5px;
  line-height: 1.2;
  padding-bottom: 8px;
  padding-top: 8px;
}

.row.loo-record-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row.loo-record-row small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.15;
  margin-top: 2px;
}

.row.loo-record-row strong {
  line-height: 1.15;
}

.loo-actions,
.workflow-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.loo-actions {
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
}

.loo-actions .compact,
.loo-actions .button.compact,
.loo-actions .primary.compact {
  font-size: 12px;
  min-height: 28px;
  padding: 5px 7px;
  white-space: nowrap;
}

.loo-actions form {
  margin: 0;
}

.loo-workflow-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.workflow-panel {
  align-content: start;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.workflow-panel h2 {
  margin: 0;
}

.workflow-panel p {
  color: var(--muted);
  margin: 0;
}

.workflow-page .panel {
  overflow: hidden;
}

.workflow-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workflow-create-note {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 16px 0;
}

.workflow-create-note span {
  color: var(--muted);
}

.workflow-filter-bar {
  grid-template-columns: minmax(260px, 1fr) 180px 150px auto auto;
}

.workflow-table-scroll {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 8px;
  overflow-x: auto;
}

.workflow-data-table {
  border-collapse: collapse;
  min-width: 1220px;
  width: 100%;
}

.workflow-data-table th,
.workflow-data-table td {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.2;
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.workflow-data-table th {
  background: #f7f3ea;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.workflow-data-table tr:last-child td {
  border-bottom: 0;
}

.workflow-data-table td small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.workflow-actions {
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
}

.workflow-actions .compact {
  font-size: 12px;
  min-height: 28px;
  padding: 5px 7px;
  white-space: nowrap;
}

.workflow-workspace-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.po-data-table {
  min-width: 1320px;
}

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

.po-records-table {
  overflow-x: auto;
}

.row.po-record-row {
  align-items: center;
  gap: 8px;
  grid-template-columns:
    minmax(82px, 0.6fr)
    minmax(58px, 0.42fr)
    minmax(76px, 0.55fr)
    minmax(70px, 0.52fr)
    minmax(78px, 0.55fr)
    minmax(94px, 0.65fr)
    minmax(54px, 0.38fr)
    minmax(84px, 0.55fr)
    minmax(92px, 0.62fr)
    minmax(92px, 0.65fr)
    minmax(98px, 0.68fr)
    minmax(188px, 0.85fr);
  font-size: 13.5px;
  line-height: 1.2;
  min-width: 1160px;
  padding: 8px 10px;
}

.row.po-record-row.head {
  font-size: 10.5px;
  line-height: 1.2;
  padding-bottom: 8px;
  padding-top: 8px;
}

.row.po-record-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row.po-record-row small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.15;
  margin-top: 2px;
}

.po-workflow-grid {
  margin-top: 18px;
}

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

.audit-list article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.audit-list span,
.audit-list code {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.signing-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 128px);
}

.signer-panel {
  align-self: start;
}

.pdf-panel {
  padding: 0;
  overflow: hidden;
}

.pdf-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.pdf-render-wrap {
  min-height: calc(100vh - 188px);
  overflow: auto;
  padding: 16px;
  background: #ece8df;
}

.pdf-stage {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

#signing-pdf-canvas {
  display: block;
  background: white;
  box-shadow: 0 10px 28px rgba(23, 32, 42, 0.14);
  cursor: crosshair;
}

#signature-pad {
  width: 100%;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  display: block;
}

.toolbar {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-toolbar {
  margin-top: 0;
  align-items: center;
}

.page-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  min-width: 88px;
  text-align: center;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 0;
}

.position-picker {
  display: grid;
  gap: 12px;
}

.position-picker[hidden] {
  display: none;
}

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

.pdf-click-wrap {
  position: relative;
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ece8df;
  padding: 12px;
}

#pdf-position-canvas {
  display: block;
  max-width: 100%;
  background: white;
  box-shadow: 0 10px 28px rgba(23, 32, 42, 0.14);
  cursor: crosshair;
}

.signature-marker {
  position: absolute;
  width: 180px;
  height: 70px;
  transform: translate(12px, 12px);
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.signing-marker {
  transform: none;
}

.compact-notice {
  margin: 0;
  font-size: 13px;
}

.file-button {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.po-page .panel {
  padding: 14px;
}

.po-page .document-header {
  margin-bottom: 12px;
}

.po-page .workflow-metrics {
  gap: 8px;
  margin-bottom: 12px;
}

.po-page .workflow-metrics article {
  padding: 8px 10px;
}

.po-page .workflow-metrics strong {
  font-size: 20px;
}

.po-page .workflow-create-note {
  margin: 10px 0;
  padding: 9px 10px;
}

.po-page .po-status-grid {
  gap: 8px;
  margin: 10px 0 12px;
}

.po-page .po-status-grid .folder-card {
  gap: 3px;
  min-height: 68px;
  padding: 9px 10px;
}

.po-page .po-status-grid .folder-card span {
  height: 24px;
  width: 36px;
}

.po-page .po-status-grid .folder-card strong {
  font-size: 15px;
}

.po-page .po-status-grid .folder-card small {
  display: none;
}

.po-page .workflow-filter-bar {
  gap: 8px;
  margin: 10px 0 14px;
}

.po-page h2 {
  margin: 12px 0 8px;
}

.po-page .po-records-table {
  overflow-x: auto;
}

.po-page .row.po-record-row {
  display: grid !important;
  grid-template-columns:
    88px
    62px
    92px
    72px
    72px
    92px
    48px
    92px
    82px
    112px
    142px
    174px !important;
  gap: 6px !important;
  min-width: 1186px;
  padding: 6px 8px !important;
}

.po-page .row.po-record-row.head {
  font-size: 10px;
  padding-bottom: 6px !important;
  padding-top: 6px !important;
}

.po-page .row.po-record-row > span {
  align-self: center;
}

.po-page .row.po-record-row small {
  display: block;
}

.po-page .row.po-record-row .loo-actions {
  gap: 4px;
}

.po-page .row.po-record-row .button.compact {
  min-height: 26px;
  padding: 4px 6px;
}

.po-page .po-workflow-grid {
  gap: 10px;
  margin-top: 14px;
}

.drs-page .workflow-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.drs-page .workflow-metrics article {
  padding: 8px 10px;
}

.drs-page .workflow-metrics strong {
  font-size: 20px;
}

.drs-page .drs-status-grid {
  gap: 8px;
  margin: 10px 0 12px;
}

.drs-page .drs-status-grid .folder-card {
  gap: 3px;
  min-height: 68px;
  padding: 9px 10px;
}

.drs-page .drs-status-grid .folder-card span {
  height: 24px;
  width: 36px;
}

.drs-page .drs-status-grid .folder-card strong {
  font-size: 15px;
}

.drs-page .drs-status-grid .folder-card small {
  display: none;
}

.drs-page .workflow-filter-bar {
  grid-template-columns: minmax(260px, 1fr) 220px auto auto;
  gap: 8px;
  margin: 10px 0 14px;
}

.drs-page h2 {
  margin: 12px 0 8px;
}

.drs-records-table {
  overflow-x: auto;
}

.row.drs-record-row {
  align-items: center;
  display: grid !important;
  gap: 6px !important;
  grid-template-columns:
    92px
    62px
    72px
    72px
    72px
    92px
    54px
    92px
    136px
    94px
    240px !important;
  font-size: 13.5px;
  line-height: 1.2;
  min-width: 1182px;
  padding: 6px 8px !important;
}

.row.drs-record-row.head {
  font-size: 10px;
  line-height: 1.2;
  padding-bottom: 6px !important;
  padding-top: 6px !important;
}

.row.drs-record-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row.drs-record-row small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.15;
  margin-top: 2px;
}

.row.drs-record-row .loo-actions {
  gap: 4px;
}

.row.drs-record-row .button.compact,
.row.drs-record-row button.compact {
  min-height: 26px;
  padding: 4px 6px;
}

.po-page .workflow-panel {
  padding: 12px;
}

.pfi-page .pfi-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pfi-page .pfi-status-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pfi-page .workflow-filter-bar {
  grid-template-columns: minmax(260px, 1fr) 220px auto auto;
}

.pfi-page .row.pfi-record-row {
  grid-template-columns:
    88px
    62px
    72px
    72px
    92px
    48px
    72px
    92px
    112px
    108px
    104px
    174px !important;
  min-width: 1196px;
}

.ci-page .ci-metrics {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ci-page .ci-status-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ci-page .ci-filter-bar {
  grid-template-columns: minmax(260px, 1fr) 155px 145px 155px 130px auto auto;
}

.ci-page .row.ci-record-row {
  grid-template-columns:
    82px
    58px
    76px
    68px
    68px
    86px
    44px
    64px
    92px
    118px
    86px
    82px
    82px
    154px !important;
  min-width: 1264px;
}

.ci-page .row.ci-record-row > span {
  overflow-wrap: anywhere;
}

.ci-page .row.ci-record-row .loo-actions {
  gap: 4px;
}

.tinv-page .tinv-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.attention-list {
  align-items: center;
  border: 1px solid rgba(47, 120, 110, 0.28);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 14px 0;
  padding: 10px 12px;
}

.attention-list strong {
  color: var(--text);
}

.workflow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.workflow-tabs a {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  text-decoration: none;
}

.workflow-tabs a.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}

.workflow-tabs span {
  color: inherit;
  font-size: 0.86rem;
  opacity: 0.76;
}

.tinv-page .tinv-filter-bar {
  grid-template-columns: minmax(260px, 1fr) 150px 126px 136px 112px 120px auto auto;
}

.more-filter-pop {
  position: relative;
}

.more-filter-pop summary {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  font-weight: 800;
  min-height: 44px;
  padding: 10px 12px;
}

.more-filter-pop[open] {
  z-index: 4;
}

.more-filter-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: none;
  gap: 10px;
  left: 0;
  min-width: 280px;
  padding: 12px;
  position: absolute;
  top: calc(100% + 6px);
}

.more-filter-pop[open] .more-filter-menu {
  display: grid;
}

.more-filter-menu label {
  display: grid;
  gap: 6px;
}

.more-filter-pop span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tinv-page .document-header {
  align-items: flex-start;
}

.tinv-page .compact-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, max-content));
  gap: 10px;
  justify-content: end;
}

.tinv-page .compact-toolbar .button {
  min-height: 44px;
  padding: 10px 16px;
  white-space: nowrap;
}

.manual-create-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  margin: 14px 0;
  padding: 14px 16px 16px;
}

.deal-prefill-bar {
  align-items: end;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) auto minmax(240px, 0.8fr);
  margin: 12px 0 16px;
  padding: 12px;
}

.deal-prefill-bar label {
  display: grid;
  gap: 6px;
}

.deal-prefill-bar label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.deal-prefill-bar select {
  min-height: 42px;
}

.prefill-note {
  color: var(--muted);
  line-height: 1.25;
}

.manual-create-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.manual-create-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.manual-create-heading p {
  color: var(--muted);
  margin: 0;
  padding: 0;
}

.manual-tinv-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.manual-tinv-form label {
  display: grid;
  gap: 5px;
}

.manual-tinv-form label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.manual-tinv-form input,
.manual-tinv-form select {
  min-height: 38px;
  padding: 8px 10px;
}

.manual-tinv-form .button {
  align-self: end;
  min-height: 38px;
  padding: 8px 12px;
}

.tinv-page .row.tinv-record-row {
  grid-template-columns:
    92px
    108px
    74px
    78px
    92px
    96px
    86px
    116px
    90px
    78px
    96px
    142px !important;
  min-width: 1150px;
}

.tinv-page .row.tinv-record-row > span {
  overflow-wrap: anywhere;
}

.tinv-page .row.tinv-record-row .loo-actions {
  gap: 4px;
}

@media (max-width: 980px) {
  .tinv-page .compact-toolbar,
  .deal-prefill-bar,
  .manual-tinv-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
    gap: 14px;
  }

  .brand-pill {
    min-width: 210px;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .main-nav a {
    padding-inline: 12px;
  }

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

  .sheet-page {
    width: min(100%, calc(100vw - 20px));
  }

  .two-column-sheet,
  .split-sheet {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .topbar {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 0 18px;
    padding-block: 14px;
  }

  .main-nav,
  .topbar-actions {
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
  }

  .two,
  .three,
  .admin-option-form,
  .account-create-form,
  .app-grid,
  .deal-overview,
  .drs-option-grid,
  .form-step,
  .two-column-sheet,
  .split-sheet,
  .calc-strip,
  .signing-layout,
  .dashboard-layout,
  .filter-bar,
  .metric-grid,
  .loo-metrics,
  .loo-status-grid,
  .loo-workflow-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .document-header {
    display: grid;
  }

  .document-editor-heading {
    align-items: stretch;
    display: grid;
  }

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

  .manual-field-grid label,
  .manual-field-grid .manual-wide-field {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .account-edit-form {
    display: grid;
    gap: 8px;
  }

  .drs-variable-item {
    grid-template-columns: 1fr;
  }

  .drs-variable-actions {
    justify-content: flex-start;
  }

  .edit-variable-form {
    grid-template-columns: 1fr;
    position: static;
    min-width: 0;
  }

  .drs-card-title {
    display: block;
  }

  .drs-form-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .drs-form-actions,
  .drs-form-actions .button,
  .drs-form-actions .primary {
    width: 100%;
  }

  .sheet-fields label,
  .deal-overview label,
  .calc-strip label,
  .shipping-grid label,
  .calc-card-grid label {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .party-card {
    margin-left: 0;
  }
}

.saved-assets {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.saved-asset-button {
  align-items: center;
  display: grid;
  gap: 8px;
  min-height: 92px;
  text-align: left;
}

.saved-asset-button img {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 100%;
  height: 48px;
  max-height: 48px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.asset-save-row {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 180px) 1fr;
}

@media (max-width: 720px) {
  .asset-save-row {
    grid-template-columns: 1fr;
  }
}

.loo-status-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 10px;
  margin: 12px 0 24px;
  padding: 14px;
}

.loo-status-panel > strong {
  font-size: 18px;
}

.button.active,
.button.compact.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.status-heading {
  align-items: baseline;
  display: flex;
  gap: 10px;
}

.status-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-button.status-draft,
.status-button.status-sent {
  border-color: #111827;
  color: #111827;
}

.status-button.status-approved {
  border-color: #FDE9D8;
  background: #FDE9D8;
  color: #AD4825;
}

.status-button.status-denied {
  border-color: #a33b2b;
  color: #a33b2b;
}

.status-button.status-draft.active,
.status-button.status-sent.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.status-button.status-approved.active {
  background: #AD4825;
  border-color: #AD4825;
  color: #fff;
}

.status-button.status-denied.active {
  background: #a33b2b;
  border-color: #a33b2b;
  color: #fff;
}

html[data-theme="dark"] .topbar,
html[data-theme="high-contrast"] .topbar {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

html[data-theme="dark"] .brand-pill,
html[data-theme="dark"] .main-nav a,
html[data-theme="high-contrast"] .brand-pill,
html[data-theme="high-contrast"] .main-nav a {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .main-nav a:hover,
html[data-theme="dark"] .brand-pill:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(140, 200, 255, 0.12);
}

html[data-theme="high-contrast"] .main-nav a:hover,
html[data-theme="high-contrast"] .brand-pill:hover {
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(0, 255, 106, 0.22);
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .app-card,
html[data-theme="dark"] .folder-card,
html[data-theme="dark"] .metric-grid article,
html[data-theme="dark"] .workflow-panel,
html[data-theme="dark"] .manual-create-panel,
html[data-theme="dark"] .table,
html[data-theme="dark"] .loo-status-panel,
html[data-theme="dark"] .tool-command-grid article,
html[data-theme="high-contrast"] .panel,
html[data-theme="high-contrast"] .app-card,
html[data-theme="high-contrast"] .folder-card,
html[data-theme="high-contrast"] .metric-grid article,
html[data-theme="high-contrast"] .workflow-panel,
html[data-theme="high-contrast"] .manual-create-panel,
html[data-theme="high-contrast"] .table,
html[data-theme="high-contrast"] .loo-status-panel,
html[data-theme="high-contrast"] .tool-command-grid article {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .row.head,
html[data-theme="dark"] .sheet-title,
html[data-theme="dark"] .sheet-subtitle,
html[data-theme="dark"] .drs-form-header,
html[data-theme="high-contrast"] .row.head,
html[data-theme="high-contrast"] .sheet-title,
html[data-theme="high-contrast"] .sheet-subtitle,
html[data-theme="high-contrast"] .drs-form-header {
  background: color-mix(in srgb, var(--panel) 82%, var(--accent) 18%);
  color: var(--ink);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .button,
html[data-theme="dark"] button,
html[data-theme="high-contrast"] input,
html[data-theme="high-contrast"] select,
html[data-theme="high-contrast"] textarea,
html[data-theme="high-contrast"] .button,
html[data-theme="high-contrast"] button {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="high-contrast"] input::placeholder,
html[data-theme="high-contrast"] textarea::placeholder {
  color: var(--muted);
}

html[data-theme="dark"] .button:hover,
html[data-theme="dark"] button:hover {
  border-color: var(--accent);
  background: #202834;
}

html[data-theme="high-contrast"] .button:hover,
html[data-theme="high-contrast"] button:hover {
  border-color: var(--accent);
  background: #071f10;
  box-shadow: 0 0 10px rgba(0, 255, 106, 0.18);
}

html[data-theme="dark"] .primary,
html[data-theme="high-contrast"] .primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #020704;
}

html[data-theme="high-contrast"] .app-icon,
html[data-theme="high-contrast"] .folder-card span {
  background: #042910 !important;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--line);
}

html[data-theme="high-contrast"] .notice {
  background: #03160a;
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .deal-sheet,
html[data-theme="dark"] .calc-card-grid,
html[data-theme="dark"] .shipping-grid,
html[data-theme="dark"] .party-card,
html[data-theme="dark"] .sheet-notes,
html[data-theme="dark"] .sheet-actions,
html[data-theme="high-contrast"] .deal-sheet,
html[data-theme="high-contrast"] .calc-card-grid,
html[data-theme="high-contrast"] .shipping-grid,
html[data-theme="high-contrast"] .party-card,
html[data-theme="high-contrast"] .sheet-notes,
html[data-theme="high-contrast"] .sheet-actions {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .sheet-actions,
html[data-theme="high-contrast"] .sheet-actions {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

html[data-theme="dark"] .deal-sheet input,
html[data-theme="dark"] .deal-sheet textarea,
html[data-theme="dark"] .deal-sheet select,
html[data-theme="high-contrast"] .deal-sheet input,
html[data-theme="high-contrast"] .deal-sheet textarea,
html[data-theme="high-contrast"] .deal-sheet select {
  background: #0b1110;
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] label span,
html[data-theme="dark"] .field-label,
html[data-theme="dark"] .deal-sheet label span,
html[data-theme="high-contrast"] label span,
html[data-theme="high-contrast"] .field-label,
html[data-theme="high-contrast"] .deal-sheet label span {
  color: var(--muted);
}

html[data-theme="dark"] .party-card strong,
html[data-theme="high-contrast"] .party-card strong {
  color: var(--ink);
}

html[data-theme="high-contrast"] .deal-sheet input,
html[data-theme="high-contrast"] .deal-sheet textarea,
html[data-theme="high-contrast"] .deal-sheet select {
  background: #020704;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 106, 0.04);
}

html[data-theme="high-contrast"] .sheet-title,
html[data-theme="high-contrast"] .sheet-subtitle {
  background: #0b2b14;
  color: var(--ink);
}

html[data-theme="dark"] .deal-sheet .sheet-section,
html[data-theme="high-contrast"] .deal-sheet .sheet-section {
  background: transparent;
  border-color: var(--line);
}

html[data-theme="dark"] .deal-sheet .calc-card-grid,
html[data-theme="dark"] .deal-sheet .shipping-grid,
html[data-theme="dark"] .deal-sheet .party-card,
html[data-theme="dark"] .deal-sheet .sheet-notes,
html[data-theme="high-contrast"] .deal-sheet .calc-card-grid,
html[data-theme="high-contrast"] .deal-sheet .shipping-grid,
html[data-theme="high-contrast"] .deal-sheet .party-card,
html[data-theme="high-contrast"] .deal-sheet .sheet-notes {
  background: color-mix(in srgb, var(--panel) 92%, #000 8%);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="high-contrast"] .deal-sheet .calc-card-grid,
html[data-theme="high-contrast"] .deal-sheet .shipping-grid,
html[data-theme="high-contrast"] .deal-sheet .party-card,
html[data-theme="high-contrast"] .deal-sheet .sheet-notes {
  background: #041008;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 106, 0.04);
}

html[data-theme="dark"] .deal-sheet input,
html[data-theme="dark"] .deal-sheet textarea,
html[data-theme="dark"] .deal-sheet select {
  background: #111821;
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="high-contrast"] .deal-sheet input,
html[data-theme="high-contrast"] .deal-sheet textarea,
html[data-theme="high-contrast"] .deal-sheet select {
  background: #020704;
  border-color: #2f8a49;
  color: #f8fff9;
}

html[data-theme="high-contrast"] .deal-sheet input:focus,
html[data-theme="high-contrast"] .deal-sheet textarea:focus,
html[data-theme="high-contrast"] .deal-sheet select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 255, 106, 0.16);
}

html[data-theme="dark"] .deal-sheet label span,
html[data-theme="high-contrast"] .deal-sheet label span {
  color: #eefdf2;
}

html[data-theme="dark"] .deal-sheet .sheet-notes,
html[data-theme="high-contrast"] .deal-sheet .sheet-notes {
  color: var(--ink);
}

html[data-theme="dark"] .sheet-actions {
  background: rgba(15, 18, 22, 0.94);
}

html[data-theme="high-contrast"] .sheet-actions {
  background: rgba(2, 7, 4, 0.96);
  border-top: 1px solid var(--line);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.pagination-bar > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-bar strong {
  color: var(--ink);
}

@media (max-width: 720px) {
  .pagination-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* TINV editor v2 */
.tinv-edit-v2 {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tinv-edit-v2 .sheet-title {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 15px;
  font-weight: 900;
  color: #111827;
}

.tinv-edit-v2 .form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tinv-edit-v2 label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tinv-edit-v2 label.wide {
  grid-column: span 3;
}

.tinv-edit-v2 label span {
  font-size: 11px;
  font-weight: 850;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tinv-edit-v2 input,
.tinv-edit-v2 textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fff;
}

.tinv-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tinv-line-head,
.tinv-line-row {
  display: grid;
  grid-template-columns: .7fr .7fr 2.2fr .9fr 1.1fr 1.1fr;
  gap: 8px;
  align-items: center;
}

.tinv-line-head span {
  font-size: 11px;
  font-weight: 850;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tinv-line-row input {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .tinv-edit-v2 .form-grid,
  .tinv-line-head,
  .tinv-line-row {
    grid-template-columns: 1fr;
  }

  .tinv-edit-v2 label.wide {
    grid-column: span 1;
  }

  .tinv-line-head {
    display: none;
  }
}

/* TINV edit line-item table */
.tinv-line-items-table-v2 {
  margin: 18px 24px 26px;
  border: 1px solid #d9d1c3;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.tinv-line-items-table-v2 .tinv-line-head,
.tinv-line-items-table-v2 .tinv-line-row {
  display: grid;
  grid-template-columns: 0.8fr 0.7fr 2fr 0.9fr 1.3fr 1.2fr;
  align-items: center;
  gap: 0;
}

.tinv-line-items-table-v2 .tinv-line-head {
  background: #f7f7f8;
  border-bottom: 1px solid #d9d1c3;
}

.tinv-line-items-table-v2 .tinv-line-head span {
  padding: 14px 14px;
  font-size: 12px;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.tinv-line-items-table-v2 .tinv-line-row {
  border-bottom: 1px solid #ece7df;
}

.tinv-line-items-table-v2 .tinv-line-row:last-child {
  border-bottom: 0;
}

.tinv-line-items-table-v2 .tinv-line-row input {
  width: 100%;
  border: 0;
  border-right: 1px solid #ece7df;
  border-radius: 0;
  padding: 13px 14px;
  font-size: 15px;
  background: #fff;
  box-sizing: border-box;
}

.tinv-line-items-table-v2 .tinv-line-row input:last-child {
  border-right: 0;
}

.tinv-line-items-table-v2 .tinv-line-row input:focus {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

@media (max-width: 900px) {
  .tinv-line-items-table-v2 .tinv-line-head {
    display: none;
  }

  .tinv-line-items-table-v2 .tinv-line-row {
    grid-template-columns: 1fr;
    border-bottom: 12px solid #f3f4f6;
  }

  .tinv-line-items-table-v2 .tinv-line-row input {
    border-right: 0;
    border-bottom: 1px solid #ece7df;
  }
}

/* Clean editable TINV line-items table */
.tinv-edit-line-table {
  margin: 18px 22px 28px;
  border: 1px solid #d3dae1;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.tinv-edit-line-head,
.tinv-edit-line-row {
  display: grid;
  grid-template-columns: 0.8fr 0.7fr 2.2fr 1fr 1.4fr 1.4fr;
}

.tinv-edit-line-head {
  background: #f7f7f8;
  border-bottom: 1px solid #d3dae1;
}

.tinv-edit-line-head div {
  padding: 15px 14px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #64748b;
}

.tinv-edit-line-row {
  border-bottom: 1px solid #ebe4d8;
}

.tinv-edit-line-row:last-child {
  border-bottom: none;
}

.tinv-edit-line-row div {
  border-right: 1px solid #ebe4d8;
}

.tinv-edit-line-row div:last-child {
  border-right: none;
}

.tinv-edit-line-row input {
  width: 100%;
  min-height: 48px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 12px 14px !important;
  background: #fff;
  font-size: 15px;
  box-sizing: border-box;
}

.tinv-edit-line-row input:focus {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

@media (max-width: 900px) {
  .tinv-edit-line-head {
    display: none;
  }

  .tinv-edit-line-row {
    grid-template-columns: 1fr;
    border-bottom: 12px solid #f3f4f6;
  }

  .tinv-edit-line-row div {
    border-right: 0;
    border-bottom: 1px solid #ebe4d8;
  }
}

/* Clean editable TINV totals table */
.tinv-edit-totals-table {
  margin: 18px 22px 28px;
  border: 1px solid #d3dae1;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.tinv-edit-totals-row {
  display: grid;
  grid-template-columns: 2.2fr 0.9fr 1fr 1.5fr;
  border-bottom: 1px solid #d3dae1;
  min-height: 52px;
}

.tinv-edit-totals-row:last-child {
  border-bottom: none;
}

.tinv-edit-totals-row > div {
  border-right: 1px solid #d3dae1;
  display: flex;
  align-items: center;
}

.tinv-edit-totals-row > div:last-child {
  border-right: none;
}

.tinv-edit-totals-label {
  padding: 0 14px;
  font-size: 15px;
  font-weight: 900;
  color: #111827;
  text-transform: uppercase;
}

.tinv-edit-totals-row input {
  width: 100%;
  min-height: 52px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 12px 14px !important;
  background: #fff;
  font-size: 15px;
  text-align: right;
  box-sizing: border-box;
}

.tinv-edit-totals-row input:focus {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

@media (max-width: 900px) {
  .tinv-edit-totals-row {
    grid-template-columns: 1fr;
  }

  .tinv-edit-totals-row > div {
    border-right: 0;
    border-bottom: 1px solid #d3dae1;
  }

  .tinv-edit-totals-row > div:last-child {
    border-bottom: none;
  }

  .tinv-edit-totals-row input {
    text-align: left;
  }
}

/* TINV totals aligned with line-item/product table */
.tinv-edit-totals-table-aligned {
  margin: 18px 22px 28px;
  border: 1px solid #d3dae1;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.tinv-edit-totals-table-aligned .tinv-edit-totals-row {
  display: grid;
  grid-template-columns: 3.7fr 1fr 1.4fr 1.4fr;
  min-height: 52px;
  border-bottom: 1px solid #d3dae1;
}

.tinv-edit-totals-table-aligned .tinv-edit-totals-row:last-child {
  border-bottom: 0;
}

.tinv-edit-totals-table-aligned .tinv-edit-totals-row > div {
  display: flex;
  align-items: center;
  border-right: 1px solid #d3dae1;
}

.tinv-edit-totals-table-aligned .tinv-edit-totals-row > div:last-child {
  border-right: 0;
}

.tinv-edit-totals-table-aligned .tinv-edit-totals-label {
  padding: 0 14px;
  font-size: 15px;
  font-weight: 900;
  color: #111827;
  text-transform: uppercase;
}

.tinv-edit-totals-table-aligned input {
  width: 100%;
  min-height: 52px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 12px 14px !important;
  background: #fff;
  font-size: 15px;
  text-align: right;
  box-sizing: border-box;
}

.tinv-edit-totals-table-aligned input.is-bold {
  font-weight: 900;
}

.tinv-edit-totals-table-aligned input:focus {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

/* TINV totals aligned with line-item/product table */
.tinv-edit-totals-table-aligned {
  margin: 18px 22px 28px;
  border: 1px solid #d3dae1;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.tinv-edit-totals-table-aligned .tinv-edit-totals-row {
  display: grid;
  grid-template-columns: 3.7fr 1fr 1.4fr 1.4fr;
  min-height: 52px;
  border-bottom: 1px solid #d3dae1;
}

.tinv-edit-totals-table-aligned .tinv-edit-totals-row:last-child {
  border-bottom: 0;
}

.tinv-edit-totals-table-aligned .tinv-edit-totals-row > div {
  display: flex;
  align-items: center;
  border-right: 1px solid #d3dae1;
}

.tinv-edit-totals-table-aligned .tinv-edit-totals-row > div:last-child {
  border-right: 0;
}

.tinv-edit-totals-table-aligned .tinv-edit-totals-label {
  padding: 0 14px;
  font-size: 15px;
  font-weight: 900;
  color: #111827;
  text-transform: uppercase;
}

.tinv-edit-totals-table-aligned input {
  width: 100%;
  min-height: 52px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 12px 14px !important;
  background: #fff;
  font-size: 15px;
  text-align: right;
  box-sizing: border-box;
}

.tinv-edit-totals-table-aligned input.is-bold {
  font-weight: 900;
}

.tinv-edit-totals-table-aligned input:focus {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

:root {
  --tool-deals-bg: #EEEEEE;
  --tool-deals-fg: #9BCF78;
  --tool-drs-bg: #CFEFFF;
  --tool-drs-fg: #176B9D;
  --tool-loo-bg: #FFD8CC;
  --tool-loo-fg: #A94D32;
  --tool-po-bg: #D7F4CE;
  --tool-po-fg: #3D7D2A;
  --tool-pfi-bg: #F4D3F8;
  --tool-pfi-fg: #8B3D91;
  --tool-ci-bg: #D6E2FF;
  --tool-ci-fg: #3157A8;
  --tool-tinv-bg: #FFE4A8;
  --tool-tinv-fg: #8A6200;
  --tool-logistics-bg: #FFF4A8;
  --tool-logistics-fg: #C92F2F;
}

/* Office Suite dashboard grouping */
.office-suite-home .suite-grid,
.office-suite-home .office-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 18px;
  max-width: none;
}

@media (max-width: 1100px) {
  .office-suite-home .suite-grid,
  .office-suite-home .office-tools-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 640px) {
  .office-suite-home .suite-grid,
  .office-suite-home .office-tools-grid {
    grid-template-columns: 1fr;
  }
}

/* Keep icons readable and consistent */
.office-suite-home .suite-icon svg {
  color: #101820 !important;
  stroke: #101820 !important;
}

.office-suite-home a.suite-card[href="/drs"] [class*="icon"] {
  background: #c8edff !important; /* sky */
}

.office-suite-home a.suite-card[href="/loo"] [class*="icon"] {
  background: #ffd4c7 !important; /* coral */
}

.office-suite-home a.suite-card[href="/po"] [class*="icon"] {
  background: #D7F4CE !important; /* PO green */
}

.office-suite-home a.suite-card[href="/pfi"] [class*="icon"] {
  background: #e3c8ff !important; /* lilac */
}

.office-suite-home a.suite-card[href="/ci"] [class*="icon"] {
  background: #bfe7ff !important; /* blue */
}

.office-suite-home a.suite-card[href="/tinv"] [class*="icon"] {
  background: #ffd98a !important; /* amber */
}

.office-suite-home a.suite-card[href="/accounting"] [class*="icon"] {
  background: #ffe6e4 !important; /* blush invoice */
  color: #c63a3a !important;
}

.office-suite-home a.suite-card[href="/kpis"] [class*="icon"] {
  background: #f0e4ff !important; /* KPI violet */
  color: #7b2cbf !important;
}

.office-suite-home a.suite-card[href="/deal-calculations"] [class*="icon"] {
  background: #dbeafe !important; /* management calc blue */
  color: #1d4ed8 !important;
}

.office-suite-home a.suite-card[href="/docsign"] [class*="icon"] {
  background: #e7c7ff !important; /* purple */
}

.office-suite-home a.suite-card[href="/pdf-editor"] [class*="icon"] {
  background: #bfe1ff !important; /* clean blue */
}

.office-suite-home a.suite-card[href="/docscan"] [class*="icon"] {
  background: #b9eeee !important; /* teal */
}

.office-suite-home a.suite-card[href="/documents-files"] [class*="icon"] {
  background: #cdecc8 !important; /* sage */
}

/* Keep the actual black line icons crisp */
.office-suite-home a.suite-card [class*="icon"] svg,
.office-suite-home a.suite-card svg {
  stroke: #101820 !important;
  color: #101820 !important;
}

/* Slightly deepen the icon bubble so the colors read better */
.office-suite-home a.suite-card [class*="icon"] {
  box-shadow: inset 0 0 0 1px rgba(16, 24, 32, 0.04);
}


/* VTSA Office Suite — one unique pastel color per tool */
.office-suite-home a.suite-card[href="/deals"] [class*="icon"] {
  background: var(--tool-deals-bg) !important; /* Deal grey */
  color: var(--tool-deals-fg) !important;
  box-shadow: inset 0 0 0 3px #9BCF78 !important;
}

.office-suite-home a.suite-card[href="/drs"] [class*="icon"] {
  background: var(--tool-drs-bg) !important; /* Sky */
  color: var(--tool-drs-fg) !important;
}

.office-suite-home a.suite-card[href="/loo"] [class*="icon"] {
  background: var(--tool-loo-bg) !important; /* Coral */
  color: var(--tool-loo-fg) !important;
}

.office-suite-home a.suite-card[href="/po"] [class*="icon"] {
  background: var(--tool-po-bg) !important; /* PO green */
  color: var(--tool-po-fg) !important;
}

.office-suite-home a.suite-card[href="/pfi"] [class*="icon"] {
  background: var(--tool-pfi-bg) !important; /* Orchid */
  color: var(--tool-pfi-fg) !important;
}

.office-suite-home a.suite-card[href="/ci"] [class*="icon"] {
  background: var(--tool-ci-bg) !important; /* Periwinkle */
  color: var(--tool-ci-fg) !important;
}

.office-suite-home a.suite-card[href="/tinv"] [class*="icon"] {
  background: var(--tool-tinv-bg) !important; /* Amber */
  color: var(--tool-tinv-fg) !important;
}

.office-suite-home a.suite-card[href="/logistics"] [class*="icon"] {
  background: var(--tool-logistics-bg) !important;
  color: var(--tool-logistics-fg) !important;
}

.office-suite-home a.suite-card[href="/accounting"] [class*="icon"] {
  background: #ffe6e4 !important; /* Blush invoice */
  color: #c63a3a !important;
}

.office-suite-home a.suite-card[href="/kpis"] [class*="icon"] {
  background: #f0e4ff !important; /* KPI violet */
  color: #7b2cbf !important;
}

.office-suite-home a.suite-card[href="/deal-calculations"] [class*="icon"] {
  background: #dbeafe !important; /* Management calc */
  color: #1d4ed8 !important;
}

.office-suite-home a.suite-card[href="/docsign"] [class*="icon"] {
  background: #E7F4C9 !important; /* Pistachio */
  color: #5F7F1E !important;
}

.office-suite-home a.suite-card[href="/pdf-editor"] [class*="icon"] {
  background: #E5D8FF !important; /* Violet */
  color: #6544B3 !important;
}

.office-suite-home a.suite-card[href="/docscan"] [class*="icon"] {
  background: #C9F2EF !important; /* Teal */
  color: #147A72 !important;
}

.office-suite-home a.suite-card[href="/documents-files"] [class*="icon"] {
  background: #D9F0E6 !important; /* Sage */
  color: #2D755A !important;
}

/* Keep icons crisp and matched to each card color */
.office-suite-home a.suite-card [class*="icon"] svg {
  stroke: currentColor !important;
  color: currentColor !important;
  fill: none !important;
}

.office-suite-home a.suite-card [class*="icon"] svg path,
.office-suite-home a.suite-card [class*="icon"] svg rect,
.office-suite-home a.suite-card [class*="icon"] svg circle,
.office-suite-home a.suite-card [class*="icon"] svg line,
.office-suite-home a.suite-card [class*="icon"] svg polyline,
.office-suite-home a.suite-card [class*="icon"] svg polygon {
  stroke: currentColor !important;
}

.office-suite-home a.suite-card [class*="icon"] {
  box-sizing: border-box;
  border: 3px solid currentColor;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 8px 18px rgba(16, 24, 32, 0.06);
}


/* Accounting dashboard cleanup */
.accounting-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px 28px 64px;
}

.compact-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.compact-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: -0.04em;
  color: #101820;
}

.hero-subtitle {
  max-width: 780px;
  margin: 0;
  color: #5b677a;
  font-size: 16px;
  line-height: 1.45;
}

.eyebrow {
  color: #1e3a5f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

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

.accounting-kpi-card {
  background: #fff;
  border: 1px solid #dde3e9;
  border-radius: 18px;
  padding: 18px;
  min-height: 112px;
  box-shadow: 0 1px 0 rgba(16, 24, 32, 0.03);
}

.accounting-kpi-card span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.accounting-kpi-card strong {
  display: block;
  margin-top: 10px;
  color: #101820;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.accounting-kpi-card small {
  display: block;
  margin-top: 6px;
  color: #667085;
  font-size: 13px;
}

.accounting-kpi-card.good {
  border-color: #b9e3ce;
  background: #f4fbf7;
}

.accounting-kpi-card.warning {
  border-color: #f0d4a9;
  background: #fffaf0;
}

.accounting-layout {
  display: grid;
  gap: 20px;
}

.accounting-panel {
  background: #fff;
  border: 1px solid #dde3e9;
  border-radius: 20px;
  padding: 22px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
  color: #101820;
}

.section-title-row p {
  margin: 6px 0 0;
  color: #667085;
}

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

.attention-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e5ded2;
  border-radius: 14px;
  padding: 13px 14px;
  background: #fbfaf7;
}

.attention-item span {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.attention-item strong {
  font-size: 22px;
  color: #101820;
}

.attention-item.has-issue {
  background: #fff7ed;
  border-color: #f4c27c;
}

.attention-item.has-issue strong {
  color: #b45309;
}

.accounting-table-wrap,
.export-table-wrap {
  overflow-x: auto;
}

.accounting-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #dde3e9;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.accounting-table th {
  background: #f7f5f0;
  color: #667085;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid #dde3e9;
}

.accounting-table td {
  padding: 14px;
  border-bottom: 1px solid #eee7db;
  color: #1f2937;
  font-size: 14px;
  vertical-align: middle;
}

.accounting-table tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  color: #667085 !important;
  text-align: center;
  padding: 34px !important;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.good {
  background: #FDE9D8;
  color: #AD4825;
}

.status-pill.warning {
  background: #fff0d8;
  color: #A86719;
}

.status-pill.neutral {
  background: #eef2f6;
  color: #475467;
}

.table-link {
  color: #1e3a5f;
  font-weight: 900;
  text-decoration: none;
}

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

.btn.small {
  padding: 9px 12px;
  font-size: 13px;
}

.accounting-help {
  margin-top: 20px;
  background: #fff;
  border: 1px solid #dde3e9;
  border-radius: 18px;
  padding: 16px 18px;
}

.accounting-help summary {
  cursor: pointer;
  font-weight: 900;
  color: #101820;
}

.compact-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.compact-chain div {
  border: 1px solid #eee7db;
  border-radius: 14px;
  padding: 12px;
  background: #fbfaf7;
}

.compact-chain strong {
  display: block;
  color: #1e3a5f;
}

.compact-chain span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .compact-hero {
    flex-direction: column;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .accounting-kpi-grid,
  .attention-grid,
  .compact-chain {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .accounting-kpi-grid,
  .attention-grid,
  .compact-chain {
    grid-template-columns: 1fr;
  }
}

/* Accounting page should rely on the global VTSA header, not a second local nav */
.accounting-page .compact-hero {
  display: block;
  margin-top: 8px;
  margin-bottom: 26px;
}

.accounting-page .compact-hero h1 {
  max-width: 760px;
}

.accounting-page .hero-subtitle {
  max-width: 820px;
}

/* Force global VTSA top navigation to display on desktop */
.site-header,
.topbar,
.app-header,
.main-header,
.global-header {
  display: flex !important;
  align-items: center !important;
}

.site-nav,
.top-nav,
.main-nav,
.global-nav,
.header-nav,
.nav-links {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.site-nav a,
.top-nav a,
.main-nav a,
.global-nav a,
.header-nav a,
.nav-links a {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (min-width: 900px) {
  .site-nav,
  .top-nav,
  .main-nav,
  .global-nav,
  .header-nav,
  .nav-links {
    display: flex !important;
  }
}

/* HARD FIX: keep global VTSA header/nav visible on all pages */
.topbar {
  width: 100%;
  min-height: 86px;
  padding: 14px 28px !important;
  border-bottom: 1px solid #dde3e9;
  background: #fbfaf7;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  box-sizing: border-box;
  overflow: visible !important;
}

.topbar .brand,
.topbar .brand-lockup,
.topbar > a:first-child {
  flex: 0 0 auto !important;
}

.topbar .main-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.topbar .main-nav a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 18px !important;
  border: 2px solid #111 !important;
  border-radius: 8px !important;
  color: #111 !important;
  background: #fff !important;
  text-decoration: none !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  visibility: visible !important;
  opacity: 1 !important;
  white-space: nowrap !important;
}

.topbar .topbar-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

.topbar .topbar-actions a,
.topbar .topbar-actions button {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 1250px) {
  .topbar {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
  }

  .topbar .main-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start !important;
  }

  .topbar .topbar-actions {
    margin-left: auto;
  }
}

/* FINAL HEADER OVERRIDE — restore full VTSA top bar everywhere */
body .topbar {
  position: relative !important;
  z-index: 50 !important;
  width: 100% !important;
  min-height: 92px !important;
  padding: 14px 28px !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
  gap: 22px !important;
  background: #fbfaf7 !important;
  border-bottom: 1px solid #dde3e9 !important;
  overflow: visible !important;
}

body .topbar .brand {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  white-space: nowrap !important;
}

body .topbar .main-nav {
  display: flex !important;
  position: static !important;
  transform: none !important;
  clip: auto !important;
  clip-path: none !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body .topbar .main-nav a {
  display: inline-flex !important;
  position: static !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 18px !important;
  border: 2px solid #111 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #111 !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body .topbar .topbar-actions {
  display: flex !important;
  position: static !important;
  transform: none !important;
  clip: auto !important;
  clip-path: none !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

body .topbar .topbar-actions a,
body .topbar .topbar-actions button,
body .topbar .topbar-actions span {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  color: #1e3a5f !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

@media (max-width: 1250px) {
  body .topbar {
    grid-template-columns: 1fr !important;
    align-items: flex-start !important;
  }

  body .topbar .main-nav {
    justify-content: flex-start !important;
  }

  body .topbar .topbar-actions {
    justify-content: flex-start !important;
  }
}

/* FINAL HEADER OVERRIDE — restore full VTSA top bar everywhere */
body .topbar {
  position: relative !important;
  z-index: 50 !important;
  width: 100% !important;
  min-height: 92px !important;
  padding: 14px 28px !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
  gap: 22px !important;
  background: #fbfaf7 !important;
  border-bottom: 1px solid #dde3e9 !important;
  overflow: visible !important;
}

body .topbar .brand {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  white-space: nowrap !important;
}

body .topbar .main-nav {
  display: flex !important;
  position: static !important;
  transform: none !important;
  clip: auto !important;
  clip-path: none !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body .topbar .main-nav a {
  display: inline-flex !important;
  position: static !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 18px !important;
  border: 2px solid #111 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #111 !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body .topbar .topbar-actions {
  display: flex !important;
  position: static !important;
  transform: none !important;
  clip: auto !important;
  clip-path: none !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

body .topbar .topbar-actions a,
body .topbar .topbar-actions button,
body .topbar .topbar-actions span {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  color: #1e3a5f !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

@media (max-width: 1250px) {
  body .topbar {
    grid-template-columns: 1fr !important;
    align-items: flex-start !important;
  }

  body .topbar .main-nav {
    justify-content: flex-start !important;
  }

  body .topbar .topbar-actions {
    justify-content: flex-start !important;
  }
}

/* GUARANTEED VTSA HEADER FIX */
.vtsa-fixed-topbar {
  width: 100% !important;
  min-height: 92px !important;
  padding: 14px 28px !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center !important;
  gap: 22px !important;
  background: #fbfaf7 !important;
  border-bottom: 1px solid #dde3e9 !important;
  overflow: visible !important;
}

.vtsa-fixed-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 54px !important;
  padding: 0 22px !important;
  border: 2px solid #111 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #111 !important;
  text-decoration: none !important;
  font-weight: 900 !important;
  letter-spacing: 0.05em !important;
  white-space: nowrap !important;
}

.vtsa-fixed-brand-mark {
  font-size: 24px !important;
  line-height: 1 !important;
}

.vtsa-fixed-main-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
  padding: 0 !important;
}

.vtsa-fixed-main-nav a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 18px !important;
  border: 2px solid #111 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #111 !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
}

.vtsa-fixed-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

.vtsa-fixed-actions a {
  display: inline-flex !important;
  color: #1e3a5f !important;
  text-decoration: none !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.vtsa-fixed-actions a:last-child {
  color: #667085 !important;
}

@media (max-width: 1250px) {
  .vtsa-fixed-topbar {
    grid-template-columns: 1fr !important;
    align-items: flex-start !important;
  }

  .vtsa-fixed-main-nav,
  .vtsa-fixed-actions {
    justify-content: flex-start !important;
  }
}

/* VTSA real flower logo */
.vtsa-brand-logo {
  width: 34px !important;
  height: 34px !important;
  object-fit: contain !important;
  display: block !important;
  flex: 0 0 auto !important;
}

.vtsa-fixed-brand,
.brand,
.brand-lockup {
  gap: 12px !important;
}

/* Real VTSA flower logo in global header */
.vtsa-brand-logo {
  width: 38px !important;
  height: 38px !important;
  object-fit: contain !important;
  display: block !important;
  flex: 0 0 auto !important;
}

.vtsa-fixed-brand,
.brand,
.brand-lockup {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
}

/* Final VTSA brand lockup */
.vtsa-fixed-brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  min-height: 64px !important;
  padding: 0 26px !important;
  border: 3px solid #111 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #111 !important;
  text-decoration: none !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  white-space: nowrap !important;
}

.vtsa-brand-logo {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain !important;
  display: block !important;
  flex: 0 0 auto !important;
}

.vtsa-fixed-brand span {
  font-size: 22px !important;
  line-height: 1 !important;
  color: #111 !important;
}

/* DRS dashboard action buttons */
.drs-create-button,
a.drs-create-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 56px !important;
  padding: 0 24px !important;
  border-radius: 12px !important;
  border: 2px solid #1e3a5f !important;
  background: #1e3a5f !important;
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.drs-create-button:hover {
  background: #AF3F1D !important;
  border-color: #AF3F1D !important;
  color: #ffffff !important;
}

.drs-storage-button,
a.drs-storage-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 56px !important;
  padding: 0 24px !important;
  border-radius: 12px !important;
  border: 2px solid #d8d0c3 !important;
  background: #ffffff !important;
  color: #101820 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.drs-storage-button:hover {
  border-color: #1e3a5f !important;
  color: #1e3a5f !important;
  background: #f6fffd !important;
}

/* Delete buttons */
.button.danger,
button.danger,
a.danger {
  border-color: #b42318 !important;
  color: #b42318 !important;
  background: #fff !important;
}

.button.danger:hover,
button.danger:hover,
a.danger:hover {
  background: #fff1f0 !important;
  border-color: #912018 !important;
  color: #912018 !important;
}

/* Header theme toggle button */
.vtsa-fixed-actions .theme-toggle,
.theme-toggle {
  appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  color: #1e3a5f !important;
  font: inherit !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
}

.vtsa-fixed-actions .theme-toggle:hover,
.theme-toggle:hover {
  text-decoration: underline !important;
}

/* LOO dashboard action buttons */
.loo-create-button,
a.loo-create-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 56px !important;
  padding: 0 24px !important;
  border-radius: 12px !important;
  border: 2px solid #1e3a5f !important;
  background: #1e3a5f !important;
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.loo-create-button:hover {
  background: #AF3F1D !important;
  border-color: #AF3F1D !important;
  color: #ffffff !important;
}

.loo-storage-button,
a.loo-storage-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 56px !important;
  padding: 0 24px !important;
  border-radius: 12px !important;
  border: 2px solid #d8d0c3 !important;
  background: #ffffff !important;
  color: #101820 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.loo-storage-button:hover {
  border-color: #1e3a5f !important;
  color: #1e3a5f !important;
  background: #f6fffd !important;
}

/* LOO dashboard action buttons */
.loo-create-button,
a.loo-create-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 56px !important;
  padding: 0 24px !important;
  border-radius: 12px !important;
  border: 2px solid #1e3a5f !important;
  background: #1e3a5f !important;
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.loo-create-button:hover {
  background: #AF3F1D !important;
  border-color: #AF3F1D !important;
  color: #ffffff !important;
}

.loo-storage-button,
a.loo-storage-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 56px !important;
  padding: 0 24px !important;
  border-radius: 12px !important;
  border: 2px solid #d8d0c3 !important;
  background: #ffffff !important;
  color: #101820 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.loo-storage-button:hover {
  border-color: #1e3a5f !important;
  color: #1e3a5f !important;
  background: #f6fffd !important;
}



/* ============================================================
   DRS dashboard mobile/table refinement
   ============================================================ */
.drs-record-row,
.drs-dashboard .row {
  gap: 0 !important;
}

.drs-record-row span,
.drs-dashboard .row span {
  font-weight: 750;
}

.drs-record-row strong {
  font-weight: 950 !important;
}

.drs-dashboard .table-header,
.drs-dashboard .drs-record-row {
  grid-template-columns:
    minmax(120px, 1.1fr)
    minmax(100px, 0.9fr)
    minmax(110px, 0.9fr)
    minmax(100px, 0.8fr)
    minmax(130px, 1fr)
    minmax(70px, 0.5fr)
    minmax(110px, 0.8fr)
    minmax(150px, 1fr)
    minmax(230px, 1.4fr) !important;
}

.drs-dashboard .summary-grid,
.drs-dashboard .kpi-grid,
.drs-dashboard .stats-grid {
  gap: 10px !important;
}

.drs-dashboard .summary-card,
.drs-dashboard .kpi-card,
.drs-dashboard .stat-card {
  padding: 14px 16px !important;
  min-height: 96px !important;
}

.drs-dashboard .summary-card span,
.drs-dashboard .kpi-card span,
.drs-dashboard .stat-card span {
  font-weight: 950 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.12 !important;
}

.drs-dashboard .summary-card strong,
.drs-dashboard .kpi-card strong,
.drs-dashboard .stat-card strong {
  font-weight: 950 !important;
}


@media (max-width: 760px) {
  .drs-dashboard,
  .page-shell,
  .shell {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .drs-dashboard .hero-actions,
  .drs-dashboard .page-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .drs-create-button,
  .drs-storage-button,
  a.drs-create-button,
  a.drs-storage-button {
    width: 100% !important;
    min-height: 54px !important;
    font-size: clamp(18px, 6vw, 28px) !important;
    padding: 0 18px !important;
    border-radius: 14px !important;
  }

  .drs-dashboard .summary-grid,
  .drs-dashboard .kpi-grid,
  .drs-dashboard .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(88px, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  .drs-dashboard .summary-card,
  .drs-dashboard .kpi-card,
  .drs-dashboard .stat-card {
    min-height: 92px !important;
    padding: 10px 10px !important;
    border-radius: 14px !important;
  }

  .drs-dashboard .summary-card span,
  .drs-dashboard .kpi-card span,
  .drs-dashboard .stat-card span {
    font-size: clamp(12px, 3.6vw, 16px) !important;
    line-height: 1.12 !important;
    font-weight: 950 !important;
  }

  .drs-dashboard .summary-card strong,
  .drs-dashboard .kpi-card strong,
  .drs-dashboard .stat-card strong {
    font-size: clamp(26px, 8vw, 38px) !important;
    line-height: 1 !important;
    font-weight: 950 !important;
  }

  .drs-dashboard input,
  .drs-dashboard select {
    min-height: 52px !important;
    font-size: 18px !important;
  }

  .drs-dashboard .filters,
  .drs-dashboard .filter-row,
  .drs-dashboard .search-row {
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  .drs-dashboard h2 {
    font-size: clamp(28px, 8vw, 42px) !important;
    margin-bottom: 12px !important;
  }

  .drs-dashboard .table-wrap,
  .drs-dashboard .records-table,
  .drs-dashboard .data-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .drs-dashboard .table-header,
  .drs-dashboard .drs-record-row {
    min-width: 860px !important;
  }

  .drs-dashboard .table-header span {
    font-size: 13px !important;
    font-weight: 950 !important;
  }

  .drs-dashboard .drs-record-row span {
    font-size: 16px !important;
    font-weight: 850 !important;
  }

  .drs-dashboard .drs-record-row span:first-child strong {
    font-size: 20px !important;
  }
}




/* DRS records: improve spacing for Value / Status / Created columns */
.drs-dashboard .table-header span,
.drs-dashboard .drs-record-row span {
  padding: 14px 18px !important;
  box-sizing: border-box !important;
}

.drs-dashboard .drs-record-row span:nth-child(6),
.drs-dashboard .table-header span:nth-child(6) {
  min-width: 130px !important;
  padding-right: 24px !important;
  white-space: normal !important;
}

.drs-dashboard .drs-record-row span:nth-child(7),
.drs-dashboard .table-header span:nth-child(7) {
  min-width: 170px !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  white-space: normal !important;
}

.drs-dashboard .drs-record-row span:nth-child(8),
.drs-dashboard .table-header span:nth-child(8) {
  min-width: 140px !important;
  padding-left: 24px !important;
  white-space: nowrap !important;
}

.drs-dashboard .drs-record-row span:nth-child(6) {
  font-weight: 900 !important;
}

.drs-dashboard .drs-record-row span:nth-child(7) strong {
  display: block !important;
  line-height: 1.15 !important;
  font-weight: 950 !important;
}

/* After Deal No. column removal, DRS table has 9 columns */
.drs-dashboard .table-header,
.drs-dashboard .drs-record-row {
  grid-template-columns:
    minmax(130px, 1fr)
    minmax(110px, 0.8fr)
    minmax(120px, 0.9fr)
    minmax(110px, 0.8fr)
    minmax(130px, 0.9fr)
    minmax(140px, 0.8fr)
    minmax(190px, 1.1fr)
    minmax(150px, 0.9fr)
    minmax(240px, 1.4fr) !important;
}

@media (max-width: 760px) {
  .drs-dashboard .table-header,
  .drs-dashboard .drs-record-row {
    min-width: 1150px !important;
  }

  .drs-dashboard .table-header span,
  .drs-dashboard .drs-record-row span {
    padding: 16px 20px !important;
  }

  .drs-dashboard .drs-record-row span:nth-child(6),
  .drs-dashboard .drs-record-row span:nth-child(7),
  .drs-dashboard .drs-record-row span:nth-child(8) {
    padding-left: 26px !important;
    padding-right: 26px !important;
  }
}

/* FINAL DRS table column spacing fix */
.drs-col-value,
.drs-col-status,
.drs-col-created {
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}

.drs-col-value {
  min-width: 150px !important;
  white-space: normal !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

.drs-col-status {
  min-width: 210px !important;
  white-space: normal !important;
  line-height: 1.15 !important;
}

.drs-col-status strong {
  display: block !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
}

.drs-col-created {
  min-width: 160px !important;
  white-space: nowrap !important;
  font-weight: 850 !important;
}

/* Force wider 9-column DRS grid after Deal No. removal */
.drs-record-row,
.drs-dashboard .drs-record-row,
.drs-dashboard .table-header {
  grid-template-columns:
    150px
    130px
    140px
    120px
    150px
    170px
    230px
    180px
    280px !important;
  column-gap: 0 !important;
}

.drs-record-row > span,
.drs-dashboard .table-header > span {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

@media (max-width: 760px) {
  .drs-dashboard .table-header,
  .drs-dashboard .drs-record-row,
  .drs-record-row {
    min-width: 1550px !important;
  }

  .drs-col-value,
  .drs-col-status,
  .drs-col-created {
    padding-left: 32px !important;
    padding-right: 32px !important;
  }
}

/* ============================================================
   DRS records table — desktop clean, mobile scrollable
   ============================================================ */

.drs-dashboard .table-header,
.drs-dashboard .drs-record-row {
  display: grid !important;
  grid-template-columns:
    minmax(115px, 0.9fr)   /* DRS No */
    minmax(90px, 0.7fr)    /* Buyer */
    minmax(90px, 0.7fr)    /* Supplier */
    minmax(90px, 0.7fr)    /* Seller */
    minmax(120px, 0.9fr)   /* Product */
    minmax(60px, 0.45fr)   /* Qty */
    minmax(120px, 0.85fr)  /* Value */
    minmax(150px, 1fr)     /* Status */
    minmax(125px, 0.85fr)  /* Created */
    minmax(310px, 1.7fr)   /* Actions */
    !important;
  align-items: center !important;
  column-gap: 0 !important;
}

.drs-dashboard .table-header > span,
.drs-dashboard .drs-record-row > span {
  min-width: 0 !important;
  padding: 14px 14px !important;
  box-sizing: border-box !important;
  line-height: 1.15 !important;
}

.drs-dashboard .table-header > span {
  color: #667085 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.drs-dashboard .drs-record-row > span {
  color: #101820 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

.drs-dashboard .drs-col-id strong {
  display: block !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

.drs-dashboard .drs-col-id small {
  display: block !important;
  margin-top: 5px !important;
  color: #667085 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.drs-dashboard .drs-col-value {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  font-weight: 950 !important;
}

.drs-dashboard .drs-col-status strong {
  display: block !important;
  max-width: 140px !important;
  white-space: normal !important;
  line-height: 1.12 !important;
  font-weight: 950 !important;
}

.drs-dashboard .drs-col-created {
  white-space: nowrap !important;
  font-weight: 850 !important;
}

.drs-dashboard .drs-col-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  padding-right: 16px !important;
}

.drs-dashboard .drs-col-actions form {
  display: inline-flex !important;
  margin: 0 !important;
}

.drs-dashboard .drs-col-actions .button,
.drs-dashboard .drs-col-actions button {
  min-height: 36px !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
}

/* Keep the records block inside the page on desktop */
.drs-dashboard .table-wrap,
.drs-dashboard .records-table,
.drs-dashboard .data-table,
.drs-dashboard .list-table {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* If the table is directly in the page without wrapper, this still protects it */
.drs-dashboard .table-header,
.drs-dashboard .drs-record-row {
  min-width: 1280px !important;
}

/* Desktop: allow full-width scroll only when needed */
@media (min-width: 1200px) {
  .drs-dashboard .table-header,
  .drs-dashboard .drs-record-row {
    min-width: 0 !important;
  }

  .drs-dashboard .drs-col-status strong {
    max-width: 160px !important;
  }
}

/* Tablet / phone */
@media (max-width: 900px) {
  .drs-dashboard .table-header,
  .drs-dashboard .drs-record-row {
    grid-template-columns:
      130px
      100px
      105px
      95px
      130px
      70px
      145px
      190px
      150px
      310px !important;
    min-width: 1425px !important;
  }

  .drs-dashboard .table-header > span,
  .drs-dashboard .drs-record-row > span {
    padding: 16px 18px !important;
  }

  .drs-dashboard .drs-record-row > span {
    font-size: 17px !important;
  }

  .drs-dashboard .drs-col-id strong {
    font-size: 20px !important;
  }

  .drs-dashboard .drs-col-status strong {
    max-width: 170px !important;
    font-size: 17px !important;
  }
}

/* Phone KPI/buttons tighter but readable */
@media (max-width: 760px) {
  .drs-dashboard .summary-grid,
  .drs-dashboard .kpi-grid,
  .drs-dashboard .stats-grid {
    grid-template-columns: repeat(3, minmax(92px, 1fr)) !important;
    gap: 8px !important;
  }

  .drs-dashboard .summary-card,
  .drs-dashboard .kpi-card,
  .drs-dashboard .stat-card {
    padding: 11px 10px !important;
    min-height: 94px !important;
    border-radius: 14px !important;
  }

  .drs-dashboard .summary-card span,
  .drs-dashboard .kpi-card span,
  .drs-dashboard .stat-card span {
    font-size: clamp(12px, 3.4vw, 15px) !important;
    font-weight: 950 !important;
    line-height: 1.12 !important;
  }

  .drs-dashboard .summary-card strong,
  .drs-dashboard .kpi-card strong,
  .drs-dashboard .stat-card strong {
    font-size: clamp(26px, 7.5vw, 38px) !important;
    font-weight: 950 !important;
    line-height: 1 !important;
  }

  .drs-create-button,
  .drs-storage-button,
  a.drs-create-button,
  a.drs-storage-button {
    width: 100% !important;
    min-height: 54px !important;
    font-size: clamp(18px, 5.6vw, 28px) !important;
  }
}

/* HARD RESET: DRS records table layout */
.drs-table-scroll {
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  border: 1px solid #dde3e9 !important;
  border-radius: 14px !important;
  background: #fff !important;
}

.drs-table-scroll .table-header,
.drs-table-scroll .drs-record-row {
  display: grid !important;
  grid-template-columns:
    145px   /* DRS */
    110px   /* Buyer */
    120px   /* Supplier */
    110px   /* Seller */
    140px   /* Product */
    70px    /* Qty */
    150px   /* Value */
    210px   /* Status */
    150px   /* Created */
    330px   /* Actions */ !important;
  min-width: 1535px !important;
  width: 1535px !important;
  align-items: center !important;
  column-gap: 0 !important;
}

.drs-table-scroll .table-header {
  background: #f7f1e7 !important;
  border-bottom: 1px solid #dde3e9 !important;
}

.drs-table-scroll .drs-record-row {
  border-bottom: 1px solid #dde3e9 !important;
}

.drs-table-scroll .table-header > span,
.drs-table-scroll .drs-record-row > span {
  display: block !important;
  min-width: 0 !important;
  padding: 18px 18px !important;
  box-sizing: border-box !important;
  line-height: 1.15 !important;
}

.drs-table-scroll .table-header > span {
  color: #667085 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.drs-table-scroll .drs-record-row > span {
  color: #101820 !important;
  font-size: 17px !important;
  font-weight: 850 !important;
}

.drs-table-scroll .drs-col-id strong {
  display: block !important;
  font-size: 19px !important;
  font-weight: 950 !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}

.drs-table-scroll .drs-col-id small {
  display: block !important;
  margin-top: 6px !important;
  color: #667085 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.drs-table-scroll .drs-col-value {
  white-space: nowrap !important;
  font-weight: 950 !important;
}

.drs-table-scroll .drs-col-status strong {
  display: block !important;
  white-space: normal !important;
  max-width: 170px !important;
  font-weight: 950 !important;
  line-height: 1.12 !important;
}

.drs-table-scroll .drs-col-created {
  white-space: nowrap !important;
  font-weight: 900 !important;
}

.drs-table-scroll .drs-col-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

.drs-table-scroll .drs-col-actions form {
  display: inline-flex !important;
  margin: 0 !important;
}

.drs-table-scroll .drs-col-actions .button,
.drs-table-scroll .drs-col-actions button {
  min-height: 38px !important;
  padding: 0 13px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
}

/* Desktop: table scrolls only if needed, no crushed columns */
@media (min-width: 1600px) {
  .drs-table-scroll .table-header,
  .drs-table-scroll .drs-record-row {
    width: 100% !important;
    min-width: 1535px !important;
  }
}

/* Phone: intentionally horizontal scroll, readable cells */
@media (max-width: 760px) {
  .drs-table-scroll {
    margin-left: -4px !important;
    margin-right: -4px !important;
  }

  .drs-table-scroll .table-header,
  .drs-table-scroll .drs-record-row {
    min-width: 1535px !important;
    width: 1535px !important;
  }

  .drs-table-scroll .table-header > span,
  .drs-table-scroll .drs-record-row > span {
    padding: 18px 20px !important;
  }

  .drs-table-scroll .drs-record-row > span {
    font-size: 17px !important;
  }
}

/* FINAL DRS REAL TABLE FIX */
.drs-real-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border: 1px solid #dde3e9 !important;
  border-radius: 14px !important;
  background: #fff !important;
}

.drs-real-table {
  width: 100% !important;
  min-width: 1280px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
}

.drs-real-table th,
.drs-real-table td {
  padding: 16px 14px !important;
  border-bottom: 1px solid #dde3e9 !important;
  text-align: left !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

.drs-real-table th {
  background: #f7f1e7 !important;
  color: #667085 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.drs-real-table td {
  color: #101820 !important;
  font-size: 16px !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
}

.drs-real-table th:nth-child(1),
.drs-real-table td:nth-child(1) { width: 130px !important; }

.drs-real-table th:nth-child(2),
.drs-real-table td:nth-child(2) { width: 95px !important; }

.drs-real-table th:nth-child(3),
.drs-real-table td:nth-child(3) { width: 105px !important; }

.drs-real-table th:nth-child(4),
.drs-real-table td:nth-child(4) { width: 95px !important; }

.drs-real-table th:nth-child(5),
.drs-real-table td:nth-child(5) { width: 125px !important; }

.drs-real-table th:nth-child(6),
.drs-real-table td:nth-child(6) { width: 65px !important; }

.drs-real-table th:nth-child(7),
.drs-real-table td:nth-child(7) { width: 135px !important; }

.drs-real-table th:nth-child(8),
.drs-real-table td:nth-child(8) { width: 180px !important; }

.drs-real-table th:nth-child(9),
.drs-real-table td:nth-child(9) { width: 145px !important; }

.drs-real-table th:nth-child(10),
.drs-real-table td:nth-child(10) { width: 305px !important; }

.drs-cell-id strong {
  display: block !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

.drs-cell-id small {
  display: block !important;
  margin-top: 5px !important;
  color: #667085 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.drs-cell-value {
  white-space: nowrap !important;
  font-weight: 950 !important;
}

.drs-cell-status strong {
  display: block !important;
  max-width: 150px !important;
  white-space: normal !important;
  line-height: 1.15 !important;
  font-weight: 950 !important;
}

.drs-cell-created {
  white-space: nowrap !important;
  font-weight: 900 !important;
}

.drs-cell-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

.drs-cell-actions form {
  display: inline-flex !important;
  margin: 0 !important;
}

.drs-cell-actions .button,
.drs-cell-actions button {
  min-height: 36px !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  .drs-real-table {
    min-width: 1280px !important;
  }

  .drs-real-table th,
  .drs-real-table td {
    padding: 17px 16px !important;
  }

  .drs-real-table td {
    font-size: 17px !important;
  }
}





/* Clean VTSA workflow action buttons - TINV page */
.vtsa-page-tinv a.button,
.vtsa-page-tinv button.button,
.vtsa-page-tinv a.primary,
.vtsa-page-tinv button.primary,
.vtsa-page-tinv .toolbar a,
.vtsa-page-tinv .inline-actions a,
.vtsa-page-tinv .inline-actions button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.vtsa-page-tinv a.primary,
.vtsa-page-tinv button.primary {
  background: #1e3a5f !important;
  border: 1px solid #1e3a5f !important;
  color: #ffffff !important;
}

.vtsa-page-tinv a.primary:hover,
.vtsa-page-tinv button.primary:hover {
  background: #12294a !important;
  border-color: #12294a !important;
}

.vtsa-page-tinv a.button,
.vtsa-page-tinv button.button,
.vtsa-page-tinv .toolbar a,
.vtsa-page-tinv .inline-actions a,
.vtsa-page-tinv .inline-actions button.button {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

.vtsa-page-tinv a.button:hover,
.vtsa-page-tinv button.button:hover,
.vtsa-page-tinv .toolbar a:hover,
.vtsa-page-tinv .inline-actions a:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

/* Keep TINV button groups neat */
.vtsa-page-tinv .toolbar,
.vtsa-page-tinv .inline-actions,
.vtsa-page-tinv .top-actions,
.vtsa-page-tinv .page-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
}

/* Force TINV table actions to fit Open / Preview / Edit / Download / Delete */
.tinv-page .row.tinv-record-row .loo-actions,
.tinv-table-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
  min-width: 430px !important;
}

.tinv-page .row.tinv-record-row .loo-actions a,
.tinv-page .row.tinv-record-row .loo-actions button,
.tinv-table-actions a,
.tinv-table-actions button,
.tinv-row-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  border: 1px solid #d7c8b7 !important;
  background: #fffaf3 !important;
  color: #101828 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

.tinv-inline-delete-form {
  display: inline-flex !important;
  margin: 0 !important;
  padding: 0 !important;
}

.tinv-delete-btn {
  border-color: #b42318 !important;
  background: #fff1f1 !important;
  color: #b42318 !important;
}

.tinv-delete-btn:hover {
  background: #b42318 !important;
  color: #ffffff !important;
}

/* TINV dashboard compact table/action fix */
.tinv-record-table-row {
  grid-template-columns:
    1.05fr   /* TINV No. */
    1.35fr   /* Buyer */
    1.25fr   /* Supplier */
    1.05fr   /* Product */
    0.55fr   /* Qty */
    0.95fr   /* Unit Price */
    1.20fr   /* Total */
    0.65fr   /* VAT */
    minmax(330px, 1.65fr) !important; /* Actions */
  column-gap: 14px !important;
}

.tinv-table-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.tinv-table-actions .tinv-row-btn,
.tinv-table-actions a,
.tinv-table-actions button {
  min-width: 0 !important;
  width: auto !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.tinv-inline-delete-form {
  display: inline-flex !important;
  margin: 0 !important;
  padding: 0 !important;
}

.tinv-delete-btn {
  color: #b42318 !important;
  border: 1px solid #ffb4ab !important;
  background: #fff5f3 !important;
  font-weight: 800 !important;
  padding: 0 10px !important;
  height: 34px !important;
  border-radius: 10px !important;
}

.tinv-delete-btn:hover {
  color: #ffffff !important;
  background: #b42318 !important;
  border-color: #b42318 !important;
}

@media (max-width: 1400px) {
  .tinv-record-table-row {
    grid-template-columns:
      1fr
      1.1fr
      1.05fr
      0.9fr
      0.45fr
      0.8fr
      1fr
      0.55fr
      minmax(300px, 1.45fr) !important;
    column-gap: 10px !important;
  }

  .tinv-table-actions .tinv-row-btn,
  .tinv-table-actions a,
  .tinv-table-actions button {
    padding: 0 9px !important;
    font-size: 13px !important;
  }
}

/* Deal-tool accent system
   Keep each workflow page visually tied to its Office Suite card/icon color. */
.drs-register-page,
.drs-new-page,
.vtsa-page-drs {
  --workflow-accent: #176b9d;
  --workflow-accent-dark: #12547b;
  --workflow-accent-soft: #cfefff;
  --workflow-accent-border: #176b9d;
}

.loo-workflow-page,
.vtsa-page-loo {
  --workflow-accent: #a94d32;
  --workflow-accent-dark: #843b25;
  --workflow-accent-soft: #ffd8cc;
  --workflow-accent-border: #a94d32;
}

.po-page,
.po-register-page,
.vtsa-page-po {
  --workflow-accent: #3D7D2A;
  --workflow-accent-dark: #2F6220;
  --workflow-accent-soft: #D7F4CE;
  --workflow-accent-border: #3D7D2A;
}

.pfi-page,
.vtsa-page-pfi {
  --workflow-accent: #8b3d91;
  --workflow-accent-dark: #6f2f73;
  --workflow-accent-soft: #f4d3f8;
  --workflow-accent-border: #8b3d91;
}

.ci-workflow-page,
.vtsa-page-ci {
  --workflow-accent: #3157a8;
  --workflow-accent-dark: #274584;
  --workflow-accent-soft: #d6e2ff;
  --workflow-accent-border: #3157a8;
}

.tinv-page,
.tinv-workflow-page,
.vtsa-page-tinv {
  --workflow-accent: #8a6200;
  --workflow-accent-dark: #6c4d00;
  --workflow-accent-soft: #ffe4a8;
  --workflow-accent-border: #8a6200;
}

.deals-page,
.deals-workflow-page,
.vtsa-page-deals {
  --workflow-accent: #5b35a6;
  --workflow-accent-dark: #472983;
  --workflow-accent-soft: #e6d7ff;
  --workflow-accent-border: #5b35a6;
}

.drs-register-page .drs-register-btn-primary,
.drs-register-page .drs-register-mini-btn.primary,
.loo-workflow-page .loo-actions .primary,
.loo-workflow-page .loo-filter-actions .primary,
.po-page .po-actions-top .po-create-button,
.po-page .po-actions-top a.primary,
.pfi-page .pfi-actions-top a.primary,
.ci-workflow-page .ci-actions .primary,
.ci-workflow-page .ci-filter-actions .primary,
.tinv-page .tinv-actions .primary,
.tinv-page .tinv-filter-actions .primary,
.vtsa-page-tinv a.primary,
.vtsa-page-tinv button.primary {
  background: var(--workflow-accent-soft) !important;
  border-color: var(--workflow-accent) !important;
  color: var(--workflow-accent) !important;
}

.drs-register-page .drs-register-btn-primary:hover,
.drs-register-page .drs-register-mini-btn.primary:hover,
.loo-workflow-page .loo-actions .primary:hover,
.loo-workflow-page .loo-filter-actions .primary:hover,
.po-page .po-actions-top .po-create-button:hover,
.po-page .po-actions-top a.primary:hover,
.pfi-page .pfi-actions-top a.primary:hover,
.ci-workflow-page .ci-actions .primary:hover,
.ci-workflow-page .ci-filter-actions .primary:hover,
.tinv-page .tinv-actions .primary:hover,
.tinv-page .tinv-filter-actions .primary:hover,
.vtsa-page-tinv a.primary:hover,
.vtsa-page-tinv button.primary:hover {
  background: var(--workflow-accent-dark) !important;
  border-color: var(--workflow-accent-dark) !important;
  color: #ffffff !important;
}

.loo-workflow-page .loo-tabs a.active,
.ci-workflow-page .ci-tabs a.active,
.pfi-page .pfi-tabs a.active,
.po-page .workflow-tabs a.active,
.drs-register-page .workflow-tabs a.active,
.tinv-page .tinv-tabs a.active {
  background: var(--workflow-accent-soft) !important;
  border-color: var(--workflow-accent) !important;
  color: var(--workflow-accent) !important;
}

.loo-workflow-page .loo-attention,
.ci-workflow-page .ci-attention,
.po-page .po-status-note,
.pfi-page .pfi-status-note,
.drs-register-page .drs-register-note {
  background: var(--workflow-accent-soft) !important;
  border-color: var(--workflow-accent-border) !important;
  color: var(--workflow-accent) !important;
}

.loo-workflow-page .loo-kpi-card.value strong,
.loo-workflow-page .loo-kpi-card.good strong,
.po-page .po-kpi-value strong,
.pfi-page .pfi-kpis article.value-kpi strong,
.ci-workflow-page .ci-kpi-card.value strong,
.ci-workflow-page .ci-kpi-card.good strong,
.tinv-page .tinv-kpi.value strong,
.tinv-page .tinv-kpi.good strong,
.drs-register-page .drs-register-value-kpis strong {
  color: var(--workflow-accent) !important;
}

.ci-workflow-page .ci-row-actions a.convert-tinv {
  border-color: var(--workflow-accent) !important;
  background: var(--workflow-accent-soft) !important;
  color: var(--workflow-accent) !important;
}

.ci-workflow-page .ci-row-actions a.convert-tinv:hover {
  border-color: var(--workflow-accent) !important;
  background: var(--workflow-accent) !important;
  color: #ffffff !important;
}

.ci-workflow-page .ci-table {
  min-width: 1080px;
}

.ci-workflow-page .ci-table-wrap {
  overflow-x: auto;
}

.ci-workflow-page .ci-table th,
.ci-workflow-page .ci-table td {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.ci-workflow-page .ci-table th:last-child,
.ci-workflow-page .ci-table td:last-child {
  width: 330px;
  min-width: 330px;
}

.ci-workflow-page .ci-row-actions {
  gap: 6px !important;
}

.ci-workflow-page .ci-row-actions a {
  padding: 0 9px !important;
}

/* Keep record rows on a single line: long buyer/product names truncate with an
   ellipsis instead of wrapping to two lines (uneven row heights). The actions
   column is exempt via mobile_responsive.css td:last-child { overflow: visible }.
   DRS is included so its Buyer/Supplier/Seller columns match CI's single-line look. */
@media (min-width: 901px) {
  .ci-workflow-page .ci-table th,
  .ci-workflow-page .ci-table td,
  .drs-workflow-page .drs-table th,
  .drs-workflow-page .drs-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* PO dashboard buttons — match workflow pill style using PO page color */
.vtsa-page-po .po-page .po-actions-top a,
.vtsa-page-po .po-page .po-actions-top button,
.vtsa-page-po .po-page .po-table-actions a,
.vtsa-page-po .po-page .po-table-actions button,
.vtsa-page-po .po-page .po-row-actions a,
.vtsa-page-po .po-page .po-row-actions button,
.vtsa-page-po .po-page a.button,
.vtsa-page-po .po-page button.button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  text-align: center !important;
  text-decoration: none !important;
  box-shadow: none !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

.vtsa-page-po .po-page .po-actions-top a.primary,
.vtsa-page-po .po-page .po-actions-top button.primary,
.vtsa-page-po .po-page .po-table-actions a.primary,
.vtsa-page-po .po-page .po-table-actions button.primary,
.vtsa-page-po .po-page .po-row-actions a.primary,
.vtsa-page-po .po-page .po-row-actions button.primary,
.vtsa-page-po .po-page a.primary,
.vtsa-page-po .po-page button.primary {
  border-color: var(--workflow-accent, #3d7d2a) !important;
  background: var(--workflow-accent-soft, #d7f4ce) !important;
  color: var(--workflow-accent, #3d7d2a) !important;
}

.vtsa-page-po .po-page .po-actions-top a:hover,
.vtsa-page-po .po-page .po-actions-top button:hover,
.vtsa-page-po .po-page .po-table-actions a:hover,
.vtsa-page-po .po-page .po-table-actions button:hover,
.vtsa-page-po .po-page .po-row-actions a:hover,
.vtsa-page-po .po-page .po-row-actions button:hover,
.vtsa-page-po .po-page a.button:hover,
.vtsa-page-po .po-page button.button:hover {
  border-color: var(--workflow-accent, #3d7d2a) !important;
  background: var(--workflow-accent-soft, #d7f4ce) !important;
  color: var(--workflow-accent, #3d7d2a) !important;
}

.vtsa-page-po .po-page .po-actions-top a.primary:hover,
.vtsa-page-po .po-page .po-actions-top button.primary:hover,
.vtsa-page-po .po-page .po-table-actions a.primary:hover,
.vtsa-page-po .po-page .po-table-actions button.primary:hover,
.vtsa-page-po .po-page .po-row-actions a.primary:hover,
.vtsa-page-po .po-page .po-row-actions button.primary:hover,
.vtsa-page-po .po-page a.primary:hover,
.vtsa-page-po .po-page button.primary:hover {
  border-color: var(--workflow-accent-dark, #2f6220) !important;
  background: var(--workflow-accent-dark, #2f6220) !important;
  color: #ffffff !important;
}





/* =========================================================
   PDF STUDIO — REAL pdf-clean-hero DocSign-style purple fix
   2026-05-16
   ========================================================= */

:root {
  --pdf-purple: #4a6fa5;
  --pdf-purple-dark: #35507a;
  --pdf-purple-soft: #f4edff;
  --pdf-purple-border: #d8c9ff;
  --pdf-ink: #050507;
  --pdf-muted: #66748a;
  --pdf-line: #dbe8f3;
  --pdf-bg: #f7f5f1;
}

/* Let this page use full DocSign-style width inside the office shell. */
main.shell:has(.pdf-studio),
.shell:has(.pdf-studio) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 26px 30px 80px !important;
  box-sizing: border-box !important;
}

body:has(.pdf-studio) {
  background: var(--pdf-bg) !important;
}

.pdf-studio,
.pdf-studio.pdf-studio-clean {
  width: min(1680px, calc(100vw - 60px)) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* This is the real active header class. */
.pdf-clean-hero {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 44px !important;
  min-height: 318px !important;
  padding: 58px 270px 58px 300px !important;
  margin: 0 0 34px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 34px !important;
  background:
    radial-gradient(circle at 138px 154px, rgba(74, 111, 165, 0.17), rgba(74, 111, 165, 0.06) 36%, transparent 64%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 24px 72px rgba(33, 52, 74, 0.10) !important;
  overflow: hidden !important;
}

/* Purple icon tile */
.pdf-clean-hero::before {
  content: "" !important;
  position: absolute !important;
  left: 96px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 148px !important;
  height: 148px !important;
  border-radius: 34px !important;
  background: linear-gradient(145deg, #fbf8ff 0%, #eadfff 100%) !important;
  border: 1px solid rgba(74, 111, 165, 0.18) !important;
  box-shadow:
    0 18px 44px rgba(74, 111, 165, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  z-index: 1 !important;
}

/* PDF + edit icon */
.pdf-clean-hero::after {
  content: "" !important;
  position: absolute !important;
  left: 126px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 88px !important;
  height: 88px !important;
  z-index: 2 !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%237446d8' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M27 14h30l17 17v42a8 8 0 0 1-8 8H27a8 8 0 0 1-8-8V22a8 8 0 0 1 8-8Z'/%3E%3Cpath d='M57 14v17h17'/%3E%3Cpath d='M33 44h21'/%3E%3Cpath d='M33 55h26'/%3E%3Cpath d='M33 66h13'/%3E%3Cpath d='M59 68l14-14 7 7-14 14-9 2 2-9Z'/%3E%3Cpath d='M70 57l7 7'/%3E%3C/g%3E%3C/svg%3E") !important;
}

.pdf-clean-hero > div {
  position: relative !important;
  z-index: 3 !important;
  max-width: 1180px !important;
}

.pdf-clean-hero .eyeline,
.pdf-studio .eyeline {
  margin: 0 0 12px !important;
  color: var(--pdf-purple) !important;
  font-size: clamp(18px, 1.55vw, 34px) !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
}

.pdf-clean-hero h1 {
  margin: 0 !important;
  color: var(--pdf-ink) !important;
  font-size: clamp(72px, 7.4vw, 142px) !important;
  line-height: 0.84 !important;
  letter-spacing: -0.09em !important;
  font-weight: 950 !important;
  transform: scaleX(0.98) !important;
  transform-origin: left center !important;
}

.pdf-clean-hero p:not(.eyeline) {
  max-width: 1260px !important;
  margin: 28px 0 0 !important;
  color: var(--pdf-muted) !important;
  font-size: clamp(21px, 1.75vw, 34px) !important;
  line-height: 1.28 !important;
  font-weight: 560 !important;
}

.pdf-clean-hero .button-secondary,
.pdf-clean-hero a.button-secondary {
  position: absolute !important;
  top: 44px !important;
  right: 52px !important;
  z-index: 4 !important;
  min-width: 190px !important;
  min-height: 54px !important;
  padding: 0 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 16px !important;
  border: 1px solid var(--pdf-line) !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  box-shadow: 0 12px 34px rgba(33, 52, 74, 0.08) !important;
}

/* Cards below */
.pdf-studio .upload-card {
  position: relative !important;
  overflow: hidden !important;
  min-height: 190px !important;
  padding: 38px 42px !important;
  margin: 0 0 26px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 30px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 26px !important;
  background: #ffffff !important;
  box-shadow: 0 20px 56px rgba(33, 52, 74, 0.08) !important;
}

.pdf-studio .upload-card .badge,
.pdf-studio .badge,
.pdf-studio .step-label {
  background: var(--pdf-purple-soft) !important;
  color: var(--pdf-purple) !important;
  border: 1px solid var(--pdf-purple-border) !important;
  border-radius: 999px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.pdf-studio .button-primary,
.pdf-studio button.button-primary,
.pdf-studio #uploadButton,
.pdf-studio #runActionButton {
  border: 0 !important;
  background: linear-gradient(180deg, var(--pdf-purple) 0%, var(--pdf-purple-dark) 100%) !important;
  color: #ffffff !important;
  border-radius: 18px !important;
  font-weight: 900 !important;
  min-height: 56px !important;
  padding: 0 30px !important;
  box-shadow:
    0 16px 38px rgba(74, 111, 165, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
}

.pdf-studio .button-secondary,
.pdf-studio button.button-secondary {
  border: 1px solid var(--pdf-line) !important;
  background: #ffffff !important;
  color: #111827 !important;
  border-radius: 16px !important;
  font-weight: 850 !important;
  min-height: 52px !important;
  box-shadow: 0 10px 28px rgba(33, 52, 74, 0.06) !important;
}

.pdf-studio details.recent-outputs,
.pdf-studio .recent-outputs {
  margin-top: 0 !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 26px !important;
  background: #ffffff !important;
  box-shadow: 0 20px 56px rgba(33, 52, 74, 0.08) !important;
  overflow: hidden !important;
}

.pdf-studio details.recent-outputs summary,
.pdf-studio .recent-outputs summary,
.pdf-studio .recent-outputs h2 {
  min-height: 76px !important;
  padding: 0 28px !important;
  display: flex !important;
  align-items: center !important;
  color: #111827 !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
}

/* Hide raw file input row at the bottom. JS still triggers it from the styled button. */
.pdf-action-form {
  display: none !important;
}

.pdf-editor-shell {
  display: grid !important;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr) !important;
  gap: 26px !important;
  align-items: stretch !important;
}

.pdf-editor-shell.hidden {
  display: none !important;
}

.pdf-studio .panel,
.pdf-studio .sidebar,
.pdf-studio aside,
.pdf-studio .pdf-preview-panel,
.pdf-studio .preview-panel,
.pdf-studio .workspace,
.pdf-studio .pdf-canvas-wrap {
  border: 1px solid var(--pdf-line) !important;
  border-radius: 24px !important;
  background: #ffffff !important;
  box-shadow: 0 20px 56px rgba(33, 52, 74, 0.08) !important;
}

.pdf-workflow-steps {
  display: none !important;
}

@media (max-width: 1100px) {
  .pdf-clean-hero {
    display: block !important;
    min-height: auto !important;
    padding: 164px 30px 34px !important;
  }

  .pdf-clean-hero::before {
    left: 30px !important;
    top: 30px !important;
    transform: none !important;
    width: 104px !important;
    height: 104px !important;
    border-radius: 28px !important;
  }

  .pdf-clean-hero::after {
    left: 52px !important;
    top: 52px !important;
    transform: none !important;
    width: 62px !important;
    height: 62px !important;
  }

  .pdf-clean-hero h1 {
    font-size: clamp(56px, 14vw, 92px) !important;
    line-height: 0.9 !important;
  }

  .pdf-clean-hero .button-secondary,
  .pdf-clean-hero a.button-secondary {
    position: static !important;
    width: 100% !important;
    margin-top: 24px !important;
  }

  .pdf-studio .upload-card {
    grid-template-columns: 1fr !important;
  }
}


/* =========================================================
   PDF STUDIO — uploaded editor workspace tightening
   2026-05-16
   ========================================================= */

:root {
  --pdf-purple: #4a6fa5;
  --pdf-purple-dark: #35507a;
  --pdf-purple-soft: #f4edff;
  --pdf-purple-border: #d8c9ff;
  --pdf-ink: #050507;
  --pdf-muted: #66748a;
  --pdf-line: #dbe8f3;
  --pdf-bg: #f7f5f1;
}

body:has(.pdf-studio) {
  background: var(--pdf-bg) !important;
}

main.shell:has(.pdf-studio),
.shell:has(.pdf-studio) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 26px 30px 80px !important;
  box-sizing: border-box !important;
}

.pdf-studio,
.pdf-studio.pdf-studio-clean {
  width: min(1680px, calc(100vw - 60px)) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Uploaded mode: compact the hero so the editor gets the screen. */
.pdf-studio.pdf-studio-uploaded .pdf-clean-hero {
  min-height: 174px !important;
  padding: 30px 250px 30px 188px !important;
  margin-bottom: 24px !important;
  border-radius: 30px !important;
  background:
    radial-gradient(circle at 92px 84px, rgba(74, 111, 165, 0.15), rgba(74, 111, 165, 0.05) 34%, transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 18px 48px rgba(33, 52, 74, 0.08) !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero::before {
  left: 48px !important;
  width: 106px !important;
  height: 106px !important;
  border-radius: 30px !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero::after {
  left: 70px !important;
  width: 62px !important;
  height: 62px !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero .eyeline {
  margin-bottom: 8px !important;
  font-size: clamp(15px, 1.1vw, 22px) !important;
  letter-spacing: 0.18em !important;
  color: var(--pdf-purple) !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero h1 {
  font-size: clamp(54px, 5vw, 86px) !important;
  line-height: 0.86 !important;
  letter-spacing: -0.085em !important;
  margin: 0 !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero p:not(.eyeline) {
  margin-top: 14px !important;
  max-width: 1000px !important;
  font-size: clamp(16px, 1.25vw, 22px) !important;
  line-height: 1.3 !important;
  color: var(--pdf-muted) !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero .button-secondary,
.pdf-studio.pdf-studio-uploaded .pdf-clean-hero a.button-secondary {
  top: 32px !important;
  right: 38px !important;
  min-height: 50px !important;
  min-width: 178px !important;
  border-radius: 16px !important;
}

/* Main uploaded workspace: tools left, preview right. */
.pdf-studio-workspace {
  display: grid !important;
  grid-template-columns: 360px minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: start !important;
  margin-top: 0 !important;
}

.pdf-studio-tools-card,
.pdf-studio-preview-card,
.pdf-studio-pages-card,
.pdf-studio-recent-card {
  border: 1px solid var(--pdf-line) !important;
  background: #ffffff !important;
  box-shadow: 0 18px 48px rgba(33, 52, 74, 0.07) !important;
}

/* Tools sidebar */
.pdf-studio-tools-card {
  position: sticky !important;
  top: 96px !important;
  border-radius: 26px !important;
  padding: 22px !important;
  min-height: auto !important;
}

.pdf-studio-tools-card h1,
.pdf-studio-tools-card h2,
.pdf-studio-tools-card h3,
.pdf-studio-tools-card > strong,
.pdf-studio-tools-card > .title {
  color: var(--pdf-purple) !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  font-weight: 950 !important;
  font-size: 25px !important;
  margin: 0 0 16px !important;
}

/* Tool tabs / accordion buttons */
.pdf-studio-tools-card button,
.pdf-studio-tools-card summary,
.pdf-studio-tools-card .tool-button,
.pdf-studio-tools-card [role="button"] {
  border: 1px solid var(--pdf-line) !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  color: #111827 !important;
  min-height: 48px !important;
  padding: 0 16px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

.pdf-studio-tools-card button:hover,
.pdf-studio-tools-card summary:hover,
.pdf-studio-tools-card .tool-button:hover {
  border-color: var(--pdf-purple-border) !important;
  color: var(--pdf-purple-dark) !important;
}

.pdf-studio-tools-card button[aria-expanded="true"],
.pdf-studio-tools-card details[open] > summary,
.pdf-studio-tools-card .active,
.pdf-studio-tools-card [aria-selected="true"] {
  background: var(--pdf-purple-soft) !important;
  border-color: var(--pdf-purple-border) !important;
  color: var(--pdf-purple-dark) !important;
}

/* Selected tool options */
.pdf-studio-tools-card details,
.pdf-studio-tools-card fieldset,
.pdf-studio-tools-card .tool-panel,
.pdf-studio-tools-card .action-panel {
  border-radius: 18px !important;
  border-color: var(--pdf-line) !important;
  margin-top: 10px !important;
  padding: 14px !important;
}

/* Preview takes the main focus. */
.pdf-studio-preview-card {
  border-radius: 26px !important;
  padding: 22px !important;
  min-height: calc(100vh - 310px) !important;
  overflow: hidden !important;
}

.pdf-studio-preview-card > h1,
.pdf-studio-preview-card > h2,
.pdf-studio-preview-card > h3,
.pdf-studio-preview-card > strong {
  margin: 0 0 8px !important;
  font-size: 15px !important;
  color: #111827 !important;
}

.pdf-studio-preview-card button {
  border: 1px solid var(--pdf-line) !important;
  background: #ffffff !important;
  color: #111827 !important;
  border-radius: 14px !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  font-weight: 850 !important;
}

.pdf-studio-preview-card button:hover {
  border-color: var(--pdf-purple-border) !important;
  color: var(--pdf-purple-dark) !important;
}

/* PDF canvas/page centered and cleaner */
.pdf-studio-preview-card canvas,
.pdf-studio-preview-card .pdf-page,
.pdf-studio-preview-card .page-preview {
  display: block !important;
  margin: 14px auto !important;
  max-width: 100% !important;
  border-radius: 4px !important;
  box-shadow: 0 16px 44px rgba(17, 24, 39, 0.16) !important;
}

.pdf-studio-preview-card img {
  max-width: 100% !important;
}

/* Pages/selection controls become an internal footer below the preview. */
.pdf-studio-pages-card {
  margin-top: 18px !important;
  border-radius: 22px !important;
  padding: 18px !important;
  box-shadow: none !important;
  background: #fbfdff !important;
}

.pdf-studio-pages-card h1,
.pdf-studio-pages-card h2,
.pdf-studio-pages-card h3,
.pdf-studio-pages-card strong {
  margin-top: 0 !important;
}

/* Recent files out of the main editing workspace. */
.pdf-studio.pdf-studio-uploaded .pdf-studio-recent-card,
.pdf-studio.pdf-studio-uploaded details.recent-outputs,
.pdf-studio.pdf-studio-uploaded .recent-outputs {
  margin-top: 24px !important;
  border-radius: 24px !important;
  opacity: 0.85 !important;
}

/* Hide the raw fallback file chooser strip. */
.pdf-studio-raw-upload-hidden,
.pdf-action-form.pdf-studio-raw-upload-hidden,
input[type="file"].pdf-studio-raw-upload-hidden {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Buttons retain purple only for primary actions. */
.pdf-studio .button-primary,
.pdf-studio button.button-primary,
.pdf-studio #uploadButton,
.pdf-studio #runActionButton {
  border: 0 !important;
  background: linear-gradient(180deg, var(--pdf-purple) 0%, var(--pdf-purple-dark) 100%) !important;
  color: #ffffff !important;
  border-radius: 18px !important;
  font-weight: 900 !important;
  min-height: 54px !important;
  padding: 0 28px !important;
  box-shadow:
    0 16px 36px rgba(74, 111, 165, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.pdf-studio .button-secondary,
.pdf-studio button.button-secondary {
  border: 1px solid var(--pdf-line) !important;
  background: #ffffff !important;
  color: #111827 !important;
  border-radius: 16px !important;
  font-weight: 850 !important;
  min-height: 50px !important;
  box-shadow: 0 10px 24px rgba(33, 52, 74, 0.05) !important;
}

@media (max-width: 1100px) {
  .pdf-studio-workspace {
    grid-template-columns: 1fr !important;
  }

  .pdf-studio-tools-card {
    position: static !important;
  }

  .pdf-studio.pdf-studio-uploaded .pdf-clean-hero {
    padding: 138px 26px 30px !important;
  }

  .pdf-studio.pdf-studio-uploaded .pdf-clean-hero::before {
    left: 26px !important;
    top: 26px !important;
    transform: none !important;
    width: 88px !important;
    height: 88px !important;
  }

  .pdf-studio.pdf-studio-uploaded .pdf-clean-hero::after {
    left: 44px !important;
    top: 44px !important;
    transform: none !important;
    width: 52px !important;
    height: 52px !important;
  }

  .pdf-studio.pdf-studio-uploaded .pdf-clean-hero .button-secondary,
  .pdf-studio.pdf-studio-uploaded .pdf-clean-hero a.button-secondary {
    position: static !important;
    width: 100% !important;
    margin-top: 18px !important;
  }
}


/* =========================================================
   PDF STUDIO — force uploaded workspace layout
   2026-05-16
   ========================================================= */

.pdf-studio.pdf-studio-uploaded {
  width: min(1680px, calc(100vw - 60px)) !important;
  max-width: none !important;
  margin: 0 auto !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero {
  min-height: 170px !important;
  padding: 30px 245px 30px 188px !important;
  margin-bottom: 22px !important;
  border-radius: 30px !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero::before {
  left: 48px !important;
  width: 106px !important;
  height: 106px !important;
  border-radius: 30px !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero::after {
  left: 70px !important;
  width: 62px !important;
  height: 62px !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero h1 {
  font-size: clamp(52px, 5vw, 86px) !important;
  line-height: 0.86 !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero .eyeline {
  font-size: clamp(15px, 1.1vw, 22px) !important;
}

.pdf-studio.pdf-studio-uploaded .pdf-clean-hero p:not(.eyeline) {
  margin-top: 12px !important;
  max-width: 980px !important;
  font-size: clamp(16px, 1.2vw, 22px) !important;
  line-height: 1.28 !important;
}

.pdf-studio-workspace {
  display: grid !important;
  grid-template-columns: 360px minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: start !important;
  margin-top: 0 !important;
}

.pdf-studio-tools-card {
  grid-column: 1 !important;
  position: sticky !important;
  top: 92px !important;
  align-self: start !important;
  border-radius: 24px !important;
  padding: 22px !important;
  min-height: auto !important;
  max-height: calc(100vh - 120px) !important;
  overflow: auto !important;
}

.pdf-studio-preview-card {
  grid-column: 2 !important;
  border-radius: 24px !important;
  padding: 22px !important;
  min-height: calc(100vh - 300px) !important;
  overflow: auto !important;
}

.pdf-studio-pages-card {
  margin-top: 18px !important;
  border-radius: 20px !important;
  padding: 16px !important;
  background: #fbfdff !important;
  box-shadow: none !important;
}

.pdf-studio-tools-card,
.pdf-studio-preview-card,
.pdf-studio-pages-card {
  border: 1px solid #dbe8f3 !important;
  background: #ffffff !important;
  box-shadow: 0 18px 48px rgba(33, 52, 74, 0.07) !important;
}

.pdf-studio-tools-card > h1,
.pdf-studio-tools-card > h2,
.pdf-studio-tools-card > h3,
.pdf-studio-tools-card > .eyeline,
.pdf-studio-tools-card strong:first-child {
  color: #4a6fa5 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  font-weight: 950 !important;
}

.pdf-studio-tools-card button,
.pdf-studio-tools-card summary {
  border-radius: 14px !important;
  min-height: 44px !important;
}

.pdf-studio-preview-card canvas,
.pdf-studio-preview-card img,
.pdf-studio-preview-card .pdf-page,
.pdf-studio-preview-card .page-preview {
  display: block !important;
  margin: 14px auto !important;
  max-width: 100% !important;
}

.pdf-studio-recent-card {
  margin-top: 22px !important;
  opacity: 0.82 !important;
}

.pdf-studio-hidden-file-input {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 1100px) {
  .pdf-studio-workspace {
    grid-template-columns: 1fr !important;
  }

  .pdf-studio-tools-card,
  .pdf-studio-preview-card {
    grid-column: 1 !important;
    position: static !important;
    max-height: none !important;
  }
}

/* =========================================================
   PDF STUDIO — direct workspace rewrite
   2026-05-16
   ========================================================= */

:root {
  --pdf-purple: #4a6fa5;
  --pdf-purple-dark: #35507a;
  --pdf-purple-soft: #f4edff;
  --pdf-purple-border: #d8c9ff;
  --pdf-ink: #050507;
  --pdf-muted: #66748a;
  --pdf-line: #dbe8f3;
  --pdf-bg: #f7f5f1;
}

body:has(.pdf-studio) {
  background: var(--pdf-bg) !important;
}

main.shell:has(.pdf-studio),
.shell:has(.pdf-studio) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 26px 30px 80px !important;
  box-sizing: border-box !important;
}

.pdf-studio {
  width: min(1680px, calc(100vw - 60px)) !important;
  max-width: none !important;
  margin: 0 auto !important;
}

.pdf-clean-hero {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 44px !important;
  min-height: 300px !important;
  padding: 54px 260px 54px 290px !important;
  margin: 0 0 28px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 34px !important;
  background:
    radial-gradient(circle at 138px 146px, rgba(74, 111, 165, 0.17), rgba(74, 111, 165, 0.06) 36%, transparent 64%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 24px 72px rgba(33, 52, 74, 0.10) !important;
  overflow: hidden !important;
}

.pdf-clean-hero::before {
  content: "" !important;
  position: absolute !important;
  left: 94px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 148px !important;
  height: 148px !important;
  border-radius: 34px !important;
  background: linear-gradient(145deg, #fbf8ff 0%, #eadfff 100%) !important;
  border: 1px solid rgba(74, 111, 165, 0.18) !important;
  box-shadow: 0 18px 44px rgba(74, 111, 165, 0.16), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

.pdf-clean-hero::after {
  content: "" !important;
  position: absolute !important;
  left: 126px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 84px !important;
  height: 84px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%237446d8' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M27 14h30l17 17v42a8 8 0 0 1-8 8H27a8 8 0 0 1-8-8V22a8 8 0 0 1 8-8Z'/%3E%3Cpath d='M57 14v17h17'/%3E%3Cpath d='M33 44h21'/%3E%3Cpath d='M33 55h26'/%3E%3Cpath d='M33 66h13'/%3E%3Cpath d='M59 68l14-14 7 7-14 14-9 2 2-9Z'/%3E%3Cpath d='M70 57l7 7'/%3E%3C/g%3E%3C/svg%3E") !important;
}

.pdf-clean-hero > div {
  position: relative !important;
  z-index: 2 !important;
  max-width: 1180px !important;
}

.pdf-clean-hero .eyeline,
.pdf-panel-title .eyeline {
  margin: 0 0 12px !important;
  color: var(--pdf-purple) !important;
  font-size: clamp(18px, 1.55vw, 34px) !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
}

.pdf-clean-hero h1 {
  margin: 0 !important;
  color: var(--pdf-ink) !important;
  font-size: clamp(72px, 7.4vw, 142px) !important;
  line-height: 0.84 !important;
  letter-spacing: -0.09em !important;
  font-weight: 950 !important;
  transform: scaleX(0.98) !important;
  transform-origin: left center !important;
}

.pdf-clean-hero p:not(.eyeline) {
  max-width: 1260px !important;
  margin: 28px 0 0 !important;
  color: var(--pdf-muted) !important;
  font-size: clamp(21px, 1.75vw, 34px) !important;
  line-height: 1.28 !important;
  font-weight: 560 !important;
}

.pdf-clean-hero .button-secondary {
  position: absolute !important;
  top: 44px !important;
  right: 52px !important;
  z-index: 4 !important;
}

.pdf-upload-card,
.pdf-result-card,
.pdf-error-card,
.recent-outputs,
.pdf-tools-panel,
.pdf-preview-panel {
  border: 1px solid var(--pdf-line) !important;
  background: #ffffff !important;
  border-radius: 26px !important;
  box-shadow: 0 20px 56px rgba(33, 52, 74, 0.08) !important;
}

.pdf-upload-card {
  min-height: 190px !important;
  padding: 38px 42px !important;
  margin-bottom: 26px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 30px !important;
}

.pdf-step-pill {
  display: inline-flex !important;
  align-items: center !important;
  height: 28px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  background: var(--pdf-purple-soft) !important;
  border: 1px solid var(--pdf-purple-border) !important;
  color: var(--pdf-purple) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em !important;
}

.pdf-upload-card h2 {
  margin: 10px 0 6px !important;
  font-size: 24px !important;
}

.pdf-upload-actions,
.pdf-result-actions,
.pdf-tool-actions,
.pdf-preview-controls,
.pdf-page-actions {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

.pdf-editor-shell {
  display: grid !important;
  grid-template-columns: 360px minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: start !important;
}

.pdf-editor-shell.hidden {
  display: none !important;
}

.pdf-tools-panel {
  position: sticky !important;
  top: 96px !important;
  padding: 22px !important;
  max-height: calc(100vh - 120px) !important;
  overflow: auto !important;
}

.pdf-panel-title h2 {
  margin: 0 0 18px !important;
}

.pdf-tool-tabs {
  display: grid !important;
  gap: 10px !important;
  margin-bottom: 18px !important;
}

.pdf-tool-tab {
  width: 100% !important;
  min-height: 48px !important;
  border-radius: 16px !important;
  border: 1px solid var(--pdf-line) !important;
  background: #ffffff !important;
  color: #111827 !important;
  text-align: left !important;
  padding: 0 16px !important;
  font-weight: 850 !important;
}

.pdf-tool-tab.active {
  background: var(--pdf-purple-soft) !important;
  border-color: var(--pdf-purple-border) !important;
  color: var(--pdf-purple-dark) !important;
}

.pdf-tool-section {
  display: none !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 18px !important;
  padding: 16px !important;
}

.pdf-tool-section.active {
  display: block !important;
}

.pdf-tool-section h3 {
  margin: 0 0 8px !important;
}

.pdf-tool-section label {
  display: grid !important;
  gap: 6px !important;
  margin: 12px 0 !important;
}

.pdf-tool-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

.pdf-sidebar-footer {
  margin-top: 18px !important;
  display: grid !important;
  gap: 10px !important;
}

.pdf-preview-panel {
  padding: 22px !important;
  min-height: calc(100vh - 300px) !important;
  overflow: hidden !important;
}

.pdf-preview-header {
  display: flex !important;
  justify-content: space-between !important;
  gap: 18px !important;
  align-items: flex-start !important;
  margin-bottom: 16px !important;
}

.pdf-preview-header h2 {
  margin: 0 0 4px !important;
}

.pdf-preview-body {
  display: grid !important;
  grid-template-columns: 140px minmax(0, 1fr) !important;
  gap: 18px !important;
  min-height: 720px !important;
  background: #f8fafc !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 22px !important;
  padding: 18px !important;
}

.pdf-thumbnails {
  border-radius: 16px !important;
  background: #ffffff !important;
  border: 1px solid var(--pdf-line) !important;
  overflow: auto !important;
}

.pdf-document-stage {
  position: relative !important;
  display: grid !important;
  place-items: start center !important;
  overflow: auto !important;
  border-radius: 16px !important;
  background: #eef2f7 !important;
  padding: 24px !important;
}

#pdfCanvas {
  max-width: 100% !important;
  box-shadow: 0 16px 44px rgba(17, 24, 39, 0.18) !important;
  background: #ffffff !important;
}

.pdf-empty-preview {
  min-height: 360px !important;
  display: grid !important;
  place-content: center !important;
  text-align: center !important;
  color: var(--pdf-muted) !important;
}

.pdf-page-footer {
  margin-top: 16px !important;
  display: flex !important;
  justify-content: space-between !important;
  gap: 18px !important;
  align-items: center !important;
  border: 1px solid var(--pdf-line) !important;
  background: #fbfdff !important;
  border-radius: 20px !important;
  padding: 16px !important;
}

.recent-outputs {
  margin-top: 26px !important;
  overflow: hidden !important;
}

.recent-outputs summary {
  min-height: 76px !important;
  padding: 0 28px !important;
  display: flex !important;
  align-items: center !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

.recent-output-list {
  padding: 0 28px 24px !important;
}

.pdf-action-form {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
}

.pdf-studio .button-primary,
.pdf-studio button.button-primary {
  border: 0 !important;
  background: linear-gradient(180deg, var(--pdf-purple) 0%, var(--pdf-purple-dark) 100%) !important;
  color: #ffffff !important;
  border-radius: 18px !important;
  font-weight: 900 !important;
  min-height: 54px !important;
  padding: 0 28px !important;
  box-shadow: 0 16px 36px rgba(74, 111, 165, 0.20), inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

.pdf-studio .button-secondary,
.pdf-studio button.button-secondary {
  border: 1px solid var(--pdf-line) !important;
  background: #ffffff !important;
  color: #111827 !important;
  border-radius: 16px !important;
  font-weight: 850 !important;
  min-height: 50px !important;
  padding: 0 20px !important;
  box-shadow: 0 10px 24px rgba(33, 52, 74, 0.05) !important;
}

.pdf-studio input,
.pdf-studio select,
.pdf-studio textarea {
  border: 1px solid var(--pdf-line) !important;
  border-radius: 14px !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  background: #ffffff !important;
}

@media (max-width: 1100px) {
  .pdf-clean-hero {
    display: block !important;
    min-height: auto !important;
    padding: 164px 30px 34px !important;
  }

  .pdf-clean-hero::before {
    left: 30px !important;
    top: 30px !important;
    transform: none !important;
    width: 104px !important;
    height: 104px !important;
  }

  .pdf-clean-hero::after {
    left: 52px !important;
    top: 52px !important;
    transform: none !important;
    width: 62px !important;
    height: 62px !important;
  }

  .pdf-clean-hero .button-secondary {
    position: static !important;
    width: 100% !important;
    margin-top: 24px !important;
  }

  .pdf-upload-card,
  .pdf-editor-shell,
  .pdf-preview-body {
    grid-template-columns: 1fr !important;
  }

  .pdf-tools-panel {
    position: static !important;
    max-height: none !important;
  }
}


/* PDF Studio upload button repair — keep real file inputs clickable by JS */
.pdf-action-form {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

.pdf-studio #uploadButton:focus,
.pdf-studio #uploadButton:focus-visible {
  outline: none !important;
  box-shadow:
    0 16px 36px rgba(74, 111, 165, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

/* =========================================================
   PDF STUDIO — final tight working layout override
   2026-05-16
   CSS-only. Do not change JS/template IDs.
   ========================================================= */

:root {
  --pdf-purple: #4a6fa5;
  --pdf-purple-dark: #35507a;
  --pdf-purple-soft: #f4edff;
  --pdf-purple-border: #d8c9ff;
  --pdf-ink: #050507;
  --pdf-muted: #657288;
  --pdf-line: #dbe8f3;
  --pdf-bg: #f7f5f1;
}

/* Page shell */
body:has(.pdf-studio) {
  background: var(--pdf-bg) !important;
}

main.shell:has(.pdf-studio),
.shell:has(.pdf-studio) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 22px 30px 54px !important;
  box-sizing: border-box !important;
}

.pdf-studio,
.pdf-studio.pdf-studio-clean {
  width: min(1680px, calc(100vw - 60px)) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* IMPORTANT: old .pdf-upload-card display:grid !important was overriding .hidden.
   This is why the upload card stayed visible after upload. */
.pdf-studio #uploadScreen.hidden,
.pdf-studio .pdf-upload-card.hidden,
.pdf-studio .upload-card.hidden {
  display: none !important;
}

/* Initial hero — still premium, but less gigantic */
.pdf-studio .pdf-clean-hero {
  position: relative !important;
  min-height: 230px !important;
  padding: 38px 250px 38px 220px !important;
  margin: 0 0 24px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 30px !important;
  background:
    radial-gradient(circle at 105px 112px, rgba(74, 111, 165, 0.16), rgba(74, 111, 165, 0.055) 38%, transparent 66%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 20px 56px rgba(33, 52, 74, 0.085) !important;
  overflow: hidden !important;
}

.pdf-studio .pdf-clean-hero::before {
  left: 70px !important;
  width: 112px !important;
  height: 112px !important;
  border-radius: 28px !important;
}

.pdf-studio .pdf-clean-hero::after {
  left: 94px !important;
  width: 66px !important;
  height: 66px !important;
}

.pdf-studio .pdf-clean-hero .eyeline {
  margin: 0 0 8px !important;
  color: var(--pdf-purple) !important;
  font-size: clamp(15px, 1.2vw, 24px) !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
}

.pdf-studio .pdf-clean-hero h1 {
  margin: 0 !important;
  color: var(--pdf-ink) !important;
  font-size: clamp(58px, 6vw, 108px) !important;
  line-height: 0.84 !important;
  letter-spacing: -0.09em !important;
  font-weight: 950 !important;
}

.pdf-studio .pdf-clean-hero p:not(.eyeline) {
  max-width: 980px !important;
  margin: 18px 0 0 !important;
  color: var(--pdf-muted) !important;
  font-size: clamp(17px, 1.35vw, 25px) !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
}

.pdf-studio .pdf-clean-hero .button-secondary,
.pdf-studio .pdf-clean-hero a.button-secondary {
  position: absolute !important;
  top: 36px !important;
  right: 40px !important;
  min-width: 178px !important;
  min-height: 48px !important;
  border-radius: 16px !important;
}

/* Uploaded/editor state.
   Chrome supports :has(), and this page is being used in Chrome. */
.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero {
  min-height: 118px !important;
  padding: 22px 220px 22px 132px !important;
  margin-bottom: 18px !important;
  border-radius: 24px !important;
  box-shadow: 0 14px 38px rgba(33, 52, 74, 0.065) !important;
  background:
    radial-gradient(circle at 62px 58px, rgba(74, 111, 165, 0.14), rgba(74, 111, 165, 0.045) 35%, transparent 68%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::before {
  left: 34px !important;
  width: 72px !important;
  height: 72px !important;
  border-radius: 20px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::after {
  left: 50px !important;
  width: 40px !important;
  height: 40px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero .eyeline {
  margin-bottom: 5px !important;
  font-size: 13px !important;
  letter-spacing: 0.18em !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero h1 {
  font-size: clamp(42px, 4.2vw, 68px) !important;
  line-height: 0.86 !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero p:not(.eyeline) {
  margin-top: 8px !important;
  max-width: 880px !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero .button-secondary,
.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero a.button-secondary {
  top: 28px !important;
  right: 28px !important;
  min-height: 44px !important;
  min-width: 158px !important;
  padding: 0 18px !important;
  font-size: 14px !important;
}

/* Upload card before upload */
.pdf-studio #uploadScreen,
.pdf-studio .pdf-upload-card {
  width: min(880px, 100%) !important;
  min-height: 150px !important;
  padding: 28px 32px !important;
  margin: 0 0 22px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 28px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 24px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 48px rgba(33, 52, 74, 0.075) !important;
}

.pdf-studio #uploadScreen h2,
.pdf-studio .pdf-upload-card h2 {
  margin: 8px 0 6px !important;
  font-size: 24px !important;
  line-height: 1.05 !important;
  letter-spacing: -0.04em !important;
}

.pdf-studio #uploadScreen p,
.pdf-studio .pdf-upload-card p {
  max-width: 520px !important;
  margin: 0 !important;
  color: var(--pdf-muted) !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
  text-align: left !important;
}

.pdf-studio .pdf-step-pill {
  height: 26px !important;
  padding: 0 11px !important;
  font-size: 11px !important;
}

/* Workspace layout */
.pdf-studio #workspace,
.pdf-studio .pdf-editor-shell {
  display: grid !important;
  grid-template-columns: 320px minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
  margin-top: 0 !important;
}

.pdf-studio #workspace.hidden,
.pdf-studio .pdf-editor-shell.hidden {
  display: none !important;
}

/* Left tools panel */
.pdf-studio .pdf-tools-panel {
  position: sticky !important;
  top: 88px !important;
  max-height: calc(100vh - 104px) !important;
  overflow: auto !important;
  padding: 18px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: 0 16px 42px rgba(33, 52, 74, 0.07) !important;
}

.pdf-studio .pdf-panel-title .eyeline {
  margin: 0 0 6px !important;
  color: var(--pdf-purple) !important;
  font-size: 20px !important;
  letter-spacing: 0.18em !important;
  font-weight: 950 !important;
}

.pdf-studio .pdf-panel-title h2 {
  margin: 0 0 14px !important;
  font-size: 20px !important;
  line-height: 1.05 !important;
}

.pdf-studio .pdf-tool-tabs {
  display: grid !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
}

.pdf-studio .tool-button {
  width: 100% !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  border-radius: 14px !important;
  border: 1px solid var(--pdf-line) !important;
  background: #ffffff !important;
  color: #111827 !important;
  text-align: left !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

.pdf-studio .tool-button.active,
.pdf-studio .tool-button[aria-selected="true"] {
  background: var(--pdf-purple-soft) !important;
  border-color: var(--pdf-purple-border) !important;
  color: var(--pdf-purple-dark) !important;
}

.pdf-studio .tool-panel-section {
  padding: 14px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 16px !important;
  background: #ffffff !important;
}

.pdf-studio .tool-panel-section.hidden {
  display: none !important;
}

.pdf-studio .tool-panel-section h3 {
  margin: 0 0 6px !important;
  font-size: 17px !important;
}

.pdf-studio .tool-panel-section p,
.pdf-studio .muted {
  color: var(--pdf-muted) !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
}

.pdf-studio .pdf-tool-actions {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

/* Preview panel */
.pdf-studio .pdf-preview-panel {
  min-height: calc(100vh - 210px) !important;
  padding: 18px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: 0 16px 42px rgba(33, 52, 74, 0.07) !important;
  overflow: hidden !important;
}

.pdf-studio .pdf-preview-header,
.pdf-studio #topbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 16px !important;
  margin: 0 0 12px !important;
}

.pdf-studio .pdf-preview-header h2,
.pdf-studio #fileNameLabel {
  margin: 0 0 4px !important;
  font-size: 18px !important;
  line-height: 1.05 !important;
  letter-spacing: -0.02em !important;
}

.pdf-studio .pdf-preview-controls {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

.pdf-studio .pdf-preview-body {
  display: grid !important;
  grid-template-columns: 118px minmax(0, 1fr) !important;
  gap: 14px !important;
  min-height: calc(100vh - 335px) !important;
  max-height: calc(100vh - 250px) !important;
  padding: 14px !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 18px !important;
  background: #f8fafc !important;
  overflow: hidden !important;
}

.pdf-studio .pdf-thumbnails,
.pdf-studio #thumbnailsList {
  min-height: 100% !important;
  max-height: calc(100vh - 285px) !important;
  overflow: auto !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  padding: 8px !important;
}

.pdf-studio .pdf-document-stage {
  min-height: calc(100vh - 365px) !important;
  max-height: calc(100vh - 285px) !important;
  overflow: auto !important;
  display: grid !important;
  place-items: start center !important;
  padding: 18px !important;
  border-radius: 14px !important;
  background: #eef2f7 !important;
}

.pdf-studio #mainPreviewCanvas {
  display: block !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  background: #ffffff !important;
  box-shadow: 0 14px 38px rgba(17, 24, 39, 0.16) !important;
}

/* Footer/action summary: tight and useful */
.pdf-studio #actionSummary,
.pdf-studio .pdf-action-summary {
  margin-top: 12px !important;
  padding: 12px 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  gap: 14px !important;
  align-items: center !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 16px !important;
  background: #fbfdff !important;
}

.pdf-studio .pdf-summary-grid {
  display: flex !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  font-size: 13px !important;
}

/* Recent files should not dominate the editor */
.pdf-studio:has(#workspace:not(.hidden)) .recent-outputs {
  margin-top: 18px !important;
  opacity: 0.7 !important;
}

.pdf-studio .recent-outputs {
  border: 1px solid var(--pdf-line) !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: 0 14px 36px rgba(33, 52, 74, 0.055) !important;
  overflow: hidden !important;
}

.pdf-studio .recent-outputs summary {
  min-height: 58px !important;
  padding: 0 22px !important;
  display: flex !important;
  align-items: center !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

/* Button tightening */
.pdf-studio .button-primary,
.pdf-studio button.button-primary,
.pdf-studio #uploadButton {
  min-height: 48px !important;
  padding: 0 24px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, var(--pdf-purple) 0%, var(--pdf-purple-dark) 100%) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  box-shadow:
    0 14px 30px rgba(74, 111, 165, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

.pdf-studio .button-secondary,
.pdf-studio button.button-secondary {
  min-height: 44px !important;
  padding: 0 18px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 15px !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  box-shadow: 0 8px 22px rgba(33, 52, 74, 0.045) !important;
}

.pdf-studio input,
.pdf-studio select,
.pdf-studio textarea {
  min-height: 40px !important;
  padding: 0 12px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
}

/* Raw form remains hidden, but JS can still click the input */
.pdf-studio #pdfActionForm,
.pdf-studio .pdf-action-form {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
}

/* Responsive */
@media (max-width: 1100px) {
  .pdf-studio .pdf-clean-hero,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero {
    display: block !important;
    min-height: auto !important;
    padding: 118px 22px 26px !important;
  }

  .pdf-studio .pdf-clean-hero::before,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::before {
    left: 22px !important;
    top: 22px !important;
    transform: none !important;
    width: 76px !important;
    height: 76px !important;
    border-radius: 22px !important;
  }

  .pdf-studio .pdf-clean-hero::after,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::after {
    left: 39px !important;
    top: 39px !important;
    transform: none !important;
    width: 42px !important;
    height: 42px !important;
  }

  .pdf-studio .pdf-clean-hero .button-secondary,
  .pdf-studio .pdf-clean-hero a.button-secondary {
    position: static !important;
    width: 100% !important;
    margin-top: 18px !important;
  }

  .pdf-studio #uploadScreen,
  .pdf-studio .pdf-upload-card,
  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell,
  .pdf-studio .pdf-preview-body {
    grid-template-columns: 1fr !important;
  }

  .pdf-studio .pdf-tools-panel {
    position: static !important;
    max-height: none !important;
  }

  .pdf-studio .pdf-preview-body,
  .pdf-studio .pdf-document-stage,
  .pdf-studio .pdf-thumbnails {
    max-height: none !important;
  }
}


/* =========================================================
   PDF STUDIO — DocSign-matched purple header sizing
   2026-05-16
   CSS-only visual override. Keeps PDF editor JS IDs intact.
   ========================================================= */

:root {
  --pdf-purple: #4a6fa5;
  --pdf-purple-dark: #35507a;
  --pdf-purple-soft: #f4edff;
  --pdf-purple-glow: rgba(74, 111, 165, 0.16);
  --pdf-purple-border: #d8c9ff;
  --pdf-ink: #050507;
  --pdf-muted: #657288;
  --pdf-line: #dbe8f3;
  --pdf-bg: #f7f5f1;
}

body:has(.pdf-studio) {
  background: var(--pdf-bg) !important;
}

main.shell:has(.pdf-studio),
.shell:has(.pdf-studio) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 24px 30px 58px !important;
  box-sizing: border-box !important;
}

.pdf-studio,
.pdf-studio.pdf-studio-clean {
  width: min(1680px, calc(100vw - 60px)) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Match the DocSign hero proportions, but purple. */
.pdf-studio .pdf-clean-hero {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  min-height: 286px !important;
  padding: 46px 270px 46px 255px !important;
  margin: 0 0 30px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 34px !important;
  background:
    radial-gradient(circle at 118px 142px, rgba(74, 111, 165, 0.18), rgba(74, 111, 165, 0.06) 38%, transparent 66%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 24px 72px rgba(33, 52, 74, 0.10) !important;
  overflow: hidden !important;
}

/* Purple icon tile: same scale as DocSign. */
.pdf-studio .pdf-clean-hero::before {
  content: "" !important;
  position: absolute !important;
  left: 76px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 138px !important;
  height: 138px !important;
  border-radius: 34px !important;
  background: linear-gradient(145deg, #fbf8ff 0%, #eadfff 100%) !important;
  border: 1px solid rgba(74, 111, 165, 0.18) !important;
  box-shadow:
    0 18px 44px rgba(74, 111, 165, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.95) !important;
  z-index: 1 !important;
}

/* Purple PDF icon. */
.pdf-studio .pdf-clean-hero::after {
  content: "" !important;
  position: absolute !important;
  left: 104px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 82px !important;
  height: 82px !important;
  z-index: 2 !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%237446d8' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M27 14h30l17 17v42a8 8 0 0 1-8 8H27a8 8 0 0 1-8-8V22a8 8 0 0 1 8-8Z'/%3E%3Cpath d='M57 14v17h17'/%3E%3Cpath d='M33 44h21'/%3E%3Cpath d='M33 55h26'/%3E%3Cpath d='M33 66h13'/%3E%3Cpath d='M59 68l14-14 7 7-14 14-9 2 2-9Z'/%3E%3Cpath d='M70 57l7 7'/%3E%3C/g%3E%3C/svg%3E") !important;
}

.pdf-studio .pdf-clean-hero > div {
  position: relative !important;
  z-index: 3 !important;
  max-width: 1080px !important;
}

/* Same uppercase rhythm as DocSign. */
.pdf-studio .pdf-clean-hero .eyeline {
  margin: 0 0 12px !important;
  color: var(--pdf-purple) !important;
  font-size: clamp(20px, 1.45vw, 31px) !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
}

/* Key fix: less negative tracking so PDF STUDIO does not collapse into PDFSTUDIO. */
.pdf-studio .pdf-clean-hero h1 {
  margin: 0 !important;
  color: var(--pdf-ink) !important;
  font-size: clamp(76px, 6.4vw, 124px) !important;
  line-height: 0.86 !important;
  letter-spacing: -0.065em !important;
  word-spacing: 0.08em !important;
  font-weight: 950 !important;
  transform: scaleX(0.98) !important;
  transform-origin: left center !important;
}

.pdf-studio .pdf-clean-hero p:not(.eyeline) {
  max-width: 1060px !important;
  margin: 22px 0 0 !important;
  color: var(--pdf-muted) !important;
  font-size: clamp(20px, 1.55vw, 29px) !important;
  line-height: 1.25 !important;
  font-weight: 600 !important;
}

.pdf-studio .pdf-clean-hero .button-secondary,
.pdf-studio .pdf-clean-hero a.button-secondary {
  position: absolute !important;
  top: 52px !important;
  right: 50px !important;
  z-index: 4 !important;
  min-width: 208px !important;
  min-height: 58px !important;
  padding: 0 24px !important;
  border-radius: 17px !important;
  border: 1px solid var(--pdf-line) !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  box-shadow: 0 12px 34px rgba(33, 52, 74, 0.08) !important;
}

/* Uploaded state: compact, but still same style. */
.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero {
  min-height: 150px !important;
  padding: 26px 230px 26px 150px !important;
  margin-bottom: 20px !important;
  border-radius: 28px !important;
  box-shadow: 0 16px 44px rgba(33, 52, 74, 0.07) !important;
  background:
    radial-gradient(circle at 68px 74px, rgba(74, 111, 165, 0.15), rgba(74, 111, 165, 0.05) 38%, transparent 68%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::before {
  left: 42px !important;
  width: 82px !important;
  height: 82px !important;
  border-radius: 23px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::after {
  left: 60px !important;
  width: 46px !important;
  height: 46px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero .eyeline {
  margin-bottom: 7px !important;
  font-size: clamp(14px, 1vw, 19px) !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero h1 {
  font-size: clamp(50px, 4.3vw, 76px) !important;
  line-height: 0.86 !important;
  letter-spacing: -0.06em !important;
  word-spacing: 0.08em !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero p:not(.eyeline) {
  margin-top: 10px !important;
  max-width: 840px !important;
  font-size: clamp(15px, 1.05vw, 18px) !important;
  line-height: 1.25 !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero .button-secondary,
.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero a.button-secondary {
  top: 32px !important;
  right: 32px !important;
  min-width: 166px !important;
  min-height: 46px !important;
  font-size: 14px !important;
}

/* Keep the pre-upload card tidy under the DocSign-sized hero. */
.pdf-studio #uploadScreen,
.pdf-studio .pdf-upload-card {
  width: min(1160px, 100%) !important;
  min-height: 158px !important;
  padding: 30px 36px !important;
  margin: 0 0 24px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 32px !important;
  border-radius: 26px !important;
}

.pdf-studio #uploadScreen.hidden,
.pdf-studio .pdf-upload-card.hidden,
.pdf-studio .upload-card.hidden {
  display: none !important;
}

/* Keep editor workspace high and compact after upload. */
.pdf-studio #workspace,
.pdf-studio .pdf-editor-shell {
  grid-template-columns: 340px minmax(0, 1fr) !important;
  gap: 20px !important;
}

.pdf-studio #workspace.hidden,
.pdf-studio .pdf-editor-shell.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .pdf-studio .pdf-clean-hero,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero {
    display: block !important;
    min-height: auto !important;
    padding: 126px 24px 30px !important;
  }

  .pdf-studio .pdf-clean-hero::before,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::before {
    left: 24px !important;
    top: 24px !important;
    transform: none !important;
    width: 82px !important;
    height: 82px !important;
    border-radius: 24px !important;
  }

  .pdf-studio .pdf-clean-hero::after,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::after {
    left: 42px !important;
    top: 42px !important;
    transform: none !important;
    width: 46px !important;
    height: 46px !important;
  }

  .pdf-studio .pdf-clean-hero h1,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero h1 {
    font-size: clamp(48px, 13vw, 72px) !important;
  }

  .pdf-studio .pdf-clean-hero .button-secondary,
  .pdf-studio .pdf-clean-hero a.button-secondary {
    position: static !important;
    width: 100% !important;
    margin-top: 20px !important;
  }

  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell,
  .pdf-studio #uploadScreen,
  .pdf-studio .pdf-upload-card {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   PDF STUDIO — exact DocSign header measurements, purple
   2026-05-16
   CSS-only. Keep PDF editor JS/template IDs intact.
   ========================================================= */

:root {
  --pdf-purple: #4a6fa5;
  --pdf-purple-dark: #35507a;
  --pdf-purple-soft: #f4edff;
  --pdf-purple-border: #d8c9ff;
  --pdf-ink: #020202;
  --pdf-muted: #657288;
  --pdf-line: #dbe8f3;
  --pdf-bg: #f7f5f1;
}

body:has(.pdf-studio) {
  background: var(--pdf-bg) !important;
}

main.shell:has(.pdf-studio),
.shell:has(.pdf-studio) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 24px 30px 58px !important;
  box-sizing: border-box !important;
}

.pdf-studio,
.pdf-studio.pdf-studio-clean {
  width: min(1680px, calc(100vw - 60px)) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Exact DocSign hero geometry, converted to purple. */
.pdf-studio .pdf-clean-hero {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 56px !important;
  min-height: 184px !important;
  padding: 42px 56px 42px 180px !important;
  margin: 0 0 30px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 32px !important;
  background:
    radial-gradient(circle at 105px 92px, rgba(74, 111, 165, 0.18), rgba(74, 111, 165, 0.05) 34%, transparent 58%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 24px 72px rgba(33, 52, 74, 0.09) !important;
  overflow: hidden !important;
}

.pdf-studio .pdf-clean-hero::before {
  content: "" !important;
  position: absolute !important;
  left: 56px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 112px !important;
  height: 112px !important;
  border-radius: 34px !important;
  background:
    linear-gradient(145deg, rgba(246, 240, 255, 0.98), rgba(232, 222, 255, 0.92)) !important;
  border: 1px solid rgba(74, 111, 165, 0.18) !important;
  box-shadow:
    0 18px 44px rgba(74, 111, 165, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  z-index: 1 !important;
}

.pdf-studio .pdf-clean-hero::after {
  content: "" !important;
  position: absolute !important;
  left: 76px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 72px !important;
  height: 72px !important;
  z-index: 2 !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%237446d8' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M27 14h30l17 17v42a8 8 0 0 1-8 8H27a8 8 0 0 1-8-8V22a8 8 0 0 1 8-8Z'/%3E%3Cpath d='M57 14v17h17'/%3E%3Cpath d='M33 44h21'/%3E%3Cpath d='M33 55h26'/%3E%3Cpath d='M33 66h13'/%3E%3Cpath d='M59 68l14-14 7 7-14 14-9 2 2-9Z'/%3E%3Cpath d='M70 57l7 7'/%3E%3C/g%3E%3C/svg%3E") !important;
}

.pdf-studio .pdf-clean-hero > div {
  position: relative !important;
  z-index: 3 !important;
  max-width: 1180px !important;
}

.pdf-studio .pdf-clean-hero .eyeline,
.pdf-studio .pdf-clean-hero p.eyeline {
  margin: 0 0 8px 0 !important;
  color: var(--pdf-purple) !important;
  font-size: clamp(15px, 1.2vw, 22px) !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
}

.pdf-studio .pdf-clean-hero h1 {
  margin: 0 !important;
  color: var(--pdf-ink) !important;
  font-size: clamp(48px, 6.3vw, 88px) !important;
  line-height: 0.88 !important;
  letter-spacing: -0.06em !important;
  word-spacing: 0.10em !important;
  font-weight: 950 !important;
  transform: scaleX(0.98) !important;
  transform-origin: left center !important;
}

/* Match DocSign subtitle sizing exactly. */
.pdf-studio .pdf-clean-hero p:not(.eyeline) {
  margin: 18px 0 0 0 !important;
  color: var(--pdf-muted) !important;
  font-size: clamp(17px, 1.55vw, 25px) !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
  max-width: 1100px !important;
}

.pdf-studio .pdf-clean-hero .button-secondary,
.pdf-studio .pdf-clean-hero a.button-secondary {
  position: absolute !important;
  top: 36px !important;
  right: 42px !important;
  z-index: 4 !important;
  min-width: 178px !important;
  min-height: 48px !important;
  padding: 0 20px !important;
  border-radius: 16px !important;
  border: 1px solid var(--pdf-line) !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 28px rgba(33, 52, 74, 0.06) !important;
}

/* Uploaded mode should not shrink into a different design; keep the same DocSign proportions. */
.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero {
  min-height: 148px !important;
  padding: 28px 210px 28px 144px !important;
  margin-bottom: 20px !important;
  border-radius: 28px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::before {
  left: 42px !important;
  width: 82px !important;
  height: 82px !important;
  border-radius: 24px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::after {
  left: 60px !important;
  width: 46px !important;
  height: 46px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero .eyeline,
.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero p.eyeline {
  margin-bottom: 6px !important;
  font-size: clamp(13px, 0.95vw, 17px) !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero h1 {
  font-size: clamp(42px, 4.3vw, 68px) !important;
  line-height: 0.88 !important;
  letter-spacing: -0.055em !important;
  word-spacing: 0.10em !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero p:not(.eyeline) {
  margin-top: 8px !important;
  font-size: clamp(14px, 1vw, 17px) !important;
  line-height: 1.3 !important;
  max-width: 900px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero .button-secondary,
.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero a.button-secondary {
  top: 30px !important;
  right: 32px !important;
  min-width: 162px !important;
  min-height: 44px !important;
  font-size: 13px !important;
}

/* Preserve working editor behavior. */
.pdf-studio #uploadScreen.hidden,
.pdf-studio .pdf-upload-card.hidden,
.pdf-studio .upload-card.hidden,
.pdf-studio #workspace.hidden,
.pdf-studio .pdf-editor-shell.hidden {
  display: none !important;
}

/* Upload card under the now-correct hero. */
.pdf-studio #uploadScreen,
.pdf-studio .pdf-upload-card {
  width: min(1120px, 100%) !important;
  min-height: 150px !important;
  padding: 28px 34px !important;
  margin: 0 0 24px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 30px !important;
  border: 1px solid var(--pdf-line) !important;
  border-radius: 26px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 48px rgba(33, 52, 74, 0.075) !important;
}

@media (max-width: 820px) {
  .pdf-studio .pdf-clean-hero,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero {
    display: block !important;
    min-height: auto !important;
    padding: 136px 28px 32px 28px !important;
  }

  .pdf-studio .pdf-clean-hero::before,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::before {
    left: 28px !important;
    top: 28px !important;
    transform: none !important;
    width: 88px !important;
    height: 88px !important;
    border-radius: 28px !important;
  }

  .pdf-studio .pdf-clean-hero::after,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::after {
    left: 44px !important;
    top: 44px !important;
    transform: none !important;
    width: 56px !important;
    height: 56px !important;
  }

  .pdf-studio .pdf-clean-hero .button-secondary,
  .pdf-studio .pdf-clean-hero a.button-secondary {
    position: static !important;
    width: 100% !important;
    margin-top: 18px !important;
  }

  .pdf-studio #uploadScreen,
  .pdf-studio .pdf-upload-card,
  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   PDF STUDIO — narrow DocSign-width final override
   2026-05-17
   CSS-only. Keeps PDF editor JS/template IDs intact.
   ========================================================= */

/* Match DocSign page width instead of using almost full browser width. */
.pdf-studio,
.pdf-studio.pdf-studio-clean {
  width: min(1360px, calc(100vw - 72px)) !important;
  max-width: 1360px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Reduce outer shell padding so the centered width feels intentional. */
main.shell:has(.pdf-studio),
.shell:has(.pdf-studio) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 24px 28px 58px !important;
  box-sizing: border-box !important;
}

/* Hero: same DocSign proportions, but constrained to the narrower page. */
.pdf-studio .pdf-clean-hero {
  width: 100% !important;
  min-height: 184px !important;
  padding: 42px 48px 42px 180px !important;
  margin: 0 auto 28px !important;
  border-radius: 32px !important;
}

/* Keep title readable in the narrower hero. */
.pdf-studio .pdf-clean-hero h1 {
  font-size: clamp(48px, 5.6vw, 82px) !important;
  letter-spacing: -0.055em !important;
  word-spacing: 0.12em !important;
}

.pdf-studio .pdf-clean-hero p:not(.eyeline) {
  max-width: 900px !important;
  font-size: clamp(16px, 1.35vw, 22px) !important;
}

/* Back button slightly smaller so it does not dominate the right side. */
.pdf-studio .pdf-clean-hero .button-secondary,
.pdf-studio .pdf-clean-hero a.button-secondary {
  top: 34px !important;
  right: 36px !important;
  min-width: 162px !important;
  min-height: 44px !important;
  padding: 0 18px !important;
  font-size: 13px !important;
}

/* Uploaded compact hero within same narrower width. */
.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero {
  min-height: 132px !important;
  padding: 24px 190px 24px 138px !important;
  margin-bottom: 18px !important;
  border-radius: 28px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero h1 {
  font-size: clamp(40px, 3.9vw, 62px) !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero p:not(.eyeline) {
  max-width: 760px !important;
  font-size: clamp(13px, 0.95vw, 16px) !important;
}

/* Upload card should not stretch too far either. */
.pdf-studio #uploadScreen,
.pdf-studio .pdf-upload-card {
  width: min(980px, 100%) !important;
  max-width: 980px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* Editor workspace: narrower, cleaner proportions. */
.pdf-studio #workspace,
.pdf-studio .pdf-editor-shell {
  width: 100% !important;
  grid-template-columns: 330px minmax(0, 1fr) !important;
  gap: 20px !important;
}

/* Keep preview from feeling over-wide inside the narrower shell. */
.pdf-studio .pdf-preview-panel {
  min-width: 0 !important;
}

.pdf-studio .pdf-preview-body {
  grid-template-columns: 112px minmax(0, 1fr) !important;
}

/* Make the document stage less horizontally bloated. */
.pdf-studio .pdf-document-stage {
  padding: 16px !important;
}

/* Slightly reduce tools panel visual weight. */
.pdf-studio .pdf-tools-panel {
  padding: 18px !important;
  border-radius: 22px !important;
}

/* Wide desktop but not ultra-wide: same controlled width. */
@media (min-width: 1500px) {
  .pdf-studio,
  .pdf-studio.pdf-studio-clean {
    width: 1360px !important;
    max-width: 1360px !important;
  }
}

/* Laptop sizing. */
@media (max-width: 1280px) {
  .pdf-studio,
  .pdf-studio.pdf-studio-clean {
    width: min(1180px, calc(100vw - 48px)) !important;
  }

  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell {
    grid-template-columns: 300px minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  .pdf-studio .pdf-clean-hero {
    padding-right: 42px !important;
  }
}

/* Mobile/tablet */
@media (max-width: 900px) {
  .pdf-studio,
  .pdf-studio.pdf-studio-clean {
    width: min(100%, calc(100vw - 28px)) !important;
  }

  main.shell:has(.pdf-studio),
  .shell:has(.pdf-studio) {
    padding: 16px 14px 44px !important;
  }

  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell,
  .pdf-studio .pdf-preview-body,
  .pdf-studio #uploadScreen,
  .pdf-studio .pdf-upload-card {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   PDF STUDIO — mockup spacing / DocSign-style purple layout
   2026-05-17
   CSS-only. Keeps PDF editor JS/template IDs intact.
   ========================================================= */

/* Main centered app width: closer to DocSign + mockup, not full browser width. */
.pdf-studio,
.pdf-studio.pdf-studio-clean {
  width: min(1220px, calc(100vw - 72px)) !important;
  max-width: 1220px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* Outer shell: clean centered space. */
main.shell:has(.pdf-studio),
.shell:has(.pdf-studio) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 24px 28px 54px !important;
  box-sizing: border-box !important;
}

/* Hero: compact like the mockup, not huge. */
.pdf-studio .pdf-clean-hero {
  width: 100% !important;
  min-height: 154px !important;
  padding: 30px 210px 30px 148px !important;
  margin: 0 auto 18px !important;
  border-radius: 24px !important;
  border: 1px solid #dbe8f3 !important;
  background:
    radial-gradient(circle at 72px 76px, rgba(74, 111, 165, 0.18), rgba(74, 111, 165, 0.055) 36%, transparent 66%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  box-shadow: 0 18px 48px rgba(33, 52, 74, 0.075) !important;
  overflow: hidden !important;
}

/* Hero icon tile. */
.pdf-studio .pdf-clean-hero::before {
  left: 46px !important;
  width: 78px !important;
  height: 78px !important;
  border-radius: 22px !important;
}

/* Hero icon. */
.pdf-studio .pdf-clean-hero::after {
  left: 63px !important;
  width: 44px !important;
  height: 44px !important;
}

/* Eyeline. */
.pdf-studio .pdf-clean-hero .eyeline,
.pdf-studio .pdf-clean-hero p.eyeline {
  margin: 0 0 7px 0 !important;
  color: #4a6fa5 !important;
  font-size: clamp(13px, 1vw, 18px) !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
}

/* Title: readable, not crushed, not massive. */
.pdf-studio .pdf-clean-hero h1 {
  margin: 0 !important;
  color: #020202 !important;
  font-size: clamp(44px, 4.6vw, 72px) !important;
  line-height: 0.88 !important;
  letter-spacing: -0.055em !important;
  word-spacing: 0.12em !important;
  font-weight: 950 !important;
  transform: scaleX(0.98) !important;
  transform-origin: left center !important;
}

/* Subtitle: smaller like the mockup. */
.pdf-studio .pdf-clean-hero p:not(.eyeline) {
  margin: 12px 0 0 0 !important;
  max-width: 720px !important;
  color: #657288 !important;
  font-size: clamp(13px, 1.05vw, 16px) !important;
  line-height: 1.35 !important;
  font-weight: 550 !important;
}

/* Back button. */
.pdf-studio .pdf-clean-hero .button-secondary,
.pdf-studio .pdf-clean-hero a.button-secondary {
  position: absolute !important;
  top: 32px !important;
  right: 34px !important;
  z-index: 4 !important;
  min-width: 160px !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border-radius: 13px !important;
  border: 1px solid #dbe8f3 !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 26px rgba(33, 52, 74, 0.055) !important;
}

/* Uploaded mode: keep same compact hero, only slightly tighter. */
.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero {
  min-height: 132px !important;
  padding: 24px 190px 24px 132px !important;
  margin-bottom: 18px !important;
  border-radius: 22px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::before {
  left: 38px !important;
  width: 70px !important;
  height: 70px !important;
  border-radius: 20px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::after {
  left: 53px !important;
  width: 40px !important;
  height: 40px !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero h1 {
  font-size: clamp(40px, 4vw, 62px) !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero p:not(.eyeline) {
  max-width: 690px !important;
  font-size: clamp(12px, 0.9vw, 15px) !important;
}

.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero .button-secondary,
.pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero a.button-secondary {
  top: 28px !important;
  right: 30px !important;
  min-width: 152px !important;
  min-height: 40px !important;
}

/* Hide upload card after upload. */
.pdf-studio #uploadScreen.hidden,
.pdf-studio .pdf-upload-card.hidden,
.pdf-studio .upload-card.hidden,
.pdf-studio #workspace.hidden,
.pdf-studio .pdf-editor-shell.hidden {
  display: none !important;
}

/* Upload card before upload: centered under hero, not huge. */
.pdf-studio #uploadScreen,
.pdf-studio .pdf-upload-card {
  width: min(840px, 100%) !important;
  max-width: 840px !important;
  min-height: 138px !important;
  padding: 24px 28px !important;
  margin: 0 auto 22px 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 26px !important;
  border: 1px solid #dbe8f3 !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: 0 16px 42px rgba(33, 52, 74, 0.065) !important;
}

.pdf-studio #uploadScreen h2,
.pdf-studio .pdf-upload-card h2 {
  margin: 8px 0 6px !important;
  font-size: 23px !important;
  line-height: 1.05 !important;
}

.pdf-studio #uploadScreen p,
.pdf-studio .pdf-upload-card p {
  max-width: 440px !important;
  color: #657288 !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

/* Workspace: mockup proportions. */
.pdf-studio #workspace,
.pdf-studio .pdf-editor-shell {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
  margin-top: 0 !important;
}

/* Left tools card: narrower, closer to mockup. */
.pdf-studio .pdf-tools-panel {
  position: sticky !important;
  top: 86px !important;
  max-height: calc(100vh - 104px) !important;
  overflow: auto !important;
  padding: 18px !important;
  border: 1px solid #dbe8f3 !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: 0 16px 42px rgba(33, 52, 74, 0.065) !important;
}

.pdf-studio .pdf-panel-title .eyeline {
  margin: 0 0 6px !important;
  color: #4a6fa5 !important;
  font-size: 19px !important;
  letter-spacing: 0.18em !important;
  font-weight: 950 !important;
}

.pdf-studio .pdf-panel-title h2 {
  margin: 0 0 14px !important;
  font-size: 20px !important;
  line-height: 1.05 !important;
}

/* Tool tabs. */
.pdf-studio .pdf-tool-tabs {
  display: grid !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
}

.pdf-studio .tool-button {
  width: 100% !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  border-radius: 13px !important;
  border: 1px solid #dbe8f3 !important;
  background: #ffffff !important;
  color: #111827 !important;
  text-align: left !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

.pdf-studio .tool-button.active,
.pdf-studio .tool-button[aria-selected="true"] {
  background: #f4edff !important;
  border-color: #d8c9ff !important;
  color: #35507a !important;
}

/* Tool option panel. */
.pdf-studio .tool-panel-section {
  padding: 14px !important;
  border: 1px solid #dbe8f3 !important;
  border-radius: 16px !important;
  background: #ffffff !important;
}

.pdf-studio .tool-panel-section.hidden {
  display: none !important;
}

.pdf-studio .tool-panel-section h3 {
  margin: 0 0 8px !important;
  font-size: 17px !important;
  line-height: 1.15 !important;
}

.pdf-studio .tool-panel-section p,
.pdf-studio .muted {
  color: #657288 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

/* Preview card: less wide, mockup style. */
.pdf-studio .pdf-preview-panel {
  min-width: 0 !important;
  min-height: calc(100vh - 235px) !important;
  padding: 18px !important;
  border: 1px solid #dbe8f3 !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: 0 16px 42px rgba(33, 52, 74, 0.065) !important;
  overflow: hidden !important;
}

.pdf-studio .pdf-preview-header,
.pdf-studio #topbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 16px !important;
  margin: 0 0 14px !important;
}

.pdf-studio .pdf-preview-header h2,
.pdf-studio #fileNameLabel {
  margin: 0 0 4px !important;
  font-size: 18px !important;
  line-height: 1.05 !important;
}

/* Preview controls smaller. */
.pdf-studio .pdf-preview-controls {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

/* Preview body: thumbnails and page match mockup spacing. */
.pdf-studio .pdf-preview-body {
  display: grid !important;
  grid-template-columns: 104px minmax(0, 1fr) !important;
  gap: 14px !important;
  min-height: calc(100vh - 350px) !important;
  max-height: calc(100vh - 285px) !important;
  padding: 14px !important;
  border: 1px solid #edf2f7 !important;
  border-radius: 18px !important;
  background: #f8fafc !important;
  overflow: hidden !important;
}

.pdf-studio .pdf-thumbnails,
.pdf-studio #thumbnailsList {
  max-height: calc(100vh - 315px) !important;
  overflow: auto !important;
  border: 1px solid #dbe8f3 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  padding: 8px !important;
}

/* Document stage: stop it stretching too wide. */
.pdf-studio .pdf-document-stage {
  max-height: calc(100vh - 315px) !important;
  overflow: auto !important;
  display: grid !important;
  place-items: start center !important;
  padding: 16px !important;
  border-radius: 14px !important;
  background: #eef2f7 !important;
}

.pdf-studio #mainPreviewCanvas {
  display: block !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  background: #ffffff !important;
  box-shadow: 0 14px 38px rgba(17, 24, 39, 0.15) !important;
}

/* Bottom summary tighter. */
.pdf-studio #actionSummary,
.pdf-studio .pdf-action-summary {
  margin-top: 12px !important;
  padding: 12px 14px !important;
  border: 1px solid #dbe8f3 !important;
  border-radius: 16px !important;
  background: #fbfdff !important;
}

/* Buttons match mockup. */
.pdf-studio .button-primary,
.pdf-studio button.button-primary,
.pdf-studio #uploadButton {
  min-height: 46px !important;
  padding: 0 22px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #4a6fa5 0%, #35507a 100%) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  box-shadow:
    0 12px 28px rgba(74, 111, 165, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

.pdf-studio .button-secondary,
.pdf-studio button.button-secondary {
  min-height: 42px !important;
  padding: 0 16px !important;
  border: 1px solid #dbe8f3 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  box-shadow: 0 8px 20px rgba(33, 52, 74, 0.045) !important;
}

/* Keep raw form hidden but available to JS. */
.pdf-studio #pdfActionForm,
.pdf-studio .pdf-action-form {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
}

/* Desktop clamp: prevent ultra-wide stretch. */
@media (min-width: 1500px) {
  .pdf-studio,
  .pdf-studio.pdf-studio-clean {
    width: 1220px !important;
    max-width: 1220px !important;
  }
}

/* Laptop. */
@media (max-width: 1280px) {
  .pdf-studio,
  .pdf-studio.pdf-studio-clean {
    width: min(1120px, calc(100vw - 48px)) !important;
  }

  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell {
    grid-template-columns: 270px minmax(0, 1fr) !important;
    gap: 16px !important;
  }
}

/* Mobile/tablet. */
@media (max-width: 900px) {
  .pdf-studio,
  .pdf-studio.pdf-studio-clean {
    width: min(100%, calc(100vw - 28px)) !important;
  }

  main.shell:has(.pdf-studio),
  .shell:has(.pdf-studio) {
    padding: 16px 14px 44px !important;
  }

  .pdf-studio .pdf-clean-hero,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero {
    display: block !important;
    min-height: auto !important;
    padding: 118px 22px 26px !important;
  }

  .pdf-studio .pdf-clean-hero::before,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::before {
    left: 22px !important;
    top: 22px !important;
    transform: none !important;
    width: 76px !important;
    height: 76px !important;
  }

  .pdf-studio .pdf-clean-hero::after,
  .pdf-studio:has(#workspace:not(.hidden)) .pdf-clean-hero::after {
    left: 39px !important;
    top: 39px !important;
    transform: none !important;
    width: 42px !important;
    height: 42px !important;
  }

  .pdf-studio .pdf-clean-hero .button-secondary,
  .pdf-studio .pdf-clean-hero a.button-secondary {
    position: static !important;
    width: 100% !important;
    margin-top: 18px !important;
  }

  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell,
  .pdf-studio .pdf-preview-body,
  .pdf-studio #uploadScreen,
  .pdf-studio .pdf-upload-card {
    grid-template-columns: 1fr !important;
  }

  .pdf-studio .pdf-tools-panel {
    position: static !important;
    max-height: none !important;
  }

  .pdf-studio .pdf-preview-body,
  .pdf-studio .pdf-document-stage,
  .pdf-studio .pdf-thumbnails {
    max-height: none !important;
  }
}

/* PDF STUDIO — narrow tools + purple split/extract actions */
.pdf-studio #workspace,
.pdf-studio .pdf-editor-shell {
  grid-template-columns: 245px minmax(0, 1fr) !important;
  gap: 18px !important;
}

.pdf-studio .pdf-tools-panel {
  width: 245px !important;
  max-width: 245px !important;
  padding: 16px !important;
}

.pdf-studio .pdf-panel-title .eyeline {
  font-size: 17px !important;
}

.pdf-studio .tool-button {
  min-height: 40px !important;
  padding: 0 13px !important;
  border-radius: 13px !important;
  font-size: 13px !important;
}

.pdf-studio .tool-button.active,
.pdf-studio .tool-button[aria-selected="true"] {
  background: #f1e7ff !important;
  border-color: #cfb9ff !important;
  color: #35507a !important;
  box-shadow:
    0 0 0 5px rgba(74, 111, 165, 0.10),
    0 10px 24px rgba(74, 111, 165, 0.10) !important;
}

.pdf-studio .tool-panel-section .pdf-tool-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 9px !important;
}

.pdf-studio #splitBtn {
  width: 100% !important;
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #4a6fa5 0%, #35507a 100%) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 14px 28px rgba(74, 111, 165, 0.20) !important;
}

.pdf-studio #exportImagesBtn {
  width: 100% !important;
  min-height: 44px !important;
  border: 1px solid #cdb8ff !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #f5efff 0%, #eadfff 100%) !important;
  color: #35507a !important;
  font-weight: 900 !important;
  box-shadow: 0 12px 24px rgba(74, 111, 165, 0.10) !important;
}

@media (max-width: 1280px) {
  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell {
    grid-template-columns: 235px minmax(0, 1fr) !important;
  }

  .pdf-studio .pdf-tools-panel {
    width: 235px !important;
    max-width: 235px !important;
  }
}

@media (max-width: 900px) {
  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell {
    grid-template-columns: 1fr !important;
  }

  .pdf-studio .pdf-tools-panel {
    width: 100% !important;
    max-width: none !important;
  }
}

/* PDF STUDIO — tools sidebar polish */
.pdf-studio #workspace,
.pdf-studio .pdf-editor-shell {
  grid-template-columns: 230px minmax(0, 1fr) !important;
  gap: 18px !important;
}

.pdf-studio .pdf-tools-panel {
  width: 230px !important;
  max-width: 230px !important;
  padding: 14px !important;
  border-radius: 20px !important;
}

.pdf-studio .pdf-panel-title .eyeline {
  font-size: 16px !important;
  letter-spacing: 0.18em !important;
  margin-bottom: 4px !important;
}

.pdf-studio .pdf-panel-title h2 {
  font-size: 18px !important;
  margin-bottom: 12px !important;
}

.pdf-studio .tool-button {
  min-height: 38px !important;
  padding: 0 12px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

.pdf-studio .tool-button.active,
.pdf-studio .tool-button[aria-selected="true"] {
  background: #f1e7ff !important;
  border-color: #cdb8ff !important;
  color: #35507a !important;
  box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.10) !important;
}

.pdf-studio .tool-panel-section {
  padding: 12px !important;
  border-radius: 15px !important;
}

.pdf-studio .tool-panel-section h3 {
  font-size: 16px !important;
  margin-bottom: 8px !important;
}

.pdf-studio .tool-panel-section p,
.pdf-studio .tool-panel-section .muted {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.pdf-studio .tool-panel-section .pdf-tool-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

.pdf-studio .tool-panel-section .button-secondary {
  width: 100% !important;
  min-height: 40px !important;
  border-radius: 13px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

/* Organise actions: purple shades */
.pdf-studio #rotateLeftBtn {
  border: 1px solid #9b5cf6 !important;
  background: #ffffff !important;
  color: #5b21b6 !important;
}

.pdf-studio #rotateRightBtn {
  border: 1px solid #c084fc !important;
  background: #faf5ff !important;
  color: #6d28d9 !important;
}

.pdf-studio #extractPagesBtn {
  border: 1px solid #d8b4fe !important;
  background: #f3e8ff !important;
  color: #6b21a8 !important;
}

.pdf-studio #reorderPagesBtn {
  border: 0 !important;
  background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(109, 40, 217, 0.18) !important;
}

.pdf-studio #deletePagesBtn {
  border: 1px solid #581c87 !important;
  background: #ffffff !important;
  color: #581c87 !important;
}

/* Split / extract actions */
.pdf-studio #splitBtn {
  width: 100% !important;
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: linear-gradient(180deg, #4a6fa5 0%, #35507a 100%) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 12px 24px rgba(74, 111, 165, 0.20) !important;
}

.pdf-studio #exportImagesBtn {
  width: 100% !important;
  min-height: 42px !important;
  border: 1px solid #cdb8ff !important;
  border-radius: 13px !important;
  background: linear-gradient(180deg, #f6f0ff 0%, #eadfff 100%) !important;
  color: #35507a !important;
  font-weight: 900 !important;
}

/* Page selection buttons */
.pdf-studio #selectAllBtn,
.pdf-studio #selectOddBtn,
.pdf-studio #selectEvenBtn,
.pdf-studio #clearSelectionBtn {
  border-color: #dfd1ff !important;
  background: #fbf8ff !important;
  color: #35507a !important;
}

@media (max-width: 1280px) {
  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell {
    grid-template-columns: 220px minmax(0, 1fr) !important;
  }

  .pdf-studio .pdf-tools-panel {
    width: 220px !important;
    max-width: 220px !important;
  }
}

@media (max-width: 900px) {
  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell {
    grid-template-columns: 1fr !important;
  }

  .pdf-studio .pdf-tools-panel {
    width: 100% !important;
    max-width: none !important;
  }
}

/* PDF STUDIO — tools + pages rail polish */
.pdf-studio #workspace,
.pdf-studio .pdf-editor-shell {
  grid-template-columns: 255px minmax(0, 1fr) !important;
  gap: 20px !important;
}

.pdf-studio .pdf-tools-panel {
  width: 255px !important;
  max-width: 255px !important;
  padding: 16px !important;
  border-radius: 22px !important;
}

/* Tool tabs closer to target screenshot */
.pdf-studio .tool-button {
  min-height: 42px !important;
  padding: 0 14px !important;
  border-radius: 14px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

.pdf-studio .tool-button.active,
.pdf-studio .tool-button[aria-selected="true"] {
  background: #f1e7ff !important;
  border-color: #c8a8ff !important;
  color: #35507a !important;
  box-shadow:
    0 0 0 4px rgba(74, 111, 165, 0.12),
    0 8px 20px rgba(74, 111, 165, 0.10) !important;
}

/* Tool option card */
.pdf-studio .tool-panel-section {
  padding: 16px !important;
  border-radius: 18px !important;
}

.pdf-studio .tool-panel-section h3 {
  font-size: 18px !important;
  margin-bottom: 10px !important;
}

.pdf-studio .tool-panel-section p,
.pdf-studio .tool-panel-section .muted {
  font-size: 13px !important;
  line-height: 1.35 !important;
}

/* Stack action buttons like the target */
.pdf-studio .tool-panel-section .pdf-tool-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 9px !important;
}

.pdf-studio .tool-panel-section .button-secondary {
  width: 100% !important;
  min-height: 42px !important;
  border-radius: 14px !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

/* Organise buttons: purple outlines/shades, no heavy fill */
.pdf-studio #rotateLeftBtn {
  border: 2px solid #8e24aa !important;
  color: #111827 !important;
  background: #ffffff !important;
}

.pdf-studio #rotateRightBtn {
  border: 2px solid #c026d3 !important;
  color: #111827 !important;
  background: #ffffff !important;
}

.pdf-studio #extractPagesBtn {
  border: 2px solid #e879f9 !important;
  color: #111827 !important;
  background: #fbf2ff !important;
}

.pdf-studio #reorderPagesBtn {
  border: 2px solid #9c27b0 !important;
  color: #111827 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.pdf-studio #deletePagesBtn {
  border: 2px solid #581c87 !important;
  color: #111827 !important;
  background: #ffffff !important;
}

/* Split / extract buttons: two purple shades */
.pdf-studio #splitBtn {
  width: 100% !important;
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #4a6fa5 0%, #35507a 100%) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 12px 24px rgba(74, 111, 165, 0.18) !important;
}

.pdf-studio #exportImagesBtn {
  width: 100% !important;
  min-height: 42px !important;
  border: 2px solid #c084fc !important;
  border-radius: 14px !important;
  background: #f5efff !important;
  color: #35507a !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

/* Page selection buttons */
.pdf-studio #selectAllBtn,
.pdf-studio #selectOddBtn,
.pdf-studio #selectEvenBtn,
.pdf-studio #clearSelectionBtn {
  min-height: 42px !important;
  border: 1px solid #dfd1ff !important;
  background: #fbf8ff !important;
  color: #35507a !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

/* Thumbnail rail: target purple selected area */
.pdf-studio #thumbnailsList,
.pdf-studio .pdf-thumbnails {
  border: 4px solid #9c27b0 !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  padding: 8px !important;
}

/* Remove green/mint selected thumbnail styling */
.pdf-studio #thumbnailsList .selected,
.pdf-studio #thumbnailsList .active,
.pdf-studio #thumbnailsList [aria-selected="true"],
.pdf-studio .pdf-thumbnails .selected,
.pdf-studio .pdf-thumbnails .active,
.pdf-studio .pdf-thumbnails [aria-selected="true"] {
  border-color: #9c27b0 !important;
  background: #fbf5ff !important;
  box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.16) !important;
}

/* Common thumbnail button/card guesses used by the JS-rendered thumbnails */
.pdf-studio #thumbnailsList button,
.pdf-studio #thumbnailsList .thumbnail,
.pdf-studio #thumbnailsList .page-thumbnail,
.pdf-studio #thumbnailsList .thumb,
.pdf-studio .pdf-thumbnails button,
.pdf-studio .pdf-thumbnails .thumbnail,
.pdf-studio .pdf-thumbnails .page-thumbnail,
.pdf-studio .pdf-thumbnails .thumb {
  border-radius: 14px !important;
}

.pdf-studio #thumbnailsList button:hover,
.pdf-studio #thumbnailsList .thumbnail:hover,
.pdf-studio #thumbnailsList .page-thumbnail:hover,
.pdf-studio #thumbnailsList .thumb:hover {
  border-color: #c084fc !important;
  background: #fbf5ff !important;
}

/* If selected page is inline-styled by JS, force purple visual */
.pdf-studio #thumbnailsList [style*="background"],
.pdf-studio .pdf-thumbnails [style*="background"] {
  --thumbnail-active: #fbf5ff !important;
}

@media (max-width: 1280px) {
  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell {
    grid-template-columns: 245px minmax(0, 1fr) !important;
  }

  .pdf-studio .pdf-tools-panel {
    width: 245px !important;
    max-width: 245px !important;
  }
}

@media (max-width: 900px) {
  .pdf-studio #workspace,
  .pdf-studio .pdf-editor-shell {
    grid-template-columns: 1fr !important;
  }

  .pdf-studio .pdf-tools-panel {
    width: 100% !important;
    max-width: none !important;
  }
}

/* PDF STUDIO — clean final result preview */
.pdf-studio .pdf-editor-result-page {
  width: 100% !important;
  margin: 0 0 24px !important;
  padding: 22px !important;
  border: 1px solid #dbe8f3 !important;
  border-radius: 24px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 48px rgba(33, 52, 74, 0.075) !important;
}

.pdf-studio .pdf-editor-result-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 20px !important;
  align-items: start !important;
  margin-bottom: 18px !important;
}

.pdf-studio .pdf-editor-result-head .eyeline {
  margin: 0 0 8px !important;
  color: #4a6fa5 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
}

.pdf-studio .pdf-editor-result-head h2 {
  margin: 0 0 6px !important;
  color: #111827 !important;
  font-size: 26px !important;
  line-height: 1.05 !important;
  letter-spacing: -0.035em !important;
}

.pdf-studio .pdf-editor-result-actions {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

.pdf-studio .pdf-editor-result-actions a {
  min-height: 44px !important;
  padding: 0 18px !important;
  border-radius: 14px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 900 !important;
}

.pdf-studio .pdf-editor-result-actions .button-primary {
  background: linear-gradient(180deg, #4a6fa5 0%, #35507a 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 14px 30px rgba(74, 111, 165, 0.22) !important;
}

.pdf-studio .pdf-editor-result-preview {
  width: 100% !important;
  height: min(76vh, 900px) !important;
  min-height: 660px !important;
  border: 1px solid #dbe8f3 !important;
  border-radius: 20px !important;
  background: #eef2f7 !important;
  overflow: hidden !important;
  box-shadow: inset 0 0 0 10px #f6f8fb !important;
}

.pdf-studio .pdf-editor-result-preview iframe {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  background: #eef2f7 !important;
}

/* Kill old/broken Codex result styling side effects */
.pdf-studio .pdf-editor-result,
.pdf-studio .pdf-result-card,
.pdf-studio .pdf-result-preview-card {
  max-width: none !important;
}

.pdf-studio:has(.pdf-editor-result-page) #uploadScreen,
.pdf-studio:has(.pdf-editor-result-page) .pdf-upload-card,
.pdf-studio:has(.pdf-editor-result-page) #workspace {
  display: none !important;
}

@media (max-width: 900px) {
  .pdf-studio .pdf-editor-result-head {
    grid-template-columns: 1fr !important;
  }

  .pdf-studio .pdf-editor-result-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-content: stretch !important;
  }

  .pdf-studio .pdf-editor-result-actions a {
    width: 100% !important;
  }

  .pdf-studio .pdf-editor-result-preview {
    height: 70vh !important;
    min-height: 480px !important;
  }
}

/* Documents saved files page */
.documents-list-card {
  width: 100%;
  padding: 22px;
  border: 1px solid #dbe8f3;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(33, 52, 74, 0.065);
}

.documents-list-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.document-file-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #edf2f7;
}

.document-file-row strong,
.document-file-row span {
  display: block;
}

.document-file-row span {
  color: #657288;
  font-size: 13px;
  margin-top: 4px;
}

.document-file-actions a {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #dbe8f3;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-weight: 850;
  text-decoration: none;
}

/* =========================================================
   DEAL DASHBOARD — Linked Documents compact/fixed buttons
   2026-05-18
   ========================================================= */

.deal-dashboard-studio table:last-of-type {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #ffffff !important;
  border: 1px solid #d9e2ec !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

.deal-dashboard-studio table:last-of-type th,
.deal-dashboard-studio table:last-of-type td {
  padding: 14px 16px !important;
  vertical-align: middle !important;
  border-right: 1px solid #e7edf4 !important;
  border-bottom: 1px solid #e7edf4 !important;
  background: #ffffff !important;
  color: #1f2937 !important;
  line-height: 1.2 !important;
}

.deal-dashboard-studio table:last-of-type th {
  background: #faf8f1 !important;
  color: #66758a !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.045em !important;
  text-transform: uppercase !important;
}

.deal-dashboard-studio table:last-of-type td {
  font-size: 14px !important;
  font-weight: 700 !important;
}

.deal-dashboard-studio table:last-of-type tr:last-child td {
  border-bottom: 0 !important;
}

.deal-dashboard-studio table:last-of-type th:last-child,
.deal-dashboard-studio table:last-of-type td:last-child {
  border-right: 0 !important;
}

/* column widths */
.deal-dashboard-studio table:last-of-type th:nth-child(1),
.deal-dashboard-studio table:last-of-type td:nth-child(1) { width: 28% !important; }

.deal-dashboard-studio table:last-of-type th:nth-child(2),
.deal-dashboard-studio table:last-of-type td:nth-child(2) { width: 13% !important; }

.deal-dashboard-studio table:last-of-type th:nth-child(3),
.deal-dashboard-studio table:last-of-type td:nth-child(3) { width: 10% !important; }

.deal-dashboard-studio table:last-of-type th:nth-child(4),
.deal-dashboard-studio table:last-of-type td:nth-child(4) { width: 14% !important; }

.deal-dashboard-studio table:last-of-type th:nth-child(5),
.deal-dashboard-studio table:last-of-type td:nth-child(5) { width: 10% !important; }

.deal-dashboard-studio table:last-of-type th:nth-child(6),
.deal-dashboard-studio table:last-of-type td:nth-child(6) { width: 7% !important; }

.deal-dashboard-studio table:last-of-type th:nth-child(7),
.deal-dashboard-studio table:last-of-type td:nth-child(7) {
  width: 18% !important;
  min-width: 170px !important;
}

/* tighten the first column */
.deal-dashboard-studio table:last-of-type td:first-child {
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

/* manage cell becomes a compact flex row */
.deal-dashboard-studio table:last-of-type td:last-child {
  white-space: normal !important;
}

.deal-dashboard-studio table:last-of-type td:last-child > * {
  display: inline-flex !important;
  vertical-align: middle !important;
}

/* kill giant page-button styles inside table */
.deal-dashboard-studio table:last-of-type td:last-child a,
.deal-dashboard-studio table:last-of-type td:last-child button,
.deal-dashboard-studio table:last-of-type td:last-child input[type="submit"],
.deal-dashboard-studio table:last-of-type td:last-child .button {
  min-width: 0 !important;
  width: auto !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  margin: 3px 6px 3px 0 !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #d6dfeb !important;
  background: #ffffff !important;
  color: #1f2937 !important;
}

/* Open */
.deal-dashboard-studio table:last-of-type td:last-child a[href*="open"],
.deal-dashboard-studio table:last-of-type td:last-child a[href*="view"] {
  background: #f3efff !important;
  border-color: #d7cbff !important;
  color: #5b34bc !important;
}

/* Edit */
.deal-dashboard-studio table:last-of-type td:last-child a[href*="edit"] {
  background: #ffffff !important;
  border-color: #9fd7d1 !important;
  color: #12756e !important;
}

/* Delete */
.deal-dashboard-studio table:last-of-type td:last-child a[href*="delete"],
.deal-dashboard-studio table:last-of-type td:last-child button[name*="delete"],
.deal-dashboard-studio table:last-of-type td:last-child form button,
.deal-dashboard-studio table:last-of-type td:last-child .delete {
  background: #fff7f7 !important;
  border-color: #efc1c1 !important;
  color: #b42318 !important;
}

/* reduce giant row height */
.deal-dashboard-studio table:last-of-type tbody tr,
.deal-dashboard-studio table:last-of-type tbody td {
  height: auto !important;
}

/* mobile fallback */
@media (max-width: 980px) {
  .deal-dashboard-studio table:last-of-type {
    display: block !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }

  .deal-dashboard-studio table:last-of-type th,
  .deal-dashboard-studio table:last-of-type td {
    min-width: 120px !important;
  }

  .deal-dashboard-studio table:last-of-type th:last-child,
  .deal-dashboard-studio table:last-of-type td:last-child {
    min-width: 180px !important;
  }
}


/* PDF STUDIO — Insert Text panel */
.pdf-studio .pdf-text-items {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}

.pdf-studio .pdf-text-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe8f3;
  border-radius: 16px;
  background: #ffffff;
}

.pdf-studio .pdf-text-item textarea {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  border: 1px solid #dbe8f3;
  border-radius: 13px;
  padding: 10px 12px;
  font: inherit;
}

.pdf-studio .pdf-text-grid {
  display: grid;
  grid-template-columns: 1fr 72px 72px 92px;
  gap: 8px;
}

.pdf-studio .pdf-text-grid input {
  width: 100%;
}

.pdf-studio #insertTextBtn {
  background: linear-gradient(180deg, #4a6fa5 0%, #35507a 100%) !important;
  color: #ffffff !important;
}

@media (max-width: 900px) {
  .pdf-studio .pdf-text-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* PDF STUDIO — click-to-place text positioning */
.pdf-studio .pdf-text-grid-position {
  grid-template-columns: 1fr 96px !important;
}

.pdf-studio .pdf-text-position-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px dashed #cdb8ff;
  border-radius: 14px;
  background: #fbf8ff;
}

.pdf-studio .pdf-text-position-box strong,
.pdf-studio .pdf-text-position-box span {
  display: block;
}

.pdf-studio .pdf-text-position-box strong {
  color: #35507a;
  font-size: 13px;
  font-weight: 950;
}

.pdf-studio .pdf-text-position-box span {
  margin-top: 3px;
  color: #657288;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.pdf-studio .chooseTextPositionBtn {
  width: 100%;
}

.pdf-studio .chooseTextPositionBtn.is-picking {
  background: #4a6fa5 !important;
  border-color: #4a6fa5 !important;
  color: #ffffff !important;
}

body.pdf-text-position-picking #mainPreviewCanvas {
  cursor: crosshair !important;
  outline: 3px solid rgba(74, 111, 165, 0.28);
  outline-offset: 6px;
}

.pdf-text-position-stage {
  position: relative !important;
}

.pdf-text-position-marker {
  position: absolute;
  z-index: 20;
  transform: translate(-2px, -100%);
  pointer-events: none;
  padding: 4px 8px;
  border-radius: 999px;
  background: #4a6fa5;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(74, 111, 165, 0.24);
}

.pdf-text-position-marker::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: -7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4a6fa5;
  box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.18);
}

@media (max-width: 900px) {
  .pdf-studio .pdf-text-grid-position {
    grid-template-columns: 1fr !important;
  }
}

/* PDF Studio — final click-to-place text UX */
body.pdf-text-position-picking #mainPreviewCanvas {
  cursor: crosshair !important;
  outline: 3px solid rgba(74, 111, 165, 0.28) !important;
  outline-offset: 6px !important;
}

.pdf-text-position-stage {
  position: relative !important;
}

.pdf-text-position-marker {
  position: absolute !important;
  z-index: 50 !important;
  transform: translate(-2px, -100%) !important;
  pointer-events: none !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  background: #4a6fa5 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  box-shadow: 0 10px 22px rgba(74, 111, 165, 0.24) !important;
}

.pdf-text-position-marker::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: -7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4a6fa5;
  box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.18);
}

.pdf-studio .chooseTextPositionBtn.is-picking {
  background: #4a6fa5 !important;
  border-color: #4a6fa5 !important;
  color: #ffffff !important;
}

/* =========================================================
   PDF STUDIO — clean Insert Text UI
   2026-05-18
   ========================================================= */

.pdf-studio .pdf-hidden-coordinate-label,
.pdf-studio label:has(.textX),
.pdf-studio label:has(.textY) {
  display: none !important;
}

.pdf-studio .textX,
.pdf-studio .textY,
.pdf-studio .pdf-hidden-coordinate-input {
  display: none !important;
}

.pdf-studio .pdf-text-grid {
  grid-template-columns: 1fr 92px !important;
}

.pdf-studio .pdf-text-position-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #cdb8ff;
  border-radius: 14px;
  background: #fbf8ff;
}

.pdf-studio .pdf-text-position-box strong,
.pdf-studio .pdf-text-position-box span {
  display: block;
}

.pdf-studio .pdf-text-position-box strong {
  color: #35507a;
  font-size: 13px;
  font-weight: 950;
}

.pdf-studio .pdf-text-position-box span {
  margin-top: 3px;
  color: #657288;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
}

.pdf-studio .chooseTextPositionBtn {
  width: 100%;
}

.pdf-studio .chooseTextPositionBtn.is-picking {
  background: #4a6fa5 !important;
  border-color: #4a6fa5 !important;
  color: #ffffff !important;
}

body.pdf-text-position-picking #mainPreviewCanvas {
  cursor: crosshair !important;
  outline: 3px solid rgba(74, 111, 165, 0.28) !important;
  outline-offset: 6px !important;
}

.pdf-text-position-stage {
  position: relative !important;
}

.pdf-text-position-marker {
  position: absolute !important;
  z-index: 50 !important;
  transform: translate(-2px, -100%) !important;
  pointer-events: none !important;
  max-width: 240px !important;
  padding: 7px 12px !important;
  border-radius: 12px !important;
  background: rgba(74, 111, 165, 0.92) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
  box-shadow: 0 10px 22px rgba(74, 111, 165, 0.24) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.pdf-text-position-marker::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: -7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4a6fa5;
  box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.18);
}

@media (max-width: 900px) {
  .pdf-studio .pdf-text-grid {
    grid-template-columns: 1fr !important;
  }
}

/* PDF STUDIO — text marker offset + live text preview */
.pdf-studio .pdf-hidden-coordinate-label,
.pdf-studio label:has(.textX),
.pdf-studio label:has(.textY) {
  display: none !important;
}

.pdf-studio .textX,
.pdf-studio .textY,
.pdf-studio .pdf-hidden-coordinate-input {
  display: none !important;
}

.pdf-text-position-stage {
  position: relative !important;
}

.pdf-text-position-marker {
  position: absolute !important;
  z-index: 60 !important;

  /*
    Marker appears just above the clicked point.
    The dot below marks the exact click point.
  */
  transform: translate(-8px, calc(-100% - 8px)) !important;

  pointer-events: none !important;
  max-width: 280px !important;
  padding: 7px 11px !important;
  border-radius: 11px !important;
  background: rgba(74, 111, 165, 0.94) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  font-weight: 950 !important;
  box-shadow: 0 10px 22px rgba(74, 111, 165, 0.24) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.pdf-text-position-marker::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: -10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4a6fa5;
  box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.18);
}

body.pdf-text-position-picking #mainPreviewCanvas {
  cursor: crosshair !important;
  outline: 3px solid rgba(74, 111, 165, 0.28) !important;
  outline-offset: 6px !important;
}

.pdf-studio .chooseTextPositionBtn.is-picking {
  background: #4a6fa5 !important;
  border-color: #4a6fa5 !important;
  color: #ffffff !important;
}

/* Logistics dashboard */
.vtsa-page-logistics {
  background: #fffdf4;
}

.vtsa-page-logistics .shell {
  width: 100%;
  min-height: calc(100vh - 64px);
  margin: 0;
  padding: 32px 24px 72px;
  background: linear-gradient(180deg, #fffdf4 0%, #ffffff 44%, #fffdf6 100%);
}

.logistics-page {
  --logistics-yellow: #fff4a8;
  --logistics-pineapple: #ffe15a;
  --logistics-deep-red: #c92f2f;
  --logistics-red-dark: #962525;
  --logistics-ink: #111827;
  --logistics-muted: #64748b;
  --logistics-border: #eadfbd;
  --logistics-surface: rgba(255, 255, 255, 0.94);
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 0;
  color: var(--logistics-ink);
}

.logistics-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  padding: 34px 38px;
  border: 1px solid rgba(234, 179, 8, 0.42);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 244, 168, 0.72), rgba(255, 255, 255, 0.96) 52%),
    var(--logistics-surface);
  box-shadow: 0 18px 42px rgba(151, 101, 17, 0.11);
}

.logistics-hero.compact {
  margin-bottom: 20px;
}

.logistics-hero .eyebrow {
  color: #6b7280;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.logistics-hero h1 {
  margin: 8px 0 10px;
  color: var(--logistics-ink);
  font-size: clamp(38px, 4vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.logistics-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--logistics-muted);
  font-size: 22px;
  line-height: 1.28;
}

.logistics-hero-actions,
.logistics-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.logistics-btn,
.logistics-actions a,
.logistics-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid #d7c89b;
  border-radius: 999px;
  background: #ffffff;
  color: #253044;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.logistics-btn.primary {
  border-color: #b72d2d;
  background: var(--logistics-deep-red);
  color: #ffffff;
}

.logistics-btn.secondary {
  border-color: #d32f2f;
  background: #ffffff;
  color: #253044;
}

.logistics-btn.secondary:nth-of-type(1) {
  border-color: #c62828;
}

.logistics-btn.secondary:nth-of-type(2) {
  border-color: #d32f2f;
}

.logistics-btn.secondary:nth-of-type(3) {
  border-color: #e53935;
}

.logistics-btn.secondary:nth-of-type(4) {
  border-color: #f44336;
}

/* Hero actions detail page button shades */
.logistics-hero.compact .logistics-hero-actions .logistics-btn.secondary:nth-child(1) {
  border-color: #c62828 !important;
}

.logistics-hero.compact .logistics-hero-actions .logistics-btn.secondary:nth-child(2) {
  border-color: #d32f2f !important;
}

.logistics-hero.compact .logistics-hero-actions .logistics-btn.secondary:nth-child(3) {
  border-color: #e53935 !important;
}

.logistics-hero.compact .logistics-hero-actions #openRequestUpdateModal {
  border-color: #f44336 !important;
}

.logistics-btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--logistics-deep-red);
}

.logistics-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.logistics-kpi,
.logistics-panel,
.logistics-form-panel {
  border: 1px solid var(--logistics-border);
  border-radius: 18px;
  background: var(--logistics-surface);
  box-shadow: 0 16px 34px rgba(117, 91, 35, 0.08);
}

.logistics-kpi {
  min-height: 118px;
  padding: 22px 24px;
}

.logistics-kpi span {
  display: block;
  color: #657083;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logistics-kpi strong {
  display: block;
  margin-top: 12px;
  color: var(--logistics-ink);
  font-size: 44px;
  line-height: 1;
}

.logistics-kpi.danger strong {
  color: var(--logistics-deep-red);
}

.logistics-kpi.warning strong {
  color: #b7791f;
}

.logistics-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid rgba(234, 179, 8, 0.38);
  border-radius: 18px;
  background: rgba(255, 248, 199, 0.58);
}

.logistics-filters label,
.logistics-form-grid label,
.logistics-doc-form {
  color: #566275;
  font-size: 13px;
  font-weight: 900;
}

.logistics-filters input,
.logistics-filters select,
.logistics-form-grid input,
.logistics-form-grid select,
.logistics-form-grid textarea,
.logistics-doc-form input,
.logistics-doc-form select {
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  border: 1px solid #d9d0b0;
  border-radius: 12px;
  background: #ffffff;
  color: var(--logistics-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.logistics-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-top: 20px;
}

.logistics-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--logistics-deep-red);
}

.logistics-panel {
  padding: 24px 26px;
  margin-bottom: 18px;
}

.logistics-panel h2,
.transport-section h2 {
  margin: 0 0 8px;
  color: var(--logistics-ink);
  font-size: 26px;
  line-height: 1.1;
}

.logistics-panel h3 {
  margin: 18px 0 10px;
  color: var(--logistics-red-dark);
  font-size: 16px;
  text-transform: uppercase;
}

.logistics-table-wrap {
  overflow-x: auto;
  border: 1px solid #e7ddbd;
  border-radius: 16px;
}

.logistics-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  background: #ffffff;
}

.logistics-table th,
.logistics-table td {
  padding: 15px 16px;
  border-bottom: 1px solid #ece4ca;
  text-align: left;
  vertical-align: top;
}

.logistics-table th {
  background: #fff8d3;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logistics-table td {
  color: #1f2937;
  font-size: 15px;
  font-weight: 700;
}

.logistics-table tr.risk-high td {
  background: rgba(255, 235, 235, 0.64);
}

.logistics-status {
  font-weight: 900;
}

/* ── Continuation sheet loads (shipment detail page) ───────────────────── */
.logistics-cs-panel {
  padding: 24px 26px;
}

.logistics-cs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.logistics-cs-head-text h2 {
  margin: 0 0 4px;
}

.logistics-cs-head-text p {
  margin: 0;
  max-width: 560px;
  color: var(--logistics-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.logistics-cs-upload {
  gap: 8px;
  flex-shrink: 0;
}

.logistics-cs-upload span {
  font-size: 16px;
  line-height: 1;
}

.logistics-cs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.logistics-cs-stat {
  padding: 14px 16px;
  border: 1px solid var(--logistics-border);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 244, 168, 0.46), rgba(255, 255, 255, 0.9));
}

.logistics-cs-stat span {
  display: block;
  color: #657083;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.logistics-cs-stat strong {
  display: block;
  margin-top: 7px;
  color: var(--logistics-ink);
  font-size: 26px;
  line-height: 1;
}

.logistics-cs-stat strong em {
  color: var(--logistics-muted);
  font-size: 16px;
  font-style: normal;
  font-weight: 800;
}

/* QTY reconciliation: CS load total vs contracted (PFI/DRS/LOO) quantity */
.logistics-cs-recon {
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid var(--logistics-border);
  border-left: 5px solid var(--logistics-deep-red);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 244, 168, 0.5), rgba(255, 255, 255, 0.92));
}

.logistics-cs-recon.ok { border-left-color: #1f9d55; }
.logistics-cs-recon.warn { border-left-color: #d97706; }
.logistics-cs-recon.muted { border-left-color: #94a3b8; }

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

.logistics-cs-recon-item span {
  display: block;
  color: #657083;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logistics-cs-recon-item strong {
  display: block;
  margin-top: 6px;
  color: var(--logistics-ink);
  font-size: 28px;
  line-height: 1.05;
}

.logistics-cs-recon-item em {
  display: block;
  margin-top: 5px;
  color: var(--logistics-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.logistics-cs-recon.ok .logistics-cs-recon-item.variance strong { color: #1f9d55; }
.logistics-cs-recon.warn .logistics-cs-recon-item.variance strong { color: #b45309; }

.logistics-cs-recon-bar {
  margin-top: 14px;
  height: 8px;
  border-radius: 999px;
  background: #efe6c6;
  overflow: hidden;
}

.logistics-cs-recon-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--logistics-deep-red);
}

.logistics-cs-recon.ok .logistics-cs-recon-bar span { background: #1f9d55; }
.logistics-cs-recon.warn .logistics-cs-recon-bar span { background: #d97706; }

@media (max-width: 720px) {
  .logistics-cs-recon-grid { grid-template-columns: 1fr; }
}

.logistics-cs-dupwarn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid #f0c98a;
  border-left: 5px solid #d97706;
  border-radius: 14px;
  background: #fff7e6;
}

.logistics-cs-dupwarn strong {
  display: block;
  color: #92400e;
  font-size: 15px;
}

.logistics-cs-dupwarn span {
  display: block;
  margin-top: 3px;
  max-width: 640px;
  color: #a16207;
  font-size: 13px;
  font-weight: 700;
}

.logistics-cs-dupwarn .logistics-btn {
  flex-shrink: 0;
}

.logistics-cs-table-wrap {
  overflow-x: auto;
  border: 1px solid #e7ddbd;
  border-radius: 16px;
}

.logistics-cs-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 13.5px;
}

.logistics-cs-table th {
  padding: 11px 12px;
  background: #fff8d3;
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid #ece4ca;
}

.logistics-cs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1ebd6;
  color: #1f2937;
  font-weight: 700;
  white-space: nowrap;
}

.logistics-cs-table tbody tr:nth-child(even) td {
  background: rgba(255, 248, 199, 0.32);
}

.logistics-cs-table tbody tr:hover td {
  background: rgba(255, 244, 168, 0.5);
}

.logistics-cs-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.logistics-cs-table td.mono {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.01em;
}

.logistics-cs-table td.wide {
  white-space: normal;
  min-width: 150px;
}

.logistics-cs-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.logistics-cs-pill.ok {
  background: #fff4c7;
  color: #8a5b00;
}

.logistics-cs-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.logistics-cs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 28px;
  border: 2px dashed #e2cf94;
  border-radius: 18px;
  background: rgba(255, 248, 199, 0.4);
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.logistics-cs-empty:hover {
  border-color: var(--logistics-deep-red);
  background: rgba(255, 244, 168, 0.62);
  transform: translateY(-1px);
}

.logistics-cs-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--logistics-deep-red);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.logistics-cs-empty strong {
  color: var(--logistics-ink);
  font-size: 18px;
}

.logistics-cs-empty > span:not(.logistics-cs-empty-icon):not(.logistics-btn) {
  max-width: 480px;
  color: var(--logistics-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.logistics-cs-empty .logistics-btn {
  margin-top: 8px;
  pointer-events: none;
}

/* ── Shipment detail: summary bar pills + tabbed layout ─────────────────── */
.logistics-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.logistics-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff4c7;
  color: #8a5b00;
  font-size: 13px;
  font-weight: 900;
}

.logistics-summary-qty {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #cfe8d8;
  background: #eef7f0;
  color: #1f7a44;
  font-size: 13px;
  font-weight: 900;
}

.logistics-summary-qty.warn { background: #fff3e0; color: #b45309; border-color: #f0c98a; }
.logistics-summary-qty.muted { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

/* (tab styles removed — shipment detail is now a single scrolling page) */

.logistics-cs-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--logistics-border);
  border-radius: 12px;
  background: rgba(255, 248, 199, 0.4);
  color: #566275;
  font-size: 13.5px;
  font-weight: 700;
}

.logistics-cs-facts b { color: var(--logistics-ink); font-weight: 900; }

.logistics-cs-dupinline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 9px 16px;
  border: 1px solid #f0c98a;
  border-radius: 999px;
  background: #fff7e6;
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
}

.logistics-cs-dupinline-btn {
  flex-shrink: 0;
  padding: 7px 15px;
  border: 1px solid #b72d2d;
  border-radius: 999px;
  background: var(--logistics-deep-red);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
}

.logistics-cs-table-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.logistics-cs-coltoggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #566275;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.logistics-cs-coltoggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--logistics-deep-red);
}

.logistics-cs-table .cs-col-extra { display: none; }
.logistics-cs-table.show-extra .cs-col-extra { display: table-cell; }

/* Route planning: actual origin -> destination leg headline */
.logistics-leg-estimate {
  margin: 4px 0 16px;
  padding: 16px 18px;
  border: 1px solid var(--logistics-border);
  border-left: 5px solid var(--logistics-deep-red);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 244, 168, 0.5), rgba(255, 255, 255, 0.92));
}

.logistics-leg-route {
  color: var(--logistics-ink);
  font-size: 20px;
  font-weight: 900;
}

.logistics-leg-route span { color: var(--logistics-deep-red); margin: 0 4px; }

.logistics-leg-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 8px;
  color: var(--logistics-muted);
  font-size: 14px;
  font-weight: 700;
}

.logistics-leg-stats strong { color: var(--logistics-ink); font-weight: 900; }
.logistics-leg-stats em { color: #94a3b8; font-style: normal; font-weight: 700; }

/* Route planning: direction, corridor stops, facts, overrides */
.rp-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--logistics-deep-red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  vertical-align: middle;
}

.rp-dir-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}
.rp-dir-inbound { background: #e0f2fe; color: #075985; }
.rp-dir-outbound { background: #dcfce7; color: #166534; }
.rp-dir-domestic { background: #f1f5f9; color: #475569; }

.rp-dir-note {
  margin-top: 4px;
  color: var(--logistics-muted);
  font-size: 13px;
  font-weight: 700;
}

.rp-path { margin: 14px 0 6px; }
.rp-path-head {
  font-size: 13px;
  font-weight: 900;
  color: var(--logistics-ink);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.rp-path-head em {
  color: var(--logistics-muted);
  font-style: normal;
  font-weight: 700;
  margin-left: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.rp-path-stops {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
}
.rp-stop {
  padding: 3px 10px;
  border: 1px solid var(--logistics-border);
  border-radius: 999px;
  background: #fff;
  color: var(--logistics-ink);
  font-size: 12px;
  font-weight: 700;
}
.rp-stop-border {
  border-color: var(--logistics-deep-red);
  background: rgba(201, 47, 47, 0.07);
  color: var(--logistics-deep-red);
  font-weight: 800;
}

.rp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0 4px;
  font-size: 13px;
  color: var(--logistics-muted);
  font-weight: 700;
}
.rp-fact b { color: var(--logistics-ink); font-weight: 900; }
.rp-fact em { font-style: normal; color: var(--logistics-muted); }

.rp-flag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.rp-flag.danger { background: #fee2e2; color: #b91c1c; }
.rp-flag.warn { background: #fef3c7; color: #b45309; }
.rp-flag.ok { background: #dcfce7; color: #166534; }

.rp-plan-note {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 4px solid var(--logistics-deep-red);
  background: rgba(255, 244, 168, 0.4);
  border-radius: 8px;
  color: var(--logistics-ink);
  font-weight: 600;
  font-size: 13px;
}

.rp-muted { color: var(--logistics-muted); font-weight: 700; }

.rp-row-leg { background: rgba(220, 252, 231, 0.5); }
.rp-row-leg td { font-weight: 800; }
.rp-here {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #166534;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

/* ── Buyer tracking portal ─────────────────────────────────────────────── */
.vtsa-portal-body { margin: 0; background: #faf7ef; }

.vtsa-portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: #fffdf5;
  border-bottom: 1px solid var(--logistics-border, #eadfbd);
}

.vtsa-portal-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.vtsa-portal-brand .vtsa-brand-logo { width: 40px; height: 40px; }
.vtsa-portal-wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.vtsa-portal-wordmark strong { font-size: 20px; font-weight: 900; color: #111827; letter-spacing: 0.04em; }
.vtsa-portal-wordmark small { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: #962525; }
.vtsa-portal-actions { display: flex; align-items: center; gap: 14px; }
.vtsa-portal-who { color: #566275; font-weight: 800; font-size: 14px; }
.vtsa-portal-shell { width: min(100%, 1180px); margin: 0 auto; padding: 26px 24px 60px; }

.portal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.portal-ship-card {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--logistics-border, #eadfbd);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 14px 30px rgba(117, 91, 35, 0.07);
  transition: transform .15s ease, border-color .15s ease;
}

.portal-ship-card:hover { transform: translateY(-2px); border-color: var(--logistics-deep-red, #c92f2f); }
.portal-ship-deal { font-size: 22px; font-weight: 900; color: #111827; }
.portal-ship-route { margin-top: 4px; color: #1f2937; font-weight: 700; }
.portal-ship-route span { color: var(--logistics-deep-red, #c92f2f); margin: 0 4px; }
.portal-ship-meta { margin-top: 4px; color: #64748b; font-size: 13px; font-weight: 700; }
.portal-ship-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.portal-ship-eta { color: #64748b; font-size: 13px; font-weight: 800; }
.portal-ship-qty { margin-top: 10px; font-size: 13px; font-weight: 900; color: #1f7a44; }
.portal-ship-qty.warn { color: #b45309; }
.portal-ship-qty.muted { color: #64748b; }

.logistics-flag-row,
.logistics-alert-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}

.logistics-alert-row {
  margin: -4px 0 18px;
}

.logistics-alert {
  margin: -4px 0 18px;
  border: 1px solid var(--logistics-border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 850;
}

.logistics-alert.success {
  border-color: rgba(15, 118, 110, 0.30);
  background: #ecfdf5;
  color: #0f766e;
}

.logistics-alert.danger {
  border-color: rgba(185, 28, 28, 0.30);
  background: #fff1f2;
  color: #991b1b;
}

.logistics-flag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff4c7;
  color: #8a5b00;
  font-size: 12px;
  font-weight: 900;
}

.logistics-flag.danger {
  background: #ffe4e4;
  color: var(--logistics-deep-red);
}

.logistics-flag.warning {
  background: #fff2b8;
  color: #8a5b00;
}

.risk-pill {
  display: inline-flex;
  min-width: 68px;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.risk-pill.medium {
  background: #fff2b8;
  color: #8a5b00;
}

.risk-pill.high {
  background: #ffe1e1;
  color: var(--logistics-deep-red);
}

.logistics-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 250px;
}

.logistics-actions a,
.logistics-actions button {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 10px;
  color: #253044;
  font-size: 12px;
}

.logistics-actions form {
  margin: 0;
}

/* Compact logistics register: match the tighter PO/PFI record lists. */
.logistics-table {
  table-layout: fixed !important;
  min-width: 1068px !important;
}

.logistics-table th,
.logistics-table td {
  padding: 5px 7px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: middle !important;
}

.logistics-table th {
  font-size: 10px !important;
  letter-spacing: 0.08em !important;
  white-space: nowrap !important;
}

.logistics-table td {
  font-size: 11px !important;
  line-height: 1.14 !important;
}

.logistics-table td strong {
  font-size: 11.5px !important;
  line-height: 1.05 !important;
}

.logistics-table td span:not(.logistics-status):not(.risk-pill):not(.logistics-flag) {
  color: #64748b !important;
  font-size: 10.5px !important;
  font-weight: 750 !important;
  line-height: 1.05 !important;
}

.logistics-status,
.risk-pill,
.logistics-flag {
  max-width: 100% !important;
  min-height: 22px !important;
  min-width: 0 !important;
  padding: 0 7px !important;
  font-size: 10px !important;
  line-height: 20px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.logistics-status {
  display: inline-flex !important;
  align-items: center !important;
  border-radius: 999px !important;
  background: #fff4c7 !important;
  color: #8a5b00 !important;
}

.logistics-flag-row {
  gap: 4px !important;
  margin-top: 0 !important;
}

.logistics-actions {
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  min-width: 0 !important;
  max-width: 188px !important;
  flex-wrap: nowrap !important;
}

.logistics-actions form {
  display: inline-flex !important;
  margin: 0 !important;
}

.logistics-actions a,
.logistics-actions button {
  align-items: center !important;
  border: 1px solid rgba(151, 101, 17, 0.32) !important;
  background: #ffffff !important;
  color: #1f2937 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  font-family: inherit !important;
  font-weight: 900 !important;
  justify-content: center !important;
  min-height: 24px !important;
  height: 24px !important;
  min-width: 0 !important;
  padding: 0 7px !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  line-height: 22px !important;
  text-decoration: none !important;
}

.logistics-actions button.danger {
  border-color: rgba(201, 47, 47, 0.38) !important;
  color: var(--logistics-red-dark) !important;
}

/* Final compact Logistics page sizing: keep it aligned with PO/PFI registers. */
.vtsa-page-logistics .shell {
  width: min(1180px, calc(100vw - 48px)) !important;
  margin: 18px auto 42px !important;
  padding: 0 !important;
}

.logistics-page {
  width: 100% !important;
  max-width: 1180px !important;
}

.logistics-hero {
  align-items: center !important;
  gap: 16px !important;
  margin-bottom: 14px !important;
  padding: 22px 26px !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 24px rgba(151, 101, 17, 0.08) !important;
}

.logistics-hero .eyebrow {
  font-size: 11px !important;
  letter-spacing: 0.04em !important;
}

.logistics-hero h1 {
  margin: 5px 0 7px !important;
  font-size: 42px !important;
  line-height: 0.98 !important;
}

.logistics-hero p {
  max-width: 760px !important;
  font-size: 16px !important;
  line-height: 1.26 !important;
}

.logistics-hero-actions,
.logistics-form-actions {
  gap: 8px !important;
}

.logistics-btn {
  min-height: 32px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
}

.logistics-kpis {
  grid-template-columns: repeat(4, minmax(160px, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.logistics-kpi {
  min-height: 78px !important;
  padding: 14px 16px !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 18px rgba(117, 91, 35, 0.055) !important;
}

.logistics-kpi span {
  font-size: 10.5px !important;
  letter-spacing: 0.08em !important;
}

.logistics-kpi strong {
  margin-top: 7px !important;
  font-size: 30px !important;
}

.logistics-filters {
  grid-template-columns: repeat(6, minmax(128px, 1fr)) !important;
  gap: 8px 10px !important;
  margin-bottom: 12px !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
}

.logistics-filters label {
  font-size: 10.5px !important;
}

.logistics-filters input,
.logistics-filters select {
  min-height: 34px !important;
  margin-top: 5px !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

.logistics-check {
  min-height: 34px !important;
  margin-top: 14px !important;
  gap: 7px !important;
}

.logistics-check input {
  width: 14px !important;
  height: 14px !important;
}

.logistics-panel {
  padding: 10px 12px !important;
  border-radius: 14px !important;
  margin-bottom: 12px !important;
  box-shadow: 0 8px 18px rgba(117, 91, 35, 0.055) !important;
}

.logistics-panel h2,
.transport-section h2 {
  margin-bottom: 0 !important;
  font-size: 18px !important;
}

.logistics-table-wrap {
  border-radius: 12px !important;
  margin-top: 6px !important;
}

.logistics-panel > .logistics-hero-actions {
  align-items: center !important;
  margin-bottom: 0 !important;
}

.logistics-panel > .logistics-hero-actions .logistics-btn {
  min-height: 28px !important;
  padding: 0 12px !important;
  font-size: 11px !important;
}

.logistics-table tbody tr {
  height: 42px !important;
}

.logistics-table tbody td {
  height: 42px !important;
}

.logistics-form-panel {
  padding: 24px;
}

.logistics-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
}

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

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

.transport-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #eadfbd;
}

.logistics-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

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

.logistics-summary div {
  padding: 12px;
  border: 1px solid #eee3c3;
  border-radius: 12px;
  background: #fffdf5;
}

.logistics-summary dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.logistics-summary dd {
  margin: 5px 0 0;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

.logistics-summary.compact-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.logistics-notes {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: #fff8d3;
  color: #4b5563;
  font-weight: 700;
}

.logistics-doc-form {
  display: grid;
  grid-template-columns: 180px minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.logistics-doc-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.logistics-doc-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #eee3c3;
  border-radius: 12px;
  background: #fffdf5;
  color: #111827;
  text-decoration: none;
}

.logistics-doc-list span {
  color: #64748b;
  font-weight: 700;
}

.timeline-entry {
  position: relative;
  padding: 16px 18px 16px 22px;
  border: 1px solid #eee3c3;
  border-left: 5px solid var(--logistics-deep-red);
  border-radius: 14px;
  background: #fffdf5;
}

.timeline-entry time,
.timeline-entry span {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.timeline-entry strong {
  display: block;
  margin: 6px 0;
  color: #111827;
  font-size: 18px;
}

.timeline-entry p {
  margin: 8px 0 0;
  color: #374151;
  font-weight: 700;
}

.logistics-shipment-timeline-panel {
  overflow: hidden;
}

.logistics-quick-update-panel {
  background: #fffef9 !important;
}

.logistics-quick-update-panel .logistics-timeline-heading {
  margin-bottom: 10px;
}

.logistics-quick-update-panel .logistics-timeline-heading span {
  background: #eef7f4;
  color: #1e3a5f;
}

.logistics-quick-update-form {
  align-items: end;
  display: grid;
  grid-template-columns: 180px minmax(180px, 1fr) 150px 150px minmax(220px, 1.1fr) minmax(220px, 0.9fr);
  gap: 10px;
}

.logistics-quick-update-form label {
  color: #475569;
  display: grid;
  gap: 5px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.logistics-quick-update-form input,
.logistics-quick-update-form select,
.logistics-quick-update-form textarea {
  border: 1px solid #e4d7ac;
  border-radius: 8px;
  color: #111827;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  min-height: 38px;
  padding: 8px 10px;
  text-overflow: ellipsis;
  width: 100%;
}

.logistics-quick-update-form textarea {
  line-height: 1.25;
  min-height: 42px;
  resize: vertical;
}

.logistics-quick-update-form .logistics-wide {
  grid-column: auto;
}

.logistics-timeline-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.logistics-timeline-heading h2 {
  margin: 0;
}

.logistics-timeline-heading span {
  border: 1px solid var(--logistics-border);
  border-radius: 999px;
  background: #fff8d3;
  color: var(--logistics-red-dark);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 11px;
}

.logistics-shipment-timeline-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(560px, 1.28fr);
  gap: 14px;
  min-height: 560px;
}

.logistics-shipment-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 6px;
  position: relative;
  z-index: 2;
  scrollbar-color: #d8c99e transparent;
  scrollbar-width: thin;
}

.logistics-shipment-timeline-entry {
  border-left: 4px solid var(--logistics-deep-red);
  border-radius: 10px;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  overflow: visible;
  padding: 10px 12px 10px 16px;
  background: #fffef9;
}

.logistics-shipment-timeline-entry:target {
  outline: 3px solid rgba(201, 47, 47, 0.2);
  outline-offset: 3px;
}

.logistics-shipment-timeline-entry time {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.logistics-shipment-timeline-entry strong {
  color: #111827;
  font-size: 14px;
  line-height: 1.2;
  margin: 0;
  overflow-wrap: anywhere;
}

.logistics-shipment-timeline-entry span,
.logistics-shipment-timeline-entry p {
  color: #64748b;
  font-size: 11.5px;
  font-weight: 850;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

.logistics-shipment-timeline-entry p {
  border-top: 1px solid #f1e7c9;
  color: #334155;
  margin-top: 4px;
  padding-top: 5px;
}

.logistics-update-actions {
  border-top: 1px solid #eee3c3;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 6px;
  padding-top: 6px;
}

.logistics-update-edit {
  display: contents;
}

.logistics-update-edit summary {
  align-items: center;
  background: #fff4a8;
  border: 1px solid #d7b84a;
  border-radius: 999px;
  color: #7a4a00;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 32px;
  min-width: 124px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  list-style: none;
  text-decoration: none;
  white-space: nowrap;
}

.logistics-update-edit summary::-webkit-details-marker {
  display: none;
}

.logistics-update-edit form {
  display: grid;
  flex: 1 0 100%;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 9px;
  order: 3;
}

.logistics-update-edit label {
  color: #475569;
  display: grid;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
}

.logistics-update-edit input,
.logistics-update-edit select,
.logistics-update-edit textarea {
  border: 1px solid #e4d7ac;
  border-radius: 7px;
  color: #111827;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  min-height: 30px;
  padding: 6px 8px;
  width: 100%;
}

.logistics-update-edit .logistics-wide {
  grid-column: 1 / -1;
}

.logistics-update-edit button {
  justify-self: start;
}

.logistics-update-delete-form {
  margin: 0;
  order: 2;
}

.logistics-update-delete-form .logistics-btn.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px !important;
  min-width: 124px;
  padding: 0 14px !important;
  border-color: #c63a3a !important;
  background: #fff1f2 !important;
  color: #991b1b !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.logistics-edit-panel {
  margin-bottom: 18px;
}

.logistics-edit-summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  list-style: none;
}

.logistics-edit-summary::-webkit-details-marker {
  display: none;
}

.logistics-edit-summary span {
  color: var(--logistics-ink);
  font-size: 22px;
  font-weight: 900;
}

.logistics-edit-summary small {
  color: var(--logistics-muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.logistics-edit-summary::after {
  align-items: center;
  border: 1px solid var(--logistics-border);
  border-radius: 999px;
  color: var(--logistics-red-dark);
  content: "Edit";
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  padding: 0 12px;
}

.logistics-edit-panel[open] .logistics-edit-summary {
  margin-bottom: 18px;
}

.logistics-edit-panel[open] .logistics-edit-summary::after {
  content: "Close";
}

.logistics-edit-form {
  border-top: 1px solid var(--logistics-border);
  padding-top: 20px;
}

.logistics-edit-form .transport-section {
  margin: 8px 0 0;
}

.logistics-add-deal-panel {
  margin-bottom: 18px;
}

.logistics-add-deal-panel .logistics-edit-summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  list-style: none;
}

.logistics-add-deal-panel .logistics-edit-summary span {
  color: var(--logistics-ink);
  font-size: 22px;
  font-weight: 900;
}

.logistics-add-deal-panel .logistics-edit-summary small {
  color: var(--logistics-muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.logistics-add-deal-panel .logistics-edit-summary::after {
  align-items: center;
  border: 1px solid var(--logistics-border);
  border-radius: 999px;
  color: #2514a8;
  content: "Import";
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  padding: 0 12px;
}

.logistics-add-deal-panel[open] .logistics-edit-summary {
  margin-bottom: 18px;
}

.logistics-add-deal-panel[open] .logistics-edit-summary::after {
  content: "Close";
}

.logistics-add-deal-form {
  border-top: 1px solid var(--logistics-border);
  padding-top: 20px;
}

/* Modal Styles */
.logistics-modal {
  border: 1px solid var(--logistics-border);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  padding: 0;
  width: 90vw;
}

.logistics-modal::backdrop {
  background-color: rgba(0, 0, 0, 0.4);
}

.logistics-modal-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.logistics-modal-content h2 {
  color: var(--logistics-ink);
  font-size: 20px;
  font-weight: 900;
  margin: 0;
}

.logistics-modal-content label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.logistics-modal-content label > :not(span) {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--logistics-border);
  border-radius: 6px;
  background-color: var(--logistics-panel);
  color: var(--logistics-ink);
}

.logistics-modal-content textarea {
  resize: vertical;
}

.logistics-modal-help {
  margin: -4px 0 0;
  color: var(--logistics-muted);
  font-size: 13px;
  line-height: 1.35;
}

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

.logistics-route-map {
  align-self: stretch;
  border: 1px solid #d6c994;
  border-radius: 10px;
  margin-left: 0;
  min-height: 560px;
  overflow: hidden;
  position: relative;
  background: #eef3f5;
}

.route-map-empty {
  color: var(--logistics-muted);
  left: 50%;
  margin: 0;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, calc(100% - 32px));
}

.logistics-route-map .leaflet-container {
  font-family: inherit;
}

.logistics-route-map .leaflet-control-zoom a {
  color: #334155;
  font-weight: 900;
}

.shipment-map-pin-wrap {
  background: transparent;
  border: 0;
}

.shipment-map-pin {
  background: #e49a28;
  border: 3px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(23, 32, 42, 0.2);
  display: block;
  height: 18px;
  width: 18px;
}

.shipment-map-pin.is-latest {
  background: var(--logistics-deep-red);
  height: 22px;
  width: 22px;
}

.leaflet-popup-content {
  color: #111827;
  font-weight: 800;
}

.leaflet-popup-content strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}

@media (max-width: 1180px) {
  .logistics-quick-update-form {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .logistics-quick-update-form .logistics-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1000px) {
  .logistics-detail-grid {
    grid-template-columns: 1fr;
  }

  .logistics-shipment-timeline-layout {
    grid-template-columns: 1fr;
  }

  .logistics-shipment-timeline-list {
    max-height: none;
  }

  .logistics-route-map {
    margin-left: 0;
    min-height: 460px;
  }

  .logistics-hero {
    display: grid;
  }

  .logistics-kpis,
  .logistics-filters,
  .logistics-form-grid,
  .logistics-form-grid.single,
  .logistics-summary,
  .logistics-summary.compact-list,
  .logistics-doc-form {
    grid-template-columns: 1fr;
  }

  .logistics-hero-actions,
  .logistics-form-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .logistics-page {
    padding: 12px 10px 40px;
  }

  .logistics-hero,
  .logistics-panel,
  .logistics-form-panel {
    padding: 20px;
    border-radius: 18px;
  }

  .logistics-hero h1 {
    font-size: 36px;
  }

  .logistics-hero p {
    font-size: 17px;
  }

  .logistics-shipment-timeline-entry {
    min-height: 0;
    padding: 12px 14px 12px 18px;
  }

  .logistics-shipment-timeline-entry time {
    font-size: 12px;
  }

  .logistics-shipment-timeline-entry strong {
    font-size: 15px;
  }

  .logistics-shipment-timeline-entry span,
  .logistics-shipment-timeline-entry p {
    font-size: 12px;
  }
}

/* Accounting explicit class fallback */
.accounting-card {
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 240, 178, 0.72) 0, rgba(255, 240, 178, 0.32) 28%, transparent 54%),
    linear-gradient(135deg, #fffdf7 0%, #ffffff 64%, #fff8e6 100%) !important;
  border: 1px solid #f6caca !important;
  box-shadow:
    0 18px 42px rgba(185, 28, 28, 0.08),
    0 0 0 1px rgba(255, 214, 102, 0.18) inset !important;
}

.accounting-card .tool-icon,
.accounting-card .office-icon,
.accounting-card .card-icon,
.accounting-card .icon-box {
  background:
    radial-gradient(circle at 30% 18%, #fff6bf 0%, #ffe9a8 42%, #ffe0dc 100%) !important;
  border: 1px solid #ffd7b8 !important;
  color: #d73535 !important;
}

.accounting-card svg {
  color: #d73535 !important;
  stroke: #d73535 !important;
}

.accounting-card h2,
.accounting-card h3,
.accounting-card .card-title {
  color: #050505 !important;
}

.accounting-card p,
.accounting-card .card-subtitle,
.accounting-card .muted {
  color: #5f6c7f !important;
}


/* =========================================================
   ACCOUNTING — Logistics-style design using accounting palette
   Palette:
   #ffada9 soft red
   #ff6057 red
   #ff1206 strong red
   #b30900 deep red
   Pastel yellow backing
   ========================================================= */

/* Office Tools accounting card */
.office-tool-accounting,
.app-card.office-tool-accounting,
.suite-card.office-tool-accounting {
  background:
    radial-gradient(circle at 14% 14%,
      rgba(255, 244, 184, 0.90) 0%,
      rgba(255, 244, 184, 0.44) 30%,
      rgba(255,255,255,0) 58%),
    linear-gradient(135deg, #fffdf7 0%, #ffffff 62%, #fff8e6 100%) !important;
  border: 1px solid rgba(255, 96, 87, 0.34) !important;
  box-shadow:
    0 18px 42px rgba(179, 9, 0, 0.08),
    0 0 0 1px rgba(255, 244, 184, 0.26) inset !important;
}

.office-tool-accounting .app-icon,
.office-tool-accounting .office-icon,
.office-tool-accounting .tool-icon,
.office-tool-accounting .card-icon {
  background:
    radial-gradient(circle at 30% 20%,
      #fff4b8 0%,
      #ffe9a8 45%,
      #ffdad7 100%) !important;
  border: 1px solid #ffd2c8 !important;
  color: #d73535 !important;
  box-shadow:
    0 12px 28px rgba(215, 53, 53, 0.10),
    inset 0 0 0 1px rgba(255,255,255,0.72) !important;
}

.office-tool-accounting svg,
.office-tool-accounting svg *,
.office-tool-accounting i {
  color: #d73535 !important;
  stroke: #d73535 !important;
}

.office-tool-accounting:hover {
  border-color: rgba(255, 18, 6, 0.42) !important;
  box-shadow:
    0 22px 48px rgba(179, 9, 0, 0.12),
    0 0 0 1px rgba(255, 244, 184, 0.32) inset !important;
}

/* Accounting dashboard shell — match Logistics page proportions */
.accounting-logistics-shell {
  --acc-soft: #ffada9;
  --acc-red: #ff6057;
  --acc-strong: #ff1206;
  --acc-deep: #b30900;
  --acc-yellow: #fff4b8;
  --acc-yellow-soft: #fff9df;
  --acc-ink: #111827;
  --acc-muted: #64748b;
  --acc-line: #ead8c2;

  width: min(1360px, calc(100vw - 72px)) !important;
  max-width: 1360px !important;
  margin: 0 auto !important;
  padding: 38px 0 72px !important;
  box-sizing: border-box !important;
}

/* Hero/top block */
.accounting-logistics-shell > section:first-child,
.accounting-logistics-shell .page-hero,
.accounting-logistics-shell .dashboard-hero,
.accounting-logistics-shell .accounting-hero {
  position: relative !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 8% 16%,
      rgba(255, 244, 184, 0.90) 0%,
      rgba(255, 244, 184, 0.42) 30%,
      rgba(255,255,255,0) 58%),
    radial-gradient(circle at 96% 16%,
      rgba(255, 173, 169, 0.32) 0%,
      rgba(255, 173, 169, 0.14) 34%,
      rgba(255,255,255,0) 62%),
    linear-gradient(135deg, #fffdf7 0%, #ffffff 64%, #fff8e6 100%) !important;
  border: 1px solid rgba(255, 96, 87, 0.34) !important;
  border-radius: 30px !important;
  box-shadow:
    0 24px 60px rgba(179, 9, 0, 0.08),
    0 0 0 1px rgba(255, 244, 184, 0.35) inset !important;
  padding: 36px 44px !important;
  margin: 0 0 22px !important;
}

/* Headings */
.accounting-logistics-shell h1 {
  color: #050505 !important;
  font-size: clamp(44px, 4.6vw, 74px) !important;
  line-height: 0.9 !important;
  letter-spacing: -0.065em !important;
  margin: 6px 0 12px !important;
}

.accounting-logistics-shell h2 {
  color: #050505 !important;
  font-size: clamp(24px, 2.1vw, 36px) !important;
  line-height: 0.96 !important;
  letter-spacing: -0.045em !important;
}

.accounting-logistics-shell .eyeline,
.accounting-logistics-shell .kicker,
.accounting-logistics-shell small,
.accounting-logistics-shell .section-label {
  color: var(--acc-deep) !important;
  letter-spacing: 0.16em !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
}

.accounting-logistics-shell p,
.accounting-logistics-shell .muted {
  color: var(--acc-muted) !important;
}

/* KPI grid: same clean logistics card rhythm */
.accounting-logistics-shell .kpi-grid,
.accounting-logistics-shell .stats-grid,
.accounting-logistics-shell .metric-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin: 18px 0 24px !important;
}

.accounting-logistics-shell .kpi-card,
.accounting-logistics-shell .stat-card,
.accounting-logistics-shell .metric-card,
.accounting-logistics-shell .summary-card {
  background: #ffffff !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.055) !important;
  padding: 18px 20px !important;
}

/* Warning/review cards get the yellow-red accounting wash */
.accounting-logistics-shell .kpi-card:nth-child(3n),
.accounting-logistics-shell .stat-card:nth-child(3n),
.accounting-logistics-shell .summary-card:nth-child(3n) {
  background: linear-gradient(135deg, #fffdf7 0%, var(--acc-yellow-soft) 100%) !important;
  border-color: rgba(255, 96, 87, 0.28) !important;
}

/* Panels */
.accounting-logistics-shell .panel,
.accounting-logistics-shell .card,
.accounting-logistics-shell .section-card,
.accounting-logistics-shell .dashboard-card,
.accounting-logistics-shell .table-card {
  background: #ffffff !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 22px !important;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.06) !important;
  padding: 22px !important;
  margin: 18px 0 !important;
}

/* Attention/status chips */
.accounting-logistics-shell .attention-grid,
.accounting-logistics-shell .checks-grid,
.accounting-logistics-shell .issue-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.accounting-logistics-shell .attention-grid > *,
.accounting-logistics-shell .checks-grid > *,
.accounting-logistics-shell .issue-grid > *,
.accounting-logistics-shell .status-chip,
.accounting-logistics-shell .issue-chip {
  background: #fffdf7 !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 14px !important;
  color: var(--acc-ink) !important;
  font-weight: 850 !important;
}

/* Tables */
.accounting-logistics-shell table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--acc-line) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.accounting-logistics-shell th {
  background: #fff9e8 !important;
  color: #657288 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: 0.045em !important;
  text-transform: uppercase !important;
  padding: 13px 14px !important;
}

.accounting-logistics-shell td {
  background: #ffffff !important;
  color: var(--acc-ink) !important;
  border-top: 1px solid #efe4d4 !important;
  padding: 13px 14px !important;
}

/* Buttons */
.accounting-logistics-shell .button-primary,
.accounting-logistics-shell button[type="submit"],
.accounting-logistics-shell a[href*="export"],
.accounting-logistics-shell a[href*="download"] {
  background: linear-gradient(135deg, var(--acc-red) 0%, var(--acc-deep) 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  font-weight: 950 !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 34px rgba(179, 9, 0, 0.18) !important;
}

.accounting-logistics-shell .button-secondary,
.accounting-logistics-shell a[href*="open"],
.accounting-logistics-shell a[href*="review"] {
  background: #ffffff !important;
  border: 1px solid var(--acc-line) !important;
  color: var(--acc-deep) !important;
  font-weight: 900 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05) !important;
}

/* Prevent the page feeling tiny/narrow */
main.shell:has(.accounting-logistics-shell),
.shell:has(.accounting-logistics-shell) {
  width: 100% !important;
  max-width: none !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Responsive */
@media (max-width: 1100px) {
  .accounting-logistics-shell {
    width: min(100%, calc(100vw - 36px)) !important;
  }

  .accounting-logistics-shell .kpi-grid,
  .accounting-logistics-shell .stats-grid,
  .accounting-logistics-shell .metric-grid,
  .accounting-logistics-shell .attention-grid,
  .accounting-logistics-shell .checks-grid,
  .accounting-logistics-shell .issue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .accounting-logistics-shell {
    width: min(100%, calc(100vw - 24px)) !important;
    padding-top: 24px !important;
  }

  .accounting-logistics-shell .kpi-grid,
  .accounting-logistics-shell .stats-grid,
  .accounting-logistics-shell .metric-grid,
  .accounting-logistics-shell .attention-grid,
  .accounting-logistics-shell .checks-grid,
  .accounting-logistics-shell .issue-grid {
    grid-template-columns: 1fr !important;
  }

  .accounting-logistics-shell h1 {
    font-size: 42px !important;
  }
}


/* =========================================================
   ACCOUNTING — FINAL RED PALETTE LOGISTICS-STYLE OVERRIDE
   Palette:
   #ffada9 soft red
   #ff6057 main red
   #ff1206 strong red
   #b30900 deep red
   ========================================================= */

.accounting-logistics-shell {
  --acc-soft: #ffada9;
  --acc-red: #ff6057;
  --acc-strong: #ff1206;
  --acc-deep: #b30900;
  --acc-pale: #fff1f0;
  --acc-pale-2: #ffe4e2;
  --acc-ink: #111827;
  --acc-muted: #64748b;
  --acc-line: rgba(255, 96, 87, 0.24);

  width: min(1360px, calc(100vw - 72px)) !important;
  max-width: 1360px !important;
  margin: 0 auto !important;
  padding: 38px 0 72px !important;
  box-sizing: border-box !important;
}

/* Office Tools accounting card */
.office-tool-accounting,
.app-card.office-tool-accounting,
.suite-card.office-tool-accounting {
  background:
    radial-gradient(circle at 12% 12%,
      rgba(255, 173, 169, 0.52) 0%,
      rgba(255, 173, 169, 0.22) 32%,
      rgba(255,255,255,0) 58%),
    linear-gradient(135deg, #fff7f6 0%, #ffffff 62%, #fff1f0 100%) !important;
  border: 1px solid rgba(255, 96, 87, 0.34) !important;
  box-shadow:
    0 18px 42px rgba(179, 9, 0, 0.08),
    0 0 0 1px rgba(255, 173, 169, 0.22) inset !important;
}

.office-tool-accounting .app-icon,
.office-tool-accounting .office-icon,
.office-tool-accounting .tool-icon,
.office-tool-accounting .card-icon {
  background:
    radial-gradient(circle at 30% 20%,
      #fff0ef 0%,
      #ffdad7 45%,
      #ffada9 100%) !important;
  border: 1px solid rgba(255, 96, 87, 0.28) !important;
  color: #b30900 !important;
  box-shadow:
    0 12px 28px rgba(179, 9, 0, 0.10),
    inset 0 0 0 1px rgba(255,255,255,0.72) !important;
}

.office-tool-accounting svg,
.office-tool-accounting svg *,
.office-tool-accounting i {
  color: #b30900 !important;
  stroke: #b30900 !important;
}

.office-tool-accounting:hover {
  border-color: rgba(255, 18, 6, 0.48) !important;
  box-shadow:
    0 22px 48px rgba(179, 9, 0, 0.13),
    0 0 0 1px rgba(255, 173, 169, 0.28) inset !important;
}

/* Accounting dashboard hero */
.accounting-logistics-shell > section:first-child,
.accounting-logistics-shell .page-hero,
.accounting-logistics-shell .dashboard-hero,
.accounting-logistics-shell .accounting-hero {
  position: relative !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 7% 18%,
      rgba(255, 173, 169, 0.50) 0%,
      rgba(255, 173, 169, 0.20) 32%,
      rgba(255,255,255,0) 60%),
    radial-gradient(circle at 96% 18%,
      rgba(255, 96, 87, 0.20) 0%,
      rgba(255, 96, 87, 0.10) 34%,
      rgba(255,255,255,0) 62%),
    linear-gradient(135deg, #fff7f6 0%, #ffffff 64%, #fff1f0 100%) !important;
  border: 1px solid rgba(255, 96, 87, 0.34) !important;
  border-radius: 30px !important;
  box-shadow:
    0 24px 60px rgba(179, 9, 0, 0.08),
    0 0 0 1px rgba(255, 173, 169, 0.26) inset !important;
  padding: 36px 44px !important;
  margin: 0 0 22px !important;
}

/* Headings */
.accounting-logistics-shell h1 {
  color: #050505 !important;
  font-size: clamp(44px, 4.6vw, 74px) !important;
  line-height: 0.9 !important;
  letter-spacing: -0.065em !important;
  margin: 6px 0 12px !important;
}

.accounting-logistics-shell h2 {
  color: #050505 !important;
  font-size: clamp(24px, 2.1vw, 36px) !important;
  line-height: 0.96 !important;
  letter-spacing: -0.045em !important;
}

.accounting-logistics-shell .eyeline,
.accounting-logistics-shell .kicker,
.accounting-logistics-shell small,
.accounting-logistics-shell .section-label {
  color: var(--acc-deep) !important;
  letter-spacing: 0.16em !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
}

.accounting-logistics-shell p,
.accounting-logistics-shell .muted {
  color: var(--acc-muted) !important;
}

/* KPI grid */
.accounting-logistics-shell .kpi-grid,
.accounting-logistics-shell .stats-grid,
.accounting-logistics-shell .metric-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin: 18px 0 24px !important;
}

/* KPI cards */
.accounting-logistics-shell .kpi-card,
.accounting-logistics-shell .stat-card,
.accounting-logistics-shell .metric-card,
.accounting-logistics-shell .summary-card {
  background:
    linear-gradient(135deg, #ffffff 0%, #fffafa 100%) !important;
  border: 1px solid rgba(255, 96, 87, 0.22) !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(179, 9, 0, 0.055) !important;
  padding: 18px 20px !important;
}

.accounting-logistics-shell .kpi-card:nth-child(3n),
.accounting-logistics-shell .stat-card:nth-child(3n),
.accounting-logistics-shell .summary-card:nth-child(3n) {
  background:
    linear-gradient(135deg, #fff7f6 0%, #ffe4e2 100%) !important;
  border-color: rgba(255, 96, 87, 0.34) !important;
}

/* Panels */
.accounting-logistics-shell .panel,
.accounting-logistics-shell .card,
.accounting-logistics-shell .section-card,
.accounting-logistics-shell .dashboard-card,
.accounting-logistics-shell .table-card {
  background: #ffffff !important;
  border: 1px solid rgba(255, 96, 87, 0.22) !important;
  border-radius: 22px !important;
  box-shadow: 0 18px 44px rgba(179, 9, 0, 0.055) !important;
  padding: 22px !important;
  margin: 18px 0 !important;
}

/* Attention chips */
.accounting-logistics-shell .attention-grid,
.accounting-logistics-shell .checks-grid,
.accounting-logistics-shell .issue-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.accounting-logistics-shell .attention-grid > *,
.accounting-logistics-shell .checks-grid > *,
.accounting-logistics-shell .issue-grid > *,
.accounting-logistics-shell .status-chip,
.accounting-logistics-shell .issue-chip {
  background: #fff7f6 !important;
  border: 1px solid rgba(255, 96, 87, 0.24) !important;
  border-radius: 14px !important;
  color: var(--acc-ink) !important;
  font-weight: 850 !important;
}

/* Tables */
.accounting-logistics-shell table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid rgba(255, 96, 87, 0.22) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.accounting-logistics-shell th {
  background: #fff1f0 !important;
  color: #6b7280 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: 0.045em !important;
  text-transform: uppercase !important;
  padding: 13px 14px !important;
}

.accounting-logistics-shell td {
  background: #ffffff !important;
  color: var(--acc-ink) !important;
  border-top: 1px solid rgba(255, 96, 87, 0.16) !important;
  padding: 13px 14px !important;
}

/* Buttons */
.accounting-logistics-shell .button-primary,
.accounting-logistics-shell button[type="submit"],
.accounting-logistics-shell a[href*="export"],
.accounting-logistics-shell a[href*="download"] {
  background: linear-gradient(135deg, #ff6057 0%, #b30900 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  font-weight: 950 !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 34px rgba(179, 9, 0, 0.20) !important;
}

.accounting-logistics-shell .button-secondary,
.accounting-logistics-shell a[href*="open"],
.accounting-logistics-shell a[href*="review"] {
  background: #ffffff !important;
  border: 1px solid rgba(255, 96, 87, 0.24) !important;
  color: var(--acc-deep) !important;
  font-weight: 900 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 24px rgba(179, 9, 0, 0.045) !important;
}

/* Remove beige/yellow leftovers from old accounting dashboard */
.accounting-logistics-shell [style*="#fff9"],
.accounting-logistics-shell [style*="#fff4"],
.accounting-logistics-shell [style*="#ead8"] {
  border-color: rgba(255, 96, 87, 0.22) !important;
}

/* Shell width */
main.shell:has(.accounting-logistics-shell),
.shell:has(.accounting-logistics-shell) {
  width: 100% !important;
  max-width: none !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Responsive */
@media (max-width: 1100px) {
  .accounting-logistics-shell {
    width: min(100%, calc(100vw - 36px)) !important;
  }

  .accounting-logistics-shell .kpi-grid,
  .accounting-logistics-shell .stats-grid,
  .accounting-logistics-shell .metric-grid,
  .accounting-logistics-shell .attention-grid,
  .accounting-logistics-shell .checks-grid,
  .accounting-logistics-shell .issue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .accounting-logistics-shell {
    width: min(100%, calc(100vw - 24px)) !important;
    padding-top: 24px !important;
  }

  .accounting-logistics-shell .kpi-grid,
  .accounting-logistics-shell .stats-grid,
  .accounting-logistics-shell .metric-grid,
  .accounting-logistics-shell .attention-grid,
  .accounting-logistics-shell .checks-grid,
  .accounting-logistics-shell .issue-grid {
    grid-template-columns: 1fr !important;
  }

  .accounting-logistics-shell h1 {
    font-size: 42px !important;
  }
}


/* =========================================================
   ACCOUNTING — RED PALETTE LOGISTICS-STYLE DESIGN
   Palette:
   #ffada9 soft red
   #ff6057 main red
   #ff1206 strong red
   #b30900 deep red
   ========================================================= */

/* Office Tools Accounting card */
.office-tool-accounting,
.app-card.office-tool-accounting,
.suite-card.office-tool-accounting {
  background:
    radial-gradient(circle at 14% 14%,
      rgba(255, 173, 169, 0.62) 0%,
      rgba(255, 173, 169, 0.24) 34%,
      rgba(255,255,255,0) 62%),
    linear-gradient(135deg, #fff7f6 0%, #ffffff 58%, #fff1f0 100%) !important;
  border: 1px solid rgba(255, 96, 87, 0.36) !important;
  box-shadow:
    0 18px 42px rgba(179, 9, 0, 0.09),
    inset 0 0 0 1px rgba(255, 173, 169, 0.24) !important;
}

.office-tool-accounting .app-icon,
.office-tool-accounting .office-icon,
.office-tool-accounting .tool-icon,
.office-tool-accounting .card-icon {
  background:
    radial-gradient(circle at 30% 20%,
      #fff1f0 0%,
      #ffdad7 48%,
      #ffada9 100%) !important;
  border: 1px solid rgba(255, 96, 87, 0.32) !important;
  color: #b30900 !important;
  box-shadow:
    0 12px 28px rgba(179, 9, 0, 0.11),
    inset 0 0 0 1px rgba(255,255,255,0.74) !important;
}

.office-tool-accounting svg,
.office-tool-accounting svg *,
.office-tool-accounting i {
  color: #b30900 !important;
  stroke: #b30900 !important;
}

/* Accounting dashboard wrapper */
.accounting-red-dashboard {
  --acc-soft: #ffada9;
  --acc-red: #ff6057;
  --acc-strong: #ff1206;
  --acc-deep: #b30900;
  --acc-pale: #fff1f0;
  --acc-pale-2: #ffe4e2;
  --acc-ink: #111827;
  --acc-muted: #64748b;
  --acc-line: rgba(255, 96, 87, 0.24);

  width: min(1360px, calc(100vw - 72px)) !important;
  max-width: 1360px !important;
  margin: 0 auto !important;
  padding: 38px 0 72px !important;
  box-sizing: border-box !important;
}

/* Main hero/top card */
.accounting-red-dashboard > section:first-child,
.accounting-red-dashboard > div:first-child,
.accounting-red-dashboard .page-hero,
.accounting-red-dashboard .dashboard-hero,
.accounting-red-dashboard .accounting-hero {
  position: relative !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 7% 18%,
      rgba(255, 173, 169, 0.56) 0%,
      rgba(255, 173, 169, 0.22) 34%,
      rgba(255,255,255,0) 62%),
    radial-gradient(circle at 96% 18%,
      rgba(255, 96, 87, 0.22) 0%,
      rgba(255, 96, 87, 0.10) 36%,
      rgba(255,255,255,0) 64%),
    linear-gradient(135deg, #fff7f6 0%, #ffffff 62%, #fff1f0 100%) !important;
  border: 1px solid rgba(255, 96, 87, 0.36) !important;
  border-radius: 30px !important;
  box-shadow:
    0 24px 60px rgba(179, 9, 0, 0.09),
    inset 0 0 0 1px rgba(255, 173, 169, 0.24) !important;
  padding: 36px 44px !important;
  margin: 0 0 22px !important;
}

.accounting-red-dashboard h1 {
  color: #050505 !important;
  font-size: clamp(44px, 4.6vw, 74px) !important;
  line-height: 0.9 !important;
  letter-spacing: -0.065em !important;
  margin: 6px 0 12px !important;
}

.accounting-red-dashboard h2 {
  color: #050505 !important;
  font-size: clamp(24px, 2.1vw, 36px) !important;
  line-height: 0.96 !important;
  letter-spacing: -0.045em !important;
}

.accounting-red-dashboard .eyeline,
.accounting-red-dashboard .kicker,
.accounting-red-dashboard small,
.accounting-red-dashboard .section-label {
  color: var(--acc-deep) !important;
  letter-spacing: 0.16em !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
}

.accounting-red-dashboard p,
.accounting-red-dashboard .muted {
  color: var(--acc-muted) !important;
}

/* KPI grids */
.accounting-red-dashboard .kpi-grid,
.accounting-red-dashboard .stats-grid,
.accounting-red-dashboard .metric-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin: 18px 0 24px !important;
}

.accounting-red-dashboard .kpi-card,
.accounting-red-dashboard .stat-card,
.accounting-red-dashboard .metric-card,
.accounting-red-dashboard .summary-card {
  background: linear-gradient(135deg, #ffffff 0%, #fffafa 100%) !important;
  border: 1px solid rgba(255, 96, 87, 0.22) !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(179, 9, 0, 0.055) !important;
  padding: 18px 20px !important;
}

.accounting-red-dashboard .kpi-card:nth-child(3n),
.accounting-red-dashboard .stat-card:nth-child(3n),
.accounting-red-dashboard .summary-card:nth-child(3n) {
  background: linear-gradient(135deg, #fff7f6 0%, #ffe4e2 100%) !important;
  border-color: rgba(255, 96, 87, 0.34) !important;
}

/* Panels */
.accounting-red-dashboard .panel,
.accounting-red-dashboard .card,
.accounting-red-dashboard .section-card,
.accounting-red-dashboard .dashboard-card,
.accounting-red-dashboard .table-card {
  background: #ffffff !important;
  border: 1px solid rgba(255, 96, 87, 0.22) !important;
  border-radius: 22px !important;
  box-shadow: 0 18px 44px rgba(179, 9, 0, 0.055) !important;
  padding: 22px !important;
  margin: 18px 0 !important;
}

/* Needs Attention chips */
.accounting-red-dashboard .attention-grid,
.accounting-red-dashboard .checks-grid,
.accounting-red-dashboard .issue-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.accounting-red-dashboard .attention-grid > *,
.accounting-red-dashboard .checks-grid > *,
.accounting-red-dashboard .issue-grid > *,
.accounting-red-dashboard .status-chip,
.accounting-red-dashboard .issue-chip {
  background: #fff7f6 !important;
  border: 1px solid rgba(255, 96, 87, 0.24) !important;
  border-radius: 14px !important;
  color: var(--acc-ink) !important;
  font-weight: 850 !important;
}

/* Tables */
.accounting-red-dashboard table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid rgba(255, 96, 87, 0.22) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.accounting-red-dashboard th {
  background: #fff1f0 !important;
  color: #6b7280 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: 0.045em !important;
  text-transform: uppercase !important;
  padding: 13px 14px !important;
}

.accounting-red-dashboard td {
  background: #ffffff !important;
  color: var(--acc-ink) !important;
  border-top: 1px solid rgba(255, 96, 87, 0.16) !important;
  padding: 13px 14px !important;
}

/* Buttons */
.accounting-red-dashboard .button-primary,
.accounting-red-dashboard button[type="submit"],
.accounting-red-dashboard a[href*="export"],
.accounting-red-dashboard a[href*="download"] {
  background: linear-gradient(135deg, #ff6057 0%, #b30900 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  font-weight: 950 !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 34px rgba(179, 9, 0, 0.20) !important;
}

.accounting-red-dashboard .button-secondary,
.accounting-red-dashboard a[href*="open"],
.accounting-red-dashboard a[href*="review"] {
  background: #ffffff !important;
  border: 1px solid rgba(255, 96, 87, 0.24) !important;
  color: var(--acc-deep) !important;
  font-weight: 900 !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 24px rgba(179, 9, 0, 0.045) !important;
}

main.shell:has(.accounting-red-dashboard),
.shell:has(.accounting-red-dashboard) {
  width: 100% !important;
  max-width: none !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

@media (max-width: 1100px) {
  .accounting-red-dashboard {
    width: min(100%, calc(100vw - 36px)) !important;
  }

  .accounting-red-dashboard .kpi-grid,
  .accounting-red-dashboard .stats-grid,
  .accounting-red-dashboard .metric-grid,
  .accounting-red-dashboard .attention-grid,
  .accounting-red-dashboard .checks-grid,
  .accounting-red-dashboard .issue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  .accounting-red-dashboard {
    width: min(100%, calc(100vw - 24px)) !important;
    padding-top: 24px !important;
  }

  .accounting-red-dashboard .kpi-grid,
  .accounting-red-dashboard .stats-grid,
  .accounting-red-dashboard .metric-grid,
  .accounting-red-dashboard .attention-grid,
  .accounting-red-dashboard .checks-grid,
  .accounting-red-dashboard .issue-grid {
    grid-template-columns: 1fr !important;
  }

  .accounting-red-dashboard h1 {
    font-size: 42px !important;
  }
}


/* =========================================================
   KPI REGISTER — grouped by source page
   ========================================================= */

.kpi-register-page {
  width: min(1380px, calc(100vw - 72px));
  max-width: 1380px;
  margin: 0 auto;
  padding: 38px 0 72px;
}

.kpi-register-hero {
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 173, 169, 0.48) 0%, rgba(255, 173, 169, 0.18) 34%, transparent 62%),
    linear-gradient(135deg, #fff7f6 0%, #ffffff 62%, #fff1f0 100%);
  border: 1px solid rgba(255, 96, 87, 0.30);
  border-radius: 30px;
  box-shadow: 0 24px 60px rgba(179, 9, 0, 0.08);
  padding: 38px 46px;
  margin-bottom: 18px;
}

.kpi-register-hero .eyeline {
  color: #b30900;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.kpi-register-hero h1 {
  color: #050505;
  font-size: clamp(44px, 4.8vw, 78px);
  line-height: 0.9;
  letter-spacing: -0.065em;
  margin: 0 0 14px;
}

.kpi-register-hero p {
  color: #64748b;
  max-width: 880px;
  font-size: 17px;
  line-height: 1.45;
  margin: 0;
}

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

.kpi-register-summary article {
  background: #ffffff;
  border: 1px solid rgba(255, 96, 87, 0.22);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 14px 34px rgba(179, 9, 0, 0.055);
}

.kpi-register-summary span {
  display: block;
  color: #b30900;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.kpi-register-summary strong {
  display: block;
  color: #111827;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.kpi-register-summary p {
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
  margin: 8px 0 0;
}

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

.kpi-page-card {
  background: #ffffff;
  border: 1px solid rgba(255, 96, 87, 0.20);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.055);
  padding: 20px;
}

.kpi-page-card-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 96, 87, 0.14);
}

.kpi-page-card-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff6057 0%, #b30900 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(179, 9, 0, 0.18);
}

.kpi-page-card h2 {
  color: #111827;
  font-size: 24px;
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin: 0 0 6px;
}

.kpi-page-card p {
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.kpi-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kpi-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.72fr);
  gap: 10px;
  align-items: center;
  background: linear-gradient(135deg, #fffafa 0%, #ffffff 100%);
  border: 1px solid rgba(255, 96, 87, 0.14);
  border-radius: 13px;
  padding: 10px 12px;
}

.kpi-list strong {
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.kpi-list em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.kpi-priority-section {
  margin-top: 22px;
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 173, 169, 0.36) 0%, rgba(255, 173, 169, 0.12) 36%, transparent 64%),
    linear-gradient(135deg, #fff7f6 0%, #ffffff 68%, #fff1f0 100%);
  border: 1px solid rgba(255, 96, 87, 0.24);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(179, 9, 0, 0.06);
}

.kpi-priority-section h2 {
  color: #111827;
  font-size: 34px;
  line-height: 0.95;
  letter-spacing: -0.05em;
  margin: 0 0 18px;
}

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

.kpi-priority-grid span {
  background: #ffffff;
  border: 1px solid rgba(255, 96, 87, 0.20);
  border-radius: 14px;
  color: #b30900;
  font-size: 13px;
  font-weight: 900;
  padding: 12px 14px;
  box-shadow: 0 10px 22px rgba(179, 9, 0, 0.045);
}

main.shell:has(.kpi-register-page),
.shell:has(.kpi-register-page) {
  width: 100%;
  max-width: none;
  padding-left: 24px;
  padding-right: 24px;
}

@media (max-width: 1100px) {
  .kpi-register-page {
    width: min(100%, calc(100vw - 36px));
  }

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

  .kpi-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .kpi-register-page {
    width: min(100%, calc(100vw - 24px));
  }

  .kpi-register-summary,
  .kpi-priority-grid {
    grid-template-columns: 1fr;
  }

  .kpi-list li {
    grid-template-columns: 1fr;
  }

  .kpi-register-hero h1 {
    font-size: 42px;
  }
}

/* Final office tile icon overrides */
.office-suite-home a.suite-card[href="/deals"] .app-icon,
.office-suite-home a.suite-card[href="/deals"] [class*="icon"] {
  background: #eeeeee !important;
  color: #9bcf78 !important;
  box-shadow: inset 0 0 0 3px #9bcf78 !important;
}

/* Final Accounting page cleanup */
main.shell:has(.accounting-dashboard),
.shell:has(.accounting-dashboard) {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 30px 24px 72px !important;
  background: linear-gradient(180deg, #fff8f7 0%, #ffffff 46%, #fffafa 100%) !important;
}

.accounting-dashboard {
  --acc-red: #c63a3a;
  --acc-red-dark: #9f2626;
  --acc-blush: #ffe6e4;
  --acc-blush-soft: #fff5f4;
  --acc-ink: #111827;
  --acc-muted: #64748b;
  --acc-line: rgba(198, 58, 58, 0.20);
  width: min(100%, 1460px);
  margin: 0 auto;
  color: var(--acc-ink);
}

.accounting-hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
  padding: 34px 38px;
  border: 1px solid rgba(198, 58, 58, 0.24);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff5f4 0%, #ffffff 62%, #fff0ef 100%);
  box-shadow: 0 18px 44px rgba(159, 38, 38, 0.075);
}

.accounting-hero-panel .eyebrow {
  color: var(--acc-red-dark);
  letter-spacing: 0.08em;
}

.accounting-hero-panel h1 {
  margin: 6px 0 10px;
  color: #050505;
  font-size: clamp(38px, 4.2vw, 64px);
  line-height: 0.95;
  letter-spacing: 0;
}

.accounting-hero-panel .hero-subtitle {
  max-width: 820px;
  color: var(--acc-muted);
  font-size: 18px;
  line-height: 1.38;
}

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

.accounting-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(198, 58, 58, 0.26);
  background: #ffffff;
  color: var(--acc-red-dark);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.accounting-btn.primary {
  background: var(--acc-red);
  border-color: var(--acc-red);
  color: #ffffff;
}

.accounting-btn.secondary {
  background: #ffffff;
  color: #253044;
}

.accounting-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.accounting-metrics article,
.accounting-panel.clean,
.accounting-help.clean,
.income-statement-card {
  border: 1px solid var(--acc-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.045);
}

.accounting-metrics article {
  min-height: 118px;
  padding: 20px;
}

.accounting-metrics span,
.income-statement-head span {
  display: block;
  color: #7a6a6a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.accounting-metrics strong {
  display: block;
  margin-top: 10px;
  color: #111827;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0;
}

.accounting-metrics small {
  display: block;
  margin-top: 7px;
  color: var(--acc-muted);
  font-size: 13px;
  font-weight: 750;
}

.accounting-metrics article.good {
  background: #f4fbf7;
  border-color: rgba(21, 115, 71, 0.22);
}

.accounting-metrics article.warning {
  background: #fff9ef;
  border-color: rgba(180, 83, 9, 0.24);
}

.accounting-grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.accounting-panel.clean,
.accounting-help.clean {
  padding: 22px;
  margin-bottom: 18px;
}

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

.accounting-section-head h2,
.income-statement-head h2 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: 0;
}

.accounting-section-head p,
.income-statement-head p {
  margin: 0;
  color: var(--acc-muted);
  font-size: 14px;
  line-height: 1.38;
}

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

.accounting-attention-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(198, 58, 58, 0.14);
  border-radius: 13px;
  background: #fffafa;
}

.accounting-attention-list div.has-issue {
  background: #fff2f1;
  border-color: rgba(198, 58, 58, 0.30);
}

.accounting-attention-list span {
  color: #4b5563;
  font-size: 13px;
  font-weight: 850;
}

.accounting-attention-list strong {
  color: var(--acc-red-dark);
  font-size: 20px;
  line-height: 1;
}

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

.accounting-report-list a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 18px;
  align-items: center;
  min-height: 78px;
  padding: 16px 112px 16px 18px;
  border: 2px solid rgba(174, 39, 39, 0.26);
  border-radius: 12px;
  background: linear-gradient(180deg, #fffefe 0%, #fff5f4 100%);
  color: var(--acc-ink);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(84, 35, 35, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.accounting-report-list a::after {
  content: "Open";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(174, 39, 39, 0.24);
  border-radius: 999px;
  background: var(--acc-red);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(198, 58, 58, 0.22);
}

.accounting-report-list a:hover,
.accounting-report-list a:focus-visible {
  border-color: rgba(174, 39, 39, 0.58);
  background: #fff2f1;
  box-shadow: 0 12px 28px rgba(84, 35, 35, 0.13);
  transform: translateY(-2px);
  outline: none;
}

.accounting-report-list a:active {
  transform: translateY(0);
}

.accounting-report-list strong {
  color: var(--acc-red-dark);
  font-size: 19px;
  line-height: 1.15;
}

.accounting-report-list span {
  grid-column: 1;
  color: var(--acc-muted);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
}

.accounting-dashboard .accounting-table {
  border-color: var(--acc-line) !important;
}

.accounting-dashboard .accounting-table th {
  background: var(--acc-blush-soft) !important;
  color: #6b5555 !important;
}

.accounting-dashboard .table-link {
  color: var(--acc-red-dark) !important;
}

.income-statement-card {
  padding: 24px;
  margin-bottom: 18px;
}

.income-statement-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 16px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--acc-line);
}

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

.income-statement-table td {
  padding: 17px 6px;
  border-bottom: 1px solid rgba(198, 58, 58, 0.12);
  color: #111827;
  vertical-align: top;
}

.income-statement-table tr:last-child td {
  border-bottom: 0;
}

.income-statement-table td:last-child {
  text-align: right;
  font-size: 22px;
  font-weight: 950;
}

.income-statement-table strong {
  display: block;
  font-size: 17px;
}

.income-statement-table small {
  display: block;
  margin-top: 4px;
  color: var(--acc-muted);
  font-size: 13px;
}

.income-statement-table .income-subtotal td,
.income-statement-table .income-final td {
  background: #fff5f4;
}

.income-statement-table .income-final td {
  color: var(--acc-red-dark);
  font-weight: 950;
}

.accounting-subledger-page .compact-journal-table td:nth-child(2),
.accounting-subledger-page .compact-journal-table td:nth-child(3),
.accounting-subledger-page .compact-journal-table th:nth-child(2),
.accounting-subledger-page .compact-journal-table th:nth-child(3) {
  text-align: right;
}

.accounting-subledger-page .compact-journal-table td:nth-child(2),
.accounting-subledger-page .compact-journal-table td:nth-child(3) {
  font-weight: 900;
}

.accounting-subledger-page .accounting-table td {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .accounting-hero-panel,
  .accounting-section-head,
  .income-statement-head {
    display: grid;
  }

  .accounting-hero-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 700px) {
  main.shell:has(.accounting-dashboard),
  .shell:has(.accounting-dashboard) {
    padding: 16px 10px 48px !important;
  }

  .accounting-hero-panel,
  .accounting-panel.clean,
  .accounting-help.clean,
  .income-statement-card {
    padding: 18px;
    border-radius: 16px;
  }

  .accounting-metrics,
  .accounting-grid-two,
  .accounting-attention-list {
    grid-template-columns: 1fr;
  }

  .accounting-hero-panel h1 {
    font-size: 36px;
  }
}

/* Main dashboard icon borders: final override for all app cards */
.office-suite-home a.suite-card .app-icon,
.office-suite-home a.suite-card .office-icon,
.office-suite-home a.suite-card .tool-icon,
.office-suite-home a.suite-card .card-icon,
.office-suite-home a.suite-card .icon-box {
  box-sizing: border-box !important;
  border: 3px solid currentColor !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.52),
    0 8px 18px rgba(16, 24, 32, 0.07) !important;
}

/* Restore Deals to its original icon treatment and keep Accounting clean */
.office-suite-home a.suite-card[href="/deals"] .app-icon,
.office-suite-home a.suite-card[href="/deals"] .office-icon,
.office-suite-home a.suite-card[href="/deals"] .tool-icon,
.office-suite-home a.suite-card[href="/deals"] .card-icon,
.office-suite-home a.suite-card[href="/deals"] .icon-box {
  border: 0 !important;
  box-shadow: inset 0 0 0 3px #9BCF78 !important;
}

.office-suite-home .suite-card.office-tool-accounting,
.office-suite-home a.suite-card.office-tool-accounting {
  background: #ffffff !important;
  border: 2px solid #e2e8f2 !important;
  box-shadow: none !important;
}

.office-suite-home .suite-card.office-tool-accounting .app-icon,
.office-suite-home .suite-card.office-tool-accounting .office-icon,
.office-suite-home .suite-card.office-tool-accounting .tool-icon,
.office-suite-home .suite-card.office-tool-accounting .card-icon,
.office-suite-home .suite-card.office-tool-accounting .icon-box {
  background: #ffe6e4 !important;
  color: #b30900 !important;
  border: 3px solid #b30900 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.56),
    0 8px 18px rgba(16, 24, 32, 0.07) !important;
}


/* Slightly tighter destructive / generated buttons so the row breathes */
.drs-records-table .actions .danger,
.drs-records-table .actions .delete,
.records-actions .danger,
.records-actions .delete {
  padding-left: 20px;
  padding-right: 20px;
}

.drs-records-table .actions .primary,
.records-actions .primary {
  padding-left: 14px;
  padding-right: 14px;
}


/* Keep Generate LOO slightly tighter because it is longer */
table td:last-child a[href*="loo"],
table td:last-child button[value*="loo"],
table td:last-child a[href*="LOO"],
table td:last-child button[value*="LOO"] {
  padding-left: 14px !important;
  padding-right: 14px !important;
}


/* Make action column wide enough for all buttons */
.drs-records-page table th:last-child,
.drs-records-page table td:last-child {
  min-width: 460px !important;
  width: 460px !important;
}

/* Compact action layout */
.drs-records-page table td:last-child,
.drs-records-actions,
.drs-actions,
.records-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

/* Compact buttons: fit text, smaller internal padding */
.drs-records-page table td:last-child a,
.drs-records-page table td:last-child button,
.drs-records-page table td:last-child .button,
.drs-records-page table td:last-child .primary,
.drs-records-page table td:last-child .danger,
.drs-actions a,
.drs-actions button,
.records-actions a,
.records-actions button {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* Make the long Generate LOO button tighter */
.drs-records-page table td:last-child a:last-child,
.drs-records-page table td:last-child button:last-child {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* On smaller screens, allow action buttons to wrap instead of cutting off */
@media (max-width: 1200px) {
  .drs-records-page table td:last-child {
    min-width: 360px !important;
    width: 360px !important;
    flex-wrap: wrap !important;
  }

  .drs-records-page table td:last-child a,
  .drs-records-page table td:last-child button {
    padding: 9px 12px !important;
    font-size: 13px !important;
  }
}



/* Hide Deal No. column completely */
.drs-records-page table th:nth-child(3),
.drs-records-page table td:nth-child(3) {
  display: none !important;
}

/* Reclaim space after removing Deal No. */
.drs-records-page table th,
.drs-records-page table td {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

/* Deal Calculation Dashboard */
.deal-calc-dashboard-page {
  background: #f6f4ef;
  color: #0f172a;
}

.deal-calc-dashboard-shell {
  max-width: 1720px;
  margin: 0 auto;
  padding: 34px 34px 56px;
}

.deal-calc-dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 28px 32px;
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.deal-calc-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #15803d;
}

.deal-calc-dashboard-hero h1 {
  margin: 0;
  font-size: clamp(32px, 3vw, 52px);
  line-height: 1;
  letter-spacing: -0.05em;
  color: #07111f;
}

.deal-calc-dashboard-hero p {
  max-width: 820px;
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.45;
  color: #64748b;
}

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

.deal-calc-secondary-btn,
.deal-calc-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.deal-calc-secondary-btn {
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
}

.deal-calc-open-btn {
  color: #065f46;
  background: #dcfce7;
  border: 1px solid #22c55e;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.15);
}

.deal-calc-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.deal-calc-summary-card {
  padding: 20px;
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 22px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.deal-calc-summary-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
}

.deal-calc-summary-card strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.05em;
  color: #07111f;
}

.deal-calc-summary-card small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-weight: 700;
}

.deal-calc-summary-card.success {
  border-color: rgba(34, 197, 94, 0.45);
  background: #f0fdf4;
}

.deal-calc-summary-card.warning {
  border-color: rgba(245, 158, 11, 0.45);
  background: #fffbeb;
}

.deal-calc-summary-card.danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: #fef2f2;
}

.deal-calc-summary-card.ptx {
  border-color: rgba(124, 58, 237, 0.35);
  background: #f5f3ff;
}

.deal-calc-control-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.deal-calc-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 340px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 18px;
}

.deal-calc-search span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  white-space: nowrap;
}

.deal-calc-search input {
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  background: transparent;
}

.deal-calc-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.deal-calc-filter-tabs button {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 0 13px;
  min-height: 42px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.deal-calc-filter-tabs button.active {
  color: #065f46;
  background: #dcfce7;
  border-color: #22c55e;
}

.deal-calc-dashboard-card {
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.deal-calc-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid #e2e8f0;
}

.deal-calc-table-header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.deal-calc-table-header p {
  margin: 6px 0 0;
  color: #64748b;
  font-weight: 700;
}

.deal-calc-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.deal-calc-dashboard-table {
  width: 100%;
  min-width: 1450px;
  border-collapse: separate;
  border-spacing: 0;
  /* auto (not fixed): let the Action column size to its button(s) and the narrow
     numeric columns shrink, so action buttons stay on one row. */
  table-layout: auto;
}

.deal-calc-dashboard-table th,
.deal-calc-dashboard-table td {
  /* Tighter vertical padding removes the dead whitespace between rows and frees
     horizontal room for the action buttons. */
  padding: 9px 12px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.deal-calc-dashboard-table th {
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #64748b;
  background: #f8fafc;
}

.deal-calc-dashboard-table td {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.deal-calc-dashboard-table tbody tr:hover {
  background: #f8fafc;
}

.deal-calc-main-ref {
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.04em;
  color: #07111f;
}

.deal-calc-sub-ref,
.deal-calc-dashboard-table small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  font-weight: 800;
}

.deal-calc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.deal-calc-badge.success {
  color: #15803d;
  background: #dcfce7;
}

.deal-calc-badge.warning {
  color: #b45309;
  background: #fef3c7;
}

.deal-calc-badge.danger {
  color: #b91c1c;
  background: #fee2e2;
}

.deal-calc-badge.muted {
  color: #475569;
  background: #e2e8f0;
}

.deal-calc-empty {
  padding: 48px 28px;
  text-align: center;
}

.deal-calc-empty h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.deal-calc-empty p {
  color: #64748b;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .deal-calc-dashboard-hero,
  .deal-calc-control-bar {
    flex-direction: column;
  }

  .deal-calc-summary-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 700px) {
  .deal-calc-dashboard-shell {
    padding: 20px 14px 40px;
  }

  .deal-calc-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Deal Calculation Dashboard runtime warning */
.deal-calc-runtime-warning {
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 18px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
}

.deal-calc-runtime-warning code {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  white-space: normal;
  color: #78350f;
}

/* PO dashboard: green create action */
.po-create-green {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  border: 1px solid rgba(22, 163, 74, 0.7) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.25) !important;
}

.po-create-green:hover {
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  border-color: rgba(34, 197, 94, 0.85) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* ============================================================
   PFI document page theme
   Applies only when the body has .pfi-document-theme.
   Used for /documents/PFI/... pages.
   ============================================================ */

body.pfi-document-theme {
  background:
    radial-gradient(circle at top left, rgba(139, 61, 145, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(139, 61, 145, 0.10), transparent 30%),
    linear-gradient(180deg, #fdf4ff 0%, #ffffff 46%, #fbf3fb 100%) !important;
}

body.pfi-document-theme main,
body.pfi-document-theme .main,
body.pfi-document-theme .page,
body.pfi-document-theme .page-shell,
body.pfi-document-theme .content,
body.pfi-document-theme .container {
  border-color: rgba(139, 61, 145, 0.14);
}

body.pfi-document-theme h1,
body.pfi-document-theme h2,
body.pfi-document-theme h3,
body.pfi-document-theme .page-title,
body.pfi-document-theme .section-title {
  color: #6f2f73 !important;
}

body.pfi-document-theme .card,
body.pfi-document-theme .panel,
body.pfi-document-theme .box,
body.pfi-document-theme .document-card,
body.pfi-document-theme .detail-card,
body.pfi-document-theme .summary-card {
  border: 1px solid #e4e7ec !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}

body.pfi-document-theme .badge,
body.pfi-document-theme .pill,
body.pfi-document-theme .status-badge {
  background: rgba(139, 61, 145, 0.10) !important;
  color: #6f2f73 !important;
  border-color: rgba(139, 61, 145, 0.22) !important;
}

body.pfi-document-theme a.button,
body.pfi-document-theme .button,
body.pfi-document-theme .btn,
body.pfi-document-theme button,
body.pfi-document-theme input[type="submit"] {
  border-color: rgba(139, 61, 145, 0.35) !important;
}

body.pfi-document-theme a.button.primary,
body.pfi-document-theme .button.primary,
body.pfi-document-theme .btn-primary,
body.pfi-document-theme button.primary,
body.pfi-document-theme input[type="submit"] {
  background: linear-gradient(135deg, #8b3d91, #6f2f73) !important;
  color: #ffffff !important;
  border-color: rgba(139, 61, 145, 0.55) !important;
  box-shadow: 0 2px 6px rgba(139, 61, 145, 0.18) !important;
}

body.pfi-document-theme a.button.primary:hover,
body.pfi-document-theme .button.primary:hover,
body.pfi-document-theme .btn-primary:hover,
body.pfi-document-theme button.primary:hover,
body.pfi-document-theme input[type="submit"]:hover {
  background: linear-gradient(135deg, #a14fa8, #6f2f73) !important;
  transform: translateY(-1px);
}

body.pfi-document-theme table thead,
body.pfi-document-theme .table thead {
  background: linear-gradient(135deg, rgba(139, 61, 145, 0.12), rgba(139, 61, 145, 0.07)) !important;
  color: #6f2f73 !important;
}

body.pfi-document-theme .document-preview,
body.pfi-document-theme iframe,
body.pfi-document-theme embed {
  border: 1px solid rgba(139, 61, 145, 0.18) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}

/* === PFI DOCUMENT EDITOR COLOR OVERRIDE START === */

/*
  PFI document editor styling.
  Scope is intentionally narrow:
  - only applies when the document editor has class="pfi-editor"
  - does not affect PO, CI, DRS, LOO, TINV, or generic document pages
*/

body.pfi-document-theme #document-editor.pfi-editor,
body.pfi-document-theme .manual-editor.pfi-editor {
  border: 1px solid #e4e7ec;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

body.pfi-document-theme #document-editor.pfi-editor h1,
body.pfi-document-theme #document-editor.pfi-editor h2,
body.pfi-document-theme #document-editor.pfi-editor h3,
body.pfi-document-theme #document-editor.pfi-editor h4,
body.pfi-document-theme .manual-editor.pfi-editor h1,
body.pfi-document-theme .manual-editor.pfi-editor h2,
body.pfi-document-theme .manual-editor.pfi-editor h3,
body.pfi-document-theme .manual-editor.pfi-editor h4 {
  color: #0f172a;
}

body.pfi-document-theme #document-editor.pfi-editor label,
body.pfi-document-theme .manual-editor.pfi-editor label {
  color: #64748b;
  font-weight: 800;
}

body.pfi-document-theme #document-editor.pfi-editor input,
body.pfi-document-theme #document-editor.pfi-editor textarea,
body.pfi-document-theme #document-editor.pfi-editor select,
body.pfi-document-theme .manual-editor.pfi-editor input,
body.pfi-document-theme .manual-editor.pfi-editor textarea,
body.pfi-document-theme .manual-editor.pfi-editor select {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

body.pfi-document-theme #document-editor.pfi-editor input:focus,
body.pfi-document-theme #document-editor.pfi-editor textarea:focus,
body.pfi-document-theme #document-editor.pfi-editor select:focus,
body.pfi-document-theme .manual-editor.pfi-editor input:focus,
body.pfi-document-theme .manual-editor.pfi-editor textarea:focus,
body.pfi-document-theme .manual-editor.pfi-editor select:focus {
  border-color: #8b3d91;
  outline: none;
  box-shadow: 0 0 0 4px rgba(139, 61, 145, 0.15);
}

body.pfi-document-theme #document-editor.pfi-editor button,
body.pfi-document-theme #document-editor.pfi-editor .button,
body.pfi-document-theme #document-editor.pfi-editor a.button,
body.pfi-document-theme .manual-editor.pfi-editor button,
body.pfi-document-theme .manual-editor.pfi-editor .button,
body.pfi-document-theme .manual-editor.pfi-editor a.button {
  background: linear-gradient(135deg, #6f2f73 0%, #8b3d91 100%);
  color: #ffffff;
  border: 0;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(139, 61, 145, 0.16);
}

body.pfi-document-theme #document-editor.pfi-editor button:hover,
body.pfi-document-theme #document-editor.pfi-editor .button:hover,
body.pfi-document-theme #document-editor.pfi-editor a.button:hover,
body.pfi-document-theme .manual-editor.pfi-editor button:hover,
body.pfi-document-theme .manual-editor.pfi-editor .button:hover,
body.pfi-document-theme .manual-editor.pfi-editor a.button:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

body.pfi-document-theme #document-editor.pfi-editor .secondary,
body.pfi-document-theme #document-editor.pfi-editor .btn-secondary,
body.pfi-document-theme .manual-editor.pfi-editor .secondary,
body.pfi-document-theme .manual-editor.pfi-editor .btn-secondary {
  background: #faecfd;
  color: #6f2f73;
  border: 1px solid rgba(139, 61, 145, 0.20);
  box-shadow: none;
}

/* === PFI DOCUMENT EDITOR COLOR OVERRIDE END === */

/* === VTSA MAIN MENU POLISH START === */
.vtsa-fixed-topbar {
  display: grid !important;
  grid-template-columns: minmax(280px, 0.74fr) minmax(520px, 1.25fr) minmax(320px, 0.82fr) !important;
  align-items: center !important;
  gap: 18px !important;
  min-height: 124px !important;
  padding: 16px 28px !important;
  border-bottom: 1px solid rgba(17, 24, 39, 0.10) !important;
  background: rgba(255, 253, 248, 0.96) !important;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.045) !important;
}

.vtsa-fixed-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 18px !important;
  width: fit-content !important;
  min-width: 0 !important;
  min-height: 72px !important;
  padding: 8px 12px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: transparent !important;
  color: #081321 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.vtsa-fixed-brand .vtsa-brand-logo {
  width: 60px !important;
  height: 62px !important;
  object-fit: contain !important;
}

.vtsa-brand-wordmark {
  display: grid !important;
  gap: 3px !important;
  color: #081321 !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  line-height: 1 !important;
}

.vtsa-brand-wordmark strong {
  color: #081321 !important;
  font-size: 38px !important;
  font-weight: 950 !important;
  letter-spacing: 0.16em !important;
}

.vtsa-brand-wordmark small {
  color: #0f6b35 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  letter-spacing: 0.26em !important;
}

.vtsa-fixed-main-nav {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(116px, 1fr)) !important;
  gap: 10px 12px !important;
  justify-content: center !important;
  align-items: center !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.vtsa-fixed-main-nav .vtsa-menu-btn,
.vtsa-fixed-actions .vtsa-action-btn,
.vtsa-fixed-actions .theme-toggle {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  border: 1.5px solid rgba(17, 24, 39, 0.86) !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%) !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 920 !important;
  letter-spacing: 0.02em !important;
  line-height: 1 !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  box-shadow: 0 7px 16px rgba(17, 24, 39, 0.10) !important;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease !important;
}

.vtsa-fixed-main-nav .vtsa-menu-btn:hover,
.vtsa-fixed-actions .vtsa-action-btn:hover,
.vtsa-fixed-actions .theme-toggle:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.14) !important;
}

.vtsa-fixed-main-nav .vtsa-menu-btn span,
.vtsa-fixed-actions .vtsa-action-btn span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  min-width: 20px !important;
  color: var(--menu-icon, #1e3a5f) !important;
  font-size: 20px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

.vtsa-fixed-main-nav .is-deals { --menu-icon: #31a62f; }
.vtsa-fixed-main-nav .is-drs { --menu-icon: #1f8fff; }
.vtsa-fixed-main-nav .is-loo { --menu-icon: #9a35d8; }
.vtsa-fixed-main-nav .is-po { --menu-icon: #49b72f; }
.vtsa-fixed-main-nav .is-pfi { --menu-icon: #8b35d4; }
.vtsa-fixed-main-nav .is-ci { --menu-icon: #1f8fff; }
.vtsa-fixed-main-nav .is-tinv { --menu-icon: #ff9f1a; }
.vtsa-fixed-main-nav .is-cs { --menu-icon: #0d9488; }
.vtsa-fixed-main-nav .is-ship { --menu-icon: #ff4c21; }
.vtsa-fixed-main-nav .is-acc { --menu-icon: #ff4c21; }
.vtsa-fixed-main-nav .is-docs { --menu-icon: #ff9f1a; }
.vtsa-fixed-main-nav .is-tools { --menu-icon: #6b7280; }

.vtsa-fixed-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 9px !important;
  flex-wrap: wrap !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.vtsa-fixed-actions .theme-toggle,
.vtsa-fixed-actions .vtsa-action-btn {
  min-height: 34px !important;
  padding: 0 13px !important;
  font-size: 12px !important;
  text-transform: none !important;
  color: #0f5130 !important;
  border-color: rgba(17, 24, 39, 0.76) !important;
}

.vtsa-fixed-actions .vtsa-action-btn span {
  color: #0f9f7a !important;
  font-size: 18px !important;
}

.vtsa-fixed-actions .vtsa-action-btn[href="/logout"] span {
  color: #111827 !important;
}

@media (max-width: 1180px) {
  .vtsa-fixed-topbar {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .vtsa-fixed-brand,
  .vtsa-fixed-main-nav,
  .vtsa-fixed-actions {
    justify-self: center !important;
  }

  .vtsa-fixed-main-nav {
    width: min(680px, 100%) !important;
  }

  .vtsa-fixed-actions {
    justify-content: center !important;
  }
}

@media (max-width: 640px) {
  .vtsa-fixed-topbar {
    padding: 12px !important;
  }

  .vtsa-fixed-brand .vtsa-brand-logo {
    width: 48px !important;
    height: 50px !important;
  }

  .vtsa-brand-wordmark strong {
    font-size: 30px !important;
  }

  .vtsa-brand-wordmark small {
    font-size: 11px !important;
  }

  .vtsa-fixed-main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
/* === VTSA MAIN MENU POLISH END === */

/* === VTSA MAIN MENU SPECIFICITY LOCK START === */
body .topbar.vtsa-fixed-topbar {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  grid-template-areas:
    "brand actions"
    "nav nav" !important;
  align-items: center !important;
  gap: 12px 22px !important;
  min-height: 142px !important;
  padding: 14px 28px 16px !important;
  background: rgba(255, 253, 248, 0.97) !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
  grid-area: brand !important;
  justify-self: start !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
  grid-area: nav !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(112px, 150px)) !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px 14px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  min-height: 42px !important;
  padding: 0 16px !important;
  border: 1.5px solid rgba(17, 24, 39, 0.86) !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%) !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 920 !important;
  letter-spacing: 0.02em !important;
  box-shadow: 0 7px 16px rgba(17, 24, 39, 0.10) !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span {
  width: 20px !important;
  min-width: 20px !important;
  color: var(--menu-icon, #1e3a5f) !important;
  font-size: 20px !important;
  font-weight: 950 !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
  grid-area: actions !important;
  justify-self: end !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 9px !important;
  width: auto !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 34px !important;
  padding: 0 13px !important;
  border: 1.5px solid rgba(17, 24, 39, 0.76) !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%) !important;
  color: #0f5130 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.09) !important;
}

@media (max-width: 940px) {
  body .topbar.vtsa-fixed-topbar {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "brand"
      "actions"
      "nav" !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    justify-self: center !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    grid-template-columns: repeat(2, minmax(126px, 1fr)) !important;
  }
}
/* === VTSA MAIN MENU SPECIFICITY LOCK END === */

/* === VTSA MAIN MENU COMPACT FIT START === */
body .topbar.vtsa-fixed-topbar {
  min-height: 128px !important;
  padding: 10px 28px 12px !important;
  gap: 8px 22px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
  min-height: 58px !important;
  padding: 4px 8px !important;
  gap: 12px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand .vtsa-brand-logo {
  width: 46px !important;
  height: 48px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark strong {
  font-size: 30px !important;
  letter-spacing: 0.14em !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark small {
  font-size: 10.5px !important;
  letter-spacing: 0.24em !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
  grid-template-columns: repeat(6, 132px) !important;
  justify-content: center !important;
  gap: 8px 10px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  min-height: 34px !important;
  height: 34px !important;
  gap: 8px !important;
  padding: 0 11px !important;
  border: 2px solid #111827 !important;
  border-radius: 16px !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
  box-shadow: 0 5px 12px rgba(17, 24, 39, 0.12) !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span {
  width: 17px !important;
  min-width: 17px !important;
  font-size: 17px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
  gap: 7px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 11px !important;
  border: 2px solid #111827 !important;
  border-radius: 15px !important;
  font-size: 11px !important;
  box-shadow: 0 5px 12px rgba(17, 24, 39, 0.10) !important;
}

@media (max-width: 940px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    grid-template-columns: repeat(2, 132px) !important;
  }
}
/* === VTSA MAIN MENU COMPACT FIT END === */

/* === VTSA MAIN MENU REFERENCE LAYOUT START === */
body .topbar.vtsa-fixed-topbar {
  grid-template-columns: auto minmax(0, 1fr) !important;
  grid-template-areas:
    "brand actions"
    "nav nav" !important;
  min-height: 138px !important;
  padding: 12px 30px 14px !important;
  gap: 8px 24px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
  min-height: 60px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand .vtsa-brand-logo {
  width: 54px !important;
  height: 56px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark strong {
  font-size: 34px !important;
  letter-spacing: 0.16em !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark small {
  font-size: 11.5px !important;
  letter-spacing: 0.26em !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
  grid-template-columns: repeat(6, 156px) !important;
  gap: 8px 12px !important;
  justify-content: center !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
  width: 156px !important;
  min-width: 156px !important;
  max-width: 156px !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 2.5px solid #111827 !important;
  border-radius: 20px !important;
  font-size: 12.5px !important;
  gap: 9px !important;
  box-shadow: 0 7px 15px rgba(17, 24, 39, 0.15) !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span {
  width: 19px !important;
  min-width: 19px !important;
  font-size: 19px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
  height: 28px !important;
  min-height: 28px !important;
  border: 2px solid #111827 !important;
  border-radius: 15px !important;
  font-size: 10.5px !important;
}

@media (min-width: 1500px) {
  body .topbar.vtsa-fixed-topbar {
    grid-template-columns: 300px minmax(980px, 1fr) auto !important;
    grid-template-areas: "brand nav actions" !important;
    align-items: start !important;
    min-height: 148px !important;
    padding: 14px 26px 16px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
    align-self: start !important;
    justify-self: start !important;
    margin-top: 0 !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    align-self: start !important;
    justify-self: end !important;
    margin-top: 4px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    align-self: start !important;
    grid-template-columns: repeat(6, 178px) !important;
    gap: 10px 14px !important;
    justify-content: center !important;
    padding-top: 2px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
    width: 178px !important;
    min-width: 178px !important;
    max-width: 178px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 23px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 1100px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    grid-template-columns: repeat(3, 156px) !important;
  }
}

@media (max-width: 620px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    grid-template-columns: repeat(2, 140px) !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
  }
}
/* === VTSA MAIN MENU REFERENCE LAYOUT END === */

/* === VTSA MAIN MENU EXACT WIDE LOCK START === */
@media (min-width: 1500px) {
  body .topbar.vtsa-fixed-topbar {
    grid-template-columns: 300px minmax(0, 1fr) auto !important;
    grid-template-areas: "brand nav actions" !important;
    align-items: start !important;
    min-height: 156px !important;
    padding: 14px 28px 16px !important;
    gap: 18px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
    grid-area: brand !important;
    align-self: start !important;
    justify-self: start !important;
    min-height: 76px !important;
    padding: 0 !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand .vtsa-brand-logo {
    width: 72px !important;
    height: 74px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark strong {
    font-size: 43px !important;
    letter-spacing: 0.15em !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark small {
    font-size: 13px !important;
    letter-spacing: 0.26em !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    grid-area: nav !important;
    align-self: start !important;
    justify-self: center !important;
    display: grid !important;
    grid-template-columns: repeat(6, 178px) !important;
    gap: 10px 14px !important;
    width: auto !important;
    padding-top: 4px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
    width: 178px !important;
    min-width: 178px !important;
    max-width: 178px !important;
    height: 44px !important;
    min-height: 44px !important;
    border: 3px solid #111827 !important;
    border-radius: 24px !important;
    font-size: 13px !important;
    box-shadow: 0 9px 17px rgba(17, 24, 39, 0.18) !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span {
    width: 21px !important;
    min-width: 21px !important;
    font-size: 21px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    grid-area: actions !important;
    align-self: start !important;
    justify-self: end !important;
    gap: 7px !important;
    margin-top: 6px !important;
    flex-wrap: nowrap !important;
    width: auto !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 10px !important;
    border: 2px solid #111827 !important;
    border-radius: 15px !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    box-shadow: 0 5px 12px rgba(17, 24, 39, 0.12) !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn span {
    width: 14px !important;
    min-width: 14px !important;
    font-size: 14px !important;
  }
}
/* === VTSA MAIN MENU EXACT WIDE LOCK END === */

/* === VTSA MAIN MENU FORCE DEFAULT REFERENCE START === */
body .topbar.vtsa-fixed-topbar {
  grid-template-columns: 300px minmax(900px, 1fr) auto !important;
  grid-template-areas: "brand nav actions" !important;
  align-items: start !important;
  min-height: 154px !important;
  padding: 14px 24px 14px !important;
  gap: 18px !important;
  overflow-x: auto !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
  grid-area: brand !important;
  align-self: start !important;
  justify-self: start !important;
  min-height: 74px !important;
  padding: 0 !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand .vtsa-brand-logo {
  width: 70px !important;
  height: 72px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark strong {
  font-size: 42px !important;
  letter-spacing: 0.15em !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark small {
  font-size: 13px !important;
  letter-spacing: 0.26em !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
  grid-area: nav !important;
  align-self: start !important;
  justify-self: center !important;
  display: grid !important;
  grid-template-columns: repeat(6, 178px) !important;
  gap: 10px 14px !important;
  width: auto !important;
  min-width: 1138px !important;
  padding-top: 2px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
  width: 178px !important;
  min-width: 178px !important;
  max-width: 178px !important;
  height: 44px !important;
  min-height: 44px !important;
  border: 3px solid #111827 !important;
  border-radius: 24px !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  box-shadow: 0 9px 17px rgba(17, 24, 39, 0.18) !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span {
  width: 21px !important;
  min-width: 21px !important;
  font-size: 21px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
  grid-area: actions !important;
  align-self: start !important;
  justify-self: end !important;
  gap: 7px !important;
  margin-top: 6px !important;
  flex-wrap: nowrap !important;
  width: auto !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  border: 2px solid #111827 !important;
  border-radius: 15px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  box-shadow: 0 5px 12px rgba(17, 24, 39, 0.12) !important;
}

@media (max-width: 1100px) {
  body .topbar.vtsa-fixed-topbar {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "brand"
      "actions"
      "nav" !important;
    overflow-x: hidden !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    justify-self: center !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    grid-template-columns: repeat(3, 156px) !important;
    min-width: 0 !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
    width: 156px !important;
    min-width: 156px !important;
    max-width: 156px !important;
  }
}
/* === VTSA MAIN MENU FORCE DEFAULT REFERENCE END === */

/* === VTSA MAIN MENU AUTO WIDTH START === */
body .topbar.vtsa-fixed-topbar {
  grid-template-columns: minmax(260px, auto) minmax(0, 1fr) auto !important;
  grid-template-areas: "brand nav actions" !important;
  align-items: start !important;
  min-height: 142px !important;
  padding: 14px 24px 14px !important;
  gap: 24px !important;
  overflow-x: hidden !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
  grid-area: brand !important;
  align-self: start !important;
  justify-self: start !important;
  width: 260px !important;
  max-width: 260px !important;
  min-height: 70px !important;
  overflow: hidden !important;
  padding: 0 !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand .vtsa-brand-logo {
  width: 58px !important;
  height: 60px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark strong {
  font-size: 36px !important;
  letter-spacing: 0.14em !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark small {
  font-size: 11px !important;
  letter-spacing: 0.24em !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
  grid-area: nav !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  align-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 10px 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  padding-top: 0 !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
  width: auto !important;
  min-width: 92px !important;
  max-width: none !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 18px !important;
  border: 2.5px solid #111827 !important;
  border-radius: 20px !important;
  font-size: 12.5px !important;
  gap: 9px !important;
  box-shadow: 0 7px 15px rgba(17, 24, 39, 0.15) !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  font-size: 18px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.15 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  overflow: visible !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
  grid-area: actions !important;
  align-self: start !important;
  justify-self: end !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  width: auto !important;
  min-width: max-content !important;
  margin-top: 2px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  border: 2px solid #111827 !important;
  border-radius: 15px !important;
  font-size: 10px !important;
}

@media (max-width: 1400px) {
  body .topbar.vtsa-fixed-topbar {
    grid-template-columns: auto auto !important;
    grid-template-areas:
      "brand actions"
      "nav nav" !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
    justify-self: start !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    justify-self: end !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    justify-self: center !important;
    justify-content: center !important;
  }
}
/* === VTSA MAIN MENU AUTO WIDTH END === */

/* === ACCOUNTING COMPACT PAGE SIZING START === */
body main.shell:has(.accounting-dashboard),
body .shell:has(.accounting-dashboard) {
  padding: 22px 24px 54px !important;
  background: linear-gradient(180deg, #fff8f7 0%, #ffffff 48%, #fffafa 100%) !important;
}

body .accounting-dashboard {
  width: min(100%, 1240px) !important;
  display: grid !important;
  gap: 14px !important;
}

body .accounting-hero-panel {
  margin-bottom: 0 !important;
  padding: 22px 26px !important;
  border-radius: 18px !important;
  gap: 18px !important;
  box-shadow: 0 12px 28px rgba(159, 38, 38, 0.06) !important;
}

body .accounting-hero-panel h1 {
  margin: 4px 0 8px !important;
  font-size: clamp(34px, 3.3vw, 46px) !important;
  line-height: 1.02 !important;
}

body .accounting-hero-panel .hero-subtitle {
  max-width: 700px !important;
  font-size: 15px !important;
  line-height: 1.34 !important;
}

body .accounting-hero-actions {
  gap: 8px !important;
}

body .accounting-btn {
  min-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body .accounting-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 0 !important;
}

body .accounting-metrics article {
  min-height: 88px !important;
  padding: 14px 15px !important;
  border-radius: 14px !important;
}

body .accounting-metrics span {
  font-size: 10.5px !important;
  letter-spacing: 0.06em !important;
}

body .accounting-metrics strong {
  margin-top: 8px !important;
  font-size: 23px !important;
  line-height: 1.04 !important;
  overflow-wrap: anywhere !important;
}

body .accounting-metrics small {
  margin-top: 5px !important;
  font-size: 11.5px !important;
  line-height: 1.25 !important;
}

body .accounting-grid-two {
  gap: 12px !important;
}

body .accounting-panel.clean,
body .accounting-help.clean {
  padding: 16px !important;
  margin-bottom: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 9px 22px rgba(17, 24, 39, 0.035) !important;
}

body .accounting-section-head {
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

body .accounting-section-head h2 {
  margin-bottom: 4px !important;
  font-size: 20px !important;
  line-height: 1.05 !important;
}

body .accounting-section-head p {
  font-size: 12.5px !important;
  line-height: 1.28 !important;
}

body .accounting-attention-list {
  gap: 8px !important;
}

body .accounting-attention-list div {
  min-height: 40px !important;
  align-items: center !important;
  padding: 9px 11px !important;
  border-radius: 10px !important;
}

body .accounting-attention-list span {
  font-size: 11.5px !important;
  line-height: 1.2 !important;
}

body .accounting-attention-list strong {
  font-size: 17px !important;
}

body .accounting-report-list {
  gap: 8px !important;
}

body .accounting-report-list a {
  min-height: 56px !important;
  padding: 11px 84px 11px 13px !important;
  border-width: 1px !important;
  border-radius: 10px !important;
  box-shadow: 0 5px 14px rgba(84, 35, 35, 0.045) !important;
}

body .accounting-report-list a::after {
  right: 12px !important;
  min-width: 56px !important;
  min-height: 30px !important;
  padding: 0 11px !important;
  font-size: 10.5px !important;
  box-shadow: none !important;
}

body .accounting-report-list strong {
  font-size: 14px !important;
  line-height: 1.15 !important;
}

body .accounting-report-list span {
  font-size: 11.5px !important;
  line-height: 1.25 !important;
}

body .accounting-table-wrap {
  overflow-x: auto !important;
  border-radius: 12px !important;
}

body .accounting-dashboard .accounting-table {
  min-width: 760px !important;
  table-layout: fixed !important;
  border-radius: 12px !important;
}

body .accounting-dashboard .accounting-table th {
  padding: 9px 10px !important;
  font-size: 10.5px !important;
  letter-spacing: 0.06em !important;
  white-space: nowrap !important;
}

body .accounting-dashboard .accounting-table td {
  padding: 9px 10px !important;
  font-size: 12.5px !important;
  line-height: 1.22 !important;
  vertical-align: middle !important;
}

body .accounting-dashboard .accounting-table td:nth-child(1),
body .accounting-dashboard .accounting-table td:nth-child(5),
body .accounting-dashboard .accounting-table td:nth-child(6) {
  white-space: nowrap !important;
}

body .accounting-dashboard .accounting-table td:nth-child(2),
body .accounting-dashboard .accounting-table td:nth-child(3),
body .accounting-dashboard .accounting-table td:nth-child(4) {
  overflow-wrap: anywhere !important;
}

body .accounting-dashboard .table-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 28px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(198, 58, 58, 0.34) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: var(--acc-red-dark) !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

body .accounting-dashboard .status-pill {
  max-width: 100% !important;
  padding: 4px 8px !important;
  font-size: 10.5px !important;
  line-height: 1.05 !important;
  white-space: normal !important;
  text-align: center !important;
}

body .accounting-dashboard .empty-state {
  padding: 18px !important;
  font-size: 12.5px !important;
}

body .accounting-help.clean {
  margin-top: 0 !important;
}

body .accounting-help summary {
  font-size: 13px !important;
}

body .compact-chain {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: 12px !important;
}

body .compact-chain div {
  padding: 10px !important;
  border-radius: 10px !important;
}

body .compact-chain strong {
  font-size: 12px !important;
}

body .compact-chain span {
  font-size: 11px !important;
  line-height: 1.25 !important;
}

@media (max-width: 1100px) {
  body .accounting-hero-panel,
  body .accounting-section-head {
    display: grid !important;
  }

  body .accounting-hero-actions {
    justify-content: flex-start !important;
  }

  body .accounting-metrics,
  body .accounting-grid-two,
  body .compact-chain {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  body main.shell:has(.accounting-dashboard),
  body .shell:has(.accounting-dashboard) {
    padding: 14px 10px 44px !important;
  }

  body .accounting-hero-panel,
  body .accounting-panel.clean,
  body .accounting-help.clean {
    padding: 16px !important;
  }

  body .accounting-metrics,
  body .accounting-grid-two,
  body .accounting-attention-list,
  body .compact-chain {
    grid-template-columns: 1fr !important;
  }
}
/* === ACCOUNTING COMPACT PAGE SIZING END === */

/* === MAIN MENU RIGHT SHIFT START === */
@media (min-width: 1401px) {
  body .topbar.vtsa-fixed-topbar {
    --menu-shift: clamp(0px, calc((100vw - 1400px) * 0.5), 8cm);
    grid-template-columns: 300px minmax(0, 1fr) auto !important;
    column-gap: 34px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
    width: 300px !important;
    max-width: 300px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    width: min(700px, calc(100% - var(--menu-shift))) !important;
    justify-self: start !important;
    justify-content: flex-start !important;
    margin-left: var(--menu-shift) !important;
  }
}
/* === MAIN MENU RIGHT SHIFT END === */

/* === MAIN MENU TWO ROW DESKTOP START === */
body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
  width: min(650px, calc(100vw - 48px)) !important;
  max-width: 650px !important;
  justify-content: flex-start !important;
  align-content: flex-start !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
  height: 36px !important;
  min-height: 36px !important;
  min-width: 92px !important;
  padding: 0 16px !important;
  font-size: 12px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span svg {
  width: 17px !important;
  min-width: 17px !important;
  height: 17px !important;
}

@media (min-width: 1401px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    width: 650px !important;
    max-width: 650px !important;
    margin-left: var(--menu-shift) !important;
  }
}

@media (max-width: 1400px) and (min-width: 701px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    width: 650px !important;
    max-width: calc(100vw - 48px) !important;
    justify-self: center !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 700px) {
  body .topbar.vtsa-fixed-topbar {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "brand"
      "actions"
      "nav" !important;
    padding: 12px 10px !important;
    gap: 10px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    justify-self: center !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
    width: min(260px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    flex-wrap: wrap !important;
    justify-content: center !important;
    min-width: 0 !important;
    max-width: calc(100vw - 20px) !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    width: min(100%, 346px) !important;
    max-width: calc(100vw - 20px) !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    gap: 6px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
    height: 27px !important;
    min-height: 27px !important;
    padding: 0 9px !important;
    font-size: 9.5px !important;
  }
}
/* === MAIN MENU TWO ROW DESKTOP END === */

/* === AUTH LOGIN SHELL START === */
body.vtsa-auth-page {
  min-height: 100vh;
  background:
    radial-gradient(130% 90% at 50% -20%, rgba(140, 191, 105, 0.12), transparent 62%),
    linear-gradient(180deg, #fbfaf7 0%, #f4f5f0 100%) !important;
}

body.vtsa-auth-page .vtsa-auth-topbar {
  display: flex;
  justify-content: center;
  padding: 28px 18px 0;
}

body.vtsa-auth-page .vtsa-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 8px 22px 8px 12px;
  border: 2px solid #111827;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.84);
  color: #111827;
  text-decoration: none;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.08);
}

body.vtsa-auth-page .vtsa-auth-brand .vtsa-brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

body.vtsa-auth-page .vtsa-auth-brand .vtsa-brand-wordmark {
  display: grid;
  gap: 1px;
}

body.vtsa-auth-page .vtsa-auth-brand .vtsa-brand-wordmark strong {
  color: #111827;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

body.vtsa-auth-page .vtsa-auth-brand .vtsa-brand-wordmark small {
  color: #5f6c7d;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.10em;
}

body.vtsa-auth-page main.shell {
  display: grid;
  place-items: start center;
  min-height: calc(100vh - 92px);
  padding: 54px 18px 70px !important;
}

.vtsa-login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 34px;
  align-items: center;
  width: min(1040px, 100%);
}

.vtsa-login-intro {
  padding: 24px 8px;
}

.vtsa-login-intro .eyebrow {
  margin-bottom: 12px;
  color: #697487;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.10em;
}

.vtsa-login-intro h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(48px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

.vtsa-login-intro p {
  width: min(600px, 100%);
  margin: 20px 0 0;
  color: #5f6c7d;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.35;
}

.vtsa-login-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.vtsa-login-capabilities span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
}

.vtsa-login-card.auth-panel {
  width: 100%;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 26px 70px rgba(17, 24, 39, 0.12);
}

.vtsa-login-card .section-heading {
  margin-bottom: 22px;
}

.vtsa-login-card .section-heading h2 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.vtsa-login-card .section-heading p {
  margin: 0;
  color: #627086;
  font-size: 15px;
  font-weight: 750;
}

.vtsa-login-card label span {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vtsa-login-card input {
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.62);
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: 16px;
  font-weight: 750;
}

.vtsa-login-card input:focus {
  border-color: #8cbf69;
  box-shadow: 0 0 0 4px rgba(140, 191, 105, 0.18);
  outline: none;
}

.vtsa-password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.vtsa-password-field input {
  width: 100%;
  padding-right: 78px;
}

.vtsa-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 9px;
  background: #f4f6f3;
  color: #3f5840;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.vtsa-password-toggle:hover {
  background: #e8efe3;
  border-color: rgba(140, 191, 105, 0.7);
}

.vtsa-password-toggle:focus-visible {
  outline: 2px solid #8cbf69;
  outline-offset: 1px;
}

.vtsa-login-card button.primary {
  width: 100%;
  min-height: 54px;
  border: 1px solid #111827;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.18);
  transition: background 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
}

.vtsa-login-card button.primary:hover {
  background: #263244;
}

.vtsa-login-card button.primary:active {
  transform: translateY(1px);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}

.vtsa-login-card button.primary.is-busy,
.vtsa-login-card button.primary:disabled {
  background: #3a4658;
  cursor: progress;
  opacity: 0.92;
  box-shadow: none;
}

.vtsa-login-card .auth-links {
  align-items: center;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 900;
}

.vtsa-login-card .auth-links a {
  color: #0f5130;
}

.vtsa-login-note {
  margin: 18px 0 0;
  padding-top: 15px;
  border-top: 1px solid rgba(148, 163, 184, 0.30);
  color: #7a8798;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 820px) {
  .vtsa-login-shell {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .vtsa-login-intro {
    padding: 0;
    text-align: center;
  }

  .vtsa-login-intro p {
    margin-inline: auto;
    font-size: 17px;
  }

  .vtsa-login-capabilities {
    justify-content: center;
  }

  body.vtsa-auth-page main.shell {
    padding-top: 34px !important;
  }
}
/* === AUTH LOGIN SHELL END === */

/* === OFFICE HOME WIDTH FIX START === */
main.shell:has(.office-suite-home),
.shell:has(.office-suite-home) {
  width: min(1080px, calc(100vw - 48px)) !important;
  margin: 32px auto 56px !important;
}

.office-suite-home {
  gap: 26px !important;
}

.office-suite-home .suite-section {
  width: fit-content !important;
  max-width: 100% !important;
  margin-inline: auto !important;
}

.office-suite-home .suite-grid,
.office-suite-home .office-tools-grid {
  grid-template-columns: repeat(4, 224px) !important;
  justify-content: center !important;
  gap: 14px !important;
  max-width: 100% !important;
}

.office-suite-home .app-card,
.office-suite-home .suite-card {
  min-height: 166px !important;
  padding: 18px 16px !important;
  border-radius: 18px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  text-align: center !important;
}

.office-suite-home .app-card strong {
  font-size: clamp(19px, 1.05vw, 22px) !important;
  line-height: 1.04 !important;
}

.office-suite-home .app-card-copy small {
  font-size: 12px !important;
  line-height: 1.34 !important;
  max-width: 22ch !important;
  margin: 0 auto !important;
}

.office-suite-home .app-card-copy {
  justify-items: center !important;
  gap: 8px !important;
}

.office-suite-home a.suite-card .app-icon,
.office-suite-home a.suite-card .office-icon,
.office-suite-home a.suite-card .tool-icon,
.office-suite-home a.suite-card .card-icon,
.office-suite-home a.suite-card .icon-box {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  border-radius: 16px !important;
  margin: 0 auto !important;
}

@media (max-width: 1180px) {
  .office-suite-home .suite-grid,
  .office-suite-home .office-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 224px)) !important;
  }
}

@media (max-width: 640px) {
  main.shell:has(.office-suite-home),
  .shell:has(.office-suite-home) {
    width: min(100%, calc(100vw - 24px)) !important;
    margin-top: 20px !important;
  }

  .office-suite-home .suite-section {
    width: 100% !important;
  }

  .office-suite-home .suite-grid,
  .office-suite-home .office-tools-grid {
    grid-template-columns: 1fr !important;
  }

  .office-suite-home .app-card,
  .office-suite-home .suite-card {
    min-height: 146px !important;
  }
}
/* === OFFICE HOME WIDTH FIX END === */


/* Logistics Register Check-In spacing and warm page-color controls */
.logistics-quick-update-form.logistics-checkin-form {
  display: grid;
  grid-template-columns:
    minmax(150px, 0.9fr)
    minmax(260px, 1.45fr)
    minmax(150px, 0.9fr)
    minmax(120px, 0.7fr)
    minmax(150px, 0.9fr)
    minmax(220px, 1.2fr);
  gap: 18px 20px;
  align-items: end;
  padding: 22px;
}

.logistics-quick-update-form.logistics-checkin-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.logistics-quick-update-form.logistics-checkin-form input,
.logistics-quick-update-form.logistics-checkin-form select,
.logistics-quick-update-form.logistics-checkin-form textarea {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(180, 83, 9, 0.38) !important;
  background: linear-gradient(180deg, #fffaf0 0%, #fff7ed 100%) !important;
  color: #7f1d1d !important;
  box-shadow: 0 1px 0 rgba(127, 29, 29, 0.06);
}

.logistics-quick-update-form.logistics-checkin-form select,
.logistics-form-grid.logistics-edit-form select,
.logistics-update-edit select {
  border-color: rgba(185, 28, 28, 0.36) !important;
  background-color: #fff7ed !important;
  color: #7f1d1d !important;
  accent-color: #dc2626;
}

.logistics-quick-update-form.logistics-checkin-form select:focus,
.logistics-quick-update-form.logistics-checkin-form input:focus,
.logistics-quick-update-form.logistics-checkin-form textarea:focus,
.logistics-form-grid.logistics-edit-form select:focus,
.logistics-update-edit select:focus {
  outline: none;
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.24);
}

.logistics-quick-update-form.logistics-checkin-form select option,
.logistics-form-grid.logistics-edit-form select option,
.logistics-update-edit select option {
  background: #fff7ed;
  color: #7f1d1d;
}

.logistics-quick-update-form.logistics-checkin-form textarea {
  min-height: 88px;
  resize: vertical;
}

.logistics-checkin-note {
  grid-column: span 5;
}

.logistics-quick-update-form.logistics-checkin-form button,
.logistics-quick-update-form.logistics-checkin-form .logistics-btn {
  min-height: 46px;
  align-self: end;
}

@media (max-width: 1250px) {
  .logistics-quick-update-form.logistics-checkin-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .logistics-checkin-note {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .logistics-quick-update-form.logistics-checkin-form {
    grid-template-columns: 1fr;
  }

  .logistics-checkin-note {
    grid-column: span 1;
  }
}


/* Logistics compact Register Check-In + public transport update page */
.logistics-quick-update-form.logistics-checkin-form {
  display: grid;
  grid-template-columns:
    minmax(110px, 0.7fr)
    minmax(170px, 0.95fr)
    minmax(125px, 0.7fr)
    minmax(105px, 0.6fr)
    minmax(125px, 0.7fr)
    minmax(180px, 0.95fr);
  gap: 10px 12px;
  align-items: end;
  padding: 6px 0 0;
}

.logistics-quick-update-form.logistics-checkin-form label {
  gap: 4px;
}

.logistics-quick-update-form.logistics-checkin-form input,
.logistics-quick-update-form.logistics-checkin-form select,
.logistics-quick-update-form.logistics-checkin-form textarea,
.logistics-public-update-form input,
.logistics-public-update-form select,
.logistics-public-update-form textarea {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(180, 83, 9, 0.38) !important;
  background: linear-gradient(180deg, #fffaf0 0%, #fff7ed 100%) !important;
  color: #7f1d1d !important;
  box-shadow: none;
}

.logistics-quick-update-form.logistics-checkin-form select,
.logistics-form-grid.logistics-edit-form select,
.logistics-update-edit select,
.logistics-public-update-form select {
  border-color: rgba(185, 28, 28, 0.36) !important;
  background-color: #fff7ed !important;
  color: #7f1d1d !important;
  accent-color: #dc2626;
}

.logistics-quick-update-form.logistics-checkin-form select:focus,
.logistics-quick-update-form.logistics-checkin-form input:focus,
.logistics-quick-update-form.logistics-checkin-form textarea:focus,
.logistics-public-update-form select:focus,
.logistics-public-update-form input:focus,
.logistics-public-update-form textarea:focus {
  outline: none;
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.logistics-quick-update-form.logistics-checkin-form textarea {
  min-height: 52px;
}

.logistics-checkin-note {
  grid-column: span 2;
}

.logistics-quick-update-form.logistics-checkin-form button {
  min-height: 38px;
  max-width: 200px;
}

/* External transport-company page */
.logistics-public-update-page {
  min-height: calc(100vh - 120px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 38px 18px;
  background:
    radial-gradient(circle at top left, rgba(254, 243, 199, 0.80), transparent 36%),
    #fffdf7;
}

.logistics-public-update-card {
  width: min(720px, 100%);
  border: 1px solid rgba(217, 119, 6, 0.28);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(30, 41, 59, 0.08);
  padding: 24px;
}

.logistics-public-update-header {
  margin-bottom: 18px;
}

.logistics-public-update-header .eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #92400e;
}

.logistics-public-update-header h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 3rem);
  color: #111827;
}

.logistics-public-update-header p {
  margin: 8px 0 0;
  color: #64748b;
  font-weight: 700;
}

.logistics-public-update-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
}

.logistics-public-update-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.logistics-public-update-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.logistics-public-update-form textarea {
  min-height: 100px;
  resize: vertical;
}

.logistics-public-submit {
  width: 100%;
  min-height: 46px;
}

@media (max-width: 1100px) {
  .logistics-quick-update-form.logistics-checkin-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .logistics-checkin-note {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .logistics-quick-update-form.logistics-checkin-form,
  .logistics-public-update-row {
    grid-template-columns: 1fr;
  }

  .logistics-checkin-note {
    grid-column: span 1;
  }
}


/* Logistics public email gate */
.logistics-public-email-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.logistics-public-email-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.logistics-public-email-form input {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(180, 83, 9, 0.38);
  background: linear-gradient(180deg, #fffaf0 0%, #fff7ed 100%);
  color: #7f1d1d;
  padding: 0 12px;
}

.logistics-public-help {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}

.logistics-public-error {
  margin: 0;
  color: #b91c1c;
  font-weight: 800;
}

.logistics-public-success {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 900;
}

/* Public logistics update page polish */
body.vtsa-auth-page.vtsa-page-logistics .vtsa-auth-topbar {
  padding: 18px 16px 0;
}

body.vtsa-auth-page.vtsa-page-logistics .vtsa-auth-brand {
  min-height: 52px;
  gap: 11px;
  padding: 6px 16px 6px 10px;
  border-width: 1.5px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);
}

body.vtsa-auth-page.vtsa-page-logistics .vtsa-auth-brand .vtsa-brand-logo {
  width: 40px;
  height: 40px;
}

body.vtsa-auth-page.vtsa-page-logistics .vtsa-auth-brand .vtsa-brand-wordmark strong {
  font-size: 19px;
}

body.vtsa-auth-page.vtsa-page-logistics .vtsa-auth-brand .vtsa-brand-wordmark small {
  font-size: 8.5px;
}

body.vtsa-auth-page.vtsa-page-logistics main.shell {
  display: block;
  width: 100% !important;
  max-width: none !important;
  min-height: calc(100vh - 76px);
  margin: 0 auto !important;
  padding: 18px 16px 40px !important;
  background: transparent !important;
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-page {
  display: block;
  width: min(760px, calc(100vw - 32px));
  min-height: auto;
  margin: 0 auto;
  padding: 26px 0 48px;
  background: transparent;
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-card {
  width: 100%;
  border-radius: 16px;
  padding: 28px 30px;
  box-shadow: 0 18px 44px rgba(30, 41, 59, 0.10);
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-header {
  margin-bottom: 16px;
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-header .eyebrow {
  margin-bottom: 7px;
  font-size: 12px;
  letter-spacing: 0.12em;
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-header h1 {
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-header p {
  margin-top: 7px;
  font-size: 15px;
  line-height: 1.35;
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-email-form,
body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-form {
  gap: 12px;
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-email-form label,
body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-form label {
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-email-form input,
body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-form input,
body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-form select {
  min-height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-form textarea {
  min-height: 96px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-help,
body.vtsa-auth-page.vtsa-page-logistics .logistics-public-error {
  font-size: 14px;
  line-height: 1.35;
}

body.vtsa-auth-page.vtsa-page-logistics .logistics-public-submit.logistics-btn.primary {
  width: auto;
  min-width: 168px;
  min-height: 42px !important;
  height: 42px !important;
  justify-self: start;
  padding: 0 22px !important;
  border-color: #b72d2d !important;
  background: #b72d2d !important;
  color: #ffffff !important;
  font-size: 14px !important;
  line-height: 1 !important;
  box-shadow: 0 12px 24px rgba(183, 45, 45, 0.18);
}

@media (max-width: 640px) {
  body.vtsa-auth-page.vtsa-page-logistics .vtsa-auth-topbar {
    padding-top: 12px;
  }

  body.vtsa-auth-page.vtsa-page-logistics main.shell {
    padding: 12px 10px 28px !important;
  }

  body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-page {
    width: min(100%, calc(100vw - 20px));
    padding: 14px 0 32px;
  }

  body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-card {
    padding: 20px;
    border-radius: 14px;
  }

  body.vtsa-auth-page.vtsa-page-logistics .logistics-public-update-header h1 {
    font-size: 28px;
  }

  body.vtsa-auth-page.vtsa-page-logistics .logistics-public-submit.logistics-btn.primary {
    width: 100%;
  }
}

/* === VTSA HEADER STREAMLINE START === */
body .topbar.vtsa-fixed-topbar {
  grid-template-columns: 270px minmax(620px, 1fr) minmax(max-content, auto) !important;
  grid-template-areas: "brand nav actions" !important;
  align-items: start !important;
  gap: 18px !important;
  min-height: 118px !important;
  padding: 12px 14px 14px 28px !important;
  overflow: hidden !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
  width: 270px !important;
  max-width: 270px !important;
  min-height: 62px !important;
  gap: 12px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand .vtsa-brand-logo {
  width: 54px !important;
  height: 56px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark strong {
  font-size: 34px !important;
  letter-spacing: 0.13em !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-brand-wordmark small {
  font-size: 10.5px !important;
  letter-spacing: 0.22em !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
  grid-area: nav !important;
  justify-self: center !important;
  width: min(720px, 100%) !important;
  max-width: 720px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 8px 10px !important;
  margin: 0 !important;
  padding-top: 2px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  border-width: 2px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  gap: 7px !important;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.10) !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span svg {
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  font-size: 16px !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
  grid-area: actions !important;
  align-self: start !important;
  justify-self: end !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 5px !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 8px !important;
  border: 1.5px solid #111827 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #0f5130 !important;
  font-size: 9.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.01em !important;
  line-height: 1 !important;
  box-shadow: 0 3px 8px rgba(17, 24, 39, 0.08) !important;
}

body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn span {
  width: 12px !important;
  min-width: 12px !important;
  font-size: 12px !important;
}

@media (min-width: 1600px) {
  body .topbar.vtsa-fixed-topbar {
    grid-template-columns: 290px minmax(720px, 1fr) minmax(max-content, auto) !important;
    padding-right: 18px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    width: 760px !important;
    max-width: 760px !important;
  }
}

@media (max-width: 1180px) {
  body .topbar.vtsa-fixed-topbar {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "brand"
      "actions"
      "nav" !important;
    min-height: 0 !important;
    padding: 12px !important;
    overflow: visible !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    justify-self: center !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    width: min(100%, 456px) !important;
  }
}
/* === VTSA HEADER STREAMLINE END === */

/* LOO mobile hard clamp: make records fit the phone viewport, not a desktop table. */
.loo-workflow-page,
.vtsa-page-loo {
  --workflow-accent: #9a35d8;
  --workflow-accent-dark: #7922b6;
  --workflow-accent-soft: #f3e6ff;
  --workflow-accent-border: #9a35d8;
}

@media (max-width: 760px) {
  html:has(.loo-records-table),
  body:has(.loo-records-table),
  body.vtsa-page-loo {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }

  body:has(.loo-records-table) .shell,
  body.vtsa-page-loo .shell,
  body.vtsa-page-loo main.shell,
  .shell:has(.loo-records-table),
  .loo-page,
  .vtsa-page-loo {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    overflow-x: hidden !important;
  }

  body.vtsa-page-loo .panel,
  body.vtsa-page-loo .filter-bar,
  body.vtsa-page-loo .loo-records-table,
  .loo-page .panel,
  .loo-page .filter-bar,
  .loo-page .loo-records-table,
  .loo-records-table {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
  }

  body.vtsa-page-loo .filter-bar,
  .loo-page .filter-bar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    padding: 10px !important;
    border-color: rgba(154, 53, 216, 0.18) !important;
    box-shadow: 0 10px 24px rgba(154, 53, 216, 0.07) !important;
  }

  body.vtsa-page-loo input,
  body.vtsa-page-loo select,
  body.vtsa-page-loo textarea,
  .loo-page input,
  .loo-page select,
  .loo-page textarea {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.vtsa-page-loo .loo-records-table,
  .loo-page .loo-records-table,
  .loo-records-table {
    display: grid !important;
    gap: 14px !important;
    border: 0 !important;
    background: transparent !important;
  }

  body.vtsa-page-loo .row.loo-record-row.head,
  .loo-page .row.loo-record-row.head,
  .loo-records-table .row.loo-record-row.head {
    display: none !important;
  }

  body.vtsa-page-loo .row.loo-record-row,
  .loo-page .row.loo-record-row,
  .loo-records-table .row.loo-record-row {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 13px 14px !important;
    border: 1px solid rgba(154, 53, 216, 0.22) !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(154, 53, 216, 0.08) !important;
  }

  body.vtsa-page-loo .row.loo-record-row > span,
  .loo-page .row.loo-record-row > span,
  .loo-records-table .row.loo-record-row > span {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(68px, 0.4fr) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
  }

  body.vtsa-page-loo .row.loo-record-row > span:last-child,
  .loo-page .row.loo-record-row > span:last-child,
  .loo-records-table .row.loo-record-row > span:last-child {
    border-bottom: 0 !important;
  }

  body.vtsa-page-loo .row.loo-record-row > span::before,
  .loo-page .row.loo-record-row > span::before,
  .loo-records-table .row.loo-record-row > span::before {
    color: #7922b6 !important;
    content: "" !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
  }

  .row.loo-record-row > span:nth-child(1)::before { content: "LOO no." !important; }
  .row.loo-record-row > span:nth-child(2)::before { content: "Version" !important; }
  .row.loo-record-row > span:nth-child(3)::before { content: "Buyer" !important; }
  .row.loo-record-row > span:nth-child(4)::before { content: "Supplier" !important; }
  .row.loo-record-row > span:nth-child(5)::before { content: "Product" !important; }
  .row.loo-record-row > span:nth-child(6)::before { content: "Qty" !important; }
  .row.loo-record-row > span:nth-child(7)::before { content: "Value" !important; }
  .row.loo-record-row > span:nth-child(8)::before { content: "Status" !important; }
  .row.loo-record-row > span:nth-child(9)::before { content: "Sent" !important; }
  .row.loo-record-row > span:nth-child(10)::before { content: "Actions" !important; }

  body.vtsa-page-loo .row.loo-record-row strong,
  .loo-page .row.loo-record-row strong,
  .loo-records-table .row.loo-record-row strong {
    color: #111827 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
    font-size: 15px !important;
  }

  body.vtsa-page-loo .row.loo-record-row > span:nth-child(7) strong,
  .loo-page .row.loo-record-row > span:nth-child(7) strong,
  .loo-records-table .row.loo-record-row > span:nth-child(7) strong {
    color: #9a35d8 !important;
  }

  body.vtsa-page-loo .row.loo-record-row > span:nth-child(8) strong,
  .loo-page .row.loo-record-row > span:nth-child(8) strong,
  .loo-records-table .row.loo-record-row > span:nth-child(8) strong {
    background: #f3e6ff !important;
    color: #7922b6 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.vtsa-page-loo .row.loo-record-row > span:nth-child(10),
  .loo-page .row.loo-record-row > span:nth-child(10),
  .loo-records-table .row.loo-record-row > span:nth-child(10) {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    gap: 9px !important;
    padding-top: 10px !important;
  }

  body.vtsa-page-loo .row.loo-record-row > span:nth-child(10)::before,
  .loo-page .row.loo-record-row > span:nth-child(10)::before,
  .loo-records-table .row.loo-record-row > span:nth-child(10)::before {
    margin-bottom: 1px !important;
  }

  body.vtsa-page-loo .loo-actions,
  body.vtsa-page-loo .workflow-actions,
  .loo-page .loo-actions,
  .loo-page .workflow-actions,
  .loo-records-table .loo-actions,
  .loo-records-table .workflow-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.vtsa-page-loo .loo-actions form,
  .loo-page .loo-actions form,
  .loo-records-table .loo-actions form {
    flex: 1 1 82px !important;
    min-width: 0 !important;
  }

  body.vtsa-page-loo .row.loo-record-row .button,
  body.vtsa-page-loo .row.loo-record-row button,
  .loo-page .row.loo-record-row .button,
  .loo-page .row.loo-record-row button,
  .loo-records-table .row.loo-record-row .button,
  .loo-records-table .row.loo-record-row button {
    box-sizing: border-box !important;
    flex: 1 1 82px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 34px !important;
    border-color: rgba(154, 53, 216, 0.28) !important;
    color: #7922b6 !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    white-space: normal !important;
  }
}

/* Accounting overview UX cleanup final override */
body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc {
  background: linear-gradient(180deg, #fff4f3 0%, #ffe6e4 100%) !important;
  border-color: #b30900 !important;
  color: #8f1f1f !important;
  box-shadow: 0 8px 18px rgba(179, 9, 0, 0.16) !important;
}

body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc span,
body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc svg {
  color: #b30900 !important;
  stroke: #b30900 !important;
}

body.vtsa-page-accounting main.shell:has(.accounting-dashboard),
body.vtsa-page-accounting .shell:has(.accounting-dashboard) {
  padding: 28px 28px 70px !important;
  background: linear-gradient(180deg, #fff9f8 0%, #ffffff 44%, #fffafa 100%) !important;
}

.accounting-dashboard {
  --acc-red: #b83232;
  --acc-red-dark: #8f1f1f;
  --acc-red-soft: #ffe6e4;
  --acc-red-wash: #fff5f4;
  --acc-line: rgba(184, 50, 50, 0.22);
  --acc-ink: #111827;
  --acc-muted: #64748b;
  width: min(100%, 1480px) !important;
  margin: 0 auto !important;
}

.accounting-dashboard .accounting-hero-panel {
  align-items: center !important;
  margin-bottom: 16px !important;
  padding: 30px 34px !important;
  border: 1.5px solid rgba(184, 50, 50, 0.22) !important;
  border-radius: 22px !important;
  background: linear-gradient(135deg, #fff5f4 0%, #ffffff 66%, #ffefed 100%) !important;
  box-shadow: 0 16px 38px rgba(143, 31, 31, 0.075) !important;
}

.accounting-dashboard .accounting-hero-panel h1 {
  margin: 5px 0 8px !important;
  font-size: clamp(40px, 4vw, 58px) !important;
  line-height: 1 !important;
}

.accounting-dashboard .accounting-hero-panel .hero-subtitle {
  max-width: 720px !important;
  font-size: 17px !important;
}

.accounting-page-menu {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.accounting-page-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 66px;
  padding: 14px 15px 14px 18px;
  border: 2px solid rgba(184, 50, 50, 0.22);
  border-radius: 16px;
  background: #ffffff;
  color: var(--acc-ink);
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.045);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.accounting-page-menu a:hover,
.accounting-page-menu a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(184, 50, 50, 0.46);
  background: var(--acc-red-wash);
  box-shadow: 0 14px 28px rgba(143, 31, 31, 0.10);
  outline: none;
}

.accounting-page-menu span {
  color: var(--acc-red-dark);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.12;
}

.accounting-page-menu strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--acc-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(184, 50, 50, 0.20);
}

.accounting-dashboard .accounting-primary-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.accounting-dashboard .accounting-primary-metrics article {
  min-height: 126px !important;
  padding: 20px !important;
  border-color: rgba(184, 50, 50, 0.18) !important;
}

.accounting-control-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.accounting-control-strip article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 14px 17px;
  border: 1px solid rgba(184, 50, 50, 0.18);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 9px 20px rgba(17, 24, 39, 0.04);
}

.accounting-control-strip article.has-issue {
  border-color: rgba(184, 50, 50, 0.34);
  background: #fff1ef;
}

.accounting-control-strip span,
.accounting-context-list span {
  color: #745d5d;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.accounting-control-strip strong {
  color: var(--acc-ink);
  font-size: 23px;
  font-weight: 950;
  line-height: 1;
  text-align: right;
}

.accounting-dashboard .accounting-grid-two {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) !important;
  gap: 16px !important;
}

.accounting-dashboard .accounting-panel.clean,
.accounting-dashboard .accounting-help.clean {
  border-color: rgba(184, 50, 50, 0.18) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.045) !important;
}

.accounting-dashboard .accounting-section-head {
  margin-bottom: 13px !important;
}

.accounting-dashboard .accounting-section-head h2 {
  font-size: 24px !important;
}

.accounting-dashboard .accounting-attention-list {
  gap: 9px !important;
}

.accounting-dashboard .accounting-attention-list div {
  min-height: 52px !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  background: #ffffff !important;
}

.accounting-dashboard .accounting-attention-list div.has-issue {
  background: #fff1ef !important;
}

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

.accounting-context-list div {
  min-height: 96px;
  padding: 15px;
  border: 1px solid rgba(184, 50, 50, 0.15);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fffafa 100%);
}

.accounting-context-list strong {
  display: block;
  margin-top: 8px;
  color: var(--acc-ink);
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
}

.accounting-context-list small {
  display: block;
  margin-top: 6px;
  color: var(--acc-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}

.accounting-dashboard .accounting-table-wrap {
  border-radius: 15px !important;
  overflow-x: auto !important;
}

.accounting-dashboard .accounting-table th {
  background: #fff3f2 !important;
}

.accounting-dashboard .accounting-help.clean summary {
  color: var(--acc-red-dark) !important;
}

@media (max-width: 1180px) {
  .accounting-page-menu,
  .accounting-dashboard .accounting-primary-metrics,
  .accounting-control-strip,
  .accounting-dashboard .accounting-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  body.vtsa-page-accounting main.shell:has(.accounting-dashboard),
  body.vtsa-page-accounting .shell:has(.accounting-dashboard) {
    padding: 16px 10px 48px !important;
  }

  .accounting-dashboard .accounting-hero-panel,
  .accounting-page-menu,
  .accounting-dashboard .accounting-primary-metrics,
  .accounting-control-strip,
  .accounting-dashboard .accounting-grid-two,
  .accounting-context-list,
  .accounting-dashboard .accounting-attention-list {
    grid-template-columns: 1fr !important;
  }

  .accounting-dashboard .accounting-hero-panel {
    padding: 20px !important;
  }

  .accounting-page-menu a,
  .accounting-control-strip article {
    min-height: 58px;
  }
}

/* === VTSA MOBILE ADMIN ACTIONS FLAT ROW 20260603 === */
/* Keep Light / Admin / DB / Logout on one horizontal line on phones. */
@media (max-width: 760px) {
  body .topbar.vtsa-fixed-topbar {
    grid-template-areas:
      "brand"
      "actions"
      "nav" !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    gap: 6px !important;
    margin: 4px auto 12px !important;
    padding: 0 2px !important;
    box-sizing: border-box !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .theme-toggle,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-logout-form,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-logout-form .vtsa-action-btn {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-logout-form {
    display: inline-flex !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .theme-toggle,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 11px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    gap: 5px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn span {
    width: auto !important;
    min-width: 0 !important;
    font-size: 12px !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    margin-top: 0 !important;
  }
}

@media (max-width: 390px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    gap: 4px !important;
    padding: 0 !important;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .theme-toggle,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }
}
/* === END VTSA MOBILE ADMIN ACTIONS FLAT ROW 20260603 === */

/* === Logistics detail calm tracking layout === */
.logistics-hero.compact {
  align-items: flex-start !important;
  padding: 18px 22px !important;
  border-color: #eadfbd !important;
  background: #fffef9 !important;
  box-shadow: 0 8px 18px rgba(117, 91, 35, 0.055) !important;
}

.logistics-hero.compact h1 {
  font-size: clamp(32px, 3.2vw, 46px) !important;
  line-height: 1.02 !important;
}

.logistics-hero.compact p {
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.logistics-hero.compact .logistics-hero-actions {
  align-items: flex-start !important;
  gap: 8px !important;
}

.logistics-hero.compact .logistics-btn {
  min-height: 34px !important;
  padding: 0 13px !important;
  font-size: 12px !important;
}

.logistics-actions-menu {
  position: relative;
}

.logistics-actions-menu > summary {
  list-style: none;
}

.logistics-actions-menu > summary::-webkit-details-marker {
  display: none;
}

.logistics-actions-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  min-width: 210px;
  gap: 7px;
  padding: 10px;
  border: 1px solid #eadfbd;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.logistics-actions-menu-list .logistics-btn,
.logistics-actions-menu-list form,
.logistics-actions-menu-list button {
  width: 100%;
}

.logistics-section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  list-style: none;
  cursor: pointer;
}

.logistics-section-summary::-webkit-details-marker {
  display: none;
}

.logistics-section-summary span {
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
}

.logistics-section-summary small {
  max-width: 58%;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logistics-section-summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid #d7c89b;
  border-radius: 999px;
  color: #7a4a00;
  font-size: 16px;
  font-weight: 900;
}

details[open] > .logistics-section-summary {
  margin-bottom: 12px;
}

details[open] > .logistics-section-summary::after {
  content: "-";
}

.logistics-quick-update-panel {
  padding: 12px 14px !important;
}

.logistics-quick-update-panel:not([open]) {
  background: #ffffff !important;
}

.logistics-quick-update-form.logistics-checkin-form {
  padding: 4px 0 0 !important;
}

.logistics-shipment-timeline-layout {
  grid-template-columns: minmax(320px, 0.62fr) minmax(560px, 1.38fr) !important;
  gap: 12px !important;
  min-height: 520px !important;
}

.logistics-shipment-timeline-list {
  gap: 7px !important;
  max-height: 520px !important;
}

.logistics-shipment-timeline-entry {
  border-color: #eee3c3 !important;
  border-left-width: 3px !important;
  border-radius: 9px !important;
  padding: 9px 11px 9px 14px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.logistics-shipment-timeline-entry strong {
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.logistics-shipment-timeline-entry span,
.logistics-shipment-timeline-entry p {
  font-size: 11px !important;
}

.logistics-shipment-timeline-entry p {
  display: -webkit-box;
  overflow: hidden;
  border-top: 0 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  padding-top: 0 !important;
}

.logistics-update-manage {
  margin-top: 5px;
}

.logistics-update-manage > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 76px;
  padding: 0 10px;
  border: 1px solid #e1d5ae;
  border-radius: 999px;
  background: #fffdf5;
  color: #475569;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  list-style: none;
}

.logistics-update-manage > summary::-webkit-details-marker {
  display: none;
}

.logistics-update-actions {
  margin-top: 8px !important;
  padding: 8px !important;
  border: 1px solid #f1e7c9 !important;
  border-radius: 10px;
  background: #fffdf5;
}

.logistics-update-manage:not([open]) .logistics-update-actions {
  display: none !important;
}

.logistics-update-manage .logistics-update-edit {
  display: block;
}

.logistics-route-map {
  min-height: 520px !important;
  border-color: #d8c99e !important;
}

.logistics-secondary-panel {
  padding: 12px 14px !important;
}

.logistics-secondary-panel:not([open]) {
  background: #ffffff !important;
}

.logistics-detail-grid {
  gap: 12px !important;
}

.logistics-summary {
  gap: 8px !important;
  margin-top: 10px !important;
}

.logistics-summary div {
  padding: 10px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
}

.logistics-summary dt {
  font-size: 10px !important;
}

.logistics-summary dd {
  font-size: 13px !important;
  overflow-wrap: anywhere;
}

.logistics-deal-chain-panel {
  padding: 14px 16px !important;
}

.logistics-chain-heading {
  margin-bottom: 10px !important;
}

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

.logistics-doc-chain-item {
  display: grid;
  gap: 3px;
  min-height: 56px;
  padding: 9px 10px;
  border: 1px solid #e4d7ac;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
}

.logistics-doc-chain-item strong {
  color: #7a4a00;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.logistics-doc-chain-item span {
  overflow: hidden;
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logistics-doc-chain-item em {
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
}

.logistics-doc-chain-item.is-missing {
  background: #f8fafc;
  border-style: dashed;
  color: #64748b;
}

.logistics-deal-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.logistics-chain-section {
  overflow: hidden;
  border: 1px solid #e8ddbc;
  border-radius: 10px;
  background: #ffffff;
}

.logistics-chain-section h3 {
  margin: 0 !important;
  padding: 9px 11px;
  border-bottom: 1px solid #e8ddbc;
  background: #fff8d3;
  color: #7a4a00 !important;
  font-size: 11px !important;
  line-height: 1;
  text-transform: uppercase;
}

.logistics-chain-list {
  display: block !important;
  margin: 0 !important;
}

.logistics-chain-list div {
  display: grid !important;
  grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid #f1e7c9 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
}

.logistics-chain-list div:last-child {
  border-bottom: 0 !important;
}

.logistics-chain-list dt,
.logistics-chain-list dd {
  margin: 0 !important;
  line-height: 1.2;
}

.logistics-chain-list dt {
  font-size: 10px !important;
}

.logistics-chain-list dd {
  font-size: 12px !important;
}

@media (max-width: 1000px) {
  .logistics-shipment-timeline-layout {
    grid-template-columns: 1fr !important;
  }

  .logistics-route-map {
    order: -1;
    min-height: 420px !important;
  }

  .logistics-actions-menu-list {
    left: 0;
    right: auto;
  }

  .logistics-doc-chain,
  .logistics-deal-info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .logistics-actions-menu,
  .logistics-actions-menu-list {
    position: static;
    width: 100%;
  }

  .logistics-section-summary {
    align-items: flex-start;
  }

  .logistics-section-summary small {
    max-width: 46%;
    white-space: normal;
  }

  .logistics-doc-chain,
  .logistics-deal-info-grid {
    grid-template-columns: 1fr;
  }

  .logistics-chain-list div {
    grid-template-columns: 98px minmax(0, 1fr);
  }
}
/* === Logistics detail calm tracking layout end === */

/* === Shipment Timeline panel — compact (append-only override) ===
   Shrinks the timeline list + Leaflet map so the panel no longer dominates the
   page. Drops the 520px grid floor, caps the map at ~280px and the list to match
   (internal scroll), and tightens paddings. Must stay last for these selectors;
   prior rules at ~18993/19073 use !important so these must too. */
.logistics-shipment-timeline-layout {
  align-items: start !important;
  gap: 10px !important;
  min-height: 0 !important;
}

.logistics-shipment-timeline-list {
  max-height: 300px !important;
  gap: 6px !important;
  padding-right: 4px !important;
}

.logistics-shipment-timeline-entry {
  padding: 7px 10px 7px 12px !important;
}

.logistics-timeline-heading {
  margin-bottom: 8px !important;
}

.logistics-route-map {
  min-height: 0 !important;
  height: 280px !important;
  align-self: start !important;
}

@media (max-width: 1000px) {
  .logistics-shipment-timeline-list {
    max-height: 300px !important;
  }

  .logistics-route-map {
    height: 240px !important;
    min-height: 0 !important;
  }
}
/* === Shipment Timeline panel compact end === */

/* ============================================================================
   DOCUMENT CONTROL PAGE — Dark / Matrix (high-contrast) theming
   ----------------------------------------------------------------------------
   document.html authors its .doc-* chrome in fixed light hex, so under
   data-theme="dark"/"high-contrast" only the generic .panel/.table rules were
   re-mapped — leaving the hero, signer cards, headings and version table as
   white "islands" with dark, invisible text. These rules re-map that chrome
   onto the theme tokens so both dark themes render coherently. Appended per the
   append-only convention; the light theme is untouched. The palette lives in
   the tokens (--bg/--panel/--ink/--muted/--line/--accent), so one rule set
   serves both Dark and Matrix.
   ============================================================================ */

html[data-theme="dark"],
html[data-theme="high-contrast"] {
  /* Nested cards sit ON .panel.doc-page (= --panel); lift them slightly. */
  --doc-elev: color-mix(in srgb, var(--panel) 92%, var(--ink) 8%);
  --doc-inset: color-mix(in srgb, var(--ink) 6%, transparent);
  --doc-chip: color-mix(in srgb, var(--ink) 12%, transparent);
}

/* Cards: hero, control cards, signer cards, output tables. */
html[data-theme="dark"] .doc-hero,
html[data-theme="dark"] .doc-card,
html[data-theme="dark"] .signer-request-card,
html[data-theme="dark"] .doc-output-section .table,
html[data-theme="high-contrast"] .doc-hero,
html[data-theme="high-contrast"] .doc-card,
html[data-theme="high-contrast"] .signer-request-card,
html[data-theme="high-contrast"] .doc-output-section .table {
  background: var(--doc-elev) !important;
  border-color: var(--line) !important;
  box-shadow: var(--shadow);
}

/* Headings + primary text. */
html[data-theme="dark"] .doc-title,
html[data-theme="dark"] .doc-card h2,
html[data-theme="dark"] .doc-output-section h2,
html[data-theme="dark"] .signer-request-head strong,
html[data-theme="high-contrast"] .doc-title,
html[data-theme="high-contrast"] .doc-card h2,
html[data-theme="high-contrast"] .doc-output-section h2,
html[data-theme="high-contrast"] .signer-request-head strong {
  color: var(--ink);
}

/* Secondary / muted text. */
html[data-theme="dark"] .doc-subtitle,
html[data-theme="dark"] .signer-request-head span,
html[data-theme="dark"] .signer-request-head small,
html[data-theme="dark"] .doc-output-section code,
html[data-theme="high-contrast"] .doc-subtitle,
html[data-theme="high-contrast"] .signer-request-head span,
html[data-theme="high-contrast"] .signer-request-head small,
html[data-theme="high-contrast"] .doc-output-section code {
  color: var(--muted);
}

/* Eyeline + control icons: the brand-dark accent is unreadable on a dark
   card, so use the theme accent (light blue in Dark, neon green in Matrix). */
html[data-theme="dark"] .doc-eyeline,
html[data-theme="dark"] .doc-control-icon,
html[data-theme="high-contrast"] .doc-eyeline,
html[data-theme="high-contrast"] .doc-control-icon {
  color: var(--accent);
}

/* Badges -> translucent chips. Status/warn keep their semantic colour. */
html[data-theme="dark"] .doc-badge,
html[data-theme="high-contrast"] .doc-badge {
  background: var(--doc-chip);
  color: var(--ink);
}
html[data-theme="dark"] .doc-badge.status,
html[data-theme="high-contrast"] .doc-badge.status {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}
html[data-theme="dark"] .doc-badge.warn,
html[data-theme="high-contrast"] .doc-badge.warn {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

/* Signer status pills. */
html[data-theme="dark"] .signer-status-pill,
html[data-theme="high-contrast"] .signer-status-pill {
  background: var(--doc-chip);
  color: var(--ink);
}
html[data-theme="dark"] .signer-status-pill.signed,
html[data-theme="high-contrast"] .signer-status-pill.signed {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
}
html[data-theme="dark"] .signer-status-pill.pending,
html[data-theme="high-contrast"] .signer-status-pill.pending {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

/* Version-history table: header (beats the .doc-tool-* cream rule) + rows. */
html[data-theme="dark"] .doc-output-section .row.head,
html[data-theme="high-contrast"] .doc-output-section .row.head {
  background: var(--doc-inset) !important;
  color: var(--muted) !important;
}
html[data-theme="dark"] .doc-output-section .row.head span,
html[data-theme="high-contrast"] .doc-output-section .row.head span {
  color: var(--muted) !important;
}
html[data-theme="dark"] .doc-output-section .row,
html[data-theme="high-contrast"] .doc-output-section .row {
  border-bottom-color: var(--line);
}

/* Compact action buttons inside output sections (white-pill !important base). */
html[data-theme="dark"] .doc-output-section .button,
html[data-theme="dark"] .doc-output-section button.button,
html[data-theme="dark"] .doc-output-section a.button,
html[data-theme="high-contrast"] .doc-output-section .button,
html[data-theme="high-contrast"] .doc-output-section button.button,
html[data-theme="high-contrast"] .doc-output-section a.button {
  background: var(--doc-chip) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .doc-output-section .button:hover,
html[data-theme="dark"] .doc-output-section a.button:hover,
html[data-theme="high-contrast"] .doc-output-section .button:hover,
html[data-theme="high-contrast"] .doc-output-section a.button:hover {
  background: color-mix(in srgb, var(--ink) 18%, transparent) !important;
  border-color: var(--accent) !important;
}

/* Hero action buttons + the "More" dropdown panel. The hero buttons are painted
   white by high-specificity `.doc-hero .doc-actions a.button` !important rules,
   so match that depth. The green primary (Download), the per-tool coloured
   `bc-*` families and the approve/sign CTAs keep their light-theme identity. */
html[data-theme="dark"] .doc-hero .doc-actions a.button:not([class*="bc-"]),
html[data-theme="dark"] .doc-hero .doc-actions button.button:not([class*="bc-"]):not(.doc-share-button):not(.doc-approve-sign-button),
html[data-theme="dark"] .doc-hero .doc-actions summary.doc-more-toggle,
html[data-theme="high-contrast"] .doc-hero .doc-actions a.button:not([class*="bc-"]),
html[data-theme="high-contrast"] .doc-hero .doc-actions button.button:not([class*="bc-"]):not(.doc-share-button):not(.doc-approve-sign-button),
html[data-theme="high-contrast"] .doc-hero .doc-actions summary.doc-more-toggle {
  background: var(--doc-chip) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .doc-hero .doc-actions a.button:not([class*="bc-"]):hover,
html[data-theme="dark"] .doc-hero .doc-actions summary.doc-more-toggle:hover,
html[data-theme="high-contrast"] .doc-hero .doc-actions a.button:not([class*="bc-"]):hover,
html[data-theme="high-contrast"] .doc-hero .doc-actions summary.doc-more-toggle:hover {
  background: color-mix(in srgb, var(--ink) 18%, transparent) !important;
  border-color: var(--accent) !important;
}

/* "Share PDF" — pale accent-soft secondary CTA -> dark chip with accent edge. */
html[data-theme="dark"] .doc-hero .doc-actions button.primary,
html[data-theme="dark"] .doc-hero .doc-actions .doc-share-button,
html[data-theme="high-contrast"] .doc-hero .doc-actions button.primary,
html[data-theme="high-contrast"] .doc-hero .doc-actions .doc-share-button {
  background: var(--doc-chip) !important;
  border-color: var(--accent) !important;
  color: var(--ink) !important;
}

/* Per-tool coloured `bc-*` action pills (pale-tint base + coloured border):
   dark chip + light text, but keep each variant's coloured border so the
   colour-coding survives (border-color is intentionally not overridden). */
html[data-theme="dark"] .doc-hero .doc-actions a[class*="bc-"],
html[data-theme="dark"] .doc-hero .doc-actions button[class*="bc-"],
html[data-theme="high-contrast"] .doc-hero .doc-actions a[class*="bc-"],
html[data-theme="high-contrast"] .doc-hero .doc-actions button[class*="bc-"] {
  background: var(--doc-chip) !important;
  color: var(--ink) !important;
}

/* "More" dropdown panel surface. */
html[data-theme="dark"] .doc-more-list,
html[data-theme="high-contrast"] .doc-more-list {
  background: var(--doc-elev);
  border-color: var(--line);
}

/* Fields (label / value tiles). */
html[data-theme="dark"] .doc-field,
html[data-theme="high-contrast"] .doc-field {
  background: var(--doc-inset);
  border-color: var(--line);
}
html[data-theme="dark"] .doc-field span,
html[data-theme="high-contrast"] .doc-field span {
  color: var(--muted);
}
html[data-theme="dark"] .doc-field strong,
html[data-theme="high-contrast"] .doc-field strong {
  color: var(--ink);
}

/* Audit trail (the summary colour is set inline -> needs !important). */
html[data-theme="dark"] .audit-details > summary,
html[data-theme="high-contrast"] .audit-details > summary {
  color: var(--ink) !important;
}
html[data-theme="dark"] .audit-list article,
html[data-theme="high-contrast"] .audit-list article {
  background: var(--doc-inset);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .audit-list code,
html[data-theme="high-contrast"] .audit-list code {
  color: var(--muted);
}
/* === Document control page dark/matrix theming end === */


/* ============================================================================
   OFFICE HOME + GLOBAL TOPBAR — Dark / Matrix (high-contrast) theming
   ----------------------------------------------------------------------------
   Two light-theme-only surfaces left white "islands" / a cream bar under the
   dark themes: (1) the office-home "Accounting" highlight card (hardcoded
   #ffffff !important brand accent), and (2) the fixed topbar + its nav/action
   pills (cream bar, dark pill text). Re-map both onto the theme tokens. Light
   theme is untouched (all rules data-theme-scoped). Append-only convention.
   ============================================================================ */

/* (1) Office-home "Accounting" card -> dark surface, red icon kept as accent. */
html[data-theme="dark"] .office-suite-home a.suite-card.office-tool-accounting,
html[data-theme="dark"] .office-suite-home .suite-card.office-tool-accounting,
html[data-theme="high-contrast"] .office-suite-home a.suite-card.office-tool-accounting,
html[data-theme="high-contrast"] .office-suite-home .suite-card.office-tool-accounting {
  background: var(--panel) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .office-suite-home .suite-card.office-tool-accounting .app-icon,
html[data-theme="dark"] .office-suite-home .suite-card.office-tool-accounting .office-icon,
html[data-theme="dark"] .office-suite-home .suite-card.office-tool-accounting .tool-icon,
html[data-theme="dark"] .office-suite-home .suite-card.office-tool-accounting .card-icon,
html[data-theme="dark"] .office-suite-home .suite-card.office-tool-accounting .icon-box,
html[data-theme="high-contrast"] .office-suite-home .suite-card.office-tool-accounting .app-icon,
html[data-theme="high-contrast"] .office-suite-home .suite-card.office-tool-accounting .office-icon,
html[data-theme="high-contrast"] .office-suite-home .suite-card.office-tool-accounting .tool-icon,
html[data-theme="high-contrast"] .office-suite-home .suite-card.office-tool-accounting .card-icon,
html[data-theme="high-contrast"] .office-suite-home .suite-card.office-tool-accounting .icon-box {
  background: color-mix(in srgb, #b30900 28%, transparent) !important;
  color: #ff9a8f !important;
  border-color: #b30900 !important;
}

/* (2) Fixed topbar — themed dark on every page EXCEPT the accounting dashboard,
   which is a deliberately light "calm" surface that ignores the theme. The
   `body:not(:has(.accounting-dashboard))` guard means these rules simply don't
   apply there, so the base light topbar shows through and that page stays
   internally consistent (no dark-bar-over-light-body seam). */
html[data-theme="dark"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar,
html[data-theme="high-contrast"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar {
  background: var(--panel) !important;
  border-bottom-color: var(--line) !important;
}

/* Brand wordmark (VTSA / OFFICE SUITE). */
html[data-theme="dark"] body:not(:has(.accounting-dashboard)) .vtsa-brand-wordmark strong,
html[data-theme="high-contrast"] body:not(:has(.accounting-dashboard)) .vtsa-brand-wordmark strong {
  color: var(--ink) !important;
}
html[data-theme="dark"] body:not(:has(.accounting-dashboard)) .vtsa-brand-wordmark small,
html[data-theme="high-contrast"] body:not(:has(.accounting-dashboard)) .vtsa-brand-wordmark small {
  color: var(--accent) !important;
}

/* Nav + action + theme-toggle pills: dark surface, light label; per-pill icon
   colours (set elsewhere) are intentionally left alone. The aria-current active
   pill keeps its per-page brand tint (deeper selector wins) — that's the
   intended emphasis. */
html[data-theme="dark"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn,
html[data-theme="dark"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn,
html[data-theme="dark"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .theme-toggle,
html[data-theme="high-contrast"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn,
html[data-theme="high-contrast"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn,
html[data-theme="high-contrast"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .theme-toggle {
  background: color-mix(in srgb, var(--ink) 8%, transparent) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn:hover,
html[data-theme="dark"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn:hover,
html[data-theme="dark"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .theme-toggle:hover,
html[data-theme="high-contrast"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn:hover,
html[data-theme="high-contrast"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn:hover,
html[data-theme="high-contrast"] body:not(:has(.accounting-dashboard)) .topbar.vtsa-fixed-topbar .theme-toggle:hover {
  background: color-mix(in srgb, var(--ink) 15%, transparent) !important;
  border-color: var(--accent) !important;
}
/* === Office home + topbar dark/matrix theming end === */


/* ============================================================================
   APP-WIDE DASHBOARDS + TOOL PAGES — Dark / Matrix theming
   ----------------------------------------------------------------------------
   The section dashboards (deals/drs/loo/po/pfi/ci/tinv), logistics/CS, KPIs,
   market-data, the documents dashboard, DocSign, PDF editor, DocScan, admin
   (DB / signatures), deal-calculations and the generated doc-control pages were
   authored light-first and never themed — leaving white card "islands" and
   dark-on-dark headings under the dark themes. This re-maps them onto the theme
   tokens. Accounting (`accounting-*` / `.accounting-dashboard`) is a deliberate
   light "calm" surface and is intentionally left alone. `:is(...)` lets one rule
   serve both Dark and Matrix. Append-only convention.
   ============================================================================ */

/* ---- Elevated card surfaces (panels, KPI/metric cards, heroes, tables) ---- */
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  [class*="-kpi-card"], .kpi-card, .logistics-kpi, .logistics-panel,
  [class*="-hero-card"], [class*="-hero"],
  .commodity-card, .market-strip-card, .metals-tape-panel,
  .docsign-card, .docsign-step, .pdf-upload-card,
  .recent-outputs, .scan-card, .sigman-card,
  .deal-calc-dashboard, .deal-calc-empty-state, .drs-variable-list,
  .deals-empty, .control-hero
):not([class*="accounting"]) {
  background: var(--doc-elev) !important;
  border-color: var(--line) !important;
  color: var(--ink);
  box-shadow: var(--shadow);
}

/* Generated doc-control summary tables and the section-dashboard records tables. */
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  .drs-table, .deals-table, .loo-table, .po-table, .pfi-table, .ci-table,
  .tinv-table, .records-table, .deal-calc-dashboard table
):not(.accounting-table):not(.compact-journal-table) {
  background: var(--doc-elev) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  .drs-table, .deals-table, .loo-table, .po-table, .pfi-table, .ci-table, .tinv-table,
  .records-table, .deal-calc-dashboard table) :is(th, thead td):not([class*="accounting"]) {
  background: var(--doc-inset) !important;
  color: var(--muted) !important;
  border-color: var(--line) !important;
}
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  .drs-table, .deals-table, .loo-table, .po-table, .pfi-table, .ci-table, .tinv-table,
  .records-table, .deal-calc-dashboard table) :is(td, tr):not([class*="accounting"]) {
  border-color: var(--line) !important;
}

/* Additional card families found on the section dashboards. */
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  [class*="-product-card"], [class*="-inventory-metric"], [class*="-inventory-list"],
  .logistics-table
):not([class*="accounting"]) {
  background: var(--doc-elev) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is([class*="-empty"]):not([class*="accounting"]) {
  background: var(--doc-inset) !important;
  border-color: var(--line) !important;
  color: var(--muted) !important;
}

/* Lighten the hardcoded-dark text that lives inside the now-dark dashboard
   surfaces (table cells, KPI/metric values, product-card lines). Without this
   the cells read dark-on-dark. `th` keeps its muted header treatment above. */
html:is([data-theme="dark"],[data-theme="high-contrast"]) main.shell:not(:has(.accounting-dashboard)) :is(
  [class*="-table"]:not(.accounting-table):not(.compact-journal-table),
  [class*="-product-card"], [class*="-inventory-metric"], [class*="-inventory-list"],
  [class*="-kpi-card"], [class*="kpi-module"], [class*="kpi-action"],
  .kpi-card, .logistics-kpi, .commodity-card, .market-strip-card, .folder-card,
  .deal-calc-dashboard, .sigman-card, .docsign-card
) :is(td, strong, b, span, small, p, dd, dt, a:not(.button):not(.primary), .value, h3, h4, h5):not([class*="status"]):not([class*="badge"]):not([class*="pill"]):not([class*="chip"]):not([class*="tag"]):not([class*="-attention"]) {
  color: var(--ink);
}

/* ---- Inset surfaces (filters, search panels, upload boxes, small tiles) ---- */
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  [class*="-filter-panel"], [class*="-search-panel"], .logistics-filters,
  .admin-option-form, .upload-box, .main-scan-box, .radio-tile,
  .market-icon-tile, .avg-box, .sigman-asset, .sigman-thumb, .market-btn
):not([class*="accounting"]) {
  background: var(--doc-inset) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}

/* ---- "Attention" banners: keep an accent tint but on a dark base. ---- */
html:is([data-theme="dark"],[data-theme="high-contrast"]) [class*="-attention"]:not([class*="accounting"]) {
  background: color-mix(in srgb, var(--accent) 14%, var(--panel)) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

/* ---- Page-title headings sitting on the dark page background (excl. accounting). ---- */
html:is([data-theme="dark"],[data-theme="high-contrast"]) main.shell:not(:has(.accounting-dashboard)) :is(h1, h2, h3) {
  color: var(--ink) !important;
}

/* ---- Documents dashboard folder cards + KPI value text inside cards. ---- */
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  .documents-search-panel ~ * article, .documents-grid article, .folder-card
):not([class*="accounting"]) {
  background: var(--doc-elev) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}

/* KPIs page uses its own module/action card classes. */
html:is([data-theme="dark"],[data-theme="high-contrast"]) main.shell:not(:has(.accounting-dashboard)) :is(
  .module-command-board, [class*="kpi-module"], [class*="kpi-action"],
  .control-tabs, .category-head, .overview-head, .control-board, .control-card,
  .kpi-aside, .control-aside
) {
  background: var(--doc-elev) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}

/* Market-data region rows, deal-calc metric cards/rows, pdf-editor upload card. */
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  .region-row, .deal-calc-dashboard article, .deal-calc-dashboard tr,
  .deal-calc-dashboard td, .pdf-upload-card, .upload-card, .docsign-document-step,
  .documents-folder-card, .documents-grid > a, .documents-grid > article
):not([class*="accounting"]) {
  background: var(--doc-inset) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}

/* Form controls that page-specific rules kept white (admin DB, DocSign, sig admin). */
html:is([data-theme="dark"],[data-theme="high-contrast"]) main.shell:not(:has(.accounting-dashboard)) :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
  textarea, select) {
  background: var(--doc-inset) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

/* Light secondary/utility buttons in tool + records areas -> dark chip
   (the per-section primary accent CTAs are intentionally left light). */
html:is([data-theme="dark"],[data-theme="high-contrast"]) main.shell:not(:has(.accounting-dashboard)) :is(
  a.button-secondary, button.button-secondary, .docs-btn.secondary,
  .logistics-btn.secondary, a.btn:not(.primary), .records-actions a:not(.primary)
) {
  background: var(--doc-chip) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

/* Remaining gradient/tinted card surfaces caught by the gradient-aware sweep:
   document folder cards, PO scan/inventory cards, the DocSign page wrapper,
   PFI summary cards. */
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  .docs-folder-card, [class*="folder-card"], [class*="-scan-card"],
  [class*="-inventory-card"], .docsign-page, .doc-summary-card
):not([class*="accounting"]) {
  background: var(--doc-elev) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}

/* PDF-editor "studio": its `.pdf-studio.pdf-studio-clean .X` rules are !important
   at (0,3,0), so match that depth or the white drop-zone (white-on-white text)
   survives. */
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  #uploadScreen, #workspace, section.pdf-upload-card, section.upload-card,
  .pdf-studio .pdf-clean-hero, .pdf-studio .pdf-final-result,
  .pdf-studio .recent-outputs, .pdf-studio .upload-card
) {
  background: var(--doc-elev) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}

/* Admin-DB inline variable-edit forms + lingering deal-calc metric cards. */
html:is([data-theme="dark"],[data-theme="high-contrast"]) main.shell:not(:has(.accounting-dashboard)) :is(
  .edit-variable-form, .drs-variable-list, .deal-calc-dashboard article,
  .deal-calculations article, .folder-card
) {
  background: var(--doc-inset) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}

/* ============================================================================
   GENERATED DOC-CONTROL PAGES (DRS / LOO / PFI) — fix the doc-tool light
   sub-surfaces my Signed-Docs pass didn't cover (regression: my lightened
   .doc-field text on a still-light field bg = invisible "FCA"/"EXW"). Darken
   the field/box backgrounds so the light text reads.
   ============================================================================ */
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  .doc-field.highlight, .doc-field.loo-emphasis, .doc-field.loo-term,
  .status-current, .doc-muted-box,
  .doc-tool-drs .doc-field, .doc-tool-loo .doc-field, .doc-tool-pfi .doc-field
) {
  background: var(--doc-inset) !important;
  border-color: var(--line) !important;
}
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(
  .doc-field.highlight strong, .doc-field.loo-emphasis strong, .doc-field.loo-term strong,
  .status-current strong, .doc-field strong) {
  color: var(--ink) !important;
}
html:is([data-theme="dark"],[data-theme="high-contrast"]) :is(.doc-field span, .status-current span, .doc-muted-box) {
  color: var(--muted) !important;
}

/* PFI control page forces a light purple body/panels via body.pfi-document-theme;
   neutralise it so the dark doc-page theme shows through. */
html:is([data-theme="dark"],[data-theme="high-contrast"]) body.pfi-document-theme {
  background: var(--bg) !important;
}
html:is([data-theme="dark"],[data-theme="high-contrast"]) body.pfi-document-theme .panel.doc-page {
  background: var(--panel) !important;
  border-color: var(--line) !important;
}
html:is([data-theme="dark"],[data-theme="high-contrast"]) body.pfi-document-theme :is(h1, h2, h3, .page-title, .section-title) {
  color: var(--ink) !important;
}
/* === App-wide dashboards + doc-control dark/matrix theming end === */


/* === Balance the main nav so an odd button count doesn't orphan one on its own row. === */
/* Keep the larger pills; just widen the centered wrap to fit 7 per row -> 7 + 6. */
@media (min-width: 1280px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
    max-width: 1086px !important;
    width: min(1086px, 100%) !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
    width: 146px !important; min-width: 146px !important; max-width: 146px !important;
    flex: 0 0 146px !important;
    font-size: 13px !important;
  }
}


/* === Action cluster: compact button column with the notification bell beside it (left). === */
/* Appended override — styles.css is append-only. */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    display: grid !important;
    grid-template-columns: auto auto !important;
    grid-auto-rows: min-content !important;
    align-items: center !important;
    align-content: center !important;
    justify-content: end !important;
    column-gap: 7px !important;
    row-gap: 4px !important;
    width: auto !important;
    align-self: center !important;
  }
  /* the five pills -> right column, extra compact */
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions > .theme-toggle,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions > a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions > .vtsa-logout-form {
    grid-column: 2 !important;
    margin: 0 !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
    width: 72px !important; min-width: 0 !important; max-width: none !important;
    height: 20px !important; min-height: 20px !important;
    padding: 0 6px !important; gap: 4px !important;
    font-size: 9.5px !important; letter-spacing: 0 !important;
    box-sizing: border-box !important; justify-content: center !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span {
    font-size: 10px !important; width: 11px !important; min-width: 11px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-logout-form { display: block !important; width: 72px !important; }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-logout-form .vtsa-action-btn { width: 100% !important; }

  /* notification bell -> left column, beside the stack, vertically centred, compact round button */
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif {
    grid-column: 1 !important;
    grid-row: 1 / span 5 !important;
    align-self: start !important;
    justify-self: end !important;
    display: flex !important;
    width: auto !important;
    margin: 0 !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-btn {
    width: 32px !important; height: 32px !important; min-height: 32px !important;
    padding: 0 !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    border: 1.5px solid rgba(17, 24, 39, 0.85) !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #ffffff, #fff3e6) !important;
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.12) !important;
    cursor: pointer !important; position: relative !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-btn svg {
    width: 17px !important; height: 17px !important; color: #1e3a5f !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-badge {
    min-width: 15px !important; height: 15px !important; padding: 0 3px !important;
    background: #e5341a !important; color: #fff !important;
    font-size: 9px !important; font-weight: 800 !important; line-height: 1 !important;
    border-radius: 999px !important; align-items: center !important; justify-content: center !important;
  }
}

/* ============================================================
   Account monitoring & admin tooling (appended block).
   Used by activity_admin.html, accounts_admin.html (enrichments),
   and account_profile.html. Self-contained; colours adapt via
   currentColor so they ride the active theme.
   ============================================================ */
.account-create-form h2 { margin: 14px 0 4px; font-size: 0.95rem; }

/* Activity monitor — filter bar */
.activity-filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  margin: 14px 0 18px;
}
.activity-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; }
.activity-filters label > span { font-weight: 600; opacity: 0.75; }
.activity-filters select,
.activity-filters input { padding: 7px 9px; border-radius: 8px; }
.activity-filters .activity-search-field { flex: 1 1 180px; }
.activity-filters .activity-search-field input { width: 100%; }

/* Activity monitor — table grid (when / who / action / detail / ip) */
.activity-table .activity-row {
  display: grid;
  grid-template-columns: 84px 200px 180px 1fr 120px;
  gap: 10px; align-items: start;
}
.activity-table .activity-row.head {
  font-weight: 700; opacity: 0.7; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.activity-table .activity-row > div { min-width: 0; overflow-wrap: anywhere; }
.activity-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  border: 1px solid currentColor; opacity: 0.9; white-space: nowrap;
}
.activity-count { margin-top: 10px; font-size: 0.8rem; }

@media (max-width: 820px) {
  .activity-table .activity-row { grid-template-columns: 1fr; gap: 2px; padding-bottom: 8px; }
  .activity-table .activity-row.head { display: none; }
}

/* Accounts list — badges, online chip, search, stacked sub-lines */
.account-search-wrap { display: block; margin: 4px 0 12px; }
.account-search { width: 100%; max-width: 360px; padding: 8px 10px; border-radius: 8px; }
.account-edit-form > div small { display: block; margin-top: 2px; }
.badge {
  display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; border: 1px solid currentColor;
}
.badge-pending { color: #b26a00; }
.session-chip { display: inline-block; margin-left: 6px; font-size: 0.7rem; font-weight: 700; color: #1f9d55; }
.account-meta { margin-top: 14px; }

/* --- Account monitoring polish: metrics strip, tag colours, session list --- */
.activity-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 16px; }
.activity-stats .stat {
  flex: 1 1 120px; min-width: 110px; display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border: 1px solid rgba(128,128,128,0.25); border-radius: 12px;
  background: rgba(128,128,128,0.06);
}
.activity-stats .stat-num { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.activity-stats .stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; }
.activity-stats .stat-warn { border-color: rgba(210,59,26,0.45); background: rgba(210,59,26,0.08); }
.activity-stats .stat-warn .stat-num { color: #d23b1a; }

/* Activity tag colours by area (border rides currentColor, so this tints both). */
.activity-tag { opacity: 1; }
.activity-tag.tag-login { color: #2563eb; }
.activity-tag.tag-auth { color: #2563eb; }
.activity-tag.tag-password { color: #d23b1a; }
.activity-tag.tag-account { color: #b26a00; }
.activity-tag.tag-access_request { color: #b26a00; }
.activity-tag.tag-admin { color: #7c3aed; }
.activity-tag.tag-documents { color: #1f9d55; }
.activity-tag.tag-logistics { color: #0e8a8a; }
.activity-tag.tag-accounting { color: #c026a8; }
.activity-tag.tag-planner { color: #2563eb; }
.activity-tag.tag-buyer { color: #0e8a8a; }

.session-list { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.session-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 12px; border: 1px solid rgba(128,128,128,0.25); border-radius: 10px;
}
.session-item small { width: 100%; }
.badge-current { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; border: 1px solid currentColor; color: #1f9d55; }

/* === Office-home card description copy — a touch larger for readability (was 12px). === */
/* Appended override — styles.css is append-only. */
.office-suite-home .app-card-copy small {
  font-size: 14px !important;
  line-height: 1.35 !important;
}

/* === Mobile action cluster: wrap the buttons into neat rows instead of one squished no-wrap row. === */
/* Appended override — styles.css is append-only. (Desktop layout is handled by the >=901px block.) */
@media (max-width: 900px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 540px !important;
    margin: 0 auto !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .theme-toggle,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 12px !important;
    font-size: 11.5px !important;
    flex: 0 0 auto !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif { width: auto !important; display: flex !important; }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-btn {
    width: 30px !important; height: 30px !important; min-height: 30px !important;
  }
}

/* === Office-home cards: line icons up + cap description to header + 2 lines. === */
/* Appended override — styles.css is append-only. Content was vertically centred, so a 3-line
   description nudged its icon higher than the 2-line cards. Top-align + clamp fixes both. */
.office-suite-home a.app-card.suite-card {
  justify-content: flex-start !important;
}
.office-suite-home .app-card-copy small {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* DocSign external signing pages (/sign/...): neutral brand header with a
   signing tagline, instead of the login-screen chrome. Append-only. The brand
   is a non-clickable <span> (no /login link) so external signers aren't sent
   to a login page they cannot use. */
.vtsa-sign-topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.vtsa-sign-brand {
  cursor: default;
  text-decoration: none;
}
.vtsa-sign-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #166534;
}

/* === Action cluster: stack the notification bell + messenger button together in the left column. === */
/* Appended override — the messenger button (.vtsa-msg-btn) was added later and wasn't placed in the grid. */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start !important;
    justify-self: end !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: start !important;
    justify-self: end !important;
    width: 32px !important;
    height: 32px !important;
    min-height: 0 !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn svg {
    width: 16px !important;
    height: 16px !important;
  }
}
/* Mobile: let both icons sit inline with the wrapped buttons (no grid). */
@media (max-width: 900px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 auto !important;
  }
}

/* === Make the notification + messenger icons more obvious (bigger, tinted, coloured). === */
/* Appended override — styles.css is append-only. */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-btn {
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    border: 2px solid #1e3a5f !important;
    background: #ffe7d6 !important;
    box-shadow: 0 3px 8px rgba(30, 58, 95, 0.22) !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-btn svg {
    width: 21px !important;
    height: 21px !important;
    color: #1e3a5f !important;
    stroke: #1e3a5f !important;
    stroke-width: 2 !important;
    fill: none !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn {
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    border: 2px solid #1f6feb !important;
    background: #e1efff !important;
    box-shadow: 0 3px 8px rgba(31, 111, 235, 0.22) !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn svg {
    width: 21px !important;
    height: 21px !important;
    color: #1f6feb !important;
    stroke: #1f6feb !important;
    stroke-width: 2.2 !important;
    fill: none !important;
  }
}
/* Mobile: same brighter treatment at a slightly smaller size. */
@media (max-width: 900px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-btn {
    border: 2px solid #1e3a5f !important; background: #ffe7d6 !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-btn svg { color:#1e3a5f !important; stroke:#1e3a5f !important; fill:none !important; }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn {
    border: 2px solid #1f6feb !important; background: #e1efff !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn svg { color:#1f6feb !important; stroke:#1f6feb !important; fill:none !important; }
}

/* === Notification + messenger icons: SOLID filled, larger, white glyphs — maximum visibility (no green). === */
/* Appended override — styles.css is append-only. */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-btn {
    width: 40px !important; height: 40px !important; min-height: 40px !important;
    border: none !important;
    background: #1e3a5f !important;            /* solid orange */
    box-shadow: 0 4px 11px rgba(30, 58, 95, 0.40) !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-btn svg {
    width: 22px !important; height: 22px !important;
    color: #fff !important; stroke: #fff !important; stroke-width: 2 !important; fill: none !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn {
    width: 40px !important; height: 40px !important; min-height: 40px !important;
    border: none !important;
    background: #2563eb !important;            /* solid blue (clearly not green) */
    box-shadow: 0 4px 11px rgba(37, 99, 235, 0.40) !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn svg {
    width: 22px !important; height: 22px !important;
    color: #fff !important; stroke: #fff !important; stroke-width: 2.2 !important; fill: none !important;
  }
}
@media (max-width: 900px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-btn {
    border: none !important; background: #1e3a5f !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif .vtsa-notif-btn svg { color:#fff !important; stroke:#fff !important; fill:none !important; }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn {
    border: none !important; background: #2563eb !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn svg { color:#fff !important; stroke:#fff !important; fill:none !important; }
}

/* ============================================================
   Continuation-Sheet (CS) pages = yellow + BLUE accent.
   The logistics pages keep their original red + yellow scheme; only CS
   pages get a blue accent. The CS upload/review pages theme themselves
   via their own --cs-accent. CS pages that reuse .logistics-page (the CS
   records dashboard) carry a .cs-blue marker, which swaps just the brand
   accent token to a steel blue here. Semantic reds stay red.
   ============================================================ */
.logistics-page.cs-blue {
  --logistics-deep-red: #245e9e;
  --logistics-red-dark: #1a4a78;
}
.logistics-page.cs-blue .logistics-btn.primary { border-color: #1a4a78; }
.logistics-page.cs-blue .logistics-btn.secondary { border-color: #9db8d4; }
.logistics-page.cs-blue .logistics-btn.secondary:nth-of-type(1) { border-color: #245e9e; }
.logistics-page.cs-blue .logistics-btn.secondary:nth-of-type(2) { border-color: #346aa6; }
.logistics-page.cs-blue .logistics-btn.secondary:nth-of-type(3) { border-color: #4880b8; }

/* === Shipment Timeline panel — FINAL compact sizing (append-only, must stay last) ===
   Supersedes the earlier compact block: map fixed at 280px, list scrolls
   internally, layout has no min-height floor so the panel stays compact. The
   heading rule is SCOPED to the timeline panel so it doesn't shrink the
   Deal-Info panel heading (which also carries .logistics-timeline-heading). */
.logistics-shipment-timeline-layout { align-items: start !important; gap: 10px !important; min-height: 0 !important; }
.logistics-shipment-timeline-list { max-height: 300px !important; overflow-y: auto !important; gap: 6px !important; padding-right: 4px !important; }
.logistics-shipment-timeline-entry { padding: 7px 10px 7px 12px !important; }
.logistics-shipment-timeline-panel .logistics-timeline-heading { margin-bottom: 8px !important; }
.logistics-route-map { min-height: 0 !important; height: 280px !important; max-height: 280px !important; align-self: start !important; }
@media (max-width: 1000px) {
  .logistics-shipment-timeline-list { max-height: 300px !important; }
  .logistics-route-map { height: 240px !important; min-height: 0 !important; max-height: 240px !important; }
}
/* === FINAL compact sizing end === */

/* === Topbar account menu — collapses the admin/account/logout pills into one
   tidy dropdown so the topbar stops looking cluttered. Appended, no overrides. === */
.vtsa-acct { position: relative; display: inline-block; }
.vtsa-acct > summary { list-style: none; cursor: pointer; }
.vtsa-acct > summary::-webkit-details-marker { display: none; }
.vtsa-acct-summary { display: inline-flex !important; align-items: center; gap: 6px; }
.vtsa-acct-caret { font-size: 10px; opacity: .7; transition: transform .15s ease; }
.vtsa-acct[open] .vtsa-acct-caret { transform: rotate(180deg); }
/* The fixed topbar clips overflow; let the account dropdown escape it. */
header.topbar.vtsa-fixed-topbar { overflow: visible !important; }
.vtsa-acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: #ffffff; border: 1px solid #e6e8ee; border-radius: 14px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18); padding: 6px; z-index: 4000;
  display: flex; flex-direction: column; gap: 2px;
}
.vtsa-acct-menu a,
.vtsa-acct-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box;
  padding: 9px 12px; border-radius: 10px; border: 0; background: transparent;
  font: inherit; font-size: 13.5px; font-weight: 700; color: #1f2937;
  text-decoration: none; cursor: pointer; text-align: left; white-space: nowrap;
}
.vtsa-acct-menu a:hover,
.vtsa-acct-menu button:hover { background: #f1f5f9; }
.vtsa-acct-menu a[aria-current="page"] { background: #eff4ff; color: #1f6feb; }
.vtsa-acct-menu a span[aria-hidden="true"],
.vtsa-acct-menu button span[aria-hidden="true"] { width: 16px; text-align: center; opacity: .8; }
.vtsa-acct-menu form { margin: 0; }
/* Dark / Matrix themes: keep the dropdown legible. */
body.theme-dark .vtsa-acct-menu, body.theme-matrix .vtsa-acct-menu { background: #0f172a; border-color: #1e293b; }
body.theme-dark .vtsa-acct-menu a, body.theme-dark .vtsa-acct-menu button,
body.theme-matrix .vtsa-acct-menu a, body.theme-matrix .vtsa-acct-menu button { color: #e5e7eb; }
body.theme-dark .vtsa-acct-menu a:hover, body.theme-dark .vtsa-acct-menu button:hover,
body.theme-matrix .vtsa-acct-menu a:hover, body.theme-matrix .vtsa-acct-menu button:hover { background: #1e293b; }
/* === Topbar account menu end === */

/* === Smaller side-menu pills (Light/Admin/Activity/DB/KYC/Signs/Account/Logout). === */
/* Appended override — styles.css is append-only. */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
    width: 64px !important;
    height: 18px !important;
    min-height: 18px !important;
    padding: 0 5px !important;
    gap: 3px !important;
    font-size: 8.5px !important;
    letter-spacing: 0 !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span {
    font-size: 9px !important; width: 9px !important; min-width: 9px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-logout-form { width: 64px !important; }
}

/* === Match the messenger icon to the bell (circle) + stop the pill icon crowding the label. === */
/* Appended override — styles.css is append-only. */
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn {
  border-radius: 999px !important;
}
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
    gap: 4px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span {
    width: 12px !important;
    min-width: 12px !important;
    font-size: 8px !important;
  }
}

/* === Side-menu pill icons: size the icon box to its glyph so it can't overlap the label (fixes "Account"). === */
/* Appended override — styles.css is append-only. */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    font-size: 9px !important;
    flex: 0 0 auto !important;
  }
}

/* === Side-menu pills go text-only: tiny emoji icons overlap longer labels (Account/Activity) at this size. === */
/* Appended override — styles.css is append-only. Bell (.vtsa-notif-btn) + messenger (.vtsa-msg-btn) keep their icons. */
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span {
  display: none !important;
}
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn {
  gap: 0 !important;
}

/* === Account menu inline SVG icons (replaced emoji that overlapped labels). === */
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-acct-summary > span:first-child svg,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-acct-menu a svg,
body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-acct-menu button svg {
  width: 16px !important;
  height: 16px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  flex: 0 0 auto !important;
  vertical-align: -3px !important;
}

/* === Flat readable side-menu pills with outline SVG icons (replaces the dropdown). === */
/* Appended override — wins over earlier tiny/text-only pill rules. */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
    width: 124px !important;
    height: 27px !important;
    min-height: 27px !important;
    padding: 0 12px !important;
    gap: 8px !important;
    font-size: 12.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    justify-content: flex-start !important;
    text-transform: none !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span svg,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span svg,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span svg {
    width: 16px !important;
    height: 16px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-logout-form { width: 124px !important; display: block !important; }
}

/* === Smaller flat side-menu pills + text. === */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
    width: 102px !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 9px !important;
    gap: 6px !important;
    font-size: 10.5px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span {
    width: 14px !important; min-width: 14px !important; max-width: 14px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span svg,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span svg,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span svg {
    width: 14px !important; height: 14px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-logout-form { width: 102px !important; }
}

/* === Side-menu pills: smaller again (buttons + text). === */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
    width: 88px !important;
    height: 18px !important;
    min-height: 18px !important;
    padding: 0 8px !important;
    gap: 5px !important;
    font-size: 9.5px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span {
    width: 12px !important; min-width: 12px !important; max-width: 12px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span svg,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span svg,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span svg {
    width: 12px !important; height: 12px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-logout-form { width: 88px !important; }
}

/* === Side menu: even spacing + smaller; bell/messenger as a left rail (out of the pill column). === */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 0 0 0 48px !important;
    width: auto !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif {
    position: absolute !important; left: 0 !important; top: 0 !important; margin: 0 !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn {
    position: absolute !important; left: 4px !important; top: 43px !important; margin: 0 !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
    width: 84px !important; height: 17px !important; min-height: 17px !important;
    padding: 0 8px !important; gap: 5px !important; font-size: 9px !important; margin: 0 !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span {
    width: 11px !important; min-width: 11px !important; max-width: 11px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span svg,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn span svg,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle span svg {
    width: 11px !important; height: 11px !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-logout-form { width: 84px !important; margin: 0 !important; }
}

/* === Side menu: slightly tighter vertical gap between pills. === */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions { gap: 3px !important; }
}

/* === Side menu 2-col: pills in two columns (column-major, via CSS multicol) + bell/messenger
      as a side-by-side row BELOW the pills, bottom-right. (User "I WANT THIS" 2026-07-01) === */
@media (min-width: 901px) {
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
    position: relative !important;
    display: block !important;
    column-count: 2 !important;
    column-gap: 6px !important;
    column-fill: balance !important;
    width: 174px !important;
    padding: 0 0 46px 0 !important;
  }
  /* every pill is an unbreakable, full-line block that flows into the two columns */
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions > a.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions > button.vtsa-action-btn,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions > button.theme-toggle,
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions > .vtsa-logout-form {
    display: flex !important;
    width: 84px !important;
    break-inside: avoid !important;
    -webkit-column-break-inside: avoid !important;
    margin: 0 0 3px 0 !important;
  }
  /* bell (orange) + messenger (blue): out of the column flow, side by side at the bottom-right */
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-notif {
    position: absolute !important;
    left: auto !important; right: 52px !important;
    top: auto !important; bottom: 0 !important;
    margin: 0 !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-msg-btn {
    position: absolute !important;
    left: auto !important; right: 4px !important;
    top: auto !important; bottom: 0 !important;
    margin: 0 !important;
  }
}

/* === Topbar: remove the bottom divider line + cut the white space below it
      ("NO RED LINE, cut white space below" — user 2026-07-01). === */
body .topbar.vtsa-fixed-topbar {
  border-bottom: 0 !important;
  box-shadow: none !important;
}
body .shell,
body main.shell {
  margin-top: 8px !important;
}

/* === World clock (TELEX-5): a manifest-record strip — LON/JNB/LIS/ZRH/SHA —
      docked under the VTSA wordmark. Desktop only (3-col "brand nav actions"
      layout is active above 1180px; below that brand stacks full-width and
      the strip is hidden rather than fighting the mobile reflow).
      User: "make it AWESOME AND UNIQUE for VTSA... AND DISCREET" 2026-07-02.
      Shrunk + rows with identical current time merge into one line
      (e.g. "LON, LIS 10:58") 2026-07-02 — user: "smaller ... same time". === */
body .topbar.vtsa-fixed-topbar .vtsa-brand-stack {
  grid-area: brand !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  min-width: 0 !important;
  max-width: 270px !important;
}
body .topbar.vtsa-fixed-topbar .vtsa-wc-root {
  display: none !important;
}

/* Bigger logo (user 2026-07-02: "bigger logo"). */
body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand .vtsa-brand-logo {
  width: 68px !important;
  height: 70px !important;
}

@media (min-width: 1181px) {
  body .topbar.vtsa-fixed-topbar .vtsa-wc-root {
    display: block !important;
    position: relative !important;
    width: 190px !important;
    max-width: 190px !important;
    height: auto !important;
    max-height: 74px !important;
    margin: 5px 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    user-select: none;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-wc-head {
    display: flex !important;
    align-items: baseline !important;
    gap: 5px !important;
    padding: 0 1px 1px !important;
    margin: 0 0 1px !important;
    border-bottom: 1px solid var(--line);
  }
  body .topbar.vtsa-fixed-topbar .vtsa-wc-head-label,
  body .topbar.vtsa-fixed-topbar .vtsa-wc-head-utc {
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    white-space: nowrap;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-wc-head-rule {
    flex: 1 1 auto !important;
    height: 1px !important;
    background-image: repeating-linear-gradient(to right, var(--line) 0, var(--line) 2px, transparent 2px, transparent 5px);
    opacity: 0.9;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-wc-body {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-wc-row {
    display: grid !important;
    grid-template-columns: 7px 1fr 32px 5px 20px !important;
    align-items: center !important;
    column-gap: 3px !important;
    padding: 0.5px 1px !important;
    line-height: 1.15 !important;
    border-bottom: 1px dotted var(--line);
  }
  body .topbar.vtsa-fixed-topbar .vtsa-wc-row:last-child {
    border-bottom: 0 !important;
  }

  /* daylight signal #1: leading station dot — dim/muted asleep, lit awake */
  body .topbar.vtsa-fixed-topbar .vtsa-wc-dot {
    display: inline-block !important;
    width: 4px !important;
    height: 4px !important;
    border-radius: 50% !important;
    align-self: center !important;
    justify-self: center !important;
    background: var(--muted);
    opacity: 0.5;
    box-shadow: none;
    transition: background 400ms ease, box-shadow 400ms ease, opacity 400ms ease;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-wc-row[data-day="1"] .vtsa-wc-dot {
    background: var(--accent);
    opacity: 1;
    box-shadow: 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
  }

  /* combined station codes for the row, e.g. "LON, LIS" when times coincide */
  body .topbar.vtsa-fixed-topbar .vtsa-wc-code {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-wc-row[data-day="1"] .vtsa-wc-code {
    color: var(--ink);
  }

  body .topbar.vtsa-fixed-topbar .vtsa-wc-time {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--muted);
    opacity: 0.55;
    text-align: right;
    white-space: nowrap;
    transition: color 400ms ease, opacity 400ms ease;
    font-variant-numeric: tabular-nums;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-wc-row[data-day="1"] .vtsa-wc-time {
    color: var(--ink);
    opacity: 1;
  }

  body .topbar.vtsa-fixed-topbar .vtsa-wc-offset {
    font-size: 7.5px;
    font-weight: 500;
    color: var(--muted);
    opacity: 0.55;
    text-align: right;
    white-space: nowrap;
  }

  /* daylight signal #2: a trailing tick marks "in office hours" (08:00-18:59
     local) — its own grid cell so it can never wrap the time onto 2 lines */
  body .topbar.vtsa-fixed-topbar .vtsa-wc-officetick {
    display: inline-block;
    width: 2.5px;
    height: 2.5px;
    border-radius: 50%;
    background: transparent;
    align-self: center;
    justify-self: start;
  }
  body .topbar.vtsa-fixed-topbar .vtsa-wc-row[data-office="1"] .vtsa-wc-officetick {
    background: var(--accent);
    box-shadow: 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent);
  }
}

/* =========================================================================
   Roles feature (2026-07): logistics "total sums" strip + transport portal.
   Appended (styles.css is treated append-only). Uses theme tokens.
   ========================================================================= */

.logistics-kpi.ok strong { color: #15803d; }

.logistics-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 4px 0 22px;
}
.logistics-total {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
}
.logistics-total span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
}
.logistics-total strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.logistics-total strong em { font-style: normal; font-size: 15px; color: var(--muted); font-weight: 600; }
.logistics-total small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.logistics-total.wide { grid-column: span 2; }
@media (max-width: 720px) { .logistics-total.wide { grid-column: auto; } }

.logistics-status-pill.muted { background: var(--bg); color: var(--muted); }

/* ---- Transport company tracking portal ---- */
.transport-overview-map {
  height: 460px;
  border-radius: 14px;
  overflow: hidden;
}
.transport-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.transport-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform .12s ease, border-color .12s ease;
}
.transport-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.transport-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.transport-card-top strong { font-size: 18px; }
.transport-card-route { font-size: 15px; color: var(--muted); font-weight: 600; }
.transport-card-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.transport-card-meta div { display: flex; flex-direction: column; gap: 2px; }
.transport-card-meta dt { font-size: 13px; color: var(--muted); }
.transport-card-meta dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.transport-card-cta { margin-top: auto; font-size: 14px; font-weight: 700; color: var(--accent); }

/* ============ MOIX Swiss menu (2026-07-04) ============
   Uniform navy nav: replaces the per-section rainbow icon colors and the
   red accounting menu highlight. Appended last so equal-specificity
   !important rules here win the cascade. */
.vtsa-fixed-main-nav .is-inv { --menu-icon: #2e7d5b; }   /* pine green */
.vtsa-fixed-main-nav .is-pfi { --menu-icon: #6d5aa8; }   /* muted violet */
.vtsa-fixed-main-nav .is-ci { --menu-icon: #2d6a9f; }    /* steel blue */
.vtsa-fixed-main-nav .is-tinv { --menu-icon: #a87b1f; }  /* old gold */
.vtsa-fixed-main-nav .is-cs { --menu-icon: #0f766e; }    /* teal */
.vtsa-fixed-main-nav .is-ship { --menu-icon: #9c4a2f; }  /* burnt sienna */
.vtsa-fixed-main-nav .is-acc { --menu-icon: #96303c; }   /* bordeaux */
.vtsa-fixed-main-nav .is-docs { --menu-icon: #b3831c; }  /* amber */
.vtsa-fixed-main-nav .is-mail { --menu-icon: #35699f; }  /* lake blue */
.vtsa-fixed-main-nav .is-planner { --menu-icon: #3f7d4e; } /* leaf green */
.vtsa-fixed-main-nav .is-tools { --menu-icon: #5c6674; } /* slate gray */

.vtsa-fixed-actions .theme-toggle,
.vtsa-fixed-actions .vtsa-action-btn {
  color: #17202a !important;
}
.vtsa-fixed-actions .vtsa-action-btn span {
  color: #1e3a5f !important;
}

body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc {
  background: linear-gradient(180deg, #f3f6fa 0%, #e8eef5 100%) !important;
  border-color: #1e3a5f !important;
  color: #17202a !important;
  box-shadow: 0 8px 18px rgba(30, 58, 95, 0.16) !important;
}
body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc span,
body.vtsa-page-accounting .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn.is-acc svg {
  color: #1e3a5f !important;
  stroke: #1e3a5f !important;
}

/* MOIX Swiss home cards (2026-07-04): fine dark-blue borders */
.app-card.suite-card {
  border: 1px solid #24426e !important;
}

/* ============ MOIX Swiss buttons (2026-07-04) ============
   Flat Swiss button system for the topbar: near-rectangular, hairline navy
   borders, no drop shadows, tracked uppercase, navy fill on the active page. */
.vtsa-fixed-main-nav .vtsa-menu-btn,
.vtsa-fixed-actions .vtsa-action-btn,
.vtsa-fixed-actions .theme-toggle {
  border: 1px solid #24426e !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font-weight: 650 !important;
  letter-spacing: 0.07em !important;
}

.vtsa-fixed-main-nav .vtsa-menu-btn:hover,
.vtsa-fixed-actions .vtsa-action-btn:hover,
.vtsa-fixed-actions .theme-toggle:hover {
  transform: none !important;
  background: #f3f6fa !important;
  border-color: #1e3a5f !important;
  box-shadow: none !important;
}

.vtsa-fixed-main-nav .vtsa-menu-btn[aria-current="page"] {
  background: #1e3a5f !important;
  border-color: #1e3a5f !important;
  color: #ffffff !important;
}
.vtsa-fixed-main-nav .vtsa-menu-btn[aria-current="page"] span {
  color: #ffffff !important;
}

.vtsa-fixed-actions .vtsa-action-btn[aria-current="page"] {
  background: #1e3a5f !important;
  border-color: #1e3a5f !important;
  color: #ffffff !important;
}
.vtsa-fixed-actions .vtsa-action-btn[aria-current="page"] span {
  color: #ffffff !important;
}

/* ============ MOIX Swiss topbar band (2026-07-04, rev3) ============
   The ENTIRE menu bar strip is light gray (one step darker than the page);
   buttons sit directly on it — no separate tray box. */
.topbar {
  background: rgba(232, 236, 241, 0.94);
  border-bottom: 1px solid #cfd6dd;
}
.vtsa-fixed-topbar {
  background: #e8ecf1 !important;
  border-bottom: 1px solid #cfd6dd !important;
  box-shadow: none !important;
}
.vtsa-fixed-main-nav {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* ============ MOIX ticker tape (2026-07-04) ============
   Full-width bottom row of the topbar grid; hairline above, quiet frame. */
.moix-ticker-tape {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid #d7dde3;
  min-height: 46px;
  overflow: hidden;
}

/* ============ MOIX Swiss FINAL (2026-07-04) ============
   html-prefixed selectors so these beat the high-specificity register rules
   (body .topbar.vtsa-fixed-topbar ...) that were overriding earlier blocks. */

/* -- gray menu bar, full strip -- */
html body .topbar.vtsa-fixed-topbar {
  background: #e0e5eb !important;
  border-bottom: 1px solid #c6cdd6 !important;
  box-shadow: none !important;
}

/* -- nav container: no pill capsule, transparent on the gray band -- */
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* -- menu buttons: flat Swiss rectangles -- */
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
  border: 1px solid #24426e !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  color: #17202a !important;
  box-shadow: none !important;
  font-weight: 650 !important;
  letter-spacing: 0.07em !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn:hover {
  transform: none !important;
  background: #f3f6fa !important;
  border-color: #1e3a5f !important;
  box-shadow: none !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span {
  color: var(--menu-icon, #1e3a5f) !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn[aria-current="page"] {
  background: #1e3a5f !important;
  border-color: #1e3a5f !important;
  color: #ffffff !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn[aria-current="page"] span {
  color: #ffffff !important;
}

/* -- right-side action buttons + theme toggle: same flat system -- */
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
  border: 1px solid #24426e !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  color: #17202a !important;
  box-shadow: none !important;
  font-weight: 650 !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn:hover,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle:hover {
  transform: none !important;
  background: #f3f6fa !important;
  border-color: #1e3a5f !important;
  box-shadow: none !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn span {
  color: #1e3a5f !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn[aria-current="page"] {
  background: #1e3a5f !important;
  border-color: #1e3a5f !important;
  color: #ffffff !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn[aria-current="page"] span {
  color: #ffffff !important;
}

/* -- ticker row sits on the gray band, hairline above -- */
html body .topbar.vtsa-fixed-topbar .moix-ticker-tape {
  border-top: 1px solid #c6cdd6 !important;
}

/* ============ MOIX compact menu (2026-07-04, rev2) ============
   Tight 6-across grid, small buttons, slimmer topbar. */
html body .topbar.vtsa-fixed-topbar {
  min-height: 0 !important;
  padding: 10px 22px 6px !important;
  gap: 12px !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav {
  width: min(760px, 100%) !important;
  max-width: 760px !important;
  justify-self: center !important;
  grid-template-columns: repeat(6, minmax(84px, 1fr)) !important;
  gap: 6px 8px !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
  min-height: 29px !important;
  padding: 0 9px !important;
  gap: 6px !important;
  font-size: 11px !important;
  letter-spacing: 0.05em !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span {
  font-size: 15px !important;
  width: 15px !important;
  min-width: 15px !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle {
  min-height: 28px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand {
  min-height: 0 !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-brand .vtsa-brand-logo {
  width: 46px !important;
}
html body .topbar.vtsa-fixed-topbar .moix-ticker-tape {
  margin-top: 2px !important;
  padding-top: 2px !important;
}

/* ============ MOIX compact actions (2026-07-04) ============ */
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions {
  gap: 4px !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn {
  min-height: 15px !important;
  height: 15px !important;
  padding: 0 5px !important;
  gap: 4px !important;
  font-size: 7.5px !important;
  font-weight: 600 !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn span,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span {
  font-size: 9px !important;
  width: 9px !important;
  min-width: 9px !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn svg,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn svg {
  width: 9px !important;
  height: 9px !important;
}


/* ============ MOIX Swiss business icons + buttons (2026-07-04) ============
   Monochrome navy discipline: porcelain icon tiles, hairline borders,
   corporate 4-10px radii, no pastels, no lift-on-hover. */

/* -- home app cards: hairline navy, calm hover -- */
html body .office-suite-home .app-card,
html body .office-suite-home a.suite-card,
html body .office-suite-home .suite-card.office-tool-accounting,
html body .office-suite-home a.suite-card.office-tool-accounting {
  border: 1px solid #24426e !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}
html body .office-suite-home .app-card:hover,
html body .office-suite-home a.suite-card:hover {
  transform: none !important;
  box-shadow: none !important;
  background: #f4f7fb !important;
  border-color: #12294a !important;
}
html body .office-suite-home .app-card strong {
  color: #12294a !important;
  letter-spacing: 0.02em !important;
}

/* -- icon tiles: every tone becomes porcelain + navy stroke -- */
html body .app-icon,
html body .app-icon.lavender,
html body .app-icon.blue,
html body .app-icon.peach,
html body .app-icon.green,
html body .app-icon.indigo,
html body .app-icon.violet {
  background: #eef2f7 !important;
  color: #1e3a5f !important;
  border-radius: 8px !important;
  width: 54px !important;
  height: 54px !important;
}
html body .app-icon svg {
  width: 26px !important;
  height: 26px !important;
  stroke-width: 1.6 !important;
}

/* neutralize the thick currentColor borders + white insets on card icons */
html body .office-suite-home a.suite-card .app-icon,
html body .office-suite-home a.suite-card .office-icon,
html body .office-suite-home a.suite-card .tool-icon,
html body .office-suite-home a.suite-card .card-icon,
html body .office-suite-home a.suite-card .icon-box,
html body .office-suite-home .suite-card.office-tool-accounting .app-icon,
html body .office-suite-home .suite-card.office-tool-accounting .office-icon,
html body .office-suite-home .suite-card.office-tool-accounting .tool-icon,
html body .office-suite-home .suite-card.office-tool-accounting .card-icon,
html body .office-suite-home .suite-card.office-tool-accounting .icon-box {
  border: 1px solid #24426e !important;
  box-shadow: none !important;
  background: #eef2f7 !important;
  color: #1e3a5f !important;
}

/* -- topbar: monochrome navy icons, sharper corners -- */
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn {
  border-radius: 4px !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn span {
  color: #1e3a5f !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-main-nav a.vtsa-menu-btn[aria-current="page"] span {
  color: #ffffff !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.theme-toggle,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions button.vtsa-action-btn {
  border-radius: 4px !important;
}
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions .vtsa-action-btn span,
html body .topbar.vtsa-fixed-topbar .vtsa-fixed-actions a.vtsa-action-btn span {
  color: #1e3a5f !important;
}

/* ============ MOIX Swiss components (2026-07-04) ============
   The home-card language (white, fine navy hairline, soft corners, flat)
   applied to the generic component families used across dashboard pages.
   Page-specific higher-specificity styling still wins where it exists. */
.panel,
.tool-card,
.tool-panel,
.pdf-result-card {
  border: 1px solid #24426e;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.button,
.tool-button {
  border: 1px solid #24426e;
  border-radius: 8px;
  font-weight: 650;
  box-shadow: none;
}

.button:hover,
.tool-button:hover {
  background: #f3f6fa;
  border-color: #1e3a5f;
}

.primary,
.button.primary {
  border-color: #1e3a5f;
  background: #1e3a5f;
  color: #ffffff;
}

.tool-button.active {
  border-color: #1e3a5f;
  background: #eef2f7;
}
