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

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f1f3f6;
}

.login-container {
  width: 100%;
  max-width: 390px;
  overflow: hidden;
  background: #fff;
  border-radius: 17px;
  box-shadow: 0 15px 40px rgba(0,0,0,.10);
}

.login-header {
  padding: 30px 20px;
  text-align: center;
  color: white;
}

.student-page .login-header {
  background: linear-gradient(135deg,#123d30,#267052);
}

.teacher-page .login-header {
  background: linear-gradient(135deg,#152d50,#315982);
}

.admin-page .login-header {
  background: linear-gradient(135deg,#101d35,#203b60);
}

.portal-icon {
  font-size: 34px;
  margin-bottom: 10px;
}

.login-header h2 {
  font-size: 22px;
  margin-bottom: 7px;
}

.admin-page .login-header h2 {
  color: #f0d99e;
}

.login-header p {
  font-size: 10px;
  letter-spacing: 1px;
  opacity: .85;
}

.login-form-area {
  padding: 27px;
}

.login-form-area h3 {
  text-align: center;
  color: #26374d;
  font-size: 18px;
  margin-bottom: 23px;
}

label {
  display: block;
  margin: 16px 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #46546a;
}

input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid #dce2e9;
  border-radius: 8px;
  background: #fafbfc;
  font-size: 13px;
  outline: none;
}

input:focus {
  border-color: #527b68;
  box-shadow: 0 0 0 3px rgba(82,123,104,.10);
}

.forgot-row {
  text-align: right;
  margin-top: 11px;
}

.forgot-row a,
.register-row a {
  color: #315982;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.login-submit {
  width: 100%;
  height: 47px;
  margin-top: 20px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
  cursor: pointer;
  transition: .2s;
}

.student-page .login-submit {
  background: #18533e;
  color: white;
}

.teacher-page .login-submit {
  background: #203e64;
  color: white;
}

.admin-page .login-submit {
  background: linear-gradient(135deg,#d9bd78,#c6a65d);
  color: #172943;
}

.login-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.register-row {
  text-align: center;
  font-size: 12px;
  color: #667085;
  margin-top: 19px;
}

.back-navigation {
  display: flex;
  flex-direction: row;
  gap: 9px;
  margin-top: 21px;
}

.back-navigation a {
  flex: 1;
  min-width: 0;
  min-height: 43px;
  padding: 7px 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #dce2e9;
  border-radius: 8px;
  background: #f5f7fa;
  color: #263b55;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  transition: .2s;
}

.back-navigation a:hover {
  background: #172943;
  color: #e5c77e;
  border-color: #172943;
}

#loginMessage {
  text-align: center;
  font-size: 12px;
  margin-top: 13px;
  overflow-wrap: anywhere;
}

.notice {
  text-align: center;
  color: #8993a2;
  font-size: 10px;
  line-height: 1.6;
  margin-top: 17px;
}

.login-footer {
  text-align: center;
  padding: 13px;
  background: #f8f9fb;
  color: #929baa;
  font-size: 10px;
  border-top: 1px solid #edf0f4;
}

@media(max-width:360px) {
  .login-form-area {
    padding: 22px 18px;
  }

  .back-navigation a {
    font-size: 10px;
  }
}

/* ADMIN LOGIN STATUS MESSAGES */

#loginMessage {
  min-height: 18px;
  line-height: 1.6;
  font-weight: 600;
}

#loginMessage.loading {
  color: #315982;
}

#loginMessage.success {
  color: #16834b;
}

#loginMessage.error {
  color: #d12f3f;
}

.login-submit:focus-visible,
.back-navigation a:focus-visible {
  outline: 3px solid rgba(198,166,93,.45);
  outline-offset: 3px;
}
