/* PREESH Bank Agent portal — aligned with preesh.co brand */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap");

:root {
  --agent-ink: #0a1128;
  --agent-ink-soft: #151b2e;
  --agent-muted: #64748b;
  --agent-muted-2: #718096;
  --agent-line: #e2e8f0;
  --agent-line-strong: #cbd5e1;
  --agent-bg: #f4f6f8;
  --agent-bg-deep: #eef1f6;
  --agent-card: #ffffff;
  --agent-deep: #0a1128;
  --agent-accent: #4f46e5;
  --agent-accent-2: #7c3aed;
  --agent-accent-soft: #eef2ff;
  --agent-primary-from: #3b82f6;
  --agent-primary-to: #8b5cf6;
  --agent-primary-gradient: linear-gradient(135deg, var(--agent-primary-from) 0%, var(--agent-primary-to) 100%);
  --agent-ok: #065f46;
  --agent-ok-bg: #ecfdf5;
  --agent-ok-line: #a7f3d0;
  --agent-err: #9f1239;
  --agent-err-bg: #fff1f2;
  --agent-err-line: #fecdd3;
  --agent-warn: #92400e;
  --agent-warn-bg: #fffbeb;
  --agent-warn-line: #fde68a;
  --agent-shadow: 0 1px 2px rgba(10, 17, 40, 0.04), 0 12px 32px rgba(10, 17, 40, 0.06);
  --agent-shadow-lg: 0 8px 40px rgba(10, 17, 40, 0.12);
  --agent-radius: 16px;
  --agent-radius-sm: 10px;
  --agent-font: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  --agent-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --agent-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --agent-focus: 0 0 0 3px rgba(79, 70, 229, 0.28);
  --agent-topbar-h: 4.25rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.agent-portal {
  margin: 0;
  font-family: var(--agent-font);
  color: var(--agent-ink);
  background:
    radial-gradient(1200px 560px at 8% -8%, rgba(79, 70, 229, 0.09), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(139, 92, 246, 0.08), transparent 50%),
    linear-gradient(180deg, #f8f9fb 0%, var(--agent-bg) 40%, var(--agent-bg-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--agent-accent); }
a:hover { color: #3730a3; }

:focus-visible {
  outline: none;
  box-shadow: var(--agent-focus);
}

/* ——— Topbar / full-width app header ——— */
.agent-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--agent-accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.agent-skip:focus {
  left: 0;
}

.agent-topbar,
.agent-topbar--full {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: none;
  box-shadow: 0 1px 0 rgba(226, 232, 240, 0.9);
}
.agent-topbar-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(1rem, 3.5vw, 2.75rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  min-height: 4.5rem;
}
.agent-topbar-rule {
  height: 3px;
  width: 100%;
  background: var(--agent-primary-gradient);
  opacity: 0.95;
}
.agent-topbar-start,
.agent-topbar-end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.5rem;
}
.agent-topbar-end { justify-content: flex-end; }

.agent-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--agent-ink);
  flex-shrink: 0;
  padding: 0.35rem 0;
}
.agent-brand-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 168px;
}
.agent-brand-pill {
  display: inline-flex;
  align-items: center;
  height: 1.6rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  background: var(--agent-accent-soft);
  color: #3730a3;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.agent-nav {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.15rem;
  flex-wrap: nowrap;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  max-width: none;
  margin: 0;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.agent-nav::-webkit-scrollbar { display: none; }
.agent-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--agent-muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0 0.95rem;
  border-radius: 0;
  min-height: 4.5rem;
  position: relative;
  transition: color 180ms var(--agent-ease), background 180ms var(--agent-ease);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.agent-nav a::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  transition: background 180ms var(--agent-ease);
}
.agent-nav a svg {
  width: 1.1rem;
  height: 1.1rem;
  opacity: 0.8;
  flex-shrink: 0;
}
.agent-nav a:hover {
  color: var(--agent-ink);
  background: rgba(79, 70, 229, 0.04);
}
.agent-nav a.is-active {
  color: var(--agent-ink);
  background: transparent;
  box-shadow: none;
}
.agent-nav a.is-active::after {
  background: var(--agent-accent);
}
.agent-nav a.is-active svg {
  opacity: 1;
  color: var(--agent-accent);
}
.agent-nav-mobile-extra { display: none; }

