/* Romela Pula PWA — Lovable swift-pay-chat visual reskin (Option A) */

:root {
  --green-bg: oklch(0.94 0.02 155);
  --green-header: #ffffff;
  --green-accent: #2d6a4f;
  --green-accent-hover: #245a42;
  --green-avatar: #2d6a4f;
  --green-user-bubble: #2d6a4f;
  --green-brand: #2d6a4f;
  --green-brand-light: #40916c;
  --green-footer: oklch(0.97 0.02 155);
  --green-login-bg: #f7faf8;
  --sage: #c8dcc8;
  --sage-light: #eef4ee;
  --sage-text: #6d926d;

  --surface: #ffffff;
  --text: oklch(0.129 0.042 264.695);
  --muted: oklch(0.554 0.046 257.417);
  --border: oklch(0.929 0.013 255.508);
  --danger: oklch(0.577 0.245 27.325);
  --radius: 0.625rem;
  --radius-lg: 1rem;
  --shadow: 0 10px 40px oklch(0.3 0.08 155 / 12%);
  --dot-pattern: radial-gradient(oklch(0.9 0.02 155) 1px, transparent 1px);
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--green-login-bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
}

body.chat-active {
  overflow: hidden;
  height: 100%;
  background: var(--green-bg);
}

html.chat-active {
  overflow: hidden;
  height: 100%;
}

#app {
  width: 100%;
  max-width: min(720px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hidden { display: none !important; }

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

/* ─── Login ─────────────────────────────────────────────────────────── */

.login-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--green-login-bg);
}

.login-brand {
  padding: 1.25rem 1.25rem 0;
}

.login-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.login-emblem {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
}

.login-brand .wordmark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-brand .wordmark .wm-romela {
  color: var(--text);
}

.login-brand .wordmark .wm-pula {
  color: var(--sage-text);
}

.login-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1rem 2rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  margin: 0;
  padding: 2rem 1.75rem;
  background: var(--surface);
  border-radius: calc(var(--radius-lg) + 4px);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.login-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
}

.login-card .lead,
.login-card .hint {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.9rem;
  text-align: center;
  margin: 0 0 1.25rem;
}

.login-card .hint { text-align: left; margin-top: 0; }

.login-legal {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.login-legal a {
  color: var(--green-brand);
  font-weight: 600;
}

/* ─── Terms acceptance modal (registration gate) ───────────────────── */

.terms-accept-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.terms-accept-modal.hidden {
  display: none;
}

.terms-accept-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: oklch(0.12 0.02 170 / 55%);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.terms-accept-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: calc(var(--radius-lg) + 4px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.35rem 1.25rem;
  animation: biz-modal-in 0.2s ease-out;
}

.terms-accept-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.terms-accept-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.terms-accept-links {
  margin: 0 0 1rem 1.1rem;
  padding: 0;
  font-size: 0.95rem;
}

.terms-accept-links a {
  color: var(--green-brand);
  font-weight: 600;
}

.terms-accept-check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.4;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.terms-accept-check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.terms-accept-error {
  margin: 0 0 0.75rem;
  color: var(--danger);
  font-size: 0.85rem;
}

.terms-accept-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 1rem 0 0.4rem;
}

input[type="tel"],
input[type="text"],
.composer textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}

input:focus,
.composer textarea:focus {
  outline: 2px solid oklch(0.75 0.12 155);
  outline-offset: 1px;
  border-color: oklch(0.75 0.12 155);
}

button, .attach-btn {
  font: inherit;
  cursor: pointer;
}

.primary {
  margin-top: 1.25rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: var(--green-accent);
  color: #fff;
  font-weight: 600;
  transition: background 0.15s ease;
}

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

.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.link {
  margin-top: 0.75rem;
  background: none;
  border: none;
  color: var(--green-accent);
  font-weight: 500;
  text-decoration: underline;
  padding: 0;
  width: 100%;
  text-align: center;
}

