:root {
  --ink: #13242e;
  --muted: #607382;
  --line: #cfe1e8;
  --surface: #ffffff;
  --surface-strong: #f0fbf8;
  --nav: #f7fcff;
  --nav-soft: #e5f6f2;
  --accent: #0f927f;
  --accent-strong: #087263;
  --amber: #d97706;
  --red: #c0261c;
  --blue: #2f7ec1;
  --purple: #6d6fc7;
  --green: #169b62;
  --aqua: #36b6c9;
  --sun: #f4b942;
  --rose: #ef767a;
  --sky-soft: #e9f5ff;
  --mint-soft: #e8f8f2;
  --cream-soft: #fff8e8;
  --shadow: 0 12px 30px rgba(49, 89, 111, 0.1);
}

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

.organization-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  padding: 8px 10px;
  border: 1px solid #bcdce4;
  border-radius: 6px;
  background: #f4fbfd;
  color: #12627a;
}

.organization-switcher svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.organization-switcher select {
  min-width: 0;
  width: 100%;
  border: 0;
  padding: 0 24px 0 0;
  background-color: transparent;
  color: #163445;
  font-weight: 700;
}

.organization-manager {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid #b9ded4;
  border-left: 5px solid #169b83;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0fbf7 0%, #f4faff 72%, #fffbed 100%);
}

.organization-manager h2,
.organization-manager p {
  margin: 0;
}

.organization-manager > div:first-child > p:last-child {
  margin-top: 6px;
  color: #5e7180;
}

.organization-manager-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  min-width: min(420px, 46%);
}

.organization-manager-actions label {
  flex: 1;
}

.organization-manager-actions label span {
  display: block;
  margin-bottom: 6px;
  color: #526a78;
  font-size: 0.82rem;
  font-weight: 700;
}

.organization-manager-actions select {
  width: 100%;
}

.organization-create-panel {
  border-color: #b9d9eb;
}

.inventory-audit-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(360px, 2fr);
  gap: 24px;
  padding: 20px;
  border: 1px solid #b9ded4;
  background: #f3fbf8;
}

.inventory-audit-summary > div > span,
.inventory-audit-summary > div > strong,
.inventory-audit-summary > div > p {
  display: block;
  margin: 0;
}

.inventory-audit-summary > div > strong {
  margin: 4px 0;
  color: #0b735f;
  font-size: 1.6rem;
}

.inventory-audit-summary > div > p {
  color: #607382;
}

.inventory-audit-summary dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 10px;
  margin: 0;
}

.inventory-audit-summary dl div {
  padding: 12px;
  border: 1px solid #cfe1e8;
  background: #fff;
}

.inventory-audit-summary dt {
  color: #607382;
  font-size: 0.8rem;
}

.inventory-audit-summary dd {
  margin: 4px 0 0;
  color: #13242e;
  font-size: 1.25rem;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .organization-switcher {
    min-width: 150px;
  }

  .organization-manager {
    align-items: stretch;
    flex-direction: column;
  }

  .organization-manager-actions {
    min-width: 0;
    width: 100%;
  }

  .inventory-audit-summary,
  .inventory-audit-summary dl {
    grid-template-columns: 1fr 1fr;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, #f7fffc 0%, #edf8ff 42%, #fffdf7 72%, #f8fbff 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}

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

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(15, 122, 111, 0.28);
  outline-offset: 2px;
}

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

.boot-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
  text-align: center;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(300px, 1fr);
  min-height: 100vh;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  background: var(--surface);
}

.login-context {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px;
  color: #edf7f4;
  background:
    linear-gradient(rgba(23, 35, 40, 0.86), rgba(23, 35, 40, 0.86)),
    linear-gradient(135deg, #203039, #0e171a 68%);
}

.login-context h2 {
  max-width: 560px;
  margin: 0 0 18px;
  font-size: 34px;
  line-height: 1.1;
}

.login-context ul {
  max-width: 580px;
  margin: 0;
  padding-left: 22px;
  color: #cfe0da;
  line-height: 1.8;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--accent);
  font-weight: 800;
}

.brand-mark svg,
.nav-item-main svg,
.nav-subitem svg,
.quick-open svg,
.icon-button-text svg,
.icon-action svg,
.icon-only svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

kbd {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border: 1px solid rgba(47, 126, 193, 0.28);
  border-radius: 6px;
  color: #28618e;
  background: #f8fcff;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.eyebrow {
  margin: 24px 0 8px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.login-panel h1 {
  max-width: 520px;
  margin-bottom: 16px;
  font-size: 42px;
  line-height: 1.05;
}

.login-copy {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
}

.login-form {
  max-width: 560px;
  margin-top: 24px;
}

.login-form label,
.search-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row input,
.search-box input,
.field input,
.field textarea,
.field select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
  font-size: 14px;
  line-height: 1.25;
}

.field textarea {
  resize: vertical;
}

.logo-upload-field {
  display: grid;
  gap: 8px;
}

.logo-upload-preview {
  display: grid;
  width: 96px;
  height: 72px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfc;
  font-size: 12px;
  font-weight: 800;
}

.logo-upload-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.input-row button,
.panel-heading button,
.user-chip button {
  padding: 12px 16px;
  color: white;
  background: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

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

.form-error {
  margin-top: 14px;
  color: var(--red);
  font-weight: 700;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 292px;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(240, 250, 255, 0.96)),
    linear-gradient(145deg, #effbf6, #eaf5ff 58%, #fff7e5);
  border-right: 1px solid #cfe4ed;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 6px 8px 12px;
}

.sidebar-mobile-body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 9px 11px;
  color: #12627a;
  background: #eef8ff;
  border: 1px solid #c9e2f5;
  box-shadow: none;
}

.mobile-nav-toggle svg {
  width: 18px;
  height: 18px;
}

