/* Login — split screen: student photo (left) + classroom photo (right) */

:root {
  --login-green: #22c55e;
  --login-green-hover: #16a34a;
  --login-panel-bg: #2d3238;
  --login-panel-card: rgba(28, 32, 38, 0.82);
  --login-input-bg: rgba(255, 255, 255, 0.95);
  --login-text-muted: #64748b;
  --login-navy: #16294a;
  /* School-age students in class (K–12 style). Local: url("/images/login-student.jpg") */
  --login-photo-student: url("https://images.unsplash.com/photo-1503676260728-1c00da094a0b?auto=format&fit=crop&w=1800&q=85");
  /* School classroom (rows of desks). Replace with url("/images/login-classroom.jpg") if you add a file under wwwroot/images */
  --login-photo-classroom: url("https://cdn.pixabay.com/photo/2017/02/24/09/05/classroom-2093743_1280.jpg");
}

.login-page-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fff;
}

.login-split {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

/* Left — form over student photo */
.login-form-column {
  position: relative;
  flex: 1 1 100%;
  max-width: 100%;
  min-height: 52vh;
  padding: 2.5rem 1.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--login-navy) var(--login-photo-student) center / cover no-repeat;
}

/* Light veil only — keeps photo dominant; form card carries readability */
.login-form-column::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0.12) 42%,
    rgba(248, 250, 252, 0.22) 100%
  );
  pointer-events: none;
}

@media (min-width: 992px) {
  .login-form-column {
    flex: 0 0 42%;
    max-width: 42%;
    min-height: 100vh;
    padding: 3rem 2.25rem;
    border-right: 1px solid rgba(226, 232, 240, 0.5);
  }
}

.login-form-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 1.75rem 1.5rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px) saturate(1.05);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

@media (min-width: 992px) {
  .login-form-inner {
    padding: 2rem 1.85rem;
  }
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.login-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(165deg, #1e3a5a 0%, #16294a 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 6px 20px rgba(22, 41, 74, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.login-brand-mark svg {
  width: 32px;
  height: 32px;
  display: block;
}

.login-brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--login-navy);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.login-brand-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.login-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 1.5rem;
  text-align: center;
}

.login-input-group {
  margin-bottom: 1rem;
}

.login-field {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  background: var(--login-input-bg);
  font-size: 0.95rem;
}

.login-field:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: none;
  background: #fff;
}

.btn-login-primary {
  width: 100%;
  padding: 0.7rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  background: var(--login-green);
  color: #fff;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  margin-top: 0.5rem;
}

.btn-login-primary:hover {
  background: var(--login-green-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}

.login-error {
  font-size: 0.875rem;
  color: #dc2626;
  text-align: center;
  margin-bottom: 0.75rem;
}

.login-success {
  font-size: 0.875rem;
  color: #16a34a;
  text-align: center;
  margin-bottom: 0.75rem;
}

.login-links {
  margin-top: 0.85rem;
  text-align: center;
}

.login-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
}

.login-link:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

/* Right — news over classroom photo */
.login-news-column {
  position: relative;
  flex: 1 1 100%;
  min-height: 48vh;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--login-navy) var(--login-photo-classroom) center / cover no-repeat;
}

.login-news-column::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    165deg,
    rgba(15, 23, 42, 0.38) 0%,
    rgba(15, 23, 42, 0.32) 40%,
    rgba(15, 23, 42, 0.48) 100%
  );
  pointer-events: none;
}

@media (min-width: 992px) {
  .login-news-column {
    flex: 1 1 58%;
    max-width: 58%;
    padding: 2.5rem;
    min-height: 100vh;
  }
}

.login-news-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-news-title {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  width: 100%;
  text-shadow:
    0 1px 2px rgba(15, 23, 42, 0.65),
    0 2px 20px rgba(15, 23, 42, 0.45);
}

.login-news-card {
  width: 100%;
  max-width: 520px;
  background: var(--login-panel-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  max-height: min(70vh, 520px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--login-green) rgba(255, 255, 255, 0.08);
}

.login-news-card::-webkit-scrollbar {
  width: 6px;
}

.login-news-card::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.login-news-card::-webkit-scrollbar-thumb {
  background: var(--login-green);
  border-radius: 999px;
}

.login-news-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.login-news-item:last-child {
  border-bottom: none;
}

.login-news-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 0.45rem;
  line-height: 1.35;
}

.login-news-item p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0 0 0.5rem;
  line-height: 1.45;
}

.login-news-item a {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--login-green);
  text-decoration: none;
}

.login-news-item a:hover {
  text-decoration: underline;
  color: #4ade80;
}
