/* templates/pages/login + verify — Mail Admin v2 modern auth screen.
   Faz 5 polish 2026-04-30. Split layout, brand-left + form-right, responsive. */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--color-bg, #f8fafc);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 240px 1fr;
  }
}

/* ============ LEFT: brand panel ============ */

.auth-brand {
  position: relative;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #2563eb 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
  overflow: hidden;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(37,99,235,0.35) 0%, transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(99,102,241,0.25) 0%, transparent 50%);
  pointer-events: none;
}

.auth-brand-top,
.auth-brand-mid,
.auth-brand-bot {
  position: relative;
  z-index: 1;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.3px;
}
.auth-brand-logo svg {
  width: 48px;
  height: 48px;
  /* New logo SVG sets its own fill/stroke; clear inherited stroke styling */
  stroke: none;
  fill: initial;
}

.auth-brand-mid h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}
.auth-brand-mid p {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.78);
  max-width: 420px;
  margin: 0;
}
.auth-brand-features {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 12px;
}
.auth-brand-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}
.auth-brand-features li svg {
  width: 18px;
  height: 18px;
  stroke: #93c5fd;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.auth-brand-bot {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
}

@media (max-width: 900px) {
  .auth-brand { padding: 28px; }
  .auth-brand-mid h1 { font-size: 24px; }
  .auth-brand-mid p,
  .auth-brand-features { display: none; }
  .auth-brand-bot { display: none; }
}

/* ============ RIGHT: form panel ============ */

.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: #ffffff;
}

[data-theme="dark"] .auth-form-wrap {
  background: #0b1120;
  color: #e2e8f0;
}

.auth-form-card {
  width: 100%;
  max-width: 380px;
}

.auth-form-card h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-primary, #0f172a);
}

.auth-form-card .auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary, #64748b);
  margin: 0 0 28px;
  line-height: 1.5;
}

.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
[data-theme="dark"] .auth-error {
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.40);
  color: #fca5a5;
}
.auth-error svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #334155);
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.auth-field input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
[data-theme="dark"] .auth-field input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
[data-theme="dark"] .auth-field input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6,182,212,0.20);
}

/* OTP input — large monospace centered */
.auth-field input.auth-otp {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 28px;
  letter-spacing: 8px;
  padding: 14px;
}

.auth-submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.05s, box-shadow 0.15s, opacity 0.15s;
  font-family: inherit;
}
.auth-submit:hover {
  box-shadow: 0 4px 12px rgba(37,99,235,0.30);
}
.auth-submit:active {
  transform: translateY(1px);
}
.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color, #e2e8f0);
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  text-align: center;
}
[data-theme="dark"] .auth-footer { border-top-color: #334155; }
.auth-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
