body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(14px, 2vw, 18px) clamp(14px, 3vw, 24px) clamp(20px, 3vw, 24px);
  background: var(--white);
}

/* Header section with the org name and tagline */
.signin-header {
  background: linear-gradient(135deg, rgba(10, 35, 66, 0.08), rgba(191, 23, 34, 0.06));
  width: min(100%, 1380px);
  min-height: clamp(150px, 17vw, 200px);
  border-radius: 10px;
  text-align: center;
  position: relative;
  z-index: 1;
  margin-bottom: clamp(18px, 2.5vw, 24px);
  padding: clamp(20px, 3vw, 30px) clamp(16px, 15vw, 220px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.signin-header .logos-left,
.signin-header .logos-right {
  display: flex;
  gap: clamp(8px, 1.4vw, 18px);
  align-items: center;
  z-index: 3;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.signin-header .logos-left {
  left: clamp(12px, 4vw, 60px);
}

.signin-header .logos-right {
  right: clamp(12px, 4vw, 60px);
}

.signin-header .logo-slot {
  width: clamp(52px, 7vw, 90px);
  height: clamp(52px, 7vw, 90px);
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 clamp(52px, 7vw, 90px);
  border: clamp(2px, 0.25vw, 3px) solid var(--navy);
  background: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(10, 35, 66, 0.14);
}

.signin-header .service-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
  padding: clamp(4px, 0.8vw, 8px);
  background: var(--white);
}

.org-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 54px);
  color: var(--navy);
  line-height: 1.05;
}

.org-tagline {
  font-size: clamp(14px, 1.8vw, 20px);
  color: var(--red);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: clamp(4px, 0.8vw, 8px);
}

.header-stars {
  display: block;
  color: var(--gold);
  font-size: clamp(14px, 2vw, 20px);
  letter-spacing: clamp(4px, 0.8vw, 10px);
  margin-top: clamp(8px, 1.2vw, 12px);
}

/* Three-column layout: image | sign-in card | image */
.signin-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 5vw, 88px);
  width: min(100%, 1240px);
  position: relative;
  z-index: 1;
}

/* Left and right placeholder images */
.side-img {
  flex: 1 1 clamp(150px, 18vw, 210px);
  max-width: clamp(140px, 20vw, 210px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 24px);
}

.side-img img {
  width: 100%;
  aspect-ratio: 4 / 3.6;
  height: auto;
  object-fit: cover;
  border-width: clamp(2px, 0.35vw, 4px);
  border-style: double;
  border-radius: 12px;
  box-shadow: 0 6px 10px rgba(10, 35, 66, 0.14);
  display: block;
}

/* The white card containing the sign-in form */
.signin-card {
  background: var(--white);
  border: 1.5px solid var(--lightgray);
  border-radius: 16px;
  padding: clamp(22px, 3vw, 32px) clamp(18px, 3.5vw, 36px);
  box-shadow: 0 8px 40px rgba(10, 35, 66, 0.10);
  width: min(100%, 430px);
  flex: 0 1 430px;
}

.signin-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3vw, 30px);
  color: var(--navy);
  text-align: center;
  margin-bottom: clamp(16px, 2vw, 18px);
}

/* Thin horizontal line divider */
.card-divider {
  height: 1px;
  background: var(--lightgray);
  margin: clamp(18px, 2vw, 22px) 0;
}

/* Links below the sign-in button */
.signin-links {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.5vw, 10px);
  text-align: center;
  margin-top: clamp(16px, 2vw, 18px);
}

.signin-links a {
  color: var(--navy);
  font-size: clamp(15px, 1.7vw, 16px);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.signin-links a:hover {
  color: var(--red);
}

.create-account-popup {
  max-width: 520px;
}

.popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.form-status {
  min-height: 24px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--midgray);
}

.form-status.pending {
  color: var(--navy);
}

.form-status.success {
  color: var(--green);
}

.form-status.error {
  color: var(--red);
}

/* Social media links at the bottom */
.social-section {
  position: relative;
  z-index: 1;
  text-align: center;
  width: min(100%, 1240px);
  margin-top: clamp(16px, 2.5vw, 20px);
}

