@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=DM+Sans:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #024A72;
  --navy-deep: #012d47;
  --gold: #FCC61D;
  --gold-light: #fdd54f;
  --white: #ffffff;
  --off-white: #F7F8FA;
  --gray-light: #eef0f4;
  --gray-mid: #b0b8c4;
  --gray-text: #5a6474;
  --shadow-navy: 0 8px 32px rgba(2, 74, 114, 0.28);
  --shadow-soft: 0 4px 24px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 10px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #6b8fe0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ── BLOB SHAPES — matching reference image exactly ── */

/* Top-right large dark curved blob */
.blob-tr {
  position: fixed;
  top: -160px;
  right: -120px;
  width: 520px;
  height: 500px;
  background: #5577cc;
  border-radius: 0% 0% 55% 45% / 0% 0% 70% 30%;
  pointer-events: none;
  z-index: 0;
  animation: blobShift1 14s ease-in-out infinite;
}

/* Bottom-left large dark curved blob */
.blob-bl {
  position: fixed;
  bottom: -140px;
  left: -100px;
  width: 500px;
  height: 460px;
  background: #5577cc;
  border-radius: 55% 45% 0% 100% / 45% 55% 100% 0%;
  pointer-events: none;
  z-index: 0;
  animation: blobShift2 16s ease-in-out infinite;
}

/* Bottom-right medium blob */
.blob-br {
  position: fixed;
  bottom: -80px;
  right: -60px;
  width: 360px;
  height: 340px;
  background: #5070c0;
  border-radius: 60% 40% 30% 70% / 40% 60% 70% 30%;
  pointer-events: none;
  z-index: 0;
  animation: blobShift3 18s ease-in-out infinite;
}

/* Top-left lighter accent blob */
.blob-tl {
  position: fixed;
  top: -80px;
  left: -80px;
  width: 300px;
  height: 280px;
  background: #7da0e8;
  border-radius: 100% 0% 60% 40% / 100% 0% 50% 50%;
  pointer-events: none;
  z-index: 0;
  animation: blobShift4 12s ease-in-out infinite;
}

/* Center-right subtle mid blob */
.blob-mid {
  position: fixed;
  top: 35%;
  right: -100px;
  width: 280px;
  height: 320px;
  background: #5a7ed6;
  border-radius: 40% 60% 55% 45% / 50% 50% 45% 55%;
  pointer-events: none;
  z-index: 0;
  animation: blobShift1 20s ease-in-out infinite;
  animation-delay: -6s;
}

/* Bottom center lighter blob */
.blob-bc {
  position: fixed;
  bottom: -60px;
  left: 30%;
  width: 320px;
  height: 240px;
  background: #7898e0;
  border-radius: 50% 50% 0% 0% / 60% 60% 0% 0%;
  pointer-events: none;
  z-index: 0;
  animation: blobShift2 22s ease-in-out infinite;
  animation-delay: -8s;
}

@keyframes blobShift1 {
  0%,100% { border-radius: 0% 0% 55% 45% / 0% 0% 70% 30%; transform: translate(0,0); }
  33%      { border-radius: 0% 0% 48% 52% / 0% 0% 62% 38%; transform: translate(-10px, 14px); }
  66%      { border-radius: 0% 0% 60% 40% / 0% 0% 75% 25%; transform: translate(8px, -8px); }
}
@keyframes blobShift2 {
  0%,100% { border-radius: 55% 45% 0% 100% / 45% 55% 100% 0%; transform: translate(0,0); }
  40%      { border-radius: 50% 50% 0% 100% / 40% 60% 100% 0%; transform: translate(12px,-10px); }
  70%      { border-radius: 60% 40% 0% 100% / 50% 50% 100% 0%; transform: translate(-8px, 8px); }
}
@keyframes blobShift3 {
  0%,100% { border-radius: 60% 40% 30% 70% / 40% 60% 70% 30%; transform: translate(0,0) scale(1); }
  50%      { border-radius: 52% 48% 38% 62% / 48% 52% 62% 38%; transform: translate(-12px,-12px) scale(1.03); }
}
@keyframes blobShift4 {
  0%,100% { border-radius: 100% 0% 60% 40% / 100% 0% 50% 50%; transform: translate(0,0); }
  50%      { border-radius: 100% 0% 50% 50% / 100% 0% 42% 58%; transform: translate(10px, 10px); }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
body::after { content: none; }

.container {
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 24px 72px rgba(2, 74, 114, 0.16), 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  width: 940px;
  min-height: 540px;
  display: flex;
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

/* LEFT PANEL */
.left-panel {
  flex: 1.1;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 60%, #036fa8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 48px 36px;
  position: relative;
  overflow: hidden;
}

/* Geometric decorations on left panel */
.left-panel::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border: 40px solid rgba(252, 198, 29, 0.10);
  border-radius: 50%;
  pointer-events: none;
}

.left-panel::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 160px;
  height: 160px;
  border: 30px solid rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}

.logo {
  width: 196px;
  height: 196px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22), 0 0 0 6px rgba(252,198,29,0.22);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 1;
}

.logo:hover {
  transform: scale(1.04);
  box-shadow: 0 18px 50px rgba(0,0,0,0.28), 0 0 0 8px rgba(252,198,29,0.30);
}

