:root {
  --green: #25d366;
  --teal: #128c7e;
  --ink: #0f172a;
  --gold: #f59e0b;
  --cream: #f6efe4;
  --panel: rgba(255, 255, 255, 0.92);
  --line: rgba(15, 23, 42, 0.1);
  --muted: #617084;
  --shadow: 0 28px 72px rgba(15, 23, 42, 0.12);
  --display: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Aptos", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(circle at top left, rgba(37, 211, 102, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 18%),
    linear-gradient(180deg, #fffdf8 0%, var(--cream) 100%);
}

/* Sticky top bar shared across all dashboard pages */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.site-logo { height: 28px; }
.site-logo-text { color: #1F4E78; font-size: 20px; }

.site-header-cta { font-size: 14px; color: var(--muted); }
.site-header-cta a { color: #1F4E78; font-weight: 600; text-decoration: none; }
.site-header-cta a:hover { text-decoration: underline; }

.shell {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.login-shell,
.dashboard-shell,
.summary-card,
.detail-card,
.stat-card,
.panel-card,
.table-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 360px);
  gap: 16px;
  padding: 18px;
}

.brand-logo,
.topbar-logo {
  width: 150px;
  height: auto;
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
}

.login-copy h1,
.summary-card h1 {
  font-family: var(--display);
  letter-spacing: -0.04em;
  line-height: 0.94;
}

.login-copy {
  display: grid;
  gap: 14px;
  align-content: start;
}

.login-copy h1 {
  max-width: 12ch;
  font-size: clamp(2.3rem, 4vw, 3.8rem);
}

.lede {
  margin: 10px 0 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.6;
}

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

.login-points span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.84rem;
  font-weight: 700;
}

.login-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.86));
  color: white;
}

.card-kicker {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.82rem;
  color: inherit;
}

input,
select,
button {
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 11px 14px;
  font: inherit;
}

.login-card input {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
}

button,
.primary-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 700;
  text-decoration: none;
}

button,
.primary-link {
  border: none;
  background: linear-gradient(135deg, var(--ink), #18243c);
  color: white;
  cursor: pointer;
}

.ghost-link {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.processor-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.processor-row select,
.processor-row input {
  flex: 1;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  font: inherit;
  background: white;
  color: var(--ink);
}

.blokko-qr-img {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  margin: 14px auto 0;
  border-radius: 12px;
  background: white;
}

.processor-row .ghost-button {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.processor-note {
  margin-top: 10px;
  font-size: 0.82rem;
  opacity: 0.7;
}

/* Payment-methods indicator: an at-a-glance list of card + Blokko availability */
.methods-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.method-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.method-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.method-name {
  font-weight: 700;
}

.method-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

.method-chip {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.05);
  color: var(--muted);
}

.method-chip.is-active {
  background: rgba(37, 211, 102, 0.16);
  color: #0a7d3f;
  border-color: rgba(37, 211, 102, 0.32);
}

.method-chip.is-available {
  background: rgba(245, 158, 11, 0.16);
  color: #9a6400;
  border-color: rgba(245, 158, 11, 0.32);
}

.method-chip.is-locked {
  background: rgba(15, 23, 42, 0.05);
  color: var(--muted);
  border-color: var(--line);
}

/* Merchant-present Blokko charge form (portal) */
.blokko-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.blokko-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.blokko-field select,
.blokko-field input {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  font: inherit;
  background: white;
  color: var(--ink);
}

.blokko-pos-section .qr-frame {
  width: 100%;
  max-width: 220px;
  margin: 14px auto 0;
}

#portal-blokko-qr-wrap {
  text-align: center;
}

/* Clickable payment-method rows open their tool in a popup (no URL navigation) */
.method-row.is-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.05s ease;
}

.method-row.is-clickable:hover {
  border-color: rgba(15, 23, 42, 0.22);
}

.method-row.is-clickable:active {
  transform: scale(0.997);
}

.pm-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pm-modal[hidden] {
  display: none;
}

.pm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.pm-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.pm-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.pm-qr {
  width: 100%;
  max-width: 220px;
  margin: 14px auto 0;
}

/* Bouncing-dots loader shown in the Blokko QR frame while the intent generates.
   The <img> stays hidden until it has a real QR, so no broken-image icon. */
.qr-dots { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 200px; }
/* display:flex above outranks the UA [hidden]{display:none}, so opt back in —
   otherwise the loader stays visible beside the QR once it loads. */