.agent-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  background: #fff;
  color: var(--agent-ink);
  cursor: pointer;
  position: relative;
}
.agent-nav-toggle svg { width: 1.25rem; height: 1.25rem; }
.agent-nav-toggle-close { display: none; }
.agent-topbar.is-open .agent-nav-toggle-open { display: none; }
.agent-topbar.is-open .agent-nav-toggle-close { display: block; }

.agent-btn-header {
  min-height: 44px;
  padding: 0.6rem 1.05rem;
  border-radius: 12px;
  font-size: 0.9rem;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
}
.agent-btn-header span { white-space: nowrap; }

.agent-account { position: relative; }
.agent-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--agent-line);
  background: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.6rem 0.3rem 0.3rem;
  min-height: 44px;
  cursor: pointer;
  font: inherit;
  color: var(--agent-ink);
  transition: border-color 160ms var(--agent-ease), box-shadow 160ms var(--agent-ease);
}
.agent-account-trigger:hover {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.agent-account-trigger > svg {
  width: 1rem;
  height: 1rem;
  color: var(--agent-muted);
  transition: transform 180ms var(--agent-ease);
}
.agent-account.is-open .agent-account-trigger > svg {
  transform: rotate(180deg);
}
.agent-account-text {
  display: grid;
  text-align: left;
  line-height: 1.15;
  padding-right: 0.15rem;
}
.agent-account-name {
  font-size: 0.84rem;
  font-weight: 700;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-account-role {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--agent-muted);
  letter-spacing: 0.02em;
}
.agent-user-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--agent-primary-gradient);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.agent-account-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(300px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--agent-line);
  border-radius: 14px;
  box-shadow: var(--agent-shadow-lg);
  padding: 0.4rem;
  z-index: 70;
  animation: agent-rise 180ms var(--agent-ease) both;
}
.agent-account-menu[hidden] { display: none !important; }
.agent-account-menu-head {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.65rem 0.7rem 0.8rem;
  border-bottom: 1px solid var(--agent-line);
  margin-bottom: 0.25rem;
}
.agent-account-menu-head strong {
  display: block;
  font-size: 0.9rem;
  color: var(--agent-ink);
}
.agent-account-menu-head span {
  display: block;
  font-size: 0.78rem;
  color: var(--agent-muted);
  word-break: break-all;
}
.agent-account-menu a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--agent-ink-soft);
  font-weight: 600;
  font-size: 0.88rem;
  min-height: 44px;
}
.agent-account-menu a svg {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--agent-muted);
}
.agent-account-menu a:hover {
  background: var(--agent-accent-soft);
  color: var(--agent-ink);
}
.agent-account-menu a.is-danger {
  color: var(--agent-err);
}
.agent-account-menu a.is-danger svg { color: var(--agent-err); }

.agent-link-muted {
  color: var(--agent-muted);
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 500;
}
.agent-link-muted:hover { color: var(--agent-accent); text-decoration: underline; }

.agent-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--agent-line);
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  min-height: 40px;
  color: var(--agent-ink);
  font-weight: 600;
  font-size: 0.85rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 180ms var(--agent-ease), background 180ms var(--agent-ease), transform 150ms var(--agent-ease);
}
.agent-btn-ghost:hover {
  border-color: var(--agent-line-strong);
  background: var(--agent-bg);
}
.agent-btn-ghost:active { transform: scale(0.98); }

