:root {
  color-scheme: dark;
  --bg: #0f1923;
  --bg-deep: #091018;
  --panel: #162332;
  --panel-2: #1e2f40;
  --panel-3: #24384b;
  --gold: #c9a84c;
  --gold-2: #e3c66e;
  --text: #f3ead4;
  --body: #d9e1e7;
  --muted: #8fa3b8;
  --line: rgba(201, 168, 76, 0.22);
  --line-soft: rgba(255, 255, 255, 0.08);
  --green: #70d18a;
  --red: #ff897d;
  --amber: #f4c96b;
  --fs-xs: 10px;
  --fs-sm: 11px;
  --fs-base: 12px;
  --fs-lg: 14px;
  --fs-xl: 18px;
  --fs-hero: 24px;
}

[hidden] {
  display: none !important;
}

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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100vw;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  background: linear-gradient(180deg, #0f1923 0%, #101b27 48%, #0b1119 100%);
  color: var(--body);
  font: 13px/1.42 "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

body.nav-collapsed {
  grid-template-columns: 56px minmax(0, 1fr);
}

body.teller-connect-shell {
  grid-template-columns: 1fr;
  background:
    radial-gradient(circle at 50% 42%, rgba(201, 168, 76, 0.1), transparent 22rem),
    linear-gradient(180deg, #101b27 0%, #0b141e 58%, #070d14 100%);
}

html.teller-public-route body {
  grid-template-columns: 1fr;
}

html.teller-public-route body:not(.teller-connect-shell) {
  background:
    radial-gradient(circle at 50% 42%, rgba(201, 168, 76, 0.1), transparent 22rem),
    linear-gradient(180deg, #101b27 0%, #0b141e 58%, #070d14 100%);
}

html.teller-public-route body:not(.teller-connect-shell) .sidebar,
html.teller-public-route body:not(.teller-connect-shell) .app-header {
  display: none;
}

html.teller-public-route body:not(.teller-connect-shell) main {
  min-height: 100vh;
  padding: 0;
}

body.teller-connect-shell .sidebar,
body.teller-connect-shell .app-header {
  display: none;
}

body.teller-connect-shell main {
  min-height: 100vh;
  padding: 0;
  display: grid;
  place-items: center;
}

body.teller-connect-shell #pageRoot {
  width: min(620px, calc(100vw - 32px));
}

body.app-loading::before {
  content: "";
  position: fixed;
  z-index: 121;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-2), var(--green), transparent);
  background-size: 220% 100%;
  animation: app-loading-sweep 1.05s ease-in-out infinite;
  box-shadow: 0 0 18px rgba(227, 198, 110, 0.28);
  display: none;
}

body.nav-collapsed.app-loading::before {
  left: 72px;
}

.app-loading-status {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 46%, rgba(201, 168, 76, 0.12), transparent 26%),
    rgba(7, 12, 18, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  backdrop-filter: blur(3px);
}

body.nav-collapsed .app-loading-status {
  left: 0;
}

body.app-loading .app-loading-status {
  opacity: 1;
  pointer-events: auto;
}

.app-loading-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 158px;
  min-height: 46px;
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 35, 50, 0.98), rgba(11, 18, 27, 0.98));
  color: var(--text);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  transform: translateY(4px) scale(0.98);
  transition: transform 0.16s ease;
}

.app-modal-backdrop {
  position: fixed;
  z-index: 180;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 10, 16, 0.74);
  padding: 18px;
  backdrop-filter: blur(4px);
}

.app-notice-host {
  position: fixed;
  z-index: 210;
  top: 14px;
  right: 14px;
  display: grid;
  gap: 8px;
  width: min(380px, calc(100vw - 28px));
  pointer-events: none;
}

.app-notice {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: start;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(201, 168, 76, 0.13), transparent 42%),
    linear-gradient(180deg, rgba(22, 35, 50, 0.98), rgba(8, 16, 24, 0.98));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.045) inset;
  padding: 10px 10px 10px 12px;
  pointer-events: auto;
  animation: notice-enter 0.18s ease-out;
}

.app-notice::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gold-2);
}

.app-notice.success::before {
  background: var(--green);
}

.app-notice.warning::before {
  background: var(--amber);
}

.app-notice.error::before {
  background: var(--red);
}

.app-notice.is-leaving {
  animation: notice-leave 0.18s ease-in forwards;
}

.app-notice-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 8px;
  background: rgba(201, 168, 76, 0.11);
  color: var(--gold-2);
}

.app-notice.success .app-notice-icon {
  border-color: rgba(112, 209, 138, 0.32);
  background: rgba(112, 209, 138, 0.12);
  color: var(--green);
}

.app-notice.warning .app-notice-icon {
  border-color: rgba(244, 201, 107, 0.34);
  background: rgba(244, 201, 107, 0.12);
  color: var(--amber);
}

.app-notice.error .app-notice-icon {
  border-color: rgba(255, 137, 125, 0.34);
  background: rgba(255, 137, 125, 0.12);
  color: var(--red);
}

.app-notice-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding-top: 1px;
}

.app-notice-copy strong {
  color: var(--text);
  font-size: var(--fs-base);
  line-height: 1.2;
}

.app-notice-copy p {
  margin: 0;
  color: var(--body);
  font-size: var(--fs-base);
  line-height: 1.35;
}

.app-notice-close {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.app-notice-close:hover {
  color: var(--text);
}

.app-modal {
  width: min(500px, 100%);
  border: 1px solid rgba(201, 168, 76, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 35, 50, 0.98), rgba(8, 16, 24, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
}

.app-modal header,
.app-modal footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.app-modal header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 34px;
}

.app-modal header {
  border-bottom: 1px solid var(--line-soft);
}

.app-modal footer {
  border-top: 1px solid var(--line-soft);
  justify-content: space-between;
}

.app-modal header span {
  color: #9eb2c4;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.app-modal h2 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: var(--fs-lg);
}

.app-modal-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 8px;
  background: rgba(201, 168, 76, 0.1);
  color: var(--gold-2);
}

.app-modal-mark.danger {
  border-color: rgba(255, 137, 125, 0.34);
  background: rgba(255, 137, 125, 0.12);
  color: var(--red);
}

.app-modal-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.app-modal-body p {
  margin: 0;
  color: var(--muted);
}

.client-info-modal {
  width: min(620px, calc(100vw - 28px));
}

.client-info-form {
  display: grid;
  gap: 16px;
}

.client-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.72fr);
  gap: 14px;
}

.client-info-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.client-info-field input,
.client-info-field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(4, 9, 14, 0.72);
  color: var(--text);
  padding: 9px 10px;
}

.client-info-field input:focus,
.client-info-field textarea:focus {
  outline: none;
  border-color: rgba(201, 168, 76, 0.68);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

.client-info-field small {
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.45;
}

.bank-feed-history-option {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.bank-feed-history-option input,
.bank-feed-history-inline input {
  width: auto;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  accent-color: var(--gold);
}

.bank-feed-history-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  color: var(--text);
  font-size: var(--fs-sm);
}

.client-info-status {
  color: var(--muted);
}

.client-info-toggle {
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.client-info-toggle span {
  display: grid;
  gap: 3px;
  color: var(--text);
}

.client-info-toggle strong {
  font-size: var(--fs-sm);
}

.client-info-toggle small {
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.35;
}

.client-info-page {
  max-width: 760px;
}

.client-info-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.client-info-page-head h2 {
  margin: 3px 0 5px;
  font-size: var(--fs-xl);
}

.client-info-page-head p {
  margin: 0;
  color: var(--muted);
}

.client-info-page-form {
  max-width: 640px;
}

.client-info-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 4px;
}

@media (max-width: 620px) {
  .client-info-grid {
    grid-template-columns: 1fr;
  }

  .client-info-page-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.bank-reconnect-account-list {
  width: min(360px, 100%);
  margin: 4px auto 10px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.bank-reconnect-account-list li {
  border: 1px solid rgba(201, 168, 76, 0.26);
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
}

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

.billing-confirm-grid span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(8, 16, 24, 0.42);
  padding: 10px;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.billing-confirm-grid strong {
  color: var(--text);
  font-size: var(--fs-lg);
}

.danger-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 137, 125, 0.42);
  border-radius: 8px;
  background: rgba(255, 137, 125, 0.13);
  color: #ffd0ca;
  font-weight: 700;
  padding: 0 13px;
}

.app-loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(227, 198, 110, 0.22);
  border-top-color: var(--gold-2);
  border-right-color: var(--green);
  animation: spin 0.72s linear infinite;
}

body.app-loading .app-loading-card {
  transform: translateY(0) scale(1);
}

@keyframes app-loading-sweep {
  0% {
    background-position: 160% 0;
  }
  100% {
    background-position: -60% 0;
  }
}

@keyframes notice-enter {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes notice-leave {
  to {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}

body.auth-body {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 50% 16%, rgba(201, 168, 76, 0.11), transparent 30%),
    linear-gradient(180deg, #101b27 0%, #0b1119 100%);
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.auth-shell {
  width: min(410px, 100%);
  display: block;
}

.auth-panel {
  border: 1px solid rgba(201, 168, 76, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(30, 47, 64, 0.98), rgba(18, 30, 43, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  padding: 28px;
  display: grid;
  gap: 16px;
}

.auth-logo {
  width: 142px;
  height: auto;
  display: block;
  margin: 0 auto 4px;
}

.auth-copy {
  text-align: center;
}

.auth-copy h1 {
  margin-bottom: 5px;
  font-size: 22px;
  line-height: 1.2;
}

.auth-copy p:not(.eyebrow) {
  margin-bottom: 0;
  font-size: 13px;
}

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

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(6, 10, 15, 0.68);
  color: var(--text);
  padding: 0 10px;
}

.auth-form button {
  width: 100%;
  min-height: 40px;
}

.auth-warning,
.auth-error {
  border: 1px solid rgba(244, 201, 107, 0.32);
  border-radius: 7px;
  background: rgba(244, 201, 107, 0.08);
  padding: 9px 10px;
}

.auth-error {
  border-color: rgba(255, 137, 125, 0.32);
  background: rgba(255, 137, 125, 0.08);
}

.auth-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}

.auth-meta span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(6, 10, 15, 0.3);
  padding: 4px 8px;
}

.auth-doc-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.auth-doc-links a,
.public-doc-grid a {
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 8px;
  background: rgba(6, 10, 15, 0.28);
  color: var(--text);
  text-decoration: none;
  padding: 9px 10px;
  font-weight: 800;
  display: grid;
  justify-items: center;
  text-align: center;
}

.auth-doc-links a:hover,
.public-doc-grid a:hover {
  border-color: rgba(201, 168, 76, 0.46);
  background: rgba(201, 168, 76, 0.08);
}

.auth-small-link {
  color: var(--gold-2);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.docs-shell {
  width: min(720px, 100%);
}

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

.public-doc-grid strong,
.public-doc-grid span {
  display: block;
  text-align: center;
  width: 100%;
}

.public-doc-grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

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

button,
.button-link {
  position: relative;
  min-height: 32px;
  border: 1px solid rgba(201, 168, 76, 0.46);
  border-radius: 7px;
  background: var(--gold);
  color: #080b0d;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transform: translateY(0) scale(1);
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease,
    opacity 0.16s ease,
    transform 0.14s ease;
  will-change: transform;
}

button:hover,
.button-link:hover {
  background: var(--gold-2);
  border-color: rgba(227, 198, 110, 0.74);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.055) inset;
  transform: translateY(-1px);
}

button:active,
.button-link:active {
  transform: translateY(0) scale(0.985);
  transition-duration: 0.06s;
}

button:focus-visible,
.button-link:focus-visible {
  outline: 2px solid rgba(227, 198, 110, 0.72);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

button.button-link:disabled,
.button-link[aria-disabled="true"] {
  background: rgba(201, 168, 76, 0.78);
  border-color: rgba(201, 168, 76, 0.46);
  color: #080b0d;
  opacity: 0.9;
}

button.button-link:disabled svg,
.button-link[aria-disabled="true"] svg {
  color: #080b0d;
  stroke: #080b0d;
}

button[aria-busy="true"],
button.is-loading {
  cursor: default;
  opacity: 0.86;
  border-color: rgba(112, 209, 138, 0.42);
  box-shadow: 0 0 0 1px rgba(112, 209, 138, 0.14) inset, 0 0 18px rgba(112, 209, 138, 0.1);
}

button[aria-busy="true"]::after,
button.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(112, 209, 138, 0.16), transparent);
  transform: translateX(-120%);
  animation: button-loading-sheen 1.05s ease-in-out infinite;
  pointer-events: none;
}

button svg,
a svg,
button .app-icon,
a .app-icon {
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  display: inline-block;
  flex: 0 0 15px;
  transition: transform 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

button:hover svg,
button:hover .app-icon,
.button-link:hover svg,
.button-link:hover .app-icon {
  transform: translateY(-1px) scale(1.06);
}

.secondary {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(201, 168, 76, 0.22);
  color: var(--text);
}

.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.secondary.is-loading {
  border-color: rgba(112, 209, 138, 0.42);
  background: rgba(112, 209, 138, 0.09);
}

.secondary.copy-confirmed {
  position: relative;
  overflow: hidden;
  border-color: rgba(112, 209, 138, 0.62);
  background: rgba(112, 209, 138, 0.14);
  color: #d8ffe2;
  animation: copy-confirm-pop 0.26s ease-out;
}

.secondary.copy-confirmed::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(112, 209, 138, 0.22), transparent);
  transform: translateX(-120%);
  animation: copy-confirm-sheen 0.82s ease-out;
  pointer-events: none;
}

