:root {
  --bg: #030712;
  --accent: #00b4d8;
  --accent-glow: rgba(56, 189, 248, 0.45);
  --card-bg: rgba(10, 19, 34, 0.68);
  --input-bg: rgba(6, 13, 24, 0.65);
  --text: #f8fafc;
  --text-muted: #94a3b8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 70% 50%, rgba(56, 189, 248, 0.14) 0%, rgba(2, 132, 199, 0.05) 45%, transparent 70%),
    radial-gradient(circle at 15% 85%, rgba(0, 180, 216, 0.06) 0%, transparent 40%);
  color: var(--text);
  padding: 24px 16px;
  position: relative;
  overflow-x: hidden;
}

.ambient-waves {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.12), transparent 70%);
}
.ambient-waves::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 600px;
  height: 450px;
  background: repeating-linear-gradient(45deg, transparent, transparent 18px, rgba(56, 189, 248, 0.04) 19px, rgba(56, 189, 248, 0.04) 20px);
  mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
  pointer-events: none;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Side glowing aura: Left side white glow, Right side light blue glow */
.login-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: -20px;
  width: 150px;
  height: 75%;
  background: radial-gradient(ellipse at left top, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.12) 45%, transparent 75%);
  filter: blur(22px);
  pointer-events: none;
  z-index: 0;
}

.login-wrapper::after {
  content: "";
  position: absolute;
  top: 5%;
  right: -24px;
  width: 170px;
  height: 90%;
  background: radial-gradient(ellipse at right center, rgba(56, 189, 248, 0.55) 0%, rgba(0, 180, 216, 0.25) 50%, transparent 78%);
  filter: blur(24px);
  pointer-events: none;
  z-index: 0;
}

/* Glassmorphism Card with 1 side White & 1 side Light Blue glowing rim */
.glass-card {
  position: relative;
  z-index: 1;
  width: 100%;
  background: linear-gradient(
    130deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(15, 28, 48, 0.72) 28%,
    rgba(9, 18, 34, 0.82) 68%,
    rgba(56, 189, 248, 0.18) 100%
  );
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-radius: 24px;
  padding: 38px 32px 32px;
  box-shadow: 
    -10px -6px 32px -4px rgba(255, 255, 255, 0.28),
    -3px 0 18px -2px rgba(255, 255, 255, 0.22),
    12px 4px 38px -2px rgba(56, 189, 248, 0.45),
    3px 0 20px 0px rgba(56, 189, 248, 0.35),
    0 30px 60px -12px rgba(0, 0, 0, 0.85),
    inset 16px 16px 36px -12px rgba(255, 255, 255, 0.22),
    inset -16px -10px 36px -12px rgba(56, 189, 248, 0.25);
  text-align: center;
}

/* Crisp glowing gradient border rim: White on Left/Top-Left, Light Blue on Right */
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1.6px;
  background: linear-gradient(
    115deg,
    #ffffff 0%,
    rgba(255, 255, 255, 0.75) 18%,
    rgba(255, 255, 255, 0.2) 42%,
    rgba(56, 189, 248, 0.45) 68%,
    #38bdf8 88%,
    #7dd3fc 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.brand-logo {
  display: inline-block;
  margin-bottom: 14px;
  text-decoration: none;
}
.brand-logo img {
  height: 82px;
  max-width: 240px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.98;
}

.card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 6px;
}

.card-title {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.card-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 26px;
}

form {
  text-align: left;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.input-wrap .field-icon {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 18px;
  color: #64748b;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 2;
}

.input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 46px;
  background: var(--input-bg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: all 0.2s ease;
}

.input-wrap input:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(8, 18, 32, 0.75);
}

.input-wrap input:focus {
  border-color: #38bdf8;
  background: rgba(8, 20, 36, 0.88);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2), 0 0 16px rgba(56, 189, 248, 0.25);
}

.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover, 
.input-wrap input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0px 1000px #081424 inset !important;
  box-shadow: 0 0 0px 1000px #081424 inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

.input-wrap input:focus ~ .field-icon {
  color: #38bdf8;
}

.pwd-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s;
  z-index: 2;
}
.pwd-toggle:hover {
  color: #cbd5e1;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -4px 0 22px;
  font-size: 13px;
}

.remember-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  user-select: none;
}

.remember-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #00b4d8;
  cursor: pointer;
  border-radius: 4px;
}

.forgot-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.forgot-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

.btn-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 24px -4px rgba(56, 189, 248, 0.45);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, #0369a1 100%);
  box-shadow: 0 12px 28px -4px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.alert-error {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 20px;
  text-align: left;
}

.card-footer {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.auth-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.2s;
}
.back-home:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

img { max-width: 100%; }
.brand, .brand-logo { display: inline-block; margin-bottom: 14px; text-decoration: none; }
.brand img, .brand-logo img { height: 82px; max-width: 240px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.98; }