/* Page header (prequalify + reusable) */
.agent-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--agent-radius);
  border: 1px solid var(--agent-line);
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.07) 0%, rgba(139, 92, 246, 0.05) 40%, #fff 100%);
  box-shadow: var(--agent-shadow);
  animation: agent-rise 420ms var(--agent-ease) both;
}
.agent-page-header h1 {
  margin: 0 0 0.35rem;
  font-family: var(--agent-display);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--agent-ink);
  line-height: 1.15;
}
.agent-page-header p {
  margin: 0;
  max-width: 40rem;
  color: var(--agent-muted);
  font-size: 0.98rem;
}
.agent-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--agent-muted);
}
.agent-breadcrumb a {
  text-decoration: none;
  color: var(--agent-accent);
}
.agent-breadcrumb a:hover { text-decoration: underline; }
.agent-page-header-aside {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 11rem;
}
.agent-page-header-step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--agent-muted);
}
.agent-page-header-step span {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--agent-line);
  font-size: 0.72rem;
  font-weight: 700;
}
.agent-page-header-step.is-active {
  color: var(--agent-ink);
}
.agent-page-header-step.is-active span {
  background: var(--agent-accent);
  border-color: var(--agent-accent);
  color: #fff;
}

/* ——— Layout ——— */
.agent-main { padding: 1.75rem 0 3.5rem; }
.agent-wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.agent-footer {
  border-top: 1px solid var(--agent-line);
  padding: 1.35rem 0 2rem;
  color: var(--agent-muted);
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.45);
}
.agent-footer p { margin: 0; }

/* ——— Hero / page title ——— */
.agent-hero {
  margin-bottom: 1.5rem;
  animation: agent-rise 420ms var(--agent-ease) both;
}
.agent-hero h1 {
  margin: 0 0 0.4rem;
  font-family: var(--agent-display);
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--agent-ink);
  line-height: 1.15;
}
.agent-hero p {
  margin: 0;
  max-width: 42rem;
  color: var(--agent-muted);
  font-size: 1.02rem;
}
.agent-eyebrow {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--agent-accent);
}

/* ——— KPIs ——— */
.agent-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}
.agent-kpi {
  background: var(--agent-card);
  border: 1px solid var(--agent-line);
  border-radius: var(--agent-radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--agent-shadow);
  position: relative;
  overflow: hidden;
  animation: agent-rise 480ms var(--agent-ease) both;
}
.agent-kpi:nth-child(1) { animation-delay: 40ms; }
.agent-kpi:nth-child(2) { animation-delay: 90ms; }
.agent-kpi:nth-child(3) { animation-delay: 140ms; }
.agent-kpi:nth-child(4) { animation-delay: 190ms; }
.agent-kpi::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--agent-primary-gradient);
  opacity: 0.95;
}
.agent-kpi .label {
  color: var(--agent-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.agent-kpi .value {
  font-family: var(--agent-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.25rem;
  color: var(--agent-ink);
  line-height: 1.1;
}

/* ——— Cards ——— */
.agent-card {
  background: var(--agent-card);
  border: 1px solid var(--agent-line);
  border-radius: var(--agent-radius);
  padding: 1.35rem 1.45rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--agent-shadow);
  animation: agent-rise 500ms var(--agent-ease) both;
}
.agent-card h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--agent-ink-soft);
}
.agent-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.agent-card-head h2 { margin: 0; }

