@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Manrope:wght@300;400;500;600;700&display=swap');

/* ─────────────────────────────────────────
   DESIGN TOKENS (Same as Internal Dashboard)
───────────────────────────────────────── */
:root {
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body:    'Manrope', system-ui, sans-serif;

  --clr-bg:           #f7f8fc;
  --clr-surface:      #ffffff;
  --clr-border:       #e4e7f0;
  --clr-border-focus: #4361ee;
  --clr-accent:       #4361ee;
  --clr-accent-dark:  #2c44c4;
  --clr-accent-light: #eef1fd;
  --clr-text-1:       #111827;
  --clr-text-2:       #4b5563;
  --clr-text-3:       #030405;
  --clr-success:      #10b981;
  --clr-success-bg:   #ecfdf5;
  --clr-success-border: #a7f3d0;
  --clr-error:        #dc2626;
  --clr-error-bg:     #fef2f2;
  --clr-error-border: #fecaca;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(67,97,238,0.08), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 40px rgba(67,97,238,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 64px rgba(67,97,238,0.14), 0 8px 24px rgba(0,0,0,0.07);
}

/* ─────────────────────────────────────────
   KEYFRAMES
───────────────────────────────────────── */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.975); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

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

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

@keyframes subtlePulse {
  0%, 100% { box-shadow: var(--shadow-lg); }
  50%       { box-shadow: var(--shadow-xl); }
}

@keyframes shimmerLine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

@keyframes floatBlob1 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(40px, -30px); }
}

@keyframes floatBlob2 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(-30px, 40px); }
}

@keyframes dotPop {
  0%   { opacity: 0; transform: scale(0.4); }
  60%  { opacity: 1; transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────
   PAGE CONTAINER
───────────────────────────────────────── */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--clr-bg);
  background-image:
    radial-gradient(ellipse 60% 50% at 15% 20%, rgba(67,97,238,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 85% 80%, rgba(99,115,255,0.06) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234361ee' fill-opacity='0.025'%3E%3Ccircle cx='30' cy='30' r='1.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  font-family: var(--font-body);
  position: relative;
  overflow: hidden;
}

.page::before {
  content: '';
  position: absolute;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(67,97,238,0.09) 0%, transparent 65%);
  top: -200px;
  left: -200px;
  border-radius: 50%;
  pointer-events: none;
  animation: floatBlob1 20s ease-in-out infinite;
}

.page::after {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(99,115,255,0.08) 0%, transparent 65%);
  bottom: -160px;
  right: -160px;
  border-radius: 50%;
  pointer-events: none;
  animation: floatBlob2 26s ease-in-out infinite;
}

/* ─────────────────────────────────────────
   CARD
───────────────────────────────────────── */
.card {
  width: 100%;
  max-width: 520px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: 36px 56px 40px;
  box-shadow: var(--shadow-lg);
  animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both,
             subtlePulse 8s ease-in-out 1s infinite;
  position: relative;
  z-index: 1;
  transition: box-shadow 0.3s ease, transform 0.25s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* Top accent bar */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-accent), #818cf8, var(--clr-accent));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Shimmer sweep on accent bar */
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40%;
  height: 3px;
  background: rgba(255,255,255,0.65);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  animation: shimmerLine 3.5s ease-in-out infinite;
}

/* ─────────────────────────────────────────
   HEADER
───────────────────────────────────────── */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.logoWrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  animation: fadeSlideUp 0.5s ease both;
}

.logoImg {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(67,97,238,0.15));
}

.logoFallback {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--clr-accent) 0%, #818cf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 6px 20px rgba(67,97,238,0.35);
  animation: dotPop 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.15s both;
  letter-spacing: -0.5px;
}

.heading {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--clr-text-1);
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: -0.8px;
  line-height: 1.15;
  animation: fadeSlideUp 0.5s ease 0.1s both;
  background: linear-gradient(135deg, #111827 30%, var(--clr-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subheading {
  font-size: 1rem;
  color: var(--clr-text-3);
  text-align: center;
  margin-bottom: 0;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.1px;
  animation: fadeSlideUp 0.5s ease 0.18s both;
  padding-bottom: 18px;
  position: relative;
}

