/* Components: buttons, fields, alerts, steppers, codes. Prefix lb- avoids allauth/Django collisions. */

/* ---- Brand ---- */
.lb-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--lb-text); font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.lb-brand img { width: 30px; height: 30px; }
.lb-brand span { color: var(--lb-accent-text); font-weight: 700; }
.lb-inverse .lb-brand { color: var(--lb-white); }
.lb-inverse .lb-brand span { color: var(--lb-gold-300); }

/* ---- Typography helpers ---- */
.lb-eyebrow { margin: 0 0 var(--lb-space-2); color: var(--lb-accent-text); font-size: var(--lb-size-label); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.lb-inverse .lb-eyebrow { color: var(--lb-gold-300); }
.lb-h1 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: var(--lb-space-3); }
.lb-display { font-size: var(--lb-size-display); font-weight: 800; letter-spacing: -0.035em; margin-bottom: var(--lb-space-4); }
.lb-h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--lb-space-2); }
.lb-h3 { font-size: 1rem; font-weight: 700; margin-bottom: var(--lb-space-1); }
.lb-lead { color: var(--lb-text-muted); font-size: var(--lb-size-lead); line-height: 1.6; margin-bottom: var(--lb-space-5); max-width: 62ch; }
.lb-lead--sm { font-size: 1rem; margin-bottom: var(--lb-space-5); }
.lb-strongline { color: var(--lb-text); font-weight: 700; margin-bottom: var(--lb-space-1); }

/* ---- Buttons ---- */
.lb-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--lb-control-height); padding: 0 20px;
  border: 1px solid var(--lb-action); border-radius: var(--lb-radius);
  background: var(--lb-action); color: var(--lb-action-text);
  font-weight: 700; font-size: 0.9375rem; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer; transition: background-color var(--lb-duration) var(--lb-ease), border-color var(--lb-duration) var(--lb-ease), color var(--lb-duration) var(--lb-ease);
}
.lb-button:hover { background: var(--lb-action-hover); border-color: var(--lb-action-hover); color: var(--lb-action-text); }
.lb-button svg { width: 18px; height: 18px; flex: none; }
.lb-button--secondary { background: var(--lb-surface); color: var(--lb-ink-900); border-color: var(--lb-border-strong); }
.lb-button--secondary:hover { background: var(--lb-ink-50); color: var(--lb-ink-900); border-color: var(--lb-border-control); }
.lb-button--gold { background: var(--lb-gold-500); border-color: var(--lb-gold-500); color: var(--lb-ink-950); }
.lb-button--gold:hover { background: var(--lb-gold-300); border-color: var(--lb-gold-300); color: var(--lb-ink-950); }
.lb-button--ghost { background: transparent; border-color: transparent; color: var(--lb-link); padding: 0 8px; min-height: 36px; }
.lb-button--ghost:hover { background: var(--lb-ink-50); border-color: transparent; color: var(--lb-ink-900); }
.lb-button--link { background: none; border: 0; color: var(--lb-link); padding: 0; min-height: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.lb-button--link:hover { background: none; color: var(--lb-ink-900); }
.lb-button--block { display: flex; width: 100%; }
.lb-button--sm { min-height: 38px; padding: 0 14px; font-size: 0.875rem; }
.lb-button[aria-disabled="true"], .lb-button:disabled { background: var(--lb-slate-200); border-color: var(--lb-slate-200); color: var(--lb-slate-600); cursor: not-allowed; }
.lb-button.is-busy { cursor: progress; }
.lb-button.is-busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: lb-spin 0.7s linear infinite; }
@keyframes lb-spin { to { transform: rotate(360deg); } }
.lb-actions { display: flex; flex-wrap: wrap; gap: var(--lb-space-3); align-items: center; }
.lb-inline-form { display: inline; margin: 0; }