.agent-empty {
  text-align: center;
  padding: 2.25rem 1.25rem;
  color: var(--agent-muted);
}
.agent-empty-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.85rem;
  border-radius: 14px;
  background: var(--agent-accent-soft);
  color: var(--agent-accent);
  display: grid;
  place-items: center;
}
.agent-empty-icon svg { width: 1.5rem; height: 1.5rem; }
.agent-empty strong {
  display: block;
  color: var(--agent-ink);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

/* ——— Alerts ——— */
.agent-alert {
  border-radius: var(--agent-radius-sm);
  padding: 0.9rem 1.05rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  animation: agent-rise 300ms var(--agent-ease) both;
}
.agent-alert--ok {
  background: var(--agent-ok-bg);
  color: var(--agent-ok);
  border: 1px solid var(--agent-ok-line);
}
.agent-alert--err {
  background: var(--agent-err-bg);
  color: var(--agent-err);
  border: 1px solid var(--agent-err-line);
}

/* ——— Forms ——— */
.agent-form {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
}
.agent-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--agent-ink-soft);
}
.agent-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.agent-form .hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--agent-muted);
}
.agent-input,
.agent-form input,
.agent-form select,
.agent-form textarea {
  width: 100%;
  border: 1px solid var(--agent-line);
  border-radius: var(--agent-radius-sm);
  padding: 0.75rem 0.9rem;
  font: inherit;
  background: #fff;
  color: var(--agent-ink);
  transition: border-color 160ms var(--agent-ease), box-shadow 160ms var(--agent-ease);
}
.agent-input:hover,
.agent-form input:hover,
.agent-form select:hover,
.agent-form textarea:hover {
  border-color: var(--agent-line-strong);
}
.agent-input:focus,
.agent-form input:focus,
.agent-form select:focus,
.agent-form textarea:focus {
  outline: none;
  border-color: var(--agent-accent);
  box-shadow: var(--agent-focus);
}
.agent-form textarea { min-height: 96px; resize: vertical; }

.agent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
  min-height: 48px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  background: var(--agent-accent);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
  transition: filter 180ms var(--agent-ease), transform 150ms var(--agent-ease), box-shadow 180ms var(--agent-ease), background 180ms var(--agent-ease);
}
.agent-btn:hover {
  filter: brightness(1.05);
  background: #4338ca;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.32);
}
.agent-btn:active { transform: scale(0.98); }
.agent-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.agent-btn-secondary {
  background: #fff;
  color: var(--agent-ink) !important;
  border: 1px solid var(--agent-line);
  box-shadow: none;
}
.agent-btn-secondary:hover {
  filter: none;
  background: var(--agent-bg);
  border-color: var(--agent-line-strong);
  box-shadow: none;
}
.agent-btn svg { width: 1.1rem; height: 1.1rem; }

.agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

/* ——— Tables ——— */
.agent-table-wrap {
  overflow-x: auto;
  margin: 0 -0.25rem;
  border-radius: 12px;
}
.agent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.agent-table th,
.agent-table td {
  text-align: left;
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--agent-line);
  vertical-align: top;
}
.agent-table th {
  color: var(--agent-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(244, 246, 248, 0.85);
}
.agent-table tbody tr {
  transition: background 150ms var(--agent-ease);
}
.agent-table tbody tr:hover {
  background: rgba(79, 70, 229, 0.04);
}
.agent-table a {
  font-weight: 600;
  text-decoration: none;
}
.agent-table a:hover { text-decoration: underline; }
.agent-table .muted { color: var(--agent-muted); font-size: 0.88rem; }

.agent-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--agent-accent-soft);
  color: #3730a3;
  white-space: nowrap;
}
.agent-badge--ok { background: var(--agent-ok-bg); color: var(--agent-ok); }
.agent-badge--warn { background: var(--agent-warn-bg); color: var(--agent-warn); }
.agent-badge--muted { background: #f1f5f9; color: var(--agent-muted); }

/* ——— Score result ——— */
.agent-score-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 0.5rem 0 0.25rem;
}
.agent-score-ring {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background:
    conic-gradient(var(--agent-accent) calc(var(--score, 50) * 1%), var(--agent-line) 0);
  display: grid;
  place-items: center;
}
.agent-score-ring > span {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-family: var(--agent-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--agent-ink);
}

