:root {
  --bg: #0c0f14;
  --surface: #151b24;
  --surface2: #1e2633;
  --border: #2a3444;
  --text: #eef2f7;
  --muted: #8b97a8;
  --accent: #8b5cf6;
  --accent-dim: #7c3aed;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --success: #22c55e;
  --failed: #ef4444;
  --credit: #22c55e;
  --debit: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: var(--line-height);
  background: radial-gradient(ellipse at top, #151b28 0%, var(--bg) 52%);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.login-form {
  padding-bottom: var(--space-5);
}

.login-form .form-row {
  padding: 10px 20px 0;
}

.login-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.login-form input,
.login-form select {
  width: 100%;
}

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

.filter {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.filter:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.auto-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.2;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

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

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success {
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
}

.badge-failed {
  background: rgba(231, 76, 60, 0.15);
  color: var(--failed);
}

.badge-muted {
  background: var(--surface2);
  color: var(--muted);
}

.badge-pending {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
}

.api-checkout-aside {
  position: sticky;
  top: 20px;
}

.api-checkout-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.checkout-card {
  background: linear-gradient(180deg, var(--surface2) 0%, var(--surface) 28%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.checkout-card.checkout-placeholder {
  text-align: center;
  padding: 32px 24px;
  border-style: dashed;
  background: var(--surface);
}

.checkout-placeholder-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
}

.checkout-placeholder-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.checkout-placeholder-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.checkout-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.checkout-brand-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checkout-brand {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.checkout-merchant {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.checkout-reference {
  margin: 6px 0 0;
  font-size: 0.82rem;
}

.checkout-preview-card .checkout-amount {
  font-size: 2rem;
}

.checkout-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.checkout-page-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
}

.checkout-preview-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
}

.checkout-result-compact {
  padding: 8px 0 4px;
}

.checkout-result-compact .checkout-success-icon,
.checkout-result-compact .checkout-expired-icon {
  width: 48px;
  height: 48px;
  font-size: 1.35rem;
}

.checkout-secure {
  font-size: 0.72rem;
}

.checkout-status {
  flex-shrink: 0;
  font-size: 0.62rem;
  padding: 4px 9px;
}

#checkoutBody {
  padding: 20px 20px 8px;
}

.checkout-amount-block {
  text-align: center;
  margin-bottom: 18px;
}

.checkout-amount {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.checkout-amount-sm {
  font-size: 1.5rem;
  margin-top: 4px;
}

.checkout-payee {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.checkout-scan-label {
  margin: 0 0 10px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.checkout-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 14px;
  margin: 0 auto 12px;
  max-width: 232px;
  background: #fff;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.checkout-qr {
  width: 100%;
  max-width: 200px;
  height: auto;
  aspect-ratio: 1;
  display: block;
}

.checkout-apps {
  text-align: center;
  margin: 0 0 16px;
  font-size: 0.75rem;
  line-height: 1.4;
}

.checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-open-upi {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
}

.checkout-upi-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.checkout-vpa {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--accent);
  word-break: break-all;
  background: none;
  padding: 0;
}

.checkout-copy-upi {
  flex-shrink: 0;
  padding: 5px 10px;
}

.checkout-result {
  text-align: center;
  padding: 12px 0 8px;
}

.checkout-success-icon,
.checkout-expired-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
}

.checkout-success-icon {
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
}

.checkout-expired-icon {
  background: rgba(241, 196, 15, 0.12);
  color: #f1c40f;
}

.checkout-success-msg,
.checkout-expired-msg {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.checkout-expired-hint {
  margin: 0;
  font-size: 0.85rem;
}

.checkout-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

.checkout-timer {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1c40f;
}

.checkout-timer-expired {
  color: var(--failed);
}

.checkout-footer-line {
  margin: 0;
  font-size: 0.72rem;
  text-align: center;
}

.checkout-payment-id {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.checkout-payment-id code {
  font-size: 0.68rem;
  color: var(--muted);
  word-break: break-all;
}

.checkout-paid {
  border-color: rgba(46, 204, 113, 0.35);
}

.checkout-expired {
  border-color: rgba(241, 196, 15, 0.25);
}

/* ——— Public checkout page ——— */
.checkout-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #1a2838 0%, var(--bg) 55%);
  padding: 24px 16px;
}

.checkout-shell {
  width: 100%;
  max-width: 420px;
}

.checkout-shell .checkout-card {
  width: 100%;
}

.checkout-powered {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.72rem;
}

.error-box {
  margin: 12px 16px 0;
  padding: 12px 14px;
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.35);
  border-radius: 8px;
  color: #ff8a80;
  font-size: 0.875rem;
  white-space: pre-wrap;
  line-height: 1.5;
}

.error-box-info {
  background: rgba(241, 196, 15, 0.1);
  border-color: rgba(241, 196, 15, 0.35);
  color: #f1c40f;
}

.error-box .error-hint {
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: 0.85rem;
}

.error-box .error-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.error-box .error-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.error-box .error-links a:hover {
  text-decoration: underline;
}

.loading {
  padding: 24px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.txn-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 70vh;
  overflow-y: auto;
}

.txn-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s ease;
}

.txn-item:hover,
.txn-item.active {
  background: var(--surface2);
}

.txn-item.active {
  border-left: 3px solid var(--accent);
  padding-left: 15px;
}

.txn-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 4px;
}

