/* ====================================================== */
/* ===================  AUTH PAGES  ===================== */
/* ====================================================== */

.auth-container {
  min-height: 100svh;
  width: 100%;
  padding: clamp(14px, 4vw, 70px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Two-column desktop wrapper */
.auth-desktop-row {
  width: 100%;
  max-width: 1300px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(22px, 4vw, 90px);
}

/* LEFT */
.auth-brand-left {
  flex: 1;
  min-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.auth-logo-left {
  width: clamp(160px, 16vw, 220px);
  margin-bottom: clamp(16px, 2vw, 24px);
}

.auth-title-left {
  font-size: clamp(3.2rem, 5vw, 5.2rem);
  font-weight: 900;
  color: #1A73E8;
  line-height: 1.0;
  margin-bottom: clamp(12px, 2vw, 18px);
}

.auth-subtitle-left {
  font-size: clamp(1.4rem, 2.4vw, 2.2rem);
  font-weight: 800;
  color: #1A73E8;
  line-height: 1.25;
  max-width: 30ch;
}

/* RIGHT */
.auth-card-wrap {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}

/* Card */
.auth-card {
  background: #1A73E8;
  border: 2px solid rgba(0,0,0,0.55);
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: clamp(18px, 2.2vw, 28px);
  width: min(520px, 92vw);
}

.auth-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-input {
  width: 100%;
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,0.45);
  padding: 14px 14px;
  font-size: 1.05rem;
  outline: none;
  background: #FFF;
}

.auth-input::placeholder {
  color: rgba(0,0,0,0.35);
  font-weight: 600;
}

.auth-btn {
  width: 100%;
  padding: 14px 0;
  font-size: 1.2rem;
  font-weight: 800;
  border: 2px solid rgba(0,0,0,0.55);
  cursor: pointer;
  border-radius: 0.75rem;
}

.auth-btn.green {
  background: #93D36C;
  color: #fff;
}
.auth-btn.green:hover { background: #7AC356; }

.auth-btn.darkblue {
  background: #1558B5;
  color: #fff;
}
.auth-btn.darkblue:hover { background: #0F4BB8; }

.auth-link-row {
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-link {
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  opacity: 0.95;
}
.auth-link:hover { opacity: 1; text-decoration: underline; }

.auth-divider {
  height: 2px;
  background: rgba(0,0,0,0.35);
  margin: 6px 0;
}

/* Inline notices */
.notice {
  display: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  font-size: 0.95rem;
  border: 2px solid rgba(0,0,0,0.45);
}
.notice.error {
  display: block;
  background: #ffe6e6;
  color: #a40000;
}
.notice.success {
  display: block;
  background: #e8fff0;
  color: #0b6b2a;
}

/* ====================================================== */
/* =======================  MODAL  ====================== */
/* ====================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.modal {
  width: 100%;
  max-width: 560px;
  background: #FBF6F0;
  border-radius: 22px;
  border: 2px solid rgba(0,0,0,0.55);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  padding: 18px;
}

.modal-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.modal-logo {
  width: 54px;
  height: 54px;
}

.modal h2 {
  margin: 0 0 6px 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: #1A73E8;
}

.modal p {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: rgba(0,0,0,0.75);
  line-height: 1.35;
}

.modal .row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.modal .close-btn {
  background: #1558B5;
  color: #fff;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,0.55);
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
}
.modal .close-btn:hover { background: #0F4BB8; }

.modal .secondary-btn {
  background: transparent;
  color: #1558B5;
  border-radius: 12px;
  border: 2px solid rgba(21,88,181,0.65);
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
}
.modal .secondary-btn:hover {
  background: rgba(21,88,181,0.08);
}

/* ====================================================== */
/* ===========  CRITICAL FIX: SWITCH EARLIER  =========== */
/* ====================================================== */
/* This prevents the right card from ever touching the left edge like your 952px screenshot */
@media (max-width: 1100px) {
  .auth-container {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .auth-desktop-row {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    margin-top: 10px;
  }

  .auth-brand-left {
    align-items: center;
    text-align: center;
    min-width: unset;
  }

  .auth-subtitle-left {
    max-width: 40ch;
  }

  .auth-card-wrap {
    justify-content: center;
    width: 100%;
  }

  /* Tablet: slimmer card */
  .auth-card {
    width: min(440px, 92vw);
  }
}

/* Phone: slightly tighter */
@media (max-width: 600px) {
  .auth-card {
    width: min(380px, 94vw);
    padding: 18px;
  }

  .auth-title-left {
    font-size: clamp(2.4rem, 10vw, 3.2rem);
  }

  .auth-subtitle-left {
    font-size: 1.05rem;
  }
}
