/* Imported only by non-checkout screens. These colors match the Connect Account form. */
html.account-ui {
  --account-ink: #163d31;
  --account-action: #0b4837;
  --account-line: #e3e9e3;
  --account-surface: #f6f8f5;
  --account-radius: 16px;
}
.account-ui body { font-family: Inter, system-ui, sans-serif; }
.account-ui :is(.dashboard-main,.admin-main) { background: var(--account-surface); min-inline-size: 0; }
.account-ui :is(.page-title,.section-title,.card-title) { color: var(--account-ink); letter-spacing: -.035em; }
.account-ui :is(.admin-body,.dashboard-body) :is(.card,.content-card,.stat-card) {
  border: 1px solid var(--account-line);
  border-radius: var(--account-radius);
  box-shadow: 0 3px 12px rgb(24 60 38 / 3%);
}
.account-ui :is(.btn-primary,.zx-button:not(.zx-button-outline,.zx-button-light)) {
  --bs-btn-bg: var(--account-action);
  --bs-btn-hover-bg: #073929;
  background: var(--account-action); color: white;
}
.account-ui :is(input,select,textarea,.table-responsive,.zx-table-scroll) { max-inline-size: 100%; }
.account-ui :is(.user-info,.page-title,.section-title,.cc-field-hint,.alert,.card-body) { overflow-wrap: anywhere; }
.account-ui :is(.table-responsive,.zx-table-scroll,.param-table-wrapper) { overflow-x: auto; }
.account-ui :is(button,a,input,select,textarea,summary):focus-visible {
  outline: 3px solid #468b70; outline-offset: 3px;
}
.account-ui .zx-hero h1 { font-size: clamp(2.7rem, 5.8vw, 5.7rem); line-height: 1.03; }
.account-ui .zx-hero-art { background: #eff4ec; border: 1px solid var(--account-line); }
.account-ui .zx-qr-card { box-shadow: 0 16px 48px rgb(20 60 40 / 12%); }
.account-ui .param-table { border-collapse: collapse; width: 100%; }
.account-ui .param-table :is(td,th) { padding: .65rem; border-bottom: 1px solid var(--account-line); text-align: start; }
.account-ui :is(.brand,.zx-brand) img { flex: none; object-fit: contain; }

/* Shared workspace shell: keep the drawer and topbar usable at every width. */
.account-ui :is(.dashboard-sidebar,.admin-sidebar).offcanvas-lg {
  width: min(304px, 88vw);
  min-width: min(304px, 88vw);
  background: #fff !important;
  border-right: 1px solid #dfe8e1;
  box-shadow: 18px 0 44px rgb(14 55 39 / 10%);
}
.account-ui :is(.dashboard-sidebar,.admin-sidebar) :is(.sidebar-logo,.sidebar-brand) {
  min-height: 76px; height: 76px; padding-inline: 18px;
  border-bottom-color: #e6eee8;
}
.account-ui :is(.dashboard-sidebar,.admin-sidebar) :is(.brand-icon,.logo-icon) img {
  width: 32px; height: 32px; display: block;
}
.account-ui :is(.dashboard-sidebar,.admin-sidebar) :is(.logo-title,.brand-info h5) {
  color: var(--account-ink); font-size: 19px; letter-spacing: -.04em;
}
.account-ui :is(.dashboard-sidebar,.admin-sidebar) :is(.logo-badge,.admin-badge-pill) { color: #6a7d72; }
.account-ui :is(.dashboard-sidebar,.admin-sidebar) .sidebar-nav { padding: 14px 12px 22px; }
.account-ui :is(.dashboard-sidebar,.admin-sidebar) :is(.nav-section-label,.sidebar-label) {
  color: #80968a; margin: 22px 0 7px; padding-inline: 10px;
}
.account-ui :is(.dashboard-sidebar,.admin-sidebar) :is(.sidebar-menu-link,.nav-link) {
  min-height: 42px; padding: 9px 11px; color: #53675d; border-radius: 10px;
}
.account-ui :is(.dashboard-sidebar,.admin-sidebar) :is(.sidebar-menu-link,.nav-link) > :is(svg,i) {
  width: 18px; height: 18px; color: #9bb4a5;
}
.account-ui :is(.dashboard-sidebar,.admin-sidebar) :is(.sidebar-menu-item.active>.sidebar-menu-link,.nav-link.active) {
  color: #0b4837; background: #eaf3e8; box-shadow: inset 3px 0 0 #8aad3b;
}
.account-ui :is(.dashboard-sidebar,.admin-sidebar) :is(.sidebar-menu-item.active>.sidebar-menu-link,.nav-link.active) > :is(svg,i) { color: #0b4837; }
.account-ui :is(.dashboard-sidebar,.admin-sidebar) .sidebar-footer { padding: 12px; background: #fff; border-top-color: #e2ebe4; }
.account-ui :is(.dashboard-sidebar,.admin-sidebar) :is(.sidebar-user,.admin-badge) { background: #f0f6ed; border: 1px solid #dfeadf; }

/* Topbar clipping was caused by the title flex item retaining its intrinsic width. */
.account-ui :is(.dashboard-topbar,.admin-topbar) { min-width: 0; overflow: visible; }
.account-ui :is(.dashboard-topbar,.admin-topbar) .topbar-left { min-width: 0; overflow: visible; }
.account-ui :is(.dashboard-topbar,.admin-topbar) .topbar-title { min-width: 0; overflow: hidden; }
.account-ui :is(.dashboard-topbar,.admin-topbar) .topbar-right { min-width: 0; flex-shrink: 0; overflow: visible; }
.account-ui :is(.dashboard-topbar,.admin-topbar) .topbar-user-btn { min-width: 40px; min-height: 40px; overflow: visible; }
.account-ui :is(.dashboard-topbar,.admin-topbar) .topbar-user-info { min-width: 0; }
.account-ui :is(.dashboard-topbar,.admin-topbar) .topbar-avatar { width: 36px; height: 36px; flex-basis: 36px; }
.account-ui .zx-header-brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.account-ui .zx-header-brand img { width: 28px; height: 28px; border-radius: 8px; }
.account-ui .zx-header-brand strong { font-size: 16px; color: var(--account-ink); white-space: nowrap; }

/* Alert and bot screens use one compact, responsive card language. */
.account-ui .zx-alert-workspace, .account-ui .zx-bot-page { max-width: 1180px; }
.account-ui .zx-channel-icon, .account-ui .zx-bot-icon { width: 42px; height: 42px; border-radius: 12px; }
.account-ui .zx-alert-channel input:not([type=checkbox]) { min-height: 46px; }
.account-ui .zx-bot-hero { background: linear-gradient(135deg, #0b4837 0%, #15583f 68%, #1b6a4b 100%); }
.account-ui .zx-bot-flow { background: rgb(255 255 255 / 6%); }
.account-ui .zx-bot-flow h3 { color: #dceee2; }
.account-ui .zx-bot-page .zx-bot-package, .account-ui .zx-bot-page .zx-bot-env { border-color: var(--account-line); }
.account-ui .zx-bot-page .zx-bot-env table { min-width: 560px; }

/* Documentation and API examples stay readable instead of collapsing into the viewport. */
.account-ui .docs { grid-template-columns: 176px minmax(0, 1fr); gap: 32px; }
.account-ui .docs .toc { padding: 10px; border: 1px solid var(--account-line); border-radius: 14px; background: #fff; }
.account-ui .docs .toc a { padding: 7px 9px; border-radius: 8px; color: #53675d; }
.account-ui .docs .toc a:hover { background: #edf5ee; color: var(--account-ink); text-decoration: none; }
.account-ui .docs pre { overflow-x: auto; white-space: pre; word-break: normal; }
.account-ui .docs .param-table-wrapper { overflow-x: auto; }

.account-ui .zx-developer-links { align-items: stretch; }
.account-ui .zx-developer-links a { min-height: 44px; }
.account-ui .card-custom .tab-content { min-width: 0; }
.account-ui .card-custom .code-block { max-width: 100%; overflow: hidden; }
.account-ui .card-custom .code-block .zx-code-card-body { max-width: 100%; overflow-x: auto; }
.account-ui .card-custom .code-block pre { min-width: 560px; max-width: none; white-space: pre; overflow-x: visible; }
.account-ui .card-custom .code-block code { word-break: normal; overflow-wrap: normal; }
.account-ui .card-custom .nav-tabs { margin-inline: 0; }
@media (max-width: 767px) {
  .account-ui .card-custom .code-block pre { min-width: 500px; font-size: 12px; }
  .account-ui .zx-developer-links a { width: 100%; justify-content: space-between; }
}

/* Landing QR card: restrained depth with a safe reduced-motion fallback. */
.account-ui .zx-qr-card { transform-style: preserve-3d; transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease; will-change: transform; }
.account-ui .zx-qr-card::before { content: ''; position: absolute; inset: 10px; border: 1px solid rgb(255 255 255 / 70%); border-radius: inherit; transform: translateZ(-1px); pointer-events: none; }
.account-ui .zx-qr-card::after { content: ''; position: absolute; inset: auto 12% -18px; height: 24px; border-radius: 50%; background: rgb(21 88 63 / 18%); filter: blur(13px); transform: translateZ(-5px); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .account-ui .zx-qr-card { transform: none !important; transition: none; will-change: auto; } }
@media (max-width: 767px) {
  .account-ui :is(.form-control,.form-select,.cc-input,.form-control-custom) { font-size: 16px; min-height: 44px; }
  .account-ui :is(.btn,.sidebar-toggle,.topbar-btn,.cc-secret-field button) { min-height: 44px; }
  .account-ui .cc-dialog { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
  .account-ui :is(.filters,.filter-bar,.page-actions) { flex-wrap: wrap; gap: .5rem; }
  .account-ui :is(.filter-bar,.page-actions) > * { min-width: 0; max-width: 100%; }
  .account-ui :is(.dashboard-main,.admin-main)>.container-fluid { padding: 22px 16px 36px !important; }
  .account-ui .zx-bot-hero { padding: 24px 20px; }
  .account-ui .zx-bot-hero h2 { font-size: clamp(28px, 8vw, 36px); }
  .account-ui .zx-alert-channel { padding: 20px; }
  .account-ui .docs { gap: 18px; }
  .account-ui .docs .toc { display: flex; flex-wrap: wrap; gap: 4px; position: static; }
}
