:root {
  --bg: #f4f1eb;
  --ink: #1c1917;
  --muted: #57534e;
  --card: #fffcf7;
  --line: #e7e0d5;
  --accent: #0f3d2e;
  --accent-2: #c45c26;
  --err: #9b1c1c;
  --note: #fff8e1;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Iowan Old Style", Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse at top left, #efe6d6 0%, transparent 50%),
    linear-gradient(180deg, #f7f3ec, var(--bg));
  min-height: 100vh;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255,252,247,.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
}
.brand { display: flex; gap: .75rem; align-items: center; }
.mark {
  display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem;
  border-radius: .6rem;
  background: var(--accent);
  color: #f8faf8;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: .04em;
}
.brand small { display: block; color: var(--muted); font-size: .8rem; }
.user { display: flex; gap: 1rem; align-items: center; font-size: .9rem; color: var(--muted); }
.user a { color: var(--accent); }
.wrap { max-width: 920px; margin: 0 auto; padding: 1.5rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 10px 30px rgba(28,25,23,.04);
}
.login-card { max-width: 480px; margin: 3rem auto; }
h1, h2, h3 { font-weight: 650; letter-spacing: -.01em; }
h1 { margin-top: 0; font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { margin-top: 1.4rem; font-size: 1.05rem; }
p { line-height: 1.5; color: var(--muted); }
.btn {
  display: inline-block;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  padding: .75rem 1.1rem;
  border-radius: .7rem;
  font: inherit;
  font-size: .95rem;
}
.btn.primary { background: var(--accent); color: #f4faf7; }
.btn.primary:hover { filter: brightness(1.08); }
.upload { display: grid; gap: 1rem; margin-top: 1rem; }
.drop {
  display: block;
  border: 1.5px dashed #b8a992;
  border-radius: .9rem;
  padding: 1.4rem;
  text-align: center;
  background: #faf7f1;
  color: var(--muted);
}
.drop input { display: block; margin: 0 auto .7rem; }
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .8rem;
  margin: 1rem 0;
}
.metrics div {
  background: #f7f2e9;
  border-radius: .7rem;
  padding: .8rem;
}
.metrics small { color: var(--muted); display: block; margin-bottom: .25rem; }
.metrics strong { font-size: 1.05rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { border-bottom: 1px solid var(--line); padding: .55rem .35rem; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.sum td { font-weight: 700; border-bottom: 0; }
.error { color: var(--err); background: #fde8e8; padding: .7rem .9rem; border-radius: .6rem; }
.note {
  background: var(--note);
  border: 1px solid #f0e0a8;
  border-radius: .7rem;
  padding: .8rem .9rem;
  color: #4a4030;
  font-size: .88rem;
  line-height: 1.45;
}
.hint { font-size: .85rem; }
@media (max-width: 640px) {
  .top { flex-direction: column; align-items: flex-start; }
  .wrap { padding: 1rem; }
}
