/* =============================================================================
   CSDH portal sign-in — shared by the Admin, Agent and Operator login pages.

   Rebuilt from the Figma design rather than its HTML export: that export
   contains no form controls at all (the fields are empty <div>s and the button
   is a <span>), positions everything at fixed pixel offsets, and references
   twelve images that are not in the archive. The palette, typography and
   layout here follow the design; the markup is real, focusable and responsive.
   ========================================================================== */

:root {
  --ink:      #114151;
  --ink-2:    #1C5262;
  --paper:    #FAFBFD;
  --white:    #FFFFFF;
  --muted:    #5A6B73;
  --line:     #C9D6DC;
  --danger:   #C44747;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  overflow-x: hidden;
}

/* Oversized watermark square from the design, held well behind the card. */
body::before {
  content: "";
  position: fixed;
  width: 410px; height: 410px;
  background: var(--ink);
  opacity: .10;
  top: 44px; right: -90px;
  z-index: 0;
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  background: var(--white);
  border-radius: 10px;
  padding: 0 0 28px;
  box-shadow: 0 10px 34px rgba(17, 65, 81, .12);
  overflow: hidden;
}

/* Role badge — the only thing that differs between the three portals. */
.role-tag {
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  padding: 13px 16px;
}

.brand {
  display: flex;
  justify-content: center;
  padding: 26px 0 6px;
}
.brand img { width: 78px; height: 78px; }

.portal-tag {
  text-align: center;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 18px;
}

form { padding: 0 28px; }

.error {
  display: none;
  background: rgba(196, 71, 71, .1);
  border: 1px solid rgba(196, 71, 71, .35);
  color: var(--danger);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12.5px;
  margin-bottom: 14px;
}
.error.show { display: block; }

.field { position: relative; margin-bottom: 12px; }
.field svg {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.6;
  pointer-events: none;
}
.field input {
  width: 100%;
  height: 45px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
}
.field input::placeholder { color: var(--muted); font-weight: 300; }
.field input:focus {
  outline: none;
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px rgba(17, 65, 81, .12);
}

button[type="submit"] {
  width: 100%;
  height: 45px;
  margin-top: 10px;
  background: var(--ink);
  color: var(--white);
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 4px rgba(0, 0, 0, .18);
}
button[type="submit"]:hover:not(:disabled) { background: var(--ink-2); }
button[type="submit"]:disabled { opacity: .65; cursor: default; }

.forgot {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.forgot:hover { text-decoration: underline; }

.foot, .hint {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  line-height: 1.5;
}
.foot a { color: var(--ink); font-weight: 600; }

@media (max-width: 420px) {
  body::before { width: 260px; height: 260px; right: -70px; }
  .login-card { max-width: 100%; }
}
