@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #102347;
  --primary-2: #172d58;
  --sidebar: #0d1b3a;

  --bg: #f7f9fc;
  --surface: #ffffff;

  --text: #15233d;
  --muted: #7b879c;

  --border: #e5eaf1;

  --blue: #2979d8;
  --blue-soft: #eaf2ff;

  --red: #e45a5a;
  --red-soft: #fdebed;

  --green: #19a875;

  --shadow: 0 20px 60px rgba(21, 35, 61, 0.10);

  --radius: 18px;
}


* {
  box-sizing: border-box;
}


html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
}


body {
  font-family: 'Cairo', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
}


button,
input {
  font-family: inherit;
}


button {
  cursor: pointer;
}


.login-page {
  min-height: 100dvh;

  display: grid;

  grid-template-columns: 45% 55%;

  background: var(--bg);
}


/* =========================
   Welcome Section
========================= */

.welcome-section {

  background:
    linear-gradient(
      145deg,
      #0d1b3a 0%,
      #102347 55%,
      #172d58 100%
    );

  min-height: 100dvh;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 50px;

  position: relative;

  overflow: hidden;
}


/* تأثيرات خلفية */

.welcome-section::before {

  content: "";

  position: absolute;

  width: 420px;
  height: 420px;

  border-radius: 50%;

  background: rgba(255,255,255,.035);

  top: -150px;
  right: -150px;
}


.welcome-section::after {

  content: "";

  position: absolute;

  width: 330px;
  height: 330px;

  border-radius: 50%;

  background: rgba(255,255,255,.025);

  bottom: -140px;
  left: -100px;
}


.welcome-content {

  position: relative;

  z-index: 2;

  text-align: center;

  color: white;

  max-width: 430px;
}


.school-logo {

  width: 145px;
  height: 145px;

  margin: 0 auto 28px;

  border-radius: 24px;

  background: rgba(255,255,255,.98);

  padding: 14px;

  display: grid;

  place-items: center;

  box-shadow:
    0 20px 50px rgba(0,0,0,.18);
}


.school-logo img {

  width: 100%;
  height: 100%;

  object-fit: contain;
}


.welcome-content h1 {

  margin: 0;

  font-size: 27px;

  font-weight: 800;

  line-height: 1.7;
}


.welcome-content p {

  margin: 7px 0 20px;

  color: #c8d2e2;

  font-size: 16px;

  font-weight: 600;
}


.welcome-line {

  width: 55px;

  height: 3px;

  background: rgba(255,255,255,.65);

  border-radius: 10px;

  margin: 0 auto 20px;
}


.welcome-content > span {

  color: #aeb9cb;

  font-size: 13px;
}


/* =========================
   Login Section
========================= */

.login-section {

  min-height: 100dvh;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 40px;
}


.login-card {

  width: min(460px, 100%);

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: var(--radius);

  padding: 40px;

  box-shadow: var(--shadow);
}


.mobile-logo {

  display: none;

  width: 75px;
  height: 75px;

  margin: 0 auto 20px;

  padding: 8px;

  border-radius: 15px;

  background: var(--blue-soft);
}


.mobile-logo img {

  width: 100%;
  height: 100%;

  object-fit: contain;
}


/* =========================
   Header
========================= */

.login-header {

  margin-bottom: 30px;
}


.welcome-label {

  color: var(--blue);

  font-size: 12px;

  font-weight: 700;
}


.login-header h2 {

  margin: 7px 0 5px;

  font-size: 26px;

  font-weight: 800;

  color: var(--text);
}


.login-header p {

  margin: 0;

  color: var(--muted);

  font-size: 12px;

  line-height: 1.9;
}


/* =========================
   Form
========================= */

#loginForm {

  display: flex;

  flex-direction: column;

  gap: 18px;
}


.form-group {

  display: flex;

  flex-direction: column;

  gap: 8px;
}


.form-group label {

  font-size: 12px;

  font-weight: 700;

  color: var(--text);
}


