:root {
  --bg: #f3efe5;
  --bg-panel: rgba(255, 255, 255, 0.78);
  --bg-strong: #fffaf0;
  --line: rgba(62, 42, 24, 0.12);
  --text: #2c1c0f;
  --muted: #746453;
  --accent: #165d52;
  --accent-soft: #d9ece8;
  --danger: #a44334;
  --shadow: 0 24px 80px rgba(39, 24, 12, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(22, 93, 82, 0.14), transparent 32%),
    radial-gradient(circle at bottom right, rgba(192, 133, 47, 0.12), transparent 28%),
    linear-gradient(135deg, #efe6d8, #f9f6f0 48%, #f0ede6);
}

.shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.72);
  backdrop-filter: blur(12px);
}

.brand-kicker,
.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand h1,
.topbar h2 {
  margin: 10px 0 12px;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
}

.brand p,
.card-head p,
.files-grid p {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.nav-item,
button {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 120ms ease, background 120ms ease;
}

.nav-item {
  text-align: left;
  background: transparent;
  color: var(--text);
}

.nav-item.active {
  background: var(--accent);
  color: white;
}

button {
  background: var(--accent);
  color: white;
}

button:hover,
.nav-item:hover {
  transform: translateY(-1px);
}

.secondary-button {
  background: var(--accent-soft);
  color: var(--accent);
}

.content {
  padding: 26px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.stats-grid,
.two-col,
.files-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.files-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.stat-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(247, 243, 236, 0.88));
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: 34px;
  font-family: var(--font-display);
}

.card h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 26px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.list-block,
.console {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  border-bottom: 0;
}

.stack-form,
.filter-grid {
  display: grid;
  gap: 12px;
}

.filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(62, 42, 24, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font: inherit;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-check input {
  width: auto;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.file-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.file-card code {
  white-space: pre-wrap;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.danger {
  color: var(--danger);
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
