/* VeriCase near-brand phase-one app surfaces. Loaded after brand-styles/design-system. */

html:has(body.near-brand-auth) {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.near-brand-auth {
  min-height: 100dvh;
  margin: 0;
  color: var(--color-ink);
  background: var(--color-ivory);
  font-family: var(--font-sans);
  overflow-x: hidden;
  overflow-y: auto;
}

.near-brand-auth .auth-shell {
  min-height: 100dvh;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 64px) clamp(24px, 6vw, 128px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  align-items: center;
  gap: clamp(44px, 7vw, 128px);
}

.near-brand-auth .auth-brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(620px, calc(100dvh - 96px));
  padding: 0 clamp(32px, 5vw, 96px) 0 0;
  border-right: 1px solid var(--color-line);
  background: transparent !important;
  background-image: none !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.near-brand-auth .auth-wordmark,
.near-brand-page-wordmark {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0;
}

.near-brand-auth .auth-headline {
  max-width: 760px;
  margin: 24px 0 0;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(3rem, 5vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.near-brand-auth .auth-copy {
  max-width: 660px;
  margin: clamp(24px, 4vh, 40px) 0 0;
  padding-top: clamp(20px, 3vh, 32px);
  border-top: 1px solid var(--color-line);
  color: var(--color-stone);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.62;
}

.near-brand-auth .auth-copy strong {
  color: var(--color-ink);
  font-weight: 500;
}

.near-brand-auth .auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  color: var(--color-graphite);
}

.near-brand-auth .auth-card {
  width: 100%;
  max-width: 520px;
  padding: clamp(26px, 2.6vw, 34px);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(10, 16, 20, 0.08);
}

.near-brand-auth button[type="submit"] {
  background: var(--color-ink) !important;
  color: var(--color-ivory) !important;
  border: 1px solid var(--color-ink) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

.near-brand-auth button[type="submit"]:hover:not(:disabled) {
  background: var(--color-teal-dark) !important;
  border-color: var(--color-teal-dark) !important;
}

.near-brand-auth .auth-card:has(#registerForm) {
  max-width: 600px;
}

.near-brand-auth .form-group {
  margin-bottom: clamp(1.1rem, 2vh, 1.35rem);
}

.near-brand-auth .remember-forgot {
  margin-bottom: clamp(1.1rem, 2vh, 1.35rem);
}

.near-brand-auth .features {
  margin-top: clamp(1.25rem, 2.4vh, 1.75rem);
  padding-top: clamp(1.25rem, 2.4vh, 1.75rem);
}

@media (min-width: 1101px) and (max-height: 700px) {
  .near-brand-auth .auth-shell {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .near-brand-auth .auth-brand-panel {
    min-height: calc(100dvh - 48px);
  }

  .near-brand-auth .auth-headline {
    font-size: clamp(2.8rem, 4.5vw, 4.8rem);
  }

  .near-brand-auth .features {
    display: none;
  }
}

.near-brand-auth a:focus,
.near-brand-auth a:focus-visible,
.near-brand-auth button:focus,
.near-brand-auth button:focus-visible,
.near-brand-auth input:focus,
.near-brand-auth input:focus-visible,
.near-brand-auth select:focus,
.near-brand-auth select:focus-visible,
.near-brand-auth textarea:focus,
.near-brand-auth textarea:focus-visible {
  outline: 3px solid rgba(var(--vericase-teal-rgb), 0.38);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(var(--vericase-teal-rgb), 0.12);
}

.near-brand-control-centre .app-content,
.near-brand-dashboard .app-content {
  background: var(--color-ivory);
  color: var(--color-graphite);
}

.near-brand-command-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 24px;
  align-items: start;
}

.near-brand-command-band {
  border-top: 1px solid var(--color-line);
  padding: 18px 0;
}

.near-brand-command-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 350;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
  color: var(--color-ink);
  overflow-wrap: anywhere;
}

.near-brand-command-title .title-accent,
.near-brand-command-title .title-suffix {
  display: block;
}

.near-brand-command-title .title-suffix {
  margin-top: 0.12em;
}

.near-brand-action-list {
  display: grid;
  gap: 1px;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.near-brand-action-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 12px 0;
  border-top: 1px solid rgba(10, 16, 20, 0.08);
  color: var(--color-graphite);
  text-decoration: none;
}

.near-brand-action-row:first-child {
  border-top: 0;
}

.near-brand-action-row:hover {
  color: var(--color-ink);
}

.near-brand-status-panel {
  border-left: 1px solid var(--color-line);
  padding-left: 24px;
}

@media (max-width: 1100px) {
  .near-brand-auth .auth-shell,
  .near-brand-command-desk {
    grid-template-columns: 1fr;
  }

  .near-brand-auth .auth-shell {
    align-content: start;
    gap: 22px;
    padding: clamp(18px, 5vw, 32px);
  }

  .near-brand-auth .auth-brand-panel {
    min-height: auto;
    padding: 10px 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--color-line);
  }

  .near-brand-auth .auth-headline {
    max-width: 520px;
    margin-top: 10px;
    font-size: clamp(1.75rem, 8vw, 2.4rem);
    line-height: 1.03;
  }

  .near-brand-auth .auth-copy {
    margin-top: 16px;
    padding-top: 14px;
    font-size: 0.95rem;
  }

  .near-brand-auth .auth-form-panel {
    align-items: flex-start;
  }

  .near-brand-auth .auth-card {
    max-width: none;
    padding: 18px;
  }

  .near-brand-status-panel {
    border-left: 0;
    padding-left: 0;
  }
}
