/* ================================================================
   SMS — Auth Pages (Login) Styles
================================================================ */

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

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

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Animated background */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,.25) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(59,130,246,.2) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 90%, rgba(16,185,129,.15) 0%, transparent 50%),
              #0f172a;
}

/* Floating blobs */
.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  animation: float 8s ease-in-out infinite;
}

.auth-blob-1 {
  width: 400px;
  height: 400px;
  background: #3b82f6;
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.auth-blob-2 {
  width: 300px;
  height: 300px;
  background: #8b5cf6;
  bottom: -80px;
  right: -80px;
  animation-delay: -3s;
}

.auth-blob-3 {
  width: 200px;
  height: 200px;
  background: #10b981;
  bottom: 100px;
  left: 30%;
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

/* Auth container */
.auth-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  padding: 20px;
}

/* Card */
.auth-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 44px 40px;
  box-shadow: 0 32px 64px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.05);
}

/* Logo */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 24px rgba(59,130,246,.4);
}

.auth-logo-text { line-height: 1.2; }

.auth-logo-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -.03em;
}

.auth-logo-tagline {
  font-size: .72rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Headings */
.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -.02em;
}

.auth-subtitle {
  font-size: .83rem;
  color: #64748b;
  margin-bottom: 28px;
}

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
  letter-spacing: .02em;
}

.auth-input-wrap { position: relative; }

.auth-input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #475569;
  font-size: .95rem;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  padding: 11px 13px 11px 40px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 10px;
  font-size: .87rem;
  font-family: inherit;
  color: #ffffff;
  transition: all .2s ease;
  outline: none;
}

.auth-input::placeholder { color: #475569; }

.auth-input:focus {
  border-color: #3b82f6;
  background: rgba(59,130,246,.08);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.auth-input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}

.auth-input-toggle {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #475569;
  cursor: pointer;
  font-size: .9rem;
  padding: 0;
  transition: color .2s;
}

.auth-input-toggle:hover { color: #94a3b8; }

/* Error text */
.auth-error {
  font-size: .76rem;
  color: #f87171;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Alert */
.auth-alert {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: .82rem;
  color: #fca5a5;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Row */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.auth-check input {
  width: 15px;
  height: 15px;
  accent-color: #3b82f6;
  cursor: pointer;
}

.auth-check-label { color: #94a3b8; cursor: pointer; }

.auth-forgot { color: #3b82f6; font-weight: 500; }
.auth-forgot:hover { color: #60a5fa; }

/* Submit Button */
.auth-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  letter-spacing: .01em;
  box-shadow: 0 4px 16px rgba(59,130,246,.3);
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(59,130,246,.45);
}

.auth-btn:active { transform: translateY(0); }

.auth-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: .8rem;
  color: #475569;
}

.auth-footer a { color: #3b82f6; font-weight: 500; }
.auth-footer a:hover { color: #60a5fa; }

/* Spinner inside button */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}

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

/* Decorative grid dots */
.auth-dots {
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  opacity: .04;
  background-image: radial-gradient(#fff 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card { padding: 32px 20px; border-radius: 16px; }
}

/* ================================================================
   Demo Credentials Quick-Fill Section
================================================================ */
.demo-logins-section {
  margin-top: 24px;
}

.demo-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 12px;
}

.demo-divider::before,
.demo-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.demo-divider span {
  padding: 0 10px;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 420px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
}

.demo-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #f8fafc;
  font-family: inherit;
  outline: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.demo-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3.5px;
  height: 100%;
  opacity: 0.9;
  transition: width 0.2s;
}

.demo-btn.admin::before { background: #f59e0b; }
.demo-btn.teacher::before { background: #38bdf8; }
.demo-btn.student::before { background: #34d399; }
.demo-btn.parent::before { background: #e879f9; }
.demo-btn.transport::before { background: #06b6d4; }

.demo-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.demo-btn:hover::before {
  width: 5px;
}

.demo-btn.active {
  background: rgba(99, 102, 241, 0.16);
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
}

.demo-btn-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.demo-role-badge {
  font-size: 0.73rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.demo-btn.admin .demo-role-badge { color: #f59e0b; }
.demo-btn.teacher .demo-role-badge { color: #38bdf8; }
.demo-btn.student .demo-role-badge { color: #34d399; }
.demo-btn.parent .demo-role-badge { color: #e879f9; }
.demo-btn.transport .demo-role-badge { color: #06b6d4; }

.demo-click-hint {
  font-size: 0.62rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 4px;
}

.demo-email {
  font-size: 0.73rem;
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-pwd {
  font-size: 0.66rem;
  color: #94a3b8;
  margin-top: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.fill-glow {
  animation: glowPulse 0.5s ease-out;
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.55); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

