/* ARB v6 — login: ecran split (hero + panou), fără toggle în colț; contrast separat pe temă */

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

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

.auth-page .btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: filter var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.auth-page .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-page .btn:hover {
  filter: brightness(1.04);
}

.auth-page .btn:active {
  transform: translateY(1px);
}

.auth-page .btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #041018;
  border-color: transparent;
}

.auth-page .alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid transparent;
  font-size: var(--fs-small);
  line-height: 1.45;
}

body.auth-body.auth-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
}

html[data-theme="dark"] body.auth-body.auth-page {
  background: #020308;
}

html[data-theme="light"] body.auth-body.auth-page {
  background: var(--bg);
}

/* Split: stânga brand / dreapta formular */
.auth-split {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .auth-split {
    grid-template-columns: minmax(280px, 42%) 1fr;
  }
}

.auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 40px);
  overflow: hidden;
}

html[data-theme="dark"] .auth-hero {
  background:
    radial-gradient(ellipse 90% 70% at 20% 20%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 80%, rgba(129, 140, 248, 0.1), transparent 50%),
    linear-gradient(165deg, #0a1628 0%, #03040a 50%, #020205 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

html[data-theme="light"] .auth-hero {
  background: linear-gradient(165deg, #eff6ff 0%, #f8fafc 45%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border-strong);
}

@media (min-width: 900px) {
  html[data-theme="dark"] .auth-hero {
    border-bottom: none;
    border-right: 1px solid rgba(148, 163, 184, 0.1);
  }
  html[data-theme="light"] .auth-hero {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
}

.auth-hero__mesh {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.auth-hero__brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-hero__mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  background: conic-gradient(from 210deg, var(--poly-cyan), var(--accent-2), var(--poly-mint), var(--poly-cyan));
  box-shadow: 0 16px 40px rgba(45, 212, 191, 0.15);
}

html[data-theme="light"] .auth-hero__mark {
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
}

.auth-hero__titles {
  min-width: 0;
}

.auth-hero__kicker {
  margin: 0;
  font-size: var(--fs-micro);
  font-weight: var(--fw-normal);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-hero__name {
  margin: 6px 0 0;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: var(--fw-heading);
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
}

.auth-hero__tag {
  margin: 10px 0 0;
  font-size: var(--fs-small);
  font-weight: var(--fw-normal);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 36ch;
}

.auth-hero__foot {
  position: relative;
  z-index: 1;
  font-size: var(--fs-micro);
  color: var(--muted);
  font-weight: var(--fw-normal);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 5vw, 48px) clamp(20px, 4vw, 48px);
  background: var(--bg-surface);
}

html[data-theme="dark"] .auth-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5) 0%, var(--bg) 100%);
}

html[data-theme="light"] .auth-panel {
  background: var(--bg-elevated);
}

.auth-panel__inner {
  width: 100%;
  max-width: 400px;
  margin-inline: auto;
}

.auth-h1 {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 2.2vw, 1.35rem);
  font-weight: var(--fw-heading);
  letter-spacing: -0.03em;
  color: var(--text);
}

.auth-lead {
  margin: 0 0 24px;
  font-size: var(--fs-small);
  font-weight: var(--fw-normal);
  line-height: var(--line-body);
  color: var(--muted);
}

.auth-form {
  position: relative;
  display: grid;
  gap: 18px;
}

.auth-page .field-label {
  font-size: var(--fs-small);
  font-weight: var(--fw-label);
  color: var(--text-secondary);
}

.auth-page .field-input {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--input-bg);
  color: var(--text);
  padding: 13px 14px;
  font-size: var(--fs-body);
  width: 100%;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

html[data-theme="dark"] .auth-page .field-input {
  border-color: rgba(148, 163, 184, 0.14);
}

.auth-page .field-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-page .alert-error {
  font-size: var(--fs-small);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

html[data-theme="dark"] .auth-page .alert-error {
  color: #fecdd3;
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.35);
}

html[data-theme="light"] .auth-page .alert-error {
  color: #7f1d1d;
  background: rgba(254, 226, 226, 0.9);
  border: 1px solid rgba(220, 38, 38, 0.22);
}

.auth-page .btn-primary {
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
}

.auth-foot {
  margin: 22px 0 0;
  font-size: var(--fs-micro);
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
  font-weight: var(--fw-normal);
}

.auth-meta-bar {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.auth-meta-label {
  font-size: var(--fs-micro);
  color: var(--muted);
  font-weight: var(--fw-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-theme-seg {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border-strong);
  background: var(--metric-bg);
}

.auth-theme-opt {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.auth-theme-opt[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--text);
}

.hp-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 899px) {
  .auth-hero__tag {
    max-width: none;
  }
}
