/* self-hosted fonts (was Google Fonts) — GDPR-friendly, no external requests */
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url(/assets/fonts/ibm-plex-mono-500-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;src:url(/assets/fonts/ibm-plex-mono-500-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Manrope';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/manrope-400-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Manrope';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/manrope-400-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Manrope';font-style:normal;font-weight:500;font-display:swap;src:url(/assets/fonts/manrope-500-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Manrope';font-style:normal;font-weight:500;font-display:swap;src:url(/assets/fonts/manrope-500-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Manrope';font-style:normal;font-weight:700;font-display:swap;src:url(/assets/fonts/manrope-700-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Manrope';font-style:normal;font-weight:700;font-display:swap;src:url(/assets/fonts/manrope-700-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Oswald';font-style:normal;font-weight:500;font-display:swap;src:url(/assets/fonts/oswald-500-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Oswald';font-style:normal;font-weight:500;font-display:swap;src:url(/assets/fonts/oswald-500-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Oswald';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/oswald-600-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Oswald';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/oswald-600-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/ibm-plex-mono-600-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/ibm-plex-mono-600-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Manrope';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/manrope-600-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Manrope';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/fonts/manrope-600-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:'Manrope';font-style:normal;font-weight:800;font-display:swap;src:url(/assets/fonts/manrope-800-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:'Manrope';font-style:normal;font-weight:800;font-display:swap;src:url(/assets/fonts/manrope-800-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}

:root {
  --paper: #f4efe7;
  --paper-deep: #eae3d9;
  --surface: #ffffff;
  --surface-soft: #faf8f4;
  --ink: #191713;
  --ink-soft: #38342e;
  --muted: #6d675e;
  --line: #d9d1c5;
  --line-strong: #c2b8aa;
  --accent: #f68f47;
  --accent-dark: #c65e1e;
  --accent-soft: #fff0e5;
  --danger: #b4232c;
  --danger-soft: #fdebed;
  --warning: #9a6400;
  --warning-soft: #fff4d5;
  --success: #237a4b;
  --success-soft: #e8f5ed;
  --info: #315c8a;
  --info-soft: #eaf2fa;
  --sidebar: #1d1b18;
  --sidebar-muted: #aaa197;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
  --radius-sm: 7px;
  --radius: 11px;
  --radius-lg: 14px;
  --shadow-card: 0 2px 7px rgba(25, 23, 19, 0.08);
  --sidebar-width: 248px;
  --banner-height: 36px;
  --z-sidebar: 30;
  --z-banner: 40;
  --z-modal-backdrop: 60;
  --z-modal: 70;
  --z-toast: 80;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid rgba(246, 143, 71, 0.5);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 6px;
  left: 8px;
  z-index: calc(var(--z-toast) + 1);
  transform: translateY(-140%);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: white;
  padding: 9px 13px;
  font-weight: 700;
  transition: transform 160ms ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.subvalue {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.demo-banner {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-banner);
  display: flex;
  min-height: var(--banner-height);
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
}

.demo-banner svg {
  width: 15px;
  height: 15px;
}

.app-shell {
  min-height: 100vh;
  padding-top: var(--banner-height);
}

.sidebar {
  position: fixed;
  z-index: var(--z-sidebar);
  inset: var(--banner-height) auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  background: var(--sidebar);
  color: white;
}

.sidebar__brand {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: uppercase;
}

.brand-copy span {
  color: var(--sidebar-muted);
  font-size: 11px;
}

.sidebar__label {
  margin: 23px 20px 8px;
  color: #827b73;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar__nav {
  display: grid;
  gap: 4px;
  padding: 0 12px;
}

.nav-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  color: #d1cbc3;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 170ms ease-out, color 170ms ease-out;
}

.nav-link svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  stroke: currentColor;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: white;
}

.nav-link[aria-current="page"],
.nav-link.is-active {
  background: var(--accent);
  color: var(--ink);
}

.nav-link__badge {
  min-width: 22px;
  margin-left: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  padding: 1px 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 19px;
  text-align: center;
}

.nav-link.is-active .nav-link__badge {
  background: rgba(25, 23, 19, 0.14);
}

.sidebar__foot {
  margin-top: auto;
  padding: 18px 20px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  background: #39342e;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.user-card strong,
.user-card span {
  display: block;
}

.user-card strong {
  font-size: 12px;
}

.user-card span {
  color: var(--sidebar-muted);
  font-size: 10px;
}

.mobile-header {
  display: none;
}

.main {
  min-height: calc(100vh - var(--banner-height));
  margin-left: var(--sidebar-width);
}

.content {
  width: min(100%, 1600px);
  margin-inline: auto;
  padding: 29px 30px 46px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-head h1,
.section-title,
.kanban-column__head h2,
.modal-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-transform: uppercase;
  text-wrap: balance;
}

.page-head h1 {
  font-size: 30px;
}

.page-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-head__actions,
.toolbar,
.filter-group,
.button-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.date-chip {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.55);
  padding: 8px 11px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.date-chip svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
}

.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  padding: 9px 13px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  transition: background-color 170ms ease-out, color 170ms ease-out, transform 170ms ease-out;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke: currentColor;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--ink);
}

.btn--primary:hover {
  background: #ea7d34;
}

.btn--dark {
  background: var(--ink);
  color: white;
}

.btn--dark:hover {
  background: #34302a;
}

.btn--ghost {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
}

.btn--ghost:hover {
  border-color: var(--ink-soft);
  background: white;
}

.btn--danger-ghost {
  border: 1px solid #e3a6aa;
  background: transparent;
  color: var(--danger);
}

.btn--small {
  min-height: 31px;
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 10px;
}

.card,
.panel {
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.panel {
  padding: 20px;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.section-title {
  font-size: 18px;
}

.section-meta {
  color: var(--muted);
  font-size: 11px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 17px;
}

.kpi {
  position: relative;
  min-height: 136px;
  overflow: hidden;
  padding: 18px;
}

.kpi::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -40px;
  width: 88px;
  height: 88px;
  border: 18px solid var(--accent-soft);
  border-radius: 50%;
  pointer-events: none;
}

.kpi__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.kpi__label {
  max-width: 22ch;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.kpi__icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.kpi__icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.kpi__value {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.kpi__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.trend {
  color: var(--success);
  font-family: var(--font-mono);
  font-weight: 600;
}

.trend--down {
  color: var(--danger);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
  gap: 17px;
}

.dashboard-stack {
  display: grid;
  align-content: start;
  gap: 17px;
}

.inquiry-list,
.followup-list,
.activity-list,
.timeline,
.size-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.inquiry-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-top: 1px solid #ede8e1;
}

.inquiry-item:first-child {
  border-top: 0;
  padding-top: 3px;
}

.inquiry-icon,
.activity-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
}

.inquiry-item--new .inquiry-icon {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.inquiry-icon svg,
.activity-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.inquiry-copy {
  min-width: 0;
}

.inquiry-copy strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inquiry-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.chip,
.status-chip,
.warehouse-tag,
.price-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-chip {
  gap: 5px;
  padding: 6px 8px;
  font-size: 9px;
}

.status-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-chip--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-chip--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-chip--success {
  background: var(--success-soft);
  color: var(--success);
}

.status-chip--info {
  background: var(--info-soft);
  color: var(--info);
}

.status-chip--neutral {
  background: #efeae3;
  color: #5e574e;
}

.followup-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-top: 1px solid #ede8e1;
}

.followup-item:first-child {
  border-top: 0;
  padding-top: 3px;
}

.followup-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.followup-item strong,
.followup-item span {
  display: block;
}

.followup-item strong {
  color: var(--danger);
  font-size: 11px;
}

.followup-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.followup-time {
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 9px;
}

.mini-chart {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 10px;
}

.chart-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 145px;
  padding-bottom: 21px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  text-align: right;
}

.chart-plot {
  position: relative;
  display: flex;
  height: 145px;
  align-items: flex-end;
  justify-content: space-around;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(to bottom, #ede8e1 1px, transparent 1px);
  background-size: 100% 25%;
}

.chart-bar-wrap {
  display: flex;
  height: 100%;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.chart-bar {
  position: relative;
  width: min(28px, 70%);
  height: calc(var(--value) * 1%);
  min-height: 5px;
  border-radius: 5px 5px 2px 2px;
  background: var(--ink);
  transform-origin: bottom;
  animation: bar-rise 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chart-bar--current {
  background: var(--accent);
}

.chart-bar b {
  position: absolute;
  inset: -17px 50% auto auto;
  transform: translateX(50%);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
}

.chart-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

@keyframes bar-rise {
  from { transform: scaleY(0.1); }
  to { transform: scaleY(1); }
}

.size-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 8px 0;
}

.size-item + .size-item {
  border-top: 1px solid #eee9e2;
}

.size-name,
.size-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.size-count {
  color: var(--muted);
}

.size-track {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8df;
}

.size-track span {
  display: block;
  width: var(--width);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.filters-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  padding: 10px 12px;
}

.filter-group + .filter-group {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.filter-label {
  margin-right: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.chip {
  min-height: 30px;
  border: 1px solid var(--line);
  background: white;
  padding: 6px 10px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 10px;
  transition: border-color 150ms ease-out, background-color 150ms ease-out, color 150ms ease-out;
}

.chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.chip[aria-pressed="true"],
.chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.kanban-wrap {
  overflow-x: auto;
  padding-bottom: 9px;
}

.kanban {
  display: grid;
  min-width: 1120px;
  grid-template-columns: repeat(5, minmax(205px, 1fr));
  gap: 11px;
}

.kanban-column {
  display: flex;
  min-height: 630px;
  flex-direction: column;
  border-radius: var(--radius);
  background: #eae4dc;
  padding: 10px;
}

.kanban-column__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 3px 10px;
}

.kanban-column__head h2 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
}

.kanban-count {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: rgba(25, 23, 19, 0.08);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.kanban-list {
  display: flex;
  min-height: 560px;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  border-radius: 8px;
  transition: background-color 160ms ease-out;
}

.kanban-list.is-over {
  background: rgba(246, 143, 71, 0.13);
}

.order-card {
  position: relative;
  border-radius: 10px;
  background: white;
  padding: 13px;
  box-shadow: 0 1px 4px rgba(25, 23, 19, 0.12);
  cursor: grab;
  transition: box-shadow 160ms ease-out, transform 160ms ease-out, opacity 160ms ease-out;
}

.order-card:hover {
  box-shadow: 0 4px 8px rgba(25, 23, 19, 0.12);
  transform: translateY(-1px);
}

.order-card:active {
  cursor: grabbing;
}

.order-card.is-dragging {
  opacity: 0.45;
}

.order-card--urgent::before {
  content: "";
  position: absolute;
  top: 13px;
  right: 13px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.order-card__id {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.order-card h3 {
  max-width: calc(100% - 12px);
  margin: 7px 0 8px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
}

.order-card__lines {
  margin: 0 0 11px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.65;
}

.order-card__value {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 10px;
}

.order-card__value strong {
  font-family: var(--font-mono);
  font-size: 13px;
}

.order-card__value span {
  color: var(--muted);
  font-size: 9px;
}

.order-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid #eee9e2;
}

.warehouse-tag {
  padding: 5px 7px;
  background: var(--info-soft);
  color: var(--info);
  font-family: var(--font-mono);
  font-size: 8px;
}

.warehouse-tag--mg {
  background: #f1eafb;
  color: #6e4597;
}

.days {
  color: var(--muted);
  font-size: 8px;
}

.days--urgent {
  color: var(--danger);
  font-weight: 800;
}

.order-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 17px;
  padding: 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
}

.breadcrumb a:hover {
  color: var(--accent-dark);
}

.order-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.order-title-row h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-transform: uppercase;
}

.client-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.client-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.client-meta svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.75fr);
  gap: 17px;
}

.detail-stack {
  display: grid;
  align-content: start;
  gap: 17px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink-soft);
  font-size: 11px;
}

.data-table caption {
  text-align: left;
}

.data-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid #eee9e2;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover:not(.low-stock) {
  background: #fcfaf7;
}

.data-table .num {
  text-align: right;
}

.data-table .center {
  text-align: center;
}

.product-name strong,
.product-name span {
  display: block;
}

.product-name strong {
  color: var(--ink);
  font-size: 11px;
}

.product-name span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.table-total td {
  border-top: 2px solid var(--ink);
  border-bottom: 0;
  background: var(--surface-soft);
  font-weight: 800;
}

.table-total .grand-total {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
}

.summary-strip {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  padding: 15px 12px 2px;
  text-align: right;
}

.summary-strip span,
.summary-strip strong {
  display: block;
}

.summary-strip span {
  color: var(--muted);
  font-size: 9px;
}

.summary-strip strong {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.summary-strip__grand strong {
  color: var(--accent-dark);
  font-size: 17px;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 14px;
  left: 6px;
  width: 1px;
  background: var(--line);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  gap: 11px;
  padding-bottom: 17px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: 2px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--line-strong);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.timeline li.is-done .timeline-dot {
  background: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}

.timeline li.is-current .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline strong,
.timeline span {
  display: block;
}

.timeline strong {
  font-size: 10px;
}

.timeline span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #eee9e2;
}

.activity-item:first-child {
  padding-top: 2px;
  border-top: 0;
}

.activity-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.activity-icon svg {
  width: 14px;
  height: 14px;
}

.activity-copy strong,
.activity-copy span,
.activity-copy time {
  display: block;
}

.activity-copy strong {
  font-size: 10px;
}

.activity-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.activity-copy time {
  margin-top: 4px;
  color: #8d857b;
  font-family: var(--font-mono);
  font-size: 8px;
}

.eudr-panel {
  background: #24211e;
  color: white;
}

.eudr-panel .section-title {
  max-width: 25ch;
  color: white;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.45;
  text-transform: none;
}

.eudr-panel .status-chip--warning {
  background: rgba(255, 244, 213, 0.12);
  color: #ffd978;
}

.eudr-ref {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 15px 0;
}

.eudr-ref div {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px;
}

.eudr-ref span,
.eudr-ref strong {
  display: block;
}

.eudr-ref span {
  color: #aaa198;
  font-size: 8px;
}

.eudr-ref strong {
  margin-top: 4px;
  color: white;
  font-family: var(--font-mono);
  font-size: 9px;
}

.field label {
  display: block;
  margin-bottom: 5px;
  color: inherit;
  font-size: 9px;
  font-weight: 700;
}

.input,
.select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 8px 10px;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.input::placeholder {
  color: #716a60;
  opacity: 1;
}

.input:focus,
.select:focus {
  border-color: var(--accent-dark);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(246, 143, 71, 0.2);
}

.eudr-panel .input {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-family: var(--font-mono);
  font-size: 10px;
}

.eudr-panel .input::placeholder {
  color: #aaa198;
}

.eudr-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 0 0;
  color: #cbc3ba;
  font-size: 9px;
  line-height: 1.45;
}