.secondary.copy-confirmed svg {
  color: var(--green);
  animation: copy-check-in 0.22s ease-out;
}

.icon-button {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

button.is-loading svg,
button.is-loading .app-icon {
  opacity: 0.96;
  animation: button-loading-pulse 0.82s ease-in-out infinite;
}

button.is-loading[data-loading-motion="spin"] svg,
button.is-loading[data-loading-motion="spin"] .app-icon {
  animation: spin 0.82s linear infinite;
}

button.is-loading span {
  animation: button-label-pulse 0.92s ease-in-out infinite;
}

#connectBankAccountBtn,
#connectFirstBankAccountBtn {
  min-width: 148px;
}

@keyframes button-loading-sheen {
  to {
    transform: translateX(120%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes button-loading-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-1px) scale(1.08);
  }
}

@keyframes button-label-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

@keyframes copy-confirm-pop {
  0% {
    transform: translateY(0) scale(1);
  }
  55% {
    transform: translateY(-1px) scale(1.025);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes copy-confirm-sheen {
  to {
    transform: translateX(120%);
  }
}

@keyframes copy-check-in {
  from {
    transform: scale(0.72);
    opacity: 0.45;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  button,
  .button-link,
  button svg,
  a svg {
    transition: none;
  }

  button:hover,
  .button-link:hover,
  button:active,
  .button-link:active,
  button:hover svg,
  .button-link:hover svg {
    transform: none;
  }

  button[aria-busy="true"]::after,
  button.is-loading::after,
  button.is-loading svg,
  button.is-loading .app-icon,
  button.is-loading span {
    animation: none;
  }

  .secondary.copy-confirmed,
  .secondary.copy-confirmed::after,
  .secondary.copy-confirmed svg,
  .app-notice,
  .app-notice.is-leaving {
    animation: none;
  }
}

.danger {
  border-color: rgba(255, 137, 125, 0.35);
  color: #ffd2cc;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 8px;
  border-right: 1px solid var(--line);
  background: rgba(7, 11, 16, 0.86);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand {
  min-height: 56px;
  display: flex;
  align-items: flex-start;
  padding: 0 0 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.3);
}

.brand img {
  width: 126px;
  height: auto;
  display: block;
}

.brand-logo-mark {
  display: none !important;
}

.sidebar-toggle {
  margin-top: auto;
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(143, 163, 184, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  border-color: rgba(201, 168, 76, 0.42);
  color: var(--text);
  outline: none;
}

.sidebar-toggle svg {
  width: 17px;
  height: 17px;
}

nav {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

nav a {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 7px;
  padding: 7px 9px;
  font-weight: 720;
}

.nav-count-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 91, 91, 0.18);
  color: #ffb9b9;
  box-shadow: inset 0 0 0 1px rgba(232, 91, 91, 0.38);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

nav a:hover {
  background: rgba(35, 56, 74, 0.58);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(143, 163, 184, 0.12);
}

nav a.active {
  background: linear-gradient(180deg, rgba(41, 60, 77, 0.82), rgba(23, 35, 48, 0.82));
  color: var(--text);
  box-shadow: inset 3px 0 0 rgba(227, 198, 110, 0.86), inset 0 0 0 1px rgba(143, 163, 184, 0.16);
}

nav a.active svg,
nav a.active .app-icon {
  color: var(--gold-2);
}

nav a.nav-auth-link {
  margin-top: auto;
  border-top: 1px solid rgba(143, 163, 184, 0.16);
  border-radius: 0 0 7px 7px;
  color: #d9e4ee;
}

nav svg {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  flex-basis: 16px;
}

nav .app-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  flex: 0 0 16px;
}

.eyebrow,
.panel-kicker,
.table-head,
.field-label {
  margin: 0;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.eyebrow {
  font-size: 13px;
}

.client-nav-context {
  margin: -2px 0 0 30px;
  padding: 6px 8px;
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 7px;
  background: rgba(201, 168, 76, 0.07);
  display: grid;
  gap: 2px;
}

.client-nav-context span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.client-nav-context strong {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-nav-submenu {
  margin: -1px 0 4px 18px;
  padding: 3px 0 3px 12px;
  border-left: 1px solid rgba(143, 163, 184, 0.18);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

nav a.client-nav-link {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 760;
  background: rgba(9, 16, 24, 0.2);
}

nav a.client-nav-link.active {
  box-shadow: inset 2px 0 0 rgba(227, 198, 110, 0.86), inset 0 0 0 1px rgba(143, 163, 184, 0.14);
}

body.nav-collapsed .sidebar {
  padding-inline: 10px;
  align-items: center;
}

body.nav-collapsed .brand {
  width: 100%;
  justify-content: center;
  min-height: 52px;
  padding: 0 0 12px;
  margin-bottom: 4px;
}

body.nav-collapsed .brand-logo-full {
  display: none !important;
}

body.nav-collapsed .brand-logo-mark {
  width: 34px;
  height: 34px;
  display: block !important;
  border-radius: 8px;
}

body.nav-collapsed .sidebar-toggle,
body.nav-collapsed nav,
body.nav-collapsed nav a {
  width: 38px;
}

body.nav-collapsed nav a {
  min-height: 36px;
  justify-content: center;
  padding: 0;
  position: relative;
}

body.nav-collapsed nav a span,
body.nav-collapsed .client-nav-context {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body.nav-collapsed .nav-count-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 7px;
  width: 7px;
  height: 7px;
  padding: 0;
  overflow: hidden;
  color: transparent;
}

body.nav-collapsed .client-nav-submenu {
  width: 38px;
  margin: 0;
  padding: 0;
  border-left: 0;
  gap: 7px;
}

body.nav-collapsed nav svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex-basis: 18px;
}

body.nav-collapsed nav .app-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex-basis: 18px;
}

main {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  padding: 18px;
}

.impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  margin: -18px -18px 18px;
  padding: 9px 18px;
  border-bottom: 1px solid rgba(244, 201, 107, 0.36);
  background: rgba(76, 52, 18, 0.96);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.impersonation-banner div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.impersonation-banner span {
  color: #f7dfa2;
}

.app-header {
  min-height: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

body.client-scoped .app-header {
  min-height: 54px;
  justify-content: flex-start;
  align-items: flex-start;
}

body.client-scoped .app-header > div:first-child {
  display: none;
}

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

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

h1 {
  margin-bottom: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

h1[hidden] {
  display: none;
}

h2 {
  margin-bottom: 3px;
  color: var(--text);
  font-size: 16px;
}

h3 {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 14px;
}

p {
  color: var(--muted);
}

.header-actions,
.toolbar,
.table-actions,
.button-row,
.tabs,
.doc-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.panel,
.drawer-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(34, 56, 76, 0.94), rgba(22, 35, 50, 0.94));
}

.panel {
  padding: 12px;
  min-width: 0;
  max-width: 100%;
}

.panel + .panel,
.page-grid + .panel,
.panel + .page-grid {
  margin-top: 10px;
}

.selected-row {
  background: rgba(201, 168, 76, 0.08);
}

.bank-feed-statement-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.bank-feed-statement-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}

.bank-feed-statement-chip div {
  min-width: 0;
}

.bank-feed-statement-chip strong,
.bank-feed-statement-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statement-upload-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.statement-upload-card {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
}

.statement-upload-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.statement-upload-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.statement-upload-head strong,
.statement-upload-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statement-upload-actions,
.statement-check-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.statement-check-list {
  display: grid;
  gap: 6px;
}

.statement-check-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) auto minmax(180px, 1.1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(6, 10, 15, 0.28);
  padding: 8px;
}

.statement-check-main,
.statement-check-match {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.statement-check-main strong,
.statement-check-main span,
.statement-check-match span,
.statement-check-match small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statement-check-empty {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 750;
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  padding: 8px;
}

.statements-page {
  display: grid;
  gap: 10px;
}

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

.statement-account-card {
  display: grid;
  gap: 10px;
}

.statement-account-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.statement-account-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.statement-account-head strong,
.statement-account-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statement-list {
  display: grid;
  gap: 6px;
}

.statement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(6, 10, 15, 0.32);
  padding: 8px;
}

.statement-row .button-row {
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.statement-row > div:not(.button-row) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.statement-row strong,
.statement-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .statement-upload-head,
  .statement-check-row {
    grid-template-columns: 1fr;
  }

  .statement-upload-actions,
  .statement-check-status {
    justify-content: flex-start;
  }
}

.bank-feed-row-action-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1.2;
}

.bank-feed-row-action-note i {
  width: 14px;
  height: 14px;
}

.bank-feed-review-row {
  display: grid;
  grid-template-columns: 86px minmax(220px, 1.8fr) 110px minmax(140px, 0.9fr) minmax(110px, 0.7fr) minmax(210px, auto);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(9, 16, 24, 0.34);
  padding: 10px;
}

.bank-feed-review-row.selected,
.bank-feed-review-row:hover {
  border-color: rgba(227, 198, 110, 0.42);
}

.bank-feed-row-date,
.bank-feed-row-description,
.bank-feed-row-status,
.bank-feed-row-match {
  min-width: 0;
}

.bank-feed-row-description strong,
.bank-feed-row-match strong {
  display: block;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-feed-row-description span,
.bank-feed-row-status small,
.bank-feed-row-match span {
  display: block;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-feed-row-status .danger-text {
  color: #fca5a5;
}

.bank-feed-transfer-match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.bank-feed-transfer-match span {
  min-width: 0;
  white-space: normal;
}

.bank-feed-transfer-confidence {
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(143, 163, 184, 0.22);
  background: rgba(143, 163, 184, 0.1);
  color: var(--text);
  font-size: 10px;
  line-height: 1.1;
  text-transform: uppercase;
}

.bank-feed-transfer-confidence.high {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(74, 222, 128, 0.1);
  color: #bbf7d0;
}

.bank-feed-transfer-confidence.medium,
.bank-feed-transfer-confidence.manual {
  border-color: rgba(227, 198, 110, 0.34);
  background: rgba(201, 168, 76, 0.12);
  color: #f7edd1;
}

.bank-feed-transfer-warn {
  color: #f8d17a;
  font-style: normal;
}

.bank-feed-row-amount {
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.money-in {
  color: var(--green);
}

.money-out {
  color: var(--red);
}

.bank-feed-row-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.bank-feed-row-actions button {
  min-height: 32px;
  width: 100%;
  white-space: nowrap;
}

.bank-feed-detail-drawer {
  position: fixed;
  z-index: 88;
  top: 0;
  right: 0;
  width: min(460px, 100vw);
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid rgba(201, 168, 76, 0.32);
  background: linear-gradient(180deg, rgba(22, 35, 50, 0.99), rgba(8, 14, 21, 0.99));
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.42);
  padding: 16px;
}

.bank-feed-detail-drawer header,
.bank-feed-detail-drawer footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bank-feed-detail-drawer h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 20px;
}

.bank-feed-detail-drawer header span,
.bank-feed-detail-drawer small {
  color: var(--muted);
}

.bank-feed-detail-drawer .drawer-block {
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(9, 16, 24, 0.28);
  padding: 12px;
}

.bank-feed-detail-drawer .drawer-block strong {
  display: block;
  color: var(--text);
  margin-top: 2px;
}

.bank-feed-detail-drawer label {
  display: grid;
  gap: 6px;
}

.bank-feed-detail-drawer footer {
  position: sticky;
  bottom: 0;
  margin: 16px -16px -16px;
  padding: 12px 16px;
  background: rgba(8, 14, 21, 0.96);
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .bank-feed-review-row {
    grid-template-columns: 82px minmax(180px, 1fr) 110px minmax(180px, auto);
  }

  .bank-feed-row-status,
  .bank-feed-row-match {
    grid-column: span 1;
  }

  .bank-feed-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .bank-feed-review-row {
    grid-template-columns: 1fr;
  }

  .bank-feed-row-amount {
    text-align: left;
  }

  .bank-feed-detail-drawer {
    width: 100vw;
  }
}

.bank-feed-modal-backdrop {
  position: fixed;
  z-index: 92;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 9, 14, 0.68);
  padding: 20px;
}

.bank-feed-ledger-modal {
  width: min(560px, 100%);
  border: 1px solid rgba(201, 168, 76, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 35, 50, 0.98), rgba(10, 17, 25, 0.98));
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.48);
  padding: 14px;
}

.bank-feed-ledger-modal header,
.bank-feed-ledger-modal footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bank-feed-ledger-modal header {
  margin-bottom: 14px;
}

.bank-feed-ledger-modal h2 {
  margin: 0 0 2px;
}

.bank-feed-ledger-modal header span {
  color: var(--muted);
}

.bank-feed-ledger-form {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.bank-feed-ledger-form label {
  display: grid;
  gap: 6px;
}

.bank-feed-picker {
  margin-bottom: 10px;
}

.bank-feed-picker-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.bank-feed-picker-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(9, 16, 24, 0.28);
  padding: 10px;
}

.bank-feed-picker-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

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

.bank-feed-picker-row small,
.bank-feed-picker-row em {
  color: var(--muted);
  font-style: normal;
}

.teller-connect-result {
  max-width: 560px;
  margin: 16vh auto 0;
  text-align: center;
}

