/* ============================================================
   Staff sign-in page. Reuses the site tokens from site.css; adds
   only what the login layout needs. Dark, rectangular, CNPC red 
   the same language as the apps it leads into.
   ============================================================ */

/* The `hidden` attribute must win over the display rules below, or the
   already-signed-in block and the sign-in form show at the same time. */
[hidden] { display: none !important; }

.signin-body {
  background: var(--ink);
  color: #fff;
  min-height: 100vh;
}

.signin {
  min-height: 100vh;
  display: flex;
  align-items: center;
  /* Top padding clears the fixed nav (var(--nav-h)) so the eyebrow is not
     jammed under the banner, plus breathing room. */
  padding: calc(var(--nav-h) + clamp(24px, 4vw, 48px)) 0 clamp(40px, 6vw, 72px);
}

.signin__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: 100%;
}

/* ---- the form side ---- */
.signin__panel { max-width: 460px }

.signin__panel h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.02;
  margin: 10px 0 12px;
}

.signin__lede {
  color: var(--muted-dark);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 42ch;
  margin-bottom: 28px;
}

.signin__form { display: grid; gap: 16px }

.signin__field { display: grid; gap: 7px }
.signin__field > span {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted-dark);
}

.signin__field input {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  color: #fff;
  font-size: 16px; /* 16px keeps iOS from zooming on focus */
  font-family: inherit;
  padding: 14px 15px;
  transition: border-color .2s var(--ease);
}
.signin__field input::placeholder { color: #5A6472 }
.signin__field input:focus {
  outline: none;
  border-color: var(--accent);
}
.signin__field input:disabled { opacity: .55 }

.signin__pwwrap { position: relative; display: block }
.signin__pwwrap input { padding-right: 66px }
.signin__peek {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--muted-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 8px 10px;
  cursor: pointer;
}
.signin__peek:hover { color: #fff }

.signin__error {
  margin: 0;
  padding: 11px 13px;
  background: rgba(214, 0, 28, .12);
  border-left: 3px solid var(--accent);
  color: #FF8A93;
  font-size: 13.5px;
  line-height: 1.5;
}

.signin__btn {
  position: relative;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 15px;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.signin__btn:hover { background: #B80018 }
.signin__btn:disabled { cursor: default; opacity: .9 }

.signin__btn[aria-busy="true"] .signin__btn-label { visibility: hidden }
.signin__spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 17px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: signin-spin .7s linear infinite;
}
.signin__btn[aria-busy="true"] .signin__spinner { display: block }
@keyframes signin-spin { to { transform: rotate(360deg) } }

.signin__resume { display: grid; gap: 14px }
.signin__resume-who {
  margin: 0;
  font-size: 15px;
  color: #fff;
  line-height: 1.5;
}
.signin__linkbtn {
  background: transparent;
  border: 0;
  color: var(--muted-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 4px;
  justify-self: start;
}
.signin__linkbtn:hover { color: #fff }

.signin__help {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line-dark);
  color: var(--muted-dark);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---- the explainer side ---- */
.signin__aside {
  border: 1px solid var(--line-dark);
  background: var(--ink-2);
  padding: clamp(22px, 3vw, 34px);
}
.signin__aside-head {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 18px;
}
.signin__roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line-dark) }
.signin__role {
  background: var(--ink-2);
  display: grid;
  gap: 4px;
  padding: 16px 2px;
}
.signin__role-tag {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted-dark);
}
.signin__role strong { font-size: 19px; color: #fff }
.signin__role span:last-child {
  color: var(--muted-dark);
  font-size: 13.5px;
  line-height: 1.55;
}
.signin__aside-note {
  margin: 18px 0 0;
  color: #5A6472;
  font-size: 12px;
  line-height: 1.5;
}

/* ---- responsive ---- */
@media (max-width: 860px) {
  .signin__grid { grid-template-columns: 1fr; gap: 34px }
  .signin__panel { max-width: none }
  /* Form first on a phone; the explainer is reassurance, not a gate. */
  .signin__aside { order: 2 }
}
