:root {
  --bg: #f4f7fb;
  --bg-dark: #081122;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-dark: rgba(9, 18, 35, 0.82);
  --border: #d9e2ef;
  --border-strong: #c6d3e5;
  --text: #0f172a;
  --text-soft: #475569;
  --text-inverse: #f8fafc;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.1), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
}

.card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(217, 226, 239, 0.85);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

input, select, button, textarea {
  font: inherit;
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button:hover, .button:hover {
  transform: translateY(-1px);
  background: var(--primary-dark);
  text-decoration: none;
}

button:disabled { opacity: 0.6; cursor: not-allowed; }
textarea { resize: vertical; min-height: 120px; }

.table-wrap,
.table-responsive { width: 100%; overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid #e6edf5;
  text-align: left;
  vertical-align: top;
}
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: rgba(248, 250, 252, 0.92);
}

.flash-message,
.user-message,
.admin-message {
  margin-bottom: 16px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 600;
}
.flash-message.hidden { display: none; }
.flash-message.info,
.user-message,
.admin-message,
.admin-message--info { background: rgba(8, 145, 178, 0.08); border-color: rgba(8,145,178,.18); color: #0f5062; }
.flash-message.success,
.admin-message--success { background: rgba(22, 163, 74, 0.08); border-color: rgba(22,163,74,.18); color: #166534; }
.flash-message.error,
.admin-message--error { background: rgba(220, 38, 38, 0.08); border-color: rgba(220,38,38,.18); color: #991b1b; }
.flash-message.warning,
.admin-message--warning { background: rgba(217, 119, 6, 0.08); border-color: rgba(217,119,6,.18); color: #92400e; }

.status-badge,
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: capitalize;
}
.status-pending, .badge-warning { background: rgba(217,119,6,.14); color: #9a5a06; }
.status-approved, .status-completed, .status-fulfilled, .badge-success { background: rgba(22,163,74,.14); color: #166534; }
.status-rejected, .status-cancelled, .status-declined, .badge-danger { background: rgba(220,38,38,.12); color: #991b1b; }
.status-review, .status-submitted, .status-processing, .status-generated, .badge-info { background: rgba(37,99,235,.12); color: #1d4ed8; }

.summary-grid,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.summary-card,
.metric-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,255,0.98));
  border: 1px solid rgba(217,226,239,.9);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.summary-label,
.metric-label { color: var(--text-soft); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.summary-value,
.metric-value { margin-top: 12px; font-size: 32px; font-weight: 800; }

.section-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 540px) minmax(360px, 1fr);
}

.auth-hero {
  padding: 56px 48px;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.28), transparent 30%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.18), transparent 30%),
    linear-gradient(180deg, #081122 0%, #0f1b34 100%);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-hero__eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}

.auth-hero h1 { font-size: clamp(34px, 4vw, 54px); line-height: 1.05; margin: 18px 0 14px; }
.auth-hero p { max-width: 520px; color: rgba(248,250,252,0.82); font-size: 17px; line-height: 1.6; }
.auth-feature-list { display: grid; gap: 12px; margin-top: 28px; }
.auth-feature {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
}
.auth-feature strong { display: block; margin-bottom: 6px; }
.auth-feature span { color: rgba(248,250,252,0.76); font-size: 14px; }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
}

.auth-card {
  width: 100%;
  max-width: 470px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(217,226,239,0.9);
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.auth-card h2 { margin: 0 0 8px; font-size: 30px; }
.auth-card__intro { margin: 0 0 26px; color: var(--text-soft); }
.auth-card form { display: grid; gap: 16px; }
.auth-card .form-actions { margin-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; }
.auth-card .helper-links { margin-top: 18px; color: var(--text-soft); font-size: 14px; }
.auth-card .helper-links a { font-weight: 700; }
.auth-note {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 14px;
}

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { padding: 36px 24px; }
  .auth-panel { padding: 24px; }
  .container { padding: 18px; }
}

.auth-card label small {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
}
.auth-address-search {
  position: relative;
}
.auth-address-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 6px);
  z-index: 10;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}
