:root {
  --ink: #1f1912;
  --muted: #6f6558;
  --paper: #f3eee4;
  --card: #fffaf3;
  --line: #e2d8c6;
  --sidebar: #241c14;
  --sidebar-2: #31261c;
  --accent: #c45c26;
  --accent-2: #e8a35a;
  --good: #2f6b4f;
  --warn: #a15c12;
  --low-warn: #3e250b;
  --bad: #9b2c2c;
  --shadow: 0 18px 40px rgba(36, 28, 20, 0.08);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(232, 163, 90, 0.18), transparent 28%),
    linear-gradient(180deg, #f7f1e6 0%, var(--paper) 100%);
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }

.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #f6efe4;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: fixed;
  position: sticky;
  top: 0;
  left: 0;
  width: 250px;
  height: 100vh;
  overflow-y: hidden;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px; }
.mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  font-weight: 700; letter-spacing: 0.04em;
}
.brand h1 { margin: 0; font-size: 18px; font-weight: 600; }
.brand p { margin: 2px 0 0; color: #cbbba6; font-size: 12px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a, .nav button {
  display: flex; align-items: center; justify-content: space-between;
  color: #efe6d8; text-decoration: none; background: transparent; border: 0;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; text-align: left; width: 100%;
}
.nav a:hover, .nav a.active { background: rgba(255,255,255,0.08); }
.badge {
  background: var(--accent); color: white; border-radius: 999px;
  min-width: 22px; height: 22px; display: inline-grid; place-items: center;
  font-size: 11px; padding: 0 6px;
}

.status-badge {
  min-width: 22px; height: 22px; display: inline-grid; place-items: center;
  font-size: 11px; padding: 0 6px; border-radius: 2px;
}

.status-badge.status-active {
  background: var(--warn); color: white;
}

.status-badge.status-inactive {
  background: var(--muted); color: white;
}

.sidebar-foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-foot .who { font-size: 14px; }
.sidebar-foot .role { color: #cbbba6; font-size: 12px; margin-top: 2px; }
.sidebar-foot .group { color: #cbbba6; font-size: 12px; margin-top: 2px; }

.main { padding: 28px 32px 48px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 6px; }
.topbar h2 { margin: 0; font-size: 30px; letter-spacing: -0.03em; }
.topbar p { margin: 6px 0 0; color: var(--muted); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn, button.btn, input[type=submit] {
  background: var(--ink); color: #756959; border: 0; border-radius: 999px;
  padding: 10px 16px; text-decoration: none; display: inline-flex; align-items: center;
  cursor: pointer; font-weight: 500;
}
.btn.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.low-warn { background: var(--low-warn); color: var(--line); border: 1px solid var(--muted); }
.btn.accent { background: var(--accent); color: var(--card); }
.btn.danger { background: var(--bad); color: var(--card); }
.btn.small { padding: 7px 12px; font-size: 13px; }

.multi-button { display: inline-flex; gap: 8px; }

.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { grid-template-columns: 1.4fr 1fr; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.stat .value { font-size: 28px; margin-top: 8px; font-family: var(--mono); }
.stat .hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: 12px; }

.pill {
  display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.pill.DRAFT, .pill.RECEIVING, .pill.PICKING { background: #f4e0c4; color: var(--warn); }
.pill.COMPLETED, .pill.SHIPPED, .pill.good { background: #d7ece0; color: var(--good); }
.pill.CANCELLED, .pill.low { background: #f6d4d4; color: var(--bad); }

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 10px 14px; border-radius: 12px; margin-bottom: 8px; }
.messages .success { background: #d7ece0; }
.messages .error { background: #f6d4d4; }

form p { margin: 0 0 14px; }
label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--muted); }
input[type=text], input[type=number], input[type=password], input[type=date], input[type=email], select, textarea {
  width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
.searchbar { display: flex; gap: 8px; margin-bottom: 16px; }
.searchbar input, .searchbar select { max-width: 280px; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); }
.help { color: var(--muted); font-size: 13px; }

.inline-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.inline-form p { margin: 0; min-width: 160px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; }

@media (max-width: 980px) {
  /* .shell { grid-template-columns: 1fr; } */
  /* .sidebar { position: sticky; top: 0; z-index: 5; } */
  /* Hide sidebar */
   /* .sidebar.hidden {
    transform: translateX(-100%);
  } */
  /* .stats, .split, .two-col { grid-template-columns: 1fr; } */
}
