/* ==========================================================================
   IntelliDB Download Portal - Customer UI Components (portal-user.css)
   Ownership: customer/public UI components and customer-scoped overrides only.
   Loaded after assets/css/style.css (legacy shared primitives/safety net).
   ========================================================================= */

:root {
  --idb-u-text-strong: #0f172a;
  --idb-u-text-body: #334155;
  --idb-u-text-muted: #64748b;
  --idb-u-accent-1: #4f46e5;
  --idb-u-accent-2: #0ea5e9;
  --idb-u-font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Type scale tokens */
:root {
  --idb-text-xs:   0.72rem;
  --idb-text-sm:   0.82rem;
  --idb-text-base: 0.92rem;
  --idb-text-md:   1rem;
  --idb-text-lg:   1.15rem;
  --idb-text-xl:   1.35rem;
  --idb-text-2xl:  1.65rem;
  --idb-lh-ui:     1.2;
  --idb-lh-body:   1.45;
  --idb-lh-prose:  1.6;
}

/* Radius tokens */
:root {
  --idb-u-radius-sm:   8px;
  --idb-u-radius-md:   12px;
  --idb-u-radius-lg:   14px;
  --idb-u-radius-pill: 999px;
}

/* Utilities */
.idb-flex { display: flex; }
.idb-flex-wrap { flex-wrap: wrap; }
.idb-items-center { align-items: center; }
.idb-items-baseline { align-items: baseline; }
.idb-nowrap { white-space: nowrap; }

.idb-gap-8 { gap: 8px; }

.idb-mt-4 { margin-top: 4px !important; }
.idb-mt-6 { margin-top: 6px !important; }
.idb-mt-8 { margin-top: 8px !important; }
.idb-mt-10 { margin-top: 10px !important; }
.idb-mt-12 { margin-top: 12px !important; }
.idb-mt-16 { margin-top: 16px !important; }
.idb-mb-10 { margin-bottom: 10px !important; }

.idb-text-xs { font-size: var(--idb-text-sm); }
.idb-text-sm { font-size: var(--idb-text-base); }
.idb-text-body { color: var(--idb-u-text-body); }
.idb-text-muted { color: var(--idb-u-text-muted); }
.idb-text-strong { color: var(--idb-u-text-strong); }
.idb-text-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.idb-block { display: block; }
.idb-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.idb-link-inherit { color: inherit; text-decoration: underline; }
.idb-link-underline { text-decoration: underline; }

/* Common components */
.idb-page-subtitle,
.idb-subtitle {
  color: var(--idb-u-text-muted);
  line-height: 1.55;
}

.idb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.idb-card-body { display: block; }

.idb-actionbar,
.idb-form-actions,
.idb-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.idb-actionbar {
  align-items: baseline;
  justify-content: space-between;
}

.idb-actions--right { justify-content: flex-end; }

.idb-empty {
  padding: 10px 12px;
  border-radius: var(--idb-u-radius-md);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--idb-u-text-muted);
  font-size: var(--idb-text-base);
}

.idb-note-block {
  color: #6b7280;
  font-size: var(--idb-text-sm);
  line-height: 1.4;
}

.idb-meta-line {
  margin-top: 2px;
  font-size: var(--idb-text-sm);
  line-height: 1.35;
  color: var(--idb-u-text-muted);
}
.idb-meta-line--muted { color: var(--idb-u-text-muted); }
.idb-meta-line--warn { color: #92400e; }
.idb-meta-line--bad { color: #b91c1c; }
.idb-meta-line--good { color: #166534; }

.idb-stack-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Table helpers */
.idb-table-cell-empty {
  text-align: center;
  padding: 10px;
  color: var(--idb-u-text-muted);
}

.idb-table-updates-fixed {
  table-layout: fixed;
  width: 100%;
}

.idb-section-block { margin-top: 14px; }
.idb-section-block--lg { margin-top: 18px; }
.idb-section-heading-sm {
  margin: 0 0 8px 0;
  font-size: var(--idb-text-md);
}

.idb-license-section-title {
  margin: 0 0 6px 0;
}

.idb-license-section-desc {
  margin: 0 0 10px 0;
  font-size: var(--idb-text-base);
}

/* Badge helpers */
.idb-badge--kind-subscription {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1d4ed8;
  font-size: var(--idb-text-xs);
}
.idb-badge--kind-perpetual {
  background: #f1f5ff;
  border-color: #93c5fd;
  color: #1e3a8a;
  font-size: var(--idb-text-xs);
}
.idb-badge--ats-expired {
  background: #fee2e2;
  border: 1px solid #b91c1c;
  color: #b91c1c;
}

/* Customer shell (single source of truth).
   De-framed: the shell is a plain container so the sections inside are the
   single visible card layer (was page-center > shell-frame > section-frame >
   table-frame; now page-center > section). Explicit box-shadow:none overrides
   the base .idb-user-portal-shell shadow in style.css. */
.idb-body-customer .idb-user-portal-shell {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* Shared customer sections */
.idb-body-customer .idb-user-portal .idb-user-section {
  background: #f7f9fd;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  /* Tighter vertical rhythm — the airy 16px + 12px gaps stacked into a sparse page. */
  padding: 12px 14px;
}

.idb-body-customer .idb-user-portal .idb-user-section + .idb-user-section {
  margin-top: 8px;
}

.idb-body-customer .idb-overview-shell {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

/* Inside the overview grid the row `gap` owns ALL vertical spacing between the
   metrics strip, the license-alert bar and the welcome panel. Scope the reset to
   the grid's direct children and give it three-class specificity so it beats the
   standalone rules that appear later in this file — .idb-lic-alert (margin:
   10px 0 14px) and .idb-metric-strip (margin-bottom: 6px) — which otherwise
   re-inflated these gaps to ~24px and made them uneven. */
.idb-body-customer .idb-overview-shell > .idb-overview-panel,
.idb-body-customer .idb-overview-shell > .idb-overview-alert,
.idb-body-customer .idb-overview-shell > .idb-metric-strip {
  margin: 0;
}

.idb-body-customer .idb-workspace .idb-workspace-head {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  margin: 0 0 12px;
  padding: 0 0 10px;
}

.idb-body-customer .idb-workspace .idb-user-section-title {
  margin: 0 0 6px 0;
}

.idb-body-customer .idb-workspace .idb-user-section-subtitle {
  margin: 0;
}

.idb-body-customer .idb-user-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 10px;
}

/* Shared customer list pager (download_history and future customer lists) */
.idb-body-customer .idb-user-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}
.idb-body-customer .idb-user-pager-info {
  font-size: var(--idb-text-sm);
  color: var(--idb-u-text-muted);
  padding: 0 6px;
}
.idb-body-customer .idb-user-pager .is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Download-history table: its columns are single atomic tokens (timestamp /
   version / receipt number), so keep them on one line and let them size to
   content. (The generic 220px cap now targets only .idb-table-actions-col, so
   the receipt column is no longer capped.) */
.idb-body-customer.idb-page-download-history table.idb-table th,
.idb-body-customer.idb-page-download-history table.idb-table td {
  white-space: nowrap;
}
/* Package name is the one descriptive column — let it take the slack / wrap
   if unusually long, so it doesn't force horizontal scroll. */
.idb-body-customer.idb-page-download-history table.idb-table td:nth-child(2) {
  white-space: normal;
  width: 100%;
}

.idb-body-customer .idb-user-header-email span:first-child { color: #475569; font-weight: 600; }
.idb-body-customer .idb-user-header-email span:last-child { color: var(--idb-u-text-strong); font-weight: 700; }

.idb-body-customer .idb-user-intro {
  color: var(--idb-u-text-body);
  line-height: 1.55;
  margin-top: 6px;
  margin-bottom: 8px;
}

.idb-body-customer .idb-license-row-primary {
  background-color: #f1f5ff;
}

.idb-body-customer .idb-primary-license-pill {
  margin: 4px 0 8px;
  padding: 8px 12px;
  border-radius: var(--idb-u-radius-pill);
  background: rgba(241, 245, 249, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.68);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
  display: flex;
  justify-content: space-between;
  gap: 8px 12px;
}
.idb-body-customer .idb-primary-license-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.idb-body-customer .idb-primary-license-label { font-size: var(--idb-text-base); font-weight: 600; }
.idb-body-customer .idb-primary-license-detail { font-size: var(--idb-text-sm); color: var(--idb-u-text-muted); }
.idb-body-customer .idb-primary-license-pill .idb-badge { flex-shrink: 0; }

.idb-body-customer .idb-lic-alert {
  border-radius: var(--idb-u-radius-md);
  padding: 10px 14px;
  margin: 10px 0 14px;
  font-size: var(--idb-text-base);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #ffffff;
  color: var(--idb-u-text-body);
}
.idb-body-customer .idb-lic-alert--expiring {
  border-color: rgba(161,98,7,0.35);
  background: #fffaf0;
}
.idb-body-customer .idb-lic-alert--expired {
  border-color: rgba(185,28,28,0.35);
  background: #fff7f7;
}

.idb-body-customer .idb-user-portal .idb-user-support-note {
  margin-top: 12px;
}

/* Metric strip */
.idb-body-customer .idb-metric-strip {
  margin-bottom: 6px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.idb-body-customer .idb-metric-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.idb-body-customer .idb-metric-card {
  position: relative;
  overflow: hidden;
  flex: 1 1 190px;
  min-width: 190px;
  padding: 14px 14px 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-left: 3px solid #94a3b8; /* neutral accent; colour reserved for semantics */
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #ffffff;
}
.idb-body-customer .idb-metric-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
  pointer-events: none;
}
/* Suppress anchor hover styling — metric cards are <a> tags */
a.idb-metric-card:hover,
a.idb-metric-card:visited {
  text-decoration: none;
  color: inherit;
}
a.idb-metric-card:hover {
  box-shadow: 0 4px 14px rgba(15,23,42,0.10), inset 0 1px 0 rgba(255,255,255,0.90);
  transform: translateY(-1px);
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}

/* Downloads + Total Licenses are neutral counts (no semantic colour). */
.idb-body-customer .idb-metric-card--downloads,
.idb-body-customer .idb-metric-card--total-licenses {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.10);
  border-left-color: #94a3b8;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
/* "Active / usable" is a genuine health signal — keep it green (crisp, not pale). */
.idb-body-customer .idb-metric-card--active {
  background: #f5fdf8;
  border-color: rgba(15, 23, 42, 0.10);
  border-left: 3px solid #16a34a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.idb-body-customer .idb-metric-label {
  font-size: var(--idb-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--idb-u-text-muted);
}
.idb-body-customer .idb-metric-value {
  font-size: var(--idb-text-2xl);
  font-weight: 700;
  color: var(--idb-u-text-strong);
  line-height: 1.15;
  margin-top: 2px;
}
.idb-body-customer .idb-metric-sub {
  font-size: var(--idb-text-sm);
  color: #475569;
  line-height: 1.35;
}

/* profile.php scoped helpers */
.idb-body-customer.idb-page-profile .idb-user-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px 0;
}
.idb-body-customer.idb-page-profile .idb-user-section-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: var(--idb-u-radius-pill);
  background: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.14);
}
.idb-body-customer.idb-page-profile .idb-company-box {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: var(--idb-u-radius-lg);
  overflow: hidden;
}
.idb-body-customer.idb-page-profile .idb-company-box::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--idb-u-accent-1) 0%, var(--idb-u-accent-2) 100%);
}
.idb-body-customer.idb-page-profile .idb-company-box dl {
  margin: 0;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px 14px;
}
@media (max-width: 720px) {
  .idb-body-customer.idb-page-profile .idb-company-box dl {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
.idb-body-customer.idb-page-profile .idb-company-box dt {
  font-size: var(--idb-text-sm);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--idb-u-text-muted);
  margin: 0;
}
.idb-body-customer.idb-page-profile .idb-company-box dd {
  margin: 0;
  font-size: var(--idb-text-base);
  color: var(--idb-u-text-strong);
  line-height: 1.35;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.10);
}
.idb-body-customer.idb-page-profile .idb-company-box dd:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.idb-body-customer.idb-page-profile .idb-readonly-note {
  display: inline-block;
  margin-left: 8px;
  font-size: var(--idb-text-xs);
  color: var(--idb-u-text-muted);
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: var(--idb-u-radius-pill);
  padding: 2px 8px;
  vertical-align: middle;
}

