/* ===================================
   SMCET ERP – Login Page Styles
   =================================== */

:root {
  --primary:       #0A2463;
  --primary-light: #1E3A8A;
  --primary-dark:  #061539;
  --accent:        #E8A838;
  --accent-light:  #F5C563;
  --white:         #FFFFFF;
  --off-white:     #F4F6FC;
  --gray:          #8B95A5;
  --dark:          #1A1A2E;
  --danger:        #EF4444;
  --success:       #10B981;
  --radius:        14px;
  --transition:    all 0.35s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  background: var(--off-white);
  overflow-x: hidden;
}

/* ---------- Wrapper ---------- */
.login-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ---------- Left Branding Panel ---------- */
.login-branding {
  flex: 0 0 45%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 50px;
  position: relative;
  overflow: hidden;
  color: var(--white);
}

.branding-content { position: relative; z-index: 2; text-align: center; max-width: 400px; }

.branding-icon {
  width: 80px; height: 80px; border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2.2rem; color: var(--primary-dark);
  margin-bottom: 24px;
  box-shadow: 0 8px 30px rgba(232,168,56,0.3);
}

.branding-content h1 {
  font-size: 2.4rem; font-weight: 800; margin-bottom: 6px;
}
.branding-content h1 span { color: var(--accent-light); }

.branding-tagline {
  font-size: .95rem; opacity: 0.7; margin-bottom: 24px;
}
.branding-divider {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin: 0 auto 24px;
  border-radius: 2px;
}
.branding-desc {
  font-size: .9rem; opacity: 0.6; line-height: 1.8; margin-bottom: 30px;
}

.branding-features {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 30px;
}
.bf-item {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 10px 14px;
  font-size: .8rem; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.bf-item i { color: var(--accent-light); font-size: 1rem; }

.branding-roles {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.role-chip {
  padding: 6px 14px; border-radius: 50px;
  font-size: .75rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
}
.role-admin   { background: rgba(220,53,69,0.2); color: #FCA5A5; }
.role-faculty { background: rgba(13,110,253,0.2); color: #93C5FD; }
.role-student { background: rgba(25,135,84,0.2); color: #6EE7B7; }
.role-parent  { background: rgba(111,66,193,0.2); color: #C4B5FD; }

.branding-footer {
  position: absolute; bottom: 24px; left: 0; right: 0;
  text-align: center; z-index: 2;
}
.branding-footer small { opacity: 0.4; font-size: .75rem; }

/* Decorative circles */
.decor-circle {
  position: absolute; border-radius: 50%;
}
.decor-1 {
  width: 400px; height: 400px; top: -150px; right: -100px;
  background: radial-gradient(circle, rgba(232,168,56,0.1), transparent 70%);
}
.decor-2 {
  width: 300px; height: 300px; bottom: -100px; left: -80px;
  background: radial-gradient(circle, rgba(30,58,138,0.3), transparent 70%);
}
.decor-3 {
  width: 200px; height: 200px; top: 50%; left: 60%;
  background: radial-gradient(circle, rgba(255,255,255,0.03), transparent 70%);
}

/* ---------- Right Form Panel ---------- */
.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--white);
}

.login-form-container {
  width: 100%; max-width: 420px;
}

.mobile-logo { text-align: center; margin-bottom: 30px; }
.branding-icon-sm {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--white); margin-bottom: 12px;
}
.mobile-logo h3 { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.mobile-logo h3 span { color: var(--accent); }

.login-title {
  font-size: 1.8rem; font-weight: 700; color: var(--primary);
  margin-bottom: 6px;
}
.login-subtitle {
  font-size: .95rem; color: var(--gray); margin-bottom: 32px;
}

/* Alerts */
.alert-box {
  padding: 14px 18px; border-radius: 12px;
  font-size: .88rem; margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.alert-error {
  background: #FEF2F2; color: var(--danger);
  border: 1px solid #FECACA;
}
.alert-success {
  background: #ECFDF5; color: var(--success);
  border: 1px solid #A7F3D0;
}

/* Input Groups */
.input-group-custom { margin-bottom: 22px; }
.input-group-custom label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--dark); margin-bottom: 8px;
}
.input-wrapper {
  position: relative;
  display: flex; align-items: center;
  background: var(--off-white);
  border: 2px solid var(--off-white);
  border-radius: var(--radius);
  transition: var(--transition);
}
.input-wrapper:focus-within {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(10,36,99,0.08);
}
.input-wrapper > i {
  position: absolute; left: 16px;
  color: var(--gray); font-size: 1rem;
}
.input-wrapper input {
  width: 100%; padding: 14px 16px 14px 46px;
  border: none; background: transparent;
  font-size: .92rem; font-family: 'Poppins', sans-serif;
  color: var(--dark); outline: none;
}
.input-wrapper input::placeholder { color: #B8C0CC; }

.toggle-password {
  position: absolute; right: 14px;
  background: none; border: none;
  color: var(--gray); cursor: pointer;
  font-size: 1rem; padding: 4px;
}
.toggle-password:hover { color: var(--primary); }

/* Options row */
.form-options {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px;
}
.remember-me {
  font-size: .85rem; color: var(--gray);
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.remember-me input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
}
.forgot-link {
  font-size: .85rem; color: var(--primary);
  font-weight: 500; text-decoration: none;
}
.forgot-link:hover { color: var(--accent); }

/* Login Button */
.btn-login {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white); border: none; border-radius: var(--radius);
  font-size: 1rem; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(10,36,99,0.2);
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(10,36,99,0.35);
}
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: 0.7; cursor: not-allowed; }

@keyframes spin { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }
.spin { display: inline-block; animation: spin 1s linear infinite; }

/* Footer text */
.login-footer-text {
  text-align: center; margin-top: 28px;
}
.login-footer-text p {
  font-size: .82rem; color: var(--gray);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .login-branding { display: none; }
  .login-form-panel { padding: 30px 20px; }
}
@media (max-width: 575px) {
  .login-form-container { max-width: 100%; }
  .login-title { font-size: 1.5rem; }
  .form-options { flex-direction: column; gap: 10px; align-items: flex-start; }
}