/* ——— Auth (login / set password) ——— */
.agent-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.agent-auth-visual {
  position: relative;
  background:
    linear-gradient(160deg, rgba(10, 17, 40, 0.92) 0%, rgba(15, 23, 51, 0.88) 45%, rgba(79, 70, 229, 0.55) 100%),
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(139, 92, 246, 0.35), transparent 55%),
    linear-gradient(145deg, #0a1128 0%, #0f1733 48%, #312e81 100%);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  min-height: 100vh;
}
.agent-auth-visual::before {
  content: "";
  position: absolute;
  inset: -20% 40% auto -10%;
  height: 70%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 65%);
  pointer-events: none;
  animation: agent-drift 14s ease-in-out infinite alternate;
}
.agent-auth-visual::after {
  content: "";
  position: absolute;
  inset: auto -15% -25% 35%;
  height: 55%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35), transparent 60%);
  pointer-events: none;
  animation: agent-drift 18s ease-in-out infinite alternate-reverse;
}
.agent-auth-visual > * { position: relative; z-index: 1; }
.agent-auth-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
}
.agent-auth-brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 200px;
}
.agent-auth-brand-label {
  font-family: var(--agent-font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.78;
}
.agent-auth-copy h2 {
  margin: 0 0 0.65rem;
  font-family: var(--agent-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 16ch;
}
.agent-auth-copy p {
  margin: 0;
  max-width: 32ch;
  font-size: 1.05rem;
  line-height: 1.55;
  opacity: 0.88;
}
.agent-auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--agent-bg);
}
.agent-auth-card {
  width: min(420px, 100%);
  background: var(--agent-card);
  border: 1px solid var(--agent-line);
  border-radius: 20px;
  padding: 1.85rem 1.65rem 1.6rem;
  box-shadow: var(--agent-shadow-lg);
  animation: agent-rise 500ms var(--agent-ease) both;
}
.agent-auth-card-logo {
  display: none;
  height: 28px;
  width: auto;
  max-width: 140px;
  margin-bottom: 1rem;
}
.agent-auth-card h1 {
  margin: 0 0 0.35rem;
  font-family: var(--agent-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--agent-ink);
}
.agent-auth-card .sub {
  margin: 0 0 1.35rem;
  color: var(--agent-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.agent-auth-card form {
  display: grid;
  gap: 0.95rem;
}
.agent-auth-card label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.875rem;
}
.agent-auth-card input {
  width: 100%;
  border: 1px solid var(--agent-line);
  border-radius: var(--agent-radius-sm);
  padding: 0.8rem 0.95rem;
  font: inherit;
  background: #fff;
  transition: border-color 160ms var(--agent-ease), box-shadow 160ms var(--agent-ease);
}
.agent-auth-card input:focus {
  outline: none;
  border-color: var(--agent-accent);
  box-shadow: var(--agent-focus);
}
.agent-auth-card .agent-btn { width: 100%; margin-top: 0.25rem; }
.agent-auth-foot {
  margin-top: 1.15rem;
  font-size: 0.85rem;
  color: var(--agent-muted);
  line-height: 1.55;
}
.agent-auth-foot a { font-weight: 600; }

/* ——— Motion ——— */
@keyframes agent-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes agent-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(4%, -3%) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .agent-hero,
  .agent-kpi,
  .agent-card,
  .agent-alert,
  .agent-auth-card,
  .agent-auth-visual::before,
  .agent-auth-visual::after {
    animation: none !important;
  }
  .agent-btn:active,
  .agent-btn-ghost:active { transform: none; }
}

/* ——— Responsive ——— */
@media (max-width: 1200px) {
  .agent-nav a span { display: none; }
  .agent-nav a { padding: 0 0.85rem; }
  .agent-nav a::after { left: 0.55rem; right: 0.55rem; }
  .agent-btn-header span { display: none; }
  .agent-account-text { display: none; }
}