/* ---- Forms ---- */
.lb-form { display: grid; gap: var(--lb-space-4); }
.lb-field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.lb-label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--lb-space-3); color: var(--lb-text); font-size: 0.875rem; font-weight: 700; }
.lb-label a { font-size: 0.8125rem; font-weight: 600; }
.lb-field input:not([type="checkbox"]):not([type="radio"]), .lb-field select, .lb-field textarea, .lb-input {
  width: 100%; min-height: var(--lb-control-height); padding: 10px 13px;
  border: 1px solid var(--lb-border-control); border-radius: var(--lb-radius);
  background: var(--lb-surface); color: var(--lb-text); font-size: 1rem;
  transition: border-color var(--lb-duration) var(--lb-ease), box-shadow var(--lb-duration) var(--lb-ease);
}
.lb-field input:focus-visible, .lb-field select:focus-visible, .lb-field textarea:focus-visible, .lb-input:focus-visible { border-color: var(--lb-ink-700); box-shadow: var(--lb-focus-ring); border-radius: var(--lb-radius); }
.lb-field input[aria-invalid="true"], .lb-field select[aria-invalid="true"] { border-color: var(--lb-danger-700); }
.lb-field input::placeholder { color: var(--lb-slate-500); }
.lb-help { margin: 0; color: var(--lb-text-muted); font-size: 0.8125rem; line-height: 1.45; }
.lb-error { margin: 0; color: var(--lb-danger-700); font-size: 0.8125rem; font-weight: 600; line-height: 1.45; }
.lb-fieldset { margin: 0; min-width: 0; padding: var(--lb-space-4) var(--lb-space-5) var(--lb-space-5); border: 1px solid var(--lb-border); border-radius: var(--lb-radius-lg); background: var(--lb-surface); }
.lb-legend { display: flex; align-items: center; gap: var(--lb-space-2); padding: 0 6px; margin-left: -6px; color: var(--lb-slate-600); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.lb-legend i { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--lb-ink-900); color: var(--lb-white); font-style: normal; font-size: 0.6875rem; letter-spacing: 0; }
.lb-fieldset-body { display: grid; gap: var(--lb-space-4); margin-top: var(--lb-space-3); }
.lb-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lb-space-3) var(--lb-space-4); align-items: start; }
.lb-row--phone { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--lb-space-3); }
.lb-input--mono { font-family: var(--lb-mono); letter-spacing: 0.06em; }
.lb-errorsummary { padding: var(--lb-space-4); border: 1px solid #F0C2C5; border-left: 4px solid var(--lb-danger-700); border-radius: var(--lb-radius); background: var(--lb-danger-100); color: #6E1A20; }
.lb-errorsummary h2 { color: #6E1A20; font-size: 0.9375rem; margin-bottom: var(--lb-space-2); }
.lb-errorsummary ul { padding-left: 18px; font-size: 0.875rem; }
.lb-errorsummary a { color: #6E1A20; font-weight: 600; }

/* Password field with visibility toggle */
.lb-password { position: relative; }
.lb-password input { padding-right: 84px !important; }
.lb-password__toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 10px; border: 0; border-radius: var(--lb-radius-sm); background: transparent; color: var(--lb-link); font-size: 0.8125rem; font-weight: 700; cursor: pointer; }
.lb-password__toggle:hover { background: var(--lb-ink-50); }
.lb-password__toggle svg { width: 16px; height: 16px; }

/* One-time code */
.lb-otp input::placeholder { letter-spacing: 0.3em; color: var(--lb-slate-300); }
.lb-otp input { font-family: var(--lb-mono) !important; font-size: 1.5rem !important; font-weight: 600; letter-spacing: 0.45em; text-align: center; min-height: 58px !important; padding-left: 0.45em !important; }

/* Checkbox confirmation */
.lb-confirm { display: flex; gap: var(--lb-space-3); align-items: flex-start; padding: var(--lb-space-3) var(--lb-space-4); border: 1px solid var(--lb-border); border-radius: var(--lb-radius-lg); background: var(--lb-surface); color: var(--lb-text); font-size: 0.9375rem; font-weight: 600; cursor: pointer; }
.lb-confirm input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--lb-ink-900); flex: none; }

