* { margin: 0; padding: 0; box-sizing: border-box; }

:root{
  --navy: #082A66;
  --navy-deep: #001e38;
  --gold: #c9a227;
  --gold-soft: #e6c968;
  --text: #1a1a1a;
  --muted: #667c95;
  --line: #e8ecf1;
  --danger: #dc2626;
  --success: #059669;
}

/* ============ PAGE (standalone) ============ */
body {
  font-family: 'Inter', sans-serif;
  background: #f5f7fa;
  color: var(--text);
}
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(201,162,39,0.06), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(8,42,102,0.06), transparent 40%),
    #f5f7fa;
}
.auth-page__card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(8,42,102,0.10);
}
.auth-brand {
  display: block;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--navy);
  text-decoration: none;
  margin-bottom: 22px;
}
.auth-brand span { color: var(--gold); }
.auth-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--navy);
  text-align: center;
  margin-bottom: 6px;
}
.auth-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 26px;
}

/* ============ FORM ============ */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d0d7e3;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: .2s;
  background: #fff;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(8,42,102,0.08);
}
.auth-field small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

.auth-message {
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
}
.auth-message.is-error   { display:block; background:#fee2e2; color: var(--danger);  border:1px solid #fecaca; }
.auth-message.is-success { display:block; background:#d1fae5; color: var(--success); border:1px solid #a7f3d0; }

.auth-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: .25s;
  font-family: inherit;
}
.auth-btn--primary {
  background: linear-gradient(135deg, var(--navy), #0a2a44);
  color: #fff;
  box-shadow: 0 6px 18px rgba(8,42,102,0.20);
}
.auth-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(8,42,102,0.28);
}
.auth-btn--primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.auth-switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 18px;
}
.auth-switch a { color: var(--navy); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { color: var(--gold); }

/* ============ MODAL ============ */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,30,56,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.auth-modal-overlay.is-open { display: flex; }

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px 28px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,30,56,0.35);
  animation: modalIn .35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 92vh;
  overflow-y: auto;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.auth-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f0f2f6;
  color: var(--navy);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: .25s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-modal__close:hover {
  background: var(--navy);
  color: #fff;
  transform: rotate(90deg);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 520px) {
  .auth-page__card { padding: 28px 22px; border-radius: 16px; }
  .auth-modal      { padding: 30px 22px 22px; border-radius: 16px; }
  .auth-title      { font-size: 22px; }
  .auth-brand      { font-size: 20px; }
}