:root {
  --bg: #0f172a; --panel: #1e293b; --line: #334155;
  --text: #e2e8f0; --muted: #94a3b8; --accent: #38bdf8;
  --ok: #22c55e; --err: #f87171; --warn: #fbbf24;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, "Malgun Gothic", sans-serif;
}
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--text); text-decoration: none; font-size: 16px; }
.nav .links a { color: var(--muted); text-decoration: none; margin-left: 18px; }
.nav .links a:hover { color: var(--accent); }
.container { max-width: 1080px; margin: 0 auto; padding: 24px; }
h1 { font-size: 22px; } h2 { font-size: 17px; margin: 0 0 12px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; margin-bottom: 18px;
}
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat .num { font-size: 26px; font-weight: 700; color: var(--accent); }
.stat span:last-child { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
input, select, button {
  font-size: 14px; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: #0b1220; color: var(--text);
}
input.small { width: 130px; }
button {
  background: var(--accent); color: #04222e; border: none; font-weight: 600; cursor: pointer;
}
button:hover { opacity: .9; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--err); } .ok { color: var(--ok); }
.flash { background: #064e3b; color: #d1fae5; padding: 10px 14px; border-radius: 8px; }
.login { max-width: 360px; margin: 80px auto; }
.login form { display: flex; flex-direction: column; gap: 12px; }
.login label { color: var(--muted); font-size: 13px; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.product img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.product .pname { font-size: 13px; margin: 8px 0 4px; height: 36px; overflow: hidden; }
.pager { justify-content: center; margin-top: 16px; }
.pager a { color: var(--accent); text-decoration: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; }
.badge { padding: 2px 8px; border-radius: 6px; font-size: 12px; background: var(--line); }
.badge.ordered, .badge.shipped { background: #065f46; color: #d1fae5; }
.badge.failed { background: #7f1d1d; color: #fecaca; }
.badge.pending { background: #78350f; color: #fde68a; }
@media (max-width: 720px) {
  .grid, .product-grid { grid-template-columns: 1fr 1fr; }
}
