:root {
  --primary: #0059b8;
  --primary-dark: #003b7a;
  --primary-hover: #004da0;
  --primary-soft: #eaf3ff;

  --navy: #102542;
  --text: #18263b;
  --muted: #6f7c91;
  --border: #d7e0ec;
  --bg: #f7faff;
  --white: #ffffff;
  --danger: #d93025;
  --success: #15803d;

  --shadow: 0 24px 60px rgba(16, 37, 66, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
}

/* LEFT SIDE */

.login-hero {
  position: relative;
  min-height: 100vh;
  background: #f3f8ff;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(243, 248, 255, 0.58) 0%,
      rgba(243, 248, 255, 0.34) 32%,
      rgba(243, 248, 255, 0.08) 58%,
      rgba(243, 248, 255, 0) 100%
    ),
    linear-gradient(
      180deg,
      rgba(243, 248, 255, 0.12) 0%,
      rgba(0, 37, 82, 0.08) 100%
    );
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 56px 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.brand-logo {
  width: 245px;
  max-width: 100%;
  height: auto;
  display: block;
}

.hero-text {
  margin-top: 90px;
}

.hero-text h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.2;
  letter-spacing: -1.3px;
  color: var(--navy);
  font-weight: 700;
}

.hero-text h1 span {
  color: var(--primary);
}

.hero-line {
  margin-top: 36px;
  width: 76px;
  height: 4px;
  border-radius: 999px;
  background: var(--primary);
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* RIGHT SIDE */

.login-panel {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(0, 89, 184, 0.08), transparent 36%),
    var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.login-card {
  width: 100%;
  max-width: 520px;
}

.login-header {
  margin-bottom: 38px;
}

.login-header h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.7px;
  font-weight: 700;
}

.login-header p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 430px;
}

.login-form {
  width: 100%;
}

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

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  height: 64px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  padding: 0 52px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-wrapper input::placeholder {
  color: #94a1b5;
}

.input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 89, 184, 0.10);
  background: #ffffff;
}

.input-icon {
  position: absolute;
  left: 18px;
  color: #7e8ba0;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle {
  position: absolute;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #7e8ba0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.password-toggle:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.form-options {
  margin: -4px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.forgot-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  height: 64px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 89, 184, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  position: relative;
  overflow: hidden;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(0, 89, 184, 0.30);
}

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

.btn-login.loading {
  pointer-events: none;
  opacity: 0.85;
}

.btn-loader {
  display: none;
  width: 21px;
  height: 21px;
  border: 3px solid rgba(255,255,255,0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: auto;
}

.btn-login.loading .btn-text {
  display: none;
}

.btn-login.loading .btn-loader {
  display: block;
}

.form-message {
  min-height: 22px;
  margin: 18px 0 0;
  font-size: 14px;
  text-align: center;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--success);
}

.login-footer {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: #8a96a8;
  font-size: 13px;
  line-height: 1.7;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: 420px;
  }

  .hero-content {
    padding: 42px;
  }

  .hero-text {
    margin-top: 48px;
  }

  .login-panel {
    min-height: auto;
    padding: 56px 28px;
  }

  .login-card {
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .login-hero {
    min-height: 360px;
  }

  .hero-content {
    padding: 30px 24px;
  }

  .brand-logo {
    width: 190px;
  }

  .hero-text {
    margin-top: 44px;
  }

  .hero-text h1 {
    font-size: 28px;
  }

  .login-panel {
    padding: 42px 20px;
  }

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

  .login-header h2 {
    font-size: 32px;
  }

  .login-header p {
    font-size: 15px;
  }

  .input-wrapper input,
  .btn-login {
    height: 58px;
  }

  .login-footer {
    margin-top: 44px;
  }
}

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