.eudr-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  stroke: var(--accent);
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  padding: 10px;
}

.search-field {
  position: relative;
  min-width: min(100%, 310px);
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  stroke: var(--muted);
  pointer-events: none;
}

.search-field .input {
  padding-left: 34px;
}

.toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.select-wrap label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.select {
  min-width: 160px;
  cursor: pointer;
  font-size: 11px;
}

.table-panel {
  overflow: hidden;
  padding: 0;
}

.table-panel .data-table th,
.table-panel .data-table td {
  padding: 12px 14px;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
}

.sort-button svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
}

th[aria-sort="ascending"] .sort-button,
th[aria-sort="descending"] .sort-button {
  color: var(--ink);
}

th[aria-sort="ascending"] .sort-button svg {
  transform: rotate(180deg);
}

.company-cell strong,
.company-cell span {
  display: block;
}

.company-cell strong {
  color: var(--ink);
  font-size: 11px;
}

.company-cell span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.phone-link {
  font-family: var(--font-mono);
  font-size: 9px;
}

.phone-link:hover {
  color: var(--accent-dark);
}

.price-level {
  width: 25px;
  height: 25px;
  background: #eeeae4;
  font-family: var(--font-mono);
  font-size: 10px;
}

.price-level--a {
  background: var(--success-soft);
  color: var(--success);
}

