:root {
  --ink: #28231b;
  --muted: #756d61;
  --line: #e5ded1;
  --surface: #ffffff;
  --canvas: #f5f1ea;
  --nav: #11100e;
  --accent: #bb9138;
  --accent-dark: #987126;
  --green: #197e5b;
  --amber: #a66300;
  --red: #bd3b38;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.skip-link { position: absolute; top: -50px; left: 12px; z-index: 50; padding: 10px 14px; background: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px 1fr; }
.sidebar { background: var(--nav); color: #d7dfeb; padding: 24px 14px; display: flex; flex-direction: column; }
.brand { color: white; text-decoration: none; padding: 3px 12px 25px; font-weight: 750; font-size: 19px; letter-spacing: -.02em; }
.brand small { display: block; color: #9eabc0; font-size: 11px; font-weight: 600; letter-spacing: .1em; margin-top: 5px; text-transform: uppercase; }
.navigation { display: grid; gap: 4px; }
.navigation a { color: inherit; text-decoration: none; padding: 11px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.navigation a:hover { background: rgba(255,255,255,.08); color: white; }
.navigation a[aria-current="page"] { color: white; background: rgba(206,92,52,.95); box-shadow: 0 5px 14px rgba(0,0,0,.16); }
.profile { margin-top: auto; padding: 17px 12px 0; border-top: 1px solid rgba(255,255,255,.13); font-size: 13px; }
.profile strong { color: white; display: block; }
.profile span { color: #a9b6ca; display: block; margin: 3px 0 12px; }
.link-button { border: 0; background: transparent; color: inherit; padding: 0; cursor: pointer; font-size: 13px; text-decoration: underline; }
.page { min-width: 0; }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 15px 34px; background: rgba(255,255,255,.84); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.topbar p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.content { max-width: 1540px; margin: 0 auto; padding: 30px 34px 46px; }
.grid { display: grid; gap: 20px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 12px rgba(20, 31, 56, .035); }
.stat { padding: 20px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 650; }
.stat .value { display: block; margin-top: 10px; color: #211d15; font-size: 29px; font-weight: 760; letter-spacing: -.04em; }
.stat .detail { color: var(--muted); display: block; margin-top: 5px; font-size: 12px; }
.two-columns { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); align-items: start; }
.section-title { display: flex; align-items: center; justify-content: space-between; padding: 20px 21px 13px; }
.section-title h2 { font-size: 16px; margin: 0; letter-spacing: -.01em; }
.section-title p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 21px; text-align: left; border-top: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); background: #fbfcfe; font-size: 11px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
td strong { display: block; color: #332b20; }
td small { color: var(--muted); display: block; margin-top: 2px; }
.panel { padding: 21px; }
.panel h2 { font-size: 16px; margin: 0 0 4px; }
.panel > p { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
label { display: grid; gap: 6px; color: #465269; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #d7dce6; color: var(--ink); border-radius: 7px; background: white; min-height: 39px; padding: 8px 10px; outline: none; }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(206,92,52,.14); }
.button { appearance: none; display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 39px; padding: 9px 13px; border: 1px solid var(--accent); border-radius: 7px; color: white; background: var(--accent); cursor: pointer; font-size: 13px; font-weight: 700; text-decoration: none; }
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.secondary { color: #4b3b20; background: white; border-color: #d9c9a9; }
.button.secondary:hover { background: #faf5eb; }
.button.small { min-height: 29px; padding: 5px 8px; font-size: 11px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; background: #eef1f6; color: #566074; white-space: nowrap; }
.badge.green { background: #e6f6ef; color: var(--green); }
.badge.amber { background: #fff4df; color: var(--amber); }
.badge.red { background: #ffebeb; color: var(--red); }
.flash { display: flex; align-items: start; gap: 8px; padding: 12px 14px; margin: 0 0 17px; border: 1px solid #b9e3d0; border-radius: 8px; color: #126040; background: #effcf5; font-size: 13px; }
.flash.error { color: #9b2e2b; background: #fff2f1; border-color: #f0c3c0; }
.notice { padding: 16px 18px; border-radius: 9px; background: #fff9ec; border: 1px solid #f2ddac; color: #7e5713; font-size: 13px; }
.empty { color: var(--muted); padding: 28px 21px; font-size: 13px; }
.low-stock { color: var(--red); font-weight: 750; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.status-form { display: inline; }
.status-form select { display: inline-block; width: auto; min-height: 29px; max-width: 130px; padding: 3px 25px 3px 7px; font-size: 11px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at top left, #f7d6c9 0, transparent 38%), #172033; }
.login-card { width: min(430px, 100%); background: white; padding: 34px; border-radius: 14px; box-shadow: 0 22px 60px rgba(0,0,0,.23); }
.login-card h1 { margin: 0; letter-spacing: -.03em; }
.login-card p { color: var(--muted); line-height: 1.5; font-size: 14px; margin: 8px 0 24px; }
.login-card form { display: grid; gap: 15px; }
.login-card .button { margin-top: 3px; }
@media (max-width: 1000px) { .app-shell { grid-template-columns: 1fr; } .sidebar { padding: 12px 18px; position: sticky; top: 0; z-index: 10; flex-direction: row; align-items: center; overflow-x: auto; } .brand { padding: 0 18px 0 0; white-space: nowrap; } .brand small, .profile { display: none; } .navigation { display: flex; gap: 3px; } .navigation a { white-space: nowrap; padding: 8px 9px; font-size: 12px; } .topbar { padding: 16px 22px; } .content { padding: 22px; } }
@media (max-width: 720px) { .topbar { align-items: start; } .topbar h1 { font-size: 19px; } .content { padding: 16px; } .stats, .two-columns, .form-grid { grid-template-columns: 1fr; } .form-grid .wide { grid-column: auto; } th, td { padding: 11px 13px; } .card { border-radius: 10px; } }
