/* Login screen — split brand/form layout, independent of the app shell layout. */

:root {
  --ink: #101e29;
  --ink-2: #1b3245;
  --paper: #f7f4ee;
  --paper-line: #dcd6c8;
  --brass: #b6893f;
  --brass-dark: #8f6a2f;
  --slate: #5b6773;
  --danger: #8a2f2f;
  --danger-bg: #f6e9e6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 42fr 58fr;
}

/* ---------- Brand panel ---------- */

.auth-brand {
  position: relative;
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--paper);
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.auth-ledger {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.16;
  pointer-events: none;
}

.auth-brand-top {
  position: relative;
  z-index: 1;
}

.auth-wordmark {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.auth-tagline {
  position: relative;
  z-index: 1;
  max-width: 30ch;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #d7dee3;
  margin: 0 0 0.5rem;
}

.auth-brand-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #90a0ab;
  border-top: 1px solid rgba(215, 222, 227, 0.18);
  padding-top: 1rem;
}

.auth-brand-foot strong {
  color: var(--brass);
  font-weight: 600;
}

/* ---------- Form panel ---------- */

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.75rem;
}

.auth-form-wrap {
  width: 100%;
  max-width: 380px;
}

.auth-heading {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.625rem;
  margin: 0 0 0.375rem;
}

.auth-subheading {
  color: var(--slate);
  font-size: 0.9375rem;
  margin: 0 0 2rem;
}

.auth-alert {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  background: var(--danger-bg);
  border-left: 3px solid var(--danger);
  color: var(--danger);
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.auth-field {
  margin-bottom: 1.375rem;
}

.auth-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--slate);
  margin-bottom: 0.375rem;
}

.auth-field input {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid var(--paper-line);
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 0.5rem 0.125rem;
  transition: border-color 0.15s ease;
}

.auth-field input:focus {
  outline: none;
  border-bottom-color: var(--brass);
}

.auth-field input:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.auth-field-error {
  display: block;
  color: var(--danger);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

.auth-submit {
  width: 100%;
  border: none;
  background: var(--ink);
  color: var(--paper);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background-color 0.15s ease;
}

.auth-submit:hover {
  background: var(--brass-dark);
}

.auth-submit:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.auth-demo {
  margin-top: 1.75rem;
  border: 1px dashed var(--paper-line);
  padding: 0.75rem 0.875rem;
  font-size: 0.8125rem;
  color: var(--slate);
  line-height: 1.6;
}

.auth-demo strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 959px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 2rem 1.75rem;
    min-height: 200px;
  }

  .auth-tagline {
    font-size: 0.9375rem;
  }

  .auth-brand-foot {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-field input,
  .auth-submit {
    transition: none;
  }
}
