/* CLAN sign-in. Desktop only. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }

.page {
  position: relative;
  overflow: hidden;
  display: flex;
  width: 100%;
  min-width: 1000px;
  min-height: 100vh;
  background: linear-gradient(90deg, #fdf7ea 0%, #fcf5e8 22%, #dce6f4 46%, #c3d5fb 56%, #3b68ff 68%, #2a55f0 76%, #12297f 90%, #0a1a4a 100%);
}

/* decorative bars (original) */
.bar { position: absolute; bottom: 0; }
.bar-1 { right: 7%;  width: 26%;  height: 52%; background: rgba(20,130,170,.55); border-radius: 18px 18px 0 0; }
.bar-2 { right: 22%; width: 6%;   height: 48%; background: rgba(30,70,190,.55); }
.bar-3 { right: 10%; width: 2.5%; height: 52%; background: rgba(20,50,150,.6); }

/* left side */
.left {
  position: relative;
  flex: 0 0 48%;
  display: flex;
  flex-direction: column;
  padding: 28px 40px 28px clamp(32px, 7vw, 110px);
}

/* logo block (new: no pill) */
.brand { align-self: flex-start; display: flex; align-items: center; gap: 12px; }
.logo {
  width: 42px; height: 42px; border-radius: 10px; background: #1f45b8;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 9px;
}
.brand-name { font-size: 20px; font-weight: 800; color: #0b1840; line-height: 1.1; }
.brand-sub  { font-size: 13px; color: #2f4a9e; margin-top: 2px; }

/* headline (new: real italic, left-aligned) */
h1 {
  margin: auto 0 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(38px, 4.2vw, 54px);
  line-height: 1.02;
  padding-bottom: .08em;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: #0b1840;
}
h1 .line1 { display: block; }
h1 .line2 { display: block; font-style: italic; color: #1f45b8; text-wrap: balance; }

/* paragraph (new: sans) */
.desc { margin: 16px 0 0; max-width: 460px; font-size: 17px; line-height: 1.6; color: #27355f; }

/* test card (new: code + segmented progress) */
.test-card {
  margin-top: 28px;
  margin-bottom: auto;
  width: 100%;
  max-width: 460px;
  padding: 16px 20px 14px;
  background: #0d1f4d;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(13,31,77,.25);
}
.test-row {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
}
.test-row .file { color: #fff; }
.test-row .status { color: #22d3ee; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22d3ee; }
.test-code { margin-top: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.7; color: #9fb4ee; white-space: pre; }
.progress { margin-top: 12px; display: flex; gap: 6px; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: #22d3ee; }

/* right side */
.right {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 24px clamp(24px, 3vw, 40px) 24px 24px;
}

/* form card and fields (original) */
.card {
  width: 100%; max-width: 580px;
  padding: 30px 44px 26px;
  background: #EAF1FC;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(8,20,80,.3);
}
.card h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -1px; color: #0b1840; }
.card .lead { margin: 6px 0 0; font-size: 14.5px; line-height: 1.4; color: #2340b5; }
label { display: block; margin-top: 18px; font-size: 14px; font-weight: 700; color: #0b1840; }
label.second { margin-top: 14px; }
input {
  margin-top: 6px; width: 100%; height: 46px; padding: 0 14px;
  font: 500 15px 'Plus Jakarta Sans', sans-serif; color: #0b1840;
  background: #fff; border: 1px solid #b9cbe8; border-radius: 10px; outline: none;
}
input::placeholder { color: #6b7280; }
input:focus { border-color: #1f45b8; box-shadow: 0 0 0 3px rgba(31,69,184,.2); }

/* show button (new: inside the field) */
.pw-row { position: relative; margin-top: 6px; }
.pw-row input { margin-top: 0; padding-right: 70px; }
.show-btn {
  position: absolute; right: 5px; top: 5px; height: 36px; padding: 0 12px;
  font: 700 14px 'Plus Jakarta Sans', sans-serif; color: #1f45b8;
  background: transparent; border: none; border-radius: 8px; cursor: pointer;
}
.show-btn:hover { background: #eef2fd; }
.show-btn:focus-visible { outline: 3px solid rgba(31,69,184,.35); outline-offset: 1px; }

.caps-warn { margin-top: 8px; font-size: 13px; font-weight: 600; color: #8a5300; }
.caps-warn[hidden] { display: none; }

.signin-btn {
  margin-top: 20px; width: 100%; height: 48px;
  font: 700 16px 'Plus Jakarta Sans', sans-serif; color: #fff;
  background: #1f45b8; border: none; border-radius: 10px;
  box-shadow: 0 8px 18px rgba(31,69,184,.3); cursor: pointer;
  transition: background .15s, transform .15s;
}
.signin-btn:hover { background: #193a9c; transform: translateY(-1px); }
.signin-btn:active { transform: translateY(0); }
.signin-btn:focus-visible { outline: 3px solid rgba(31,69,184,.4); outline-offset: 2px; }
.help { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: #2340b5; }

/* dynamic states (errors / flash messages) */
.msg { margin: 18px 0 0; padding: 11px 14px; border-radius: 10px; font-size: 14px; line-height: 1.45; font-weight: 600; }
.msg-error { background: #fbeaea; border: 1px solid #f0c8c6; color: #7b1c16; }
.msg-success { background: #e1f1ee; border: 1px solid #b9dcd6; color: #0f5e63; }
.msg-info { background: #e8f0fd; border: 1px solid #c3d5fb; color: #1e3fae; }
.field-error { margin-top: 7px; font-size: 13.5px; font-weight: 600; color: #b42318; }
input.is-invalid { border-color: #b42318; }
input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(180,35,24,.18); }
.signin-btn:disabled { opacity: .7; cursor: wait; transform: none; }
.spinner-border { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .signin-btn { transition: none; }
  .spinner-border { animation-duration: 1.6s; }
}
