/* ============================================================
   Sign-In Gate styles
   ============================================================ */

.signin-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg-app);
}

.signin-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
  padding: 60px 32px 80px;
  align-items: start;
  width: 100%;
}

.signin-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 44px 44px 40px;
  box-shadow: var(--shadow-2);
  position: relative;
}
.signin-card-mark {
  position: absolute;
  top: 28px; right: 28px;
  width: 56px; height: 56px;
  object-fit: contain;
  display: block;
}
@media (max-width: 840px) {
  .signin-card-mark { top: 20px; right: 20px; width: 44px; height: 44px; }
}

.signin-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive-deep);
  margin-bottom: 14px;
}

.signin-title {
  font-family: var(--font-display);
  font-size: 40px; font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0 0 12px;
  color: var(--navy);
}

.signin-sub {
  color: var(--mute);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 28px;
  max-width: 440px;
}
.signin-sub strong { color: var(--navy); font-weight: 700; }

.signin-form {
  display: flex; flex-direction: column;
  gap: 18px;
}

.signin-btn {
  justify-content: center;
  padding: 14px 20px;
  font-size: 14px;
  width: 100%;
}
.signin-btn:disabled { opacity: 0.5; cursor: wait; }

.signin-error {
  padding: 10px 14px;
  background: rgba(166,65,47,.08);
  border-left: 3px solid var(--magenta);
  border-radius: var(--r-sm);
  color: var(--magenta);
  font-size: 13px; font-weight: 600;
}

.signin-help {
  font-size: 13px; color: var(--mute);
  text-align: center;
  display: flex; justify-content: center; align-items: center;
  gap: 8px; flex-wrap: wrap;
}
.signin-help a, .link-btn {
  color: var(--accent); font-weight: 700;
  background: none; border: 0; padding: 0;
  font-size: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover, .signin-help a:hover { color: var(--navy); }
.link-btn:disabled { opacity: 0.5; cursor: wait; text-decoration: none; }
.dot-sep { color: var(--line-strong); }

.signin-tip {
  margin-top: 4px;
  padding: 10px 14px;
  background: var(--off-white);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--mute);
  text-align: center;
}
.signin-tip code {
  font-family: ui-monospace, monospace;
  background: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.1em;
}

/* OTP inputs */
.otp-row {
  display: flex; gap: 8px;
  justify-content: center;
}
.otp-input {
  width: 52px; height: 64px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: white;
  text-align: center;
  font-family: ui-monospace, monospace;
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  outline: none;
  transition: all var(--t-fast) var(--ease);
}
.otp-input:hover { border-color: var(--line-strong); }
.otp-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27,48,88,.14);
}
.otp-input.err {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(166,65,47,.14);
}

/* Right-column reassurance list */
.signin-meta {
  display: flex; flex-direction: column;
  gap: 14px;
  padding-top: 44px;
}

.signin-meta-item {
  display: flex; gap: 14px;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.signin-meta-item strong {
  color: var(--navy);
  font-weight: 800;
  display: block;
  margin-bottom: 2px;
}

.signin-meta-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

/* Header — signed-in state */
.ff-header-right {
  display: flex; align-items: center; gap: 18px;
}
.ff-header-user {
  display: flex; flex-direction: column;
  gap: 2px;
  text-align: right;
  line-height: 1.1;
}
.ff-header-user-label {
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.ff-header-user-email {
  font-size: 12px;
  font-weight: 700;
  color: white;
}
.ff-header-signout {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* Sits on the deep-olive header bar, so it takes the light amber (5.3:1). */
  color: var(--amber-light);
  padding: 8px 12px;
  border: 1.5px solid rgba(234,190,85,.45);
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
}
.ff-header-signout:hover {
  background: var(--amber-light);
  color: var(--charcoal);
  border-color: var(--amber-light);
}

@media (max-width: 840px) {
  .signin-wrap { grid-template-columns: 1fr; padding: 28px 16px 60px; }
  .signin-card { padding: 32px 24px; }
  .signin-title { font-size: 28px; }
  .signin-meta { padding-top: 0; }
  .otp-input { width: 44px; height: 56px; font-size: 22px; }
  .ff-header-user { display: none; }
}