.txn-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.txn-right {
  text-align: right;
}

.txn-amount {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 6px;
}

.txn-amount.credit {
  color: var(--credit);
}

.txn-amount.debit {
  color: var(--text);
}

.detail-panel {
  min-height: 420px;
  position: relative;
}

.detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 12px;
  color: var(--accent);
}

.detail-content {
  padding: 20px 18px 24px;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.detail-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-amount {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.detail-desc {
  margin: 8px 0 4px;
  font-size: 1rem;
}

.detail-time {
  margin: 0 0 20px;
  font-size: 0.85rem;
}

.detail-grid {
  display: grid;
  gap: 14px;
}

.detail-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.detail-card h3 {
  margin: 0 0 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.detail-card dl {
  margin: 0;
}

.detail-card dt {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 10px;
}

.detail-card dt:first-child {
  margin-top: 0;
}

.detail-card dd {
  margin: 4px 0 0;
  font-size: 0.9rem;
  word-break: break-all;
}

.link-out {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}

.link-out:hover {
  text-decoration: underline;
}

/* Payment page */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
}

.btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
}

.payment-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

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

.qr-wrap {
  display: flex;
  justify-content: center;
  padding: 24px;
  background: #fff;
  margin: 16px;
  border-radius: 12px;
}

.qr-image {
  width: 220px;
  height: 220px;
}

.upi-info {
  text-align: center;
  padding: 0 18px 12px;
}

.payee-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.upi-id {
  font-family: monospace;
  color: var(--accent);
  margin: 0 0 12px;
}

.qr-hint {
  text-align: center;
  padding: 0 18px 18px;
  font-size: 0.85rem;
}

.form-row {
  padding: 12px 18px 0;
}

.form-row label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-row input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.95rem;
}

.password-field-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.password-field-wrap input {
  width: 100%;
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.password-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.password-toggle-icon {
  display: block;
}

.connect-layout .password-field-wrap input {
  padding-right: 44px;
}

.auth-form .password-field-wrap {
  width: 100%;
}

.verify-actions {
  display: flex;
  gap: 10px;
  padding: 16px 18px;
  flex-wrap: wrap;
}

.poll-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 18px 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.poll-status.waiting {
  background: var(--surface2);
  color: var(--muted);
}

.poll-status.polling {
  background: var(--accent-soft);
  color: var(--accent);
}

.poll-status.success {
  background: rgba(46, 204, 113, 0.12);
  color: var(--success);
}

.poll-status.error,
.poll-status.timeout {
  background: rgba(231, 76, 60, 0.12);
  color: var(--failed);
}

.poll-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.poll-status.polling .poll-dot {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.matched-txn {
  margin: 0 18px 18px;
  padding: 14px 16px;
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.3);
  border-radius: 10px;
}

.matched-txn h3 {
  margin: 0 0 10px;
  color: var(--success);
}

.matched-txn dl {
  margin: 0;
}

.matched-txn dt {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 8px;
}

.matched-txn dd {
  margin: 2px 0 0;
  font-size: 0.9rem;
  word-break: break-all;
}

/* Session banner */
.session-banner {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.5;
}

.session-banner.session-fresh {
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.35);
}

.session-banner.session-aging {
  background: rgba(243, 156, 18, 0.1);
  border-color: rgba(243, 156, 18, 0.35);
  color: #f5c842;
}

.session-banner.session-stale,
.session-banner.session-error {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.35);
  color: #ff8a80;
}

.session-banner.session-unknown {
  background: var(--surface);
  color: var(--muted);
}

.session-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.session-row .muted {
  font-size: 0.8rem;
}