.auth-address-suggestion {
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid transparent;
  display: grid;
  gap: 4px;
}
.auth-address-suggestion:hover {
  border-color: #93c5fd;
}
.auth-address-suggestion span {
  font-size: 12px;
  color: var(--text-soft);
}


.button-secondary {
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
}
.button-secondary:hover {
  background: #0b1220;
}

.auth-shell--login {
  grid-template-columns: minmax(360px, 0.96fr) minmax(440px, 1.04fr);
  background:
    linear-gradient(90deg, rgba(8, 17, 34, 1) 0%, rgba(8, 17, 34, 1) 35.5%, rgba(244, 247, 251, 1) 35.5%, rgba(244, 247, 251, 1) 100%);
}

.auth-hero--login {
  position: relative;
  overflow: hidden;
  padding: 44px clamp(28px, 4vw, 48px);
  gap: 34px;
}
.auth-hero--login::before,
.auth-hero--login::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
}
.auth-hero--login::before {
  width: 300px;
  height: 300px;
  right: -110px;
  top: -80px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.26) 0%, rgba(96, 165, 250, 0) 70%);
}
.auth-hero--login::after {
  width: 340px;
  height: 340px;
  left: -120px;
  bottom: -160px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.24) 0%, rgba(37, 99, 235, 0) 72%);
}
.auth-hero__content,
.auth-hero__footer,
.auth-panel--login,
.auth-card--login {
  position: relative;
  z-index: 1;
}
.auth-hero__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.auth-hero__meta,
.auth-card__trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.auth-status-pill,
.auth-card__trust span,
.auth-card__status,
.auth-card__brand {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.auth-status-pill {
  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(248, 250, 252, 0.88);
}
.auth-status-pill--secure::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 8px;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
}
.auth-hero__copy {
  max-width: 640px;
}
.auth-hero__copy h1 {
  max-width: 12ch;
}
.auth-feature-list--login {
  gap: 14px;
}
.auth-feature--login {
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.auth-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.auth-proof-card {
  padding: 16px 16px 15px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.auth-proof-card strong,
.auth-note__title,
.auth-reassurance__item strong {
  display: block;
  margin-bottom: 6px;
}
.auth-proof-card span,
.auth-hero__supporting-copy,
.auth-reassurance__item span {
  color: rgba(248,250,252,0.76);
  font-size: 13px;
  line-height: 1.55;
}
.auth-hero__supporting-copy {
  margin: 14px 0 0;
  max-width: 540px;
}

.auth-panel--login {
  position: relative;
  padding: clamp(24px, 4vw, 48px);
}
.auth-panel__backdrop {
  position: absolute;
  width: min(540px, 78%);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.04) 32%, rgba(37, 99, 235, 0) 70%);
  filter: blur(10px);
  top: 50%;
  left: 50%;
  transform: translate(-30%, -50%);
}
.auth-card--login {
  max-width: 520px;
  padding: 28px 28px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(248,251,255,0.98));
  border-color: rgba(198, 211, 229, 0.86);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  animation: authCardEnter 320ms ease;
}
.auth-card--login:hover {
  transform: translateY(-2px);
  box-shadow: 0 34px 72px rgba(15, 23, 42, 0.14);
  border-color: rgba(147, 197, 253, 0.72);
}
.auth-card__topbar,
.auth-card__header,
.auth-form__meta,
.auth-reassurance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.auth-card__topbar {
  margin-bottom: 18px;
}
.auth-card__brand {
  padding: 7px 12px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.16);
}
.auth-card__status {
  padding: 7px 11px;
  color: #0f172a;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.auth-card__header {
  align-items: flex-start;
  margin-bottom: 22px;
}
.auth-card__trust span {
  padding: 8px 10px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid rgba(147, 197, 253, 0.5);
}
.auth-form {
  display: grid;
  gap: 18px;
}
.auth-field-group {
  display: grid;
  gap: 16px;
}
.auth-field {
  display: grid;
  gap: 8px;
}
.auth-field > span {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.auth-field small {
  color: var(--text-soft);
}
.auth-input-wrap {
  position: relative;
}
.auth-input-wrap input {
  padding-left: 42px;
  padding-right: 14px;
  min-height: 52px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);
  border-color: rgba(198, 211, 229, 0.95);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease, background 0.18s ease;
}
.auth-input-wrap input:hover {
  border-color: rgba(59, 130, 246, 0.46);
}
.auth-input-wrap input:focus {
  background: #ffffff;
  transform: translateY(-1px);
}
.auth-input-wrap--password input {
  padding-right: 74px;
}
.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-weight: 800;
  pointer-events: none;
}
.auth-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 12px;
  min-width: 58px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-size: 12px;
  box-shadow: none;
}
.auth-password-toggle:hover {
  background: rgba(15, 23, 42, 0.10);
}
.auth-field--invalid .auth-input-wrap input {
  border-color: rgba(220, 38, 38, 0.52);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}
