﻿/* ================================================================
   LOGIN.CSS — Login Screen Styles
   ================================================================ */

.login-page {
  min-height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 40px 20px;
}

/* Animated gradient background */
.login-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(59,130,246,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(99,102,241,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(6,182,212,0.08) 0%, transparent 70%),
    linear-gradient(180deg, #050810 0%, #070b16 50%, #080d18 100%);
  z-index: 0;
}

/* Floating orbs */
.login-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
  z-index: 0;
}
.login-orb-1 { width: 400px; height: 400px; background: rgba(59,130,246,0.12); top: -10%; left: -5%; animation-delay: 0s; }
.login-orb-2 { width: 300px; height: 300px; background: rgba(99,102,241,0.10); bottom: 5%; right: -5%; animation-delay: -2s; }
.login-orb-3 { width: 200px; height: 200px; background: rgba(6,182,212,0.08); top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: -4s; }

/* Grid lines overlay */
.login-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

.login-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
}

/* Header / Logo */
.login-header {
  text-align: center;
  margin-bottom: 48px;
  animation: slideDown 0.6s ease both;
}
.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.login-logo-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 24px rgba(59,130,246,0.4);
}
.login-logo-text {
  text-align: left;
}
.login-logo-text .app-name {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #f1f5f9, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.login-logo-text .app-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.login-tagline {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Cards grid */
.login-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
  animation: slideUp 0.7s 0.1s ease both;
}

@media (max-width: 720px) {
  .login-cards { grid-template-columns: 1fr; }
}

/* Individual login card */
.login-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  padding: 36px;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent, rgba(255,255,255,0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.login-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.login-card.citizen-card:hover { box-shadow: 0 20px 60px rgba(34,197,94,0.08), 0 8px 30px rgba(0,0,0,0.4); }
.login-card.authority-card:hover { box-shadow: 0 20px 60px rgba(59,130,246,0.12), 0 8px 30px rgba(0,0,0,0.4); }

/* Card icon */
.card-icon-wrap {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 20px;
}
.citizen-card .card-icon-wrap  { background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(34,197,94,0.05)); border: 1px solid rgba(34,197,94,0.25); }
.authority-card .card-icon-wrap { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(59,130,246,0.05)); border: 1px solid rgba(59,130,246,0.25); }

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Form fields */
.form-group {
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.input-with-icon {
  position: relative;
}
.input-with-icon .input-field {
  padding-left: 40px;
}
.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

/* Login button variants */
.btn-citizen   { background: linear-gradient(135deg, #16a34a, #22c55e); color: white; box-shadow: 0 4px 15px rgba(34,197,94,0.3); width: 100%; padding: 13px; font-size: 15px; margin-top: 20px; border-radius: var(--radius-md); }
.btn-citizen:hover   { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(34,197,94,0.4); }
.btn-authority { background: linear-gradient(135deg, #1d4ed8, #3b82f6); color: white; box-shadow: 0 4px 15px rgba(59,130,246,0.35); width: 100%; padding: 13px; font-size: 15px; margin-top: 20px; border-radius: var(--radius-md); }
.btn-authority:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59,130,246,0.45); }

/* Card features list */
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.feature-tag {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
}

/* Status strip */
.login-status-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  animation: slideUp 0.7s 0.2s ease both;
}
.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.status-item .count {
  font-weight: 700;
  color: var(--text-primary);
}
.status-sep { width: 1px; height: 20px; background: var(--glass-border); }

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-muted);
  animation: fadeIn 1s 0.4s ease both;
}

/* Loading spinner for login button */
.btn-loading { position: relative; pointer-events: none; }
.btn-loading::after {
  content: '';
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
