:root {
  --login-navy-950: #213c82;
  --login-navy-800: #294b94;
  --login-navy-700: #365ba7;
  --login-navy-600: #456bb4;
  --login-gold-500: #93bd4d;
  --login-gold-300: #cfe49b;
  --login-cream-50: #fbfcf7;
  --login-sky-50: #edf3f8;
  --login-ink-900: #172746;
  --login-ink-400: #66748b;
  --login-coral: #7cab3c;
  --login-display: "Baloo 2", system-ui, sans-serif;
  --login-body: "Nunito Sans", system-ui, sans-serif;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 15% 10%, #e0e8f8 0%, transparent 45%),
    radial-gradient(circle at 85% 90%, #cce8aa 0%, transparent 42%),
    var(--login-sky-50);
  color: var(--login-ink-900);
  font-family: var(--login-body);
}

.dn-login-card {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: 28px;
  background: var(--login-cream-50);
  box-shadow: 0 30px 70px -25px rgba(10, 20, 64, .35), 0 8px 24px -8px rgba(10, 20, 64, .18);
}

.dn-login-panel {
  position: relative;
  isolation: isolate;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 44px 40px 36px;
  background:
    radial-gradient(92% 68% at 103% 100%, rgba(169, 205, 83, .62) 0%, transparent 68%),
    radial-gradient(120% 90% at 20% -10%, #4e6fb4 0%, transparent 55%),
    linear-gradient(160deg, #213c82 0%, #294b94 55%, #3e64ad 100%);
}

.dn-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.dn-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: .8;
  animation: dn-twinkle 3.2s ease-in-out infinite;
}

.dn-shooting-star {
  position: absolute;
  top: 14%;
  left: -10%;
  width: 140px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--login-gold-300) 40%, #fff 100%);
  filter: drop-shadow(0 0 6px var(--login-gold-300));
  animation: dn-shoot 6s cubic-bezier(.3, .6, .3, 1) infinite 1.2s;
}

.dn-shooting-star::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px 4px var(--login-gold-300);
}

@keyframes dn-twinkle {
  0%, 100% { opacity: .15; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes dn-shoot {
  0% { transform: translate(0, 0) rotate(18deg); opacity: 0; }
  6% { opacity: 1; }
  30%, 100% { transform: translate(340px, 140px) rotate(18deg); opacity: 0; }
}

.dn-brand,
.dn-panel-head,
.dn-chips,
.dn-panel-foot {
  position: relative;
  z-index: 2;
}

.dn-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dn-brand-logo {
  width: 52px;
  height: 52px;
  display: block;
  flex: 0 0 auto;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, .35);
}

.top-brand-logo {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.school-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.school-logo-thumb {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid #e3e6ed;
  border-radius: 10px;
  background: #fff;
  object-fit: cover;
}

.assignment-class-list {
  display: grid;
  gap: 10px;
}

.assignment-class-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #e3e6ed;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
}

.assignment-class-option:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
}

.assignment-class-option input {
  margin-top: 3px;
}

.assignment-class-option small {
  display: block;
  margin-top: 3px;
  color: #697181;
  font-weight: 400;
}

.dn-brand-word {
  color: #fff;
  font-family: var(--login-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.05;
}

.dn-brand-sub {
  margin-top: 2px;
  color: #d2ead0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .2px;
}

.dn-panel-head { margin-top: 46px; }

.dn-panel-head h1 {
  margin: 0 0 10px;
  color: #fff;
  font-family: var(--login-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.28;
}

.dn-panel-head h1 span { color: var(--login-gold-300); }

.dn-panel-head p {
  max-width: 34ch;
  margin: 0;
  color: #e0f0d9;
  font-size: 14.5px;
  line-height: 1.55;
}

.dn-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.dn-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid rgba(210, 239, 163, .52);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(49, 88, 160, .38), rgba(143, 189, 73, .34));
  color: #f1fae9;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(3px);
}

.dn-chip i,
.dn-eyebrow i {
  width: 6px;
  height: 6px;
  display: block;
  border-radius: 50%;
}

.dn-chip i { background: var(--login-gold-500); }

.dn-panel-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 40px;
}

.dn-panel-foot p {
  margin: 0;
  color: #d3e5d2;
  font-size: 12.5px;
  line-height: 1.5;
}

.dn-contact-details {
  display: grid;
  gap: 9px;
}