.qr-dots[hidden] { display: none; }
.qr-dots span {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--ink);
  animation: qrDotBounce 0.9s infinite ease-in-out both;
}
.qr-dots span:nth-child(1) { animation-delay: -0.32s; }
.qr-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes qrDotBounce {
  0%, 80%, 100% { transform: translateY(0) scale(0.6); opacity: 0.45; }
  40% { transform: translateY(-14px) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .qr-dots span { animation: qrDotPulse 1.2s infinite ease-in-out both; }
  @keyframes qrDotPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
}

/* Blokko payment-method dropdown with real rail logos */
.method-dd { position: relative; margin-top: 8px; }
.method-dd-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 48px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--line);
  background: white; color: var(--ink); font: inherit; cursor: pointer;
}
.method-dd-trigger:hover { border-color: rgba(15, 23, 42, 0.2); }
.method-dd-current { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.method-dd-caret { color: var(--muted); font-size: 0.8rem; }
.method-dd-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  max-height: 340px; overflow-y: auto; background: white; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); padding: 6px;
}
.method-dd-item {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 10px;
  min-height: auto; border: none; background: transparent; color: var(--ink);
  border-radius: 12px; cursor: pointer; text-align: left;
}
.method-dd-item:hover { background: rgba(15, 23, 42, 0.05); }
.method-dd-logo {
  width: 28px; height: 28px; object-fit: contain; border-radius: 7px;
  background: #fff; border: 1px solid var(--line); padding: 3px; flex: 0 0 auto;
}
.method-dd-logo.sm { width: 22px; height: 22px; padding: 2px; }
/* Coin logo + small chain badge in the corner (Currency / Network picker). */
.method-dd-logo-wrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.method-badge {
  position: absolute; right: -3px; bottom: -3px;
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid #fff; background: #fff; object-fit: contain;
  box-shadow: 0 0 0 0.5px rgba(15, 23, 42, 0.12);
}
/* Inside the portal "Cobrar con Blokko" modal the menu renders in-flow (not as an
   absolute overlay) so the scrollable modal card never clips it. */
#pm-modal-blokko .method-dd-menu {
  position: static; top: auto; margin-top: 6px; max-height: 260px; box-shadow: none;
}
.method-dd-name { font-weight: 600; flex: 1; }
.method-dd-tag {
  font-size: 0.7rem; color: var(--muted); text-transform: capitalize;
  padding: 3px 9px; border-radius: 999px; background: rgba(15, 23, 42, 0.06);
}