/* ---- Alerts ---- */
.lb-alert { display: flex; gap: var(--lb-space-3); align-items: flex-start; padding: 12px 14px; border: 1px solid; border-radius: var(--lb-radius); font-size: 0.9rem; line-height: 1.5; }
.lb-alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.lb-alert--ok { background: var(--lb-success-100); border-color: #B8DCC8; color: #164D36; }
.lb-alert--info { background: var(--lb-ink-50); border-color: var(--lb-ink-200); color: var(--lb-ink-800); }
.lb-alert--warn { background: var(--lb-gold-50); border-color: #EADBB0; color: #5E470F; }
.lb-alert--error { background: var(--lb-danger-100); border-color: #F0C2C5; color: #6E1A20; }
.lb-alert--dev { background: #EEEBFA; border-color: #CFC8F0; color: #3B3279; }
.lb-alert b { color: inherit; }
.lb-messages { display: grid; gap: var(--lb-space-2); margin-bottom: var(--lb-space-5); }

/* ---- Journey stepper (horizontal bar) ---- */
.lb-stepbar { display: flex; align-items: center; gap: 6px; margin: 0 0 var(--lb-space-5); color: var(--lb-text-muted); font-size: 0.75rem; font-weight: 700; }
.lb-stepbar i { height: 4px; flex: 1; border-radius: 4px; background: var(--lb-slate-200); }
.lb-stepbar i.is-done { background: var(--lb-ink-900); }
.lb-stepbar i.is-current { background: var(--lb-gold-500); }
.lb-stepbar span { margin-left: 6px; white-space: nowrap; }

/* ---- Journey steps (vertical, inverse panel) ---- */
.lb-steps { list-style: none; display: grid; margin: var(--lb-space-6) 0 0; }
.lb-steps li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: var(--lb-space-3); padding-bottom: var(--lb-space-4); font-size: 0.875rem; line-height: 1.45; color: var(--lb-inverse-text-muted); }
.lb-steps li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--lb-inverse-border); }
.lb-steps li:last-child::before { display: none; }
.lb-steps .lb-steps__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid rgba(255,255,255,0.28); font-size: 0.75rem; font-weight: 800; }
.lb-steps .lb-steps__dot svg { width: 13px; height: 13px; }
.lb-steps b { display: block; color: var(--lb-white); font-size: 0.9rem; }
.lb-steps .is-current .lb-steps__dot { background: var(--lb-gold-500); border-color: var(--lb-gold-500); color: var(--lb-ink-950); }
.lb-steps .is-current b { color: var(--lb-gold-300); }
.lb-steps .is-done .lb-steps__dot { background: rgba(255,255,255,0.12); border-color: transparent; color: var(--lb-gold-300); }

/* ---- Checklist ---- */
.lb-checklist { list-style: none; display: grid; gap: var(--lb-space-2); }
.lb-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.875rem; line-height: 1.45; color: var(--lb-text-body); }
.lb-check__mark { width: 20px; height: 20px; flex: none; margin-top: 0; border-radius: 50%; border: 1.5px solid var(--lb-slate-300); display: grid; place-items: center; background: var(--lb-surface); }
.lb-check__mark svg { width: 12px; height: 12px; opacity: 0; }
.lb-check.is-met .lb-check__mark { background: var(--lb-success-700); border-color: var(--lb-success-700); color: var(--lb-white); }
.lb-check.is-met .lb-check__mark svg { opacity: 1; }
.lb-check.is-server .lb-check__mark { border-style: dashed; }
.lb-check__state { color: var(--lb-text-muted); }

/* ---- Tiles (help list) ---- */
.lb-tiles { list-style: none; display: grid; gap: var(--lb-space-2); text-align: left; }
.lb-tile { display: grid; grid-template-columns: 32px 1fr; gap: var(--lb-space-3); align-items: start; padding: 12px 14px; border: 1px solid var(--lb-border); border-radius: var(--lb-radius); font-size: 0.875rem; line-height: 1.45; background: var(--lb-surface); }
.lb-tile b { display: block; }
.lb-icon-tile { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--lb-ink-50); color: var(--lb-ink-700); }
.lb-icon-tile svg { width: 17px; height: 17px; }
.lb-icon-tile--gold { background: var(--lb-gold-100); color: var(--lb-gold-700); }
.lb-icon-tile--lg { width: 44px; height: 44px; border-radius: 12px; }
.lb-icon-tile--lg svg { width: 22px; height: 22px; }
.lb-badge { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: var(--lb-ink-900); color: var(--lb-gold-300); margin-bottom: var(--lb-space-4); }
.lb-badge svg { width: 26px; height: 26px; }
.lb-badge--gold { width: 72px; height: 72px; border-radius: 22px; background: var(--lb-gold-100); color: var(--lb-gold-700); margin: 0 auto var(--lb-space-4); }
.lb-badge--gold svg { width: 34px; height: 34px; }