.sidebar-brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.quick-open {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 14px;
  padding: 11px 14px;
  color: #24516f;
  background: linear-gradient(135deg, #eaf5ff, #e6fbf3);
  border: 1px solid #c9e2f5;
  border-radius: 999px;
  text-align: left;
  box-shadow: none;
}

.quick-open span {
  min-width: 0;
  flex: 1;
}

.shortcut-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
  padding: 0 4px;
}

.shortcut-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #4a7188;
  font-size: 11px;
  font-weight: 800;
}

.nav-list {
  display: grid;
  gap: 4px;
  padding-bottom: 18px;
}

.nav-group {
  display: grid;
  gap: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
  box-shadow: none;
}

.nav-item-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 800;
}

.nav-item-main b {
  display: grid;
  min-width: 28px;
  height: 28px;
  padding: 0 5px;
  place-items: center;
  border-radius: 6px;
  color: #0c7465;
  background: #e4f7f1;
  font-size: 12px;
}

.nav-group:nth-child(2n) .nav-item-main b {
  color: #1f6fab;
  background: #e6f3ff;
}

.nav-group:nth-child(3n) .nav-item-main b {
  color: #9a5c00;
  background: #fff1c9;
}

.nav-group:nth-child(4n) .nav-item-main b {
  color: #9f2a2f;
  background: #ffe9e9;
}

.nav-item small {
  color: #3f81a9;
  font-size: 12px;
}

.nav-item.active,
.nav-item:hover {
  color: var(--ink);
  background: linear-gradient(135deg, #e5f8f1, #eaf5ff 62%, #fff6dc);
  border-color: #bddfd7;
  transform: translateX(2px);
}

.nav-item.active {
  box-shadow: inset 4px 0 0 var(--accent);
}

.nav-item:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.nav-sublist {
  display: none;
  padding: 0 0 6px 42px;
}

.nav-group.open .nav-sublist {
  display: grid;
}

.nav-subitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 8px 10px 8px 12px;
  color: #203440;
  background: transparent;
  border-radius: 8px;
  text-align: left;
}

.nav-subitem b {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #5a8eb0;
  opacity: 0.84;
}

.nav-subitem.active,
.nav-subitem:hover {
  background: #eef8ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.sidebar-firm {
  display: grid;
  gap: 4px;
  margin: auto 0 0;
  padding: 12px;
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #cfe4ed;
  box-shadow: 0 8px 22px rgba(49, 89, 111, 0.08);
}

.sidebar-firm strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-firm span {
  color: var(--blue);
  font-size: 12px;
}

.workspace {
  min-height: 100vh;
  margin-left: 292px;
  overflow-x: hidden;
}

.workspace-focus {
  margin-left: 0;
  background:
    linear-gradient(135deg, rgba(231, 250, 244, 0.86), rgba(236, 247, 255, 0.86)),
    #ffffff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 32px;
  border-bottom: 1px solid #cfe4ed;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(240, 251, 249, 0.94), rgba(238, 247, 255, 0.94));
  backdrop-filter: blur(10px);
}

.topbar .eyebrow {
  margin: 0 0 6px;
}

.topbar h1 {
  margin: 0;
  font-size: 30px;
}

.topbar-title {
  min-width: 220px;
}

.focused-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
}

.focused-topbar .topbar-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.focused-topbar .icon-action:not(.secondary) {
  color: #ffffff;
  background: var(--accent);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.topbar-search {
  position: relative;
  min-width: 280px;
  max-width: 520px;
  flex: 1;
}

.topbar-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.topbar-search input {
  width: 100%;
  border: 1px solid #cfe4ed;
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--ink);
  background: linear-gradient(135deg, #ffffff, #f3fbff);
}

.quick-sale,
.quick-purchase {
  padding: 11px 16px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  white-space: nowrap;
}

.icon-button-text,
.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.icon-action {
  min-height: 36px;
  padding: 8px 12px;
  font-weight: 900;
}

.icon-only {
  display: inline-grid !important;
  width: 36px;
  min-width: 36px;
  height: 36px;
  place-items: center;
  padding: 0 !important;
  border-radius: 8px;
}

.icon-only svg {
  width: 16px;
  height: 16px;
}

.quick-sale {
  background: linear-gradient(135deg, #0f927f, #1e78b7);
}

.quick-purchase {
  background: linear-gradient(135deg, #2f7ec1, #61a9d8);
}

.quick-sale kbd,
.quick-purchase kbd {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--muted);
}

.user-chip span {
  overflow: hidden;
  max-width: 260px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip button {
  padding: 10px 12px;
  background: #132d3b;
}

.content-region {
  padding: 32px;
}

.workspace-focus .content-region {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px;
}

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

.metric-card,
.panel,
.module-card,
.customer-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.panel:hover,
.metric-card:hover,
.module-card:hover,
.customer-card:hover {
  border-color: #b9dce8;
  box-shadow: 0 16px 36px rgba(49, 89, 111, 0.12);
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 249, 255, 0.94));
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), #8fc7bc);
}

.metric-grid .metric-card:nth-child(2)::before {
  background: linear-gradient(180deg, var(--blue), #99c9f2);
}

.metric-grid .metric-card:nth-child(3)::before {
  background: linear-gradient(180deg, #36a98f, #a9ddd3);
}

.metric-grid .metric-card:nth-child(4)::before {
  background: linear-gradient(180deg, #69aee0, #c3e3f6);
}

.metric-card::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 16px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 42%, transparent 44%),
    conic-gradient(from 40deg, rgba(15, 122, 111, 0.42), rgba(30, 90, 150, 0.18), rgba(183, 121, 31, 0.22), rgba(15, 122, 111, 0.42));
  opacity: 0.72;
}

.metric-card p,
.metric-card span {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 30px;
}

.metric-card.compact strong {
  margin-bottom: 0;
  font-size: 25px;
}

.ceo-health-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1.25fr) minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 250, 248, 0.96) 44%, rgba(255, 248, 226, 0.88));
}

.ceo-score-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.ceo-score-card h2 {
  margin: 2px 0 6px;
  font-size: 26px;
}

