:root {
  --ink: #172033;
  --muted: #5c6b82;
  --line: #e4e0d6;
  --paper: #f6f3ec;
  --card: #fffdf8;
  --navy: #1e3a8a;
  --orange: #ea580c;
  --danger: #9f1239;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

h1, h2, .eyebrow {
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 500;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--orange);
}

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
}

.login-brand {
  background: var(--navy);
  color: #f8f5ee;
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.login-brand h1 {
  margin: 12px 0 0;
  font-size: clamp(4.5rem, 10vw, 8rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 28rem;
  margin: 24px 0 0;
  font-size: 1.15rem;
  line-height: 1.5;
  color: #dbe4ff;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

form {
  width: min(100%, 380px);
}

h2 {
  margin: 0 0 28px;
  font-size: 2rem;
}

label {
  display: block;
  margin: 16px 0 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

input[type="text"],
input[type="password"] {
  width: 100%;
  border: 1px solid #d5d0c4;
  background: white;
  color: var(--ink);
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
}

input:focus {
  outline: 2px solid #93c5fd;
  border-color: var(--navy);
}

button {
  margin-top: 22px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  font: inherit;
  font-weight: 650;
  padding: 14px 18px;
  cursor: pointer;
}

button:hover { background: #1d4ed8; }

.error, .errorlist {
  color: var(--danger);
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 7vw;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
}

.who { margin: 4px 0 0; color: var(--muted); }

.top-actions { display: flex; align-items: center; gap: 10px; }

a.quiet, button.quiet {
  width: auto;
  margin: 0;
  background: transparent;
  color: var(--navy);
  border: 1px solid #c9d4ef;
  border-radius: 999px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 650;
}

.finder { display: flex; gap: 10px; max-width: 420px; margin-bottom: 18px; }
.finder input { flex: 1; border: 1px solid #d5d0c4; border-radius: 12px; padding: 12px 14px; font: inherit; }
.finder button { width: auto; margin: 0; }

.people { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.people th, .people td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.people th { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pill { display: inline-block; margin: 0 6px 6px 0; padding: 4px 8px; border-radius: 999px; background: #e8eefc; color: var(--navy); font-size: 0.82rem; }
.board.narrow { max-width: 760px; }
.account { display: grid; gap: 8px; }
.account > button { width: auto; justify-self: start; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.account select, .pair input { width: 100%; border: 1px solid #d5d0c4; background: white; border-radius: 12px; padding: 12px 14px; font: inherit; }
.check { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.danger-form { margin-top: 28px; }
button.danger { width: auto; background: transparent; color: var(--danger); border: 1px solid #f1c4cf; }
.grants { display: grid; gap: 12px; }
.grant { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.grant select { display: block; margin-top: 6px; font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid #d5d0c4; }
.grant + button, .grants > button { width: auto; }

button.quiet:hover { background: #eff4ff; }

.board {
  padding: 36px 7vw 72px;
}

.board h1 {
  margin: 0 0 22px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.app {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  min-height: 108px;
}

.app:hover {
  border-color: #b9c7ea;
  transform: translateY(-1px);
}

.mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.name {
  display: block;
  font-size: 1.15rem;
  font-weight: 650;
}

.summary {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.open {
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.empty {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

@media (max-width: 800px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { min-height: 280px; padding: 36px 24px; }
  .topbar, .board { padding-left: 20px; padding-right: 20px; }
  .app { grid-template-columns: auto 1fr; }
  .open { grid-column: 2; }
}
