/* Avenza auth — split login (Orivex craft, Avenza brand) */
:root {
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --field: #f8fafc;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-dark: #1e40af;
  --brand-soft: rgba(37, 99, 235, 0.08);
  --brand-ring: rgba(37, 99, 235, 0.18);
  --accent: #14b8a6;
  --page: #ffffff;
  --radius: 12px;
  --shadow-btn: 0 14px 32px rgba(37, 99, 235, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Manrope", Inter, system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", "Manrope", system-ui, sans-serif;
  --space-xs: clamp(4px, 0.6vh, 8px);
  --space-sm: clamp(8px, 1.1vh, 12px);
  --space-md: clamp(12px, 1.6vh, 18px);
  --space-lg: clamp(16px, 2.2vh, 28px);
  --input-h: clamp(44px, 5.2vh, 50px);
  --btn-h: clamp(46px, 5.4vh, 52px);
}

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  font-size: 20px;
  line-height: 1;
  user-select: none;
}

.login-page {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(340px, 42%) 1fr;
  min-height: 0;
}

.login-side {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2.5vh, 36px) clamp(20px, 3.5vw, 56px);
  background: var(--page);
  position: relative;
  z-index: 2;
  overflow-y: auto;
}

.login-content {
  width: min(400px, 100%);
  margin: auto 0;
  animation: rise-in 0.55s var(--ease) both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-lg);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark) 55%, var(--accent));
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-btn);
}

.brand-mark .material-symbols-rounded {
  color: #fff;
  font-size: 22px;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.brand-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand-text span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.login-content h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.4vh, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.login-content .lead {
  margin: 0 0 var(--space-lg);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 500;
}

.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: var(--space-md);
}

.role-chip {
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.role-chip .material-symbols-rounded {
  font-size: 18px;
}

.role-chip.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.field {
  margin-bottom: var(--space-md);
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field-wrap {
  position: relative;
}

.field-wrap .material-symbols-rounded {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}

.field input {
  width: 100%;
  height: var(--input-h);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  padding: 0 14px 0 42px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px var(--brand-ring);
}

.field-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted-2);
  font-weight: 500;
}

.btn-login {
  width: 100%;
  height: var(--btn-h);
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 14.5px;
  font-weight: 800;
  font-family: var(--font-display);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-login:hover {
  background: var(--brand-hover);
}

.btn-login:active {
  transform: scale(0.99);
}

.auth-footer {
  margin-top: var(--space-lg);
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-2);
  font-weight: 500;
}

.auth-footer a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

/* Visual panel */
.visual-side {
  position: relative;
  min-height: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(20, 184, 166, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 20% 80%, rgba(37, 99, 235, 0.35), transparent 50%),
    linear-gradient(155deg, #0f172a 0%, #1e3a5f 48%, #0f766e 100%);
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 5vh, 56px) clamp(28px, 4vw, 56px);
}

.visual-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
  pointer-events: none;
}

.visual-glass {
  position: relative;
  z-index: 1;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  animation: rise-in 0.7s var(--ease) 0.1s both;
}

.visual-glass .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.2);
  color: #99f6e4;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.visual-glass h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.visual-glass p {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.feature-list .material-symbols-rounded {
  color: #5eead4;
  font-size: 20px;
}

.visual-metrics {
  position: absolute;
  top: clamp(28px, 5vh, 48px);
  right: clamp(28px, 4vw, 48px);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: rise-in 0.7s var(--ease) 0.2s both;
}

.metric-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 140px;
}

.metric-pill strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.metric-pill span {
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.75;
}

@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .visual-side {
    display: none;
  }

  body {
    overflow: auto;
  }
}