.ceo-score-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.score-ring {
  --score: 70;
  flex: 0 0 112px;
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, white 0 54%, transparent 56%),
    conic-gradient(#12877c calc(var(--score) * 1%), #f2d58b 0 74%, #e9eef3 0);
  box-shadow: inset 0 0 0 1px rgba(16, 135, 124, 0.12);
}

.score-ring strong {
  font-size: 30px;
  line-height: 1;
}

.score-ring span {
  margin-top: -30px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.health-ratio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
}

.health-ratio {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.health-ratio span,
.mini-report-list span,
.stock-health-bars span,
.pnl-bars span {
  color: var(--muted);
}

.health-ratio strong {
  font-size: 20px;
}

.health-ratio.good {
  border-color: #bde7d7;
  background: #f3fbf7;
}

.health-ratio.watch {
  border-color: #f2d58b;
  background: #fff9e8;
}

.health-ratio.danger {
  border-color: #f3b1aa;
  background: #fff5f3;
}

.risk-list,
.mini-report-list,
.audit-event-list,
.coverage-list,
.stock-health-bars {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-list li {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.risk-list li strong {
  font-size: 14px;
}

.risk-list li span {
  color: var(--muted);
  font-size: 13px;
}

.risk-list li.warning {
  border-color: #f2d58b;
  background: #fff9e8;
}

.risk-list li.danger {
  border-color: #f3b1aa;
  background: #fff5f3;
}

.risk-list li.good {
  border-color: #bde7d7;
  background: #f3fbf7;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.chart-panel {
  padding: 16px;
}

.compact-heading {
  margin-bottom: 12px;
}

.compact-heading h2 {
  font-size: 18px;
}

.compact-heading p {
  margin-top: 2px;
  font-size: 13px;
}

.trend-chart {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 8px;
  min-height: 156px;
}

.trend-column {
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.trend-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
  height: 120px;
  padding: 8px 4px 0;
  border-radius: 8px;
  background: #f6fafb;
}

.trend-bars span {
  display: block;
  width: 12px;
  min-height: 4px;
  border-radius: 7px 7px 2px 2px;
}

.sales-bar,
.sales-dot {
  background: #10877c;
}

.purchase-bar,
.purchase-dot {
  background: #dd8f2a;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.aging-bar {
  display: flex;
  width: 100%;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef3f5;
}

.aging-bar span.current {
  background: #12877c;
}

.aging-bar span.days1To30 {
  background: #5ba6d9;
}

.aging-bar span.days31To60 {
  background: #f0b74f;
}

.aging-bar span.days61To90 {
  background: #df7e45;
}

.aging-bar span.days90Plus {
  background: #c0473d;
}

.mini-report-list {
  margin-top: 12px;
}

.mini-report-list li,
.audit-event-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf2f5;
}

.mini-report-list strong,
.audit-event-list strong {
  text-align: right;
}

.stock-health-bars li {
  display: grid;
  grid-template-columns: 70px minmax(90px, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.stock-health-bars div,
.pnl-bars div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f5;
}

.stock-health-bars i,
.pnl-bars i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #12877c, #5ba6d9);
}

.pnl-bars {
  display: grid;
  gap: 12px;
}

.pnl-bars article {
  display: grid;
  grid-template-columns: 72px minmax(90px, 1fr) minmax(90px, auto);
  align-items: center;
  gap: 8px;
}

.statutory-panel {
  margin-bottom: 18px;
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
}

.readiness-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.readiness-card span,
.status-pill {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e9f7f4;
  color: #0b5d54;
  font-size: 11px;
  font-weight: 900;
}

.readiness-card.watch span,
.status-pill.watch {
  background: #fff3d2;
  color: #8a5b00;
}

.readiness-card.gap span,
.status-pill.gap {
  background: #ffe1dd;
  color: #9f2f24;
}

.readiness-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.accounting-note {
  display: grid;
  gap: 6px;
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #c9ddd9;
  border-radius: 8px;
  background: #f2fbf8;
  color: #24413d;
}

.accounting-note strong {
  color: #0b4f47;
}

.source-assignment-block {
  padding: 14px;
  border: 1px solid #cfe4dc;
  border-radius: 8px;
  background: linear-gradient(135deg, #f2fbf8, #fff8e8);
}

.source-assignment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.crm-routing-manager {
  padding: 14px;
  border: 1px solid #d8e4ec;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f2fbf8);
}

.crm-routing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.crm-routing-grid article {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid #d9e8e4;
  border-radius: 8px;
  background: #fff;
}

.crm-routing-grid span,
.crm-routing-grid small {
  color: var(--muted);
  font-size: 12px;
}

.call-button {
  color: #fff !important;
  background: var(--green) !important;
}

.lead-source-setup {
  padding: 14px;
  border: 1px solid #d8e4ec;
  border-radius: 8px;
  background: #ffffff;
}

@media (min-width: 821px) and (max-width: 1500px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar-title {
    flex: 1 1 100%;
    min-width: 0;
  }

  .topbar-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .topbar-search {
    flex: 1 1 240px;
    min-width: 220px;
  }

  .organization-switcher {
    flex: 0 1 220px;
  }

  .topbar-actions .user-chip {
    margin-left: auto;
  }

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

.lead-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.lead-source-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, #f7fbff);
}

.lead-source-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lead-source-card-heading strong {
  font-size: 16px;
}

.lead-source-card-heading span {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: #dff7f1;
  font-size: 11px;
  font-weight: 900;
}

.lead-source-card ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.lead-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lead-source-links a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid #cfe4dc;
  border-radius: 8px;
  color: var(--accent-strong);
  background: #f2fbf8;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.lead-source-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 10px;
}

.crm-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1.25fr) minmax(280px, 0.9fr);
  gap: 16px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #bfe0e6;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(230, 248, 246, 0.94) 52%, rgba(255, 245, 218, 0.86));
  box-shadow: var(--shadow);
}

