/* ═══════════════════════════════════════════
   login.css — NSIGNIS Trust Portal
   Clean white · dark ink · no bg visuals
═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'DM Mono', monospace;
  background: #ffffff;
  color: #0d0f1a;
}

.portal {
  display: grid;
  grid-template-columns: 1fr 500px;
  min-height: 100vh;
}

/* ── Left panel ── */
.portal__left {
  background: #ffffff;
  border-right: 1px solid #e4e5ea;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand__logo { width: 26px; height: 26px; border-radius: 4px; object-fit: cover; flex-shrink: 0; display: inline-block; vertical-align: middle; }

.brand__name { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; letter-spacing: 0.1em; color: #0d0f1a; line-height: 1; vertical-align: middle; }

.portal__left-body { max-width: 440px; }

.portal__kicker {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-ink);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal__kicker::before {
  content: '';
  width: 28px; height: 1.5px;
  background: #000000;
  flex-shrink: 0;
}

.portal__headline {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 6vw, 5.8rem);
  line-height: 0.88;
  color: var(--text-red);
  margin-bottom: 28px;
}

.portal__headline em { font-style: normal; color: var(--text-silver); }

.portal__desc {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.9;
  color: rgba(13,15,26,0.55);
  max-width: 380px;
  margin-bottom: 48px;
}

.portal__stats {
  display: flex;
  border-top: 1px solid #e4e5ea;
  border-bottom: 1px solid #e4e5ea;
  margin-bottom: 40px;
}

.portal__stat {
  flex: 1;
  padding: 20px 24px 20px 0;
  border-right: 1px solid #e4e5ea;
}

.portal__stat:last-child { border-right: none; padding-left: 24px; }
.portal__stat:not(:last-child):not(:first-child) { padding: 20px 24px; }

.portal__stat-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: #0d0f1a;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 4px;
}

.portal__stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.54rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(13,15,26,0.4);
}

.portal__status { display: flex; gap: 24px; flex-wrap: wrap; }

.portal__status-item { display: flex; align-items: center; gap: 7px; }

.portal__status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #16a34a;
  animation: pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.2;} }

.portal__status-text {
  font-family: 'DM Mono', monospace;
  font-size: 0.57rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(13,15,26,0.42);
}

/* ── Right panel ── */
.portal__right {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 52px;
  position: relative;
  overflow-y: auto;
}

.portal__right::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #A8240D 0%, #A8240D 100%);
}

.form-head { margin-bottom: 36px; }

.form-head__eyebrow {
  font-family: var(--font-display);
  font-size: 0.57rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-ink);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-head__eyebrow::before {
  content: '';
  width: 18px; height: 1.5px;
  background: #000000;
  flex-shrink: 0;
}

.form-head__title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 0.92;
  color: var(--text-red);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.form-head__sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: rgba(13,15,26,0.42);
}

.field { margin-bottom: 18px; }

.field__label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.57rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #444658;
  margin-bottom: 7px;
  font-weight: 500;
}

.field__input {
  display: block;
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #d1d2db;
  border-radius: 4px;
  padding: 11px 14px;
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: #0d0f1a;
  -webkit-text-fill-color: #0d0f1a;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  letter-spacing: 0.03em;
}

.field__input::placeholder {
  color: rgba(13,15,26,0.25);
  -webkit-text-fill-color: rgba(13,15,26,0.25);
}