.input-wrapper {

  position: relative;

  display: flex;

  align-items: center;
}


.input-wrapper input {

  width: 100%;

  height: 50px;

  border: 1px solid #dce3ed;

  border-radius: 10px;

  background: #fff;

  color: var(--text);

  padding:
    0 43px
    0 43px;

  font-size: 13px;

  outline: none;

  transition: .2s;
}


.input-wrapper input::placeholder {

  color: #a7b0bf;

  font-size: 11px;
}


.input-wrapper input:focus {

  border-color: var(--blue);

  box-shadow:
    0 0 0 3px rgba(41,121,216,.10);
}


.input-icon {

  position: absolute;

  right: 14px;

  color: var(--muted);

  font-size: 17px;

  pointer-events: none;
}


.password-toggle {

  position: absolute;

  left: 9px;

  width: 34px;
  height: 34px;

  border: 0;

  background: transparent;

  color: var(--muted);

  border-radius: 8px;

  font-size: 15px;
}


.password-toggle:hover {

  background: #f4f6f9;

  color: var(--primary);
}


/* =========================
   Options
========================= */

.login-options {

  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-top: -2px;
}


.remember {

  display: flex;

  align-items: center;

  gap: 8px;

  color: var(--muted);

  font-size: 11px;

  cursor: pointer;
}


.remember input {

  width: 16px;
  height: 16px;

  accent-color: var(--primary);

  cursor: pointer;
}


/* =========================
   Message
========================= */

.login-message {

  display: none;

  background: var(--red-soft);

  border: 1px solid #f6cfd3;

  color: #c33f46;

  border-radius: 9px;

  padding: 10px 12px;

  font-size: 11px;

  line-height: 1.7;
}


.login-message.show {

  display: block;
}


/* =========================
   Login Button
========================= */

.login-btn {

  width: 100%;

  height: 50px;

  border: 0;

  border-radius: 10px;

  background: var(--primary);

  color: white;

  font-size: 13px;

  font-weight: 700;

  box-shadow:
    0 7px 16px rgba(16,35,71,.14);

  transition: .2s;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 9px;
}


.login-btn:hover {

  background: var(--primary-2);

  transform: translateY(-1px);
}


.login-btn:active {

  transform: translateY(0);
}


.login-btn:disabled {

  opacity: .75;

  cursor: not-allowed;

  transform: none;
}


/* =========================
   Loader
========================= */

.loader {

  display: none;

  width: 17px;
  height: 17px;

  border: 2px solid rgba(255,255,255,.35);

  border-top-color: white;

  border-radius: 50%;

  animation: spin .7s linear infinite;
}


.login-btn.loading .loader {

  display: block;
}


@keyframes spin {

  to {
    transform: rotate(360deg);
  }

}


/* =========================
   Footer
========================= */

.login-footer {

  border-top: 1px solid var(--border);

  margin-top: 26px;

  padding-top: 18px;

  text-align: center;
}


.login-footer span {

  color: var(--muted);

  font-size: 10px;

  line-height: 1.8;
}


/* =========================
   Responsive
========================= */

@media (max-width: 900px) {

  .login-page {

    grid-template-columns: 1fr;
  }


  .welcome-section {

    display: none;
  }


  .login-section {

    min-height: 100dvh;

    padding: 25px 16px;
  }


  .login-card {

    padding: 30px 22px;
  }


  .mobile-logo {

    display: grid;
  }

}


@media (max-width: 480px) {

  .login-section {

    padding: 15px;
  }


  .login-card {

    border-radius: 15px;

    padding: 27px 18px;

    box-shadow:
      0 10px 35px rgba(21,35,61,.07);
  }


  .login-header {

    text-align: center;

    margin-bottom: 25px;
  }


  .login-header h2 {

    font-size: 22px;
  }


  .login-header p {

    font-size: 11px;
  }


  .input-wrapper input {

    height: 48px;
  }


  .login-btn {

    height: 49px;
  }

}