/* =====================================================
   Padakhep — Overdue Tracker 2.0 Login Page
   Brand: purple gradient + sunset accent
   ===================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
/* min-height + auto overflow: on short/landscape phones the card must scroll, never clip the Sign-in button */
html { height: 100%; font-family: 'Sora', sans-serif; }
body { min-height: 100%; overflow-x: hidden; overflow-y: auto; font-family: 'Sora', sans-serif; }

body {
  background:
    radial-gradient(ellipse at 30% 20%, #2a1b4a 0%, #140828 45%, #07030f 100%);
  color: #fff;
  display: grid;
  position: relative;
  padding: 24px 0;
}

/* Subtle grid overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  z-index: 0;
}

/* 3D scene canvas */
#scene { position: fixed; inset: 0; z-index: 1; }

/* ----- Overdue Tracker product badge (top-right) ----- */
.product-badge {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10;
  padding: 8px 16px 8px 14px;
  border-radius: 100px;
  background: linear-gradient(135deg, #A78BFA, #7C3AED 50%, #5B21B6);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(124,58,237,0.4),
              inset 0 1px 0 rgba(255,255,255,0.25);
}
.product-badge .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(180deg, #FFD23F, #FF3D7F);
  box-shadow: 0 0 0 0 rgba(255,210,63,0.6);
  animation: pulse 2s ease-in-out infinite;
}
.product-badge .ver { color: #FFD23F; font-weight: 800; margin-left: 4px; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,210,63,0.6); }
  50%      { box-shadow: 0 0 0 10px rgba(255,210,63,0); }
}

/* ----- Login card ----- */
.card {
  position: relative;
  z-index: 5;
  margin: auto; /* grid + auto margins = centered like before, but scrollable (never clipped) when taller than the screen */
  width: min(460px, 92vw);
  padding: 44px 44px 40px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(28,18,52,0.78), rgba(12,6,24,0.92));
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    0 40px 100px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.15);
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(167,139,250,0.5), transparent 40%, transparent 60%, rgba(255,61,127,0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ----- Logo lockup ----- */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.logo svg { display: block; }
.logo .wordmark { display: flex; flex-direction: column; }
.logo .name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, #C4A7FF, #7C3AED);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.logo .accent {
  width: 32px; height: 2px; border-radius: 1px;
  margin: 6px 0 4px;
  background: linear-gradient(90deg, #FFD23F, #FF3D7F);
}
.logo .tag {
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  font-weight: 500;
}

/* ----- Headings ----- */
h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
h1 span {
  background: linear-gradient(90deg, #C4A7FF, #FFD23F, #FF3D7F);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ----- Alerts ----- */
.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 14px;
}
.alert-error {
  background: rgba(255, 61, 127, 0.1);
  border: 1px solid rgba(255, 61, 127, 0.4);
  color: #ffb3c8;
}
.alert-success {
  background: rgba(120, 200, 120, 0.1);
  border: 1px solid rgba(120, 200, 120, 0.4);
  color: #bcf0bc;
}
.alert-info {
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: #d3c0ff;
}

/* ----- Form fields ----- */
.field {
  position: relative;
  margin-bottom: 14px;
}
.field input {
  width: 100%;
  padding: 15px 18px 15px 50px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 16px; /* ≥16px: stops iOS auto-zoom on focus */
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
}
.field input::placeholder { color: rgba(255,255,255,0.35); }
.field input:focus {
  border-color: rgba(167,139,250,0.6);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 4px rgba(167,139,250,0.12);
}
.field.has-error input {
  border-color: rgba(255,61,127,0.6);
  box-shadow: 0 0 0 4px rgba(255,61,127,0.12);
}
.field .ico {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(167,139,250,0.2), rgba(255,61,127,0.2));
  display: grid;
  place-items: center;
}
.field-error {
  color: #ffb3c8;
  font-size: 12px;
  margin: -8px 4px 14px;
}

/* ----- Sign-in button ----- */
.btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 50%, #5B21B6 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 16px 40px rgba(124,58,237,0.45),
              inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(124,58,237,0.6);
}
.btn:hover::before { transform: translateX(100%); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ----- Secure access notice ----- */
.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(167,139,250,0.06);
  border: 1px solid rgba(167,139,250,0.18);
  color: rgba(196,167,255,0.85);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.secure-note svg { flex-shrink: 0; color: #C4A7FF; }

/* ----- Copyright ----- */
.copyright {
  position: fixed;
  bottom: 20px;
  left: 0; right: 0;
  z-index: 4;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
}
