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

:root {
  --brand: #1E3A8A;
  --brand-hover: #162C63;
  --accent: #2563EB;
  --bg: linear-gradient(135deg, #F0F4FF 0%, #E5E7EB 100%);
  --white: #FFFFFF;
  --text: #1F2937;
  --muted: #6B7280;
  --radius: 16px;
  --shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
}

.login-layout {
  display: flex;
  width: 100%;
  max-width: 1100px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeIn 1s ease-out;
  flex-wrap: wrap;
  min-height: 500px;
}

.login-left, .login-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 2rem;
  box-sizing: border-box;
}

.login-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.8rem;
}

.logo-icon {
  width: 90px;
  margin-bottom: 0.8rem;
  animation: pulseLogo 3s ease-in-out infinite;
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.logo-area h1 {
  font-family: 'Montserrat', sans-serif;
  color: var(--brand);
  font-size: 1.4rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo-area p {
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.input-group {
  text-align: left;
  width: 100%;
}

.input-group label {
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.input-group i {
  color: var(--brand);
  margin-right: 0.4rem;
}

input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  outline: none;
  font-size: 0.95rem;
  transition: border 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

.btn-login {
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
  color: var(--white);
  border: none;
  padding: 0.9rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.6rem;
  box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.btn-login:hover {
  background: linear-gradient(90deg, var(--accent) 0%, var(--brand) 100%);
  transform: translateY(-2px);
}

.footer-text {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1.3rem;
  text-align: center;
}

.error-box {
  color: #fff;
  background-color: #C41212;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  margin-top: 10px;
}

.login-right {
  position: relative;
  overflow: hidden;
  flex: 1.2;
  width: 100%;
}

.login-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
  transition: transform 6s ease;
}

.login-right img:hover {
  transform: scale(1.05);
}

.login-right::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 58, 138, 0.25);
  pointer-events: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .login-layout {
    flex-direction: column;
    min-height: auto;
  }

  .login-left, .login-right {
    flex: unset;
    width: 100%;
    padding: 1rem;
    justify-content: flex-start;
  }

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

  .logo-icon {
    width: 60px;
    margin-bottom: 0.5rem;
  }

  .logo-area h1 {
    font-size: 1.1rem;
  }

  .logo-area p {
    font-size: 0.75rem;
  }

  .login-form {
    gap: 0.7rem;
  }

  input {
    padding: 0.65rem;
    font-size: 0.9rem;
  }

  .btn-login {
    width: 100%;
    font-size: 0.9rem;
    padding: 0.75rem;
  }

  .login-right {
    min-height: 150px;
    margin-top: 1rem;
    height: auto;
  }

  .login-right img {
    height: auto;
  }
}

@media (max-width: 550px) {
  .login-layout {
    width: 95%;
    padding: 1rem;
  }

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

  .logo-icon {
    width: 50px;
  }

  .logo-area h1 {
    font-size: 1rem;
  }

  .logo-area p {
    font-size: 0.7rem;
  }

  .login-form {
    gap: 0.5rem;
  }

  input {
    padding: 0.6rem;
    font-size: 0.85rem;
  }

  .btn-login {
    padding: 0.7rem;
    font-size: 0.85rem;
  }

  .login-right {
    min-height: 120px;
  }
}