@font-face {
  font-family: "CentralOS Inter";
  src: url("../fonts/inter/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "CentralOS Inter";
  src: url("../fonts/inter/InterVariable-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --accent: #2563eb;
  --accent-soft: #eef4ff;
  --positive: #0f766e;
  --positive-soft: #ecfdf5;
  --ink: #17233a;
  --muted: #6d7280;
  --subtle: #9297a4;
  --line: #e4e7ed;
  --line-strong: #d6dae3;
  --canvas: #ffffff;
  --panel: #ffffff;
  --panel-muted: #f8f9fb;
  --danger: #b42318;
  --danger-soft: #fff3f2;
  --shadow: 0 18px 50px rgba(23, 35, 58, .10);
  --radius: 18px;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--ui-font, "CentralOS Inter", Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif);
  font-size: var(--ui-body, 13px);
}

* { box-sizing: border-box; }
html { min-width: 760px; background: var(--canvas); }
body { margin: 0; min-height: 0; overflow: hidden; background: var(--canvas); }
button, input, select, textarea, option, optgroup { font: inherit; }
input::placeholder, textarea::placeholder { font-family: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 24%, transparent);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.catalogue-shell { min-height: 0; padding: 0; }
.catalogue-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 0 0 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.catalogue-brand { display: block; min-width: 0; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 { margin: 6px 0 8px; font-size: 38px; line-height: 1.05; letter-spacing: -.6px; }
h2 { margin-bottom: 4px; font-size: 1.2rem; letter-spacing: -.015em; }
.header-copy, .list-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; font-weight: 650; }
.header-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.btn, .icon-button {
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 760;
}
.btn { min-height: 42px; padding: 0 15px; }
.btn.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn.danger { border-color: #f5c8c5; background: var(--danger-soft); color: var(--danger); }
.btn:disabled { opacity: .45; cursor: default; }
.icon-button { width: 42px; height: 42px; font-size: 1.35rem; }

.pricing-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}
.pricing-summary > div { min-width: 0; padding: 13px 16px; background: var(--panel); }
.pricing-summary span, .pricing-summary small, .price-cell small, .customer-total small {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 760;
}
.pricing-summary span { margin-bottom: 4px; letter-spacing: .06em; text-transform: uppercase; }
.pricing-summary strong { display: block; margin-bottom: 2px; font-size: 1.02rem; }
.pricing-summary > div:first-child strong, .pricing-summary > div:nth-child(2) strong { color: var(--positive); }

.catalogue-workspace {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}
.catalogue-sidebar, .price-list-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.catalogue-sidebar { position: sticky; top: 12px; padding: 15px; }
.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.sidebar-heading small { color: var(--subtle); font-size: .68rem; letter-spacing: 0; text-transform: none; }
.mini-action { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel); color: var(--accent); font-weight: 900; }
.categories-heading { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.mode-switch { display: grid; grid-template-columns: 1fr; gap: 5px; }
.mode-button {
  min-height: 39px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 760;
}
.mode-button:hover { background: var(--panel-muted); color: var(--ink); }
.mode-button.active { border-color: color-mix(in srgb, var(--accent) 20%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.category-list { display: grid; gap: 4px; }
.category-entry { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 30px; align-items: center; }
.category-button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 60px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.category-button:hover { background: var(--panel-muted); }
.category-button.active { border-color: color-mix(in srgb, var(--accent) 20%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.category-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 850;
}
.category-icon svg{display:block;width:22px;height:22px}
.category-button.active .category-icon { background: var(--accent-soft); color: var(--accent); }
.category-button strong, .category-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-button strong { font-size: .82rem; }
.category-button small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.folder-edit { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 900; }
.folder-edit:hover { background: var(--panel-muted); color: var(--accent); }
.sidebar-note { margin-top: 15px; padding: 12px; border-radius: 12px; background: var(--panel-muted); }
.sidebar-note strong { font-size: .78rem; }
.sidebar-note p { margin: 5px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }

.price-list-panel { min-width: 0; overflow: hidden; }
.list-toolbar { padding: 15px; border-bottom: 1px solid var(--line); }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-muted);
}
.search-field span { color: var(--accent); font-size: 1.15rem; font-weight: 900; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-field input::placeholder { color: var(--subtle); }
.list-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 15px 2px 0; }
.result-count { color: var(--muted); font-size: .75rem; font-weight: 760; white-space: nowrap; }
.price-table { min-width: 0; }
.price-table-head, .price-row {
  display: grid;
  grid-template-columns: minmax(300px, 1.65fr) 120px 185px 128px 142px 58px;
  align-items: center;
  column-gap: 12px;
}
.price-table-head {
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-muted);
  color: var(--muted);
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.price-rows { min-height: 240px; }
.price-row { min-height: 92px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.price-row:last-child { border-bottom: 0; }
.price-row:hover { background: color-mix(in srgb, var(--accent-soft) 40%, var(--panel)); }
.price-identity { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 11px; min-width: 0; }
.price-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0 5px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 850;
}
.price-identity strong, .price-identity p, .price-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-identity strong { margin-top: 1px; font-size: .9rem; }
.price-identity p { margin: 3px 0; color: var(--muted); font-size: .76rem; }
.price-identity small { color: var(--subtle); font-size: .67rem; }
.price-cell strong, .customer-total strong { display: block; margin-top: 4px; font-size: .83rem; line-height: 1.25; }
.price-cell strong { font-weight: 720; }
.customer-total { padding: 10px 12px; border-radius: 10px; background: var(--positive-soft); }
.customer-total strong { color: var(--positive); font-size: .96rem; }
.row-actions { text-align: right; }
.row-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 760;
}
.row-actions button:hover { border-color: var(--accent); color: var(--accent); }
.empty-state { display: grid; place-items: center; gap: 8px; min-height: 300px; padding: 30px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); font-size: 1rem; }