.auth-field__error {
  font-size: 13px;
  color: #b91c1c;
}
.auth-form__meta {
  align-items: center;
  flex-wrap: wrap;
}
.auth-checkline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 14px;
}
.auth-checkline__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}
.auth-inline-link {
  font-weight: 700;
}
.auth-form__actions {
  margin-top: 2px;
  gap: 12px;
}
.auth-submit-button,
.auth-create-account {
  min-height: 48px;
}
.auth-submit-button {
  min-width: 136px;
}
.auth-submit-button__spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #ffffff;
  display: none;
  animation: authSpin 0.8s linear infinite;
}
.auth-form.is-submitting .auth-submit-button {
  pointer-events: none;
}
.auth-form.is-submitting .auth-submit-button__spinner {
  display: inline-block;
}
.auth-form.is-submitting .auth-submit-button__label {
  opacity: 0.92;
}
.auth-form.is-submitting input,
.auth-form.is-submitting .auth-password-toggle,
.auth-form.is-submitting .auth-create-account {
  pointer-events: none;
}
.auth-note--login {
  margin-top: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
}
.auth-note--login p {
  margin: 0;
  color: #475569;
}
.auth-reassurance {
  margin-top: 18px;
  align-items: stretch;
}
.auth-reassurance__item {
  flex: 1;
  padding: 14px 14px 13px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
}
.auth-reassurance__item span {
  color: #64748b;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}
@keyframes authCardEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 26%),
    linear-gradient(180deg, #08111f 0%, #0b1325 100%);
  color: #e5eefb;
}
html[data-theme="dark"] .auth-shell--login {
  background:
    linear-gradient(90deg, rgba(5, 10, 20, 1) 0%, rgba(5, 10, 20, 1) 35.5%, rgba(8, 17, 34, 1) 35.5%, rgba(8, 17, 34, 1) 100%);
}
html[data-theme="dark"] .auth-panel__backdrop {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16) 0%, rgba(59, 130, 246, 0.06) 32%, rgba(59, 130, 246, 0) 70%);
}
html[data-theme="dark"] .auth-card--login {
  background: linear-gradient(180deg, rgba(10, 19, 37, 0.96), rgba(12, 24, 45, 0.98));
  border-color: rgba(51, 65, 85, 0.92);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
}
html[data-theme="dark"] .auth-card h2,
html[data-theme="dark"] .auth-field > span,
html[data-theme="dark"] .auth-card__status,
html[data-theme="dark"] .auth-password-toggle,
html[data-theme="dark"] .auth-card__intro,
html[data-theme="dark"] .auth-inline-link,
html[data-theme="dark"] .auth-checkline,
html[data-theme="dark"] .auth-field small,
html[data-theme="dark"] .auth-reassurance__item span,
html[data-theme="dark"] .auth-note--login p {
  color: #cbd5e1;
}
html[data-theme="dark"] .auth-card__brand {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(96, 165, 250, 0.22);
  color: #bfdbfe;
}
html[data-theme="dark"] .auth-card__status,
html[data-theme="dark"] .auth-card__trust span,
html[data-theme="dark"] .auth-reassurance__item,
html[data-theme="dark"] .auth-note--login {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(51, 65, 85, 0.92);
}
html[data-theme="dark"] .auth-input-wrap input {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(12, 22, 39, 0.98));
  border-color: rgba(51, 65, 85, 0.95);
  color: #f8fafc;
}
html[data-theme="dark"] .auth-input-wrap input::placeholder {
  color: #94a3b8;
}
html[data-theme="dark"] .auth-input-wrap input:hover {
  border-color: rgba(96, 165, 250, 0.56);
}
html[data-theme="dark"] .auth-input-icon {
  color: #94a3b8;
}
html[data-theme="dark"] .auth-password-toggle:hover {
  background: rgba(30, 41, 59, 0.92);
}
html[data-theme="dark"] .auth-note {
  color: #cbd5e1;
}
html[data-theme="dark"] .flash-message.info,
html[data-theme="dark"] .flash-message.warning,
html[data-theme="dark"] .flash-message.error,
html[data-theme="dark"] .flash-message.success {
  background: rgba(15, 23, 42, 0.88);
}

