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

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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

/* =========================================
   MAIN PAGE
========================================= */

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

  display: grid;

  grid-template-columns: 45% 55%;
}

/* =========================================
   BRAND PANEL - DESKTOP
========================================= */

.brand-panel {
  position: relative;

  min-height: 100vh;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  text-align: center;

  padding: 50px;

  overflow: hidden;

  background: linear-gradient(145deg, #0d3479 0%, #153f8c 55%, #1c4d9f 100%);

  color: white;
}

.brand-panel::before {
  content: "";

  position: absolute;

  width: 420px;
  height: 420px;

  border-radius: 50%;

  border: 1px solid rgba(255, 255, 255, 0.1);

  top: -180px;
  left: -180px;
}

.brand-panel::after {
  content: "";

  position: absolute;

  width: 500px;
  height: 500px;

  border-radius: 50%;

  border: 1px solid rgba(255, 255, 255, 0.08);

  bottom: -260px;
  right: -200px;
}

.brand-content {
  position: relative;

  z-index: 2;

  max-width: 420px;
}

.brand-logo {
  width: 125px;
  height: 125px;

  object-fit: contain;

  margin-bottom: 20px;

  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

.brand-name {
  font-size: 34px;

  letter-spacing: 8px;

  font-weight: 600;
}

.brand-line {
  width: 55px;
  height: 3px;

  background: #d8a441;

  margin: 22px auto;
}

.brand-content h2 {
  font-size: 23px;

  font-weight: 500;

  margin-bottom: 12px;
}

.brand-content p {
  color: rgba(255, 255, 255, 0.72);

  font-size: 15px;

  line-height: 1.7;
}

.brand-footer {
  position: absolute;

  bottom: 25px;

  left: 0;
  right: 0;

  display: flex;

  justify-content: center;

  gap: 10px;

  color: rgba(255, 255, 255, 0.55);

  font-size: 11px;
}

/* =========================================
   LOGIN PANEL
========================================= */

.login-panel {
  min-height: 100vh;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 40px;

  background: linear-gradient(135deg, #f4f8ff, #eef4ff, #ffffff);
}

.login-card {
  width: 100%;

  max-width: 430px;
}

/* =========================================
   MOBILE LOGO
========================================= */

.mobile-logo {
  display: none;

  text-align: center;

  margin-bottom: 25px;
}

.mobile-logo img {
  width: 80px;
}

/* =========================================
   HEADING
========================================= */

.login-heading {
  margin-bottom: 30px;
}

.welcome {
  display: inline-block;

  color: #d09d3f;

  font-size: 13px;

  font-weight: 600;

  margin-bottom: 8px;
}

.login-heading h1 {
  color: #153f8c;

  font-size: 31px;

  line-height: 1.2;

  margin-bottom: 8px;
}

.login-heading p {
  color: #6b7280;

  font-size: 14px;
}

/* =========================================
   FORM
========================================= */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;

  color: #374151;

  font-size: 13px;

  font-weight: 600;

  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;

  display: flex;

  align-items: center;

  width: 100%;

  background: white;

  border: 1px solid #d9dee7;

  border-radius: 12px;

  transition: 0.2s;
}

.input-wrapper:focus-within {
  border-color: #153f8c;

  box-shadow: 0 0 0 3px rgba(21, 63, 140, 0.08);
}

.input-icon {
  width: 45px;

  flex-shrink: 0;

  display: flex;

  align-items: center;

  justify-content: center;

  color: #9ca3af;

  font-size: 15px;
}

.input-wrapper input {
  flex: 1;

  min-width: 0;

  height: 52px;

  border: none;

  outline: none;

  background: transparent;

  color: #111827;

  font-size: 15px;

  padding: 0 8px 0 0;
}

.input-wrapper input::placeholder {
  color: #a1a8b3;
}

.password-toggle {
  width: 45px;

  flex-shrink: 0;

  border: none;

  background: transparent;

  cursor: pointer;

  padding: 10px;

  color: #9ca3af;

  font-size: 15px;
}

/* =========================================
   ERROR
========================================= */

.login-error {
  min-height: 20px;

  margin-bottom: 8px;

  color: #dc2626;

  font-size: 13px;

  line-height: 1.4;
}

/* =========================================
   LOGIN BUTTON
========================================= */

.login-button {
  width: 100%;

  height: 52px;

  border: none;

  border-radius: 12px;

  background: linear-gradient(135deg, #153f8c, #0d3479);

  color: white;

  font-size: 15px;

  font-weight: 600;

  cursor: pointer;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 10px;

  box-shadow: 0 7px 18px rgba(21, 63, 140, 0.2);

  transition:
    transform 0.2s,
    box-shadow 0.2s,
    opacity 0.2s;
}

.login-button:hover {
  transform: translateY(-1px);

  box-shadow: 0 10px 22px rgba(21, 63, 140, 0.25);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:disabled {
  cursor: not-allowed;

  opacity: 0.7;

  transform: none;
}

/* =========================================
   SPINNER
========================================= */

.login-spinner {
  display: none;

  width: 16px;
  height: 16px;

  border: 2px solid rgba(255, 255, 255, 0.4);

  border-top-color: white;

  border-radius: 50%;

  animation: loginSpin 0.7s linear infinite;
}

.login-spinner.show {
  display: inline-block;
}

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

/* =========================================
   SECURITY
========================================= */

.security-note {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 7px;

  margin-top: 25px;

  color: #9ca3af;

  font-size: 11px;

  text-align: center;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1000px) {
  .login-page {
    grid-template-columns: 40% 60%;
  }

  .brand-panel {
    padding: 30px;
  }

  .brand-logo {
    width: 100px;
    height: 100px;
  }

  .brand-name {
    font-size: 29px;
  }

  .brand-content h2 {
    font-size: 20px;
  }

  .login-panel {
    padding: 30px;
  }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {
  body {
    background: #f8fafc;
  }

  .login-page {
    display: block;

    min-height: 100dvh;
  }

  /* Hide desktop branding */

  .brand-panel {
    display: none;
  }

  /* Login area */

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

    width: 100%;

    padding: 28px 20px;

    display: flex;

    align-items: center;

    justify-content: center;
  }

  .login-card {
    width: 100%;

    max-width: 420px;
  }

  /* Mobile logo */

  .mobile-logo {
    display: block;

    margin-bottom: 24px;
  }

  .mobile-logo img {
    width: 78px;
    height: 78px;

    object-fit: contain;
  }

  /* Heading */

  .login-heading {
    margin-bottom: 26px;

    text-align: center;
  }

  .welcome {
    font-size: 12px;

    margin-bottom: 7px;
  }

  .login-heading h1 {
    font-size: 27px;

    line-height: 1.25;

    margin-bottom: 7px;
  }

  .login-heading p {
    font-size: 13px;
  }

  /* Form */

  .form-group {
    margin-bottom: 17px;
  }

  .form-group label {
    font-size: 13px;

    margin-bottom: 7px;
  }

  .input-wrapper {
    min-height: 52px;

    border-radius: 11px;
  }

  .input-wrapper input {
    height: 52px;

    font-size: 15px;
  }

  .login-button {
    height: 52px;

    border-radius: 11px;

    margin-top: 4px;
  }

  .security-note {
    margin-top: 22px;

    font-size: 10px;
  }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 380px) {
  .login-panel {
    padding: 22px 16px;
  }

  .mobile-logo {
    margin-bottom: 18px;
  }

  .mobile-logo img {
    width: 65px;
    height: 65px;
  }

  .login-heading {
    margin-bottom: 22px;
  }

  .login-heading h1 {
    font-size: 24px;
  }

  .login-heading p {
    font-size: 12px;
  }

  .form-group {
    margin-bottom: 14px;
  }

  .login-button {
    height: 50px;
  }

  .security-note {
    margin-top: 18px;
  }
}

/* =========================================
   VERY SHORT MOBILE SCREENS
========================================= */

@media (max-height: 650px) and (max-width: 768px) {
  .login-panel {
    align-items: flex-start;

    padding-top: 20px;

    padding-bottom: 20px;
  }

  .mobile-logo {
    margin-bottom: 12px;
  }

  .mobile-logo img {
    width: 55px;
    height: 55px;
  }

  .login-heading {
    margin-bottom: 18px;
  }

  .form-group {
    margin-bottom: 12px;
  }

  .security-note {
    margin-top: 15px;
  }
}