/* ---- Pills ---- */
.lb-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--lb-radius-pill); font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.lb-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lb-pill--ok { background: var(--lb-success-100); color: var(--lb-success-700); }
.lb-pill--wait { background: var(--lb-warning-100); color: var(--lb-warning-700); }
.lb-pill--idle { background: var(--lb-slate-100); color: var(--lb-slate-600); }
.lb-pill--role { background: var(--lb-ink-100); color: var(--lb-ink-700); }
.lb-pill--role::before { display: none; }

/* ---- Timeline ---- */
.lb-timeline { list-style: none; display: grid; margin-top: var(--lb-space-5); }
.lb-timeline li { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: var(--lb-space-3); padding-bottom: var(--lb-space-5); font-size: 0.9375rem; line-height: 1.45; }
.lb-timeline li::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--lb-slate-200); }
.lb-timeline li:last-child { padding-bottom: 0; }
.lb-timeline li:last-child::before { display: none; }
.lb-timeline__dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--lb-slate-300); background: var(--lb-surface); color: var(--lb-slate-500); font-size: 0.8125rem; font-weight: 800; }
.lb-timeline__dot svg { width: 15px; height: 15px; }
.lb-timeline b { display: block; }
.lb-timeline small { display: block; color: var(--lb-text-muted); font-size: 0.8125rem; margin-top: 2px; }
.lb-timeline .is-done .lb-timeline__dot { background: var(--lb-success-700); border-color: var(--lb-success-700); color: var(--lb-white); }
.lb-timeline .is-current .lb-timeline__dot { border-color: var(--lb-gold-500); color: var(--lb-gold-700); box-shadow: 0 0 0 5px var(--lb-gold-100); animation: lb-pulse 2.4s var(--lb-ease) infinite; }
@keyframes lb-pulse { 50% { box-shadow: 0 0 0 9px var(--lb-gold-50); } }

/* ---- Doors (UI-001) ---- */
.lb-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lb-space-5); }
.lb-door { display: flex; flex-direction: column; padding: var(--lb-space-6); border: 1px solid var(--lb-border); border-radius: var(--lb-radius-lg); background: var(--lb-surface); box-shadow: var(--lb-shadow); }
.lb-door--feature { border-color: #E6D3A0; background: linear-gradient(180deg, var(--lb-gold-50), var(--lb-surface) 62%); }
.lb-door h2 { font-size: 1.3125rem; margin: var(--lb-space-4) 0 var(--lb-space-2); }
.lb-door p { color: var(--lb-text-muted); font-size: 0.9375rem; flex: 1; margin-bottom: var(--lb-space-4); }
.lb-facts { list-style: none; display: flex; flex-wrap: wrap; gap: var(--lb-space-2) var(--lb-space-4); margin-bottom: var(--lb-space-5); color: var(--lb-slate-700); font-size: 0.8125rem; }
.lb-facts li { display: inline-flex; align-items: center; gap: 6px; }
.lb-facts svg { width: 15px; height: 15px; color: var(--lb-success-700); }
.lb-flow { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--lb-space-5); margin-top: var(--lb-space-7); padding-top: var(--lb-space-5); border-top: 1px solid var(--lb-border); counter-reset: flow; }
.lb-flow li { font-size: 0.875rem; color: var(--lb-text-muted); line-height: 1.45; counter-increment: flow; }
.lb-flow b { display: flex; align-items: center; gap: var(--lb-space-2); color: var(--lb-text); font-size: 0.9375rem; margin-bottom: 4px; }
.lb-flow b::before { content: counter(flow); width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--lb-ink-900); color: var(--lb-white); font-size: 0.75rem; }