.crm-hero-copy span,
.kill-switch-hero span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.crm-hero-copy h2,
.kill-switch-hero h2 {
  margin: 6px 0 8px;
  font-size: 34px;
  line-height: 1.1;
}

.crm-hero-copy p,
.kill-switch-hero p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.55;
}

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

.crm-hero-stats article {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #cae4ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.crm-hero-stats strong {
  font-size: 28px;
}

.crm-hero-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.crm-source-strip {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-source-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #cbe1e8;
  border-radius: 999px;
  background: #fff;
  color: #234555;
  font-size: 12px;
  font-weight: 900;
}

.crm-source-strip b {
  color: var(--accent-strong);
  font-weight: 900;
}

.crm-source-strip span.connected {
  border-color: #bfe6d3;
  background: #eafbf4;
}

.crm-source-strip span.ready-for-test {
  border-color: #cae3f5;
  background: #edf8ff;
}

.crm-source-strip span.needs-review,
.crm-source-strip span.not-connected {
  border-color: #f0d5a1;
  background: #fff8e8;
}

.crm-panel {
  background:
    linear-gradient(180deg, #ffffff, #f8fcfb);
}

.crm-call-guide,
.crm-kanban-board {
  display: grid;
  gap: 14px;
}

.crm-call-guide {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  margin-bottom: 16px;
}

.crm-call-guide article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  padding: 14px;
  border: 1px solid #d4e7ea;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #eef9ff);
}

.crm-call-guide strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  grid-row: span 2;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--blue));
}

.crm-call-guide span {
  font-weight: 900;
}

.crm-call-guide small {
  color: var(--muted);
  line-height: 1.35;
}

.crm-kanban-board {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  align-items: start;
}

.crm-kanban-column {
  min-height: 220px;
  padding: 12px;
  border: 1px solid #d6e5ea;
  border-radius: 8px;
  background: #f8fcff;
}

.crm-kanban-column.hot {
  background: linear-gradient(180deg, #fff8e8, #fffdf8);
}

.crm-kanban-column.fresh {
  background: linear-gradient(180deg, #eaf8ff, #ffffff);
}

.crm-kanban-column.follow {
  background: linear-gradient(180deg, #eafbf4, #ffffff);
}

.crm-kanban-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.crm-kanban-heading strong {
  font-size: 16px;
}

.crm-kanban-heading span {
  color: var(--muted);
  font-size: 12px;
}

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

.crm-lead-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #d3e2e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(49, 89, 111, 0.08);
}

.crm-lead-card.priority-high {
  border-color: #f2bd75;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.12);
}

.crm-lead-card-top,
.crm-lead-meta,
.crm-lead-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.crm-lead-card-top span,
.crm-lead-card-top b {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf8ff;
  color: #24658f;
  font-size: 11px;
  font-weight: 900;
}

.crm-lead-card-top b {
  background: #fff0ca;
  color: #965b00;
}

.crm-lead-card h3 {
  margin: 0;
  font-size: 17px;
}

.crm-lead-card p,
.crm-lead-footer,
.crm-lead-footer small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.crm-lead-meta span {
  color: #244555;
  font-weight: 800;
}

.crm-lead-footer {
  display: grid;
}

.crm-lead-footer b {
  display: block;
  color: var(--ink);
}

.crm-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.crm-card-actions button {
  min-height: 32px;
  padding: 6px 9px;
  background: #eef7fb;
  color: #173747;
  font-size: 12px;
  font-weight: 900;
}

.crm-card-actions button:not(.danger):hover {
  background: #e0f2ff;
}

.crm-lead-entry {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #d6e7ed;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f5fbff);
}

.hrm-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #cce5d6;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff, #eafbf4 48%, #edf8ff 78%, #fff8e8);
  box-shadow: var(--shadow);
}

.hrm-hero span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hrm-hero h2 {
  margin: 6px 0 8px;
  font-size: 34px;
}

.hrm-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hrm-department-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
}

.hrm-department-strip article {
  padding: 14px;
  border: 1px solid #d3e8ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.hrm-department-strip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 28px;
}

.hrm-department-strip span {
  color: var(--muted);
  text-transform: none;
}

.hrm-panel {
  background: linear-gradient(180deg, #ffffff, #f8fcfb);
}

.hrm-form-card {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #d6e8e6;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f6fcff);
}

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

.hrm-form-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.hrm-form-toolbar h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.hrm-form-toolbar p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.hrm-details {
  border: 1px solid #dbe9ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.hrm-details summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #12313f;
  background: linear-gradient(90deg, #eefbf7, #f4fbff);
  font-weight: 900;
}

.hrm-details .form-grid {
  padding: 14px;
}

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

.hrm-inline-total {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #d6e8e6;
  border-radius: 8px;
  background: #f6fcfb;
}

.hrm-inline-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hrm-inline-total strong {
  font-size: 18px;
}

.hrm-compliance-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.hrm-compliance-overview article {
  padding: 14px;
  border: 1px solid #cfe4ed;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f4fbff);
}

.hrm-compliance-overview span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hrm-compliance-overview strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 26px;
}

.hrm-compliance-overview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.hrm-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 16px;
}

.notification-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #cfe8f5;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff 0%, #eefbf5 42%, #eef8ff 78%, #fff8e8 100%);
  box-shadow: var(--shadow);
}

.notification-hero span {
  color: #087f6f;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-hero h2 {
  margin: 6px 0 8px;
  font-size: 34px;
}

.notification-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.notification-panel {
  background: linear-gradient(180deg, #ffffff, #f8fcff);
}

.notification-action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.notification-section {
  margin-top: 14px;
}

.notification-actions {
  min-width: 300px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #b7d6e8;
  border-radius: 8px;
  background: #f4fbff;
  color: #166096;
  font-weight: 900;
  text-decoration: none;
}

.button-link:hover {
  background: #e7f6ff;
}

.notification-settings-card .detail-list {
  margin-top: 12px;
}

.utilities-smart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
}

.smart-tool-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f7fbff);
}