.idb-env-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--idb-u-radius-pill);
  font-size: var(--idb-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.idb-env-badge-staging {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}
.idb-env-badge-production {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #16a34a;
}

/* Public unsubscribe topbar */
.idb-public-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
}
.idb-public-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.idb-public-topbar-brand-name {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.idb-public-topbar-meta {
  font-size: var(--idb-text-base);
  color: #6b7280;
}

/* download_ack.php page basics */
.idb-ack-page {
  --idb-accent-1: var(--idb-u-accent-1);
  --idb-accent-2: var(--idb-u-accent-2);
  background: #f6f7fb;
  color: var(--idb-u-text-strong);
  font-family: var(--idb-u-font-sans);
}
.idb-ack-page .wrap {
  max-width: 860px;
  margin: 28px auto;
  padding: 0 16px;
}
.idb-ack-page.idb-ack-kickoff .wrap {
  max-width: 760px;
  margin-top: 32px;
}
.idb-ack-page .card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--idb-u-radius-lg);
  box-shadow: 0 6px 24px rgba(15,23,42,.06);
  padding: 18px;
}
.idb-ack-page .h1 {
  font-weight: 800;
  margin: 0 0 6px;
}
.idb-ack-page.idb-ack-kickoff .h1 { font-size: var(--idb-text-lg); }
.idb-ack-page:not(.idb-ack-kickoff) .h1 { font-size: var(--idb-text-xl); }
.idb-ack-page .sub {
  color: #475569;
  font-size: var(--idb-text-sm);
  margin: 0 0 14px;
}
.idb-ack-page.idb-ack-kickoff .sub { margin-bottom: 0; }
.idb-ack-page .muted {
  color: var(--idb-u-text-muted);
  font-size: var(--idb-text-xs);
  margin-top: 10px;
}
.idb-ack-page .ack-help {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #dbe3ee;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--idb-u-text-muted);
  font-size: var(--idb-text-xs);
}
.idb-ack-page .ack-help a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1d4ed8;
  text-decoration: none;
}
.idb-ack-page .ack-help a:hover { text-decoration: underline; }
.idb-ack-page .box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--idb-u-radius-md);
  padding: 12px;
  margin: 12px 0;
}
.idb-ack-page .box pre {
  white-space: pre-wrap;
  margin: 0;
  font-family: ui-sans-serif, system-ui;
  font-size: var(--idb-text-sm);
  line-height: 1.45;
  color: var(--idb-u-text-strong);
}
.idb-ack-page .row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.idb-ack-page .ack-row-top {
  justify-content: space-between;
  align-items: center;
}
.idb-ack-page .pill {
  display: inline-block;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #1e3a8a;
  padding: 4px 10px;
  border-radius: var(--idb-u-radius-pill);
  font-size: var(--idb-text-xs);
  font-weight: 700;
}
.idb-ack-page .ack-pill-title { margin-bottom: 10px; }
.idb-ack-page .ack-eula-title { font-size: var(--idb-text-base); margin-bottom: 8px; }
.idb-ack-page .ack-eula-linkline { font-size: var(--idb-text-sm); }
.idb-ack-page .err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 12px;
  border-radius: var(--idb-u-radius-md);
  margin: 12px 0;
  font-size: var(--idb-text-sm);
}
.idb-ack-page label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0;
  font-size: var(--idb-text-base);
}
.idb-ack-page input[type="checkbox"] { margin-top: 2px; }
.idb-ack-page .btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.idb-ack-page .btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: var(--idb-u-radius-md);
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
/* The consent screen renders outside .idb-body-customer, so it doesn't inherit the
   customer focus ring — and base CSS strips outlines globally. Restore a visible
   focus indicator on its actions and the consent checkbox for keyboard users. */
.idb-ack-page .btn:focus-visible,
.idb-ack-page input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
}
/* Collapsed audit/technical details on the consent screen — keep the legal view
   human-readable, with the hashes/slugs tucked away. */