@media (max-width: 960px) {
  .agent-auth { grid-template-columns: 1fr; }
  .agent-auth-visual {
    min-height: auto;
    padding: 1.5rem 1.35rem 1.75rem;
  }
  .agent-auth-copy { display: none; }
  .agent-auth-card-logo { display: block; }
  .agent-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-form .row-2 { grid-template-columns: 1fr; }

  .agent-topbar-inner {
    grid-template-columns: 1fr auto;
    position: relative;
    min-height: 4.25rem;
  }
  .agent-topbar-start,
  .agent-topbar-end { min-height: 4.25rem; }
  .agent-nav-toggle { display: inline-flex; }
  .agent-btn-header,
  .agent-account { display: none; }
  .agent-nav {
    display: none;
    position: absolute;
    left: clamp(0.75rem, 3vw, 1.25rem);
    right: clamp(0.75rem, 3vw, 1.25rem);
    top: calc(100% + 0.35rem);
    max-width: none;
    margin: 0;
    background: #fff;
    border: 1px solid var(--agent-line);
    border-radius: 16px;
    box-shadow: var(--agent-shadow-lg);
    padding: 0.55rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.15rem;
    z-index: 60;
    overflow: visible;
  }
  .agent-topbar.is-open .agent-nav { display: flex; }
  .agent-nav a {
    width: 100%;
    border-radius: 12px;
    justify-content: flex-start;
    min-height: 48px;
    padding: 0.7rem 0.85rem;
  }
  .agent-nav a::after { display: none; }
  .agent-nav a span { display: inline; }
  .agent-nav a.is-active {
    background: var(--agent-accent-soft);
    color: #3730a3;
  }
  .agent-nav-mobile-extra {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.35rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--agent-line);
  }
  .agent-nav-logout { color: var(--agent-err) !important; }
  .agent-page-header-aside { display: none; }
}

@media (max-width: 560px) {
  .agent-kpis { grid-template-columns: 1fr; }
  .agent-brand-pill { display: none; }
  .agent-score-panel { grid-template-columns: 1fr; justify-items: start; }
  .agent-brand-logo { height: 28px; max-width: 120px; }
  .agent-dash-welcome { padding: 1.15rem 1.1rem; }
  .agent-dash-list-item { flex-direction: column; align-items: flex-start; }
  .agent-dash-list-meta { width: 100%; }
  .agent-page-header { padding: 1.1rem; }
}

/* ——— Dashboard (dense workspace) ——— */
.agent-dash-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
  padding: 1.35rem 1.45rem;
  border-radius: var(--agent-radius);
  border: 1px solid var(--agent-line);
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(139, 92, 246, 0.06) 45%, rgba(255, 255, 255, 0.95) 100%),
    var(--agent-card);
  box-shadow: var(--agent-shadow);
  animation: agent-rise 420ms var(--agent-ease) both;
}
.agent-dash-welcome h1 {
  margin: 0 0 0.35rem;
  font-family: var(--agent-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--agent-ink);
  line-height: 1.15;
}
.agent-dash-welcome p {
  margin: 0;
  max-width: 38rem;
  color: var(--agent-muted);
  font-size: 0.98rem;
}
.agent-dash-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.agent-dash-welcome-actions .agent-btn,
.agent-dash-welcome-actions .agent-btn-secondary {
  min-height: 44px;
}