.dn-contact-details p {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.dn-contact-details i {
  width: 18px;
  margin-top: 1px;
  color: var(--login-gold-300);
  font-size: 13px;
  text-align: center;
}

.dn-contact-details a {
  color: #e3f4d1;
  text-decoration: none;
}

.dn-contact-details a:hover { color: #fff; text-decoration: underline; }

.dn-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 44px 36px;
  background:
    radial-gradient(circle at 100% 100%, rgba(147, 189, 77, .11), transparent 33%),
    var(--login-cream-50);
}

.dn-eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #edf6df;
  color: #527f2c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
}

.dn-eyebrow i { background: var(--login-coral); }

.dn-form-side h2 {
  margin: 0 0 6px;
  color: var(--login-ink-900);
  font-family: var(--login-display);
  font-size: 30px;
  font-weight: 700;
}

.dn-lede {
  margin: 0 0 22px;
  color: var(--login-ink-400);
  font-size: 14.5px;
}

.dn-field { margin-bottom: 16px; }

.dn-form-side label {
  display: block;
  margin-bottom: 7px;
  color: var(--login-ink-900);
  font-size: 13px;
  font-weight: 800;
}

.dn-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.dn-input-wrap input,
.dn-form-side #studentRegisterForm .form-control,
.dn-form-side #studentRegisterForm .form-select {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid #e4e7f4;
  border-radius: 12px;
  background: #fff;
  color: var(--login-ink-900);
  font-family: var(--login-body);
  font-size: 14.5px;
  outline: none;
}

.dn-input-wrap input {
  padding: 12.5px 42px;
}

.dn-input-wrap input:focus,
.dn-form-side #studentRegisterForm .form-control:focus,
.dn-form-side #studentRegisterForm .form-select:focus {
  border-color: var(--login-navy-600);
  box-shadow: 0 0 0 4px rgba(37, 64, 154, .12);
}

.dn-input-wrap input::placeholder,
.dn-form-side #studentRegisterForm input::placeholder {
  color: #b3b8d1;
}

.dn-input-icon {
  position: absolute;
  left: 14px;
  z-index: 2;
  color: #9ba1c4;
  font-size: 17px;
}

.dn-password-toggle {
  position: absolute;
  right: 12px;
  display: flex;
  padding: 4px;
  border: 0;
  background: none;
  color: #9ba1c4;
}

.dn-password-toggle:hover { color: var(--login-navy-600); }

.dn-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 18px;
}

.dn-forgot-row a {
  color: var(--login-navy-600);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.dn-forgot-row a:hover { text-decoration: underline; }

.dn-submit {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #294b94 0%, #3d68a8 44%, #7eae3f 100%);
  color: #fff;
  font-family: var(--login-display);
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 12px 24px -10px rgba(39, 79, 139, .45);
  transition: transform .15s ease, box-shadow .15s ease;
}

.dn-submit:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #213c82 0%, #31599f 42%, #6f9f36 100%);
  box-shadow: 0 16px 28px -10px rgba(39, 79, 139, .5);
}

.dn-submit:focus-visible {
  outline: 3px solid var(--login-gold-500);
  outline-offset: 2px;
}

.dn-create-link {
  margin: 18px 0 0;
  color: var(--login-ink-400);
  font-size: 13.5px;
  text-align: center;
}

.dn-create-link button,
.dn-back-link {
  border: 0;
  background: none;
  color: #669c39;
  font-weight: 800;
}

.dn-create-link button:hover,
.dn-back-link:hover { text-decoration: underline; }

.dn-back-link {
  width: 100%;
  margin-top: 12px;
  color: var(--login-navy-600);
  font-size: 13px;
}

.dn-form-side #loginError:empty {
  display: none;
}

.dn-form-side #loginError {
  margin-bottom: 14px;
  font-size: 13px;
}

#studentRegisterForm {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .dn-star,
  .dn-shooting-star { animation: none; }
}

@media (max-width: 820px) {
  .login-screen { align-items: flex-start; padding: 20px 14px; }
  .dn-login-card { grid-template-columns: 1fr; }
  .dn-login-panel { min-height: auto; padding: 32px 28px 28px; }
  .dn-panel-head { margin-top: 28px; }
  .dn-panel-foot { padding-top: 24px; }
  .dn-form-side { padding: 34px 28px 30px; }
}

@media (max-width: 480px) {
  .dn-login-panel { padding: 26px 22px; }
  .dn-panel-head h1 { font-size: 25px; }
  .dn-form-side { padding: 30px 22px; }
}