.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: start center;
  padding: 24px;
  background: rgba(23, 35, 58, .48);
  backdrop-filter: blur(5px);
}
.price-editor {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.price-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 21px 22px 17px; border-bottom: 1px solid var(--line); }
.price-editor > header p:last-child { margin: 5px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.price-editor form { padding: 20px 22px 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid label { display: grid; align-content: start; gap: 6px; min-width: 0; }
.form-grid label > span, .form-grid label > small { color: var(--muted); font-size: .72rem; font-weight: 730; }
.form-grid label > span { color: var(--ink); }
.span-two { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--panel);
  color: var(--ink);
  padding: 9px 11px;
}
.form-grid textarea { min-height: 86px; resize: vertical; }
.money-input { display: grid; grid-template-columns: 30px 1fr; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 11px; }
.money-input > span { color: var(--muted); text-align: center; }
.money-input input { border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.charge-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.charge-options label { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-muted); font-size: .78rem; font-weight: 730; }
.charge-options input { width: 17px; height: 17px; accent-color: var(--accent); }
.editor-status { min-height: 28px; padding-top: 10px; color: var(--muted); font-size: .75rem; }
.price-editor footer { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding-top: 16px; border-top: 1px solid var(--line); }
.footer-spacer { flex: 1; }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  max-width: 420px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: .8rem;
  font-weight: 730;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .18s ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }

html[data-color-mode="dark"] {
  --ink: #eef3fa;
  --muted: #aab4c3;
  --subtle: #8794a7;
  --line: #2d3949;
  --line-strong: #3a485b;
  --canvas: #101720;
  --panel: #17212c;
  --panel-muted: #1d2936;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, #17212c);
  --positive-soft: color-mix(in srgb, var(--positive) 15%, #17212c);
  --danger-soft: #331d20;
}
html[data-color-mode="dark"] .catalogue-brand img { background: #fff; }
html[data-color-mode="dark"] .btn.primary { color: #fff; }

@media (max-width: 1180px) {
  .pricing-summary { grid-template-columns: repeat(4, minmax(130px, 1fr)); overflow-x: auto; }
  .price-table-head { display: none; }
  .price-row { grid-template-columns: minmax(290px, 1.5fr) repeat(4, minmax(110px, .7fr)) 54px; }
}
@media (max-width: 980px) {
  .catalogue-workspace { grid-template-columns: 210px minmax(0, 1fr); }
  .price-row { grid-template-columns: minmax(250px, 1fr) repeat(2, minmax(110px, .65fr)) 54px; }
  .price-cell:nth-of-type(4), .price-cell:nth-of-type(5) { display: none; }
}
@media (max-width: 780px) {
  .catalogue-header { align-items: flex-start; }
  .header-copy { display: none; }
  .catalogue-workspace { grid-template-columns: 180px minmax(0, 1fr); }
  .sidebar-note { display: none; }
  .price-row { grid-template-columns: minmax(220px, 1fr) 130px 50px; }
  .price-cell { display: none; }
  .customer-total { display: block; }
}