.smart-tool-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
}

.smart-tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.smart-tool-card button {
  flex: 0 0 auto;
  padding: 9px 11px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.nested-panel {
  padding: 16px;
  box-shadow: none;
}

.coverage-list {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.coverage-list li {
  padding: 10px 12px;
  border: 1px solid #dde8ef;
  border-radius: 8px;
  background: #fbfdff;
  font-weight: 800;
}

.audit-event-list li {
  display: grid;
  justify-content: stretch;
}

.audit-event-list span {
  color: var(--muted);
  font-size: 12px;
}

.accounting-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.accounting-tab-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.accounting-tab-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.accounting-tab-group strong {
  display: block;
  font-size: 14px;
}

.accounting-tab-group span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.compact-tabs {
  margin: 0;
}

.compact-tabs button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.accounting-health {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid #c9ddd9;
  border-radius: 8px;
  background: #f7fbfa;
}

.accounting-health strong {
  font-size: 13px;
  text-transform: uppercase;
}

.accounting-health span {
  color: var(--muted);
  line-height: 1.45;
}

.accounting-health.healthy {
  border-color: #b8dacf;
  background: #f2fbf8;
}

.accounting-health.warning {
  border-color: #ead29d;
  background: #fff8e8;
}

.accounting-health.error {
  border-color: #f0b7b1;
  background: #fff3f2;
}

.setup-wizard {
  display: grid;
  grid-template-columns: minmax(240px, 0.35fr) minmax(0, 1fr);
  gap: 18px;
}

.wizard-steps {
  display: grid;
  gap: 10px;
}

.wizard-steps button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #f8faf9;
  text-align: left;
}

.wizard-steps button.active {
  border-color: rgba(15, 122, 111, 0.45);
  background: #edf7f4;
  box-shadow: inset 3px 0 0 var(--accent);
}

.wizard-steps span {
  grid-row: span 2;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  font-weight: 900;
}

.wizard-steps small,
.wizard-copy p,
.aging-mini {
  color: var(--muted);
  line-height: 1.45;
}

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

.setup-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.setup-check-grid article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

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

.setup-check-grid strong {
  display: block;
  margin-top: 6px;
}

.wizard-copy {
  padding: 16px;
  border: 1px solid #c9ddd9;
  border-radius: 8px;
  background: #f7fbfa;
}

.banking-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.bank-account-list {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
  padding: 4px;
}

.bank-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.bank-account-select {
  display: grid;
  min-width: 0;
  flex: 1;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.bank-account-row:hover {
  border-color: #b6dce8;
  background: #f5fbff;
  transform: translateX(2px);
}

.bank-account-row.active {
  border-color: #73c2b6;
  background: linear-gradient(135deg, #eafaf5, #edf7ff);
  box-shadow: 0 10px 24px rgba(16, 135, 124, 0.12);
}

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

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

.bank-account-row b {
  white-space: nowrap;
}

.bank-account-editor {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #bce0d8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff, #eefcf7 54%, #f2f8ff);
}

.bank-account-editor .document-form {
  margin: 0;
}

.bank-bulk-form {
  display: grid;
  gap: 16px;
}

.bank-template-panel {
  margin-bottom: 0;
}

.go-live-template-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(320px, 1.2fr);
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #bee2dd;
  border-radius: 8px;
  background: linear-gradient(135deg, #f6fffb, #eef8ff);
}

.go-live-template-panel h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.go-live-template-panel p {
  margin: 0;
  color: var(--muted);
}

.go-live-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
}

.go-live-template-grid button {
  min-height: 42px;
  padding: 9px 10px;
  color: #164255;
  background: #ffffff;
  border: 1px solid #cfe4ed;
  font-weight: 900;
  text-align: left;
}

.go-live-template-grid button:hover {
  border-color: #83c9bd;
  background: #eefbf7;
}

.compact-grid {
  grid-template-columns: minmax(260px, 0.45fr) minmax(320px, 1fr);
}

.bank-bulk-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(49, 89, 111, 0.06);
}

.bank-bulk-table table {
  min-width: 1520px;
}

.bank-bulk-table th {
  white-space: nowrap;
  color: #385568;
  background: #f0f8ff;
}

.bank-bulk-table td {
  vertical-align: top;
}

.bank-bulk-table input,
.bank-bulk-table select {
  width: 100%;
  min-width: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

.bank-bulk-table select[data-bank-field="transactionType"] {
  min-width: 170px;
}

.bank-bulk-table select[data-bank-field="accountCode"] {
  min-width: 190px;
}

.bank-bulk-table input[data-bank-field="partyLedger"] {
  min-width: 220px;
}

.bank-bulk-table select[data-bank-field="expenseAccountCode"] {
  min-width: 210px;
}

.bank-bulk-table select[data-bank-field="expenseClass"] {
  min-width: 110px;
}

.bank-bulk-table input[data-bank-field="statementBalance"] {
  min-width: 150px;
}

.bank-bulk-table input[data-bank-field="notes"] {
  min-width: 240px;
}

.bank-maintenance-panel {
  margin-top: 16px;
  border: 1px solid #cfe4ed;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f0fbff);
  overflow: hidden;
}

.bank-maintenance-panel summary {
  padding: 13px 16px;
  color: #155d73;
  cursor: pointer;
  font-weight: 850;
}

.bank-maintenance-panel[open] summary {
  border-bottom: 1px solid #dcebf1;
  background: #f2fbf8;
}

.compact-document-form {
  padding: 16px;
}

.company-setup-import {
  padding: 16px;
  border: 1px solid #cfe2df;
  border-radius: 8px;
  background: #f7fbfa;
}

.banking-detail {
  min-width: 0;
}

.banking-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.banking-summary-strip.single-column {
  grid-template-columns: 1fr;
}

.banking-summary-strip article {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid #dbe8ed;
  border-radius: 8px;
  background: #fbfefd;
}

.banking-summary-strip span,
.banking-summary-strip small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.banking-summary-strip strong {
  font-size: 18px;
}

.loan-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.loan-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f7fbff);
  box-shadow: 0 8px 18px rgba(40, 60, 80, 0.08);
}