.teller-account-picker {
  max-width: 520px;
  margin: 12vh auto 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  background: var(--surface, #0f1722);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.teller-account-picker svg {
  width: 34px;
  height: 34px;
  color: var(--gold-2);
}

.teller-account-picker h2 {
  margin: 8px 0 2px;
  color: var(--text);
}

.teller-account-picker p {
  margin: 0 0 8px;
  max-width: 36rem;
  color: var(--muted);
}

.teller-account-pick-list {
  width: 100%;
  display: grid;
  gap: 8px;
  margin: 8px 0 12px;
  text-align: left;
}

.teller-account-pick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.teller-account-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.teller-account-pick:hover {
  border-color: var(--gold-2);
}

.teller-account-pick input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.teller-account-pick-main {
  display: grid;
  gap: 2px;
}

.teller-account-pick-main span {
  font-size: 13px;
  color: var(--muted);
}

body.teller-connect-shell .teller-connect-result {
  margin: 0 auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.teller-connect-result svg {
  width: 36px;
  height: 36px;
  color: var(--gold-2);
}

.teller-connect-result h2 {
  margin: 12px 0 4px;
  color: var(--text);
}

body.teller-connect-shell .teller-connect-result h2 {
  margin: 16px 0 6px;
  color: var(--text);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.06;
  letter-spacing: 0;
}

body.teller-connect-shell .teller-connect-result p {
  margin: 0 auto;
  max-width: 32rem;
  color: #a9bbcc;
  font-size: 18px;
  font-weight: 650;
}

.teller-public-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 52px;
}

.teller-public-brand img {
  width: 184px;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.22));
}

.teller-public-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border: 1px solid rgba(227, 198, 110, 0.34);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-2);
  background: rgba(201, 168, 76, 0.1);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22), 0 0 0 10px rgba(201, 168, 76, 0.035);
}

.teller-public-icon svg {
  width: 32px;
  height: 32px;
  color: var(--gold-2);
  stroke-width: 1.9;
}

.teller-connect-primary {
  min-height: 60px;
  margin-top: 30px;
  padding: 0 28px;
  border-radius: 8px;
  gap: 11px;
  color: #071018;
  font-size: 18px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}

.teller-connect-primary svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  color: #071018;
  stroke: #071018;
  opacity: 0.92;
}

.teller-connect-primary:hover svg {
  color: #071018;
  stroke: #071018;
}

.teller-connect-spinner {
  display: inline-block;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(225, 183, 93, 0.22);
  border-top-color: var(--gold-2);
  border-radius: 50%;
  animation: teller-connect-spin 0.8s linear infinite;
}

.teller-connect-fallback {
  display: none;
  margin-top: 18px;
}

.teller-connect-fallback.is-visible {
  display: block;
}

.teller-connect-fallback p {
  margin: 0 0 10px;
  color: var(--muted);
}

@keyframes teller-connect-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .teller-connect-spinner {
    animation-duration: 1.6s;
  }
}

.bank-feed-platform-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.bank-feed-platform-head > button {
  align-self: center;
}

.bank-feed-account-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.bank-feed-account-card {
  min-height: 190px;
  text-align: left;
  border: 1px solid rgba(143, 163, 184, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(30, 47, 64, 0.96), rgba(15, 25, 35, 0.96));
  color: var(--body);
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.bank-feed-card-main,
.bank-feed-card-footer,
.bank-feed-transaction-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.bank-feed-card-main > div {
  min-width: 0;
}

.bank-feed-account-card:hover,
.bank-feed-account-card.active {
  border-color: rgba(227, 198, 110, 0.62);
  box-shadow: 0 0 0 1px rgba(227, 198, 110, 0.16) inset;
}

.bank-feed-account-card strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.bank-feed-account-card span,
.bank-feed-account-card small {
  color: var(--muted);
}

.bank-feed-card-balance {
  display: grid;
  gap: 6px;
  width: 100%;
}

.bank-feed-balance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  width: 100%;
}

.bank-feed-balance-row span {
  font-size: 11px;
}

.bank-feed-balance-row strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.bank-feed-balance-row.variance {
  border-top: 1px solid rgba(143, 163, 184, 0.18);
  padding-top: 6px;
}

.bank-feed-balance-row.variance strong {
  color: var(--gold);
}

.bank-feed-card-footer {
  align-items: center;
}

.bank-feed-card-footer small {
  text-align: right;
  max-width: 58%;
}

.bank-feed-reconnect-banner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid rgba(248, 113, 113, 0.34);
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.18);
}

.bank-feed-reconnect-banner > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.bank-feed-reconnect-banner strong {
  color: var(--text);
}

.bank-feed-reconnect-banner small {
  color: var(--muted);
}

.bank-feed-reconnect-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bank-feed-card-counts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
}

.bank-feed-card-counts span {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(9, 16, 24, 0.28);
  padding: 3px 7px;
  font-size: 11px;
  color: var(--body);
}

.bank-feed-card-menu {
  flex: 0 0 auto;
}

.bank-feed-card-menu .row-menu-panel {
  min-width: 220px;
}

.bank-feed-card-menu .row-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bank-feed-card-kicker {
  color: var(--gold-2) !important;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.bank-feed-transaction-head {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.bank-feed-transaction-head strong,
.bank-feed-ledger-modal h2 {
  color: var(--text);
}

.bank-feed-queue-tab strong {
  color: var(--text);
}

.bank-feed-queue-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  white-space: nowrap;
}

.bank-feed-queue-tab {
  appearance: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.bank-feed-queue-tab span {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
}

.bank-feed-queue-tab strong {
  font-size: 12px;
  font-weight: 900;
}

.bank-feed-queue-tab.active {
  background: rgba(214, 166, 91, 0.16);
  border-color: rgba(214, 166, 91, 0.62);
  color: var(--text);
}

.bank-feed-queue-tab:focus-visible {
  outline: 2px solid rgba(214, 166, 91, 0.55);
  outline-offset: 2px;
}

.bank-feed-review-list {
  display: grid;
  gap: 8px;
}

.bank-feed-platform-head .bank-feed-account-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 20px) / 3);
  grid-template-columns: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 4px;
}

.bank-feed-platform-head .bank-feed-account-card {
  scroll-snap-align: start;
}

.bank-feed-empty-panel {
  min-height: 280px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.bank-feed-empty-panel h2 {
  margin: 4px 0;
  color: var(--text);
}

.bank-feed-empty-panel p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
}

.bank-feed-transactions-panel {
  margin-top: 10px;
}

.bank-feed-transaction-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  min-width: min(100%, max-content);
}

.bank-feed-transaction-tools .search {
  min-width: 0;
  width: 260px;
}

.bank-feed-legacy-toggle {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 7px;
  white-space: nowrap;
}

.bank-feed-legacy-toggle span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

#bankFeedPostSelected:disabled,
#bankFeedPostSelected:disabled span,
#bankFeedPostSelected:disabled svg {
  color: #080b0d !important;
  opacity: 1;
  stroke: #080b0d;
}

.bank-feed-autopilot-summary {
  display: grid;
  gap: 4px;
}

.bank-feed-autopilot-summary span,
.bank-feed-autopilot-summary small {
  color: var(--muted);
  font-size: 12px;
}

.bank-feed-autopilot-modal {
  width: min(760px, 100%);
}

.bank-feed-autopilot-modal .app-modal-body {
  gap: 16px;
}

.bank-feed-autopilot-controls {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px 12px;
  flex-wrap: wrap;
}

.bank-feed-autopilot-controls .compact-input {
  width: 100%;
}

.bank-feed-autopilot-controls .button-link,
.bank-feed-autopilot-controls .secondary {
  flex: 0 0 auto;
}

.bank-feed-autopilot-summary small {
  display: block;
  margin-top: 4px;
}

#bankFeedAutopilotPost,
#bankFeedAutopilotPost span,
#bankFeedAutopilotPost svg {
  color: #080b0d;
  stroke: #080b0d;
}

#bankFeedAutopilotPost:disabled,
#bankFeedAutopilotPost:disabled span,
#bankFeedAutopilotPost:disabled svg {
  color: #080b0d !important;
  opacity: 1;
  stroke: #080b0d;
}

.compact-toggle {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.bank-feed-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bank-feed-slider input {
  width: 96px;
}

.compact-input,
.compact-select {
  min-height: 38px;
  width: auto;
}

.input {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(6, 10, 15, 0.68);
  color: var(--text);
  padding: 0 10px;
}

.compact-input {
  max-width: 150px;
}

.setting-chip {
  min-height: 38px;
  display: grid;
  grid-template-columns: auto minmax(54px, 1fr);
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(6, 10, 15, 0.58);
}

.setting-chip span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.setting-chip .compact-input {
  min-height: 28px;
  height: 28px;
  max-width: none;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 800;
  text-align: right;
  padding: 0 7px;
}

.money-chip {
  min-width: 164px;
}

.setting-chip .currency-input {
  width: 82px;
}

.setting-chip .count-input {
  width: 48px;
}

.compact-select {
  max-width: 150px;
}

input[type="date"].compact-input {
  color-scheme: dark;
  height: 38px;
  appearance: none;
}

input[type="date"].compact-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.82;
  filter: invert(92%) sepia(12%) saturate(531%) hue-rotate(352deg) brightness(104%) contrast(91%);
}

.bank-feed-platform-table {
  gap: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: visible;
}

.bank-feed-platform-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(82px, 0.5fr) minmax(180px, 1.25fr) minmax(96px, 0.55fr) minmax(170px, 1fr) minmax(120px, 0.75fr) minmax(104px, 0.55fr);
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 10px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(9, 16, 24, 0.26);
}

.bank-feed-platform-row:has(.bank-feed-category-menu[open]) {
  z-index: 20;
}

.bank-feed-select-cell {
  display: grid;
  place-items: center;
}

.bank-feed-select-cell input {
  accent-color: var(--gold);
}

.bank-feed-platform-row:last-child {
  border-bottom: 0;
}

.bank-feed-platform-row:hover:not(.bank-feed-platform-row-head) {
  background: rgba(201, 168, 76, 0.055);
}

.bank-feed-platform-row-head {
  min-height: 36px;
  background: rgba(6, 10, 15, 0.38);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.bank-feed-category-cell {
  min-width: 0;
}

.bank-feed-category-menu {
  position: relative;
  width: 100%;
}

.bank-feed-category-readonly {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 7px;
  background: rgba(6, 10, 15, 0.18);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bank-feed-category-readonly svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  stroke-width: 2.2;
}

.bank-feed-category-readonly span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-feed-category-menu summary::-webkit-details-marker {
  display: none;
}

.bank-feed-category-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  min-height: 38px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid rgba(201, 168, 76, 0.26);
  border-radius: 7px;
  border-color: rgba(201, 168, 76, 0.26);
  background: linear-gradient(180deg, rgba(23, 32, 43, 0.96), rgba(11, 17, 24, 0.98));
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.bank-feed-category-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-feed-category-trigger span.muted {
  color: var(--muted);
}

.bank-feed-category-trigger svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
  transition: transform 0.16s ease;
}

