/* =============================================================
   AUTH PAGES (login.php / register.php)
   ============================================================= */

.auth-section { padding: var(--sp-8) 0 var(--sp-9); }

.auth-wrap {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: var(--sp-8);
  align-items: center;
}

/* ---------- Left media / pitch panel ---------- */
.auth-media {
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, #1c1812 0%, #2b1c10 55%, #44230f 100%);
  padding: var(--sp-7);
  color: #fff7f0;
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
}
.auth-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 10%, rgba(255,138,61,0.25), transparent 55%),
    radial-gradient(circle at 5% 95%, rgba(255,138,61,0.16), transparent 55%);
}
.auth-media-inner { position: relative; z-index: 1; }
.auth-media-inner .icon-plate { margin-bottom: var(--sp-5); }
.auth-media-inner h2 { color: #fff7f0; font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
.auth-media-inner p { color: rgba(255,247,240,0.78); max-width: 380px; margin-bottom: var(--sp-6); }

.auth-points { display: flex; flex-direction: column; gap: var(--sp-3); }
.auth-points li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: var(--w-medium);
  color: #fff7f0;
}
.auth-points li svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 50%;
  background: rgba(255,138,61,0.22);
  color: #ffb27a;
}

/* ---------- Right form card ---------- */
.auth-card-wrap { display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 440px; padding: var(--sp-7) var(--sp-6); }
.auth-card-head { margin-bottom: var(--sp-6); }
.auth-card-head h1 { font-size: var(--fs-xl); margin: var(--sp-2) 0 var(--sp-2); }
.auth-card-head p { font-size: var(--fs-sm); }

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: var(--w-medium);
  margin-bottom: var(--sp-5);
}
.auth-alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.auth-alert.error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.auth-alert.success { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }

.auth-form { display: flex; flex-direction: column; gap: var(--sp-4); }

.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field > span { font-size: var(--fs-xs); font-weight: var(--w-semibold); color: var(--text-secondary); }
.field > span em { font-style: normal; color: var(--text-tertiary); font-weight: var(--w-regular); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"] {
  height: 50px;
  padding: 0 var(--sp-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  transition: border-color var(--dur-fast) var(--ease);
}
.field input:focus { outline: none; border-color: var(--accent); }

.field-pass { position: relative; }
.field-pass input { width: 100%; padding-right: 46px; }
.pass-toggle {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-tertiary);
  border-radius: var(--radius-sm);
}
.pass-toggle:hover { color: var(--text-primary); }
.pass-toggle svg { width: 18px; height: 18px; }
.pass-toggle .icon-eye-off { display: none; }
.pass-toggle.is-visible .icon-eye { display: none; }
.pass-toggle.is-visible .icon-eye-off { display: block; }

.strength-meter { height: 4px; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; margin-top: 2px; }
.strength-meter span { display: block; height: 100%; width: 0%; border-radius: var(--radius-pill); background: var(--danger); transition: width var(--dur-base) var(--ease), background-color var(--dur-base) var(--ease); }

.field-hint { font-size: var(--fs-xs); color: var(--text-tertiary); min-height: 16px; }
.field-hint.match { color: var(--success); }
.field-hint.no-match { color: var(--danger); }

.field-row { display: flex; align-items: center; justify-content: space-between; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--text-secondary); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }
.terms-checkbox { align-items: flex-start; }
.terms-checkbox input { margin-top: 2px; }
.terms-checkbox a { color: var(--accent-strong); font-weight: var(--w-medium); }

.auth-link-sm { font-size: var(--fs-xs); color: var(--accent-strong); font-weight: var(--w-medium); }

.auth-switch { margin-top: var(--sp-5); text-align: center; font-size: var(--fs-sm); color: var(--text-secondary); }
.auth-switch a { color: var(--accent-strong); font-weight: var(--w-semibold); }

@media (max-width: 980px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-media { display: none; }
  .auth-card-wrap { justify-content: stretch; }
  .auth-card { max-width: none; }
}

/* ── Phone field with country prefix ─────────────────────── */
.field-phone {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease);
}
.field-phone:focus-within { border-color: var(--accent); }
.phone-prefix {
  flex-shrink: 0;
  padding: 0 var(--sp-3);
  height: 50px;
  display: flex;
  align-items: center;
  font-size: var(--fs-sm);
  font-weight: var(--w-semibold);
  color: var(--text-secondary);
  background: var(--surface-3, var(--surface-2));
  border-right: 1px solid var(--border);
  min-width: 52px;
  justify-content: center;
  user-select: none;
}
.field-phone input[type="tel"] {
  flex: 1;
  height: 50px;
  padding: 0 var(--sp-4);
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--fs-sm);
}
.field-phone input[type="tel"]:focus { outline: none; }

/* ── Select field ─────────────────────────────────────────── */
.field select {
  height: 50px;
  padding: 0 var(--sp-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-3) center;
  padding-right: var(--sp-8);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease);
}
.field select:focus { outline: none; border-color: var(--accent); }