:root {
  --bg: #f3eee6;
  --panel: rgba(255, 253, 248, 0.92);
  --text: #2d241d;
  --muted: #8d7b69;
  --line: rgba(113, 86, 59, 0.16);
  --accent: #9a6337;
  --accent-2: #d8b991;
  --shadow: 0 24px 60px rgba(45, 36, 29, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.9), transparent 28%),
    linear-gradient(135deg, #f7f1e9 0%, #eadfce 100%);
}

.topbar,
.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 18px;
  font-size: 20px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mode-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.logout,
button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(154, 99, 55, 0.22);
}

.logout {
  padding: 12px 18px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 8px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
input {
  min-width: 180px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

button {
  height: 44px;
  padding: 0 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.cards article,
.panel,
.login-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.cards article {
  padding: 18px;
}

.cards span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.cards strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.panel {
  padding: 22px;
}

.bar-row,
.list-row {
  display: grid;
  grid-template-columns: 140px 1fr 48px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(113, 86, 59, 0.08);
}

.list-row {
  grid-template-columns: 1fr 48px;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(154, 99, 55, 0.12);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.table-panel {
  margin: 16px 0 32px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(113, 86, 59, 0.1);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(420px, calc(100% - 32px));
  padding: 28px;
}

.login-card h1 {
  margin-bottom: 18px;
  font-size: 32px;
}

.login-card form {
  display: grid;
  gap: 14px;
}

.login-card input {
  width: 100%;
}

.alert {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fee6dc;
  color: #8c2e1f;
  font-weight: 700;
}

@media (max-width: 860px) {
  .cards,
  .grid {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 110px 1fr 42px;
  }
}