.error {
  margin-top: 0.75rem;
  color: var(--danger);
  background: oklch(0.97 0.02 27);
  border: 1px solid oklch(0.88 0.08 27);
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.notice {
  margin: 0.75rem 0 0;
  color: oklch(0.35 0.1 155);
  background: oklch(0.96 0.03 155);
  border: 1px solid oklch(0.85 0.06 155);
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  line-height: 1.45;
  font-size: 0.88rem;
}

.pay-invoice-banner {
  border-color: oklch(0.75 0.08 155);
  background: oklch(0.97 0.04 155);
}

.pay-invoice-banner strong {
  font-weight: 700;
}

/* ─── Chat shell ─────────────────────────────────────────────────────── */

.chat-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--green-bg);
}

.chat-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 4.5rem;
  padding: 0.5rem 1rem;
  background: var(--green-header);
  color: var(--text);
  border-bottom: 1px solid var(--sage);
  box-shadow: 0 1px 3px oklch(0.2 0.04 155 / 8%);
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.chat-logo {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
}

.chat-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--green-avatar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.chat-title {
  min-width: 0;
}

.header-wordmark {
  font-weight: 700;
  line-height: 1.15;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.header-wordmark .wm-romela {
  color: var(--text);
}

.header-wordmark .wm-pula {
  color: var(--sage-text);
}

.chat-title .name {
  font-weight: 600;
  line-height: 1.2;
  font-size: 0.95rem;
}

.chat-title .subtitle {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.3;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--green-brand);
  transition: background 0.15s ease;
}

.icon-btn:hover {
  background: var(--sage-light);
}

.icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
}

.notif-wrap {
  position: relative;
}

.wallet-strip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: oklch(0.98 0.02 155);
  border-bottom: 1px solid oklch(0.9 0.03 155);
  overflow-x: auto;
}

.wallet-icon {
  flex-shrink: 0;
  font-size: 0.9rem;
  opacity: 0.7;
}

.wallet-pill {
  flex-shrink: 0;
  font-size: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

.wallet-pill strong {
  font-weight: 700;
  margin-right: 0.25rem;
}

.status-bar {
  flex-shrink: 0;
  margin: 0.75rem 1rem 0;
  padding: 0.65rem 0.75rem;
  background: oklch(0.98 0.04 85);
  border: 1px solid oklch(0.88 0.08 85);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: oklch(0.45 0.1 85);
  line-height: 1.45;
}

.notifications-panel {
  flex-shrink: 0;
  max-height: 36vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 4px 12px oklch(0 0 0 / 6%);
}

.api-panel {
  flex-shrink: 0;
  max-height: 50vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 4px 12px oklch(0 0 0 / 6%);
}

/* Full-screen modal dialogs for business forms (business-chat-pro style) */
body.business-mode.biz-modal-open {
  overflow: hidden;
}

.biz-form-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  overflow: hidden;
}

.biz-form-modal.hidden {
  display: none;
}

.biz-form-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: oklch(0.12 0.02 170 / 55%);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.biz-form-modal-viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(56rem, 100%);
  max-height: min(90dvh, 100%);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  animation: biz-modal-in 0.2s ease-out;
}

@keyframes biz-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .biz-form-modal-viewport {
    animation: none;
  }
}

.biz-form-modal-viewport > .api-panel.biz-form-panel {
  flex-shrink: 1;
  min-height: 0;
  width: 100%;
}

body.business-mode .biz-form-modal .api-panel.biz-form-panel {
  max-height: none;
  height: auto;
  border-radius: 0.85rem;
  border: 1px solid oklch(0.89 0.014 95);
  box-shadow: 0 24px 48px oklch(0 0 0 / 18%);
  overflow: visible;
}

body.business-mode .biz-form-modal .api-panel-head {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 1rem 1.15rem 0.65rem;
  border-bottom: 1px solid oklch(0.92 0.012 95);
  background: oklch(0.995 0.004 155);
}

