:root {
  --bg: #f4f1ea;
  --card: #fffdf8;
  --ink: #1c1917;
  --muted: #6b6258;
  --line: #e8e0d4;
  --accent: #0f766e;
  --accent-ink: #fff;
  --warn: #9a3412;
  --warn-bg: #ffedd5;
  --error: #9f1239;
  --ok: #15803d;
  --shadow: 0 10px 30px rgba(28, 25, 23, 0.06);
  --radius: 16px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0 auto;
  max-width: 1100px;
  padding: 20px 16px 48px;
  background: var(--bg);
  color: var(--ink);
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-card, .card, .filters, .progress, .orders, .meta, .top {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.login-card { width: min(100%, 380px); padding: 28px; }
h1, h2 { margin: 0 0 8px; }
h1 { font-size: 1.4rem; }
h2 { font-size: 0.85rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.hidden { display: none !important; }
.error { color: var(--error); font-weight: 600; }
.warn { background: var(--warn-bg); color: var(--warn); padding: 10px 14px; border-radius: 12px; }
label { display: block; margin: 12px 0 6px; font-weight: 600; }
input[type=password], input[type=date] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
button, .ghost {
  font: inherit;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:disabled { opacity: .6; cursor: wait; }
button.ghost, a.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.top, .filters, .progress, .orders, .meta { padding: 16px; margin-bottom: 16px; }
.top, .progress-head, .top-actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.presets, .custom { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.presets button, .filters .custom button { background: #eee8dc; color: var(--ink); }
.presets button.active { background: var(--accent); color: #fff; }
.custom label { margin: 0; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.card { padding: 16px; }
.card.highlight { outline: 2px solid var(--accent); }
.amount { font-size: 1.35rem; font-weight: 700; margin: 4px 0; }
.sub { margin: 0; color: var(--muted); font-size: 0.9rem; }
.bar { height: 12px; background: #eee8dc; border-radius: 999px; overflow: hidden; margin: 10px 0; }
.bar-fill { height: 100%; background: #d97706; }
.bar-fill.ok { background: var(--ok); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 0.92rem; vertical-align: top; }
.mono { font-family: ui-monospace, monospace; font-size: 0.8rem; word-break: break-all; }
footer { margin-top: 24px; }
@media (max-width: 640px) {
  body { padding: 12px 10px 36px; }
  .amount { font-size: 1.15rem; }
  .top-actions { width: 100%; }
}