.loan-card span,
.loan-card small {
  color: var(--muted);
}

.loan-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.loan-card dl div {
  padding: 8px;
  border: 1px solid #e4edf1;
  border-radius: 8px;
  background: #ffffff;
}

.loan-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.loan-card dd {
  margin: 3px 0 0;
  font-weight: 900;
}

.searchable-select {
  position: relative;
}

.searchable-select-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #cfd9df;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(20, 38, 54, 0.18);
}

.searchable-select-menu button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #14202b;
  text-align: left;
  font-weight: 700;
}

.searchable-select-menu button:hover,
.searchable-select-menu button:focus {
  background: #edf6f4;
}

.searchable-select-empty {
  padding: 10px;
  color: #697884;
  font-weight: 700;
}

.table-toolstrip {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 10px;
}

.inline-toolstrip {
  flex-wrap: wrap;
  margin: 0;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 12px 0 0;
  color: #546575;
  font-size: 14px;
  font-weight: 700;
}

.table-pagination button {
  padding: 7px 12px;
}

.barcode-workspace {
  display: grid;
  gap: 18px;
}

.barcode-label-output {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: start;
}

.barcode-sticker {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  width: 50mm;
  height: 50mm;
  padding: 2.5mm;
  border: 1px solid #111;
  border-radius: 4px;
  background: #fff;
  color: #111;
  box-shadow: 0 10px 24px rgba(20, 32, 43, 0.12);
}

.barcode-sticker.label-size-50x25 {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: 50mm;
  height: 25mm;
  padding: 1.7mm;
}

.barcode-sticker.label-size-38x25 {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: 38mm;
  height: 25mm;
  padding: 1.5mm;
}

.barcode-sticker.label-size-100x50 {
  width: 100mm;
  height: 50mm;
}

.sticker-company {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sticker-name {
  display: -webkit-box;
  min-height: 24px;
  overflow: hidden;
  margin-top: 2px;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1.18;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.label-size-50x25 .sticker-name,
.label-size-38x25 .sticker-name {
  min-height: 14px;
  font-size: 7.2px;
  -webkit-line-clamp: 2;
}

.sticker-meta,
.sticker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 7.5px;
  font-weight: 800;
}

.sticker-barcode {
  display: grid;
  align-items: center;
  min-height: 13mm;
  margin: 2mm 0 1mm;
}

.sticker-barcode svg {
  width: 100%;
  height: 13mm;
  fill: #111;
}

.label-size-50x25 .sticker-barcode,
.label-size-38x25 .sticker-barcode {
  min-height: 8mm;
  margin: 1mm 0 0.6mm;
}

.label-size-50x25 .sticker-barcode svg,
.label-size-38x25 .sticker-barcode svg {
  height: 8mm;
}

.label-size-38x25 .sticker-company,
.label-size-38x25 .sticker-meta,
.label-size-38x25 .sticker-footer {
  font-size: 6.5px;
}

.sticker-footer strong {
  font-size: 10px;
}

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

.inventory-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
}

.panel {
  padding: 22px;
}

.focused-panel {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfefd 72%, #f5fbff 100%);
}

.compact-list-panel {
  max-height: 420px;
  overflow: auto;
}

.panel::selection,
.metric-card::selection {
  background: #dff7f1;
}

.next-panel {
  margin-top: 18px;
}

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

.panel-heading h2 {
  margin: 0;
  font-size: 20px;
}

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

.compact-heading {
  margin-bottom: 12px;
}

.panel-heading button {
  background: var(--blue);
}

.secondary {
  color: var(--ink) !important;
  background: #edf3f7 !important;
}

.danger {
  background: var(--red) !important;
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 800;
  text-align: left;
}

.document-number {
  display: block;
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 800;
}

.notice.success {
  color: #075f56;
  background: #dff7f1;
}

.notice.error {
  color: #8f1f17;
  background: #ffe2df;
}

.phase-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #074f48;
  background: #dff7f1;
  font-size: 13px;
  font-weight: 800;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.setup-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.setup-overview article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.setup-overview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.setup-overview strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 20px;
}

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

.form-section-title {
  grid-column: 1 / -1;
  margin: 0;
}

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

.field span,
.checkbox-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding-top: 22px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.form-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  grid-column: 1 / -1;
}

.form-actions button {
  padding: 12px 16px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #0a6d91);
  font-weight: 800;
}

.danger-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.6fr);
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #f1b7ae;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff7f5, #fffdfc);
}

.danger-panel strong {
  display: block;
  margin-bottom: 8px;
  color: #8f1f17;
  font-size: 18px;
}

.danger-panel p {
  margin: 0;
  color: #6f463f;
  line-height: 1.55;
}

.danger-panel .danger-hint {
  margin-top: 10px;
  color: #8f1f17;
  font-weight: 800;
}

.kill-switch-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #f1b7ae;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #fff7f5, #ffffff 50%, #edf8ff);
  box-shadow: var(--shadow);
}

.kill-switch-hero strong {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #8f1f17;
  background: #ffe5e1;
  white-space: nowrap;
}

.factory-reset-actions {
  display: grid;
  gap: 12px;
  align-content: start;
}

.factory-reset-form {
  display: grid;
  gap: 10px;
}

.factory-reset-form .field {
  margin: 0;
}

.danger-button {
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(135deg, #c0261c, #8f1f17);
  box-shadow: 0 8px 18px rgba(192, 38, 28, 0.16);
  font-weight: 800;
}

.danger-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(192, 38, 28, 0.22);
}

.compact-actions {
  margin-top: 10px;
}

.import-template-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}

.import-template-panel strong {
  display: block;
  margin-bottom: 4px;
}

.import-template-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.import-template-panel button {
  flex: 0 0 auto;
}

