/* ─── StatCounter Login – Professional Dark Theme ────────────────────────── */

/* Design tokens */
:root {
  --clr-bg-from:     #060c18;
  --clr-bg-to:       #0a1224;
  --clr-card:        #0e1930;
  --clr-card-border: rgba(45,212,191,0.18);
  --clr-input-bg:    #111e36;
  --clr-input-bdr:   rgba(255,255,255,0.10);
  --clr-accent-1:    #2dd4bf;
  --clr-accent-2:    #60a5fa;
  --clr-text:        #e4eaf4;
  --clr-muted:       #7b8ea8;
  --clr-danger:      #f87171;
  --radius-card:     18px;
  --radius-input:    10px;
  --transition:      0.22s cubic-bezier(.4,0,.2,1);
}

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

/* ─── Page Shell ──────────────────────────────────────────────────────────── */
html, body { height: 100%; }

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: radial-gradient(ellipse 70% 60% at 20% 0%,  rgba(45,212,191,.13) 0%, transparent 70%),
              radial-gradient(ellipse 60% 52% at 80% 100%, rgba(96,165,250,.11) 0%, transparent 70%),
              linear-gradient(180deg, var(--clr-bg-from) 0%, var(--clr-bg-to) 100%);
  background-attachment: fixed;
  color: var(--clr-text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Animated background orbs */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: orb-pulse 8s ease-in-out infinite alternate;
}
body::before {
  width: 480px; height: 480px;
  top: -120px; left: -80px;
  background: rgba(45,212,191,.08);
}
body::after {
  width: 520px; height: 520px;
  bottom: -140px; right: -100px;
  background: rgba(96,165,250,.07);
  animation-delay: -4s;
}

@keyframes orb-pulse {
  from { transform: scale(1)   translate(0, 0); }
  to   { transform: scale(1.1) translate(16px, -12px); }
}

/* ─── Card wrapper ────────────────────────────────────────────────────────── */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  padding: 20px;
  animation: card-in .5s cubic-bezier(.2,.8,.4,1) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.login-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-card-border);
  border-radius: var(--radius-card);
  padding: 38px 36px 32px;
  box-shadow:
    0 0 0 1px rgba(45,212,191,.06),
    0 0 40px rgba(45,212,191,.07),
    0 8px 24px rgba(0,0,0,.7),
    0 32px 64px rgba(0,0,0,.5);
}

/* ─── Header ──────────────────────────────────────────────────────────────── */
.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
  gap: 10px;
}

.login-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--clr-accent-1), var(--clr-accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #031118;
  box-shadow: 0 4px 20px rgba(45,212,191,.30);
}

.login-header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.4px;
  color: var(--clr-text);
}

.login-header p {
  font-size: 13.5px;
  color: var(--clr-muted);
  line-height: 1.4;
}

/* ─── Form fields ─────────────────────────────────────────────────────────── */
.form-floating {
  position: relative;
  margin-bottom: 16px;
}

/* Label floats above always (static top-label style) */
.form-floating label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: 7px;
  transition: color var(--transition);
}

.form-floating:focus-within label {
  color: var(--clr-accent-1);
}

.form-floating input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-input);
  border: 1.5px solid var(--clr-input-bdr);
  background: var(--clr-input-bg);
  color: var(--clr-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-floating input::placeholder { color: var(--clr-muted); opacity: .5; }

.form-floating input:focus {
  border-color: var(--clr-accent-1);
  background: rgba(45,212,191,.04);
  box-shadow: 0 0 0 3px rgba(45,212,191,.12);
}

/* Password field row */
.position-relative { position: relative; }

.password-toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border: none;
  background: transparent;
  color: var(--clr-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.password-toggle:hover {
  color: var(--clr-accent-1);
  background: rgba(45,212,191,.08);
}

/* ─── Remember me ─────────────────────────────────────────────────────────── */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.form-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid var(--clr-input-bdr);
  background: var(--clr-input-bg);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--transition), background var(--transition);
}
.form-check input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--clr-accent-1), var(--clr-accent-2));
  border-color: transparent;
}
.form-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1.5px;
  width: 5px; height: 9px;
  border: 2px solid #031118;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}
.form-check label {
  font-size: 13px;
  color: var(--clr-muted);
  cursor: pointer;
  user-select: none;
}

/* ─── Submit button ───────────────────────────────────────────────────────── */
.btn-login {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-input);
  border: none;
  background: linear-gradient(135deg, var(--clr-accent-1), var(--clr-accent-2));
  color: #031118;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .3px;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 18px rgba(45,212,191,.22);
}
.btn-login:hover {
  opacity: .93;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(45,212,191,.34);
}
.btn-login:active {
  transform: translateY(0);
  opacity: 1;
}

/* Shimmer overlay on hover */
.btn-login::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform .5s ease;
}
.btn-login:hover::after { transform: translateX(100%); }

/* ─── Error alert ─────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-input);
  border-left: 3px solid var(--clr-danger);
  background: rgba(248,113,113,.06);
  color: #fecaca;
  font-size: 13.5px;
  margin-bottom: 18px;
  animation: alert-in .2s ease both;
}
@keyframes alert-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--clr-muted);
  opacity: .7;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .login-container { padding: 12px; }
  .login-card { padding: 26px 20px 22px; }
}
