:root {
  --primary: #2e3192;
  --primary-dark: #1d226c;
  --accent-blue: #ffd600;
  --yellow: #ffd600;
  --success-color: #27ae60;
  --error-color: #e74c3c;
  --background: #f5f7fa;
  --white: #fff;
  --border-radius: 10px;
  --radius: 14px;
  --box-shadow: 0 0 10px rgba(0,0,0,0.1);
  --text-color: #2c3e50;
  --text-muted: #34495e;
  --z-topbar: 9999;
}

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

html {
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f6fb;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  min-width: 320px;
  min-height: 100vh;
}

/* --- TOPBAR SHARED --- */
.desktop-topbar,
.mobile-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-topbar);
  box-sizing: border-box;
}

/* --- DESKTOP TOPBAR --- */
.desktop-topbar {
  background: var(--primary);
  color: white;
  padding: 16px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0 0 var(--radius) var(--radius);
  min-height: 62px;
  box-shadow: 0 4px 12px rgba(46, 49, 146, 0.12);
  font-weight: 600;
  user-select: none;
  font-size: 16px;
}

.desktop-topbar .back-button {
  background-color: #3f4bb8;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  font-size: 15px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  gap: 8px;
  transition: background-color 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.back-button:hover {
  background: var(--primary-dark);
}

.desktop-topbar .back-button:focus,
.desktop-topbar .back-button:active {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.desktop-topbar .back-button i {
  font-size: 16px;
}

.desktop-topbar .title-section {
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.desktop-topbar .title-section i {
  color: var(--yellow);
  font-size: 26px;
  flex-shrink: 0;
}

.desktop-topbar .add-admission-icon {
  color: var(--yellow);
  font-size: 24px;
  display: flex;
  align-items: center;
  cursor: default;
  padding-left: 10px;
  flex-shrink: 0;
}

/* --- MOBILE TOPBAR --- */
.mobile-topbar {
  display: none;
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.13);
  background: var(--primary);
  color: white;
  padding: 18px 14px 15px;
  flex-direction: column;
  gap: 11px;
  box-sizing: border-box;
  min-height: 64px;
  font-weight: 600;
  font-size: 16px;
}

.mobile-topbar .back-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.mobile-topbar .back-button {
  width: 100%;
  max-width: 100%;
  background: #3034a0;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.mobile-topbar .back-button:focus,
.mobile-topbar .back-button:active {
  outline: 2px solid var(--yellow);
}

.mobile-topbar .title-row {
  font-weight: 600;
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.mobile-topbar .title-row i,
.mobile-topbar .icon-row i {
  color: var(--yellow);
  font-size: 24px;
  flex-shrink: 0;
}

.mobile-topbar .icon-row {
  display: flex;
  justify-content: center;
}

/* --- MAIN CONTENT --- */
.login-wrapper {
  min-height: calc(100vh - 62px);
  background: url('/static/image/login.jpg') no-repeat center center/cover;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 15px 40px;
  margin-top: 62px;
}

/* Left Side SVG or Illustration */
.bg-opacity-img {
  max-height: 500px;
  transition: transform 0.3s ease;
}

.bg-opacity-img:hover {
  transform: scale(1.02);
}

/* Login Card Styling */
.login-card {
  background-color: #ffffff;
  position: relative;
  z-index: 2;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Circle Icon Above Card */
.icon-circle {
  width: 60px;
  height: 60px;
  background-color: #2e3192;
  border-radius: 50%;
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Login Button */
.login-btn {
  background-color: #2e3192;
  color: white;
  font-weight: 600;
  transition: 0.3s ease;
  border-radius: 8px;
}

.login-btn:hover {
  background-color: #1f236e;
  color: #ffc107;
}

/* Input Placeholder Styling */
input::placeholder {
  font-size: 0.9rem;
  color: #888;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 700px) {
  .desktop-topbar {
    display: none !important;
  }

  .mobile-topbar {
    display: flex !important;
  }

  .login-wrapper {
    padding: 160px 15px 40px;
    margin-top: 0;
    min-height: calc(100vh - 64px);
  }

  .bg-opacity-img {
    display: none;
  }

  .login-card {
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .mobile-topbar {
    padding: 16px 12px 14px;
  }

  .login-wrapper {
    padding: 160px 12px 30px;
  }

  .login-card {
    padding: 2rem 1.5rem !important;
  }
}

@media (min-width: 701px) {
  .desktop-topbar {
    display: flex !important;
  }

  .mobile-topbar {
    display: none !important;
  }
}

/* Medium screens adjustments */
@media (max-width: 768px) and (min-width: 701px) {
  .desktop-topbar {
    padding: 14px 20px;
    font-size: 14px;
  }

  .desktop-topbar .title-section {
    font-size: 18px;
  }

  .desktop-topbar .back-button {
    padding: 6px 12px;
    font-size: 13px;
  }

  .login-wrapper {
    padding: 100px 15px 40px;
  }
}

@media (max-width: 991px) {
  .login-wrapper {
    padding: 100px 15px 40px;
  }
  
  .bg-opacity-img {
    display: none;
  }
  
  .login-card {
    margin-top: 20px;
  }
}

@media(max-width : 767px){
  .login-card{
    margin-top: 160px;
  }
}