/* ========= Theme & tokens ========= */
:root{
  --bg1: #0f172a;
  --bg2: #1e293b;
  --accent: #60a5fa;
  --accent-strong: #3b82f6;
  --text: #e5e7eb;
  --muted: #cbd5e1;
  --danger-bg: #ffe8ea;
  --danger-tx: #7f1d1d;

  --glass: rgba(255,255,255,0.14);
  --glass-border: rgba(255,255,255,0.25);
  --shadow: 0 10px 30px rgba(0,0,0,0.25);
  --radius-lg: 20px;
  --radius-md: 12px;
  --ring: rgba(96,165,250,0.35);
}

/* ========= Base ========= */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========= Background layer ========= */
.page{
  min-height:100dvh;
  position:relative;
  overflow:hidden;
}
.page__bg{
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(59,130,246,0.20), transparent 60%),
    radial-gradient(900px 600px at 90% 90%, rgba(236,72,153,0.18), transparent 60%),
    linear-gradient(140deg, var(--bg1), var(--bg2));
  /* Optional image overlay */
  background-image:
    url("../images/bg-login.jpg"),
    radial-gradient(1200px 600px at 10% 10%, rgba(59,130,246,0.20), transparent 60%),
    radial-gradient(900px 600px at 90% 90%, rgba(236,72,153,0.18), transparent 60%),
    linear-gradient(140deg, var(--bg1), var(--bg2));
  background-size: cover, auto, auto, auto;
  background-position: center;
  filter: saturate(1.05);
}

/* ========= Layout wrapper ========= */
.wrap{
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding: 32px 16px;
}

/* ========= Glass card ========= */
.auth-card{
  width:100%;
  max-width: 420px;
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

/* ========= Header ========= */
.auth-card__header{ text-align:center; margin-bottom: 18px; }
.auth-card__logo{ width: 64px; height:64px; object-fit:contain; margin-bottom: 8px; }
.auth-card__title{ margin:0 0 6px 0; font-size: 24px; font-weight: 800; letter-spacing: .2px; }
.auth-card__tagline{ margin:0; color:var(--muted); font-size: 14px; }

/* ========= Alert ========= */
.alert{
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size:14px;
  margin: 14px 0;
  border: 1px solid transparent;
}
.alert--danger{
  background: var(--danger-bg);
  color: var(--danger-tx);
  border-color: #f8b4b4;
}

/* ========= Form ========= */
.auth-form{ margin-top: 10px; }
.form-group{ margin-bottom: 14px; }

.form-label{
  display:block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

.form-input{
  width:100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.form-input::placeholder{ color: rgba(255,255,255,0.65); }
.form-input:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
  background: rgba(255,255,255,0.22);
}

/* ========= Button ========= */
.btn{
  display:inline-block;
  width:auto;
  border:0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-weight:700;
  font-size: 15px;
  cursor:pointer;
  transition: transform .04s ease, filter .15s ease, background-color .15s ease;
}
.btn--block{ width:100%; }
.btn--primary{
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color:#fff;
}
.btn--primary:hover{ filter: brightness(1.05); }
.btn:active{ transform: translateY(1px); }

/* ========= Footer ========= */
.auth-card__footer{ margin-top: 18px; text-align:center; color: rgba(255,255,255,0.7); font-size:12px; }

/* ========= Mobile responsiveness ========= */
@media (max-width: 480px){
  .auth-card{
    padding: 24px 20px;
    border-radius: 16px;
  }
  .auth-card__title{ font-size: 22px; }
  .auth-card__tagline{ font-size: 13px; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; }
}