@media (max-width: 1180px) {
  .auth-shell--login {
    grid-template-columns: minmax(320px, 0.92fr) minmax(380px, 1.08fr);
  }
  .auth-proof-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .auth-shell--login {
    grid-template-columns: 1fr;
    background: linear-gradient(180deg, rgba(8, 17, 34, 1) 0%, rgba(8, 17, 34, 1) 48%, rgba(244, 247, 251, 1) 48%, rgba(244, 247, 251, 1) 100%);
  }
  html[data-theme="dark"] .auth-shell--login {
    background: linear-gradient(180deg, rgba(5, 10, 20, 1) 0%, rgba(5, 10, 20, 1) 48%, rgba(8, 17, 34, 1) 48%, rgba(8, 17, 34, 1) 100%);
  }
  .auth-hero__header,
  .auth-card__header,
  .auth-card__topbar,
  .auth-form__meta,
  .auth-reassurance {
    flex-direction: column;
    align-items: flex-start;
  }
  .auth-hero__copy h1 {
    max-width: 14ch;
  }
  .auth-panel__backdrop {
    width: 85%;
    transform: translate(-50%, -45%);
  }
}

@media (max-width: 640px) {
  .auth-hero--login,
  .auth-panel--login {
    padding: 24px 18px;
  }
  .auth-card--login {
    padding: 22px 18px 18px;
    border-radius: 22px;
  }
  .auth-proof-grid,
  .auth-reassurance {
    grid-template-columns: 1fr;
  }
  .auth-form__actions > * {
    width: 100%;
  }
}

/* Hybrid auth redesign */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.auth-shell--hybrid {
  min-height: 0;
  grid-template-columns: minmax(320px, 1.02fr) minmax(400px, 0.98fr);
  background: linear-gradient(90deg, #071226 0%, #0b1d3b 48%, #f7f8fb 48%, #f7f8fb 100%);
}

.auth-hero--hybrid {
  padding: 32px clamp(24px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.auth-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  font-weight: 700;
  font-size: 15px;
}

.auth-brand-lockup__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.auth-hero__content--hybrid {
  display: grid;
  gap: 18px;
  max-width: 560px;
}

.auth-hero__copy--hybrid h1 {
  max-width: 11ch;
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.auth-hero__copy--hybrid p {
  max-width: 480px;
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(248,250,252,0.82);
}

.auth-hero__trustline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-hero__trustline span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
  color: rgba(248,250,252,0.88);
  font-size: 12px;
  font-weight: 700;
}

.auth-workspace-preview {
  position: relative;
  width: min(420px, 100%);
  min-height: 300px;
  margin-top: 8px;
}

.auth-workspace-preview__frame {
  position: absolute;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.36);
}

.auth-workspace-preview__frame--back {
  inset: 38px 78px 62px 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  backdrop-filter: blur(12px);
}

.auth-workspace-preview__frame--front {
  inset: 0 0 0 84px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(126, 176, 255, 0.26), rgba(15, 32, 63, 0.78));
  backdrop-filter: blur(16px);
}

.auth-workspace-preview__header {
  width: 44%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  margin-bottom: 18px;
}

.auth-workspace-preview__hero {
  height: 132px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(147,197,253,0.28));
  margin-bottom: 16px;
}

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

.auth-workspace-preview__grid span {
  display: block;
  height: 62px;
  border-radius: 16px;
  background: rgba(255,255,255,0.13);
}

.auth-workspace-preview__badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 30px rgba(2, 8, 23, 0.32);
}