.price-level--b {
  background: var(--info-soft);
  color: var(--info);
}

.price-level--c {
  background: var(--warning-soft);
  color: var(--warning);
}

.stock-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.stock-total {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.low-stock {
  background: var(--danger-soft);
}

.low-stock:hover {
  background: #fbe1e3;
}

.low-stock .stock-total {
  color: var(--danger);
}

.stock-alert {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--danger);
  font-size: 8px;
  font-weight: 800;
}

.stock-alert::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.stock-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 10px;
}

.stock-summary strong {
  color: var(--ink);
  font-family: var(--font-mono);
}

.empty-state {
  padding: 44px 18px !important;
  color: var(--muted);
  text-align: center;
}

dialog {
  max-width: none;
}

.offer-dialog {
  width: min(850px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  overflow: auto;
  border: 0;
  border-radius: 12px;
  background: white;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 10px 40px rgba(25, 23, 19, 0.24);
}

.offer-dialog::backdrop {
  background: rgba(25, 23, 19, 0.62);
}

.modal-toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: white;
  padding: 12px 18px;
}

.modal-title {
  font-size: 17px;
}

.offer-sheet {
  padding: 42px 48px 50px;
}

.offer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--ink);
}

.offer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.offer-logo strong {
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: uppercase;
}

.offer-head__meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: right;
}