.sales-tag-helper {
  display: grid;
  gap: 6px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.sales-tag-helper span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.master-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.module-action-bar {
  position: sticky;
  top: 88px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 18px;
  padding: 10px;
  border: 1px solid #cfe4ed;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(49, 89, 111, 0.08);
}

.module-action-bar button {
  min-height: 38px;
  padding: 8px 12px;
  color: #1c3644;
  background: #eef7fb;
  border: 1px solid transparent;
  font-weight: 850;
  white-space: nowrap;
}

.module-action-bar button:hover {
  background: #e3f2ff;
  border-color: #bbd9ec;
  transform: translateY(-1px);
}

.module-action-bar button.active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  box-shadow: 0 8px 18px rgba(16, 135, 124, 0.16);
}

.module-tab-groups {
  display: grid;
  gap: 12px;
  margin: 16px 0 18px;
}

.module-tab-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dfe8ee;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f8fcfb);
}

.module-tab-group > strong {
  font-size: 14px;
}

.module-tab-group > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.module-tab-group .master-tabs {
  margin: 0;
}

.master-tabs button {
  min-height: 40px;
  padding: 9px 12px;
  color: var(--ink);
  background: #eef7fb;
  font-weight: 800;
}

.master-tabs button.active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  box-shadow: 0 8px 18px rgba(16, 135, 124, 0.18);
}

.editor-panel {
  margin-bottom: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.editor-panel h3 {
  margin-bottom: 16px;
}

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

.product-name-preview,
.feature-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.product-name-preview span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-name-preview strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.feature-section-heading {
  margin-bottom: 14px;
}

.feature-section-heading h4 {
  margin: 0 0 6px;
  font-size: 17px;
}

.feature-section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.inventory-form {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.document-form {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.panel > .document-form {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #dbe8ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.document-builder {
  display: grid;
  gap: 18px;
}

.transaction-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe8ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fffdf8 100%);
}

.transaction-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e7eef3;
}

.transaction-section-heading h3 {
  margin: 0;
  font-size: 17px;
}

.transaction-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.inline-create-card {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.inline-create-card summary {
  padding: 14px 16px;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 800;
}

.inline-create-card form {
  padding: 0 16px 16px;
}

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

.customer-picker-field {
  position: relative;
  grid-column: span 2;
}

.customer-search-cell {
  position: relative;
}

.customer-search-menu {
  width: min(560px, 92vw);
}

.create-search-option {
  border-top: 1px solid var(--line);
  background: #f8fbfb;
}

.quick-customer-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}

.quick-customer-panel strong {
  display: block;
  margin-bottom: 12px;
}

.quick-customer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
}

.quick-customer-grid label {
  display: grid;
  gap: 6px;
}

.quick-customer-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quick-customer-address {
  grid-column: 1 / -1;
}

.gst-details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

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

.line-builder {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  overflow: visible;
}

.line-builder-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #eefbf7, #fff8e8);
}

.line-builder-heading h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.line-builder-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.line-item-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  background: white;
  font-size: 13px;
}

.line-item-table th,
.line-item-table td {
  padding: 7px 6px;
  vertical-align: middle;
}

.line-item-table th {
  line-height: 1.15;
  white-space: normal;
}

.line-item-table select,
.line-item-table input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  background: white;
  font-size: 13px;
  line-height: 1.2;
}

.line-item-table th:nth-child(1),
.line-item-table td:nth-child(1) {
  width: 3.5%;
}

.line-item-table th:nth-child(2),
.line-item-table td:nth-child(2) {
  width: 29%;
}

.line-item-table th:nth-child(3),
.line-item-table td:nth-child(3) {
  width: 14%;
}

.line-item-table th:nth-child(4),
.line-item-table td:nth-child(4),
.line-item-table th:nth-child(5),
.line-item-table td:nth-child(5),
.line-item-table th:nth-child(7),
.line-item-table td:nth-child(7) {
  width: 5%;
}

.line-item-table th:nth-child(6),
.line-item-table td:nth-child(6),
.line-item-table th:nth-child(8),
.line-item-table td:nth-child(8),
.line-item-table th:nth-child(9),
.line-item-table td:nth-child(9),
.line-item-table th:nth-child(10),
.line-item-table td:nth-child(10) {
  width: 6.8%;
}

.line-item-table th:nth-child(11),
.line-item-table td:nth-child(11) {
  width: 4.7%;
}