body.business-mode .biz-form-modal .api-panel-head-text {
  flex: 1;
  min-width: 0;
}

body.business-mode .biz-form-modal .api-panel-desc {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #000;
  font-weight: 400;
}

body.business-mode .biz-form-modal .api-panel-body {
  flex: none;
  min-height: 0;
  overflow: visible;
  padding: 0.85rem 1.15rem 1.5rem;
}

body.business-mode .biz-form-modal .api-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

body.business-mode .biz-form-modal .api-panel-head h2 {
  font-family: var(--font-display, inherit);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.business-mode .biz-form-modal .inv-actions,
body.business-mode .biz-form-modal .form-dialog-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(to top, var(--surface) 75%, oklch(1 0 0 / 0));
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.form-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.form-section-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(0.48 0.02 170);
}

.form-separator {
  border: none;
  border-top: 1px solid oklch(0.92 0.012 95);
  margin: 0.85rem 0;
}

.inv-section-tools {
  margin: 0;
}

.inv-section-tools .inv-hint {
  display: none;
}

.inv-line-items-head {
  display: none;
}

body.business-mode .biz-form-modal .inv-line-items-head {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0.15rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: oklch(0.48 0.02 170);
}

body.business-mode .biz-form-modal .inv-line-items-head span:nth-child(1) { flex: 1; min-width: 0; }
body.business-mode .biz-form-modal .inv-line-items-head span:nth-child(2) { flex: 3; min-width: 0; }
body.business-mode .biz-form-modal .inv-line-items-head span:nth-child(3),
body.business-mode .biz-form-modal .inv-line-items-head span:nth-child(4) { flex: 1; min-width: 0; }
body.business-mode .biz-form-modal .inv-line-items-head span:nth-child(5) { flex-shrink: 0; width: 2.5rem; }

.form-dialog-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid oklch(0.92 0.012 95);
}

/* Toast notifications */
.toast-root {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  font-size: 0.82rem;
  line-height: 1.45;
  box-shadow: 0 10px 24px oklch(0 0 0 / 14%);
  border: 1px solid oklch(0.89 0.014 95);
  background: #fff;
  color: #1e293b;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { border-color: oklch(0.78 0.08 155); background: oklch(0.97 0.03 155); }
.toast-error { border-color: oklch(0.78 0.1 25); background: oklch(0.97 0.03 25); }
.toast-info { border-color: oklch(0.82 0.04 230); background: oklch(0.97 0.02 230); }

/* Line items table (modal forms) */
.inv-lines-table-wrap {
  overflow-x: auto;
  border: 1px solid oklch(0.92 0.012 95);
  border-radius: 0.65rem;
  background: #fff;
}

.inv-lines-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.inv-lines-table thead th {
  padding: 0.55rem 0.5rem;
  text-align: left;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: oklch(0.48 0.02 170);
  background: oklch(0.97 0.015 155);
  border-bottom: 1px solid oklch(0.92 0.012 95);
}

.inv-lines-table tbody td {
  padding: 0.35rem 0.4rem;
  vertical-align: middle;
  border-top: 1px solid oklch(0.95 0.01 95);
}

.inv-lines-table input {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.inv-lines-table .li-desc { min-width: 10rem; }
.inv-lines-table .li-qty,
.inv-lines-table .li-price { max-width: 5.5rem; }
.inv-lines-table .li-code { max-width: 6rem; }
.inv-lines-table .li-line-total {
  display: block;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: oklch(0.42 0.03 170);
  font-size: 0.78rem;
  padding-right: 0.15rem;
}

.biz-result-card.biz-card-success { border-color: oklch(0.78 0.08 155); }
.biz-result-card.biz-card-success .biz-card-title { color: oklch(0.38 0.07 155); }
.biz-card-note {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: oklch(0.48 0.02 170);
  line-height: 1.45;
}

.biz-action-balance { margin-bottom: 0.75rem; }

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.share-actions .secondary-btn,
.share-actions .primary {
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 9rem;
}

.api-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.5rem;
}

.api-panel-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.api-panel-head .link {
  width: auto;
  margin-top: 0;
}

.api-panel-body {
  overflow-y: auto;
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.api-lead {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.api-key-row label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.api-key-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.api-key-field code {
  flex: 1;
  display: block;
  padding: 0.5rem 0.65rem;
  background: oklch(0.98 0.005 155);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  word-break: break-all;
}

.api-key-reveal {
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: oklch(0.98 0.04 85);
  border: 1px solid oklch(0.88 0.08 85);
  border-radius: var(--radius);
  font-size: 0.8rem;
  line-height: 1.45;
  word-break: break-all;
}

.api-meta p {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
}

.api-meta code {
  font-size: 0.8rem;
}

.api-muted {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.api-endpoints summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.api-endpoints ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.6;
}

.api-rotate-btn {
  align-self: flex-start;
}

/* ─── Business Invoice & Settings Forms ─────────────────────────────── */

body.business-mode .biz-form-modal #createInvoicePanel .api-panel-head,
body.business-mode .biz-form-modal #createInvoicePanel .api-panel-body {
  background: #fff;
}

.inv-unified-form {
  background: #fff;
  display: flex;
  flex-direction: column;
}

.inv-unified-form .inv-toolbar {
  margin: 0 0 0.25rem;
}

.inv-form-group {
  display: flex;
  flex-direction: column;
}

.inv-group-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0.85rem 0 0.35rem;
}

.inv-form-group:first-of-type .inv-group-label,
.inv-form-group:first-of-type .inv-group-head {
  margin-top: 0;
}

.inv-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.85rem 0 0.35rem;
}