.auth-workspace-preview__badge--secure {
  top: 14px;
  right: -6px;
  background: #6d5efc;
  color: #fff;
}

.auth-workspace-preview__badge--fast {
  bottom: 12px;
  left: 12px;
  background: rgba(255,255,255,0.95);
  color: #0f172a;
}

.auth-panel--hybrid {
  padding: 32px clamp(22px, 3vw, 44px);
  align-items: center;
}

.auth-card--hybrid {
  width: 100%;
  max-width: 454px;
  padding: 20px 22px 18px;
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(203, 213, 225, 0.9);
  background: rgba(255,255,255,0.98);
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  background: #edf2f8;
  margin-bottom: 18px;
}

.auth-switch__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  color: #475569;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.auth-switch__item:hover {
  background: rgba(255,255,255,0.8);
  color: #0f172a;
  text-decoration: none;
}

.auth-switch__item--active {
  background: #1f69df;
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.auth-card__header--stacked {
  display: block;
  margin-bottom: 16px;
}

.auth-card__header--stacked .auth-card__intro {
  margin: 6px 0 0;
}

.auth-form--hybrid {
  gap: 14px;
}

.auth-field-group--compact {
  gap: 14px;
}

.auth-input-wrap--minimal input,
.auth-form--signup select {
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #d5deea;
  box-shadow: none;
}

.auth-input-wrap--minimal input {
  padding-left: 14px;
}

.auth-input-wrap--minimal input:hover,
.auth-form--signup select:hover {
  border-color: #b6c3d7;
}

.auth-input-wrap--minimal input:focus,
.auth-form--signup select:focus {
  transform: none;
  border-color: rgba(37, 99, 235, 0.66);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.auth-input-wrap--password.auth-input-wrap--minimal input {
  padding-right: 76px;
}

.auth-password-toggle--minimal {
  min-width: 60px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #eef2f7;
  font-size: 12px;
}

.auth-submit-button--full,
.auth-create-account--ghost {
  width: 100%;
  min-height: 48px;
}

.auth-submit-button--full {
  margin-top: 4px;
}

.auth-form__meta--stacked {
  display: grid;
  gap: 12px;
  justify-items: stretch;
}

.auth-form__meta--stacked .auth-inline-link {
  justify-self: center;
}

.auth-create-account--ghost {
  background: transparent;
  color: #1d4ed8;
  border: 1px solid #bfd1f5;
}

.auth-create-account--ghost:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.auth-microcopy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.auth-microcopy--signup {
  display: block;
}

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

.auth-form--signup {
  gap: 12px;
}

.auth-form--signup .auth-field {
  gap: 6px;
}

.auth-form--signup .auth-form__meta--signup {
  margin-top: 4px;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px 18px;
  border-top: 1px solid rgba(203, 213, 225, 0.72);
  background: #f7f8fb;
}

.auth-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.auth-footer__links a,
.auth-footer__meta {
  font-size: 13px;
  color: #64748b;
}

.auth-form.shake,
.auth-card.shake {
  animation: authShake 0.22s linear;
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

html[data-theme="dark"] .auth-shell--hybrid {
  background: linear-gradient(90deg, #040c1a 0%, #07182f 48%, #071121 48%, #071121 100%);
}

html[data-theme="dark"] .auth-card--hybrid {
  background: rgba(8, 17, 34, 0.96);
  border-color: rgba(51, 65, 85, 0.9);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.42);
}

html[data-theme="dark"] .auth-switch {
  background: rgba(15, 23, 42, 0.84);
}

html[data-theme="dark"] .auth-switch__item {
  color: #cbd5e1;
}

html[data-theme="dark"] .auth-switch__item:hover {
  background: rgba(30, 41, 59, 0.86);
  color: #fff;
}

html[data-theme="dark"] .auth-switch__item--active {
  background: #2563eb;
}

html[data-theme="dark"] .auth-input-wrap--minimal input,
html[data-theme="dark"] .auth-form--signup select {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(51, 65, 85, 0.95);
  color: #f8fafc;
}

html[data-theme="dark"] .auth-password-toggle--minimal {
  background: rgba(30, 41, 59, 0.92);
  color: #e2e8f0;
}

html[data-theme="dark"] .auth-create-account--ghost {
  border-color: rgba(96, 165, 250, 0.34);
  color: #bfdbfe;
}

html[data-theme="dark"] .auth-create-account--ghost:hover {
  background: rgba(30, 41, 59, 0.8);
}

html[data-theme="dark"] .auth-microcopy,
html[data-theme="dark"] .auth-footer__links a,
html[data-theme="dark"] .auth-footer__meta {
  color: #94a3b8;
}

html[data-theme="dark"] .auth-footer {
  background: #071121;
  border-top-color: rgba(51, 65, 85, 0.74);
}

@media (max-width: 1180px) {
  .auth-shell--hybrid {
    grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  }

  .auth-hero__copy--hybrid h1 {
    font-size: clamp(34px, 4vw, 54px);
  }

  .auth-workspace-preview {
    width: min(360px, 100%);
    min-height: 270px;
  }
}

@media (max-width: 960px) {
  .auth-page {
    grid-template-rows: auto auto;
  }

  .auth-shell--hybrid {
    grid-template-columns: 1fr;
    background: linear-gradient(180deg, #071226 0%, #0b1d3b 42%, #f7f8fb 42%, #f7f8fb 100%);
  }

  html[data-theme="dark"] .auth-shell--hybrid {
    background: linear-gradient(180deg, #040c1a 0%, #07182f 42%, #071121 42%, #071121 100%);
  }

  .auth-hero--hybrid,
  .auth-panel--hybrid {
    padding: 24px 18px;
  }

  .auth-hero__copy--hybrid h1,
  .auth-hero__copy h1 {
    max-width: 14ch;
  }

  .auth-workspace-preview {
    width: min(420px, 100%);
  }

  .auth-grid-2 {
    grid-template-columns: 1fr;
  }

  .auth-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .auth-card--hybrid {
    padding: 18px 16px 16px;
    border-radius: 18px;
  }

  .auth-shell--hybrid {
    background: linear-gradient(180deg, #071226 0%, #0b1d3b 36%, #f7f8fb 36%, #f7f8fb 100%);
  }

  html[data-theme="dark"] .auth-shell--hybrid {
    background: linear-gradient(180deg, #040c1a 0%, #07182f 36%, #071121 36%, #071121 100%);
  }

  .auth-workspace-preview {
    min-height: 220px;
  }

  .auth-workspace-preview__frame--front {
    inset: 0 0 0 36px;
  }

  .auth-workspace-preview__frame--back {
    inset: 32px 56px 48px 0;
  }
}


/* === Auth production cleanup === */
.auth-page--clean {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.auth-shell--clean {
  min-height: min(100svh, 900px);
  flex: 1 0 auto;
  display: grid;
  align-items: stretch;
  overflow: clip;
}

.auth-shell--clean.auth-shell--login {
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 460px);
  background: linear-gradient(90deg, #f4f7fb 0%, #f4f7fb 100%);
}

.auth-shell--clean.auth-shell--signup {
  grid-template-columns: minmax(220px, 0.9fr) minmax(360px, 520px);
  background: linear-gradient(90deg, #f8fbff 0%, #f8fbff 100%);
}

.auth-hero--clean {
  min-height: 0;
  padding: clamp(28px, 4vw, 48px);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  color: var(--text);
  justify-content: center;
  gap: 24px;
  overflow: hidden;
}

.auth-hero--clean.auth-hero--login {
  align-items: flex-start;
}

.auth-hero--blank {
  color: transparent;
}

.auth-brand-lockup--clean {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.auth-brand-lockup__logo--dashboard {
  display: inline-flex;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 14px 34px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  flex-shrink: 0;
}

.auth-brand-lockup__logo--dashboard svg {
  display: block;
  width: 72px;
  height: 72px;
}

.auth-brand-lockup--muted {
  opacity: 0.38;
}

.auth-hero__content--clean {
  display: grid;
  gap: 14px;
  max-width: 420px;
}

.auth-hero__content--clean h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #111827;
}

.auth-panel--clean {
  min-height: 0;
  padding: clamp(20px, 4vw, 36px);
  align-items: center;
}

.auth-card--clean {
  max-width: 420px;
  padding: 22px;
  border-radius: 24px;
}

.auth-card__header--compact h2 {
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.auth-card--clean .auth-card__intro {
  margin: 6px 0 0;
  font-size: 0.95rem;
}

.auth-switch--compact {
  margin-bottom: 18px;
}

.auth-form--clean {
  display: grid;
  gap: 12px;
}

.auth-field-group--compact {
  display: grid;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field > span {
  font-size: 0.93rem;
  font-weight: 700;
  color: #111827;
}

.auth-field small:not(.auth-field__error) {
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.auth-input-wrap--minimal input,
.auth-input-wrap--minimal select,
.auth-input-wrap--minimal textarea,
.auth-card--clean select,
.auth-card--clean input {
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 12px;
}

.auth-password-toggle--minimal {
  align-self: center;
  margin-right: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
}
.auth-password-toggle--minimal:hover { background: rgba(37, 99, 235, 0.08); color: var(--primary-dark); }

.auth-submit-button--full {
  width: 100%;
  min-height: 46px;
}

.auth-form__meta--compact {
  gap: 10px;
  align-items: stretch;
}

.auth-form__meta--compact .button,
.auth-form__meta--compact .auth-inline-link {
  width: 100%;
  text-align: center;
  justify-content: center;
}

.auth-create-account--ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}
.auth-create-account--ghost:hover {
  background: #f8fafc;
  color: var(--text);
}

.auth-microcopy--clean {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.auth-checkline__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
}

.auth-footer--clean {
  flex: 0 0 auto;
  padding: 14px 20px 18px;
  text-align: center;
  color: var(--text-soft);
}

.auth-footer--clean .auth-footer__links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.auth-footer__meta {
  margin: 0;
  font-size: 0.85rem;
}

.auth-grid-2--tight {
  gap: 12px;
}

.auth-address-search--clean {
  position: relative;
  overflow: visible;
}

.auth-address-helper {
  position: static;
  display: block;
  margin-top: 2px;
  padding-top: 0;
  background: transparent;
  z-index: auto;
}

.auth-address-suggestions {
  top: calc(100% + 8px);
  z-index: 30;
  border: 1px solid var(--border);
}

.auth-address-suggestions[hidden] {
  display: none !important;
}

.auth-address-suggestion {
  width: 100%;
}

.auth-brand-lockup__name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
}

.auth-inline-link {
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-field__error {
  color: var(--danger);
  font-size: 0.8rem;
}

@media (max-width: 1080px) {
  .auth-shell--clean.auth-shell--login,
  .auth-shell--clean.auth-shell--signup {
    grid-template-columns: minmax(260px, 1fr) minmax(340px, 420px);
  }
  .auth-hero__content--clean h1 {
    font-size: clamp(1.9rem, 4vw, 3.2rem);
  }
}

@media (max-width: 860px) {
  .auth-shell--clean,
  .auth-shell--clean.auth-shell--login,
  .auth-shell--clean.auth-shell--signup {
    min-height: auto;
    grid-template-columns: 1fr;
  }
  .auth-hero--login {
    min-height: 0;
    padding-bottom: 12px;
  }
  .auth-hero--signup {
    display: none;
  }
  .auth-panel--clean {
    padding-top: 8px;
  }
  .auth-card--clean {
    max-width: 100%;
  }
}


.auth-form__meta--login-only {
  gap: 6px;
  align-items: flex-start;
}

.auth-address-helper {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #475569;
}

.auth-address-suggestions {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.auth-address-suggestion {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 0;
  outline: none;
  box-shadow: none;
}

.auth-address-suggestion:last-child {
  border-bottom: 0;
}

.auth-address-suggestion:hover,
.auth-address-suggestion:focus-visible {
  background: #f8fafc;
  outline: none;
}

.auth-address-suggestion__content {
  min-width: 0;
  flex: 1;
}

.auth-address-suggestion__primary {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: #111827;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.auth-address-suggestion__secondary {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.35;
  color: #6b7280;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.auth-address-suggestion__arrow {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
  color: #111827;
}

.auth-address-suggestion--manual {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}


/* Domv484 auth + viewport stability patch */
html,
body {
  overscroll-behavior-y: none;
}

body {
  overflow-x: hidden;
}