.idb-ack-page .ack-audit {
  margin-top: 6px;
}
.idb-ack-page .ack-audit summary {
  cursor: pointer;
  font-size: 0.85em;
}
.idb-ack-page .ack-audit > .muted {
  margin-top: 4px;
  word-break: break-all;
}
.idb-ack-page .btn-primary { color: #fff; } /* background set below (gradient) */
.idb-ack-page .btn-ghost {
  background: #e2e8f0;
  color: var(--idb-u-text-strong);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.idb-ack-page iframe {
  width: 0;
  height: 0;
  border: 0;
  position: absolute;
  left: -9999px;
  top: -9999px;
}

@media (prefers-reduced-motion: reduce) {
  .idb-body-customer * {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   Customer UI Refresh Layer (uniform polish + icons)
   ========================================================= */
.idb-body-customer {
  --idb-accent-1: var(--idb-u-accent-1);
  --idb-accent-2: var(--idb-u-accent-2);
  --idb-accent-soft: #eef2ff;
  --idb-success-soft: #ecfdf5;
  --idb-success-text: #166534;
  --idb-warn-soft: #fffbeb;
  --idb-warn-text-2: #92400e;
  --idb-danger-soft: #fef2f2;
  --idb-danger-text-2: #b91c1c;
}

.idb-body-customer .idb-main {
  background:
    radial-gradient(900px 240px at 10% 0%, rgba(79,70,229,.06), transparent 60%),
    radial-gradient(900px 240px at 95% 0%, rgba(14,165,233,.06), transparent 60%),
    var(--idb-bg, #e4eaf2);
  padding-top: 18px;
}

.idb-body-customer .idb-page-center {
  width: min(1320px, 100%);
  margin-inline: auto;
  padding-inline: clamp(16px, 2vw, 22px);
}

.idb-body-customer .idb-form-narrow {
  width: min(720px, 100%);
}

.idb-body-customer .idb-card,
.idb-body-customer .idb-user-section {
  border-radius: var(--idb-u-radius-md);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.idb-body-customer .idb-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.idb-body-customer .idb-card-login {
  position: relative;
  overflow: hidden;
}

.idb-body-customer .idb-card-login::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--idb-accent-1), var(--idb-accent-2));
}

.idb-body-customer .idb-page-title h1,
.idb-body-customer .idb-page-title h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
}

.idb-body-customer .idb-subtitle {
  color: #5b6476;
}

/* ==========================================================================
   Customer alerts (standard)
   ========================================================================== */
.idb-body-customer .idb-alert {
  border-radius: var(--idb-u-radius-md);
  padding: 12px 14px;
  border-width: 1px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.idb-body-customer .idb-alert-error {
  background: var(--idb-danger-soft);
  color: var(--idb-danger-text-2);
  border-color: #fecaca;
}

.idb-body-customer .idb-alert-success {
  background: var(--idb-success-soft);
  color: var(--idb-success-text);
  border-color: #a7f3d0;
}

.idb-body-customer .idb-alert-info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.idb-body-customer .idb-alert-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fef3c7;
}

.idb-body-customer .idb-alert-danger {
  background: var(--idb-danger-soft);
  color: var(--idb-danger-text-2);
  border-color: #fecaca;
}

.idb-body-customer .idb-btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.idb-body-customer .idb-tabs {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--idb-u-radius-lg);
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 12px;
}

.idb-body-customer .idb-tab {
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 600;
  color: #475569;
  text-align: center;
}

.idb-body-customer .idb-tab:hover {
  background: #eef2ff;
  color: #3730a3;
  text-decoration: none;
}

.idb-body-customer .idb-tab-active {
  background: var(--idb-u-accent-1);
  color: #ffffff;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}

/* ==========================================================================
   Customer tables (standard)
   ========================================================================== */
.idb-body-customer .idb-table {
  border-collapse: separate;
  border-spacing: 0;
}

.idb-body-customer .idb-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--idb-u-text-body);
  border-bottom: 1px solid #dbe3ee;
}

.idb-body-customer .idb-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.idb-body-customer .idb-table tbody tr:hover td {
  background: #f3f7fc;
}

.idb-body-customer .idb-user-table-scroll,
.idb-body-customer .idb-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.idb-body-customer .idb-user-table-scroll .idb-table {
  min-width: 960px;
}

.idb-body-customer .idb-table-wrap .idb-table {
  min-width: 980px;
}

.idb-body-customer .idb-user-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--idb-u-text-strong);
  font-weight: 700;
}

.idb-body-customer .idb-user-section-title h2,
.idb-body-customer .idb-user-section-title h3 {
  color: inherit;
  font-weight: inherit;
}

.idb-body-customer .idb-user-section-title .idb-icon {
  color: var(--idb-u-accent-1);
}

.idb-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: -0.15em;
}

.idb-icon-xs {
  width: 0.92rem;
  height: 0.92rem;
}

.idb-icon-lg {
  width: 1.15rem;
  height: 1.15rem;
}

.idb-title-icon {
  color: var(--idb-accent-1);
  background: rgba(79,70,229,.10);
  border: 1px solid rgba(79,70,229,.12);
  border-radius: 10px;
  padding: 4px;
  width: 1.6rem;
  height: 1.6rem;
}

.idb-body-customer .idb-btn .idb-icon,
.idb-ack-page .btn .idb-icon,
.idb-ack-page .pill .idb-icon {
  vertical-align: -0.2em;
}

.idb-body-customer .idb-user-support-note .idb-icon,
.idb-body-customer .idb-note-block .idb-icon,
.idb-body-customer .idb-public-topbar-meta .idb-icon {
  margin-right: 6px;
  color: #6366f1;
}

.idb-body-customer .idb-customer-support-wrap {
  max-width: 1480px;
  margin: 18px auto 0;
  padding: 0 10px;
}

.idb-body-customer .idb-customer-support {
  background:
    radial-gradient(600px 140px at 0% 0%, rgba(79,70,229,.12), transparent 60%),
    radial-gradient(600px 140px at 100% 0%, rgba(14,165,233,.10), transparent 60%),
    #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.idb-body-customer .idb-customer-support__lead {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.idb-body-customer .idb-customer-support__lead > .idb-icon {
  color: #1d4ed8;
  margin-top: 1px;
}

.idb-body-customer .idb-customer-support__title {
  margin: 0 0 4px 0;
  font-size: var(--idb-text-base);
  line-height: 1.25;
}

.idb-body-customer .idb-customer-support__text {
  margin: 0;
  color: var(--idb-u-text-muted);
  font-size: var(--idb-text-sm);
  line-height: 1.45;
}

.idb-body-customer .idb-customer-support__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.idb-body-customer .idb-footer {
  background: transparent;
}

.idb-body-customer .idb-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.idb-body-customer .idb-footer-line {
  opacity: .8;
}

.idb-body-customer .idb-footer-text {
  color: var(--idb-u-text-muted);
  font-size: var(--idb-text-sm);
}

.idb-body-customer .idb-public-topbar-inner {
  border-radius: var(--idb-u-radius-lg);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 22px rgba(15,23,42,.05);
  margin: 12px auto 0;
  max-width: 1040px;
}

.idb-body-customer .idb-public-topbar-meta a {
  color: #1d4ed8;
}

.idb-ack-page .card {
  border-top: 4px solid rgba(37, 99, 235, .8);
}