.social-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--midgray);
  margin-bottom: clamp(12px, 1.8vw, 16px);
}

.social-icons {
  display: flex;
  gap: 12px 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: clamp(9px, 1.6vw, 10px) clamp(16px, 2.8vw, 22px);
  border: 1.5px solid var(--navy);
  border-radius: 50px;
  color: var(--navy);
  font-size: clamp(13px, 1.6vw, 14px);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.social-icons a:hover {
  background: var(--navy);
  color: var(--white);
}

body.dark-mode .signin-header {
  background: linear-gradient(135deg, rgba(24, 42, 66, 0.95), rgba(17, 30, 48, 0.96));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

body.dark-mode .signin-header .logo-slot {
  background: #132033;
  border-color: #88a9d6;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

body.dark-mode .signin-header .service-logo {
  background: #132033;
}

body.dark-mode .org-name,
body.dark-mode .signin-card h2,
body.dark-mode .signin-links a,
body.dark-mode .social-icons a {
  color: #e6edf8;
}

body.dark-mode .org-tagline {
  color: #ff8c95;
}

body.dark-mode .signin-card {
  background: #132033;
  border-color: #2a3a50;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
}

body.dark-mode .card-divider {
  background: #2a3a50;
}

body.dark-mode .signin-links a:hover {
  color: #88a9d6;
}

body.dark-mode .side-img img {
  border-color: #88a9d6;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

body.dark-mode .social-label {
  color: #b6c4d8;
}

body.dark-mode .social-icons a {
  background: #132033;
  border-color: #2a3a50;
}

body.dark-mode .social-icons a:hover {
  background: #88a9d6;
  border-color: #88a9d6;
  color: #0d1522;
}

body.dark-mode .form-status {
  color: #b6c4d8;
}

body.large-text .org-name {
  font-size: clamp(38px, 5.5vw, 72px);
}

body.large-text .org-tagline {
  font-size: clamp(20px, 2.3vw, 28px);
}

body.large-text .header-stars {
  font-size: clamp(18px, 2.6vw, 28px);
}

body.large-text .signin-card h2 {
  font-size: clamp(34px, 3.4vw, 40px);
}

body.large-text .signin-links a {
  font-size: 22px;
}

body.large-text .social-label {
  font-size: 16px;
}

body.large-text .social-icons a {
  font-size: 18px;
}

@media (max-width: 1120px) {
  .signin-header {
    padding-inline: clamp(16px, 12vw, 136px);
  }

  .signin-layout {
    gap: clamp(18px, 3vw, 36px);
  }
}

@media (max-width: 1360px) {
  .signin-header {
    padding-inline: clamp(16px, 13vw, 176px);
  }

  .signin-header .logos-left,
  .signin-header .logos-right {
    gap: clamp(6px, 1vw, 12px);
  }

  .signin-header .logos-left {
    left: clamp(10px, 2.4vw, 28px);
  }

  .signin-header .logos-right {
    right: clamp(10px, 2.4vw, 28px);
  }

  .signin-header .logo-slot {
    width: clamp(46px, 5.2vw, 74px);
    height: clamp(46px, 5.2vw, 74px);
    flex-basis: clamp(46px, 5.2vw, 74px);
  }

  .org-name {
    font-size: clamp(26px, 3.6vw, 46px);
  }

  .org-tagline {
    font-size: clamp(13px, 1.45vw, 18px);
  }

  .header-stars {
    font-size: clamp(13px, 1.55vw, 18px);
    letter-spacing: clamp(3px, 0.45vw, 8px);
  }
}

@media (max-width: 900px) {
  .side-img {
    display: none;
  }

  .signin-layout {
    width: min(100%, 430px);
  }

  .signin-card {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .signin-header {
    min-height: auto;
    padding: 20px 16px 18px;
    gap: 10px;
  }

  .signin-header .logos-left,
  .signin-header .logos-right {
    position: static;
    transform: none;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .signin-card {
    border-radius: 14px;
  }

  .popup-actions {
    flex-direction: column-reverse;
  }

  .popup-actions .btn {
    width: 100%;
  }

  .social-icons a {
    width: 100%;
    justify-content: center;
  }
}