.inv-group-head .inv-group-label {
  margin: 0;
}

.inv-unified-form label {
  margin-top: 0.65rem;
}

body.business-mode .biz-form-modal .inv-unified-form .inv-hint {
  color: #475569;
  font-size: 0.72rem;
  margin: 0 0 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
}

.inv-unified-form .inv-summary {
  margin-top: 0.75rem;
  padding: 0.75rem 0 0;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
}

.inv-unified-form .inv-summary-row {
  color: var(--text);
}

.inv-unified-form .inv-lines-table-wrap {
  background: #fff;
  border-color: var(--border);
}

.inv-unified-form .inv-lines-table thead th {
  background: #fff;
  color: var(--text);
}

.inv-unified-form .inv-actions {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  background: #fff;
}

body.business-mode .biz-form-modal .inv-unified-form .inv-actions {
  background: linear-gradient(to top, #fff 85%, transparent);
}

.inv-row {
  display: flex;
  gap: 1rem;
}

.inv-col {
  flex: 1;
}

.inv-line-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.inv-line-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.inv-line-row .flex-3 { flex: 3; min-width: 0; }
.inv-line-row .flex-1 { flex: 1; min-width: 0; }

.remove-line-btn {
  color: var(--danger);
  flex-shrink: 0;
  width: 2.5rem;
  height: auto;
}

.inv-add-btn {
  margin-top: 0.5rem;
  width: 100%;
}

.inv-totals-row {
  margin-top: 1rem;
}

.inv-hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #334155;
}

body.business-mode .biz-form-modal .inv-hint {
  color: #1e293b;
}

/* Section-level helper text — full-width callout under section headers */
body.business-mode .biz-form-modal .form-section > .inv-hint {
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0.15rem 0 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.55rem;
  background: oklch(0.965 0.018 155);
  border: 1px solid oklch(0.86 0.035 155);
  border-left: 3px solid var(--green-accent, oklch(0.5 0.17 155));
}

body.business-mode .biz-form-modal .inv-col .inv-hint,
body.business-mode .biz-form-modal label + .inv-hint {
  font-size: 0.72rem;
  color: #475569;
  margin-top: 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
}

