:root {
  --brand-blue:     #2244AA;
  --brand-light:    #7DB1FF;
  --brand-lighter:  #BDD7FF;
  --brand-mid:      #518FEC;
  --brand-off-white:#EFEFF9;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  min-height: 100vh;
  background: var(--brand-blue);
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #2244AA !important;
}

.bg-image {
  position: fixed;
  inset: 0;
  background: url('../img/bg.png') center/cover no-repeat;
  mix-blend-mode: multiply;
  filter: blur(2.5px);
  z-index: 0;
  pointer-events: none;
}
.bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.50);
  z-index: 1;
  pointer-events: none;
}
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .18;
  z-index: 0;
  animation: blobFloat 12s ease-in-out infinite alternate;
  pointer-events: none;
}
.bg-blob-1 { width: min(700px,100vw); height: min(700px,100vw); background:#7DB1FF; top:-150px; left:-150px; animation-delay:0s; }
.bg-blob-2 { width: min(500px,80vw);  height: min(500px,80vw);  background:#BDD7FF; bottom:-100px; right:-100px; animation-delay:3s; }
.bg-blob-3 { width: min(400px,70vw);  height: min(400px,70vw);  background:#518FEC; top:40%; left:30%; animation-delay:6s; }
@keyframes blobFloat {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(30px,20px) scale(1.05); }
}

.top-logos {
  position: fixed;
  top: 8px;
  left: clamp(12px, 3vw, 50px);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}
.top-logos img {
  width: clamp(44px, 6vw, 80px);
  height: clamp(44px, 6vw, 80px);
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(1100px, 96vw);
  background: linear-gradient(270deg, rgba(255,255,255,.15) 0%, rgba(30,30,30,.15) 65%);
  box-shadow: 4px 4px 30px 10px rgba(0,0,0,.25);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 25px;
  overflow: hidden;
  animation: cardIn .7s cubic-bezier(.22,.68,0,1.2) both;
  margin: 100px auto 60px;
}
@keyframes cardIn {
  from { opacity:0; transform:translateY(32px) scale(.97); }
  to   { opacity:1; transform:translateY(0)    scale(1); }
}

.left-panel {
  padding: clamp(30px, 5vw, 55px) clamp(24px, 4vw, 55px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 480px;
}

.gov-republic {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 2vw, 22px);
  color: #fff;
  line-height: 1.4;
}
.gov-municipality {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(14px, 2vw, 22px);
  color: var(--brand-light);
  line-height: 1.4;
}
.gov-province {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 500;
  font-size: clamp(14px, 2vw, 22px);
  color: #fff;
  line-height: 1.4;
}

.welcome-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: clamp(52px, 9vw, 96px);
  line-height: 1.05;
  background: linear-gradient(90deg, var(--brand-lighter) 0%, var(--brand-mid) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp .8s .3s both;
  margin: auto 0 clamp(20px, 4vw, 100px);
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

.left-footer p {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(11px, 1.3vw, 13px);
  color: var(--brand-off-white);
  opacity: .85;
  margin: 0;
}

.panel-divider {
  display: none;
  height: 1px;
  background: rgba(239,239,249,.2);
  margin: 0 clamp(20px, 5vw, 50px);
}

.right-panel {
  padding: clamp(30px, 5vw, 55px) clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid rgba(239,239,249,.12);
}

.db-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.4;
  color: var(--brand-off-white);
  text-align: center;
  text-shadow: 0 4px 4px rgba(0,0,0,.25);
  margin-bottom: clamp(20px, 3vw, 30px);
}

.form-label-custom {
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--brand-off-white);
  margin-bottom: 6px;
}

.input-wrap { position: relative; }
.input-custom {
  width: 100%;
  height: 48px;
  background: transparent;
  border: 1.5px solid var(--brand-off-white);
  border-radius: 30px;
  padding: 0 46px 0 20px;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  color: var(--brand-off-white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input-custom::placeholder { color: rgba(239,239,249,.5); }
.input-custom:focus {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(125,177,255,.2);
}

.input-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  color: var(--brand-off-white);
  opacity: .75;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.input-icon svg { width: 20px; height: 20px; }

.forgot-link {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--brand-off-white);
  opacity: .85;
  text-decoration: none;
  transition: opacity .15s;
}
.forgot-link:hover { opacity: 1; text-decoration: underline; color: var(--brand-off-white); }

.btn-login {
  width: 100%;
  height: 50px;
  background: var(--brand-off-white);
  border: none;
  border-radius: 30px;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--brand-blue);
  cursor: pointer;
  letter-spacing: .5px;
  transition: background .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.btn-login:hover {
  background: #d8d8f0;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.btn-login:active { transform: scale(.98); }

.copyright {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: rgba(239,239,249,.7);
  white-space: nowrap;
}
.copyright svg { width: 13px; height: 13px; opacity: .7; }

@media (max-width: 767.98px) {
  body { align-items: flex-start; }

  .login-card {
    margin: 80px 8px 50px;
    border-radius: 20px;
  }

  .left-panel {
    min-height: unset;
    padding-bottom: 24px;
  }

  .welcome-text {
    font-size: clamp(52px, 16vw, 76px);
    margin-bottom: 18px;
  }

  .panel-divider { display: block; }

  .right-panel {
    border-left: none;
    border-top: 1px solid rgba(239,239,249,.12);
    padding-top: 28px;
  }

  .top-logos img {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 400px) {
  .welcome-text { font-size: 44px; }
  .db-title { font-size: 15px; }
}