/* Whitecream theme — login screen */
.login-screen {
  display: flex;
  min-height: 100vh;
  animation: fadeIn 0.55s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-left {
  flex: 1.05;
  background:
    radial-gradient(ellipse 900px 500px at 20% -10%, rgba(201, 162, 74, 0.10), transparent 60%),
    var(--ink-900);
  position: relative;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
}

.login-left::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(238, 232, 216, 0.045) 0px,
    rgba(238, 232, 216, 0.045) 1px,
    transparent 1px,
    transparent 40px
  );
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.brand-mark { width: 46px; height: 46px; flex: none; color: var(--parchment); }
.brand-mark .brand-mark__lm { fill: var(--parchment); }
.brand-word { font-family: var(--serif); font-size: 19px; letter-spacing: 0.02em; color: var(--parchment); }
.brand-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.login-hero {
  position: relative;
  z-index: 1;
  margin-top: auto;
  margin-bottom: auto;
  padding: 40px 0;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--brass-dim); }

.hero-title {
  font-family: var(--serif);
  font-weight: 520;
  font-size: 44px;
  line-height: 1.12;
  color: var(--parchment);
  max-width: 9.5em;
  letter-spacing: -0.01em;
}
.hero-title em { font-style: italic; color: var(--brass-bright); font-weight: 440; }

.hero-desc {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 32ch;
  margin-top: 20px;
}

.ledger-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.ledger-stats div { padding: 20px 22px 0 0; border-right: 1px solid var(--line); }
.ledger-stats div:last-child { border-right: none; }
.ledger-stats .num { font-family: var(--mono); font-size: 23px; color: var(--parchment); font-weight: 500; }
.ledger-stats .lbl { font-size: 11.5px; color: var(--muted-2); margin-top: 5px; letter-spacing: 0.02em; }

.login-right {
  flex: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--ink-950);
}

.login-card {
  width: 100%;
  max-width: 388px;
  background: var(--ink-850);
  border: 1px solid var(--line);
  padding: 40px 38px 34px;
}

.lc-head { margin-bottom: 30px; }
.lc-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}
.lc-title { font-family: var(--serif); font-size: 25px; color: var(--parchment); font-weight: 500; }
.lc-title span { color: var(--brass); }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.field input {
  width: 100%;
  background: var(--ink-900);
  border: 1px solid var(--line);
  color: var(--parchment);
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: var(--sans);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input::placeholder { color: var(--muted-2); }
.field input:focus {
  outline: none;
  border-color: var(--brass);
  background: var(--ink-850);
}
.field input.is-invalid { border-color: var(--rose); }

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 24px;
}
.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.remember input { accent-color: var(--brass); width: 14px; height: 14px; }
.forgot { font-size: 13px; color: var(--brass); border-bottom: 1px solid transparent; }
.forgot:hover { border-bottom-color: var(--brass); }

.btn-primary {
  width: 100%;
  background: var(--brass);
  color: var(--ink-950);
  border: none;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover { background: var(--brass-bright); }
.btn-primary:active { transform: scale(0.99); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.divider::before,
.divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.btn-secondary {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--parchment-dim);
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: border-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
a.btn-secondary { box-sizing: border-box; }
.btn-secondary:hover { border-color: var(--brass-dim); color: var(--parchment); }

.lc-foot {
  text-align: center;
  margin-top: 26px;
  font-size: 12.5px;
  color: var(--muted-2);
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brass);
  cursor: pointer;
  text-decoration: none;
}
.link-btn:hover { color: var(--brass-bright); text-decoration: underline; }

.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 14, 0.72);
}
.modal__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--ink-850);
  border: 1px solid var(--line);
  z-index: 1;
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.modal__head h2 { font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--parchment); }
.modal__close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { color: var(--parchment); }
.modal__body { padding: 18px; display: grid; gap: 4px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.modal__actions .btn-primary,
.modal__actions .btn-secondary { width: auto; }
.modal-hint { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.modal__body .alert {
  color: var(--parchment);
  background: rgba(177, 69, 86, 0.2);
  border-color: var(--rose);
}
.modal__body .alert.success {
  color: var(--parchment);
  background: rgba(55, 148, 137, 0.2);
  border-color: var(--teal);
}
.modal__body .alert li { color: inherit; }

@media (max-width: 980px) {
  .login-screen { flex-direction: column; }
  .login-left {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 36px;
  }
  .hero-title { font-size: 32px; }
}