.offer-head__meta strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
}

.offer-client {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 25px 0;
}

.offer-client h3 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.offer-client strong,
.offer-client span {
  display: block;
}

.offer-client strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.offer-client span {
  color: var(--muted);
  font-size: 10px;
}

.offer-terms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 25px;
  background: var(--line);
  border: 1px solid var(--line);
}

.offer-terms div {
  background: var(--surface-soft);
  padding: 12px;
}

.offer-terms span,
.offer-terms strong {
  display: block;
}

.offer-terms span {
  color: var(--muted);
  font-size: 8px;
}

.offer-terms strong {
  margin-top: 4px;
  font-size: 10px;
}

.offer-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}

.toast {
  position: fixed;
  z-index: var(--z-toast);
  right: 22px;
  bottom: 22px;
  display: flex;
  max-width: min(370px, calc(100% - 30px));
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  padding: 12px 15px;
  box-shadow: 0 6px 16px rgba(25, 23, 19, 0.25);
  font-size: 11px;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  stroke: var(--accent);
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid > .detail-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eudr-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  :root {
    --mobile-header-height: 59px;
  }

  .sidebar {
    top: calc(var(--banner-height) + var(--mobile-header-height));
    transform: translateX(-102%);
    box-shadow: 8px 0 20px rgba(25, 23, 19, 0.2);
    transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .mobile-header {
    position: fixed;
    z-index: calc(var(--z-sidebar) - 1);
    inset: var(--banner-height) 0 auto;
    display: flex;
    height: var(--mobile-header-height);
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 239, 231, 0.96);
    padding: 0 16px;
  }

  .mobile-header__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .mobile-header .brand-mark {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    font-size: 13px;
  }

  .menu-toggle {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    cursor: pointer;
  }

  .menu-toggle svg {
    width: 19px;
    height: 19px;
    stroke: var(--ink);
  }

  .main {
    margin-left: 0;
    padding-top: var(--mobile-header-height);
  }

  .content {
    padding-inline: 20px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .content {
    padding: 22px 13px 34px;
  }

  .page-head,
  .order-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-head {
    margin-bottom: 18px;
  }

  .page-head h1 {
    font-size: 26px;
  }

  .page-head__actions,
  .order-header__actions {
    width: 100%;
  }

  .page-head__actions .btn,
  .order-header__actions .btn {
    flex: 1;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi {
    min-height: 122px;
  }

  .inquiry-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .inquiry-item .status-chip {
    grid-column: 2;
    justify-self: start;
  }

  .filter-group + .filter-group {
    width: 100%;
    padding: 9px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .order-title-row h1 {
    font-size: 23px;
  }

  .detail-grid > .detail-stack {
    grid-template-columns: 1fr;
  }

  .eudr-panel {
    grid-column: auto;
  }

  .summary-strip {
    justify-content: space-between;
    gap: 12px;
  }

  .toolbar,
  .toolbar__filters,
  .search-field,
  .select-wrap,
  .select {
    width: 100%;
  }

  .offer-sheet {
    padding: 28px 20px 35px;
  }

  .offer-head,
  .offer-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .offer-head__meta {
    text-align: left;
  }

  .offer-client,
  .offer-terms {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    margin: 14mm;
    size: A4;
  }

  body * {
    visibility: hidden !important;
  }

  .offer-dialog,
  .offer-dialog * {
    visibility: visible !important;
  }

  .offer-dialog {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    max-height: none;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
  }

  .modal-toolbar {
    display: none;
  }

  .offer-sheet {
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
