/* ==============================================
   AUTH — Sophisticated Editorial Overhaul
   ============================================== */

body.iw-page-auth {
  background: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(30, 27, 75, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(249, 115, 22, 0.05) 0px, transparent 50%);
  min-height: 100vh;
}

/* ── Full-screen container that centers the card without breaking header/footer ── */
.iw-auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  min-height: calc(100vh - 200px); /* rough estimate to center between header/footer */
}

.iw-auth-wrap {
  width: 100%;
  max-width: 480px;
}

.iw-auth-card {
  background: #fff;
  padding: 50px 45px;
  border-radius: 24px;
  box-shadow: 
    0 10px 15px -3px rgba(0,0,0,0.04),
    0 25px 50px -12px rgba(0,0,0,0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  overflow: hidden;
}

.iw-auth-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--iw-navy), var(--iw-orange));
}

.iw-auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  text-decoration: none;
  color: var(--iw-navy);
}

.iw-auth-title {
  font-size: 30px;
  font-weight: 800;
  text-align: center;
  color: var(--iw-text);
  margin-bottom: 12px;
  letter-spacing: -0.8px;
}

.iw-auth-subtitle {
  font-size: 15px;
  color: var(--iw-gray-400);
  text-align: center;
  margin-bottom: 40px;
}

/* ── Form Redesign ── */
.iw-auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.iw-auth-field label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--iw-gray-500);
  margin-bottom: 8px;
  display: block;
}

.iw-auth-input {
  width: 100%;
  padding: 14px 18px;
  background: #fff;
  border: 1.5px solid var(--iw-gray-100);
  border-radius: 12px;
  font-size: 15px;
  color: var(--iw-text);
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

.iw-auth-input:focus {
  border-color: var(--iw-navy);
  box-shadow: 0 0 0 4px rgba(30, 27, 75, 0.04);
  outline: none;
}

.iw-auth-btn {
  width: 100%;
  padding: 16px;
  background: var(--iw-navy);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(30, 27, 75, 0.15);
}

.iw-auth-btn:hover {
  background: #263d6a;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(30, 27, 75, 0.2);
}

.iw-auth-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-top: -8px;
}

.iw-auth-link {
  color: var(--iw-navy);
  font-weight: 700;
  text-decoration: none;
  position: relative;
}

.iw-auth-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: currentColor;
  transition: width 0.25s;
}

.iw-auth-link:hover::after { width: 100%; }

.iw-auth-footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--iw-gray-100);
  text-align: center;
  font-size: 15px;
  color: var(--iw-gray-500);
}

/* ── Alerts ── */
.iw-auth-alert {
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 30px;
  font-weight: 500;
  border: 1px solid transparent;
}

.iw-auth-alert--error { background: #fef2f2; color: #dc2626; border-color: #fee2e2; }
.iw-auth-alert--success { background: #f0fdf4; color: #16a34a; border-color: #dcfce7; }

/* Responsive adjustments */
@media (max-width: 500px) {
  .iw-auth-card { padding: 40px 25px; border-radius: 0; border: none; min-height: 100vh; }
  .iw-auth-container { padding: 0; }
  .iw-auth-wrap { max-width: 100%; }
}
