/*
This style sheet serves the following pages:
  login.ejs, register.ejs, forgot-password.ejs, reset-password.ejs

Anyt page related to authentication, please use this.
*/

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

/* ── Base ── */
body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: #020617;
  color: white;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ── Starfield ── */
.stars-1, .stars-2 {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 0;
}
.stars-1 {
  width: 1px; height: 1px; background: transparent;
  box-shadow:
    120px 340px #fff, 450px 89px #fff, 780px 520px #fff,
    1200px 150px #fff, 90px 670px #fff, 1500px 400px #fff,
    330px 210px #fff, 880px 760px #fff, 560px 430px #fff,
    970px 280px #fff, 1750px 700px #fff, 640px 150px #fff,
    1100px 480px #fff, 730px 630px #fff, 1050px 390px #fff,
    500px 560px #fff, 160px 120px #fff, 860px 870px #fff,
    420px 680px #fff, 940px 50px #fff, 1230px 740px #fff;
  animation: twinkle 8s infinite alternate, drift 60s linear infinite;
}
.stars-2 {
  width: 2px; height: 2px; background: transparent;
  box-shadow:
    200px 500px rgba(255,255,255,0.5), 750px 200px rgba(255,255,255,0.4),
    1300px 650px rgba(255,255,255,0.6), 50px 200px rgba(200,220,255,0.6),
    550px 600px rgba(200,220,255,0.7), 1400px 80px rgba(200,220,255,0.5);
  animation: twinkle2 10s infinite alternate-reverse, drift 45s linear infinite reverse;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(29,78,216,0.15), transparent 35%),
    radial-gradient(ellipse at 85% 30%, rgba(6,182,212,0.12), transparent 35%),
    radial-gradient(ellipse at 50% 80%, rgba(88,28,135,0.08), transparent 40%);
}
@keyframes twinkle  { 0%{opacity:.4} 50%{opacity:.9} 100%{opacity:.6} }
@keyframes twinkle2 { 0%{opacity:.3} 33%{opacity:.8} 100%{opacity:.9} }
@keyframes drift    { from{transform:translateY(0)} to{transform:translateY(-200px)} }

/* ── Two-panel layout ── */
.login-outer {
  display: flex; width: 100vw; height: 100vh;
  overflow: hidden; position: relative; z-index: 1;
}

/* ── Left panel ── */
.left-panel {
  width: 45%; min-width: 45%;
  height: 100%; flex-shrink: 0;
  position: relative; overflow: hidden;
  background-color: #020617;
  background-image:
    repeating-linear-gradient(
      -45deg,
      transparent, transparent 8px,
      rgba(255,255,255,0.015) 8px, rgba(255,255,255,0.015) 16px
    ),
    radial-gradient(ellipse at 15% 20%, rgba(37,99,235,0.4) 0%, transparent 60%);
}

/* Logo block — top left */
.left-logo {
  position: absolute; top: 1.5rem; left: 2rem;
  display: flex; flex-direction: column; gap: 0.4rem; z-index: 10;
}
.left-logo img {
  width: 200px; height: auto; object-fit: contain;
  filter: brightness(0) invert(1);
}
.left-logo .accent-bar {
  width: 3rem; height: 3px;
  background: #3b82f6;
  box-shadow: 0 0 12px rgba(59,130,246,0.7);
  margin-left: 2rem; margin-top: -2rem;
}
.left-logo .dept-label {
  font-size: 0.65rem; letter-spacing: 0.15em; font-weight: 700;
  text-transform: uppercase; color: rgba(148,163,184,0.8);
  margin-left: 2rem;
}

/* Title block — vertically centred */
.left-titles {
  position: absolute; top: 50%; left: 3rem;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 0.4rem; z-index: 10;
}
.left-titles .title-main {
  font-size: 3.5rem; font-weight: 900; line-height: 0.85;
  letter-spacing: -0.03em; color: white;
}
.left-titles .title-sub {
  font-size: 3.5rem; font-weight: 900; line-height: 0.85;
  letter-spacing: -0.03em; color: #64748b;
}
.left-titles .title-desc {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: rgba(148,163,184,0.6);
  max-width: 300px; line-height: 1.6; margin-top: 1.5rem;
}

/* Copyright footer */
.left-footer {
  position: absolute; bottom: 2rem; left: 3rem;
  font-size: 0.6rem; letter-spacing: 0.1em;
  color: rgba(100,116,139,0.4); z-index: 10;
}

/* ── Right panel ── */
.right-panel {
  flex: 1; height: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; padding: 2rem 1.5rem;
}