/* Align to the unified flat royal-blue primary (was an indigo->sky gradient). */
.idb-ack-page .btn-primary {
  background: #1d4ed8;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}
.idb-ack-page .btn-primary:hover {
  background: #1e40af;
}

.idb-ack-page .btn-ghost {
  border: 1px solid #dbe3ee;
}

@media (max-width: 1023px) {
  .idb-body-customer .idb-metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .idb-body-customer .idb-customer-support {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .idb-body-customer .idb-customer-support__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .idb-body-customer .idb-page-center {
    padding-inline: 14px;
  }
  .idb-body-customer .idb-metric-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .idb-body-customer .idb-user-table-scroll .idb-table {
    min-width: 760px;
  }
  .idb-body-customer .idb-table-wrap .idb-table {
    min-width: 780px;
  }
  .idb-body-customer .idb-tabs {
    grid-template-columns: 1fr;
  }
  .idb-body-customer .idb-public-topbar-inner {
    border-radius: var(--idb-u-radius-md);
    margin-inline: 10px;
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 1024px) {
  .idb-body-customer .idb-metric-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

/* =========================================================
   Customer button variants + sticky help/resources row
   ========================================================= */
.idb-body-customer .idb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: var(--idb-u-radius-sm);
  border: 1px solid transparent;
  font-size: var(--idb-text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}

.idb-body-customer .idb-btn:hover {
  transform: translateY(-0.5px);
  text-decoration: none;
}

.idb-body-customer .idb-btn:active {
  transform: translateY(0);
}

.idb-body-customer .idb-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.idb-body-customer .idb-btn-primary {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.idb-body-customer .idb-btn-primary:hover {
  background: #1e40af;
  border-color: #1e40af;
  filter: none;
}

.idb-body-customer .idb-btn-secondary {
  background: #f8fafc;
  color: #1f2937;
  border-color: #c2cfdf;
  box-shadow: none;
}

.idb-body-customer .idb-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--idb-u-text-strong);
}

.idb-body-customer .idb-btn-help {
  background: #eff6ff;
  color: #1e3a8a;
  border-color: #bfdbfe;
  box-shadow: none;
}

.idb-body-customer .idb-btn-help:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.idb-body-customer .idb-btn-danger {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.idb-body-customer .idb-btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

.idb-body-customer .idb-btn[aria-disabled="true"],
.idb-body-customer .idb-btn:disabled,
.idb-disabled {
  opacity: .58;
  box-shadow: none;
  pointer-events: none;
}

/* Profile request buttons: use the standard flat blue primary (was gradient
   indigo + gradient teal — profile was the only page with gradient CTAs). */
.idb-body-customer.idb-page-profile .idb-actions .idb-btn-accent-blue,
.idb-body-customer.idb-page-profile .idb-actions .idb-btn-accent-green {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.idb-body-customer.idb-page-profile .idb-actions .idb-btn-accent-blue:hover,
.idb-body-customer.idb-page-profile .idb-actions .idb-btn-accent-green:hover {
  background: #1e40af;
  border-color: #1e40af;
  color: #ffffff;
}

.idb-body-customer.idb-page-profile .idb-actions .idb-btn .idb-icon {
  color: currentColor;
}

/* Legacy fallback (minimal): helpbar/pills rendered without customer body scope */
.idb-header-helpbar {
  display: block;
}

.idb-header-helpbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.idb-help-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

.idb-help-pill:hover,
.idb-help-pill-active,
.idb-help-pill-active:hover {
  text-decoration: none;
}

/* ==========================================================================
   Customer Header Helpbar + Pills (STANDARD)
   ========================================================================== */
/* Sticky blocker fix:
   sticky must be on the outer slot (direct body child), not the inner helpbar,
   otherwise the child is constrained by a same-height parent and never sticks. */
.idb-body-customer .idb-header-helpbar-slot {
  position: sticky;
  top: 0;
  z-index: 60;
}

.idb-body-customer .idb-header-helpbar {
  position: static;
  top: auto;
  z-index: auto;
  background: rgba(237, 242, 248, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.05);
}

.idb-body-customer .idb-header-helpbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  width: min(1480px, 100%);
  padding: 6px clamp(16px, 2vw, 22px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.idb-body-customer .idb-header-helpbar .idb-help-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--idb-u-radius-pill);
  border: 1px solid #d3dbeb;
  background: linear-gradient(180deg, #ffffff, #fafcff);
  font-size: var(--idb-text-sm);
  color: var(--idb-u-text-body);
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.035);
}

.idb-body-customer .idb-header-helpbar .idb-help-pill:hover {
  background: linear-gradient(180deg, #f2f6fc, #e9f0fa);
  border-color: rgba(79,70,229,.22);
  color: #312e81;
  text-decoration: none;
}

.idb-body-customer .idb-header-helpbar .idb-help-pill-active {
  background: linear-gradient(135deg, rgba(79,70,229,.19), rgba(14,165,233,.13));
  border-color: rgba(79,70,229,.34);
  color: #2b2a78;
  font-weight: 700;
  box-shadow: 0 5px 12px rgba(79,70,229,.10);
}

.idb-body-customer .idb-header-helpbar .idb-help-pill-active:hover {
  background: linear-gradient(135deg, rgba(79,70,229,.14), rgba(14,165,233,.10));
  border-color: rgba(79,70,229,.28);
  color: #312e81;
}

.idb-body-customer .idb-header-helpbar .idb-help-pill .idb-icon {
  color: var(--idb-u-text-muted);
}

.idb-body-customer .idb-header-helpbar .idb-help-pill[href^="mailto:"] .idb-icon {
  color: #475569;
}

.idb-body-customer .idb-header-helpbar .idb-help-pill-active .idb-icon {
  color: #1d4ed8;
}

.idb-body-customer .idb-header-helpbar .idb-help-pill-support {
  background: linear-gradient(180deg, #eef5ff, #e7f0ff);
  border-color: rgba(79,70,229,.20);
  color: #312e81;
}

.idb-body-customer .idb-header-helpbar .idb-help-pill-support .idb-icon {
  color: var(--idb-u-accent-1);
}

.idb-body-customer .idb-header-helpbar .idb-help-pill-divider {
  width: 1px;
  height: 20px;
  border-radius: var(--idb-u-radius-pill);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.12), rgba(100, 116, 139, 0.55), rgba(148, 163, 184, 0.12));
  margin-inline: 2px;
}

.idb-body-customer .idb-header-helpbar .idb-help-contact-menu {
  display: inline-block;
  position: relative;
}

.idb-body-customer .idb-header-helpbar .idb-help-pill-contact-menu {
  list-style: none;
  cursor: pointer;
}

.idb-body-customer .idb-header-helpbar .idb-help-pill-contact-menu::-webkit-details-marker {
  display: none;
}

.idb-body-customer .idb-header-helpbar .idb-help-contact-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  padding: 6px;
  border-radius: var(--idb-u-radius-md);
  border: 1px solid #d3dbeb;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 4px;
  z-index: 90;
}

.idb-body-customer .idb-header-helpbar .idb-help-contact-menu-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--idb-u-radius-sm);
  color: var(--idb-u-text-body);
  text-decoration: none;
  font-size: var(--idb-text-sm);
  line-height: 1.2;
}

.idb-body-customer .idb-header-helpbar .idb-help-contact-menu-item:hover {
  background: #eef4ff;
  color: #312e81;
  text-decoration: none;
}

.idb-body-customer .idb-header-helpbar .idb-help-pill-signout {
  margin-left: 8px;
  background: linear-gradient(180deg, #fff5f5, #feeceb);
  border-color: rgba(220, 38, 38, 0.28);
  color: #b91c1c;
}

.idb-body-customer .idb-header-helpbar .idb-help-pill-signout .idb-icon {
  color: #b91c1c;
}

.idb-body-customer .idb-header-helpbar .idb-help-pill-signout:hover {
  background: linear-gradient(180deg, #ffe8e8, #fee2e2);
  border-color: rgba(220, 38, 38, 0.36);
  color: #b91c1c;
}

@media (max-width: 720px) {
  .idb-body-customer .idb-header-helpbar-inner {
    justify-content: center;
  }
  .idb-body-customer .idb-header-helpbar .idb-help-pill-divider {
    display: none;
  }
}

/* ==========================================================================
   Customer badges (standard)
   ========================================================================== */
/* Intentional override layer: normalizes the earlier generic customer .idb-badge
   block into semantic status badges without changing selector ownership. */
/* Status badge normalization (customer pages only) */
.idb-body-customer .idb-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: var(--idb-u-radius-pill);
  border: 1px solid transparent;
  font-size: var(--idb-text-xs);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.idb-body-customer .idb-badge-active {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0;
}

.idb-body-customer .idb-badge-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.idb-body-customer .idb-badge-grace {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.idb-body-customer .idb-badge-trial {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.idb-body-customer .idb-badge-inactive {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}
.idb-body-customer .idb-badge-muted {
  background: #f8fafc;
  color: var(--idb-u-text-muted);
  border-color: #e2e8f0;
}

.idb-body-customer .idb-badge-expired {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.idb-body-customer .idb-badge-suspended {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.idb-body-customer .idb-badge-locked {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.idb-body-customer .idb-badge--ats-expired {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* Auth step indicator (request → set). State classes replace inline styles so
   the state colours survive the enforced CSP (which strips style="" attrs). */
.idb-body-customer .idb-step-indicator {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.idb-body-customer .idb-step-indicator__step {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--idb-text-sm);
  font-weight: 600;
  color: #94a3b8;
}
.idb-body-customer .idb-step-indicator__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--idb-text-xs);
  font-weight: 700;
  background: #e2e8f0;
  color: #94a3b8;
}
.idb-body-customer .idb-step-indicator__line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
}
.idb-body-customer .idb-step-indicator__step.is-active { color: var(--idb-u-accent-1); }
.idb-body-customer .idb-step-indicator__step.is-active .idb-step-indicator__num { background: var(--idb-u-accent-1); color: #fff; }
.idb-body-customer .idb-step-indicator__step.is-done { color: #16a34a; }
.idb-body-customer .idb-step-indicator__step.is-done .idb-step-indicator__num { background: #16a34a; color: #fff; }
.idb-body-customer .idb-step-indicator__line.is-done { background: #16a34a; }

/* Thin divider used at the foot of the auth cards. */
.idb-body-customer .idb-auth-divider {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* CSP-safe replacements for former inline style="" attributes. */
.idb-body-customer a.idb-metric-card { text-decoration: none; cursor: pointer; }
.idb-body-customer .idb-otp-sent-notice { font-size: var(--idb-text-sm); color: #166534; }
.idb-body-customer .idb-inline-form { display: inline; }
.idb-body-customer .idb-btn-inline-icon { display: inline-flex; align-items: center; gap: 6px; }
.idb-body-customer .idb-mt-3 { margin-top: 3px; }
.idb-body-customer .idb-mt-14 { margin-top: 14px; }

/* Empty-state component */
.idb-body-customer .idb-empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.38);
  background:
    radial-gradient(380px 90px at 0% 0%, rgba(79,70,229,.05), transparent 65%),
    radial-gradient(380px 90px at 100% 0%, rgba(14,165,233,.05), transparent 65%),
    #fbfdff;
  border-radius: var(--idb-u-radius-lg);
  padding: 14px 16px;
  color: #475569;
  text-align: left;
}

.idb-body-customer .idb-empty-state--compact {
  display: inline-block;
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 12px;
}

.idb-body-customer .idb-empty-state__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--idb-u-text-strong);
  font-weight: 700;
  font-size: var(--idb-text-base);
}

.idb-body-customer .idb-empty-state__title .idb-icon {
  color: var(--idb-u-accent-1);
}

.idb-body-customer .idb-empty-state__text {
  margin-top: 6px;
  font-size: var(--idb-text-sm);
  line-height: 1.45;
  color: var(--idb-u-text-muted);
}

.idb-body-customer .idb-table-cell-empty {
  padding: 12px 10px;
}

.idb-body-customer .idb-table-cell-empty > .idb-empty-state {
  text-align: left;
}

.idb-body-customer .idb-locked-hint {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.idb-body-customer .idb-locked-hint .idb-badge {
  min-height: 22px;
  padding: 2px 8px;
  font-size: var(--idb-text-xs);
}

.idb-body-customer .idb-locked-hint .idb-meta-line {
  max-width: 34ch;
  text-align: right;
  margin-top: 0;
}

/* Shared alert content layout (used across download.php + updates.php) */
.idb-body-customer .idb-alert__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: inherit;
}

.idb-body-customer .idb-alert__body {
  margin-top: 6px;
  line-height: 1.45;
}

.idb-body-customer .idb-alert__body > div + div {
  margin-top: 4px;
}

.idb-body-customer .idb-alert__title .idb-icon {
  color: currentColor;
  flex-shrink: 0;
}

/* Form field styling (customer-only, minimal-risk) */
.idb-body-customer .idb-form-group {
  margin-bottom: 12px;
}

.idb-body-customer .idb-form-group:last-child {
  margin-bottom: 0;
}

.idb-body-customer .idb-form-group label,
.idb-body-customer .idb-label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: var(--idb-text-sm);
  font-weight: 700;
  color: var(--idb-u-text-body);
  letter-spacing: 0.01em;
}

.idb-body-customer .idb-input,
.idb-body-customer input.idb-input,
.idb-body-customer textarea.idb-input,
.idb-body-customer select.idb-input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: var(--idb-u-radius-md);
  border: 1px solid #dbe3ee;
  background: #fbfcff;
  color: var(--idb-u-text-strong);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.idb-body-customer .idb-input::placeholder {
  /* Darkened from #94a3b8 (~2.9:1, fails WCAG AA) to ~4.6:1 so placeholder
     guidance is legible for low-vision users. */
  color: var(--idb-u-text-muted);
}

.idb-body-customer .idb-input:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.idb-body-customer .idb-input:focus {
  outline: 0;
  border-color: rgba(37, 99, 235, 0.45);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13), inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.idb-body-customer .idb-input:disabled,
.idb-body-customer .idb-input[disabled] {
  background: #f8fafc;
  color: var(--idb-u-text-muted);
  border-color: #e2e8f0;
  cursor: not-allowed;
}

.idb-body-customer .idb-helptext {
  margin-top: 6px;
  font-size: var(--idb-text-sm);
  line-height: 1.35;
  color: var(--idb-u-text-muted);
}

.idb-body-customer .idb-field-error {
  margin-top: 6px;
  font-size: var(--idb-text-sm);
  line-height: 1.35;
  color: #b91c1c;
}

.idb-body-customer .idb-input-wrap {
  position: relative;
}

.idb-body-customer .idb-input-wrap .idb-input {
  padding-right: 72px;
}

.idb-body-customer .idb-input-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 1px solid #dbe3ee;
  background: #ffffff;
  color: #475569;
  border-radius: 9px;
  padding: 4px 8px;
  font-size: var(--idb-text-xs);
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

.idb-body-customer .idb-input-toggle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--idb-u-text-body);
}

.idb-body-customer .idb-input-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.35);
}

body.idb-body-customer.idb-page-login .idb-login-mode-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px 0;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, #fbfdff, #f8fbff);
  border-radius: 10px;
  color: #475569;
  font-size: var(--idb-text-sm);
  line-height: 1.35;
}

body.idb-body-customer.idb-page-login .idb-login-mode-note .idb-icon {
  color: var(--idb-u-accent-1);
  flex-shrink: 0;
}

body.idb-body-customer.idb-page-login .idb-login-help-details {
  margin-top: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #fafbfd;
  border-radius: 9px;
  padding: 7px 10px;
  border-color: #e2e8f0;
}

body.idb-body-customer.idb-page-login .idb-login-help-details summary {
  cursor: pointer;
  color: var(--idb-u-text-muted);
  font-size: var(--idb-text-xs);
  font-weight: 600;
  list-style: none;
}

body.idb-body-customer.idb-page-login .idb-login-help-details summary::-webkit-details-marker {
  display: none;
}

body.idb-body-customer.idb-page-login .idb-login-help-details summary::before {
  content: "+";
  display: inline-block;
  width: 12px;
  margin-right: 6px;
  color: var(--idb-u-text-muted);
}

body.idb-body-customer.idb-page-login .idb-login-help-details[open] summary::before {
  content: "-";
}

body.idb-body-customer.idb-page-login .idb-login-help-details .idb-helptext {
  margin-top: 8px;
  margin-bottom: 0;
  font-size: var(--idb-text-xs);
  color: var(--idb-u-text-muted);
}

body.idb-body-customer.idb-page-login .idb-login-assist {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(229, 231, 235, 1);
}

body.idb-body-customer.idb-page-login .idb-login-assist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.idb-body-customer.idb-page-login .idb-btn-sm {
  padding: 6px 10px;
  font-size: var(--idb-text-sm);
  border-radius: 10px;
}

@media (max-width: 640px) {
  body.idb-body-customer.idb-page-login .idb-login-assist {
    align-items: stretch;
  }

  body.idb-body-customer.idb-page-login .idb-login-assist-actions {
    width: 100%;
  }

  body.idb-body-customer.idb-page-login .idb-login-assist-actions .idb-btn {
    flex: 1 1 auto;
  }
}

/* Login page enterprise polish (scoped to customer login only) */
body.idb-body-customer.idb-page-login .idb-header {
  border-bottom-color: #e5e7eb;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

body.idb-body-customer.idb-page-login .idb-header-inner {
  max-width: 760px;
  padding: 7px clamp(16px, 2vw, 22px);
  gap: 9px;
  justify-content: center;
  align-items: center;
}

body.idb-body-customer.idb-page-login .idb-logo {
  display: flex;
  align-items: flex-end;
}

body.idb-body-customer.idb-page-login .idb-logo-img {
  height: 40px;
}

body.idb-body-customer.idb-page-login .idb-header-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.15;
}

body.idb-body-customer.idb-page-login .idb-header-title h1,
body.idb-body-customer.idb-page-login .idb-title-text {
  margin: 0;
  font-size: var(--idb-text-base);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #1f2937;
  text-align: left;
}

body.idb-body-customer.idb-page-login .idb-env-badge {
  margin-left: 0;
  padding: 1px 7px;
  font-size: var(--idb-text-xs);
  letter-spacing: 0.04em;
  border-radius: var(--idb-u-radius-pill);
}

body.idb-body-customer.idb-page-login .idb-env-badge-staging {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

body.idb-body-customer.idb-page-auth .idb-main {
  background:
    radial-gradient(720px 180px at 12% 0%, rgba(79,70,229,.035), transparent 64%),
    radial-gradient(720px 180px at 88% 0%, rgba(14,165,233,.03), transparent 64%),
    #f3f4f6;
  padding-top: 10px;
  padding-bottom: 12px;
}

body.idb-body-customer.idb-page-auth .idb-page-center {
  width: min(760px, 100%);
  padding-inline: clamp(16px, 2vw, 22px);
}

body.idb-body-customer.idb-page-auth .idb-form-narrow {
  width: min(760px, 100%);
}

body.idb-body-customer.idb-page-auth .idb-card-login {
  max-width: 520px;
  border-radius: var(--idb-u-radius-md);
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  padding: 22px 22px 20px;
  background: #fff;
}

body.idb-body-customer.idb-page-auth .idb-card-login::before {
  height: 1px;
  opacity: 0.35;
}

body.idb-body-customer.idb-page-auth .idb-page-title {
  margin-bottom: 2px;
}

body.idb-body-customer.idb-page-auth .idb-page-title h2 {
  margin: 0 0 4px 0;
  font-size: var(--idb-text-xl);
  font-weight: 600;
  line-height: 1.25;
  gap: 8px;
}

body.idb-body-customer.idb-page-auth .idb-page-title .idb-title-icon {
  color: var(--idb-u-text-strong);
}

body.idb-body-customer.idb-page-auth .idb-subtitle {
  margin: 0 0 12px 0;
  font-size: var(--idb-text-base);
  color: var(--idb-u-text-muted);
  line-height: 1.4;
}

body.idb-body-customer.idb-page-login .idb-alert {
  margin-bottom: 10px;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: var(--idb-text-sm);
  line-height: 1.35;
  border-left-width: 3px;
  box-shadow: none;
}

body.idb-body-customer.idb-page-login .idb-tabs {
  margin: 10px 0 14px;
  padding: 3px;
  gap: 3px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  box-shadow: none;
}

body.idb-body-customer.idb-page-login .idb-tab {
  border-radius: var(--idb-u-radius-sm);
  padding: 9px 12px;
  font-size: var(--idb-text-sm);
  font-weight: 600;
  color: var(--idb-u-text-muted);
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}

body.idb-body-customer.idb-page-login .idb-tab:hover {
  background: #f1f5f9;
  color: var(--idb-u-text-body);
}

body.idb-body-customer.idb-page-login .idb-tab:focus-visible {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

body.idb-body-customer.idb-page-login .idb-tab-active,
body.idb-body-customer.idb-page-login .idb-tab-active:hover,
body.idb-body-customer.idb-page-login .idb-tab-active:link,
body.idb-body-customer.idb-page-login .idb-tab-active:visited {
  background: #ffffff;
  color: var(--idb-u-text-strong);
  border-color: #dbe3ee;
  box-shadow: inset 0 -2px 0 #a5b4fc;
}

body.idb-body-customer.idb-page-login .idb-form-group {
  margin-bottom: 14px;
}

body.idb-body-customer.idb-page-login .idb-form-group label {
  margin-bottom: 6px;
  font-size: var(--idb-text-sm);
  font-weight: 600;
  color: var(--idb-u-text-body);
}

body.idb-body-customer.idb-page-login .idb-input,
body.idb-body-customer.idb-page-login .idb-select {
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 10px;
  border-color: #d1d5db;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.02);
}

body.idb-body-customer.idb-page-login .idb-input:hover,
body.idb-body-customer.idb-page-login .idb-select:hover {
  border-color: #cbd5e1;
}

body.idb-body-customer.idb-page-login .idb-input::placeholder {
  color: #94a3b8;
}

body.idb-body-customer.idb-page-login .idb-input:focus,
body.idb-body-customer.idb-page-login .idb-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

body.idb-body-customer.idb-page-login .idb-input-wrap .idb-input {
  padding-right: 80px;
}

body.idb-body-customer.idb-page-login .idb-input-toggle {
  right: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: var(--idb-u-radius-sm);
  font-size: var(--idb-text-xs);
  box-shadow: none;
}

body.idb-body-customer.idb-page-login .idb-input-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  border-color: #93c5fd;
}

body.idb-body-customer.idb-page-login .idb-field-help {
  margin-top: 6px;
  font-size: var(--idb-text-xs);
  line-height: 1.35;
  color: var(--idb-u-text-muted);
}

body.idb-body-customer.idb-page-login .idb-field-error {
  margin-top: 6px;
  font-size: var(--idb-text-xs);
}

body.idb-body-customer.idb-page-login .idb-form-actions {
  margin-top: 12px;
  gap: 10px;
  justify-content: flex-start;
}

body.idb-body-customer.idb-page-login .idb-form-actions .idb-btn {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: var(--idb-text-sm);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  gap: 6px;
  box-shadow: none;
}

body.idb-body-customer.idb-page-login .idb-form-actions .idb-btn .idb-icon {
  width: 0.9rem;
  height: 0.9rem;
}

body.idb-body-customer.idb-page-login .idb-form-actions .idb-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

body.idb-body-customer.idb-page-login .idb-btn-login-otp-send.idb-btn-secondary,
body.idb-body-customer.idb-page-login .idb-btn-login-otp-verify.idb-btn-secondary {
  background: #fff;
  color: var(--idb-u-text-body);
  border: 1px solid #e2e8f0;
  min-width: 124px;
}

body.idb-body-customer.idb-page-login .idb-btn-login-otp-send.idb-btn-secondary:hover,
body.idb-body-customer.idb-page-login .idb-btn-login-otp-verify.idb-btn-secondary:hover {
  background: #f8fafc;
  border-color: #c0cad8;
  color: var(--idb-u-text-strong);
}

body.idb-body-customer.idb-page-login .idb-btn-login-otp-send.idb-btn-primary,
body.idb-body-customer.idb-page-login .idb-btn-login-otp-verify.idb-btn-primary,
body.idb-body-customer.idb-page-login .idb-form-actions .idb-btn-primary {
  background: #1d4ed8;
  border: 1px solid #1e40af;
  color: #f8fafc;
  min-width: 156px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

body.idb-body-customer.idb-page-login .idb-btn-login-otp-send.idb-btn-primary:hover,
body.idb-body-customer.idb-page-login .idb-btn-login-otp-verify.idb-btn-primary:hover,
body.idb-body-customer.idb-page-login .idb-form-actions .idb-btn-primary:hover {
  background: #1e40af;
  border-color: #1e3a8a;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.10);
}

body.idb-body-customer.idb-page-login .idb-login-assist .idb-text-xs {
  font-size: var(--idb-text-xs);
}

body.idb-body-customer.idb-page-login .idb-customer-support-wrap {
  max-width: 760px;
  margin: 10px auto 0;
  padding: 0 clamp(16px, 2vw, 22px);
}

body.idb-body-customer.idb-page-login .idb-customer-support {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--idb-u-radius-md);
  border-color: #e5e7eb;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.035);
  background:
    radial-gradient(520px 120px at 0% 0%, rgba(59,130,246,.035), transparent 65%),
    radial-gradient(520px 120px at 100% 0%, rgba(14,165,233,.03), transparent 65%),
    #fff;
}

body.idb-body-customer.idb-page-login .idb-customer-support__lead {
  gap: 8px;
  align-items: flex-start;
}

body.idb-body-customer.idb-page-login .idb-customer-support__lead > .idb-icon {
  margin-top: 0;
  color: var(--idb-u-text-muted);
}

body.idb-body-customer.idb-page-login .idb-customer-support__title {
  margin-bottom: 1px;
  font-size: var(--idb-text-sm);
  line-height: 1.25;
}

body.idb-body-customer.idb-page-login .idb-customer-support__text {
  font-size: var(--idb-text-xs);
  line-height: 1.35;
  color: #6b7280;
}

body.idb-body-customer.idb-page-login .idb-customer-support__actions {
  gap: 8px;
  justify-content: flex-start;
}

body.idb-body-customer.idb-page-login .idb-customer-support__actions .idb-btn {
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: var(--idb-text-sm);
  font-weight: 600;
  line-height: 1.15;
  box-shadow: none;
}

body.idb-body-customer.idb-page-login .idb-customer-support__actions .idb-btn-secondary,
body.idb-body-customer.idb-page-login .idb-customer-support__actions .idb-btn-ghost {
  background: #fff;
  border: 1px solid #d1d5db;
  color: var(--idb-u-text-body);
}

body.idb-body-customer.idb-page-login .idb-footer-inner {
  max-width: 760px;
  padding: 6px clamp(16px, 2vw, 22px) 10px;
}

body.idb-body-customer.idb-page-login .idb-footer-line {
  opacity: 0.65;
}

body.idb-body-customer.idb-page-login .idb-footer-text {
  margin-top: 8px;
  font-size: var(--idb-text-xs);
  color: #6b7280;
}

@media (max-width: 720px) {
  body.idb-body-customer.idb-page-login .idb-header-inner {
    justify-content: flex-start;
    align-items: center;
  }

  body.idb-body-customer.idb-page-login .idb-header-title {
    justify-content: flex-start;
  }

  body.idb-body-customer.idb-page-auth .idb-card-login {
    padding: 18px 16px 16px;
  }

  body.idb-body-customer.idb-page-login .idb-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  body.idb-body-customer.idb-page-login .idb-form-actions .idb-btn {
    width: 100%;
  }

  body.idb-body-customer.idb-page-login .idb-customer-support__actions {
    width: 100%;
  }

  body.idb-body-customer.idb-page-login .idb-customer-support {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body.idb-body-customer.idb-page-login .idb-customer-support__actions .idb-btn {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* Customer authenticated shell:
   neutralize legacy 1100px cap from style.css and keep all logged-in pages aligned */
.idb-body-customer .idb-page-center.idb-user-portal {
  width: min(1480px, 100%);
  max-width: 1480px;
}

body.idb-body-customer.idb-page-downloads .idb-downloads-filterbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid #d7dfeb;
  border-radius: 10px;
  background: #eef3f8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.idb-body-customer.idb-page-downloads .idb-downloads-filterfield {
  min-width: 0;
}

body.idb-body-customer.idb-page-downloads .idb-downloads-filterlabel {
  display: block;
  font-size: var(--idb-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--idb-u-text-muted);
  margin: 0 0 5px;
}

body.idb-body-customer.idb-page-downloads .idb-downloads-filterinput,
body.idb-body-customer.idb-page-downloads .idb-downloads-filterselect {
  width: 100%;
  min-height: 36px;
  border: 1px solid #bec9d8;
  border-radius: var(--idb-u-radius-sm);
  padding: 7px 10px;
  font-size: var(--idb-text-base);
  color: var(--idb-u-text-strong);
  background: #f4f7fb;
}

body.idb-body-customer.idb-page-downloads .idb-downloads-filterinput:focus,
body.idb-body-customer.idb-page-downloads .idb-downloads-filterselect:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

body.idb-body-customer.idb-page-downloads .idb-downloads-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

body.idb-body-customer.idb-page-downloads .idb-downloads-filter-chip {
  appearance: none;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: var(--idb-u-radius-pill);
  font-size: var(--idb-text-xs);
  line-height: 1;
  font-weight: 600;
  padding: 6px 10px;
  white-space: nowrap;
  cursor: pointer;
}

body.idb-body-customer.idb-page-downloads .idb-downloads-filter-chip:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

body.idb-body-customer.idb-page-downloads .idb-downloads-filter-count {
  font-size: var(--idb-text-sm);
  color: #475569;
  white-space: nowrap;
}

body.idb-body-customer.idb-page-downloads .idb-downloads-main-table tbody tr {
  transition: background-color 0.16s ease;
}

body.idb-body-customer.idb-page-downloads .idb-downloads-main-table thead th {
  z-index: 2;
  box-shadow: inset 0 -1px 0 #e2e8f0;
  color: #22384f;
}

body.idb-body-customer.idb-page-downloads .idb-downloads-no-results-row td {
  background: #f8fafc;
}

@media (min-width: 900px) {
  body.idb-body-customer.idb-page-downloads .idb-user-table-scroll .idb-table,
  body.idb-body-customer.idb-page-downloads .idb-table-wrap .idb-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  body.idb-body-customer.idb-page-downloads .idb-user-portal .idb-cell-truncate {
    max-width: 100%;
  }

  body.idb-body-customer.idb-page-downloads .idb-stack-col .idb-meta-line {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-scroll .idb-downloads-main-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table th,
  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table td {
    vertical-align: middle;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table th {
    font-size: var(--idb-text-xs);
    letter-spacing: 0.02em;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table td {
    font-size: var(--idb-text-sm);
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table tbody td,
  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table tbody td {
    color: #1f2937;
    line-height: 1.3;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-version {
    font-variant-numeric: tabular-nums;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-name {
    width: 35%;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-version {
    width: 10%;
    text-align: center;
    white-space: nowrap;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-type {
    width: 12%;
    text-align: center;
    white-space: nowrap;
  }

body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-type .idb-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 9px;
    font-size: var(--idb-text-xs);
    line-height: 1.1;
    border-radius: var(--idb-u-radius-pill);
    border-color: rgba(148, 163, 184, 0.4);
    background: #f8fafc;
    color: #1e293b;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-status {
    width: 9%;
    text-align: center;
    white-space: nowrap;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-status .idb-badge {
    min-width: 70px;
    min-height: 22px;
    padding: 2px 9px;
    font-size: var(--idb-text-xs);
  }

  /* 35+10+12+9+13+11+10 = 100% — all 7 columns accounted for */
  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-download {
    width: 13%;
    text-align: center;
    white-space: nowrap;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-docs {
    width: 11%;
    text-align: center;
    white-space: nowrap;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-changelog {
    width: 10%;
    text-align: center;
    white-space: nowrap;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-cell-truncate {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-dl-col-download .idb-btn,
  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-dl-col-docs .idb-btn,
  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-dl-col-changelog .idb-btn {
    white-space: nowrap;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: var(--idb-u-radius-sm);
    font-size: var(--idb-text-xs);
    line-height: 1.1;
    max-width: 100%;
    width: auto;
    justify-content: center;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-dl-col-docs .idb-btn.idb-btn-secondary {
    border-color: #a8b7cc;
    color: #1d3557;
    background: #f8fafc;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-dl-col-docs .idb-btn.idb-btn-secondary:hover {
    border-color: #8ea3c1;
    color: #152c49;
    background: #eef2f7;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-wrap .idb-licenses-main-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table th,
  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table td {
    vertical-align: top;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-name {
    width: 26%;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-cores {
    width: 7%;
    text-align: center;
    white-space: nowrap;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-start,
  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-end {
    width: 11%;
    text-align: center;
    white-space: nowrap;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-status {
    width: 11%;
    text-align: center;
    white-space: nowrap;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-type {
    width: 21%;
    text-align: center;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-download {
    width: 13%;
    text-align: center;
    white-space: nowrap;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-name.idb-cell-truncate {
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
    word-break: break-word;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-status,
  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-type,
  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-download {
    padding-top: 8px;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-status .idb-stack-col .idb-badge {
    align-self: flex-start;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-type .idb-stack-col {
    align-items: center;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-type .idb-stack-col .idb-badge {
    align-self: center;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-type .idb-meta-line {
    text-align: center;
  }

  body.idb-body-customer.idb-page-downloads .idb-license-download-cell .idb-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 1080px) {
  body.idb-body-customer.idb-page-downloads .idb-downloads-filterbar {
    grid-template-columns: 1fr 1fr;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-filterfield--search {
    grid-column: 1 / -1;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-filter-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  body.idb-body-customer.idb-page-downloads .idb-downloads-filterbar {
    grid-template-columns: 1fr;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-filter-actions {
    justify-content: flex-start;
  }
}

@media (min-width: 900px) and (max-width: 1180px) {
  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-download {
    width: 13%;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-docs {
    width: 11%;
  }

  body.idb-body-customer.idb-page-downloads .idb-downloads-main-table .idb-col-changelog {
    width: 10%;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-name {
    width: 28%;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-status {
    width: 12%;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-type {
    width: 20%;
  }

  body.idb-body-customer.idb-page-downloads .idb-licenses-main-table .idb-col-license-download {
    width: 14%;
  }
}

/* Customer Help Guide Home */
.idb-body-customer.idb-page-help-home .idb-help-home .hh-hero {
  background:
    radial-gradient(600px 140px at 0% 0%, rgba(51, 65, 85, .06), transparent 62%),
    radial-gradient(600px 140px at 100% 0%, rgba(100, 116, 139, .05), transparent 62%),
    linear-gradient(135deg, #f5f8fd 0%, #edf2f8 100%);
  border-color: #cfd9e6;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-hero h1 {
  margin: 0 0 6px 0;
  font-size: var(--idb-text-2xl);
  color: var(--idb-u-text-strong);
  letter-spacing: -0.01em;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-hero p {
  margin: 0;
  color: var(--idb-u-text-body);
  line-height: 1.55;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-meta {
  font-size: var(--idb-text-sm);
  color: #475569;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-tag {
  border: 1px solid #d1dbe8;
  border-radius: var(--idb-u-radius-pill);
  padding: 4px 10px;
  font-size: var(--idb-text-xs);
  color: var(--idb-u-text-body);
  background: #f8fbff;
  font-weight: 600;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-h2 {
  margin: 0 0 12px 0;
  font-size: var(--idb-text-lg);
  color: #1e293b;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-p {
  margin: 0 0 14px 0;
  color: var(--idb-u-text-body);
  line-height: 1.72;
  font-size: var(--idb-text-base);
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-link {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-link:hover {
  text-decoration: underline;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-list {
  margin: 0 0 8px 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.7;
  font-size: var(--idb-text-base);
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-list li + li {
  margin-top: 8px;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-h3 {
  margin: 0 0 6px 0;
  font-size: var(--idb-text-md);
  color: var(--idb-u-text-strong);
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-procedure {
  margin: 0;
  padding-left: 18px;
  color: var(--idb-u-text-body);
  line-height: 1.68;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-procedure > li {
  margin-bottom: 20px;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-table-wrap {
  overflow-x: auto;
  border: 1px solid #d2dbe7;
  border-radius: var(--idb-u-radius-md);
  background: #f7fafd;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-table th,
.idb-body-customer.idb-page-help-home .idb-help-home .hh-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: var(--idb-u-text-body);
  font-size: var(--idb-text-base);
  line-height: 1.5;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-table th {
  background: #eaf0f7;
  color: var(--idb-u-text-strong);
  font-size: var(--idb-text-sm);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-table tbody tr:last-child td {
  border-bottom: 0;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-block {
  padding: 12px 14px;
  border: 1px solid #d3ddea;
  border-radius: var(--idb-u-radius-md);
  background: #f6f9fd;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-block + .hh-block {
  margin-top: 10px;
}

.idb-body-customer.idb-page-help-home .idb-help-home .hh-contact-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #d6deea;
}

.idb-body-customer.idb-page-help-home .idb-help-home .idb-user-section {
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5fa 100%);
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

/* Empty-account onboarding card (customer Downloads page) — shown only when a
   brand-new customer has no downloads and no licenses yet, so they don't land cold
   on two "nothing here" tables. */
.idb-body-customer .idb-onboard-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin: 16px 0 4px;
    padding: 18px 20px;
    background: linear-gradient(180deg, #eef5ff 0%, #ffffff 100%);
    border: 1px solid #cfe0f4;
    border-radius: var(--idb-u-radius-md);
}
.idb-body-customer .idb-onboard-emoji { font-size: var(--idb-text-2xl); line-height: 1; flex: 0 0 auto; }
.idb-body-customer .idb-onboard-body { min-width: 0; }
.idb-body-customer .idb-onboard-title { margin: 0 0 6px; font-size: var(--idb-text-md); }
.idb-body-customer .idb-onboard-text { margin: 0 0 14px; color: #556070; max-width: 60ch; }
.idb-body-customer .idb-onboard-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) {
    .idb-body-customer .idb-onboard-card { flex-direction: column; }
}

/* ---------------------------------------------------------------------------
   C7 — Mobile (<=640px): stack the download & license tables into cards so the
   primary Download / License-Key action isn't hidden behind horizontal scroll.
   Cell labels are derived from the existing idb-col-* classes (no markup change).
--------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .idb-body-customer .idb-user-table-scroll .idb-downloads-main-table.idb-table,
  .idb-body-customer .idb-user-table-scroll .idb-licenses-main-table.idb-table {
    min-width: 0;
  }
  .idb-body-customer .idb-downloads-main-table thead,
  .idb-body-customer .idb-licenses-main-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .idb-body-customer .idb-downloads-main-table,
  .idb-body-customer .idb-downloads-main-table tbody,
  .idb-body-customer .idb-downloads-main-table tr,
  .idb-body-customer .idb-downloads-main-table td,
  .idb-body-customer .idb-licenses-main-table,
  .idb-body-customer .idb-licenses-main-table tbody,
  .idb-body-customer .idb-licenses-main-table tr,
  .idb-body-customer .idb-licenses-main-table td {
    display: block;
    width: auto;
  }
  .idb-body-customer .idb-downloads-main-table tr,
  .idb-body-customer .idb-licenses-main-table tr {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--idb-u-radius-md);
    background: #ffffff;
    padding: 12px 14px;
    margin-bottom: 10px;
  }
  .idb-body-customer .idb-downloads-main-table tbody tr:hover td,
  .idb-body-customer .idb-licenses-main-table tbody tr:hover td {
    background: transparent;
  }
  .idb-body-customer .idb-downloads-main-table td,
  .idb-body-customer .idb-licenses-main-table td {
    border: none;
    padding: 3px 0;
    white-space: normal;
    max-width: none;
  }
  .idb-body-customer .idb-downloads-main-table td.idb-col-name,
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-name {
    font-weight: 700;
    font-size: var(--idb-text-md);
    padding-bottom: 6px;
  }
  .idb-body-customer .idb-downloads-main-table td.idb-col-version::before,
  .idb-body-customer .idb-downloads-main-table td.idb-col-type::before,
  .idb-body-customer .idb-downloads-main-table td.idb-col-status::before,
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-cores::before,
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-start::before,
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-end::before,
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-status::before,
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-type::before {
    font-weight: 600;
    color: #556070;
    margin-right: 6px;
  }
  .idb-body-customer .idb-downloads-main-table td.idb-col-version::before { content: "Version:"; }
  .idb-body-customer .idb-downloads-main-table td.idb-col-type::before { content: "Type:"; }
  .idb-body-customer .idb-downloads-main-table td.idb-col-status::before { content: "Status:"; }
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-cores::before { content: "Cores:"; }
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-start::before { content: "Start:"; }
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-end::before { content: "End / ATS:"; }
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-status::before { content: "Status:"; }
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-type::before { content: "Type:"; }
  .idb-body-customer .idb-downloads-main-table td.idb-col-download,
  .idb-body-customer .idb-downloads-main-table td.idb-col-docs,
  .idb-body-customer .idb-downloads-main-table td.idb-col-changelog,
  .idb-body-customer .idb-licenses-main-table td.idb-col-license-download {
    padding-top: 8px;
  }
}

/* C2 — brand the standalone consent/acknowledgement page (it renders outside the
   customer layout, so it otherwise had no logo and read as a different product). */
.idb-ack-page .ack-brandbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 16px 8px;
}
.idb-ack-page .ack-brand-logo {
  height: 38px;
  width: auto;
}
.idb-ack-page .ack-brand-name {
  font-weight: 700;
  font-size: var(--idb-text-md);
  letter-spacing: -0.01em;
  color: #182234;
}