.bank-feed-category-menu[open] .bank-feed-category-trigger {
  border-color: rgba(201, 168, 76, 0.72);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

.bank-feed-category-menu[open] .bank-feed-category-trigger svg {
  transform: rotate(180deg);
}

.bank-feed-category-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  width: min(360px, 80vw);
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(201, 168, 76, 0.24);
  border-radius: 8px;
  background: #0b1118;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chart-account-menu,
.rules-category-menu,
.select-menu {
  width: 100%;
}

.chart-account-trigger,
.rules-category-menu .bank-feed-category-trigger,
.select-menu-trigger {
  min-height: 42px;
}

.chart-account-panel,
.rules-category-panel,
.select-menu-panel {
  left: 0;
  right: auto;
  width: 100%;
  min-width: min(420px, 100%);
}

.bank-feed-ledger-modal .chart-account-panel {
  z-index: 96;
}

.rules-category-panel {
  width: min(420px, 82vw);
}

.toolbar-select-menu {
  min-width: 140px;
}

.toolbar-select-menu .select-menu-panel {
  min-width: 180px;
}

.rules-form .select-menu-panel,
.rules-toolstrip .select-menu-panel,
.filters .select-menu-panel {
  z-index: 44;
}

.chart-account-option small:empty,
.rules-category-panel small:empty {
  display: none;
}

.bank-feed-category-group + .bank-feed-category-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bank-feed-category-group-label {
  padding: 4px 8px 6px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bank-feed-category-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.bank-feed-category-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 780;
}

.bank-feed-category-option small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.bank-feed-category-option:hover,
.bank-feed-category-option.selected {
  background: rgba(201, 168, 76, 0.12);
  color: #f7edd1;
}

.bank-feed-category-option.clear {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bank-feed-category-option.clear:hover {
  color: var(--text);
}

.button-link.small,
button.small {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

@media (max-width: 1120px) {
  .bank-feed-autopilot-controls {
    justify-content: flex-start;
  }

  .bank-feed-platform-head .bank-feed-account-cards {
    grid-auto-columns: calc((100% - 10px) / 2);
  }

  .bank-feed-platform-row {
    grid-template-columns: 34px 82px minmax(180px, 1fr) 104px;
  }

  .bank-feed-platform-row-head {
    display: none;
  }

  .bank-feed-category-cell {
    grid-column: 3 / -1;
  }

  .bank-feed-row-status,
  .bank-feed-row-actions {
    grid-column: 3 / -1;
  }

  .bank-feed-row-actions {
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .bank-feed-platform-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-feed-platform-head > button {
    display: none;
  }

  .bank-feed-platform-head .bank-feed-account-cards {
    grid-auto-columns: 88%;
  }

  .bank-feed-platform-row {
    grid-template-columns: 1fr;
  }

  .bank-feed-category-cell,
  .bank-feed-row-status,
  .bank-feed-row-actions {
    grid-column: auto;
  }
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-head p {
  margin-bottom: 0;
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 10px;
}

.client-filter-row {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  width: 100%;
  gap: 10px;
  align-items: center;
}

.readiness-band {
  border: 1px solid rgba(244, 201, 107, 0.2);
  border-radius: 8px;
  background: rgba(244, 201, 107, 0.07);
  padding: 10px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.readiness-band div {
  display: grid;
  gap: 2px;
}

.readiness-band strong {
  color: var(--text);
}

.readiness-band span {
  color: var(--muted);
  font-size: 13px;
}

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

.filters.client-filter-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  width: 100%;
  align-items: center;
}

.search,
select {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(6, 10, 15, 0.68);
  color: var(--text);
}

.search {
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
}

.client-search {
  width: 100%;
  min-width: 0;
  height: 42px;
  border-color: rgba(201, 168, 76, 0.26);
  background: linear-gradient(180deg, rgba(23, 32, 43, 0.96), rgba(11, 17, 24, 0.98));
}

.client-search svg {
  color: var(--gold);
  width: 17px;
  height: 17px;
}

.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.client-integration-filters {
  display: inline-flex;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.client-integration-filter {
  min-width: 84px;
  min-height: 42px;
  padding: 0 12px;
}

.client-integration-filter img {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  display: block;
}

.client-integration-filter.active {
  border-color: rgba(201, 168, 76, 0.78);
  background: rgba(201, 168, 76, 0.16);
  color: var(--gold-2);
  box-shadow: inset 0 0 0 1px rgba(201, 168, 76, 0.22);
}

select {
  padding: 0 9px;
}

.input,
.rules-form input:not([type="checkbox"]) {
  min-height: 38px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(6, 10, 15, 0.68);
  color: var(--text);
  padding: 0 9px;
}

textarea,
input[readonly] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(6, 10, 15, 0.52);
  color: var(--text);
  padding: 9px 10px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

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

table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 9px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: rgba(6, 10, 15, 0.42);
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
}

.table-sort-button:hover,
.table-sort-button:focus-visible {
  color: var(--gold-2);
}

.table-sort-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

tr:last-child td {
  border-bottom: 0;
}

td strong {
  color: var(--text);
}

td small,
.muted,
.activity span,
.job-status,
.doc-card span {
  color: var(--muted);
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
}

.pill.good {
  color: var(--green);
  background: rgba(112, 209, 138, 0.12);
}

.pill.warn {
  color: var(--amber);
  background: rgba(244, 201, 107, 0.12);
}

.pill.money-in {
  color: #70d18a;
  background: rgba(112, 209, 138, 0.13);
}

.pill.money-out {
  color: #f4c96b;
  background: rgba(244, 201, 107, 0.13);
}

.pill.bad {
  color: var(--red);
  background: rgba(255, 137, 125, 0.12);
}

.client-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.client-link:hover {
  color: var(--gold-2);
}

.client-row {
  cursor: pointer;
}

.client-row:hover td {
  background: rgba(201, 168, 76, 0.055);
}

.client-switcher {
  position: relative;
  width: min(560px, 100%);
  min-width: 340px;
  color: var(--text);
  z-index: 18;
}

.client-switcher-field {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(201, 168, 76, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(10, 17, 25, 0.94), rgba(6, 10, 15, 0.94));
  color: var(--text);
  padding: 0 13px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.client-switcher-field:hover,
.client-switcher-field:focus-within,
.client-switcher.open .client-switcher-field {
  border-color: rgba(227, 198, 110, 0.62);
  background: linear-gradient(180deg, rgba(23, 37, 51, 0.96), rgba(12, 19, 27, 0.96));
  color: var(--text);
  outline: none;
  transform: none;
}

.client-switcher-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  outline: none;
  appearance: none;
}

.client-switcher-input::placeholder {
  color: var(--muted);
}

.client-switcher-input::-webkit-search-decoration,
.client-switcher-input::-webkit-search-cancel-button {
  appearance: none;
}

.client-menu-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-switcher-field svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--gold-2);
}

.client-switcher-field svg:first-child {
  color: var(--muted);
}

.client-switcher-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  width: 100%;
  max-height: min(420px, calc(100vh - 190px));
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(201, 168, 76, 0.38);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 25, 35, 0.99), rgba(7, 11, 16, 0.99));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  display: none;
  z-index: 40;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 168, 76, 0.5) rgba(255, 255, 255, 0.05);
}

.client-switcher.open .client-switcher-menu {
  display: grid;
  gap: 4px;
}

.client-menu-option {
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--body);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 780;
  text-align: left;
  cursor: pointer;
}

.client-menu-option:hover,
.client-menu-option:focus-visible,
.client-menu-option.focused {
  border-color: rgba(201, 168, 76, 0.24);
  background: rgba(35, 56, 74, 0.72);
  color: var(--text);
  outline: none;
}

.client-menu-option.active {
  border-color: rgba(201, 168, 76, 0.34);
  background: rgba(42, 53, 50, 0.78);
  color: var(--text);
}

.client-menu-option.active:hover,
.client-menu-option.active:focus-visible {
  border-color: rgba(201, 168, 76, 0.42);
  background: rgba(45, 63, 78, 0.88);
  color: var(--text);
}

.client-menu-option svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.client-switcher-empty {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.client-switcher-empty[hidden] {
  display: none;
}

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

.table-pager,
.table-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-pager {
  justify-content: flex-end;
  margin-top: 10px;
}

.table-summary {
  justify-content: space-between;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.table-pager span {
  color: var(--muted);
  min-width: 80px;
  text-align: center;
}

.dashboard-overview-panel,
.firm-settings-panel {
  display: grid;
  gap: 14px;
}

.dashboard-workspace {
  display: grid;
  gap: 10px;
}

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

.dashboard-queue-panel {
  display: grid;
  gap: 10px;
}

.dashboard-queue-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.dashboard-search {
  max-width: 520px;
}

.dashboard-clean-toggle {
  min-height: 34px;
  justify-content: center;
  white-space: nowrap;
}

.dashboard-queue-summary {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(143, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(8, 16, 24, 0.28);
  color: var(--muted);
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
}

.dashboard-queue-summary strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dashboard-work-table {
  display: grid;
  gap: 6px;
}

.dashboard-work-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.05fr) minmax(170px, 0.78fr) 96px minmax(300px, 1.28fr) minmax(250px, 0.9fr);
  gap: 14px;
  align-items: center;
  min-height: 64px;
  border: 1px solid rgba(143, 163, 184, 0.13);
  border-radius: 8px;
  background: rgba(8, 16, 24, 0.24);
  padding: 10px;
}

.dashboard-work-row:not(.dashboard-work-row-head) {
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.dashboard-work-row:not(.dashboard-work-row-head):hover {
  border-color: rgba(201, 168, 76, 0.4);
  background: rgba(201, 168, 76, 0.07);
  transform: translateY(-1px);
}

.dashboard-work-row.clean {
  opacity: 0.76;
}

.dashboard-work-row-head {
  min-height: 34px;
  border-color: rgba(201, 168, 76, 0.18);
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-work-row-head span:nth-child(3),
.dashboard-work-row-head span:nth-child(5) {
  text-align: center;
}

.dashboard-client-cell,
.dashboard-account-cell,
.dashboard-next-cell {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.dashboard-account-cell {
  padding-right: 8px;
}

.dashboard-client-cell strong,
.dashboard-account-row strong,
.dashboard-transaction-main strong {
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-client-cell span,
.dashboard-account-cell span,
.dashboard-account-cell small,
.dashboard-next-cell span,
.dashboard-account-row span,
.dashboard-transaction-main span,
.dashboard-drawer small,
.dashboard-drawer p {
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-account-cell span,
.dashboard-account-cell small,
.dashboard-next-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-status-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.dashboard-status-cell .pill,
.dashboard-drawer-summary .pill {
  margin-right: 0;
}

.dashboard-work-count {
  display: grid;
  justify-items: center;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.dashboard-work-count strong {
  color: var(--text);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.dashboard-next-cell {
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  justify-self: stretch;
}

.dashboard-next-cell span {
  text-align: center;
}

.dashboard-empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed rgba(143, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(8, 16, 24, 0.24);
  color: var(--muted);
  text-align: center;
}

.dashboard-empty-state i,
.dashboard-drawer-empty i {
  color: var(--green);
  width: 30px;
  height: 30px;
}

.dashboard-empty-state strong,
.dashboard-drawer-empty strong {
  color: var(--text);
  font-size: 15px;
}

.dashboard-drawer-backdrop {
  position: fixed;
  z-index: 86;
  inset: 0;
  background: rgba(5, 10, 16, 0.54);
}

.dashboard-drawer {
  position: fixed;
  z-index: 88;
  top: 0;
  right: 0;
  width: min(920px, calc(100vw - 72px));
  min-width: min(760px, calc(100vw - 72px));
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  border-left: 1px solid rgba(201, 168, 76, 0.32);
  background: linear-gradient(180deg, rgba(22, 35, 50, 0.99), rgba(8, 14, 21, 0.99));
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.42);
  padding: 16px;
}

.dashboard-drawer header,
.dashboard-drawer-block-head,
.dashboard-account-row {
  display: flex;
  gap: 10px;
}

.dashboard-drawer header {
  align-items: flex-start;
  justify-content: space-between;
}

.dashboard-drawer-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-drawer h2 {
  margin: 2px 0 2px;
  font-size: 20px;
}

.dashboard-drawer header span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-drawer-summary,
.dashboard-drawer-block {
  border: 1px solid rgba(143, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(8, 16, 24, 0.28);
  padding: 10px 12px;
}

.dashboard-drawer-summary {
  display: grid;
  gap: 6px;
}

.dashboard-drawer-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.dashboard-drawer-summary p {
  margin: 0;
}

.dashboard-drawer-block {
  display: grid;
  align-content: start;
  gap: 8px;
}

.dashboard-drawer-block:has(.dashboard-transaction-list) {
  padding: 8px 12px 10px;
}

.dashboard-drawer-block-head {
  align-items: center;
  justify-content: space-between;
}

.dashboard-drawer-block-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-drawer-block-head strong {
  color: var(--text);
}

.dashboard-drawer-block-actions > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dashboard-drawer-block-actions button span,
.dashboard-drawer-block-actions .button-link span {
  color: inherit;
}

.dashboard-account-list,
.dashboard-transaction-list {
  display: grid;
  gap: 6px;
}

.dashboard-transaction-list {
  gap: 4px;
}

.dashboard-account-row {
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(143, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
}

.dashboard-account-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-transaction-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(500px, 1.35fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(143, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(9, 16, 24, 0.38);
  padding: 8px 10px;
  min-width: 0;
  min-height: 62px;
}

.dashboard-transaction-left,
.dashboard-transaction-controls,
.dashboard-category-select,
.dashboard-transaction-status,
.dashboard-transaction-actions {
  min-width: 0;
}

.dashboard-transaction-left {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  align-self: center;
  min-height: 30px;
}

.dashboard-transaction-select {
  width: 26px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dashboard-transaction-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.dashboard-transaction-select input:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.dashboard-transaction-controls {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(128px, auto) minmax(134px, auto);
  gap: 8px;
  align-items: end;
  align-self: center;
}

.dashboard-transaction-main,
.dashboard-category-select {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-category-select {
  grid-template-rows: 12px 30px;
}

.dashboard-transaction-main strong {
  line-height: 1.15;
}

.dashboard-transaction-main span {
  line-height: 1.2;
}

.dashboard-transaction-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-transaction-amount {
  align-self: center;
  text-align: right;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transform: translateY(1px);
}

.dashboard-category-select > span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-transaction-status {
  display: flex;
  align-items: center;
  min-height: 30px;
}

.dashboard-transaction-status .pill,
.dashboard-account-row .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  max-width: 100%;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}

.dashboard-transaction-status .pill {
  width: 100%;
  padding-inline: 10px;
}

.dashboard-transaction-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.dashboard-transaction-actions button,
.dashboard-transaction-actions .button-link {
  width: 100%;
  min-height: 30px;
  white-space: nowrap;
  justify-content: center;
}

.dashboard-category-menu {
  width: 100%;
}

.dashboard-category-hold-note {
  width: 100%;
  min-height: 30px;
  border: 1px solid rgba(143, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(16, 27, 39, 0.72);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 760;
}

.dashboard-category-hold-note svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
  flex: 0 0 14px;
}

.dashboard-category-trigger {
  min-height: 30px;
  height: 30px;
  border-radius: 8px;
  background: #101b27;
  padding: 0 9px;
}

.dashboard-category-trigger span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-category-panel {
  z-index: 96;
  width: min(360px, 72vw);
  max-height: 340px;
}

.dashboard-drawer-empty {
  min-height: 170px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .dashboard-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-work-row {
    grid-template-columns: minmax(180px, 1fr) minmax(210px, 1fr) 74px;
  }

  .dashboard-work-row-head span:nth-child(4),
  .dashboard-work-row-head span:nth-child(5),
  .dashboard-account-cell,
  .dashboard-next-cell {
    grid-column: 1 / -1;
  }

  .dashboard-transaction-row {
    grid-template-columns: 1fr;
  }

  .dashboard-transaction-controls {
    grid-template-columns: minmax(180px, 1fr) minmax(126px, auto) minmax(132px, auto);
  }
}

@media (max-width: 760px) {
  .dashboard-metric-grid,
  .dashboard-queue-toolbar,
  .dashboard-work-row,
  .dashboard-transaction-row {
    grid-template-columns: 1fr;
  }

  .dashboard-search {
    max-width: none;
  }

  .dashboard-work-row-head {
    display: none;
  }

  .dashboard-work-count,
  .dashboard-transaction-amount {
    justify-items: start;
    text-align: left;
  }

  .dashboard-next-cell {
    grid-template-columns: 1fr;
  }

  .dashboard-drawer {
    width: 100vw;
    min-width: 0;
    padding: 14px;
  }

  .dashboard-transaction-left,
  .dashboard-transaction-controls {
    grid-template-columns: 1fr;
  }

  .dashboard-transaction-left,
  .dashboard-transaction-status,
  .dashboard-transaction-actions {
    padding-top: 0;
  }

  .dashboard-transaction-amount {
    justify-self: start;
  }

  .dashboard-transaction-status,
  .dashboard-transaction-actions {
    width: 100%;
  }
}

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

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

.metric-card {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(143, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(8, 16, 24, 0.32);
  padding: 12px;
}

.metric-card span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.metric-card small {
  color: var(--muted);
  font-size: 11px;
}

.settings-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.settings-section-header h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 16px;
}

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

.connection-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.connection-icon img {
  width: 26px;
  height: 26px;
  display: block;
  border-radius: 6px;
}

.connection-icon span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 137, 125, 0.11);
  order: -1;
}

.connection-icon.connected span {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(112, 209, 138, 0.13);
}

.table-link-button.muted {
  cursor: default;
}

#clientTable th:not(:first-child),
#clientTable td:not(:first-child) {
  text-align: center;
}

#clientTable table {
  min-width: 0;
  table-layout: fixed;
}

#clientTable th:first-child,
#clientTable td:first-child {
  min-width: 0;
  white-space: normal;
}

#clientTable .client-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

#clientTable th:last-child,
#clientTable td:last-child {
  width: 86px;
  max-width: 86px;
  padding-left: 10px;
  padding-right: 10px;
}

#clientTable .table-actions {
  justify-content: center;
}

#clientTable .data-table {
  max-width: 100%;
  overflow-x: clip;
  overflow-y: visible;
}

.financial-cell {
  min-width: 112px;
  display: grid;
  justify-items: center;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.financial-cell strong {
  color: var(--text);
  font-size: 13px;
}

.financial-cell small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
  white-space: normal;
}

.financial-cell.unavailable {
  justify-items: center;
  text-align: center;
}

.financial-cell.unavailable strong {
  color: var(--amber);
  font-size: 12px;
}

.rules-page {
  display: grid;
  gap: 10px;
}

.rules-layout {
  display: grid;
  gap: 10px;
}

.rules-match-cell {
  min-width: 0;
}

.rules-row-actions,
.rules-quick-actions,
.rules-form-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rules-row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.rules-row-actions .danger-action {
  color: #f6a7a0;
  border-color: rgba(239, 126, 115, 0.28);
}

.rules-row-actions .danger-action:hover:not(:disabled) {
  color: #ffd0cc;
  border-color: rgba(239, 126, 115, 0.5);
  background: rgba(239, 126, 115, 0.08);
}

.rules-table-panel h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 17px;
}

.rules-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(126px, 0.72fr)) minmax(180px, 1fr);
  gap: 9px;
  align-items: end;
}

