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

:root {
  --navy-950: #04091a;
  --navy-900: #08102b;
  --navy-800: #0d1a3f;
  --navy-700: #122154;
  --navy-600: #1a2f6e;
  --gold-400: #c9a84c;
  --gold-300: #dfc070;
  --gold-200: #edd99a;
  --gold-100: #f8f0d6;
  --slate-300: #a8b4d0;
  --slate-400: #7d8db0;
  --slate-500: #566080;
  --white: #ffffff;
  --error: #f07070;
  --success: #5ec49a;
  /* Gradients */
  --g-blue: linear-gradient(135deg, #1e6fff 0%, #4da3ff 100%);
  --g-dark: linear-gradient(145deg, #08102b 0%, #1a2460 100%);
}

html,
body {
  height: 100%;
}

body {
  font-family: "DM Sans", sans-serif;
  background-color: var(--navy-900);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

.nav__logo {
  font-family: var(--f-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: -0.3px;
}

.nav__logo span {
  background: var(--g-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__logo sub {
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  /* Override the gradient on the main logo */
  -webkit-text-fill-color: rgba(255, 255, 255, 0.3);
  vertical-align: middle;
  margin-left: 4px;
}

/* ── Background decoration ── */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
}

.bg-circle-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(
    circle,
    rgba(26, 47, 110, 0.55) 0%,
    transparent 70%
  );
  top: -200px;
  left: -200px;
}

.bg-circle-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(201, 168, 76, 0.12) 0%,
    transparent 70%
  );
  bottom: -100px;
  right: 30%;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ── Layout ── */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
}

/* ── Left panel ── */
.panel-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 64px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy-600), var(--navy-700));
  border: 1px solid rgba(201, 168, 76, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo svg {
  width: 22px;
  height: 22px;
}

.brand-name {
  font-family: "Playfair Display", serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--white);
  line-height: 1.1;
}

.brand-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--gold-400);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.eyebrow-line {
  width: 32px;
  height: 1px;
  background: var(--gold-400);
}

.eyebrow-text {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 400;
  line-height: 1.12;
  color: var(--white);
  margin-bottom: 24px;
  max-width: 520px;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-300);
}

.hero-desc {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--slate-300);
  max-width: 440px;
  margin-bottom: 52px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition:
    border-color 0.25s,
    background 0.25s;
}

.feature:hover {
  border-color: rgba(201, 168, 76, 0.2);
  background: rgba(201, 168, 76, 0.04);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold-300);
}

.feature h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--white);
}

.feature p {
  font-size: 12px;
  font-weight: 300;
  color: var(--slate-400);
  line-height: 1.5;
}

.panel-left-footer {
  font-size: 12px;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--slate-500);
}

/* ── Right panel (login card) ── */
.panel-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 52px;
  background: rgba(4, 9, 26, 0.5);
  backdrop-filter: blur(24px);
}

.login-header {
  margin-bottom: 40px;
}

.login-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.2);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 20px;
}

.login-tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-400);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.login-title {
  font-family: "Playfair Display", serif;
  font-size: 36px;
  font-weight: 400;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 10px;
}

.login-subtitle {
  font-size: 14px;
  font-weight: 300;
  color: var(--slate-400);
  line-height: 1.6;
}

/* ── Form ── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-300);
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
}

.input-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--slate-500);
  pointer-events: none;
  transition: stroke 0.2s;
}

.form-input {
  width: 100%;
  height: 50px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0 16px 0 44px;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--white);
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--slate-500);
}

.form-input:focus {
  border-color: rgba(201, 168, 76, 0.45);
  background: rgba(201, 168, 76, 0.04);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.08);
}

.form-input:focus + svg,
.input-wrap:focus-within svg {
  stroke: var(--gold-400);
}

.form-input.input-error {
  border-color: rgba(240, 112, 112, 0.5);
  box-shadow: 0 0 0 3px rgba(240, 112, 112, 0.08);
}

/* Password toggle */
.pw-toggle {
  width: 40px;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  color: var(--slate-500);
  transition: color 0.2s;
}

.pw-toggle:hover {
  color: var(--slate-300);
}
.pw-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  pointer-events: none;
}

.pw-input-wrap input {
  padding-right: 42px;
}

/* ── Error / info messages ── */
.msg-box {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.msg-box.show {
  display: flex;
}

.msg-error {
  background: rgba(240, 112, 112, 0.08);
  border: 1px solid rgba(240, 112, 112, 0.22);
  color: var(--error);
}

.msg-locked {
  background: rgba(186, 119, 23, 0.08);
  border: 1px solid rgba(186, 119, 23, 0.22);
  color: #e8a94a;
}

.msg-box svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  margin-top: 1px;
}

/* ── Attempts tracker ── */
.attempts-hint {
  font-size: 11px;
  color: var(--slate-500);
  margin-top: -12px;
  margin-bottom: 18px;
  text-align: right;
  transition: color 0.2s;
}

.attempts-hint.warn {
  color: #e8a94a;
}

/* ── Submit button ── */
.btn-submit {
  width: 100%;
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(135deg, #b8922e 0%, #d4a83a 50%, #c9a84c 100%);
  border: none;
  color: var(--navy-950);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    opacity 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.2);
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}

.btn-submit:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(201, 168, 76, 0.28);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-submit .btn-arrow {
  transition: transform 0.2s;
}

.btn-submit:hover:not(:disabled) .btn-arrow {
  transform: translateX(3px);
}

/* Spinner */
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(4, 9, 26, 0.25);
  border-top-color: var(--navy-950);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-submit.loading .spinner {
  display: block;
}
.btn-submit.loading .btn-text {
  display: none;
}
.btn-submit.loading .btn-arrow {
  display: none;
}

/* ── Footer ── */
.form-footer {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--slate-500);
}

.security-badge svg {
  width: 13px;
  height: 13px;
  stroke: var(--slate-500);
}

.form-footer a {
  font-size: 12px;
  color: var(--gold-400);
  text-decoration: none;
  transition: color 0.2s;
}

.form-footer a:hover {
  color: var(--gold-200);
  text-decoration: underline;
}

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

.divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.divider-text {
  font-size: 11px;
  color: var(--slate-500);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Lockout countdown ── */
#lockout-timer {
  font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .panel-left {
    padding: 36px 28px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .hero {
    display: none;
  }

  .hero h1 {
    font-size: 32px;
  }
  .hero-desc {
    display: none;
  }
  .features {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .feature {
    padding: 14px;
  }
  .hero {
    padding: 30px 0;
  }
  .panel-left-footer {
    display: none;
  }

  .panel-right {
    padding: 40px 28px 52px;
    justify-content: flex-start;
    padding-bottom: 0px !important;
  }
}

@media (max-width: 480px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Page load animation ── */
.panel-left {
  animation: slide-in-left 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.panel-right {
  animation: slide-in-right 0.55s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