.session-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.key-chip {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: monospace;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.key-chip.set {
  border-color: var(--success);
  color: var(--success);
}

.key-chip.missing {
  border-color: var(--failed);
  color: var(--failed);
}

.session-err {
  margin-top: 8px;
  font-size: 0.8rem;
  white-space: pre-wrap;
}

.session-banner .session-login-link {
  margin-top: 8px;
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.session-banner .session-login-link:hover {
  text-decoration: underline;
}

.session-banner.session-logged-out {
  background: rgba(231, 76, 60, 0.14);
  border-color: rgba(231, 76, 60, 0.45);
}

.session-banner.session-logged-out strong {
  color: #e74c3c;
}

.session-account {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.session-account code {
  color: var(--text);
}

.session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  align-items: center;
}

.session-headed-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.session-headed-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.logged-out-alert {
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #e74c3c;
  font-size: 0.9rem;
}

.logged-out-alert.hidden {
  display: none;
}

.merchants-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

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

.merchant-list {
  padding: 4px 0 8px;
}

.merchant-card {
  display: block;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
}

.merchant-card:last-child {
  margin-bottom: 0;
}

.merchant-card.active {
  border-color: rgba(46, 204, 113, 0.45);
  box-shadow: inset 0 0 0 1px rgba(46, 204, 113, 0.15);
}

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

.merchant-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.merchant-card-title strong {
  font-size: 1rem;
}

.merchant-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 12px;
  word-break: break-all;
}

.merchant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.btn.danger {
  color: #e74c3c;
  border-color: rgba(231, 76, 60, 0.4);
}

.merchant-tag {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Login / Connect */
.login-layout {
  max-width: 520px;
  margin: 0 auto;
}

.connect-layout {
  max-width: 640px;
  margin: 0;
  width: 100%;
}

.connect-layout .login-panel {
  width: 100%;
}

.connect-layout .amazon-connect-header {
  padding: 24px 28px 14px;
}

.connect-layout .login-form .form-row {
  padding: 12px 28px 0;
}

.connect-layout .login-form input,
.connect-layout .login-form select {
  padding: 12px 14px;
  font-size: 0.975rem;
}

.connect-layout .checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px 0;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
}

.connect-layout .checkbox-row input {
  width: auto;
  accent-color: var(--accent);
}

.connect-layout .login-form > .btn-block {
  margin: 18px 28px 0;
  width: calc(100% - 56px);
  padding: 12px 16px;
}

.connect-layout .login-note,
.connect-layout .error-box {
  margin-left: 28px;
  margin-right: 28px;
}

.amazon-connect-header {
  padding: 20px 18px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.amazon-wordmark {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  position: relative;
  padding-bottom: 6px;
}

.amazon-word {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  text-transform: lowercase;
}

.amazon-tld {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
}

.amazon-wordmark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 8%;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, #ff9900 8%, #ff9900 92%, transparent 100%);
  border-radius: 999px;
  transform: scaleY(0.55);
}

.amazon-connect-tagline {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.btn-amazon {
  background: linear-gradient(180deg, #ffb84d 0%, #ff9900 100%);
  border-color: #e88b00;
  color: #111;
  font-weight: 600;
}

.btn-amazon:hover {
  filter: brightness(1.06);
  color: #111;
}

.login-note {
  padding: 12px 20px 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.cookie-import {
  margin: 16px 20px 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

.cookie-import summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
  list-style: none;
}

.cookie-import summary::-webkit-details-marker {
  display: none;
}

.cookie-import .login-form {
  margin-top: 12px;
}

.amazon-browser-connect {
  margin: 0 20px 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.amazon-browser-connect-lead {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.amazon-browser-connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.amazon-finish-steps {
  margin: 0 20px 12px;
  font-size: 0.875rem;
  color: var(--muted);
}

.amazon-finish-steps ol {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.6;
}

.amazon-finish-actions {
  margin: 0 20px 16px;
}

.amazon-extension-help {
  padding: 20px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.amazon-extension-help ol {
  padding-left: 1.2rem;
}

.login-remember {
  padding-top: 8px !important;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.checkbox-label input {
  accent-color: var(--accent);
}

.login-step {
  margin: 16px 18px;
  padding: 16px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.login-step.hidden {
  display: none;
}

.login-step h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.login-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
}

.login-progress .poll-dot {
  animation: pulse 1s infinite;
}

.login-success {
  margin: 12px 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.35);
  color: var(--success);
  font-size: 0.875rem;
  white-space: pre-wrap;
}

.auth-success-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 16px 18px;
  padding: 20px 22px;
  border-radius: 12px;
  background: rgba(46, 204, 113, 0.18);
  border: 2px solid rgba(46, 204, 113, 0.55);
  animation: authPop 0.4s ease;
}

.auth-success-banner.hidden {
  display: none;
}

.auth-success-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-success-banner strong {
  display: block;
  font-size: 1.1rem;
  color: var(--success);
  margin-bottom: 6px;
}

.auth-success-detail {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.5;
}

@keyframes authPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.api-example {
  margin: 12px 18px;
  padding: 12px;
  background: var(--surface2);
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: pre-wrap;
  overflow-x: auto;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: block;
}

/* ——— Dashboard layout ——— */
.dashboard-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 6px 10px 28px;
}

.sidebar-logo-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.sidebar-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sidebar-logo-mark {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sidebar-domain {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: var(--surface2);
  color: var(--text);
}

.sidebar-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-icon {
  opacity: 0.7;
  font-size: 0.85rem;
}

.sidebar-profile {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 8px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.profile-card:hover {
  background: var(--surface2);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-meta strong {
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-meta span {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout {
  margin-top: 8px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.dashboard-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: var(--space-6) var(--space-8) var(--space-8);
  max-width: none;
}

.dashboard-main:has(.api-docs-layout) {
  max-width: 1360px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.page-header-text {
  min-width: 0;
}

.page-title {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-desc {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
  max-width: 52ch;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.profile-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .dashboard {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: unset;
    order: 3;
    width: 100%;
  }
  .sidebar-profile {
    margin-left: auto;
    border-top: none;
    padding-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .sidebar-logout {
    margin-top: 0;
  }
  .dashboard-main {
    padding: 20px 16px 32px;
  }
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

/* ——— Auth pages ——— */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #1a2838 0%, var(--bg) 55%);
}

.auth-shell {
  width: 100%;
  max-width: 420px;
  padding: 24px 20px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.auth-logo-mark {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.auth-tagline {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.auth-domain {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.85;
}

.auth-card {
  padding: 28px 24px;
}

.auth-heading {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 600;
}

.auth-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.auth-form .form-row {
  padding: 0;
  margin-bottom: 16px;
}

.auth-form .form-row input {
  width: 100%;
}

.auth-row-between {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 12px;
}

.auth-link {
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.875rem;
}

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

.auth-reset-link {
  margin-top: 12px;
  text-align: center;
}

.auth-reset-link a {
  color: var(--accent);
}

/* Custom confirm dialog (replaces native browser alert) */
body.confirm-open {
  overflow: hidden;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 12, 18, 0.72);
  backdrop-filter: blur(4px);
}

.confirm-overlay[hidden] {
  display: none !important;
}

.confirm-dialog {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.confirm-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 600;
}

.confirm-message {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

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

.confirm-actions .btn.danger {
  background: var(--failed);
  border-color: var(--failed);
  color: #fff;
}

.confirm-actions .btn.danger:hover {
  filter: brightness(1.08);
}

/* Simplified flows */
.accounts-simple {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accounts-panel {
  padding: 12px 14px 14px;
}

.add-account-details {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.add-account-details .login-form .form-row input {
  background: var(--bg);
}

.add-account-summary {
  padding: 14px 18px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  list-style: none;
}

.add-account-summary::-webkit-details-marker {
  display: none;
}

.add-account-details[open] .add-account-summary {
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.empty-state {
  text-align: center;
  padding: 32px 20px;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 16px;
}

.merchant-card-main {
  flex: 1;
  min-width: 200px;
}

.merchant-upi-form {
  margin: 0 0 4px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.upi-form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.upi-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 520px) {
  .upi-form-row {
    grid-template-columns: 1fr;
  }
}

.upi-form-row input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.875rem;
}

.upi-save-btn {
  margin-top: 10px;
}

.merchant-upi-set {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0 0 0 8px;
}

.error-actions {
  margin: 12px 0 0;
}

.error-actions .btn {
  margin-top: 8px;
}

.api-key-toast,
.toast-success {
  margin: 12px 14px 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(46, 204, 113, 0.12);
  color: var(--success);
  font-size: 0.875rem;
}

.toast-error {
  margin: 12px 14px 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(231, 76, 60, 0.12);
  color: var(--failed);
  font-size: 0.875rem;
}

.connect-done-body {
  padding: 24px 18px 28px;
  text-align: center;
}

.connect-done-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(46, 204, 113, 0.15);
  color: var(--success);
  font-size: 1.75rem;
  line-height: 56px;
}

.connect-done-body h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.connect-email {
  margin: 0;
  word-break: break-all;
}

.connect-done-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.login-loader {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 18px;
  text-align: center;
}

.login-loader.active,
.htmx-request .login-loader.htmx-indicator {
  display: flex;
}

.login-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: #ff9900;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.login-loader p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.payment-simple {
  display: grid;
  gap: 16px;
  max-width: 420px;
}

.poll-auto-row {
  padding: 8px 18px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
}

.poll-auto-row input {
  accent-color: var(--accent);
}

.poll-actions {
  flex-direction: column;
}

.poll-actions .btn {
  width: 100%;
}

.poll-status.idle {
  background: rgba(139, 156, 179, 0.1);
  border-color: var(--border);
}

.poll-status.idle .poll-dot {
  background: var(--muted);
  animation: none;
}

.poll-hint {
  margin: 0 18px 12px;
  font-size: 0.82rem;
}

.qr-placeholder {
  padding: 20px 18px 24px;
  text-align: center;
}

.payment-checkout-link {
  text-align: center;
  padding: 8px 0 4px;
}

.payment-checkout-amount {
  margin: 0 0 4px;
  font-size: 1.75rem;
  font-weight: 700;
}

.payment-checkout-merchant {
  margin: 0 0 14px;
  font-size: 0.85rem;
}

.payment-checkout-hint {
  margin: 12px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.payment-checkout-id {
  margin: 10px 0 0;
  font-size: 0.72rem;
}

.payment-checkout-id code {
  word-break: break-all;
}

.qr-placeholder p {
  margin: 0;
  font-size: 0.875rem;
}

.qr-head {
  text-align: center;
  padding: 12px 18px 0;
  font-size: 0.9rem;
}

.login-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.95rem;
}

.api-docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .api-docs-layout {
    grid-template-columns: 1fr;
  }

  .api-checkout-aside {
    order: -1;
  }
}

.api-docs {
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.api-docs .panel {
  padding: 0;
}

.api-account-form {
  padding-bottom: 0;
}

.api-account-form .form-row {
  padding: 20px 22px 0;
}

.api-key-block {
  padding: 8px 22px 22px;
}

.api-key-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.api-key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.api-key-value {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  word-break: break-all;
  color: var(--accent);
}

.api-key-hint {
  margin: 10px 0 0;
  font-size: 0.82rem;
}

.api-key-hint code {
  color: var(--text);
}

.api-endpoint {
  padding: 22px 24px 24px;
}

.api-endpoint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.api-endpoint-head h2 {
  margin: 0;
}

.api-endpoint h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
}

.api-endpoint p {
  margin: 0 0 14px;
  font-size: 0.875rem;
  line-height: 1.55;
}

.api-example {
  margin: 4px 0 0;
  padding: 16px 18px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
}

.api-example code {
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.api-run-loading {
  padding: 10px 22px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.api-guide-download-desc {
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.api-run-result {
  margin: 12px 22px 0;
}

.api-run-split {
  padding: 0 22px 22px;
}

.api-run-result.error {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(231, 76, 60, 0.12);
  color: var(--failed);
  font-size: 0.875rem;
}

.api-run-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.api-response {
  max-height: 320px;
  overflow: auto;
}

.activity-account-form {
  padding-bottom: 0;
}

.orders-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 900px;
}

.orders-filters {
  padding-bottom: 0;
}

.orders-status-filters {
  margin-top: 4px;
}

.orders-empty {
  padding: 24px 18px;
  margin: 0;
  font-size: 0.9rem;
}

.order-list .order-item {
  cursor: default;
}

.order-list .order-item:hover {
  background: var(--surface2);
}

.order-id {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  background: none;
  padding: 0;
}

.order-expires {
  margin: 4px 0 0;
  font-size: 0.75rem;
}

.api-inline-form {
  margin-bottom: 12px;
}

.api-inline-row {
  display: flex;
  gap: 8px;
}

.api-inline-row input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
}

.session-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.875rem;
}

.session-strip.session-fresh,
.session-strip.session-connected {
  border-color: rgba(46, 204, 113, 0.35);
}

.session-strip.session-error,
.session-strip.session-logged-out {
  border-color: rgba(231, 76, 60, 0.35);
}

.session-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.session-fresh .session-dot,
.session-connected .session-dot {
  background: var(--success);
}

.session-error .session-dot,
.session-logged-out .session-dot {
  background: var(--failed);
}

.session-strip-text {
  flex: 1;
  color: var(--muted);
}

.session-strip-text strong {
  color: var(--text);
}

.session-strip-text a {
  color: var(--accent);
}

.session-strip-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 8px;
}

.session-strip-btn:hover {
  color: var(--text);
}