.field__input:hover  { border-color: #9ea0b5; }

.field__input:focus {
  border-color: #1a6cf5;
  box-shadow: 0 0 0 3px rgba(26,108,245,0.12);
}

.field__input.is-valid { border-color: rgba(22,163,74,0.6); }

.field__mobile {
  display: grid;
  grid-template-columns: 88px 82px 1fr;
  gap: 8px;
}

.field__select {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #d1d2db;
  border-radius: 4px;
  padding: 11px 24px 11px 10px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: #0d0f1a;
  -webkit-text-fill-color: #0d0f1a;
  outline: none;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230d0f1a' stroke-opacity='.4' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.field__select:hover { border-color: #9ea0b5; }
.field__select:focus { border-color: #1a6cf5; box-shadow: 0 0 0 3px rgba(26,108,245,0.12); }

.field__code {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 10px;
}

.field__code-input {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #d1d2db;
  border-radius: 4px;
  padding: 14px 0;
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  color: #0d0f1a;
  -webkit-text-fill-color: #0d0f1a;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.field__code-input::placeholder {
  color: rgba(13,15,26,0.22);
  -webkit-text-fill-color: rgba(13,15,26,0.22);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  font-weight: 400;
}

.field__code-input:hover { border-color: #9ea0b5; }

.field__code-input:focus {
  border-color: #1a6cf5;
  box-shadow: 0 0 0 3px rgba(26,108,245,0.12);
}

.field__code-input.is-filled {
  border-color: rgba(22,163,74,0.55);
  background: rgba(22,163,74,0.03);
}

.field__hint {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: rgba(13,15,26,0.4);
}

.field__hint-example {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: rgba(13,15,26,0.62);
  background: #f4f5f8;
  border: 1px solid #d1d2db;
  padding: 2px 9px;
  border-radius: 3px;
}

.form-submit {
  width: 100%;
  background: var(--bg-red);
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 14px 24px;
  margin-top: 24px;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 4px 16px rgba(26,108,245,0.22);
}

.form-submit::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.form-submit:hover {
  background: #1558cc;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(26,108,245,0.3);
}

.form-submit:hover::after { transform: translateX(100%); }
.form-submit:hover .submit-arrow { transform: translateX(4px); }
.form-submit:active { transform: translateY(0); }
.submit-arrow { transition: transform 0.2s; }

.form-security {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(22,163,74,0.25);
  border-radius: 4px;
  background: rgba(22,163,74,0.04);
}

.form-security__icon { color: #16a34a; flex-shrink: 0; }

.form-security__text {
  font-family: 'DM Mono', monospace;
  font-size: 0.54rem;
  letter-spacing: 0.07em;
  color: #15803d;
  line-height: 1.5;
}

.form-divider {
  border: none;
  border-top: 1px solid #e4e5ea;
  margin: 22px 0 0;
}

.form-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: rgba(13,15,26,0.5);
}

.form-footer__icon { color: rgba(13,15,26,0.28); }

.form-footer a {
  color: #1a6cf5;
  text-decoration: none;
  border-bottom: 1px solid rgba(26,108,245,0.28);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.form-footer a:hover { color: #1558cc; border-color: #1558cc; }

/* Responsive */
@media (max-width: 960px) {
  .portal { grid-template-columns: 1fr; }
  .portal__left { border-right: none; border-bottom: 1px solid #e4e5ea; padding: 40px 36px; }
  .portal__desc, .portal__stats { display: none; }
  .portal__right { padding: 48px 36px 56px; }
}

@media (max-width: 560px) {
  .portal__left { padding: 32px 24px; }
  .portal__right { padding: 40px 24px 52px; }
  .portal__headline { font-size: 3rem; }
  .field__mobile { grid-template-columns: 76px 76px 1fr; gap: 6px; }
  .form-head__title { font-size: 2rem; }
  .field__code { gap: 8px; }
}

/* ── Validation states ── */
.field-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1) !important;
}

.field-msg {
  margin-top: 5px;
  font-family: 'DM Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.07em;
  line-height: 1.4;
}

.field-msg--error {
  color: #b91c1c;
  display: flex;
  align-items: center;
  gap: 5px;
}

.field-msg--error::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 0.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Consent checkboxes ── */
.consent-block {
  margin-top: 24px;
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.consent-block__heading {
  font-family: 'DM Mono', monospace;
  font-size: 0.57rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #444658;
  margin-bottom: 4px;
  font-weight: 500;
}

/* ── Item shell ── */
.consent-item {
  border: 1.5px solid #d1d2db;
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.18s, background 0.18s;
}

.consent-item:hover { border-color: #9ea0b5; }

/* ── Header row (always visible, clickable) ── */
.consent-item__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
}

.consent-item__check-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

.consent-item__check {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.consent-item__box {
  width: 17px;
  height: 17px;
  min-width: 17px;
  border: 1.5px solid #d1d2db;
  border-radius: 3px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s, background 0.18s;
  flex-shrink: 0;
}

.consent-item__box::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg) translate(-1px,-1px);
  opacity: 0;
  transition: opacity 0.12s;
}

.consent-item__check:checked ~ .consent-item__box {
  background: #1a6cf5;
  border-color: #1a6cf5;
}

.consent-item__check:checked ~ .consent-item__box::after { opacity: 1; }

.consent-item__title {
  flex: 1;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: #0d0f1a;
  font-weight: 500;
}

.consent-item__chevron {
  flex-shrink: 0;
  color: rgba(13,15,26,0.3);
  transition: transform 0.22s ease;
}

/* ── Expand: open state ── */
.consent-item--open .consent-item__chevron { transform: rotate(180deg); }
.consent-item--open { border-color: #9ea0b5; }
.consent-item--open:has(.consent-item__check:checked) {
  border-color: rgba(26,108,245,0.45);
  background: rgba(26,108,245,0.02);
}

/* ── Collapsible body ── */
.consent-item__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, padding 0.22s ease;
  padding: 0 14px 0 41px;
}

.consent-item--open .consent-item__body {
  max-height: 120px;
  padding: 0 14px 12px 41px;
}

.consent-item__text {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  line-height: 1.75;
  color: rgba(13,15,26,0.58);
}

.consent-item__text a {
  color: #1a6cf5;
  text-decoration: none;
  border-bottom: 1px solid rgba(26,108,245,0.28);
  transition: color 0.15s;
}

.consent-item__text a:hover { color: #1558cc; }

/* ── Checked but collapsed: show ticked border ── */
.consent-item:has(.consent-item__check:checked) {
  border-color: rgba(26,108,245,0.4);
}

/* ── Error state ── */
.consent-item--error {
  border-color: #dc2626 !important;
  background: rgba(220,38,38,0.03) !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
  animation: shake 0.35s ease;
}

.consent-item--error .consent-item__box { border-color: #dc2626; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  40%      { transform: translateX(5px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}