/* ---- TOTP setup ---- */
.lb-totp { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: var(--lb-space-6); align-items: start; }
.lb-qr { padding: 12px; border: 1px solid var(--lb-border); border-radius: var(--lb-radius-lg); background: var(--lb-white); }
.lb-qr img { width: 100%; height: auto; image-rendering: pixelated; }
.lb-numlist { list-style: none; display: grid; gap: var(--lb-space-3); counter-reset: num; margin-bottom: var(--lb-space-4); }
.lb-numlist li { display: grid; grid-template-columns: 26px 1fr; gap: var(--lb-space-3); font-size: 0.9375rem; line-height: 1.5; counter-increment: num; }
.lb-numlist li::before { content: counter(num); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--lb-ink-100); color: var(--lb-ink-800); font-weight: 800; font-size: 0.75rem; }
.lb-details { border: 1px solid var(--lb-border); border-radius: var(--lb-radius); background: var(--lb-surface); }
.lb-details summary { padding: 10px 14px; cursor: pointer; color: var(--lb-link); font-weight: 600; font-size: 0.875rem; }
.lb-details[open] summary { border-bottom: 1px solid var(--lb-border); }
.lb-details__body { padding: 12px 14px; display: grid; gap: var(--lb-space-3); font-size: 0.875rem; }
.lb-secret { display: block; padding: 10px 12px; border-radius: var(--lb-radius-sm); background: var(--lb-ink-50); color: var(--lb-text); font-family: var(--lb-mono); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.08em; overflow-wrap: anywhere; }

/* ---- Recovery codes ---- */
.lb-codes { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; padding: var(--lb-space-4) var(--lb-space-5); border: 1px solid var(--lb-border); border-radius: var(--lb-radius-lg); background: var(--lb-ink-50); counter-reset: code; }
.lb-codes li { display: flex; gap: 10px; align-items: baseline; color: var(--lb-text); font-family: var(--lb-mono); font-size: 1rem; font-weight: 600; letter-spacing: 0.06em; counter-increment: code; }
.lb-codes li::before { content: counter(code); width: 20px; text-align: right; color: var(--lb-slate-500); font-weight: 500; font-size: 0.8125rem; }

/* ---- Alternative options (MFA) ---- */
.lb-divider { display: flex; align-items: center; gap: var(--lb-space-3); color: var(--lb-text-muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin: var(--lb-space-5) 0 var(--lb-space-2); }
.lb-divider::before, .lb-divider::after { content: ""; height: 1px; flex: 1; background: var(--lb-border); }
.lb-alt { list-style: none; display: grid; }
.lb-alt li > a, .lb-alt li > button { display: flex; align-items: center; gap: var(--lb-space-3); width: 100%; padding: 10px 6px; border: 0; border-radius: var(--lb-radius-sm); background: none; color: var(--lb-link); font-weight: 600; font-size: 0.9375rem; text-align: left; text-decoration: none; cursor: pointer; }
.lb-alt li > a:hover, .lb-alt li > button:hover { background: var(--lb-ink-50); }
.lb-alt svg { width: 18px; height: 18px; flex: none; }
.lb-alt .lb-alt__muted { color: var(--lb-slate-600) !important; }

/* ---- Panels (app) ---- */
.lb-panel { padding: var(--lb-space-5); border: 1px solid var(--lb-border); border-radius: var(--lb-radius-lg); background: var(--lb-surface); min-width: 0; }
.lb-panel--lg { padding: var(--lb-space-6); }
.lb-stat small { display: block; color: var(--lb-text-muted); font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.lb-stat strong { display: block; font-size: 1.125rem; margin: 6px 0 8px; }
.lb-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--lb-space-3); align-items: center; padding: var(--lb-space-3) 0; border-top: 1px solid var(--lb-slate-100); font-size: 0.9375rem; }
.lb-kv:first-of-type { border-top: 0; }

