/**
 * Auth login / register — CoreSettle-style split layout
 * Left: forest primary panel · Right: form on off-white
 */

:root {
  /* Deep teal — closer to CoreSettle forest (#1b3a2d) than home #1a3d48 */
  --cs-auth-bg: #f7fafb;
  --cs-auth-fg: #12151c;
  --cs-auth-muted: #5a6570;
  --cs-auth-line: rgba(18, 21, 28, 0.12);
  --cs-auth-primary: #1a3d48;
  --cs-auth-primary-deep: #143038;
  --cs-auth-panel: #1a3d48;
  --cs-auth-panel-ink: #ffffff;
  --cs-auth-panel-muted: rgba(255, 255, 255, 0.68);
  --cs-auth-font: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body.auth-page {
  font-family: var(--cs-auth-font);
  background: var(--cs-auth-bg);
  color: var(--cs-auth-fg);
  min-height: 100dvh;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.cs-auth {
  display: flex;
  min-height: 100dvh;
  min-height: 100vh;
}

/* —— Left marketing panel —— */
.cs-auth__panel {
  display: none;
  position: relative;
  width: 45%;
  flex-shrink: 0;
  background: var(--cs-auth-panel);
  color: var(--cs-auth-panel-ink);
  overflow: hidden;
  border-radius: 0 28px 28px 0;
}

.cs-auth__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  opacity: 0.7;
}

.cs-auth__panel-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem 2.5rem 2.25rem;
  box-sizing: border-box;
}

.cs-auth__panel-brand {
  display: inline-flex;
  text-decoration: none;
  color: inherit;
}

.cs-auth__panel-brand .app-brand__wordmark,
.cs-auth__panel-brand .app-brand__wordmark-bnk,
.cs-auth__panel-brand .app-brand__tagline {
  color: #fff !important;
}

.cs-auth__panel-brand .app-brand__tagline {
  color: rgba(255, 255, 255, 0.65) !important;
}

.cs-auth__panel-brand .app-brand__icon {
  filter: brightness(0) invert(1);
}

.cs-auth__panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
  max-width: 28rem;
}

.cs-auth__panel-title {
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 2rem;
  color: #fff;
}

.cs-auth__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin: 0;
  padding: 0;
}

.cs-auth__feature {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.cs-auth__feature-dot {
  width: 6px;
  height: 6px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.cs-auth__feature-title {
  margin: 0 0 0.2rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
}

.cs-auth__feature-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--cs-auth-panel-muted);
}

.cs-auth__panel-foot {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

@media (min-width: 1024px) {
  .cs-auth__panel {
    display: flex;
  }
}

/* —— Right form column —— */
.cs-auth__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--cs-auth-bg);
}

.cs-auth__main-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 0;
}

@media (min-width: 1024px) {
  .cs-auth__main-top {
    justify-content: flex-end;
    padding: 1.75rem 2rem 0;
  }

  .cs-auth__main-top .cs-auth__mobile-brand {
    display: none;
  }
}

.cs-auth__mobile-brand {
  text-decoration: none;
  color: inherit;
}

.cs-auth__switch-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--cs-auth-fg);
  text-decoration: none;
}

.cs-auth__switch-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cs-auth__form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 1.5rem;
}

.cs-auth__form-card {
  width: 100%;
  max-width: 380px;
}

.cs-auth__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cs-auth-muted);
}

.cs-auth__title {
  margin: 0 0 2rem;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--cs-auth-fg);
}

.cs-auth__subtitle {
  margin: -1.25rem 0 1.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--cs-auth-muted);
}

.cs-auth__alert {
  padding: 0.75rem 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  border: 1px solid var(--cs-auth-line);
  background: #fff;
}

.cs-auth__alert--error {
  border-color: rgba(153, 27, 27, 0.25);
  color: #991b1b;
  background: #fef2f2;
}

.cs-auth__alert--success {
  border-color: rgba(26, 61, 72, 0.22);
  color: #1a3d48;
  background: #eef5f6;
}

.cs-auth__form-card form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.cs-auth__field,
.cs-auth__row-2 {
  width: 100%;
}

.cs-auth__field {
  margin-bottom: 1.5rem;
}

.cs-auth__field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.cs-auth__label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cs-auth-muted);
  margin-bottom: 0.45rem;
}

.cs-auth__field-head .cs-auth__label {
  margin-bottom: 0;
}

.cs-auth__forgot {
  font-size: 12px;
  color: var(--cs-auth-muted);
  text-decoration: none;
  white-space: nowrap;
}

.cs-auth__forgot:hover {
  color: var(--cs-auth-fg);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cs-auth__input {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--cs-auth-line);
  border-radius: 0;
  background: transparent;
  padding: 0.55rem 0;
  font: inherit;
  font-size: 0.875rem;
  color: var(--cs-auth-fg);
  outline: none;
  transition: border-color 0.15s ease;
}

.cs-auth__input::placeholder {
  color: #a3a3a3;
}

.cs-auth__input:focus {
  border-bottom-color: var(--cs-auth-primary);
}

.cs-auth__row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .cs-auth__row-2 {
    grid-template-columns: 1fr;
  }
}

.cs-auth__check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.25rem 0 1.25rem;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.cs-auth__check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--cs-auth-primary);
  border-radius: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.cs-auth__check span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cs-auth-muted);
}

.cs-auth__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 7.5rem;
  margin: 0;
  padding: 0.7rem 2rem;
  border: 0;
  border-radius: 0;
  background: var(--cs-auth-primary);
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cs-auth__submit:hover {
  background: var(--cs-auth-primary-deep);
}

.cs-auth__hint {
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--cs-auth-muted);
}

.cs-auth__hint a {
  color: var(--cs-auth-fg);
  text-decoration: none;
  font-weight: 500;
}

.cs-auth__hint a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cs-auth__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem 1.75rem;
  font-size: 12px;
  color: var(--cs-auth-muted);
}

.cs-auth__legal a {
  color: var(--cs-auth-muted);
  text-decoration: none;
}

.cs-auth__legal a:hover {
  color: var(--cs-auth-fg);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cs-auth__legal-sep {
  opacity: 0.5;
}