/* Activity table: richer two-line cells, tabular amounts, monospaced reference. */
.tx-when { display: flex; flex-direction: column; line-height: 1.25; }
.tx-when-date { font-weight: 600; color: var(--ink); white-space: nowrap; }
.tx-when-time { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tx-cust { display: flex; flex-direction: column; line-height: 1.25; }
.tx-cust-name { font-weight: 600; color: var(--ink); }
.tx-cust-sub { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tx-amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-ref { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; color: var(--muted); }
.tx-muted { color: var(--muted); }
.tx-actions { display: inline-flex; gap: 6px; white-space: nowrap; }
.tx-actions .btn-small { padding: 5px 10px; font-size: 11px; }

/* History "Método" cell: brand/coin logo (+ chain badge) + short label. */
.method-cell { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.method-cell-logo-wrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.method-cell-logo { height: 18px; width: auto; max-width: 30px; object-fit: contain; display: block; border-radius: 3px; }
.method-cell-badge {
  position: absolute; right: -3px; bottom: -3px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid #fff; background: #fff; object-fit: contain;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.brand-stack {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-note,
.panel-note {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.topbar-actions,
.hero-actions,
.table-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.overview-grid,
.stats-grid,
.content-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.overview-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.summary-card,
.detail-card,
.panel-card,
.table-card {
  padding: 18px;
}

.summary-card h1 {
  max-width: 13ch;
  font-size: clamp(1.95rem, 3vw, 3rem);
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.identity-grid span,
.qr-copy span,
.seller-line span,
.stat-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.identity-grid strong,
.seller-line strong,
.qr-copy strong {
  display: block;
  margin-top: 6px;
  font-size: 1.02rem;
}

.stats-grid {
  grid-template-columns: repeat(4, 1fr);
}

.stat-card {
  padding: 16px 18px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-family: var(--display);
}

.stat-card.accent {
  background:
    linear-gradient(135deg, rgba(37, 211, 102, 0.12), rgba(18, 140, 126, 0.06)),
    rgba(255, 255, 255, 0.92);
}

.content-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

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

.qr-wrap {
  display: grid;
  grid-template-columns: 208px 1fr;
  gap: 14px;
  align-items: center;
}

#qr-preview {
  width: 196px;
  height: 196px;
  object-fit: contain;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: white;
  padding: 12px;
}

.qr-copy p,
.seller-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.seller-card {
  display: grid;
  gap: 12px;
}

.alerts-feed {
  display: grid;
  gap: 10px;
}

.alerts-list {
  display: grid;
  gap: 10px;
}

.alert-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.03);
}

.alert-top,
.alert-meta {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.alert-top span,
.alert-meta span,
.alerts-feed > span,
.empty-inline {
  color: var(--muted);
  font-size: 0.82rem;
}

.alert-item p,
.empty-inline {
  margin: 0;
  line-height: 1.5;
}

.seller-line {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.04);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status.approved {
  background: rgba(37, 211, 102, 0.14);
  color: var(--teal);
}

.status.declined,
.status.failed {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.status.pending {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.status.expired {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

@media (max-width: 980px) {
  .login-shell,
  .overview-grid,
  .stats-grid,
  .content-grid,
  .qr-wrap,
  .identity-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1240px);
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  td {
    padding: 8px 0;
    border: none;
  }
}

/* ============================================================
   Merchant portal — hero, QR, accordion, toast, empty state
   ============================================================ */

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}

.portal-brand h2 {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.portal-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-mode {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.badge-shared { background: #dcfce7; color: var(--teal); }
.badge-dedicated { background: #dbeafe; color: #1d4ed8; }
.badge-pending { background: #fef3c7; color: #b45309; }
.badge-expired { background: #fee2e2; color: #b91c1c; }
.badge-failed { background: #fee2e2; color: #b91c1c; }

.btn-primary {
  appearance: none;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.btn-ghost {
  appearance: none;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.04);
}

.btn-block { width: 100%; }
.btn-small { padding: 7px 12px; font-size: 12px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-card-phone {
  background: linear-gradient(135deg, var(--cream) 0%, rgba(255, 255, 255, 0.92) 70%);
}

.hero-phone {
  margin: 0;
  font-family: var(--display);
  font-size: 40px;
  letter-spacing: -1px;
  color: var(--teal);
  line-height: 1.1;
}

.hero-sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 38ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.hero-upsell {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.hero-upsell a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--teal);
}

.hero-upsell a:hover { color: var(--gold); border-color: var(--gold); }

.hero-card-qr {
  align-items: center;
  text-align: center;
}

.hero-card-qr .eyebrow {
  align-self: flex-start;
}

.qr-frame {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phone { font-size: 32px; }
}

.portal-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.portal-filter-row input[type="search"],
.portal-filter-row select,
.portal-filter-row input[type="date"] {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: var(--body);
  font-size: 13px;
  background: #fff;
  color: var(--ink);
}

.portal-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.portal-table-loading {
  text-align: center;
  color: var(--muted);
  padding: 28px 0;
}

.empty-state {
  text-align: center;
  padding: 36px 16px;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--cream);
  display: grid;
  place-items: center;
  font-size: 26px;
  color: var(--gold);
}

.empty-state-title {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 18px;
  color: var(--ink);
}

.empty-state-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.portal-accordion {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin-top: 24px;
  overflow: hidden;
}

.portal-accordion > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 26px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
}

.portal-accordion > summary::-webkit-details-marker { display: none; }

.portal-accordion > summary::after {
  content: "▾";
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.portal-accordion[open] > summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.portal-accordion > summary h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  color: var(--ink);
}

.portal-accordion > .identity-grid {
  padding: 0 26px 22px;
}

.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--ink);
  color: #fff;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 360px;
}

.toast-visible { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--teal); }
.toast-error { background: #b91c1c; }
.toast-info { background: var(--ink); }

.portal-auth-error {
  max-width: 420px;
  margin: 80px auto;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
}

.portal-auth-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin-bottom: 14px;
}

.portal-auth-error h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  color: var(--ink);
}

.portal-auth-error p {
  margin: 0 0 22px;
  color: var(--muted);
}
