/* ============================================================
   PIP — Portal Login
   portal-login.html
   ============================================================ */

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

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
  background: #001429;
}

a { text-decoration: none; color: inherit; }

/* ── PAGE LAYOUT ── */
.login-page {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── LEFT PANEL ── */
.login-left {
  width: 440px;
  flex-shrink: 0;
  background: linear-gradient(170deg, #001A3A 0%, #002B5B 55%, #003d7a 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 44px;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/watermark-PIP-3.png');
  background-repeat: repeat;
  background-size: auto;
  opacity: .04;
  pointer-events: none;
}

.login-left-content { position: relative; z-index: 1; }

.login-logo img {
  height: 32px;
  width: auto;
  display: block;
  margin-bottom: 52px;
}

.login-left-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #56C7F2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.login-left-label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: #56C7F2;
  border-radius: 2px;
  flex-shrink: 0;
}

.login-left-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}

.login-left-sub {
  font-size: .88rem;
  color: rgba(255,255,255,.5);
  line-height: 1.75;
  margin-bottom: 40px;
}

/* Access list */
.login-access-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  overflow: hidden;
}

.login-access-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.3);
  padding: 12px 18px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.login-access-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .15s;
}
.login-access-item:last-child { border-bottom: none; }
.login-access-item:hover { background: rgba(255,255,255,.04); }

.login-access-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(86,199,242,.1);
  border: 1px solid rgba(86,199,242,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.login-access-icon svg { width: 15px; height: 15px; color: #56C7F2; }

.login-access-title {
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}

.login-access-desc {
  font-size: .75rem;
  color: rgba(255,255,255,.45);
  line-height: 1.55;
}

.login-left-footer {
  position: relative;
  z-index: 1;
  font-size: .7rem;
  color: rgba(255,255,255,.2);
  letter-spacing: .03em;
}

/* ── RIGHT PANEL ── */
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: #F7FAFD;
}

.login-form-wrap {
  width: 100%;
  max-width: 380px;
}

.login-form-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.login-shield-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0,43,91,.06);
  border: 1px solid rgba(0,43,91,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.login-shield-icon svg { width: 22px; height: 22px; color: #002B5B; }

.login-form-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #002B5B;
  letter-spacing: -.02em;
  margin-bottom: 3px;
}
.login-form-header p { font-size: .82rem; color: #5B6678; }

/* Fields */
.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.login-field label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #5B6678;
}

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

svg.field-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: #5B6678;
  pointer-events: none;
  flex-shrink: 0;
}

.login-input-wrap input {
  width: 100%;
  height: 52px;
  padding: 0 44px;
  background: #fff;
  border: 1.5px solid #DDE6F2;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #1B2430;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.login-input-wrap input::placeholder { color: #b0bac8; }
.login-input-wrap input:focus {
  border-color: #56C7F2;
  box-shadow: 0 0 0 3px rgba(86,199,242,.15);
}
.login-input-wrap input.error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

.pw-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #5B6678;
  display: flex;
  align-items: center;
}
.pw-toggle svg { width: 16px; height: 16px; }
.pw-toggle:hover { color: #002B5B; }

/* Error */
.login-error {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(220,38,38,.06);
  border: 1px solid rgba(220,38,38,.2);
  border-radius: 10px;
  font-size: .83rem;
  color: #DC2626;
  margin-bottom: 16px;
}
.login-error.show { display: flex; }
.login-error svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Options */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: #5B6678;
  cursor: pointer;
  user-select: none;
}
.remember-label input { accent-color: #002B5B; width: 15px; height: 15px; }

.forgot-link {
  font-size: .82rem;
  font-weight: 600;
  color: #0A4AA3;
  transition: color .15s;
}
.forgot-link:hover { color: #002B5B; }

/* Submit */
.btn-login {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  background: #002B5B;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .2s;
  letter-spacing: .01em;
}
.btn-login:hover:not(:disabled) { background: #0A4AA3; }
.btn-login:disabled { opacity: .7; cursor: not-allowed; }
.btn-login svg { width: 16px; height: 16px; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* Footer links */
.login-secure-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: .72rem;
  color: #b0bac8;
}
.login-secure-note svg { width: 12px; height: 12px; flex-shrink: 0; }

.login-back {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: .78rem;
  font-weight: 600;
  color: #5B6678;
  transition: color .15s;
}
.login-back:hover { color: #002B5B; }
.login-back svg { width: 14px; height: 14px; }

/* ── RESPONSIVE ── */
@media (max-width: 800px) {
  .login-page { flex-direction: column; }
  .login-left { width: 100%; padding: 36px 24px 32px; }
  .login-left-heading { font-size: 1.3rem; }
  .login-left-sub { display: none; }
  .login-access-list { display: none; }
  .login-right { padding: 36px 24px 52px; }
}