/* ---- MitID (Idura Verify) ---- */
.lb-button--mitid { background: #0060E6; border-color: #0060E6; color: var(--lb-white); }
.lb-button--mitid:hover { background: #004FBF; border-color: #004FBF; color: var(--lb-white); }

/* ---- Tables and item lists (E-signering) ---- */
.lb-table-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--lb-space-5)); }
.lb-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.lb-table th { padding: 10px var(--lb-space-5); text-align: left; color: var(--lb-text-muted); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--lb-border); }
.lb-table td { padding: 12px var(--lb-space-5); border-bottom: 1px solid var(--lb-slate-100); }
.lb-table tr:last-child td { border-bottom: 0; }
.lb-table .lb-input { width: auto; min-width: 100px; }
.lb-items { list-style: none; display: grid; gap: var(--lb-space-2); }
.lb-item { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--lb-border); border-radius: var(--lb-radius); font-size: 0.9375rem; min-width: 0; }
.lb-item small { color: var(--lb-text-muted); font-size: 0.8125rem; overflow-wrap: anywhere; }
.lb-section-head { display: flex; justify-content: space-between; align-items: center; gap: var(--lb-space-3); margin-bottom: var(--lb-space-3); }
.lb-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--lb-space-4); flex-wrap: wrap; }
.lb-back { display: inline-flex; gap: 6px; align-items: center; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.lb-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lb-space-5); }
@media (max-width: 900px) { .lb-grid-2 { grid-template-columns: minmax(0, 1fr); } }
.lb-file input[type="file"] { padding: 9px 10px; }

/* ---- Prepaid signature billing ---- */
.lb-credit-balance { min-width: 210px; padding: 16px 20px; border: 1px solid var(--lb-ink-200); border-radius: var(--lb-radius-lg); background: var(--lb-ink-900); color: var(--lb-white); }
.lb-credit-balance small, .lb-credit-strip small, .lb-credit-review small { display: block; color: var(--lb-slate-500); font-size: .6875rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.lb-credit-balance small { color: var(--lb-inverse-text-muted); }
.lb-credit-balance strong { display: block; margin: 4px 0; color: var(--lb-gold-300); font-size: 2rem; line-height: 1; }
.lb-credit-balance span { color: var(--lb-inverse-text-muted); font-size: .8125rem; }
.lb-billing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lb-space-5); }
.lb-price-card { display: flex; flex-direction: column; padding: var(--lb-space-6); border: 1px solid #e6d3a0; border-radius: var(--lb-radius-xl); background: linear-gradient(180deg, var(--lb-gold-50), var(--lb-surface) 44%); box-shadow: var(--lb-shadow); }
.lb-price-card--test { border-style: dashed; border-color: #9d95ca; background: linear-gradient(180deg, #f3f1ff, var(--lb-surface) 44%); }
.lb-price-card__head { display: flex; justify-content: space-between; gap: var(--lb-space-3); align-items: start; }
.lb-test-label { display: inline-flex; padding: 3px 8px; border-radius: var(--lb-radius-pill); background: #e8e4ff; color: #443a86; font-size: .6875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lb-price { display: flex; align-items: baseline; gap: 8px; margin: var(--lb-space-5) 0 0; }
.lb-price strong { font-size: 2rem; letter-spacing: -.04em; }
.lb-price span { color: var(--lb-text-muted); font-size: .8125rem; }
.lb-price-card form { margin-top: auto; padding-top: var(--lb-space-5); }
.lb-credit-strip { display: flex; align-items: center; justify-content: space-between; gap: var(--lb-space-4); padding: 14px 18px; border: 1px solid var(--lb-border); border-radius: var(--lb-radius-lg); background: var(--lb-surface); }
.lb-credit-strip strong { display: block; margin-top: 2px; font-size: 1.5rem; }
.lb-credit-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lb-space-4); margin: var(--lb-space-4) 0; padding: var(--lb-space-4); border-radius: var(--lb-radius-lg); background: var(--lb-ink-50); }
.lb-credit-review strong { display: block; margin-top: 4px; font-size: 1.25rem; }
.lb-order-summary { display: grid; gap: 0; margin: var(--lb-space-5) 0; }
.lb-order-summary > div { display: flex; justify-content: space-between; gap: var(--lb-space-4); padding: 10px 0; border-bottom: 1px solid var(--lb-border); }
.lb-order-summary dt { color: var(--lb-text-muted); }
.lb-order-summary dd { margin: 0; font-weight: 700; text-align: right; }
.lb-order-summary .is-total { border-bottom: 0; font-size: 1.125rem; }
@media (max-width: 760px) { .lb-billing-grid { grid-template-columns: minmax(0, 1fr); } .lb-credit-balance { width: 100%; } }