.form-box { width: 400px; }

.form-top-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.form-top-link:hover { color: #dbeafe; }

h1 {
  font-size: 3rem; font-weight: 900; color: white;
  letter-spacing: -0.03em; line-height: 1; margin-bottom: 0.3rem;
}

.accent-bar-form {
  width: 2.5rem; height: 2px; background: #3b82f6;
  box-shadow: 0 0 16px rgba(59,130,246,0.8);
  margin-bottom: 1.25rem;
}

.subtitle {
  font-size: 0.75rem; color: #94a3b8;
  letter-spacing: 0.04em; margin-bottom: 1.5rem; line-height: 1.6;
}

/* ── Form fields ── */
.field-group { margin-bottom: 1rem; }
.field-label {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.field-label .icon { color: #60a5fa; font-size: 14px; display: flex; }
.field-label span  { font-size: 0.75rem; font-weight: 600; color: white; }

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: white; font-family: inherit; font-size: 0.875rem;
  padding: 10px 14px; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
input::placeholder { color: rgba(148,163,184,0.6); }
input:focus {
  background: rgba(255,255,255,0.10);
  border-color: rgba(59,130,246,0.5);
}

/* Forgot password link row */
.field-actions {
  display: flex; justify-content: flex-end;
  margin-top: -0.4rem; margin-bottom: 1rem;
}
.inline-link {
  color: #93c5fd; font-size: 0.72rem; text-decoration: none;
}
.inline-link:hover { color: #dbeafe; text-decoration: underline; }

/* ── Messages ── */
.error-msg {
  font-size: 0.75rem; color: #f87171;
  min-height: 1rem; margin-bottom: 0.5rem;
}
.error-msg.server,
.error-msg:not(:empty) {
  padding: 8px 12px; border-radius: 8px;
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2);
  margin-bottom: 0.75rem;
}
.status-msg {
  font-size: 0.75rem; padding: 8px 12px; border-radius: 8px;
  margin-bottom: 0.75rem;
  background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2);
  color: #6ee7b7;
}

/* ── Buttons ── */
.btn-primary {
  width: 100%; padding: 0.875rem;
  border-radius: 9999px;
  font-family: inherit; font-size: 0.875rem; font-weight: 700;
  color: #60a5fa; cursor: pointer;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  transition: all 0.3s; margin-bottom: 1rem;
}
.btn-primary:hover {
  background: rgba(59,130,246,0.4);
  border-color: #60a5fa;
  box-shadow: 0 0 30px -5px rgba(59,130,246,0.5);
}

/* Outlook / OAuth button */
.btn-outlook {
  width: 100%; padding: 10px; border-radius: 12px;
  font-family: inherit; font-size: 0.875rem; font-weight: 600;
  color: white; cursor: pointer;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s; text-decoration: none; margin-bottom: 1rem;
}
.btn-outlook:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.25);
}
.btn-outlook svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Auth tabs (login page) ── */
.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9999px; padding: 3px; gap: 2px;
  margin-bottom: 1.5rem;
}
.tab-btn {
  flex: 1; padding: 6px 14px; border-radius: 9999px;
  font-family: inherit; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; border: none;
  background: transparent; color: rgba(148,163,184,0.7);
  transition: all 0.2s ease;
}
.tab-btn.active {
  background: rgba(59,130,246,0.25); color: #93c5fd;
  box-shadow: 0 0 12px rgba(59,130,246,0.2);
}
.auth-panel         { display: none; }
.auth-panel.active  { display: block; }

/* OR divider */
.divider {
  display: flex; align-items: center; gap: 12px; margin-bottom: 1rem;
}
.divider::before,
.divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.1);
}
.divider span { color: rgba(148,163,184,0.5); font-size: 0.72rem; }

/* ── Navigation links ── */
.links-row {
  display: flex; justify-content: center; align-items: center;
  gap: 4px; margin-bottom: 1.25rem;
  color: rgba(255,255,255,0.6); font-size: 0.75rem; flex-wrap: wrap;
}
.back-link {
  color: #3b82f6; text-decoration: underline;
  cursor: pointer; font-size: 0.75rem;
}
.back-link:hover { color: #60a5fa; }

/* ── Clock ── */
.clock-row {
  display: flex; align-items: center; gap: 8px;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(71,85,105,0.6);
  opacity: 0.6;
}
.clock-text {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: #94a3b8;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .left-panel { display: none; }
  .login-outer { flex-direction: column; overflow: auto; }
  .right-panel { width: 100%; min-height: 100vh; }
  .form-box { width: 100%; max-width: 360px; }
}
