/* The premium login layer composes the CNET brand without changing authentication behavior. */
#login-page {
  --login-blue: #087fbe;
  --login-blue-deep: #07527f;
  --login-navy: #0d2f49;
  --login-green: #079b45;
  --login-green-bright: #19b85d;
  --login-ink: #102f47;
  --login-muted: #657d90;
  --login-border: #d8e5ed;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(12px, 2.2vw, 28px);
  overflow: hidden;
  background: radial-gradient(circle at 7% 4%, rgba(7, 155, 69, 0.12), transparent 24%), radial-gradient(circle at 94% 94%, rgba(8, 127, 190, 0.16), transparent 28%), #edf5f8;
}

/* The shell balances a confident brand statement with a focused access card. */
#login-page .login-shell {
  width: min(1440px, 100%);
  min-height: calc(100vh - clamp(24px, 4.4vw, 56px));
  min-height: calc(100dvh - clamp(24px, 4.4vw, 56px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(400px, 0.82fr);
  overflow: hidden;
  border: 1px solid rgba(202, 220, 230, 0.84);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 28px 80px rgba(13, 47, 73, 0.14);
}

/* The stage uses a subtle technical grid and ambient brand lighting. */
#login-page .login-stage {
  position: relative;
  isolation: isolate;
  min-height: 620px;
  padding: clamp(32px, 5vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(145deg, #0b2d47 0%, #075b88 56%, #087fbe 100%);
  background-size: 42px 42px, 42px 42px, auto;
  box-shadow: none;
}

#login-page .login-stage::before { display: none; }
#login-page .login-stage::after { content: ""; position: absolute; inset: auto -15% -28% 18%; width: auto; height: 55%; z-index: -1; border-radius: 50%; background: rgba(7, 155, 69, 0.25); filter: blur(70px); }
.login-stage__ambient { position: absolute; z-index: -1; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; }
.login-stage__ambient--one { width: 460px; height: 460px; top: -250px; right: -170px; }
.login-stage__ambient--two { width: 300px; height: 300px; top: -145px; right: -92px; }

.login-stage__brand { display: inline-flex; align-items: center; gap: 11px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.login-stage__brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.38); border-radius: 11px; color: #fff; background: var(--login-green); box-shadow: inset 0 1px rgba(255, 255, 255, 0.25); }
.login-stage__message { max-width: 690px; margin: auto 0 clamp(34px, 5vh, 64px); }
.login-stage__kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: rgba(255, 255, 255, 0.72); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.login-stage__kicker span,
.login-stage__live i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--login-green-bright); box-shadow: 0 0 0 5px rgba(25, 184, 93, 0.13); }

#login-page .login-stage__title { max-width: 11ch; margin: 0; color: #fff; font-size: clamp(3rem, 5.4vw, 5.8rem); font-weight: 650; letter-spacing: -0.065em; line-height: 0.92; text-wrap: balance; }
#login-page .login-stage__copy { max-width: 54ch; margin: 24px 0 0; color: rgba(237, 248, 255, 0.76); font-size: clamp(0.98rem, 1.2vw, 1.12rem); line-height: 1.7; }