.rules-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rules-form .rules-category-field {
  grid-column: span 2;
  min-width: 0;
}

.rules-toggle {
  min-height: 36px;
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 8px !important;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(9, 16, 24, 0.26);
  padding: 8px 9px;
  color: var(--body);
  font-weight: 760;
}

.rules-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--gold);
}

.rules-form-actions {
  align-self: end;
  justify-content: flex-end;
  padding-top: 0;
  min-width: 0;
}

.rules-form-actions > span {
  display: none;
}

.rules-editor-modal {
  width: min(1040px, calc(100vw - 34px));
}

.rules-editor-modal .app-modal-body {
  padding-top: 10px;
}

.rules-editor-modal .rules-form {
  grid-template-columns: minmax(240px, 1.25fr) repeat(3, minmax(130px, 0.7fr));
}

.rules-editor-modal .rules-name-field,
.rules-editor-modal .rules-category-field {
  grid-column: span 2;
}

.rules-conflict-modal-note {
  margin: 0 16px 4px;
  padding: 10px 12px;
  border: 1px solid rgba(232, 91, 91, 0.26);
  border-radius: 8px;
  background: rgba(232, 91, 91, 0.08);
  display: grid;
  gap: 3px;
}

.rules-conflict-modal-note strong {
  color: #ffd6d6;
  font-size: 13px;
}

.rules-conflict-modal-note span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.rules-conflict-account-list {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex-wrap: wrap;
}

.rules-conflict-account-list.compact {
  margin-top: 4px;
  gap: 4px;
  max-height: 52px;
  overflow: hidden;
}

.rules-conflict-account-chip {
  min-width: 0;
  max-width: 220px;
  padding: 5px 7px;
  border: 1px solid rgba(232, 91, 91, 0.24);
  border-radius: 7px;
  background: rgba(9, 16, 24, 0.28);
  display: grid;
  gap: 1px;
}

.rules-conflict-account-chip strong,
.rules-conflict-account-chip small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rules-conflict-account-chip strong {
  color: var(--text);
  font-size: 12px;
}

.rules-conflict-account-chip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.rules-conflict-account-list.compact .rules-conflict-account-chip {
  max-width: 150px;
  padding: 3px 6px;
}

.rules-conflict-account-list.compact .rules-conflict-account-chip strong {
  font-size: 11px;
}

.rules-conflict-account-list.compact .rules-conflict-account-chip small {
  font-size: 9px;
}

.rules-conflict-empty {
  color: var(--muted);
  font-size: 12px;
}

.rules-conflict-band {
  border-color: rgba(232, 91, 91, 0.28);
  background: linear-gradient(180deg, rgba(58, 29, 33, 0.62), rgba(22, 29, 36, 0.72));
}

.rules-conflict-band strong {
  color: #ffd6d6;
}

.rules-conflict-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.rules-toolstrip {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(130px, auto) minmax(130px, auto) auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

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

.rules-toolstrip .rules-quick-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.rules-quick-actions button {
  white-space: nowrap;
}

.rules-review-filter {
  min-height: 36px;
  white-space: nowrap;
}

.rules-review-filter.active,
.rules-review-filter[aria-pressed="true"] {
  color: #ffd6d6;
  border-color: rgba(232, 91, 91, 0.34);
  background: rgba(232, 91, 91, 0.1);
}

.rules-platform-table {
  --rules-table-columns: minmax(170px, 1.02fr) minmax(200px, 1.22fr) minmax(180px, 1.04fr) minmax(126px, 0.58fr) minmax(112px, 0.46fr) minmax(128px, auto);
  display: grid;
  gap: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
}

.rules-platform-row {
  display: grid;
  grid-template-columns: var(--rules-table-columns);
  column-gap: 18px;
  row-gap: 6px;
  align-items: center;
  min-height: 74px;
  padding: 10px 20px 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(9, 16, 24, 0.26);
}

.rules-platform-row:last-child {
  border-bottom: 0;
}

.rules-platform-row:hover:not(.rules-platform-row-head) {
  background: rgba(201, 168, 76, 0.055);
}

.rules-platform-row-conflict {
  background: rgba(232, 91, 91, 0.055);
  box-shadow: inset 3px 0 0 rgba(232, 91, 91, 0.72);
}

.rules-platform-row-conflict:hover:not(.rules-platform-row-head) {
  background: rgba(232, 91, 91, 0.085);
}

.rules-platform-row-head {
  min-height: 36px;
  background: rgba(6, 10, 15, 0.38);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.rules-platform-row-head span,
.rules-sort-button {
  min-width: 0;
}

.rules-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.rules-sort-button:hover,
.rules-sort-button:focus-visible,
.rules-sort-button.active {
  color: var(--text);
}

.rules-sort-button:focus-visible {
  outline: 2px solid rgba(201, 168, 76, 0.44);
  outline-offset: 3px;
  border-radius: 4px;
}

.rules-sort-button svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: var(--gold);
  opacity: 0.72;
}

.rules-sort-button:not(.active) svg {
  opacity: 0.42;
}

.rules-platform-row-head > :nth-child(4),
.rules-platform-row-head span:nth-child(6),
.rules-state-cell,
.rules-row-actions {
  justify-self: center;
}

.rules-platform-row-head > :nth-child(5),
.rules-history-cell {
  justify-self: center;
  text-align: right;
}

.rules-platform-row-head > :nth-child(5) {
  justify-content: center;
}

.rules-name-cell,
.rules-match-cell,
.rules-category-cell,
.rules-history-cell,
.rules-state-cell {
  min-width: 0;
}

.rules-name-cell strong,
.rules-match-cell strong,
.rules-category-cell strong,
.rules-history-cell strong {
  display: block;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rules-name-cell span,
.rules-match-cell span,
.rules-category-cell span,
.rules-history-cell span {
  display: block;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rules-state-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  text-align: center;
}

.rules-history-cell {
  font-variant-numeric: tabular-nums;
  min-width: 96px;
  padding-right: 4px;
}

.rules-row-actions {
  min-width: 116px;
  padding-left: 2px;
}

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

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

.logs-day-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
}

.logs-day-toolbar > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.logs-day-toolbar > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.logs-day-toolbar .secondary {
  min-height: 32px;
  padding: 7px 10px;
}

.logs-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.logs-day-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  padding: 12px 14px;
  list-style: none;
}

.logs-day-summary::-webkit-details-marker,
.logs-event summary::-webkit-details-marker {
  display: none;
}

.logs-day-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.logs-day[open] > .logs-day-summary::after {
  transform: rotate(225deg);
}

.logs-day-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.logs-day-date {
  color: var(--text);
  font-weight: 850;
}

.logs-day-count,
.logs-load-older > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.logs-day-events {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.logs-event {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logs-event:last-child {
  border-bottom: 0;
}

.logs-event,
.logs-event summary {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.logs-event summary {
  cursor: pointer;
  list-style: none;
}

.logs-event.expandable {
  display: block;
  padding: 0;
}

.logs-event-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.12);
}

.logs-event-icon svg {
  width: 15px;
  height: 15px;
}

.logs-event-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.logs-event-main strong,
.logs-event-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logs-event-main span,
.logs-event-time {
  color: var(--muted);
  font-size: 12px;
}

.logs-event-time {
  font-variant-numeric: tabular-nums;
}

.logs-event-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.logs-event-detail {
  margin: 0 14px 12px 52px;
  padding: 10px 12px;
  border-left: 2px solid rgba(201, 168, 76, 0.38);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.14);
}

.logs-event-detail p {
  margin: 0 0 8px;
}

.logs-event-detail dl {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}

.logs-event-detail div {
  display: grid;
  gap: 2px;
}

.logs-event-detail dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.logs-event-detail dd {
  margin: 0;
  color: var(--text);
  font-size: 12px;
}

.logs-load-older {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 8px;
}

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

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

.backup-action-panel,
.backup-status-header,
.backup-action-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.backup-action-panel p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 720px;
}

.backup-action-controls {
  flex-shrink: 0;
}

.backup-action-controls > span {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.backup-status-panel {
  display: grid;
  gap: 16px;
}

.backup-status-header h2 {
  margin: 2px 0 0;
  font-size: 1.15rem;
}

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

.backup-summary div {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-subtle);
}

.backup-summary span,
.backup-browser-toolbar strong {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.backup-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 0.98rem;
}

.backup-browser {
  display: grid;
  gap: 12px;
}

.backup-derived {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 8px;
  background: rgba(8, 19, 29, 0.32);
}

.backup-browser-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 360px) auto;
  align-items: end;
  gap: 12px;
}

.backup-derived-toolbar {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
}

.backup-derived-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.segmented-control button,
.segmented-control a {
  min-height: 32px;
  min-width: 48px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.segmented-control button.active,
.segmented-control a.active {
  background: rgba(201, 168, 76, 0.18);
  color: var(--text);
}

.backup-view-switch {
  justify-self: start;
}

.backup-derived-date {
  display: grid;
  gap: 4px;
  min-width: 138px;
}

.backup-derived-date span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.backup-derived-date .input {
  min-height: 32px;
  padding: 6px 9px;
}

.backup-derived-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.backup-derived-presets button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(201, 168, 76, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.backup-derived-presets button.active {
  border-color: rgba(201, 168, 76, 0.72);
  background: rgba(201, 168, 76, 0.16);
  color: var(--text);
}

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

.backup-derived-summary div {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--surface-subtle);
}

.backup-derived-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.backup-derived-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.backup-derived-summary strong.negative {
  color: #f87171;
}

.backup-derived-table {
  min-width: 780px;
}

.backup-derived-section-row td {
  background: rgba(201, 168, 76, 0.08);
}

.backup-derived-account strong,
.backup-derived-account span {
  display: block;
}

.backup-derived-account span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.backup-browser-toolbar > div > span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 4px;
}

.backup-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 0 10px;
}

.backup-search i {
  color: var(--muted);
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.backup-search .input {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-inline: 0;
  width: 100%;
}

.backup-drill-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(201, 168, 76, 0.26);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(201, 168, 76, 0.08);
}

.backup-drill-banner strong,
.backup-drill-banner span {
  display: block;
}