.agent-kpis--dash .agent-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-top: 1rem;
}
.agent-kpi--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 160ms var(--agent-ease), box-shadow 180ms var(--agent-ease), border-color 180ms var(--agent-ease);
}
.agent-kpi--link:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.12);
  color: inherit;
}
.agent-kpi-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--agent-accent-soft);
  color: var(--agent-accent);
  margin-bottom: 0.55rem;
}
.agent-kpi-icon svg { width: 1.15rem; height: 1.15rem; }
.agent-kpi-icon--ok { background: var(--agent-ok-bg); color: var(--agent-ok); }
.agent-kpi-icon--cal { background: #eff6ff; color: #1d4ed8; }
.agent-kpi-icon--conv { background: #f5f3ff; color: #6d28d9; }
.agent-kpi-meta {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--agent-muted);
  font-weight: 500;
}

.agent-dash-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.agent-dash-action {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--agent-radius);
  border: 1px solid var(--agent-line);
  background: var(--agent-card);
  box-shadow: var(--agent-shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 180ms var(--agent-ease), box-shadow 180ms var(--agent-ease), transform 160ms var(--agent-ease);
  animation: agent-rise 500ms var(--agent-ease) both;
  min-height: 44px;
  cursor: pointer;
}
.agent-dash-action:nth-child(1) { animation-delay: 60ms; }
.agent-dash-action:nth-child(2) { animation-delay: 110ms; }
.agent-dash-action:nth-child(3) { animation-delay: 160ms; }
.agent-dash-action:hover {
  border-color: #c7d2fe;
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.1);
  transform: translateY(-2px);
  color: inherit;
}
.agent-dash-action-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: var(--agent-accent-soft);
  color: var(--agent-accent);
  display: grid;
  place-items: center;
}
.agent-dash-action-icon svg { width: 1.25rem; height: 1.25rem; }
.agent-dash-action-body {
  display: grid;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}
.agent-dash-action-body strong {
  font-size: 0.98rem;
  color: var(--agent-ink);
}
.agent-dash-action-body span {
  font-size: 0.84rem;
  color: var(--agent-muted);
  line-height: 1.4;
}
.agent-dash-action-go {
  color: var(--agent-accent);
  font-weight: 700;
  align-self: center;
  opacity: 0.7;
}

.agent-dash-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  align-items: start;
}
.agent-dash-panel { margin-bottom: 0; }
.agent-dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.agent-dash-list li + li {
  border-top: 1px solid var(--agent-line);
}
.agent-dash-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0.15rem;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background 150ms var(--agent-ease);
  cursor: pointer;
}
a.agent-dash-list-item:hover {
  background: rgba(79, 70, 229, 0.04);
  color: inherit;
}
.agent-dash-list-item--static { cursor: default; }
.agent-dash-list-main {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.agent-dash-list-main strong {
  font-size: 0.95rem;
  color: var(--agent-ink);
}
.agent-dash-list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-shrink: 0;
}
.agent-dash-list-when {
  font-size: 0.78rem;
  white-space: nowrap;
}
.agent-score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 0.4rem;
  border-radius: 8px;
  background: var(--agent-deep);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.agent-empty--compact {
  padding: 1.5rem 0.75rem;
}

/* Address autocomplete (matches public prequalify behavior) */
.agent-address-wrap {
  position: relative;
}
.agent-form .hint {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--agent-muted);
  margin-bottom: 0.15rem;
}
.agent-field-hint {
  margin: -0.35rem 0 0.35rem;
  font-size: 0.82rem;
  color: var(--agent-muted);
  font-weight: 500;
}
.agent-form .address-suggestions {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--agent-line);
  border-radius: 12px;
  box-shadow: var(--agent-shadow-lg);
  z-index: 40;
  max-height: 240px;
  overflow-y: auto;
}
.agent-form .address-suggestion-item {
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid var(--agent-line);
  transition: background 150ms var(--agent-ease);
}
.agent-form .address-suggestion-item:last-child {
  border-bottom: none;
}
.agent-form .address-suggestion-item:hover,
.agent-form .address-suggestion-item.selected {
  background: var(--agent-accent-soft);
}
.agent-form .address-suggestion-main {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--agent-ink);
}
.agent-form .address-suggestion-secondary {
  font-size: 0.8rem;
  color: var(--agent-muted);
  margin-top: 0.15rem;
}
.agent-input.is-attom-filled {
  border-color: #a7f3d0;
  background: #f0fdf4;
}
.agent-input:read-only {
  cursor: default;
}

@media (max-width: 960px) {
  .agent-dash-actions { grid-template-columns: 1fr; }
  .agent-dash-grid { grid-template-columns: 1fr; }
  .agent-dash-welcome-actions { width: 100%; }
  .agent-dash-welcome-actions .agent-btn { flex: 1; }
}