.inv-summary {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: oklch(0.97 0.015 155);
  border: 1px solid oklch(0.89 0.014 95);
}

.inv-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  padding: 0.25rem 0;
  color: oklch(0.35 0.04 170);
}

.inv-summary-total {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid oklch(0.85 0.02 155);
  font-weight: 700;
  font-size: 0.95rem;
  color: oklch(0.28 0.06 172);
}

.inv-summary-total span:last-child {
  color: oklch(0.31 0.05 172);
}

.li-line-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.75rem;
  font-weight: 600;
  color: oklch(0.4 0.04 170);
  white-space: nowrap;
}

.inv-line-row .li-code {
  min-width: 3.5rem;
}

.inv-toolbar {
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inv-catalog-import {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 0.85rem;
}

.inv-catalog-import .secondary-btn {
  margin-top: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
}

.inv-catalog-import .inv-hint {
  flex: 1 1 100%;
  margin: 0;
}

.inv-toolbar-spaced {
  margin-top: 1rem;
}

.inv-toolbar .primary,
.inv-toolbar .secondary-btn {
  flex: 1;
  margin-top: 0;
  min-width: max-content;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inv-product-pick {
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.inv-product-pick select {
  flex: 1;
}

.inv-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.inv-actions .primary,
.inv-actions .secondary-btn {
  flex: 1;
  margin-top: 0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inv-preview-doc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: oklch(0.28 0.04 170);
  background: oklch(0.99 0.005 95);
  border: 1px solid oklch(0.88 0.012 95);
  border-radius: 0.75rem;
  padding: 1rem;
  max-height: 60vh;
  overflow-y: auto;
}

.inv-preview-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.inv-preview-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: right;
}

.inv-preview-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.72rem;
}

.inv-preview-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
}

.inv-preview-table th,
.inv-preview-table td {
  border-bottom: 1px solid oklch(0.9 0.01 95);
  padding: 0.35rem 0.25rem;
  text-align: left;
}

.inv-preview-table .num {
  text-align: right;
}

.inv-preview-totals {
  text-align: right;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.inv-preview-grand {
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.inv-preview-notes,
.inv-preview-bank,
.inv-preview-footer {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  font-size: 0.72rem;
}

.inv-preview-footer hr {
  border: none;
  border-top: 1px solid oklch(0.85 0.02 155);
  margin-bottom: 0.5rem;
}

.inv-email-btn {
  margin: 0.25rem;
}

.report-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  margin: 0.75rem 0;
  cursor: pointer;
}

.report-check input {
  margin-top: 0.15rem;
}

.report-divider {
  border: none;
  border-top: 1px solid oklch(0.88 0.012 95);
  margin: 1.25rem 0;
}

.report-section-title {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
  color: oklch(0.28 0.06 172);
}

.report-presets-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.catalog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.catalog-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.catalog-details {
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  color: var(--muted);
}

.catalog-details strong {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.catalog-actions {
  display: flex;
  gap: 0.5rem;
}

.catalog-actions .link {
  width: auto;
  margin-top: 0;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
}

.emp-pay-heading {
  margin-top: 1rem;
  font-size: 0.88rem;
}

#empPaySection .inv-hint {
  margin-bottom: 0.5rem;
}

.payroll-status-success { color: var(--green-accent); }
.payroll-status-failed { color: var(--danger); }

.catalog-del {
  color: var(--danger) !important;
}

.report-preset-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  background: oklch(0.97 0.015 155);
  border: 1px solid oklch(0.89 0.014 95);
  font-size: 0.78rem;
}

.report-preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.report-preset-empty {
  font-size: 0.78rem;
  color: oklch(0.52 0.02 170);
}

.report-del {
  color: var(--danger);
}

.api-panel-body select {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}

.readonly-input {
  background: oklch(0.95 0.01 95) !important;
  color: var(--muted) !important;
  cursor: not-allowed;
}

.secondary-btn {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.secondary-btn:hover {
  border-color: oklch(0.75 0.12 155);
}

.notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.5rem;
}