.backup-drill-banner span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.backup-gl-table {
  min-width: 1180px;
}

.backup-gl-table th:first-child,
.backup-gl-table td:first-child {
  width: 280px;
}

.backup-path {
  color: var(--muted);
  font-size: 0.84rem;
}

.backup-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

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

.financials-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  overflow: visible;
}

.financials-controls,
.financials-actions,
.financials-basis-toggle {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.financials-controls label {
  display: grid;
  gap: 6px;
  min-width: 176px;
}

.financials-menu-field {
  min-width: 190px;
}

.financials-menu {
  width: 100%;
}

.financials-menu-trigger {
  min-width: 190px;
}

.financials-menu-panel {
  right: auto;
  left: 0;
  width: min(380px, 88vw);
}

.financials-menu-option small {
  text-align: right;
}

.financials-controls select.input {
  min-height: 38px;
  height: 38px;
  min-width: 176px;
  border-color: rgba(148, 163, 184, 0.16);
  background-color: rgba(6, 10, 15, 0.72);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(226, 184, 92, 0.95) 50%),
    linear-gradient(135deg, rgba(226, 184, 92, 0.95) 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 16px,
    calc(100% - 10px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  padding: 0 32px 0 10px;
  appearance: none;
}

.financials-controls select.input:hover {
  border-color: rgba(227, 184, 92, 0.38);
  background-color: rgba(12, 20, 29, 0.86);
}

.financials-controls select.input:focus,
.financials-controls select.input:focus-visible {
  border-color: rgba(227, 184, 92, 0.72);
  box-shadow: 0 0 0 3px rgba(227, 184, 92, 0.14), inset 0 0 0 1px rgba(227, 184, 92, 0.16);
  outline: 0;
}

.financials-controls select.input option {
  background: #101b28;
  color: var(--text);
}

.financials-controls input[type="date"].input {
  min-height: 38px;
  height: 38px;
  min-width: 150px;
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(6, 10, 15, 0.72);
  color: var(--text);
  color-scheme: dark;
  font-weight: 700;
}

.financials-controls input[type="date"].input:hover,
.financials-controls input[type="date"].input:focus {
  border-color: rgba(227, 184, 92, 0.5);
  outline: 0;
}

.financials-controls label.is-hidden {
  display: none;
}

.financials-run-custom {
  align-self: end;
  min-height: 38px;
}

.financials-basis-toggle {
  align-items: center;
}

.financials-basis-toggle .active {
  border-color: rgba(227, 184, 92, 0.72);
  color: var(--gold);
  background: rgba(227, 184, 92, 0.12);
}

.financials-actions {
  justify-content: flex-end;
}

.financials-freshness,
.financials-status {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.financials-status {
  color: var(--gold);
}

.financials-branding-modal {
  width: min(720px, calc(100vw - 28px));
}

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

.financials-branding-form label {
  display: grid;
  gap: 6px;
}

.financials-branding-form textarea.input {
  min-height: 82px;
  resize: vertical;
}

.financials-branding-address,
.financials-branding-logo {
  grid-column: 1 / -1;
}

.financials-branding-check {
  align-items: center;
  display: flex !important;
  flex-direction: row;
  gap: 8px !important;
}

.financials-branding-check input {
  accent-color: var(--gold);
}

.financials-empty-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.financials-empty-panel h2,
.financials-report-title h2 {
  margin: 0;
}

.financials-empty-panel p:not(.eyebrow) {
  color: var(--muted);
  margin: 7px 0 0;
}

.financials-report-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.financials-stale-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(227, 184, 92, 0.44);
  background: rgba(227, 184, 92, 0.12);
  color: #f5d58d;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.financials-stale-banner span {
  color: var(--muted);
}

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

.financials-report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.financials-report-table {
  table-layout: fixed;
}

.financials-report-table th,
.financials-report-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
  padding: 10px 12px;
  vertical-align: top;
}

.financials-report-table th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.025);
}

.financials-report-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.financials-report-table .align-left {
  text-align: left;
}

.financials-report-table .align-center {
  text-align: center;
}

.financials-report-table .summary-row td {
  border-top: 1px solid rgba(227, 184, 92, 0.28);
  font-weight: 800;
  color: var(--text);
}

.financials-report-table .negative {
  color: #f87171;
}

.financials-report-table .lvl-1 {
  padding-left: 26px;
}

.financials-report-table .lvl-2 {
  padding-left: 42px;
}

.financials-report-table .lvl-3 {
  padding-left: 58px;
}

@media (max-width: 720px) {
  .backup-action-panel,
  .backup-status-header,
  .backup-action-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-action-controls .button-link {
    justify-content: center;
    width: 100%;
  }

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

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

  .backup-browser-toolbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .backup-browser-toolbar .secondary,
  .backup-search {
    width: 100%;
  }

  .backup-browser-toolbar .secondary {
    justify-content: center;
  }

  .backup-drill-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-derived-toolbar,
  .backup-derived-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-derived-actions .segmented-control,
  .backup-derived-actions .backup-derived-date,
  .backup-derived-actions .secondary {
    width: 100%;
  }

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

  .backup-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-pagination > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .financials-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    justify-content: stretch;
    gap: 12px;
  }

  .financials-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    width: 100%;
  }

  .financials-controls .financials-menu-field {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .financials-custom-field {
    min-width: 0;
  }

  .financials-menu-trigger,
  .financials-controls input[type="date"].input {
    width: 100%;
    min-width: 0;
  }

  .financials-run-custom {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }

  .financials-basis-toggle {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .financials-basis-toggle .secondary {
    justify-content: center;
    width: 100%;
  }

  .financials-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    justify-content: stretch;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.13);
  }

  .financials-status {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .financials-freshness {
    min-width: 0;
    white-space: normal;
  }

  .financials-actions #financialsResync {
    justify-self: end;
  }

  .financials-actions #financialsBranding,
  .financials-actions #financialsDownloadPdf {
    justify-content: center;
  }

  .financials-branding-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .financials-table-wrap {
    overflow-x: visible;
  }

  .financials-report-table {
    min-width: 0;
  }

  .financials-report-table th,
  .financials-report-table td {
    padding: 9px 8px;
  }

  .financials-report-table th:first-child,
  .financials-report-table td:first-child {
    width: 64%;
    overflow-wrap: anywhere;
  }

  .financials-report-table th:not(:first-child),
  .financials-report-table td:not(:first-child) {
    width: 36%;
  }

  .financials-report-table .lvl-1 {
    padding-left: 14px;
  }

  .financials-report-table .lvl-2 {
    padding-left: 24px;
  }

  .financials-report-table .lvl-3 {
    padding-left: 34px;
  }
}

@media (max-width: 1120px) {
  .rules-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rules-form .rules-name-field,
  .rules-form .rules-category-field {
    grid-column: span 2;
  }

  .rules-toolstrip {
    grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(130px, auto)) auto;
  }

  .rules-toolstrip .rules-quick-actions {
    grid-column: 1 / -1;
  }

  .rules-platform-row {
    grid-template-columns: minmax(160px, 1fr) minmax(190px, 1.2fr) minmax(160px, 1fr) 82px;
  }

  .rules-platform-row-head > :nth-child(4),
  .rules-platform-row-head > :nth-child(5) {
    display: none;
  }

  .rules-state-cell,
  .rules-history-cell {
    grid-column: 2 / 4;
    justify-self: start;
    text-align: left;
  }

  .rules-state-cell {
    justify-content: flex-start;
  }

  .rules-history-cell {
    text-align: left;
  }
}

@media (max-width: 920px) {
  .rules-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rules-form .rules-name-field,
  .rules-form .rules-category-field,
  .rules-toggle,
  .rules-form-actions {
    grid-column: 1 / -1;
  }

  .rules-toolstrip {
    grid-template-columns: 1fr 1fr;
  }

  .rules-toolstrip .search,
  .rules-quick-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .rules-form {
    grid-template-columns: 1fr;
  }

  .rules-platform-row {
    grid-template-columns: 1fr;
  }

  .rules-state-cell,
  .rules-history-cell,
  .rules-row-actions {
    grid-column: auto;
  }

  .rules-row-actions {
    justify-content: flex-start;
    justify-self: start;
  }

  .rules-toolstrip {
    grid-template-columns: 1fr;
  }

  .rules-quick-actions {
    justify-content: flex-start;
  }

  .logs-event,
  .logs-event summary {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .logs-event-time,
  .logs-event-badges {
    grid-column: 2;
    justify-content: flex-start;
  }

  .logs-day-summary {
    align-items: flex-start;
  }

  .logs-day-toolbar,
  .logs-load-older {
    align-items: flex-start;
    flex-direction: column;
  }

  .logs-event-detail {
    margin-left: 42px;
  }
}

.row-menu {
  position: relative;
  display: inline-flex;
  justify-content: center;
}

.row-menu summary {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 168, 76, 0.34);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  list-style: none;
}

.api-row-menu summary {
  width: auto;
  min-width: 96px;
  gap: 7px;
  padding: 0 11px;
  font-weight: 800;
}

.api-row-menu summary span {
  font-size: 12px;
}

.row-menu summary::-webkit-details-marker {
  display: none;
}

.row-menu summary svg {
  width: 18px;
  height: 18px;
}

.row-menu[open] summary {
  border-color: rgba(201, 168, 76, 0.7);
  background: rgba(201, 168, 76, 0.14);
}

.row-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  min-width: 180px;
  padding: 6px;
  border: 1px solid rgba(201, 168, 76, 0.32);
  border-radius: 8px;
  background: #101a25;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
}

.api-menu-panel {
  min-width: 220px;
  right: 0;
}

.row-menu-item {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  background: transparent;
  border-color: transparent;
  color: var(--text);
  padding: 7px 8px;
}

.row-menu-panel a.row-menu-item {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}

.row-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.row-menu-item.danger {
  color: #ffd0cc;
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(201, 168, 76, 0.32);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

@media (max-width: 1180px) {
  body {
    grid-template-columns: 1fr;
  }

  body.nav-collapsed {
    grid-template-columns: 1fr;
  }

  body.app-loading::before,
  body.nav-collapsed.app-loading::before {
    left: 0;
  }

  .app-loading-status,
  body.nav-collapsed .app-loading-status {
    left: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 38px rgba(3, 7, 12, 0.24);
    overflow: visible;
  }

  .sidebar-toggle {
    order: 2;
    flex: 0 0 40px;
    width: 40px;
    min-height: 38px;
    margin: 0 0 0 auto;
    display: inline-flex;
    border-color: rgba(201, 168, 76, 0.28);
    background: rgba(201, 168, 76, 0.08);
    color: var(--text);
  }

  body.nav-collapsed .sidebar {
    align-items: center;
    padding: 8px 12px;
  }

  .brand,
  body.nav-collapsed .brand {
    order: 1;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0;
    border-bottom: 0;
    border-right: 0;
    justify-content: flex-start;
  }

  .brand img {
    width: 132px;
  }

  nav {
    order: 3;
    min-width: 0;
    flex: 0 0 100%;
    display: none;
    flex-direction: column;
    gap: 6px;
    max-height: min(520px, calc(100vh - 86px));
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(201, 168, 76, 0.18);
    border-radius: 8px;
    background: rgba(6, 10, 15, 0.62);
    scrollbar-width: thin;
  }

  body.tablet-nav-open nav {
    display: flex;
  }

  nav a {
    min-height: 36px;
    justify-content: flex-start;
    white-space: nowrap;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.025);
  }

  nav a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.nav-collapsed .brand-logo-full {
    display: block !important;
  }

  body.nav-collapsed .brand-logo-mark {
    display: none !important;
  }

  body.nav-collapsed nav,
  body.nav-collapsed nav a {
    width: auto;
  }

  body.nav-collapsed .sidebar-toggle {
    width: 40px;
  }

  body.nav-collapsed nav a {
    min-height: 34px;
    justify-content: flex-start;
    padding: 7px 9px;
  }

  body.nav-collapsed nav a span,
  body.nav-collapsed .client-nav-context {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  body.nav-collapsed .client-nav-context {
    width: auto;
    display: grid;
  }

  body.nav-collapsed .client-nav-submenu {
    width: auto;
    margin: -1px 0 4px 18px;
    padding: 3px 0 3px 12px;
    border-left: 1px solid rgba(143, 163, 184, 0.18);
    gap: 5px;
  }

  .client-nav-context {
    min-width: 0;
    margin: -1px 0 0 30px;
    padding: 7px 9px;
    gap: 2px;
  }

  .client-nav-submenu {
    margin-left: 18px;
  }

  .client-nav-context strong {
    font-size: 12px;
  }

  #clientTable .data-table {
    overflow-x: auto;
  }

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

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

  .settings-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 820px) {
  .app-loading-card {
    min-width: 150px;
    min-height: 44px;
    padding: 0 15px;
  }

  main {
    padding: 12px;
  }

  .sidebar {
    padding: 8px 10px;
  }

  .brand,
  body.nav-collapsed .brand {
    padding-right: 8px;
  }

  .brand img {
    width: 116px;
  }

  .auth-panel {
    padding: 22px;
  }

  .app-header,
  .panel-head,
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-switcher {
    width: 100%;
    min-width: 0;
  }

  .search {
    min-width: 0;
    width: 100%;
  }

  .client-filter-row {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .client-integration-filters {
    justify-content: flex-start;
  }

  .metric-grid,
  .metric-grid.compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .public-doc-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-body {
  display: block;
  min-height: 100vh;
  padding: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(135deg, rgba(201, 168, 76, 0.12), transparent 30%),
    linear-gradient(180deg, #091018 0%, #0f1923 44%, #0b1119 100%);
  background-size: 44px 44px, 44px 44px, auto, auto;
}

.pricing-shell {
  margin: 0 auto;
  max-width: 1120px;
  padding: 30px 20px 56px;
}

.pricing-header {
  display: grid;
  gap: 20px;
  margin-bottom: 18px;
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(201, 168, 76, 0.13), rgba(255, 255, 255, 0.015) 42%, rgba(8, 16, 24, 0.66)),
    rgba(10, 20, 31, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  padding: 20px;
}

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

.pricing-topbar .auth-logo {
  margin: 0;
}

.pricing-signin {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 0 14px;
  text-decoration: none;
}

.pricing-copy {
  max-width: 720px;
}

.pricing-copy h1 {
  margin: 4px 0 8px;
  color: var(--text);
  font-size: var(--fs-hero);
  line-height: 1.12;
}

.pricing-copy p {
  max-width: 680px;
  color: var(--muted);
  font-size: var(--fs-base);
}

.pricing-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pricing-assurance span,
.billing-kicker,
.billing-current-badge,
.pricing-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(201, 168, 76, 0.34);
  border-radius: 999px;
  background: rgba(201, 168, 76, 0.1);
  color: #ead484;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 4px 8px;
  text-transform: uppercase;
}

.pricing-grid,
.billing-plan-grid,
.billing-metric-strip {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card,
.billing-plan-card {
  position: relative;
  display: flex;
  min-height: 318px;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(201, 168, 76, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(34, 52, 68, 0.98), rgba(12, 25, 37, 0.98)),
    #102033;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  padding: 16px;
  overflow: hidden;
}

.pricing-card::before,
.billing-plan-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.1), rgba(227, 198, 110, 0.72), rgba(112, 209, 138, 0.28));
}

