:root {
  --ink: #1c1612;
  --cream: #f4f1eb;
  --paper: #fffcf8;
  --line: #ddd4c6;
  --gold: #e4c27a;
  --brass: #8a5a22;
  --clay: #8c3d32;
  --muted: #6d645b;
}

* {
  box-sizing: border-box;
}

html,
body.login-body {
  margin: 0;
  min-height: 100%;
  background: #f4e9db;
}

body.login-body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background: transparent;
  color: var(--ink);
  font-family: "Segoe UI", sans-serif;
  font-size: 14px;
}

body.login-body::before {
  content: none;
}

.photo-wall {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0;
  padding: 0;
}

.photo-wall img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.login-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(720px 420px at 50% 45%, rgba(255, 252, 248, 0.2), transparent 70%),
    linear-gradient(180deg, rgba(255, 250, 244, 0.42), rgba(246, 236, 222, 0.5));
}

.app-stage {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
}

.app-window {
  width: 100%;
  overflow: hidden;
  border: 1px solid #e4dfd8;
  border-radius: 0;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(72, 46, 24, 0.18);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 16px;
  background: #ffffff;
  color: var(--ink);
  border-bottom: 1px solid #eeeae4;
}

.brand-logo {
  width: 40px;
  height: 40px;
  display: block;
  flex: none;
}

.title {
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.title-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.window-body {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.window-art {
  position: relative;
  min-height: 420px;
  background: #efeae3;
}

.window-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 40px 28px;
  background: linear-gradient(180deg, #fffdfb 0%, #fbf7f1 100%);
}

form h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

form h1::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 12px;
  border-radius: 0;
  background: linear-gradient(90deg, #b8893d, #e8c98a);
}

.form-note {
  margin: 14px 0 22px;
  max-width: 34ch;
  color: var(--muted);
  line-height: 1.5;
}

.login-alert {
  margin-bottom: 12px;
}

.validation-summary-valid {
  display: none;
}

.validation-summary-errors {
  margin: 0;
  padding: 10px 12px;
  border-radius: 0;
  background: #f8ece8;
  color: var(--clay);
}

.validation-summary-errors ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.field > span:first-child {
  display: block;
  margin-bottom: 8px;
  color: #5f564d;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field input,
.password-wrap {
  width: 100%;
}

.field input {
  height: 48px;
  border: 1px solid #e6dccf;
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 0 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 76px;
}

.field input:hover {
  border-color: #d3c4ae;
}

.field input:focus {
  outline: none;
  border-color: #c6a15b;
  box-shadow: 0 0 0 4px rgba(198, 161, 91, 0.18);
}

.field input.input-validation-error {
  border-color: var(--clay);
}

.field-error {
  display: block;
  margin-top: 4px;
  color: var(--clay);
  font-size: 12px;
}

.field-validation-valid {
  display: none;
}

.text-button,
.sign-in,
.remember {
  font: inherit;
}

.text-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: #f6efe4;
  color: var(--brass);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.text-button:hover {
  background: #efe2cc;
}

.remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 20px;
  color: #3a312a;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: #8a5a22;
}

.actions {
  display: block;
}

.sign-in {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #2c261f 0%, #1c1612 100%);
  color: #f8f3ea;
  font-weight: 650;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 20px rgba(28, 22, 18, 0.16);
  cursor: pointer;
}

.sign-in:hover {
  background: #322920;
}

.demo-accounts {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #efe6da;
  color: var(--muted);
  font-size: 12px;
}

.demo-accounts summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--brass);
}

.demo-accounts ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.demo-accounts li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.demo-accounts code {
  padding: 2px 5px;
  border-radius: 0;
  background: #efe6d8;
  color: var(--ink);
}

@media (max-width: 760px) {
  .photo-wall {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, 1fr);
  }

  body.login-body {
    padding: 0;
    place-items: stretch;
  }

  .app-window {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .window-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .window-art {
    height: 160px;
  }

  .actions,
  .sign-in {
    width: 100%;
  }
}
