:root {
  --page: #F6F9FC;
  --surface: #FFFFFF;
  --navy: #14284B;
  --text: #14284B;
  --muted: #939394;
  --line: #E8EDFD;
  --accent: #524FEB;
  --accent-soft: #E8EDFD;
  --teal: #249F53;
  --mint: #D9F6E9;
  --danger: #DC3A54;
  --brand: #14284B;
  --brand-on: #FFFFFF;
  --bg: var(--page);
  --border: var(--line);
  --warn: #8a6a2f;
  --warn-soft: #efe8d8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Inter, system-ui, sans-serif; background: var(--page); color: var(--text); }
a { color: inherit; }
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--page); padding: 32px 16px; border-right: 1px solid transparent;
  position: sticky; top: 0; height: 100vh;
}
.logo {
  display: block; text-decoration: none; color: var(--navy);
  font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 0.9; margin: 0 12px 36px;
}
.logo span { display: block; margin-top: 8px; font-size: 14px; font-weight: 800; letter-spacing: 0.14em; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.sidebar nav a {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-decoration: none; color: var(--text); font-size: 15px; font-weight: 600;
  padding: 12px 16px 12px 22px; border-radius: 12px;
}
.sidebar nav a.on { background: var(--accent-soft); color: var(--accent); }
.sidebar nav a.on::before {
  content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 3px;
  border-radius: 99px; background: var(--accent);
}
.sidebar nav a:hover:not(.on) { background: var(--accent-soft); }
.sidebar nav a[href="orders.html"] { display: flex; align-items: center; width: 100%; }
.sidebar .nav-label { display: inline-flex; align-items: center; line-height: 1; }
.sidebar .badge, .sidebar .badge.js-orders-badge {
  position: static !important; top: auto !important; right: auto !important; left: auto !important;
  transform: none !important; margin: 0 0 0 auto !important;
  padding: 1px 0 0 !important;
  width: 20px; min-width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex !important; align-items: center; justify-content: center;
  background: var(--danger); color: var(--surface); font-size: 11px; font-weight: 700;
  line-height: 1 !important; letter-spacing: 0; text-align: center; box-sizing: border-box; flex-shrink: 0;
}
.sidebar .badge[hidden] { display: none !important; }
.shell { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 20px 28px 14px; }
.header-search {
  flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; color: var(--muted); font-size: 14px;
}
.header-search input { border: 0; background: transparent; outline: none; width: 100%; font: inherit; color: var(--text); }
.point-wrap { position: relative; flex-shrink: 0; }
.point-btn, .btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 10px 16px; font: 600 14px Inter, sans-serif;
  cursor: pointer; text-decoration: none;
}
.point-btn {
  max-width: none; height: 44px; padding: 0 16px 0 14px; gap: 8px; white-space: nowrap;
  color: var(--navy); font-weight: 600; font-size: 15px; line-height: 1;
}
.point-btn .point-ico { width: 20px; height: 20px; flex-shrink: 0; display: block; object-fit: contain; }
.point-btn .chevron { width: 12px; height: 12px; flex-shrink: 0; color: var(--navy); }
.btn-primary { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.btn-login { font-weight: 700; min-width: 96px; padding: 10px 22px; }
.icon-btn { width: 42px; height: 42px; padding: 0; position: relative; flex-shrink: 0; }
.icon-btn img { width: 22px; height: 22px; display: block; object-fit: contain; }
.icon-btn .badge {
  position: absolute; top: -4px; right: -4px; background: var(--danger); color: var(--surface);
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 99px;
  display: grid; place-items: center; padding: 0 4px;
}
.icon-btn .badge[hidden] { display: none; }
.point-menu {
  position: absolute; left: 0; right: auto; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 16px 20px; min-width: 100%; width: max-content;
  z-index: 30; display: none; flex-direction: column; gap: 16px;
}
.point-menu.on { display: flex; }
.point-menu button {
  border: 0; background: transparent; text-align: left; padding: 0;
  border-radius: 0; cursor: pointer; display: flex; flex-direction: column; gap: 3px;
  font: 600 15px Inter, sans-serif; color: var(--navy); line-height: 1.25;
}
.point-menu button b { font-weight: 600; }
.point-menu button span { font-size: 13px; font-weight: 500; color: #6E7694; }
.point-menu button:hover { background: transparent; }
.point-menu button:hover span { color: var(--accent); }
main.app-main { padding: 0 28px 40px; }
.crumb { font-size: 13px; color: var(--muted); margin: 4px 0 16px; }
.crumb a { color: inherit; text-decoration: none; }
.crumb strong { color: var(--navy); font-weight: 600; }
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.filters {
  background: var(--surface); border: 0; border-radius: 20px; padding: 20px;
  height: fit-content;
}
.filter-title { font-size: 14px; font-weight: 700; margin: 16px 0 10px; color: var(--navy); }
.filter-block { margin-top: 4px; }
.filter-block > .filter-title,
.filter-block > .filter-head { margin-top: 16px; }
.filter-block:first-child > .filter-title,
.filter-block:first-child > .filter-head { margin-top: 0; }
.filter-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 10px;
}
.filter-head .filter-title { margin: 0; }
.filter-bulk-btn {
  border: 0; background: transparent; color: var(--accent); cursor: pointer;
  font: 600 13px Inter, sans-serif; padding: 0; white-space: nowrap;
}
.filter-bulk-btn:hover { text-decoration: underline; }
.filter-extra[hidden] { display: none !important; }
.filter-more-btn {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; margin-bottom: 4px;
  border: 0; background: transparent; color: var(--accent); cursor: pointer;
  font: 600 13px Inter, sans-serif; padding: 4px 0;
}
.filter-more-btn:hover { text-decoration: underline; }
.check { display: flex; gap: 10px; font-size: 14px; margin-bottom: 8px; align-items: center; }
.check input { accent-color: var(--accent); }
.check small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; font-weight: 500; }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; gap: 16px; }
h1 { font-size: 28px; letter-spacing: -0.03em; color: var(--navy); font-weight: 800; }
.count { color: var(--muted); font-size: 14px; margin-top: 4px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 99px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--navy);
}
.chip.on { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.empty {
  background: var(--surface); border: 1px dashed var(--line); border-radius: 16px;
  padding: 40px; text-align: center; color: var(--muted);
}
footer {
  background: transparent; border-top: 1px solid var(--line); padding: 32px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; font-size: 13px; color: var(--muted);
}
footer .logo { font-size: 24px; margin: 0 0 12px; }
footer h4 { color: var(--text); margin-bottom: 12px; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
footer a { color: inherit; text-decoration: none; }
.toast { position: fixed; right: 24px; bottom: 24px; background: #14284B; color: #fff; padding: 12px 16px; border-radius: 8px; z-index: 50; }
.toast[hidden] { display: none !important; }
.toast.is-error { background: var(--danger); }
@media (max-width: 1200px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .layout, footer { grid-template-columns: 1fr; }
}