.pricing-card.featured,
.billing-plan-card.active {
  border-color: rgba(227, 198, 110, 0.74);
  background:
    linear-gradient(180deg, rgba(42, 61, 75, 0.98), rgba(14, 29, 43, 0.98)),
    #142638;
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(227, 198, 110, 0.2);
  transform: translateY(-4px);
}

.pricing-badge {
  position: absolute;
  top: 14px;
  right: 14px;
}

.pricing-card h2,
.billing-plan-card h3 {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-lg);
}

.pricing-card-eyebrow,
.billing-plan-topline span,
.billing-metric-strip span,
.billing-status-card span {
  margin: 0;
  color: #9eb2c4;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pricing-card strong,
.billing-plan-card strong,
.billing-metric-strip strong,
.billing-status-card strong {
  display: block;
  color: var(--text);
  font-size: var(--fs-xl);
  line-height: 1.15;
}

.pricing-card strong span {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin-left: 4px;
}

.pricing-card p,
.billing-plan-card small,
.billing-plan-card p,
.billing-metric-strip small,
.billing-status-card small,
.pricing-note-card p,
.billing-footnote span {
  color: var(--muted);
}

.pricing-feature-list,
.billing-feature-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-feature-list li,
.billing-feature-list li {
  position: relative;
  padding-left: 24px;
  color: #dce6ee;
  font-size: var(--fs-base);
}

.pricing-feature-list li::before,
.billing-feature-list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 12px;
  height: 7px;
  border-bottom: 2px solid var(--gold-2);
  border-left: 2px solid var(--gold-2);
  transform: rotate(-45deg);
}

.pricing-note-card,
.billing-footnote {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 8px;
  background: rgba(12, 25, 37, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  padding: 12px 14px;
}

.pricing-note-card strong,
.billing-footnote strong {
  flex: 0 0 auto;
  color: var(--text);
}

.billing-panel {
  display: grid;
  gap: 16px;
}

.billing-toast {
  border: 1px solid rgba(205, 174, 82, 0.36);
  border-radius: 8px;
  background: rgba(205, 174, 82, 0.12);
  color: var(--text);
  padding: 10px 12px;
}

.billing-official-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 18px;
  align-items: stretch;
  border: 1px solid rgba(201, 168, 76, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(201, 168, 76, 0.1), transparent 38%),
    rgba(12, 25, 37, 0.74);
  padding: 16px;
}

.billing-official-header h2 {
  margin: 10px 0 7px;
  color: var(--text);
  font-size: var(--fs-xl);
}

.billing-official-header p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.billing-status-card,
.billing-metric-strip article {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(8, 16, 24, 0.42);
  padding: 12px;
}

.billing-status-card {
  align-content: center;
}

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

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

.billing-trial-explainer,
.billing-wall,
.billing-danger-zone {
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 8px;
  background: rgba(12, 25, 37, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.billing-trial-explainer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
}

.billing-trial-explainer.attention {
  border-color: rgba(244, 201, 107, 0.42);
  background: rgba(244, 201, 107, 0.1);
}

.billing-trial-explainer strong,
.billing-danger-zone strong,
.billing-wall h2 {
  color: var(--text);
}

.billing-trial-explainer strong {
  display: block;
  margin-top: 6px;
  font-size: var(--fs-lg);
}

.billing-trial-explainer p,
.billing-danger-zone span,
.billing-wall p,
.billing-inline-warning {
  margin: 4px 0 0;
  color: var(--muted);
}

.billing-wall {
  display: grid;
  gap: 12px;
  max-width: 720px;
  padding: 18px;
}

.billing-wall h2 {
  margin: 0;
  font-size: var(--fs-xl);
}

.billing-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-color: rgba(255, 137, 125, 0.24);
  padding: 13px 14px;
}

.billing-danger-zone span,
.billing-inline-warning {
  display: block;
  font-size: var(--fs-sm);
}

.danger-text {
  color: #ffb7ae !important;
}

.billing-plan-card.recommended {
  border-color: rgba(112, 209, 138, 0.38);
}

.billing-plan-topline {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.billing-current-badge {
  border-color: rgba(112, 209, 138, 0.4);
  background: rgba(112, 209, 138, 0.12);
  color: #9ee7af;
  white-space: nowrap;
}

.billing-current-badge.recommended {
  border-color: rgba(201, 168, 76, 0.34);
  background: rgba(201, 168, 76, 0.1);
  color: #ead484;
}

.billing-plan-main {
  display: grid;
  gap: 8px;
}

.billing-plan-main small {
  display: block;
}

.reconciliation-page {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.reconciliation-page:has(.reconciliation-category-menu[open]) {
  padding-bottom: 360px;
}

.reconciliation-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(35, 56, 75, 0.96), rgba(18, 30, 44, 0.96));
}

.reconciliation-run-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(141, 166, 202, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: var(--fs-sm);
}

.reconciliation-run-banner strong {
  color: var(--text);
}

.reconciliation-run-banner.warning {
  border-color: rgba(244, 201, 107, 0.32);
  background: rgba(244, 201, 107, 0.1);
}

.reconciliation-run-banner.success {
  border-color: rgba(112, 209, 138, 0.28);
  background: rgba(112, 209, 138, 0.1);
}

.reconciliation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(231, 191, 83, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(7, 12, 20, 0.28);
}

.reconciliation-summary div {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.055);
}

.reconciliation-summary span,
.reconciliation-grid th span,
.reconciliation-drawer-header span {
  display: block;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.reconciliation-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: var(--fs-sm);
}

.reconciliation-grid-wrap {
  inline-size: 100%;
  min-width: 0;
  max-width: 100%;
  max-inline-size: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  contain: inline-size;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(10, 18, 28, 0.22);
  -webkit-overflow-scrolling: touch;
}

.reconciliation-grid-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.reconciliation-grid-section {
  border: 1px solid rgba(141, 166, 202, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: rgba(7, 12, 20, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.reconciliation-grid-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reconciliation-grid-section-header strong {
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 800;
}

.reconciliation-grid-section-header span {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.reconciliation-mobile-cards {
  display: none;
  gap: 10px;
}

.reconciliation-mobile-account {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.reconciliation-mobile-account-header {
  display: grid;
  gap: 2px;
}

.reconciliation-mobile-account-header strong {
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.25;
}

.reconciliation-mobile-account-header span {
  color: var(--muted);
  font-size: var(--fs-xs);
}

.reconciliation-mobile-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.reconciliation-mobile-day {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font: inherit;
  font-size: 10px;
}

button.reconciliation-mobile-day {
  cursor: pointer;
}

.reconciliation-mobile-day span {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.reconciliation-mobile-day strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
}

.reconciliation-mobile-day.balanced strong {
  color: rgba(112, 209, 138, 0.9);
}

.reconciliation-mobile-day.posted_pending {
  border-color: rgba(112, 209, 138, 0.28);
  background: rgba(112, 209, 138, 0.1);
}

.reconciliation-mobile-day.posted_pending strong {
  color: rgba(133, 229, 161, 0.96);
}

.reconciliation-mobile-day.discrepancies {
  border-color: rgba(255, 137, 125, 0.34);
  background: rgba(255, 137, 125, 0.12);
}

.reconciliation-mobile-day.discrepancies strong {
  color: #ffb7ae;
}

.reconciliation-mobile-day.stale_skipped {
  border-color: rgba(244, 201, 107, 0.36);
  background: rgba(244, 201, 107, 0.12);
}

.reconciliation-mobile-day.empty {
  opacity: 0.42;
}

.reconciliation-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-xs);
}

.reconciliation-grid th,
.reconciliation-grid td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 5px;
  text-align: center;
}

.reconciliation-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  color: var(--muted);
  font-weight: 600;
}

.reconciliation-grid thead th:first-child {
  left: 0;
  z-index: 4;
  width: 210px;
  text-align: left;
}

.reconciliation-grid tbody th {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 210px;
  background: var(--panel);
  text-align: left;
  vertical-align: middle;
}

.reconciliation-grid tbody th strong {
  display: block;
  color: var(--text);
  font-size: var(--fs-sm);
}

.reconciliation-cell {
  display: inline-grid;
  width: 54px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

button.reconciliation-cell {
  cursor: pointer;
}

.reconciliation-cell.balanced {
  border-color: rgba(112, 209, 138, 0.24);
  background: rgba(112, 209, 138, 0.09);
  color: rgba(133, 229, 161, 0.96);
}

.reconciliation-cell.posted_pending {
  border-color: rgba(112, 209, 138, 0.3);
  background: rgba(112, 209, 138, 0.11);
  color: rgba(133, 229, 161, 0.98);
}

.reconciliation-cell.discrepancies {
  border-color: rgba(255, 137, 125, 0.34);
  background: rgba(255, 137, 125, 0.12);
  color: #ffb7ae;
}

.reconciliation-cell.stale_skipped {
  border-color: rgba(244, 201, 107, 0.36);
  background: rgba(244, 201, 107, 0.12);
  color: #ead484;
}

.reconciliation-cell.no_data {
  color: var(--muted);
}

.reconciliation-cell.empty {
  opacity: 0.35;
}

.reconciliation-match-proof {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.reconciliation-match-proof > strong {
  color: var(--text);
  font-size: var(--fs-sm);
}

.reconciliation-match-proof table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.reconciliation-match-proof th,
.reconciliation-match-proof td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: var(--fs-xs);
  text-align: left;
  vertical-align: top;
}

.reconciliation-match-proof th {
  color: var(--text);
}

.reconciliation-review-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.reconciliation-review-table-wrap:has(.reconciliation-category-menu[open]) {
  overflow: visible;
}

.reconciliation-review-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

.reconciliation-review-table th,
.reconciliation-review-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: var(--fs-xs);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.reconciliation-review-table th {
  color: var(--text);
  background: rgba(7, 12, 20, 0.58);
}

.reconciliation-review-table th:first-child,
.reconciliation-review-table td:first-child {
  width: 132px;
}

.reconciliation-review-table th:nth-child(2),
.reconciliation-review-table td:nth-child(2) {
  width: auto;
}

.reconciliation-review-table th:nth-child(3),
.reconciliation-review-table td:nth-child(3) {
  width: 380px;
}

.reconciliation-review-cell {
  display: grid;
  gap: 6px;
}

.reconciliation-review-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.reconciliation-review-amount,
.reconciliation-review-date {
  display: inline-block;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.reconciliation-review-description {
  color: #aeb9c8;
  font-weight: 700;
  line-height: 1.35;
}

.reconciliation-review-reason {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.reconciliation-review-table .muted {
  color: var(--muted);
}

.reconciliation-posting-action {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 112px;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.reconciliation-posting-category {
  min-width: 0;
}

.reconciliation-category-menu[open] {
  z-index: 60;
}

.reconciliation-posting-action .bank-feed-category-trigger {
  width: 100%;
  min-height: 46px;
  border-color: rgba(201, 168, 76, 0.38);
  background: rgba(7, 12, 20, 0.72);
}

.reconciliation-posting-action .bank-feed-category-panel {
  min-width: min(320px, calc(100vw - 48px));
  max-height: min(360px, calc(100vh - 140px));
}

.reconciliation-posting-action .reconciliation-post-button {
  min-height: 46px;
  justify-content: center;
}

.reconciliation-posting-action .danger-text,
.reconciliation-posting-action .muted {
  grid-column: 1 / -1;
  font-size: 11px;
  line-height: 1.35;
}

.reconciliation-register-details {
  display: grid;
  gap: 10px;
}

.reconciliation-register-details summary {
  width: max-content;
  cursor: pointer;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 800;
}

.reconciliation-register-details[open] summary {
  margin-bottom: 10px;
}

.reconciliation-register-proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.reconciliation-register-column {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.reconciliation-register-column > strong {
  color: var(--text);
  font-size: var(--fs-sm);
}

.reconciliation-register-column table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.reconciliation-register-column th,
.reconciliation-register-column td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: var(--fs-xs);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.reconciliation-register-column th {
  color: var(--text);
}

.reconciliation-register-column th:nth-child(1),
.reconciliation-register-column td:nth-child(1) {
  width: 88px;
}

.reconciliation-register-column th:nth-child(2),
.reconciliation-register-column td:nth-child(2) {
  width: 86px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.reconciliation-drawer {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
}

.reconciliation-drawer-header,
.reconciliation-drawer-counts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.reconciliation-drawer-header strong {
  display: block;
  color: var(--text);
  font-size: var(--fs-lg);
}

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

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

.reconciliation-discrepancy-list li {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.reconciliation-discrepancy-list p {
  margin: 0;
  color: var(--text);
}

.reconciliation-discrepancy-list dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.reconciliation-discrepancy-list div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
}

.reconciliation-discrepancy-list dt {
  color: var(--muted);
}

.reconciliation-discrepancy-list dd {
  margin: 0;
}

@media (max-width: 900px) {
  .pricing-copy h1 {
    font-size: var(--fs-hero);
  }

  .pricing-grid,
  .billing-plan-grid,
  .billing-metric-strip,
  .billing-official-header {
    grid-template-columns: 1fr;
  }

  .pricing-note-card,
  .billing-footnote,
  .billing-trial-explainer,
  .billing-danger-zone,
  .reconciliation-summary {
    align-items: flex-start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .reconciliation-grid-section > .reconciliation-grid-wrap {
    display: none;
  }

  .reconciliation-mobile-cards {
    display: grid;
  }

  .reconciliation-grid-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .reconciliation-review-table {
    min-width: 0;
  }

  .reconciliation-review-table,
  .reconciliation-review-table thead,
  .reconciliation-review-table tbody,
  .reconciliation-review-table tr,
  .reconciliation-review-table th,
  .reconciliation-review-table td {
    display: block;
  }

  .reconciliation-review-table thead {
    display: none;
  }

  .reconciliation-review-table tr {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .reconciliation-review-table td {
    display: grid;
    gap: 4px;
    width: auto !important;
    padding: 0;
    border-bottom: 0;
  }

  .reconciliation-review-table td::before {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .reconciliation-review-table td:nth-child(1)::before {
    content: "Status";
  }

  .reconciliation-review-table td:nth-child(2)::before {
    content: "Transaction";
  }

  .reconciliation-review-table td:nth-child(3)::before {
    content: "Category / Post";
  }

  .reconciliation-posting-action {
    grid-template-columns: 1fr;
  }

  .reconciliation-posting-action .reconciliation-post-button {
    width: 100%;
  }
}

.agent-tools-shell {
  display: grid;
  gap: 14px;
}

.agent-console-hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--border);
  border-radius: 8px;
}

.agent-console-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.agent-console-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  padding: 4px 0;
  border: 0;
  border-radius: 999px;
  color: var(--gold-2);
  background: transparent;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-console-badge .app-icon {
  width: 14px;
  height: 14px;
}

.agent-console-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1.12;
}

.agent-console-copy p {
  max-width: 780px;
  margin: 0;
  color: #c8d5df;
  font-size: 0.95rem;
  line-height: 1.45;
}

.agent-summary-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 7px;
}

.agent-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--body);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.78rem;
}

.agent-summary-item .app-icon {
  width: 14px;
  height: 14px;
  color: var(--gold-2);
}

.agent-summary-item > span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.agent-summary-item strong {
  color: var(--text);
}

.agent-console-status {
  display: grid;
  align-content: stretch;
  gap: 10px;
}

.agent-grant-metric {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(5, 10, 16, 0.28);
}

.agent-grant-metric > .app-icon {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 8px;
  color: var(--gold-2);
  background: rgba(201, 168, 76, 0.12);
}

.agent-grant-metric span,
.agent-install-card-header span,
.agent-category-card p {
  color: var(--muted);
}

.agent-grant-metric strong {
  display: block;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
}

.agent-grant-metric.good > .app-icon {
  color: var(--green);
  background: rgba(112, 209, 138, 0.12);
}

.agent-grant-metric.attention > .app-icon {
  color: var(--amber);
  background: rgba(244, 201, 107, 0.14);
}

.agent-grant-metric.danger > .app-icon {
  color: var(--red);
  background: rgba(255, 137, 125, 0.12);
}

.agent-setup-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 35, 50, 0.78), rgba(13, 22, 32, 0.82));
}

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

.agent-section-heading h2 {
  margin: 1px 0 0;
  color: var(--text);
  font-size: 1.05rem;
}

.agent-section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

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

.agent-setup-row {
  display: grid;
  grid-template-columns: 34px minmax(190px, 0.8fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(5, 10, 16, 0.16);
}

.agent-setup-row-primary {
  border-color: rgba(201, 168, 76, 0.2);
  background: rgba(201, 168, 76, 0.055);
}

.agent-setup-row > img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.agent-setup-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.agent-setup-copy > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-setup-copy strong {
  color: var(--text);
  font-size: 0.95rem;
}

.agent-setup-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.agent-setup-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-setup-tags span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--body);
  background: rgba(5, 10, 16, 0.18);
  font-size: 0.76rem;
  font-weight: 800;
}