.subheading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--clr-accent), transparent);
  border-radius: 2px;
}

/* ─────────────────────────────────────────
   FORM
───────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.fieldWrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: fadeSlideUp 0.45s ease both;
}

.fieldWrap:nth-child(1) { animation-delay: 0.22s; }
.fieldWrap:nth-child(2) { animation-delay: 0.30s; }
.fieldWrap:nth-child(3) { animation-delay: 0.38s; }

.label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--clr-text-2);
  letter-spacing: 0.7px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inputWrap {
  position: relative;
  display: flex;
  align-items: center;
}

.inputIcon {
  position: absolute;
  left: 14px;
  color: var(--clr-text-3);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s ease;
  font-size: 1.1rem;
}

.inputWrap:focus-within .inputIcon {
  color: var(--clr-accent);
}

.input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: #fafafa;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text-1);
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 400;
  outline: none;
  transition: border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.input::placeholder {
  color: var(--clr-text-3);
  font-weight: 300;
}

.input:focus {
  border-color: var(--clr-border-focus);
  background: var(--clr-accent-light);
  box-shadow: 0 0 0 4px rgba(67,97,238,0.1);
}

.input:disabled {
  background: #f5f5f5;
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─────────────────────────────────────────
   OTP INPUT (5 digits)
───────────────────────────────────────── */
.otpInput {
  font-size: 1.3rem;
  letter-spacing: 12px;
  text-align: center;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

/* ─────────────────────────────────────────
   TIMER
───────────────────────────────────────── */
.timerContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: fadeSlideUp 0.45s ease 0.35s both;
  margin: 12px 0;
}

.timerLabel {
  font-size: 0.85rem;
  color: var(--clr-text-2);
  font-weight: 500;
}

.timer {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--clr-accent);
  background: var(--clr-accent-light);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  min-width: 50px;
  text-align: center;
}

/* ─────────────────────────────────────────
   MESSAGES
───────────────────────────────────────── */
.success {
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: #047857;
  background: var(--clr-success-bg);
  border: 1px solid var(--clr-success-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  text-align: center;
  font-weight: 500;
  animation: slideDown 0.3s ease both;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.error {
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--clr-error);
  background: var(--clr-error-bg);
  border: 1px solid var(--clr-error-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  text-align: center;
  font-weight: 500;
  animation: slideDown 0.3s ease both;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
  margin-top: 8px;
  padding: 14px;
  background: var(--clr-accent);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.97rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  letter-spacing: 0.6px;
  transition: background 0.22s ease, transform 0.18s ease, box-shadow 0.22s ease;
  box-shadow: 0 4px 14px rgba(67,97,238,0.38);
  position: relative;
  overflow: hidden;
  animation: fadeSlideUp 0.45s ease 0.44s both;
  text-transform: uppercase;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
  transform: skewX(-18deg);
  transition: left 0.55s ease;
}

.btn:hover:not(:disabled)::before {
  left: 150%;
}

.btn:hover:not(:disabled) {
  background: var(--clr-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(67,97,238,0.42);
}

.btn:active:not(:disabled) {
  transform: translateY(0px);
  box-shadow: 0 3px 10px rgba(67,97,238,0.3);
}

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

.btnSecondary {
  background: transparent;
  border: 1.5px solid var(--clr-border);
  color: var(--clr-text-1);
  box-shadow: none;
  margin-top: 6px;
}

.btnSecondary:hover:not(:disabled) {
  background: var(--clr-accent-light);
  border-color: var(--clr-accent);
  color: var(--clr-accent);
}

.btnLink {
  background: none;
  border: none;
  color: var(--clr-accent);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  margin-top: 6px;
  text-decoration: none;
  transition: color 0.18s ease;
}

.btnLink:hover {
  color: var(--clr-accent-dark);
  text-decoration: underline;
}

/* ─────────────────────────────────────────
   BUTTON INNER + SPINNER
───────────────────────────────────────── */
.btnInner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 640px) {
  .card {
    max-width: 90%;
    padding: 28px 24px 32px;
    margin: 20px;
  }

  .heading {
    font-size: 2rem;
  }

  .subheading {
    font-size: 0.95rem;
  }

  .logoImg {
    height: 50px;
  }
}