/* The operations preview communicates product value without external imagery. */
.login-stage__dashboard { width: min(680px, 100%); padding: 20px; border: 1px solid rgba(255, 255, 255, 0.17); border-radius: 24px; background: rgba(4, 35, 57, 0.46); box-shadow: 0 22px 54px rgba(1, 24, 39, 0.24), inset 0 1px rgba(255, 255, 255, 0.08); backdrop-filter: blur(14px); }
.login-stage__dashboard-head,
.login-stage__dashboard-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.login-stage__dashboard-head > div { display: grid; gap: 5px; }
.login-stage__dashboard-head strong { font-size: 1rem; font-weight: 650; }
.login-stage__panel-label { color: rgba(255, 255, 255, 0.55); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.login-stage__live { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.78); font-size: 0.74rem; }
.login-stage__live i { width: 6px; height: 6px; flex-basis: 6px; box-shadow: 0 0 0 4px rgba(25, 184, 93, 0.12); }
.login-stage__metrics { margin: 18px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.login-stage__metric { min-width: 0; padding: 14px; display: flex; align-items: center; gap: 11px; border-radius: 16px; background: rgba(255, 255, 255, 0.075); }
.login-stage__metric-icon { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 10px; font-weight: 800; }
.login-stage__metric-icon--blue { color: #8ed8ff; background: rgba(8, 127, 190, 0.24); }
.login-stage__metric-icon--green { color: #77e3a3; background: rgba(7, 155, 69, 0.24); }
.login-stage__metric-icon--aqua { color: #a8ebdf; background: rgba(74, 200, 180, 0.18); }
.login-stage__metric div { min-width: 0; display: grid; gap: 3px; }
.login-stage__metric strong { overflow: hidden; font-size: 0.78rem; text-overflow: ellipsis; }
.login-stage__metric small { overflow: hidden; color: rgba(255, 255, 255, 0.5); font-size: 0.64rem; text-overflow: ellipsis; white-space: nowrap; }
.login-stage__progress { height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.login-stage__progress span { width: 72%; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--login-green-bright), #70dfbc); }
.login-stage__dashboard-foot { margin-top: 10px; color: rgba(255, 255, 255, 0.47); font-size: 0.62rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; }

/* The access column centers a restrained card around the existing form. */
.login-access { position: relative; padding: clamp(26px, 4vw, 58px); display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 100% 0%, rgba(8, 127, 190, 0.1), transparent 31%), linear-gradient(155deg, #f8fbfc, #eef5f7); }
#login-page .login-card { width: min(100%, 480px); padding: clamp(26px, 3.2vw, 44px); display: block; overflow: visible; border: 1px solid rgba(210, 226, 234, 0.9); border-radius: 28px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 24px 65px rgba(19, 61, 88, 0.12), 0 2px 6px rgba(19, 61, 88, 0.04); }
#login-page .login-card__header { margin-bottom: 25px; }
#login-page #cnet-login-logo { width: min(220px, 66%); max-width: 220px; max-height: none; display: block; margin: 0 0 30px; object-fit: contain; }
.login-card__eyebrow { color: var(--login-green); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
#login-page .login-card__title { margin: 9px 0 0; color: var(--login-ink); font-size: clamp(2rem, 3vw, 2.65rem); font-weight: 670; letter-spacing: -0.045em; line-height: 1; }
#login-page .login-card__subtitle { max-width: 37ch; margin: 13px 0 0; color: var(--login-muted); font-size: 0.92rem; line-height: 1.6; }

#login-page #login-form { display: flex; flex-direction: column; gap: 16px; }
#login-page #login-fields { display: grid; gap: 17px; }
#login-page .field { display: grid; gap: 8px; }
.field__topline { min-height: 20px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#login-page .field label { color: #27475e; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.035em; }
.field__error { color: #bc3c2d; font-size: 0.72rem; font-weight: 650; }
#login-page .field input,
#login-page .field select { width: 100%; min-height: 54px; padding: 14px 16px; border: 1px solid var(--login-border); border-radius: 14px; outline: none; color: var(--login-ink); background: #f9fcfd; font: inherit; font-size: 0.94rem; transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease; }
#login-page .field input::placeholder { color: #9aadb9; }
#login-page .field input:hover { border-color: #b9d1df; background: #fff; }
#login-page .field input:focus,
#login-page .field select:focus { border-color: var(--login-blue) !important; background: #fff; box-shadow: 0 0 0 4px rgba(8, 127, 190, 0.11) !important; transform: none; }

#login-page .btn-primary { width: 100%; min-height: 54px; padding: 13px 17px; display: flex; align-items: center; justify-content: center; gap: 14px; border: 1px solid var(--login-blue); border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--login-blue), #0871aa); font: inherit; font-size: 0.9rem; font-weight: 750; text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 10px 24px rgba(8, 127, 190, 0.2); transition: transform 0.16s ease, box-shadow 0.18s ease, background-color 0.18s ease; }
#login-page .btn-primary:hover { filter: none; transform: translateY(-1px); box-shadow: 0 14px 28px rgba(8, 127, 190, 0.25); }
#login-page .btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible,
.login-forgot-link:focus-visible { outline: 3px solid rgba(7, 155, 69, 0.26); outline-offset: 3px; }
#login-page .btn-primary--secondary { border-color: #cfe0e8; color: var(--login-blue-deep); background: #f4f9fb; box-shadow: none; }
#login-page .btn-primary--secondary:hover { border-color: #a9cbdc; background: #fff; box-shadow: 0 9px 22px rgba(20, 69, 99, 0.08); }
.login-divider { display: flex; align-items: center; gap: 13px; color: #97a8b3; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.login-divider::before,
.login-divider::after { content: ""; height: 1px; flex: 1; background: #e2ebef; }
#login-page .login-forgot-link { align-self: center; color: #607c8d; font-size: 0.78rem; font-weight: 650; text-decoration: none; }
#login-page .login-forgot-link:hover { color: var(--login-blue); text-decoration: underline; text-underline-offset: 3px; }
#login-page .login-alert { margin-bottom: 18px; padding: 12px 14px; border: 1px solid rgba(8, 127, 190, 0.17); border-radius: 13px; color: #245872; background: #edf8fc; font-size: 0.82rem; line-height: 1.5; }
#login-page .login-alert--error { border-color: rgba(194, 60, 43, 0.2); color: #a93428; background: #fff3f1; }
#login-page .login-card__footer { min-height: 0; margin-top: 25px; padding-top: 20px; display: flex; align-items: center; justify-content: center; gap: 14px; border-top: 1px solid #e3ecef; color: #91a1aa; font-size: 0.65rem; font-weight: 650; letter-spacing: 0.04em; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  .login-stage__brand, .login-stage__message, .login-stage__dashboard, #login-page .login-card { animation: loginPremiumReveal 0.65s ease both; }
  .login-stage__message { animation-delay: 0.08s; }
  .login-stage__dashboard { animation-delay: 0.16s; }
  #login-page .login-card { animation-delay: 0.12s; }
}

@keyframes loginPremiumReveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* Short desktop viewports compress rhythm while preserving the two-column experience. */
@media (min-width: 821px) and (max-height: 850px) {
  #login-page .login-stage { padding: clamp(28px, 3.2vw, 44px); }
  .login-stage__message { margin: auto 0 26px; }
  #login-page .login-stage__title { font-size: clamp(2.8rem, 4.8vw, 4.7rem); }
  #login-page .login-stage__copy { margin-top: 17px; line-height: 1.55; }
  .login-stage__dashboard { padding: 15px 17px; }
  .login-stage__metrics { margin: 12px 0; }
  .login-stage__metric { padding: 10px; }
  .login-access { padding: 38px; }
  #login-page .login-card { padding: 20px 34px; }
  #login-page #cnet-login-logo { width: min(180px, 58%); margin-bottom: 14px; }
  #login-page .login-card__header { margin-bottom: 17px; }
  #login-page .login-card__title { font-size: 2.15rem; }
  #login-page .login-card__subtitle { margin-top: 9px; line-height: 1.45; }
  #login-page #login-form { gap: 12px; }
  #login-page #login-fields { gap: 12px; }
  #login-page .field { gap: 5px; }
  #login-page .field input { min-height: 48px; padding: 11px 14px; }
  #login-page .btn-primary { min-height: 48px; padding: 10px 15px; }
  #login-page .login-card__footer { margin-top: 12px; padding-top: 11px; }
}

@media (max-width: 1080px) {
  #login-page .login-shell { grid-template-columns: minmax(0, 0.95fr) minmax(390px, 1.05fr); }
  #login-page .login-stage { padding: 38px; }
  #login-page .login-stage__title { font-size: clamp(2.8rem, 5vw, 4.4rem); }
  .login-stage__metrics { grid-template-columns: 1fr; }
  .login-stage__metric:nth-child(3) { display: none; }
}

@media (max-width: 820px) {
  #login-page { padding: 0; overflow: auto; }
  #login-page .login-shell { min-height: 100dvh; grid-template-columns: 1fr; border: 0; border-radius: 0; box-shadow: none; }
  #login-page .login-stage { min-height: 300px; padding: 30px; order: 2; }
  .login-stage__brand, .login-stage__dashboard { display: none; }
  .login-stage__message { margin: auto 0; }
  #login-page .login-stage__title { max-width: 13ch; font-size: clamp(2.5rem, 9vw, 4.2rem); }
  .login-access { min-height: 680px; padding: 64px 24px 36px; order: 1; }
}

@media (max-width: 520px) {
  .login-access { min-height: 100dvh; padding: 48px 16px 22px; align-items: center; }
  #login-page .login-card { padding: 26px 22px; border-radius: 22px; }
  #login-page #cnet-login-logo { width: min(190px, 68%); margin-bottom: 25px; }
  #login-page .login-card__footer { align-items: flex-start; flex-direction: column; }
  #login-page .login-stage { display: none; }
}