.logo img {
  width: 178px;
  height: 178px;
  object-fit: contain;
}

.logo-fallback {
  color: var(--navy);
  font-weight: 800;
  font-size: 22px;
  font-family: 'Playfair Display', serif;
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: 6px;
  margin-bottom: 4px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.brand-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 10px;
  text-align: center;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.brand-tagline {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.52);
  text-transform: uppercase;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* RIGHT PANEL */
.right-panel {
  flex: 1;
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
}

.admin-label {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 3px;
}

.admin-sublabel {
  font-size: 13px;
  color: var(--gray-text);
  margin-bottom: 36px;
  font-weight: 400;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-text);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.25s ease;
  background: var(--off-white);
  color: #1a2332;
}

.form-group input::placeholder {
  color: var(--gray-mid);
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--navy);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(2, 74, 114, 0.10);
}

.password-group {
  position: relative;
}

.password-group input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-mid);
  cursor: pointer;
  font-size: 17px;
  padding: 4px;
  transition: color 0.2s;
  line-height: 1;
}

.password-toggle:hover {
  color: var(--navy);
}

.login-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--navy) 0%, #036fa8 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.28s ease;
  margin-bottom: 18px;
  box-shadow: var(--shadow-navy);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.login-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(2, 74, 114, 0.34);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-navy);
}

.forgot-password {
  text-align: center;
}

.forgot-password a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: color 0.2s ease;
  opacity: 0.75;
}

.forgot-password a:hover {
  color: var(--navy);
  opacity: 1;
  text-decoration: underline;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 18px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-light);
}

.divider span {
  font-size: 11px;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* MODALS */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(1, 28, 50, 0.55);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  padding: 36px;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(2,74,114,0.22);
  width: 90%;
  max-width: 420px;
  text-align: center;
  animation: modalSlide 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.modal-content p {
  color: var(--gray-text);
  margin-bottom: 20px;
  font-size: 14px;
}

.modal-content .form-group {
  text-align: left;
}

.password-display {
  background: var(--off-white);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin: 18px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  word-break: break-all;
  border: 2px solid var(--navy);
  letter-spacing: 2px;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

.modal-buttons button {
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}

.btn-copy {
  background: var(--navy);
  color: white;
  box-shadow: 0 4px 12px rgba(2,74,114,0.22);
}

.btn-copy:hover {
  background: var(--navy-deep);
  transform: translateY(-1px);
}

.btn-close {
  background: var(--gray-light);
  color: var(--gray-text);
}

.btn-close:hover {
  background: #e0e3e8;
}

.copy-message {
  color: #16a34a;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  display: none;
}

/* ── Responsive ── */

/* Tablet portrait */
@media (max-width: 960px) {
  .container {
    width: 96%;
    min-height: auto;
  }

  .left-panel {
    padding: 40px 28px;
  }

  .brand-title {
    font-size: 2.6rem;
    letter-spacing: 4px;
  }

  .brand-subtitle {
    font-size: 1.6rem;
    letter-spacing: 7px;
  }

  .right-panel {
    padding: 44px 36px;
  }
}

/* Mobile — stack panels vertically */
@media (max-width: 768px) {
  body {
    align-items: flex-start;
    overflow-y: auto;
    padding: 20px 0;
  }

  .container {
    flex-direction: column;
    width: 92%;
    margin: 0 auto;
    min-height: auto;
    border-radius: 20px;
  }

  .left-panel {
    padding: 36px 24px 32px;
    border-radius: 20px 20px 0 0;
  }

  .logo {
    width: 130px;
    height: 130px;
  }

  .logo img {
    width: 116px;
    height: 116px;
  }

  .brand-title {
    font-size: 2.2rem;
    letter-spacing: 3px;
  }

  .brand-subtitle {
    font-size: 1.4rem;
    letter-spacing: 6px;
  }

  .brand-tagline {
    font-size: 11px;
    letter-spacing: 1px;
  }

  .right-panel {
    padding: 32px 24px 40px;
    border-radius: 0 0 20px 20px;
  }

  .admin-label {
    font-size: 1.7rem;
    letter-spacing: 2px;
  }

  .admin-sublabel {
    font-size: 12px;
    margin-bottom: 28px;
  }

  .form-group input {
    padding: 13px 16px;
    font-size: 16px; /* prevent iOS zoom on focus */
  }

  .login-btn {
    padding: 14px;
    font-size: 15px;
  }
}

/* Small phones (≤400px) */
@media (max-width: 400px) {
  .container {
    width: 96%;
    border-radius: 16px;
  }

  .left-panel {
    padding: 28px 18px 24px;
  }

  .logo {
    width: 110px;
    height: 110px;
  }

  .logo img {
    width: 96px;
    height: 96px;
  }

  .brand-title {
    font-size: 1.9rem;
    letter-spacing: 2px;
  }

  .brand-subtitle {
    font-size: 1.2rem;
    letter-spacing: 4px;
  }

  .right-panel {
    padding: 28px 18px 36px;
  }

  .admin-label {
    font-size: 1.5rem;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-group input {
    padding: 12px 14px;
  }
}
