* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  background: #F7FAF8;
  color: #111827;
  font-family: 'Inter', Arial, sans-serif;
}
a { color: #0F7A36; text-decoration: none; font-weight: 700; }
.topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 64px;
  padding: 14px clamp(16px, 4vw, 42px);
  position: sticky;
  top: 0;
  z-index: 2;
}
.brand { color: #111827; font-size: 20px; font-weight: 800; letter-spacing: 0; }
.brand span { color: #16A34A; }
.section-pill {
  background: #DCFCE7;
  border-radius: 999px;
  color: #0F7A36;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  text-transform: uppercase;
}
.shell { margin: 0 auto; max-width: 1180px; padding: 22px 16px 48px; }
.client-shell { max-width: 1180px; }
.auth-wrap {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, .95fr) minmax(360px, .7fr);
  min-height: calc(100vh - 112px);
}
.auth-copy {
  align-content: center;
  background: #0F7A36;
  border-radius: 8px;
  color: #fff;
  display: grid;
  gap: 18px;
  padding: clamp(24px, 5vw, 56px);
}
.auth-copy h1, .auth-copy p { color: #fff; }
.auth-copy p { opacity: .88; max-width: 620px; }
.auth-points {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.auth-point {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  padding: 14px;
}
.auth-point strong { display: block; font-size: 14px; margin-bottom: 5px; }
.auth-point span { color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.45; }
.auth-card {
  align-self: center;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(17, 24, 39, .08);
  padding: clamp(20px, 4vw, 34px);
}
.hero {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 1.4fr .9fr;
  min-height: calc(100vh - 112px);
}
.panel, .card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, .05);
  padding: 22px;
}
.client-hero {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .55fr);
  margin-bottom: 18px;
  padding: clamp(20px, 4vw, 34px);
}
.admin-hero {
  background: #111827;
  border-radius: 8px;
  color: #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .7fr);
  margin-bottom: 18px;
  padding: clamp(20px, 4vw, 34px);
}
.admin-hero h1, .admin-hero p { color: #fff; }
.admin-hero p { opacity: .78; }
.admin-hero .panel {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  box-shadow: none;
}
.admin-hero .metric { color: #fff; }
.admin-hero .metric-label { color: rgba(255,255,255,.72); }
.queue-card {
  border-left: 4px solid #16A34A;
  display: grid;
  gap: 10px;
}
.queue-card.warning { border-left-color: #F59E0B; }
.queue-card.danger { border-left-color: #DC2626; }
.mini-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mini-kpi {
  background: #F7FAF8;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 12px;
}
.toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin: 12px 0 16px;
}
.toolbar form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.toolbar label { min-width: 180px; }
.client-hero h1 { font-size: clamp(28px, 4vw, 44px); }
.client-hero .btn { width: 100%; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; }
.split { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
h1, h2, h3 { letter-spacing: 0; margin: 0 0 12px; }
h1 { font-size: clamp(32px, 5vw, 58px); line-height: 1; }
h2 { font-size: 24px; }
h3 { font-size: 16px; }
p { color: #6B7280; line-height: 1.6; margin: 0 0 14px; }
.metric { color: #111827; font-size: 30px; font-weight: 800; line-height: 1; }
.metric-label { color: #6B7280; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.muted { color: #6B7280; font-size: 13px; }
.tabs {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
  padding: 8px;
}
.tabs a {
  border-radius: 6px;
  color: #374151;
  padding: 10px 12px;
}
.tabs a:hover, .tabs a.active { background: #DCFCE7; color: #0F7A36; }
form { display: grid; gap: 14px; }
fieldset {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
}
legend { color: #0F7A36; font-size: 13px; font-weight: 800; padding: 0 8px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 800; color: #374151; }
.checkbox-line {
  align-items: center;
  display: flex;
  gap: 10px;
}
.checkbox-line input {
  min-height: auto;
  width: auto;
}
input, select, textarea {
  background: #fff;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  color: #111827;
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: #16A34A;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
  outline: 0;
}
.currency-field {
  position: relative;
}
.currency-field span {
  color: #0F7A36;
  font-size: 22px;
  font-weight: 800;
  left: 14px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.currency-field input {
  font-size: 28px;
  font-weight: 800;
  min-height: 62px;
  padding-left: 42px;
}
.quick-amounts {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.quick-amounts button {
  background: #fff;
  border: 1px solid #D1D5DB;
  color: #111827;
  display: grid;
  gap: 3px;
  min-height: 58px;
}
.quick-amounts button:hover,
.quick-amounts button.featured {
  background: #DCFCE7;
  border-color: #86EFAC;
  color: #0F7A36;
}
.quick-amounts span {
  font-size: 11px;
  text-transform: uppercase;
}
.payment-choice {
  border: 0;
  margin: 22px 0 0;
  min-width: 0;
  padding: 0;
}
.payment-choice legend {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 9px;
}
.payment-segments {
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
}
.payment-segments.has-paypal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.payment-segments button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #4B5563;
  min-height: 44px;
}
.payment-segments button:hover:not(:disabled) { color: #0F7A36; }
.payment-segments button.selected {
  background: #fff;
  border-color: #D1D5DB;
  box-shadow: 0 1px 3px rgba(17, 24, 39, .08);
  color: #0F7A36;
}
.payment-segments button:disabled { cursor: not-allowed; opacity: .45; }
.payment-help { font-size: 13px; margin: 14px 0 10px; }
.card-payment-panel {
  border-top: 1px solid #E5E7EB;
  margin-top: 20px;
  padding-top: 4px;
}
.brick-loading {
  align-items: center;
  color: #6B7280;
  display: flex;
  font-size: 13px;
  min-height: 72px;
}
.pay-tabs {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pay-option {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 16px;
}
.pay-option strong { color: #111827; }
.pay-option p { margin: 0; }
#cardPaymentBrick_container {
  min-height: 260px;
  width: 100%;
}
#paypal-button-container { min-height: 45px; padding-top: 10px; width: 100%; }
.payment-message {
  border-radius: 8px;
  display: none;
  font-weight: 800;
  margin-top: 12px;
  padding: 12px 14px;
}
.payment-message.show { display: block; }
.payment-message.success { background: #DCFCE7; color: #0F7A36; }
.payment-message.error { background: #FEE2E2; color: #991B1B; }
.payment-message.info { background: #E0F2FE; color: #075985; }
textarea { min-height: 90px; resize: vertical; }
.btn, button {
  align-items: center;
  background: #16A34A;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
}
.btn.secondary { background: #0F7A36; }
.btn.light, button.light { background: #DCFCE7; color: #0F7A36; }
.btn.danger, button.danger { background: #DC2626; }
.btn.block, button.block { width: 100%; }
button:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
  opacity: .8;
}
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid #E5E7EB; padding: 12px 8px; text-align: left; vertical-align: top; }
th { color: #6B7280; font-size: 12px; text-transform: uppercase; white-space: nowrap; }
.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}
.badge.success { background: #DCFCE7; color: #0F7A36; }
.badge.warning { background: #FEF3C7; color: #92400E; }
.badge.danger { background: #FEE2E2; color: #991B1B; }
.badge.info { background: #E0F2FE; color: #075985; }
.alert { border-radius: 8px; font-weight: 700; margin-bottom: 16px; padding: 12px 14px; }
.alert.success { background: #DCFCE7; color: #0F7A36; }
.alert.error, .alert.danger { background: #FEE2E2; color: #991B1B; }
.alert.info { background: #E0F2FE; color: #075985; }
.alert.warning { background: #FEF3C7; color: #92400E; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.full { grid-column: 1 / -1; }
.empty-state {
  border: 1px dashed #D1D5DB;
  border-radius: 8px;
  color: #6B7280;
  padding: 24px;
  text-align: center;
}
.timeline { display: grid; gap: 12px; }
.timeline-item {
  border-left: 3px solid #16A34A;
  padding-left: 12px;
}
.status-track {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 8px 0 4px;
}
.status-step {
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  color: #6B7280;
  font-size: 12px;
  font-weight: 800;
  min-height: 40px;
  padding: 8px;
  text-align: center;
}
.status-step.done {
  background: #DCFCE7;
  border-color: #86EFAC;
  color: #0F7A36;
}
.notice {
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: 8px;
  color: #92400E;
  font-weight: 700;
  padding: 12px 14px;
}
.notice.danger {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #991B1B;
}
.receipt-link {
  background: #F7FAF8;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  display: block;
  padding: 12px;
}
@media (max-width: 900px) {
  .auth-wrap, .client-hero, .admin-hero, .hero, .grid, .grid.two, .grid.four { grid-template-columns: 1fr; }
  .pay-tabs { grid-template-columns: 1fr; }
  .auth-points { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .panel, .card, .auth-card { padding: 16px; }
  .tabs { position: static; }
  .actions .btn, .actions button { flex: 1 1 180px; }
  .status-track { grid-template-columns: 1fr; }
}

/* Client portal */
.client-app {
  background: #F5F5F7;
  color: #161617;
}
.client-app .topbar {
  background: rgba(255,255,255,.96);
  border-color: #E5E5E7;
  min-height: 72px;
  padding: 0 clamp(20px, 4vw, 48px);
}
.client-app .brand img {
  display: block;
  height: auto;
  width: 158px;
}
.section-name {
  color: #6E6E73;
  font-size: 13px;
  font-weight: 700;
}
.client-shell {
  max-width: 1240px;
  padding: 20px 24px 64px;
}
.client-nav {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #D8D8DC;
  border-radius: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 36px;
  padding: 0;
}
.client-nav-links,
.client-nav-actions {
  align-items: center;
  display: flex;
  gap: 4px;
}
.client-nav-links {
  min-width: 0;
  overflow-x: auto;
  scrollbar-color: transparent transparent;
  scrollbar-width: none;
}
.client-nav-links::-webkit-scrollbar { display: none; }
.client-nav a {
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #57575C;
  flex: 0 0 auto;
  font-size: 13px;
  min-height: 54px;
  padding: 18px 12px 16px;
}
.client-nav a:hover,
.client-nav a.active {
  background: transparent;
  border-bottom-color: #16A34A;
  color: #0F7A36;
}
.client-nav .nav-create {
  background: #16A34A;
  border: 1px solid #16A34A;
  border-radius: 999px;
  color: #FFFFFF;
  min-height: 38px;
  padding: 10px 17px;
}
.client-nav .nav-create:hover {
  background: #0F7A36;
  border-color: #0F7A36;
  color: #FFFFFF;
}
.client-nav .nav-logout { color: #6E6E73; }
.client-page { display: grid; gap: 24px; }
.page-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 4px 0 8px;
}
.page-heading-copy { max-width: 720px; }
.page-eyebrow {
  color: #0F7A36;
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.client-app .page-heading h1 {
  color: #161617;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.04;
  margin-bottom: 10px;
}
.page-heading p { font-size: 16px; margin: 0; max-width: 680px; }
.page-actions { align-items: center; display: flex; flex: 0 0 auto; gap: 10px; }
.client-app .btn,
.client-app button {
  border-radius: 999px;
  font-size: 13px;
  min-height: 42px;
  padding: 10px 18px;
}
.client-app .btn.light,
.client-app button.light {
  background: #FFFFFF;
  border: 1px solid #D8D8DC;
  color: #3A3A3C;
}
.client-app .btn.light:hover,
.client-app button.light:hover { border-color: #AFAFB4; color: #161617; }
.balance-summary {
  align-items: center;
  background: #161617;
  border-radius: 8px;
  color: #FFFFFF;
  display: flex;
  gap: 26px;
  justify-content: space-between;
  min-width: 300px;
  padding: 20px 22px;
}
.balance-summary .metric-label { color: #AFAFB4; }
.balance-summary .metric { color: #FFFFFF; font-size: 32px; }
.balance-summary .btn { flex: 0 0 auto; }
.kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.kpi {
  background: #FFFFFF;
  border: 1px solid #E5E5E7;
  border-radius: 8px;
  min-width: 0;
  padding: 20px;
}
.kpi .metric { font-size: 30px; margin-top: 10px; }
.kpi p { font-size: 12px; margin: 8px 0 0; }
.section-panel {
  background: #FFFFFF;
  border: 1px solid #E5E5E7;
  border-radius: 8px;
  padding: 24px;
}
.section-header {
  align-items: center;
  border-bottom: 1px solid #E5E5E7;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 18px;
}
.section-header h2 { font-size: 20px; margin-bottom: 4px; }
.section-header p { font-size: 13px; margin: 0; }
.content-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .72fr);
}
.quick-list { display: grid; }
.quick-link {
  align-items: center;
  border-bottom: 1px solid #E5E5E7;
  color: #161617;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 0;
}
.quick-link:last-child { border-bottom: 0; }
.quick-link span { color: #0F7A36; }
.client-app .panel,
.client-app .card {
  border-color: #E5E5E7;
  box-shadow: none;
}
.client-app .table-wrap { margin: 0 -8px; }
.client-app table { font-size: 13px; }
.client-app th {
  color: #6E6E73;
  font-size: 10px;
  padding: 11px 12px;
}
.client-app td { padding: 15px 12px; }
.client-app tbody tr:hover { background: #FAFAFA; }
.client-app .badge { font-size: 10px; padding: 5px 8px; }
.client-app .toolbar {
  background: #FAFAFA;
  border: 1px solid #E5E5E7;
  border-radius: 8px;
  margin: 0 0 20px;
  padding: 14px;
}
.client-app .toolbar form { width: 100%; }
.client-app .toolbar label { font-size: 11px; min-width: 210px; }
.client-app input,
.client-app select,
.client-app textarea {
  border-color: #CFCFD4;
  border-radius: 8px;
  color: #161617;
}
.client-app .notice,
.client-app .alert { border-radius: 8px; font-size: 13px; }
.money-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
}
.amount-card { padding: clamp(24px, 4vw, 40px); }
.amount-card .currency-field input { font-size: clamp(30px, 4vw, 42px); min-height: 76px; }
.quick-amounts button { border-radius: 8px; }
.quick-amounts button.selected,
.quick-amounts button.featured { background: #EDF8F1; border-color: #16A34A; color: #0F7A36; }
.recharge-invoice-option { margin-top: 18px; }
.invoice-setup-note { font-size: 12px; margin: -12px 0 18px; }
.payment-submit { margin-top: 4px; width: 100%; }
.process-list { counter-reset: process; display: grid; }
.process-step {
  border-bottom: 1px solid #E5E5E7;
  display: grid;
  gap: 12px;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 16px 0;
}
.process-step:last-child { border-bottom: 0; }
.process-step::before {
  align-items: center;
  border: 1px solid #BFE4CC;
  border-radius: 50%;
  color: #0F7A36;
  content: counter(process, decimal-leading-zero);
  counter-increment: process;
  display: flex;
  font-size: 10px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}
.process-step strong { display: block; font-size: 13px; margin-bottom: 3px; }
.process-step p { font-size: 12px; margin: 0; }
.integration-card {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: 190px minmax(0, 1fr);
}
.integration-brand {
  align-items: center;
  background: #FFE600;
  border-radius: 8px;
  color: #2D3277;
  display: flex;
  font-size: 18px;
  font-weight: 800;
  justify-content: center;
  min-height: 150px;
  padding: 20px;
  text-align: center;
}
.integration-details { display: grid; gap: 18px; }
.integration-status { align-items: center; display: flex; gap: 10px; }
.setting-row {
  align-items: center;
  border-bottom: 1px solid #E5E5E7;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 15px 0;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row p { font-size: 12px; margin: 3px 0 0; }
.client-app .checkbox-line { flex: 0 0 auto; }
.client-app .checkbox-line input { accent-color: #16A34A; height: 20px; width: 20px; }
.invoice-state { font-size: 26px !important; }
.fiscal-settings { display: grid; gap: 20px; }
.fiscal-settings .setting-row { margin: 0; }
.fiscal-fields { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); transition: opacity 160ms ease; }
.fiscal-fields.disabled { opacity: .45; }
.fiscal-fields label { color: #3A3A3C; display: grid; font-size: 12px; font-weight: 700; gap: 7px; }
.fiscal-fields .field-wide { grid-column: 1 / -1; }
.fiscal-fields input, .fiscal-fields select { width: 100%; }
.form-actions { border-top: 1px solid #E5E5E7; padding-top: 20px; }
.invoice-error { color: #B42318; font-size: 11px; margin: 7px 0 0; max-width: 280px; }
.invoice-uuid { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; max-width: 180px; overflow-wrap: anywhere; }
.invoice-actions { align-items: center; display: flex; gap: 10px; justify-content: flex-end; }
.invoice-actions form { margin: 0; width: auto; }
.invoice-actions button { min-height: 36px; padding: 8px 14px; white-space: nowrap; }
.readiness-panel {
  background: #FAFAFA;
  border: 1px solid #E5E5E7;
  border-radius: 8px;
  padding: 20px;
}
.readiness-panel .section-header { margin-bottom: 12px; }
.readiness-list { display: grid; }
.readiness-row {
  align-items: center;
  border-bottom: 1px solid #E5E5E7;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px 0;
}
.readiness-row:last-child { border-bottom: 0; }
.readiness-row p { font-size: 12px; margin: 3px 0 0; }
.readiness-actions {
  align-items: end;
  border-top: 1px solid #E5E5E7;
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(360px, 1fr);
  margin-top: 12px;
  padding-top: 18px;
}
.readiness-actions form { margin: 0; }
.item-check-form label { display: block; margin-bottom: 7px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { min-width: 0; width: 100%; }
.inline-form button { flex: 0 0 auto; }
.item-diagnostic {
  background: #FFFFFF;
  border: 1px solid #D8D8DC;
  border-radius: 8px;
  margin-top: 18px;
  padding: 18px;
}
.item-diagnostic-heading {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 8px;
}
.item-diagnostic-heading h3 { font-size: 16px; margin: 5px 0 2px; }
.item-diagnostic-heading p,
.diagnostic-note { font-size: 12px; margin: 0; }
.diagnostic-note { border-top: 1px solid #E5E5E7; padding-top: 14px; }
.amount-positive { color: #0F7A36; font-weight: 800; }
.amount-negative { color: #B42318; font-weight: 800; }
.integration-shipments .section-header { align-items: flex-end; }
.integration-shipments .section-header form,
.integration-shipments td form { margin: 0; width: auto; }
.integration-shipments td button { min-height: 38px; white-space: nowrap; }
.integration-empty {
  align-items: center;
  background: #FAFAFA;
  border: 1px solid #E5E5E7;
  border-radius: 8px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 22px;
}
.integration-empty p { margin: 5px 0 0; }
.payload-view {
  background: #111827;
  border-radius: 8px;
  color: #E5E7EB;
  font-size: 12px;
  line-height: 1.55;
  max-height: 420px;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}
details summary { cursor: pointer; font-weight: 700; }
.app-footer {
  align-items: center;
  border-top: 1px solid #E5E5E7;
  color: #6E6E73;
  display: flex;
  font-size: 12px;
  gap: 20px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1220px;
  padding: 22px 26px 30px;
}
.app-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.app-footer a { color: #52525B; }
.app-footer a:hover { color: #0F7A36; }
.confirm-dialog {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, .22);
  color: #161617;
  max-width: min(92vw, 520px);
  padding: 0;
}
.confirm-dialog::backdrop { background: rgba(17, 24, 39, .48); }
.confirm-dialog-body { padding: 28px; }
.confirm-dialog-body h2 { margin: 6px 0 10px; }
.confirm-dialog-body .actions { justify-content: flex-end; margin-top: 24px; }

@media (max-width: 980px) {
  .client-nav { align-items: stretch; display: grid; gap: 0; }
  .client-nav-links { border-bottom: 1px solid #E5E5E7; }
  .client-nav-actions { justify-content: flex-end; padding: 10px 0; }
  .content-grid, .money-layout { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .app-footer { align-items: flex-start; flex-direction: column; padding: 20px 16px 28px; }
  .client-app .topbar { min-height: 64px; padding: 0 20px; }
  .client-app .brand img { width: 138px; }
  .client-shell { padding: 12px 16px 48px; }
  .client-nav { margin-bottom: 28px; }
  .client-nav a { min-height: 48px; padding: 15px 10px 13px; }
  .client-nav-actions { justify-content: space-between; }
  .client-nav .nav-create { min-height: 38px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-actions { align-items: stretch; flex-direction: column; }
  .balance-summary { min-width: 0; width: 100%; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 16px; }
  .kpi .metric { font-size: 26px; }
  .section-panel { padding: 18px 16px; }
  .section-header { align-items: start; }
  .quick-amounts { grid-template-columns: 1fr; }
  .integration-card { grid-template-columns: 1fr; }
  .readiness-actions { align-items: stretch; grid-template-columns: 1fr; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .integration-brand { min-height: 100px; }
  .integration-empty { align-items: stretch; flex-direction: column; }
  .client-app .toolbar form { align-items: stretch; display: grid; grid-template-columns: 1fr; }
  .client-app .toolbar label { min-width: 0; }
  .fiscal-fields { grid-template-columns: 1fr; }
  .fiscal-fields .field-wide { grid-column: auto; }
  .setting-row { align-items: flex-start; }
  .invoice-actions { justify-content: flex-start; }
}