.line-item-table td[data-line-taxable],
.line-item-table td[data-line-tax],
.line-item-table td[data-line-total] {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.product-search-cell {
  position: relative;
}

.product-search-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  width: min(420px, calc(100vw - 64px));
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.product-search-option {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 8px 10px;
  color: var(--ink);
  background: white;
  border-radius: 0;
  text-align: left;
}

.product-search-option strong {
  font-size: 13px;
}

.product-search-option:hover,
.product-search-option:focus-visible {
  background: #e9f4f2;
}

.product-search-option span,
.product-search-option small,
.product-search-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.product-search-empty {
  padding: 12px;
}

.line-number-cell {
  width: 42px;
  color: var(--muted);
  text-align: center;
}

.line-actions button {
  min-height: 36px;
  padding: 8px 10px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.line-product-detail {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.builder-footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 420px);
  gap: 18px;
  align-items: start;
}

.document-notes {
  grid-column: auto;
}

.live-totals {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbff;
}

.live-totals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.live-totals div:last-child {
  border-bottom: 0;
}

.live-totals span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.live-totals strong {
  font-size: 18px;
}

.live-totals .grand-total strong {
  font-size: 24px;
}

.post-option {
  width: max-content;
  padding-top: 0;
}

.empty-state {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.reorder-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reorder-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reorder-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.activity-list,
.ledger-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-row,
.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.activity-row span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.module-grid,
.customer-grid {
  display: grid;
  gap: 12px;
}

.module-card,
.customer-card {
  padding: 16px;
  box-shadow: none;
}

.module-card div,
.customer-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.module-card h3,
.customer-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.module-card span,
.customer-card span {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.module-card p,
.customer-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.customer-card strong {
  display: block;
  margin-top: 14px;
}

.customer-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.customer-card-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.customer-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.customer-detail-card {
  display: grid;
  gap: 12px;
}

.customer-card-head {
  align-items: start;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-actions button {
  padding: 8px 10px;
}

.customer-card-data {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.customer-card-data dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-card-data dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.search-box {
  width: min(360px, 100%);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.line-builder .table-wrap {
  overflow: visible;
  border: 0;
  border-radius: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.table-actions button,
.table-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  color: white;
  background: var(--blue);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.qty-in {
  color: #075f56;
  font-weight: 800;
}

.qty-out {
  color: #8f1f17;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  width: max-content;
  margin: 0;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.healthy {
  color: #085c4f;
  background: #dff5ee;
}

.status-pill.low {
  color: #7a4a08;
  background: #fff1d6;
}

.status-pill.out {
  color: #8f1f17;
  background: #ffe2df;
}

.status-pill.draft {
  color: #4b5563;
  background: #edf0f2;
}

.status-pill.sent,
.status-pill.posted,
.status-pill.partially-paid {
  color: #1e5a96;
  background: #e2effb;
}

.status-pill.converted,
.status-pill.paid {
  color: #085c4f;
  background: #dff5ee;
}

.document-preview {
  border-color: #c8d5d9;
  background: #fbfcfc;
}

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

.document-copy {
  padding: 18px;
  border: 1px solid #c8d5d9;
  border-radius: 8px;
  background: white;
}

.document-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.document-logo {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 8px;
  object-fit: contain;
  color: white;
  background: var(--accent);
  font-weight: 900;
}

.packing-list {
  background: #fbfcfc;
}

.copy-label {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #1e5a96;
  background: #e2effb;
  font-size: 12px;
  font-weight: 800;
}

.document-head,
.document-parties,
.document-totals,
.document-footer {
  display: grid;
  gap: 16px;
}

.document-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}

.document-head .eyebrow {
  margin-top: 0;
}

.document-head h2 {
  margin-bottom: 6px;
  font-size: 28px;
}

.document-head p,
.document-parties p {
  margin-bottom: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.document-head > div:last-child {
  display: grid;
  gap: 6px;
  min-width: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.document-parties {
  grid-template-columns: 1fr 1fr;
  margin: 18px 0;
}

.document-parties > div {
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.document-parties h3 {
  margin-bottom: 10px;
  font-size: 14px;
  text-transform: uppercase;
}

.document-preview table {
  min-width: 1120px;
  background: white;
}

.document-totals {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-top: 18px;
}

.payment-details {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfc;
}

.payment-details h3 {
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
}

.payment-details p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}

.document-totals span,
.document-footer span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.document-footer {
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

@media print {
  body.print-barcodes {
    background: #fff;
  }

  body.print-barcodes * {
    visibility: hidden;
  }

  body.print-barcodes .barcode-label-output,
  body.print-barcodes .barcode-label-output * {
    visibility: visible;
  }

  body.print-barcodes .barcode-label-output {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2mm;
    padding: 0;
  }

  body.print-barcodes .barcode-sticker {
    box-shadow: none;
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

@media (max-width: 1080px) {
  .ceo-health-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-grid,
  .readiness-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .metric-grid,
  .two-column,
  .banking-workspace,
  .setup-grid,
  .inventory-layout,
  .builder-meta-grid,
  .gst-details-grid,
  .builder-footer-grid,
  .document-parties,
  .document-footer,
  .banking-summary-strip,
  .crm-hero,
  .crm-kanban-board,
  .hrm-hero,
  .hrm-preview-grid,
  .hrm-compliance-overview,
  .source-assignment-grid,
  .lead-source-grid,
  .lead-source-fields {
    grid-template-columns: 1fr 1fr;
  }

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

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

@media (max-width: 820px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-context {
    min-height: 320px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: auto;
    max-height: 100vh;
    padding: 10px 12px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid #cfe4ed;
    box-shadow: 0 8px 22px rgba(49, 89, 111, 0.1);
  }

  .sidebar-brand {
    margin: 0;
    padding: 0;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .sidebar-mobile-body {
    display: none;
  }

  .sidebar.mobile-open .sidebar-mobile-body {
    display: flex;
    max-height: calc(100vh - 72px);
    margin-top: 14px;
    padding-right: 4px;
    overflow-y: auto;
  }

  .module-action-bar {
    position: static;
  }

  .workspace {
    margin-left: 0;
  }

  .topbar,
  .panel-heading,
  .transaction-section-heading,
  .line-builder-heading,
  .input-row,
  .topbar-actions,
  .user-chip {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid,
  .dashboard-chart-grid,
  .readiness-grid,
  .health-ratio-grid,
  .banking-workspace,
  .banking-summary-strip,
  .coverage-list,
  .two-column,
  .setup-grid,
  .inventory-layout,
  .builder-meta-grid,
  .gst-details-grid,
  .builder-footer-grid,
  .document-head,
  .document-parties,
  .document-totals,
  .document-footer,
  .crm-hero,
  .crm-hero-stats,
  .crm-call-guide,
  .crm-kanban-board,
  .danger-panel,
  .hrm-hero,
  .hrm-department-strip,
  .hrm-preview-grid,
  .hrm-compliance-overview,
  .source-assignment-grid {
    grid-template-columns: 1fr;
  }

  .kill-switch-hero {
    align-items: stretch;
    flex-direction: column;
  }

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

  .lead-source-grid,
  .lead-source-fields,
  .go-live-template-panel,
  .go-live-template-grid {
    grid-template-columns: 1fr;
  }

  .setup-overview {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .content-region,
  .topbar,
  .login-panel,
  .login-context {
    padding: 24px;
  }

  .topbar-search {
    min-width: 0;
    max-width: none;
  }

  .ceo-score-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .smart-tool-card {
    flex-direction: column;
  }
}
