@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=Instrument+Serif:ital@0;1&display=swap');

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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color, #f0f4f8);
  color: var(--text-color, #0f172a);
  font-family: 'DM Sans', sans-serif;
  padding: 1.5rem;
  overflow: hidden;
  position: relative;
}

/* Subtle grid pattern overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0 0 0 / 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0 0 0 / 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Radial glow behind card */
body::after {
  content: '';
  position: fixed;
  width: 700px;
  height: 700px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-color, #2563eb) 0%, transparent 70%);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

/* ── Card ── */
.card {
  position: relative;
  z-index: 1;
  max-width: 440px;
  width: 100%;
  padding: 3rem 2.5rem 2.5rem;
  text-align: center;
  background: var(--card-color, #ffffff);
  border: 1px solid rgba(0 0 0 / 0.06);
  border-radius: 1.25rem;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.04),
    0 24px 48px -12px rgba(0, 0, 0, 0.08);
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* ── Status indicator ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.12);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-color, #2563eb);
  margin-bottom: 2rem;
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-color, #2563eb);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-color, #2563eb); }
  50% { opacity: 0.5; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
}

/* ── Logo ── */
.logo {
  width: 200px;
  height: auto;
  object-fit: contain;
  margin-bottom: 1.75rem;
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

/* ── Typography ── */
h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-color, #0f172a);
  margin-bottom: 0.75rem;
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.subtitle {
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(15, 23, 42, 0.55);
  line-height: 1.5;
  margin-bottom: 0.25rem;
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* ── Progress bar ── */
.progress-track {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 100px;
  overflow: hidden;
  margin: 1rem 0 0.75rem;
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
}

.progress-fill {
  width: 87%;
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent-color, #2563eb), #60a5fa);
  animation: progress-grow 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

@keyframes progress-grow {
  from { width: 0; }
  to { width: 87%; }
}

.message {
  font-size: 0.825rem;
  font-weight: 300;
  color: rgba(15, 23, 42, 0.4);
  line-height: 1.5;
  margin-bottom: 2rem;
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

/* ── Error ── */
.error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(220, 38, 38, 0.06);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.12);
  border-radius: 0.625rem;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}

/* ── Form ── */
form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(15, 23, 42, 0.2);
  pointer-events: none;
  transition: color 0.3s;
}

input[type="password"] {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.625rem;
  background: var(--bg-color, #f0f4f8);
  color: var(--text-color, #0f172a);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

input[type="password"]:focus {
  border-color: var(--accent-color, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: #fff;
}

input[type="password"]:focus ~ .input-icon {
  color: var(--accent-color, #2563eb);
}

input[type="password"]::placeholder {
  color: rgba(15, 23, 42, 0.3);
  font-weight: 300;
}

button[type="submit"] {
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 0.625rem;
  background: var(--accent-color, #2563eb);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  position: relative;
  overflow: hidden;
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(37, 99, 235, 0.4);
  filter: brightness(1.08);
}

button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
  margin-bottom: 0.25rem;
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0 0 0 / 0.06);
}

/* ── Links ── */
.links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.link {
  color: rgba(15, 23, 42, 0.4);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.25s;
  position: relative;
}

.link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-color, #2563eb);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.link:hover {
  color: var(--accent-color, #2563eb);
}

.link:hover::after {
  width: 100%;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .card {
    padding: 2.25rem 1.5rem 2rem;
    border-radius: 1rem;
  }

  h1 {
    font-size: 1.85rem;
  }
}
