:root {
  --bg: #f3efe6;
  --ink: #1c1915;
  --muted: #6d645a;
  --card: #fffdf8;
  --line: #e3d9cb;
  --steel: #243e49;
  --amber: #b86a08;
  --amber-soft: #fff1d6;
  --good: #1f7a45;
  --bad: #9d342c;
  --shadow: 0 16px 40px rgba(36, 28, 18, 0.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 320px at 100% -10%, rgba(184, 106, 8, 0.16), transparent 55%),
    var(--bg);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--steel); }
h1, h2, h3 { font-family: "Iowan Old Style", Palatino, Georgia, serif; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; margin: 0 0 0.4rem; }
h2 { margin: 0 0 0.35rem; font-size: 1.7rem; }
h3 { margin: 0; font-size: 1.15rem; }
p { margin: 0; }

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.auth-copy, .auth-card { padding: 48px 8vw; }
.auth-copy { background: var(--steel); color: #f7f1e6; display: flex; flex-direction: column; justify-content: flex-end; }
.auth-copy p { max-width: 36rem; color: #d9e2e6; }
.kicker { letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.75rem; font-weight: 700; color: var(--amber); margin: 0 0 0.7rem; }
.auth-copy .kicker { color: #f0c27a; }
.auth-card { display: flex; align-items: center; }
.panel {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.shell { min-height: 100vh; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  position: sticky;
  top: 0;
  background: rgba(243, 239, 230, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 5;
}
.brand { text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: 0.14em; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a, .tabs a, .btn, .text-btn {
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 8px 12px;
  background: transparent;
  cursor: pointer;
}
.nav a[aria-current="page"], .tabs a[aria-current="page"] { background: var(--steel); color: white; }
.who { color: var(--muted); font-size: 0.92rem; display: flex; gap: 10px; align-items: center; }
.main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 64px; }
.row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.stats, .grid { display: grid; gap: 12px; }
.stats { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.grid { grid-template-columns: 1.4fr 0.8fr; }
.card, .table-wrap, .composer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.card { padding: 16px; }
.stat strong { display: block; font-size: 1.45rem; margin-top: 4px; }
.stat span, .muted { color: var(--muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.95rem; }
th { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.composer { padding: 14px; margin-top: 12px; }
.fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
label { display: grid; gap: 4px; font-size: 0.82rem; color: var(--muted); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 9px 10px;
}
textarea { min-height: 84px; resize: vertical; }
.wide { grid-column: 1 / -1; }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.btn { background: var(--amber); color: white; border-color: var(--amber); font-weight: 700; }
.btn.secondary { background: var(--steel); border-color: var(--steel); }
.btn.ghost, .text-btn { background: transparent; border-color: var(--line); color: var(--ink); }
.pill { display: inline-block; border-radius: 999px; padding: 2px 8px; background: var(--amber-soft); color: #7a4b08; font-size: 0.78rem; font-weight: 700; }
.pill.good { background: #e5f6ec; color: var(--good); }
.pill.bad { background: #fdeceb; color: var(--bad); }
.notice { background: #fdeceb; color: var(--bad); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.empty { color: var(--muted); padding: 8px 0; }
@media (max-width: 900px) {
  .auth, .stats, .grid, .split, .fields { grid-template-columns: 1fr; }
  .auth-copy { min-height: 240px; }
}
