@import url("https://fonts.bunny.net/css?family=inter:400,500,600,700,800&display=swap");

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

:root {
  --bg-right: #f4f6fc;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --gold: #dfb239;
  --navy-from: #0c1e40;
  --navy-via: #0d2654;
  --navy-to: #040b17;
}

html,
body.login-page {
  min-height: 100dvh;
}

body.login-page {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--slate-800);
  background: var(--bg-right);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Mobile background ── */
.mobile-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(to bottom, rgba(10, 24, 53, 0.95), rgba(12, 32, 73, 0.9), rgba(5, 14, 33, 0.96)),
    url("https://images.unsplash.com/photo-1562774053-701939374585?w=1200&q=80") center 35% / cover no-repeat;
}

@media (min-width: 1024px) {
  .mobile-bg {
    display: none;
  }
}

/* ── Split layout ── */
.split-layout {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100dvh;
  width: 100%;
}

@media (min-width: 1024px) {
  .split-layout {
    grid-template-columns: 1.15fr 1fr;
  }
}

/* ══════════════════════════
   LEFT PANEL
══════════════════════════ */
.panel-left {
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 3rem 3rem 2.5rem;
  color: #fff;
}

@media (min-width: 1024px) {
  .panel-left {
    display: flex;
  }
}

@media (min-width: 1280px) {
  .panel-left {
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

.panel-left-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("https://images.unsplash.com/photo-1562774053-701939374585?w=1600&q=80") center 35% / cover no-repeat;
}

.panel-left-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom right,
    rgba(12, 30, 64, 0.94),
    rgba(13, 38, 84, 0.92),
    rgba(4, 11, 23, 0.97)
  );
}

.dot-pattern {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  z-index: 2;
  color: rgba(245, 158, 11, 0.6);
}

.panel-tag {
  position: relative;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.panel-brand {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
  margin: auto 0;
}

.logo-glow-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.logo-glow-wrap::before {
  content: "";
  position: absolute;
  inset: -1rem;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.2);
  filter: blur(2rem);
  opacity: 0.6;
}

.logo-circle {
  position: relative;
  width: 8rem;
  height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: #0a1835;
  padding: 0.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  outline: 4px solid rgba(255, 255, 255, 0.1);
}

.logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.college-name {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.system-title {
  margin-top: 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.gold-bar {
  margin: 0.75rem 0 1rem;
  width: 4rem;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
}

.brand-desc {
  max-width: 28rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 1280px) {
  .brand-desc {
    font-size: 1rem;
  }
}

/* Feature cards */
.feature-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: auto;
}

@media (min-width: 1280px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  text-align: left;
  transition: transform 0.3s, border-color 0.3s, background 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.feature-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.feature-desc {
  margin-top: 0.25rem;
  font-size: 10px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.5);
}

.panel-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

/* ══════════════════════════
   RIGHT PANEL
══════════════════════════ */
.panel-right {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2rem 1rem;
  background: transparent;
}

@media (min-width: 640px) {
  .panel-right {
    padding: 2rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .panel-right {
    background: var(--bg-right);
    padding: 2rem;
  }
}

.form-wrap {
  width: 100%;
  max-width: 460px;
}

/* Mobile header */
.mobile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .mobile-header {
    display: none;
  }
}

.mobile-logo-circle {
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border-radius: 0.75rem;
  background: #0a1835;
  padding: 0.375rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  outline: 4px solid rgba(255, 255, 255, 0.1);
}

.mobile-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mobile-college {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.mobile-title {
  margin-top: 0.25rem;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* Login card */
.login-card {
  border-radius: 1.5rem;
  border: 1px solid #f1f5f9;
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(4px);
}

@media (min-width: 640px) {
  .login-card {
    background: #fff;
    padding: 2.5rem 2.5rem;
  }
}

.card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.5rem;
}

.shield-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  border: 1px solid rgba(219, 234, 254, 0.5);
  background: #eff6ff;
  color: var(--blue-600);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.shield-icon {
  display: block;
}

.lock-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 3px));
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--slate-800);
}

.card-subtitle {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-500);
}

@media (min-width: 640px) {
  .card-subtitle {
    font-size: 0.875rem;
  }
}

.gold-bar-sm {
  margin-top: 0.75rem;
  width: 3rem;
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
}

/* Status message */
.status-msg {
  display: none;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.status-msg:not(:empty) {
  display: block;
}

.status-msg.error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.status-msg.success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--slate-700);
}

/* Role toggle */
.role-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.375rem;
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--slate-200);
  background: #f8fafc;
}

.role-toggle.two-cols {
  grid-template-columns: repeat(2, 1fr);
}

.role-btn {
  padding: 0.5rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--slate-500);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  outline: none;
  transition: all 0.15s;
}

.role-btn:hover:not(.active) {
  background: var(--slate-200);
  color: var(--slate-700);
}

.role-btn.active {
  color: var(--slate-800);
  background: #fff;
  border-color: var(--slate-200);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.role-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Inputs */
.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 0.875rem;
  transform: translateY(-50%);
  color: var(--slate-400);
  pointer-events: none;
  z-index: 1;
}

.input-wrap input {
  width: 100%;
  height: 2.75rem;
  padding: 0 2.5rem 0 2.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--slate-700);
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap input::placeholder {
  color: var(--slate-400);
}

.input-wrap input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.input-wrap input.input-error {
  border-color: #ef4444;
}

.input-wrap input.input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 0.875rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--slate-400);
  cursor: pointer;
  transition: color 0.15s;
}

.toggle-password svg {
  display: block;
  flex-shrink: 0;
}

.toggle-password .eye-off-icon {
  display: none;
}

.toggle-password.is-visible .eye-icon {
  display: none;
}

.toggle-password.is-visible .eye-off-icon {
  display: block;
}

.toggle-password:hover {
  color: var(--slate-600);
}

/* Remember me */
.remember-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.remember-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  border: 1px solid #cbd5e1;
  accent-color: var(--blue-600);
  cursor: pointer;
}

.remember-row label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-600);
  cursor: pointer;
  user-select: none;
}

@media (min-width: 640px) {
  .remember-row label {
    font-size: 0.875rem;
  }
}

/* Submit button */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 2.75rem;
  margin-top: 0.5rem;
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--blue-600);
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  cursor: pointer;
  outline: none;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.submit-btn:hover:not(:disabled) {
  background: var(--blue-700);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.submit-btn .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.submit-btn.loading .spinner {
  display: block;
}

.submit-btn.loading .login-icon {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.forgot-row {
  text-align: center;
  margin-top: 0.25rem;
}

.forgot-row a {
  font-size: 0.8125rem;
  color: var(--slate-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.forgot-row a:hover {
  color: var(--slate-800);
}

.register-row {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 1024px) {
  .register-row {
    color: var(--slate-500);
  }
}

.register-row a {
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (min-width: 1024px) {
  .register-row a {
    color: var(--blue-600);
  }
}

.mobile-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 1024px) {
  .mobile-footer {
    display: none;
  }
}

/* Register page */
.register-card .login-form {
  gap: 0.875rem;
}

@media (min-width: 1024px) {
  .form-wrap:has(.register-card) {
    max-width: 480px;
  }
}