.agent-setup-tags .app-icon {
  width: 14px;
  height: 14px;
  color: var(--gold-2);
}

.agent-setup-row code {
  display: block;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  overflow-wrap: anywhere;
  color: #dce5eb;
  background: rgba(5, 10, 16, 0.22);
  font-size: 0.8rem;
  line-height: 1.35;
}

.agent-install-grid,
.agent-tools-layout,
.agent-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.agent-install-card,
.agent-category-card,
.agent-grant-lane {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(30, 47, 64, 0.92), rgba(18, 30, 43, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.agent-install-card {
  position: relative;
  overflow: hidden;
}

.agent-install-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--gold-2);
}

.agent-install-card.codex::before {
  background: #9ee8ff;
}

.agent-install-card.claude::before {
  background: #d8a05f;
}

.agent-install-card-header {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.agent-install-card-header img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.agent-install-card-header strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.agent-install-card-header span,
.agent-grant-metric span {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-install-card code {
  display: block;
  min-height: 66px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow-wrap: anywhere;
  color: var(--text);
  background: rgba(5, 10, 16, 0.26);
  font-size: 0.82rem;
  line-height: 1.45;
}

.agent-install-card p {
  margin: 0;
  color: var(--muted);
}

.agent-category-card {
  grid-template-columns: 42px 1fr;
  align-items: start;
}

.agent-category-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: 8px;
  color: var(--gold-2);
  background: rgba(201, 168, 76, 0.08);
}

.agent-category-icon .app-icon {
  width: 17px;
  height: 17px;
}

.agent-category-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 1rem;
}

.agent-category-card p {
  margin: 0 0 10px;
}

.agent-tool-catalog {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.agent-tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(5, 10, 16, 0.14);
}

.agent-tool-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.agent-tool-tab:hover,
.agent-tool-tab.active {
  border-color: rgba(201, 168, 76, 0.24);
  color: var(--text);
  background: rgba(201, 168, 76, 0.08);
}

.agent-tool-tab .app-icon {
  width: 15px;
  height: 15px;
  color: var(--gold-2);
}

.agent-tool-tab strong {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(201, 168, 76, 0.1);
  font-size: 0.74rem;
}

.agent-tool-tabpanels {
  display: grid;
}

.agent-tool-category-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 35, 50, 0.86), rgba(13, 22, 32, 0.9));
}

.agent-tool-category-panel[hidden] {
  display: none;
}

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

.agent-tool-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.4fr) minmax(0, 0.6fr);
  gap: 12px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(5, 10, 16, 0.14);
}

.agent-tool-row strong,
.agent-tool-row code {
  display: block;
}

.agent-tool-row strong {
  color: var(--text);
  font-size: 0.92rem;
}

.agent-tool-row code {
  margin-top: 3px;
  color: var(--gold-2);
  overflow-wrap: anywhere;
  font-size: 0.76rem;
}

.agent-tool-row p {
  margin: 0;
  color: #c8d5df;
}

.agent-grant-lane {
  align-content: start;
  min-height: 220px;
}

.agent-lane-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-lane-heading span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--gold-2);
  background: rgba(201, 168, 76, 0.1);
}

.agent-lane-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.agent-empty-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 22px;
  border: 1px dashed rgba(201, 168, 76, 0.28);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.agent-empty-state .app-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  color: rgba(227, 198, 110, 0.72);
}

.agent-run-viewer {
  display: grid;
  gap: 14px;
}

.agent-run-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(201, 168, 76, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(30, 47, 64, 0.9), rgba(12, 21, 31, 0.94));
}

.agent-run-command-bar h2 {
  margin: 1px 0 0;
  color: var(--text);
  font-size: 1.15rem;
}

.agent-run-command-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

.agent-run-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(201, 168, 76, 0.24);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(201, 168, 76, 0.08);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-run-status .app-icon {
  width: 14px;
  height: 14px;
}

.agent-run-status.running .app-icon {
  animation: spin 1s linear infinite;
}

.agent-run-status.complete {
  border-color: rgba(112, 209, 138, 0.32);
  color: var(--green);
  background: rgba(112, 209, 138, 0.1);
}

.agent-run-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 14px;
}

.agent-run-main,
.agent-run-side-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(30, 47, 64, 0.94), rgba(15, 26, 38, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.agent-run-main {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
}

.agent-run-report-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.agent-run-report-header span,
.agent-run-stage span,
.agent-run-side-heading span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-run-report-header h3 {
  margin: 2px 0;
  color: var(--text);
  font-size: 1.45rem;
}

.agent-run-report-header p {
  margin: 0;
  color: #c8d5df;
}

.agent-run-stage {
  min-width: 140px;
  padding: 10px;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 8px;
  background: rgba(5, 10, 16, 0.18);
  text-align: right;
}

.agent-run-stage strong {
  display: block;
  margin-top: 2px;
  color: var(--gold-2);
  font-size: 1rem;
}

.agent-run-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.agent-run-metric {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(5, 10, 16, 0.18);
}

.agent-run-metric span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-run-metric strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.05;
}

.agent-run-metric.strong {
  border-color: rgba(112, 209, 138, 0.34);
  background: rgba(112, 209, 138, 0.09);
}

.agent-run-metric.warn strong {
  color: var(--amber);
}

.agent-run-report-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
}

.agent-run-report-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.agent-run-report-table th,
.agent-run-report-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  text-align: left;
}

.agent-run-report-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.agent-run-report-table tr:last-child td {
  border-bottom: 0;
}

.agent-run-report-table .numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.agent-run-report-table .positive {
  color: var(--green);
}

.agent-run-report-table .negative {
  color: var(--amber);
}

.agent-run-empty-table {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.agent-run-empty-table .app-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  color: rgba(227, 198, 110, 0.72);
}

.agent-run-empty-table strong {
  color: var(--text);
}

.agent-run-side {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.agent-run-side-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.agent-run-side-heading {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
}

.agent-run-side-heading > .app-icon {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 8px;
  color: var(--gold-2);
  background: rgba(201, 168, 76, 0.1);
}

.agent-run-side-heading strong {
  display: block;
  color: var(--text);
}

.agent-run-side-card code {
  display: block;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow-wrap: anywhere;
  color: #c8d5df;
  background: rgba(5, 10, 16, 0.24);
}

.agent-run-timeline-list {
  display: grid;
  gap: 8px;
}

.agent-run-timeline-item {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-left: 3px solid var(--gold-2);
  border-radius: 8px;
  background: rgba(5, 10, 16, 0.18);
}

.agent-run-timeline-item.success {
  border-left-color: var(--green);
}

.agent-run-timeline-item span,
.agent-run-timeline-empty {
  color: var(--muted);
  font-size: 0.76rem;
}

.agent-run-timeline-item strong {
  color: #d9e1e7;
  font-size: 0.86rem;
}

.agent-grants-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.agent-grants-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.agent-grants-table th,
.agent-grants-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.agent-grants-table th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.agent-grants-table td strong,
.agent-grants-table td small {
  display: block;
}

.agent-grants-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
}

.mini-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-chip {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.76rem;
}

.agent-grant-status.pending {
  color: #f5c56d;
}

.agent-grant-status.approved {
  color: #8fd3ad;
}

.agent-grant-status.revoked {
  color: #ee9b9b;
}

@media (max-width: 780px) {
  .agent-console-hero,
  .agent-install-grid,
  .agent-tools-layout,
  .agent-category-grid,
  .agent-run-grid,
  .agent-run-metrics,
  .agent-setup-row,
  .agent-tool-row {
    grid-template-columns: 1fr;
  }

  .agent-console-hero,
  .agent-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-summary-strip {
    justify-content: start;
  }

  .agent-plugin-spot {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .agent-plugin-actions {
    justify-content: stretch;
  }

  .agent-plugin-actions > button {
    flex: 1 1 180px;
  }

  .agent-run-command-bar,
  .agent-run-report-header {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-run-stage {
    text-align: left;
  }

  .agent-console-copy h2 {
    font-size: 1.4rem;
  }

  .agent-section-heading p {
    text-align: left;
  }

  .agent-setup-row > button {
    width: 100%;
    justify-content: center;
  }
}
