:root {
  --color-primary: #1e3a8a;
  --color-primary-dark: #172554;
  --color-text: #0f172a;
  --color-subtle: #9ca3af;
  /* Semi-gray */
  --font-main: 'Inter', sans-serif;
}

body,
html {
  margin: 0;
  height: 100%;
  font-family: var(--font-main);
}

.split-screen {
  display: flex;
  height: 100vh;
}

/* --- Left Side (65% Width) --- */
.left-side {
  flex: 1.8;
  /* Makes the left side wider than the right */
  position: relative;
  background: url('bg.png') no-repeat center center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.brand-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.9), rgba(23, 37, 84, 0.7));
}

.brand-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.brand-logo {
  width: 160px;
  height: auto;
  margin-bottom: 20px;
}

.system-name {
  font-size: 3rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: 1.5px;
}

.municipality-name {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-top: 10px;
}

/* --- Right Side (35% Width) --- */
.right-side {
  flex: 1;
  /* Form side is narrower */
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-box {
  width: 100%;
  max-width: 380px;
  text-align: center;
  /* Centering titles, subtitle, links, and footer */
}

.form-title {
  font-size: 28px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.form-subtitle {
  color: #64748b;
  margin-bottom: 30px;
  font-size: 15px;
}

/* Input Styles */
.input-group {
  margin-bottom: 20px;
  text-align: left;
}

/* Labels stay left-aligned */
.input-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.input-field {
  width: 100%;
  padding: 12px 14px;
  padding-right: 45px;
  /* Space for the eye icon */
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f9fafb;
  box-sizing: border-box;
}

/* --- Password Toggle Fix --- */
.input-wrapper {
  position: relative;
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-subtle);
  padding: 0;
  display: flex;
  align-items: center;
  z-index: 10;
}

/* Hides built-in browser eye icons (Edge/Chrome) */
.input-field::-ms-reveal,
.input-field::-ms-clear {
  display: none;
}

input[type="password"]::-webkit-reveal,
input[type="password"]::-webkit-password-toggle-button {
  display: none !important;
}

/* --- Footer & Link Styles --- */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  margin-top: 10px;
}

.link-forgot {
  display: block;
  margin-top: 20px;
  font-size: 14px;
  color: var(--color-primary);
  text-decoration: none;
}

.footer-note {
  margin-top: 35px;
  font-size: 13px;
  color: var(--color-subtle);
  /* Semi-gray */
  font-style: italic;
  /* Italicized */
}

@media (max-width: 900px) {
  .split-screen {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .left-side {
    display: flex;
    flex: 0 0 35vh;
    /* Takes top 35% of the viewport */
    min-height: 280px;
    /* Ensure content fits */
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
  }

  .brand-logo {
    width: 100px;
    margin-bottom: 10px;
  }

  .system-name {
    font-size: 1.8rem;
    line-height: 1.2;
  }

  .municipality-name {
    font-size: 1rem;
  }

  .right-side {
    flex: 1;
    width: 100%;
    padding: 40px 24px;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    margin-top: -30px;
    /* Create overlap effect */
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
  }

  .login-box {
    max-width: 100%;
  }

  .form-title {
    font-size: 24px;
  }
}