.notifications-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.notifications-list {
  overflow-y: auto;
  padding: 0 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notification-item {
  background: oklch(0.98 0.005 155);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.notification-item:hover {
  border-color: oklch(0.75 0.12 155);
}

.notification-item.unread {
  border-color: oklch(0.75 0.12 155);
  background: oklch(0.96 0.04 155);
}

.notification-item h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.notification-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.notification-item time {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: oklch(0.65 0.03 260);
}

.notifications-empty {
  margin: 0;
  padding: 0 1rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.messages {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
  background-image: var(--dot-pattern);
  background-size: 18px 18px;
}

.messages-inner {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bubble-row {
  display: flex;
  width: 100%;
}

.bubble-row.user { justify-content: flex-end; }
.bubble-row.bot { justify-content: flex-start; }

.bubble {
  max-width: 85%;
  padding: 0.65rem 0.85rem;
  border-radius: 1rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
  box-shadow: 0 1px 2px oklch(0 0 0 / 6%);
}

.bubble.bot {
  background: var(--surface);
  color: var(--text);
  border-bottom-left-radius: 0.25rem;
}

.bubble.bot strong { font-weight: 700; }

.bubble-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bubble-link:hover { opacity: 0.85; }

.bubble.user {
  background: var(--green-user-bubble);
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}

.typing-indicator {
  align-self: flex-start;
  background: var(--surface);
  border-radius: 1rem;
  border-bottom-left-radius: 0.25rem;
  padding: 0.65rem 0.85rem;
  box-shadow: 0 1px 2px oklch(0 0 0 / 6%);
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--muted);
  animation: typing-bounce 1s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.chat-footer {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--green-footer);
  border-top: 1px solid oklch(0.9 0.03 155);
  padding-bottom: env(safe-area-inset-bottom);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  touch-action: manipulation;
}

.composer textarea {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  line-height: 1.4;
  font-size: 16px;
}

.attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.attach-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.send-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-top: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--green-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.send-btn:hover { background: var(--green-accent-hover); }

.send-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text);
  box-shadow: 0 1px 2px oklch(0 0 0 / 4%);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chip:hover {
  border-color: oklch(0.75 0.12 155);
  background: oklch(0.98 0.02 155);
}

@media (min-width: 640px) {
  .login-emblem {
    width: 4rem;
    height: 4rem;
  }

  .login-brand .wordmark {
    font-size: 1.5rem;
  }

  .chat-logo {
    width: 4rem;
    height: 4rem;
  }

  .header-wordmark {
    font-size: 1.15rem;
  }
}

@media (min-width: 768px) {
  .messages { padding: 1.5rem; }
  .composer { padding: 0.85rem 1.25rem; }

  .chat-header {
    min-height: 5rem;
    padding: 0.5rem 1.25rem;
  }

  .chat-logo {
    width: 4.25rem;
    height: 4.25rem;
  }

  .header-wordmark {
    font-size: 1.2rem;
  }
}

/* ─── B2B business mode (romelapay-chat design) ───────────────────────── */

body.business-mode {
  --biz-brand: oklch(0.31 0.05 172);
  --biz-gold: oklch(0.83 0.135 85);
  --biz-gold-fg: oklch(0.26 0.04 172);
  --biz-canvas: oklch(0.955 0.014 92);
  --biz-bubble-in: oklch(1 0 0);
  --biz-bubble-out: oklch(0.92 0.06 150);
  --biz-bubble-out-fg: oklch(0.26 0.04 165);
  --green-header: #ffffff;
  --green-bg: var(--biz-canvas);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

body.business-mode.chat-active {
  background: var(--biz-canvas);
}

body.business-mode .chat-screen {
  background: var(--biz-canvas);
}

body.business-mode .chat-header {
  background: var(--green-header);
  border-bottom-color: var(--sage);
  box-shadow: 0 1px 3px oklch(0.2 0.04 172 / 8%);
}

body.business-mode .header-wordmark {
  font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.business-mode .chat-title .subtitle {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: none;
}

.business-verified-badge {
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--biz-gold, oklch(0.83 0.135 85));
  color: var(--biz-gold-fg, oklch(0.26 0.04 172));
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  letter-spacing: 0.02em;
  margin-right: 0.25rem;
}

body.business-mode .messages {
  background-color: var(--biz-canvas);
  background-image:
    radial-gradient(oklch(0.31 0.05 172 / 0.07) 1px, transparent 1px),
    radial-gradient(oklch(0.83 0.135 85 / 0.09) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 11px 11px;
  gap: 0.75rem;
  padding: 1rem 0.85rem 0.5rem;
}

body.business-mode .messages-inner {
  gap: 0.75rem;
}

body.business-mode .bubble {
  max-width: 88%;
  padding: 0.75rem 0.95rem;
  border-radius: 1.15rem;
  font-size: 0.875rem;
  position: relative;
}

body.business-mode .bubble.bot {
  background: var(--biz-bubble-in);
  color: oklch(0.24 0.03 170);
  border-bottom-left-radius: 0.35rem;
  box-shadow: 0 1px 3px oklch(0 0 0 / 5%);
}

body.business-mode .bubble.user {
  background: var(--biz-bubble-out);
  color: var(--biz-bubble-out-fg);
  border-bottom-right-radius: 0.35rem;
  box-shadow: none;
}

body.business-mode .bubble-time {
  margin-top: 0.35rem;
  text-align: right;
  font-size: 0.62rem;
  color: oklch(0.52 0.02 170);
  line-height: 1;
}

body.business-mode .bubble.user .bubble-time {
  color: oklch(0.4 0.04 165 / 70%);
}

body.business-mode .biz-chip {
  position: relative;
  overflow: hidden;
}

.biz-chip-working {
  pointer-events: none;
  opacity: 0.85;
}

.biz-chip-working::after {
  content: 'Working on it…';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: oklch(0.35 0.05 170);
  background: linear-gradient(
    110deg,
    transparent 0%,
    oklch(0.97 0.02 155 / 85%) 45%,
    transparent 90%
  );
  background-size: 200% 100%;
  animation: biz-chip-shimmer 1.1s ease-in-out infinite;
}

@keyframes biz-chip-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

body.business-mode .typing-indicator {
  background: var(--biz-bubble-in);
  border-bottom-left-radius: 0.35rem;
}

/* Footer — pills row + composer row (romelapay-chat layout) */
body.business-mode .chat-footer {
  background: var(--biz-canvas);
  border-top: none;
}

body.business-mode .quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 1px solid oklch(0.89 0.014 95);
  background: var(--biz-canvas);
  padding: 0.75rem 0.85rem;
  max-width: none;
  margin: 0;
}

body.business-mode .quick-replies:empty {
  display: none;
  border-top: none;
  padding: 0;
}

body.business-mode .composer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid oklch(0.89 0.014 95);
  background: var(--biz-canvas);
  padding: 0.75rem 0.85rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  max-width: 100%;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

body.business-mode .attach-btn {
  display: none !important;
}

body.business-mode .composer textarea {
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin: 0;
  border-radius: 999px;
  border: 1px solid oklch(0.89 0.014 95);
  background: #fff;
  padding: 0.625rem 1rem;
  font-size: 16px;
  line-height: 1.4;
  resize: none;
  overflow: hidden;
  box-shadow: none;
}

body.business-mode .composer textarea:focus {
  outline: none;
  border-color: oklch(0.34 0.055 172 / 50%);
  box-shadow: 0 0 0 3px oklch(0.34 0.055 172 / 12%);
}

body.business-mode .composer textarea:disabled {
  background: oklch(0.96 0.01 95);
  color: oklch(0.55 0.02 170);
  cursor: default;
  opacity: 1;
}

body.business-mode .composer textarea:read-only {
  color: oklch(0.52 0.02 170);
  cursor: default;
  opacity: 0.85;
}

body.business-mode .send-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  background: var(--biz-brand);
  border-radius: 999px;
  opacity: 1;
  transition: opacity 0.15s ease;
}

body.business-mode .send-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

body.business-mode .send-btn svg {
  width: 1rem;
  height: 1rem;
}

body.business-mode .biz-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid oklch(0.31 0.05 172 / 25%);
  background: oklch(0.94 0.016 95);
  color: oklch(0.31 0.05 172);
  font-weight: 500;
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 0.5rem 0.875rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.business-mode .biz-chip:hover {
  background: oklch(0.31 0.05 172);
  border-color: oklch(0.31 0.05 172);
  color: oklch(0.97 0.02 95);
}

body.business-mode .biz-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

body.business-mode .biz-chip-icon svg {
  width: 100%;
  height: 100%;
}

.bubble-card-wrap {
  margin-top: 0.5rem;
  max-width: 19rem;
}

body.business-mode .bubble.bot:has(.bubble-card-wrap:only-child) {
  background: var(--biz-bubble-in);
  box-shadow: 0 1px 3px oklch(0 0 0 / 5%);
  padding: 0.75rem 0.95rem;
}

.biz-card {
  border-radius: 1rem;
  border: 1px solid oklch(0.89 0.014 95);
  background: #fff;
  padding: 0.85rem 1rem;
  box-shadow: 0 2px 8px oklch(0 0 0 / 4%);
}

.biz-balance-card {
  background: var(--biz-brand, oklch(0.31 0.05 172));
  border-color: oklch(0.25 0.06 175);
  color: #fff;
}

.biz-card-kicker {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
  font-weight: 600;
}

.biz-card-title {
  margin: 0 0 0.65rem;
  font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: oklch(0.24 0.03 170);
}

.biz-card-amount {
  margin: 0.2rem 0 0;
  font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.15;
}

.biz-balance-card .biz-card-amount {
  color: var(--biz-gold, oklch(0.83 0.135 85));
}

.biz-card-amount.sm {
  font-size: 1.15rem;
}

.biz-card-meta {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  opacity: 0.78;
  line-height: 1.4;
}

.biz-card-dl {
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.biz-card-dl div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.biz-card-dl dt {
  margin: 0;
  color: oklch(0.52 0.02 170);
  font-weight: 500;
}

.biz-card-dl dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.biz-card-link-label {
  margin: 0.65rem 0 0.25rem;
  font-size: 0.72rem;
  color: oklch(0.52 0.02 170);
}

.biz-card-link {
  display: block;
  font-size: 0.75rem;
  color: oklch(0.34 0.055 172);
  font-weight: 600;
  word-break: break-all;
  text-decoration: none;
}

.biz-card-link:hover {
  text-decoration: underline;
}

.biz-txn-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.biz-txn-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid oklch(0.89 0.014 95);
}

.biz-txn-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.biz-txn-item:first-child {
  padding-top: 0;
}

.biz-txn-main {
  min-width: 0;
}

.biz-txn-party {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biz-txn-sub {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  color: oklch(0.52 0.02 170);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biz-txn-amt {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.biz-txn-amt.in { color: oklch(0.45 0.14 155); }
.biz-txn-amt.out { color: var(--danger); }

.biz-empty-card {
  text-align: center;
  font-size: 0.8rem;
  color: oklch(0.52 0.02 170);
}

.biz-invoice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.biz-invoice-code {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
}

.biz-invoice-party {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: oklch(0.52 0.02 170);
}

.biz-pill-status {
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: capitalize;
}

.biz-pill-status.pending {
  background: oklch(0.95 0.06 85);
  color: oklch(0.45 0.1 85);
}

.biz-invoice-link {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
}

.biz-invoice-link a {
  color: oklch(0.34 0.055 172);
  font-weight: 600;
}
