@font-face {
  font-family: "Bitrix Open Sans";
  src: url("/fonts/bitrix-open-sans/OpenSans-Regular.woff2") format("woff2"),
       url("/fonts/bitrix-open-sans/OpenSans-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bitrix Open Sans";
  src: url("/fonts/bitrix-open-sans/OpenSans-SemiBold.woff2") format("woff2"),
       url("/fonts/bitrix-open-sans/OpenSans-SemiBold.woff") format("woff");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-main: "Bitrix Open Sans", "Open Sans", "Segoe UI", Arial, sans-serif;
  --vitokin-black: #101820;
  --vitokin-black-2: #17212b;
  --vitokin-blue: #0067b1;
  --vitokin-blue-hover: #00518d;
  --vitokin-blue-soft: #e7f2fb;
  --vitokin-red: #e53935;
  --vitokin-yellow: #f5b400;
  --vitokin-green: #1d9d63;
  --vitokin-orange: #f47b20;
  --page-bg: #f5f6f8;
  --page-bg-2: #eef1f4;
  --card: #ffffff;
  --card-soft: #f9fafb;
  --line: #e2e6ea;
  --line-strong: #cfd6dd;
  --text: #1f2933;
  --heading: #111820;
  --muted: #697783;
  --muted-2: #8b98a3;
  --shadow: 0 10px 28px rgba(16, 24, 32, 0.08);
  --shadow-soft: 0 5px 18px rgba(16, 24, 32, 0.06);
  --radius: 14px;

  /* OW.Web.Foundation theming contract for reusable web-modules. */
  --ow-web-font-main: var(--font-main);
  --ow-web-page-bg: var(--page-bg);
  --ow-web-page-bg-soft: var(--page-bg-2);
  --ow-web-surface: var(--card);
  --ow-web-surface-soft: var(--card-soft);
  --ow-web-border: var(--line);
  --ow-web-border-strong: var(--line-strong);
  --ow-web-text: var(--text);
  --ow-web-heading: var(--heading);
  --ow-web-muted: var(--muted);
  --ow-web-muted-soft: var(--muted-2);
  --ow-web-accent: var(--vitokin-blue);
  --ow-web-accent-hover: var(--vitokin-blue-hover);
  --ow-web-accent-soft: var(--vitokin-blue-soft);
  --ow-web-danger: var(--vitokin-red);
  --ow-web-warning: var(--vitokin-yellow);
  --ow-web-success: var(--vitokin-green);
  --ow-web-orange: var(--vitokin-orange);
  --ow-web-shadow: var(--shadow);
  --ow-web-shadow-soft: var(--shadow-soft);
  --ow-web-radius: var(--radius);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font-main);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(0,103,177,0.05) 0, rgba(0,103,177,0.05) 24%, transparent 24%, transparent 100%),
    linear-gradient(180deg, #ffffff 0, var(--page-bg) 265px, var(--page-bg) 100%);
  overflow-x: hidden;
}

body.auth-page {
  background:
    linear-gradient(135deg, rgba(0,103,177,0.10) 0, rgba(0,103,177,0.10) 24%, transparent 24%, transparent 100%),
    linear-gradient(180deg, #f8fafc 0, #eef2f6 100%);
}

a { color: inherit; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.erp-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.erp-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--card);
  z-index: 20;
  box-shadow: 8px 0 22px rgba(16, 24, 32, 0.04);
}

.erp-brand {
  min-height: 76px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  background: var(--vitokin-black);
  border-bottom: 4px solid var(--vitokin-blue);
}

.erp-brand__name {
  color: #ffffff;
  font-size: 19px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.erp-nav {
  padding: 14px 12px 20px;
  overflow: auto;
}

.erp-nav__group {
  margin: 18px 8px 8px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.erp-nav__link {
  position: relative;
  min-height: 42px;
  padding: 0 10px 0 12px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  color: #27323c;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.erp-nav__link:hover {
  color: var(--vitokin-blue);
  background: var(--vitokin-blue-soft);
}

.erp-nav__link--active {
  color: #ffffff;
  background: var(--vitokin-blue);
  box-shadow: 0 8px 18px rgba(0, 103, 177, 0.20);
}

.erp-nav__link--active:hover {
  color: #ffffff;
  background: var(--vitokin-blue-hover);
}

.erp-nav__icon {
  position: relative;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 4px;
  opacity: 0.9;
}

.erp-nav__icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.5;
}

.erp-nav__chevron {
  color: currentColor;
  font-size: 20px;
  line-height: 1;
  opacity: 0.55;
  transition: transform 0.18s ease;
}

.erp-nav__link[aria-expanded="true"] .erp-nav__chevron {
  transform: rotate(90deg);
}

.erp-nav__submenu {
  margin: 3px 0 7px 32px;
  padding-left: 13px;
  border-left: 1px solid var(--line);
}

.erp-nav__submenu[hidden] {
  display: none;
}

.erp-nav__sublink {
  min-height: 34px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.erp-nav__sublink:hover {
  color: var(--vitokin-blue);
  background: var(--vitokin-blue-soft);
}

.erp-nav__sublink--active {
  color: var(--vitokin-blue);
  background: #f0f7fd;
}

.erp-nav__subicon {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.68;
}

.erp-sidebar__collapse {
  width: calc(100% - 28px);
  margin: auto 14px 18px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  background: #f7f9fb;
  cursor: pointer;
  font-weight: 600;
}

.erp-sidebar__collapse:hover {
  border-color: var(--vitokin-blue);
  color: var(--vitokin-blue);
  background: var(--vitokin-blue-soft);
}

.erp-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.erp-topbar {
  position: sticky;
  top: 0;
  min-height: 76px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  z-index: 15;
}

.erp-topbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vitokin-blue), #2e8ed2 45%, var(--vitokin-red));
}

.erp-topbar__title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.erp-topbar__title h1 {
  margin: 0;
  color: var(--heading);
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
}

.erp-topbar__title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.erp-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.period-button,
.icon-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.period-button:hover,
.icon-button:hover {
  border-color: var(--vitokin-blue);
  color: var(--vitokin-blue);
}

.period-button {
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
}

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

.calendar-dot {
  width: 14px;
  height: 14px;
  border: 1px solid var(--muted-2);
  border-radius: 3px;
}

.icon-button {
  width: 38px;
  display: inline-grid;
  place-items: center;
  font-size: 18px;
}

.icon-button--compact {
  width: 28px;
  min-height: 28px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: none;
}

.icon-button--menu {
  width: 38px;
  border-color: var(--vitokin-blue);
  background: var(--vitokin-blue);
  box-shadow: none;
}

.icon-button--menu:hover {
  color: #ffffff;
  background: var(--vitokin-blue-hover);
}

.icon-button--menu span {
  width: 20px;
  height: 2px;
  background: #ffffff;
  display: block;
  border-radius: 999px;
}

.icon-button--menu span + span { margin-top: 5px; }

.icon-button--notification {
  position: relative;
}

.icon-button--notification span {
  position: absolute;
  top: -7px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--vitokin-red);
  font-size: 10px;
  font-weight: 800;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 6px;
}

.user-chip__avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--vitokin-black);
  color: #ffffff;
  border: 2px solid var(--vitokin-blue);
  font-weight: 800;
  font-size: 12px;
}

.user-chip__text {
  display: grid;
  gap: 1px;
  min-width: 86px;
}

.user-chip__text strong {
  color: var(--heading);
  font-size: 13px;
}

.user-chip__text small {
  color: var(--muted);
  font-size: 11px;
}

.user-chip__caret {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  transition: transform 0.16s ease, color 0.16s ease;
}

.user-menu {
  position: relative;
}

.user-chip-form { margin: 0; }

.user-chip--button {
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.user-chip--button:hover .user-chip__avatar,
.user-chip--login:hover .user-chip__avatar,
.user-menu.is-open .user-chip__avatar {
  background: var(--vitokin-blue);
  box-shadow: 0 8px 18px rgba(0, 103, 177, 0.24);
}

.user-chip--button:hover .user-chip__caret,
.user-menu.is-open .user-chip__caret {
  color: var(--vitokin-blue);
}

.user-menu.is-open .user-chip__caret {
  transform: rotate(180deg);
}

.user-menu__panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 244px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(16, 24, 32, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 60;
}

.user-menu.is-open .user-menu__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.user-menu__panel::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 18px;
  width: 12px;
  height: 12px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: #ffffff;
  transform: rotate(45deg);
}

.user-menu__head {
  position: relative;
  padding: 10px 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.user-menu__avatar {
  width: 34px;
  height: 34px;
  border-color: var(--vitokin-blue);
}

.user-menu__head span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.user-menu__head strong {
  color: var(--heading);
  font-size: 13px;
  line-height: 1.25;
}

.user-menu__head small {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__item {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.user-menu__item:hover,
.user-menu__item:focus-visible {
  color: var(--vitokin-blue);
  background: var(--vitokin-blue-soft);
  outline: none;
}

.user-menu__item--danger {
  color: var(--vitokin-red);
}

.user-menu__item--danger:hover,
.user-menu__item--danger:focus-visible {
  color: #ffffff;
  background: var(--vitokin-red);
}

.user-menu__form {
  margin: 6px 0 0;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.user-chip--login {
  padding: 0;
  color: inherit;
  text-decoration: none;
}

.erp-content {
  width: 100%;
  padding: 18px 24px 30px;
}


[hidden] { display: none !important; }

.dashboard-control {
  margin-bottom: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--vitokin-blue);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.dashboard-control__text {
  min-width: 0;
}

.dashboard-control__text span {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--vitokin-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-control__text h2 {
  margin: 0;
  color: var(--heading);
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.dashboard-control__text p {
  max-width: 920px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-control__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.dashboard-config {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #d7e8f5;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: var(--shadow-soft);
}

.dashboard-config__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-config__header h2 {
  margin: 0;
  color: var(--heading);
  font-size: 18px;
}

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

.dashboard-config__groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
}

.dashboard-config__group {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.dashboard-config__group h3 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-config__item {
  min-height: 44px;
  padding: 8px 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.dashboard-config__item:first-of-type { border-top: 0; }

.dashboard-config__item input {
  margin-top: 2px;
  accent-color: var(--vitokin-blue);
}

.dashboard-config__item strong {
  display: block;
  color: var(--heading);
  font-size: 12px;
  line-height: 1.3;
}

.dashboard-config__item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.dashboard-empty {
  min-height: 180px;
  margin-bottom: 16px;
  padding: 28px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  text-align: center;
}

.dashboard-empty strong {
  color: var(--heading);
  font-size: 18px;
}

.dashboard-empty span {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-widget.is-hidden {
  display: none !important;
}

.widget-action {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted-2);
  background: rgba(255,255,255,0.88);
  opacity: 0;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  transition: opacity 0.16s ease, color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.dashboard-widget:hover .widget-action,
.widget-action:focus-visible {
  opacity: 1;
}

.widget-action:hover,
.widget-action:focus-visible {
  border-color: #ffd0ce;
  color: var(--vitokin-red);
  background: #fff5f5;
  outline: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi-card,
.panel,
.page-card,
.template-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.kpi-card,
.panel,
.page-card {
  border-top: 3px solid #ffffff;
}

.kpi-card:hover,
.panel:hover,
.template-card:hover {
  box-shadow: var(--shadow);
}

.kpi-card {
  min-height: 120px;
  padding: 16px 16px 10px;
}

.kpi-card::before,
.panel::before,
.page-card::before,
.template-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vitokin-blue), rgba(0,103,177,0.15));
  opacity: 0;
}

.kpi-card:hover::before,
.panel:hover::before,
.page-card:hover::before,
.template-card:hover::before { opacity: 1; }

.kpi-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.kpi-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--vitokin-blue-soft);
  color: var(--vitokin-blue);
  font-weight: 800;
  font-size: 19px;
}

.kpi-card--green .kpi-card__icon { color: var(--vitokin-green); background: #e7f6ee; }
.kpi-card--cyan .kpi-card__icon { color: var(--vitokin-blue); background: var(--vitokin-blue-soft); }
.kpi-card--orange .kpi-card__icon { color: var(--vitokin-orange); background: #fff0e5; }

.kpi-card strong {
  display: block;
  margin-top: -4px;
  color: var(--heading);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.trend {
  display: flex;
  gap: 6px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.trend span:first-child,
.trend small,
small.trend {
  color: var(--vitokin-green);
  font-weight: 700;
}

.trend--down span:first-child { color: var(--vitokin-red); }
.trend--info { color: var(--vitokin-blue) !important; }

.sparkline {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  width: calc(100% - 28px);
  height: 36px;
  opacity: 0.82;
}

.sparkline polyline,
.chart-line polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-card--cyan .sparkline { color: var(--vitokin-blue); }
.kpi-card--green .sparkline { color: var(--vitokin-green); }
.kpi-card--blue .sparkline { color: var(--vitokin-blue); }
.kpi-card--orange .sparkline { color: var(--vitokin-orange); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.63fr 0.76fr;
  grid-auto-rows: minmax(126px, auto);
  gap: 14px;
}

.panel { padding: 17px 16px; }

.revenue-panel,
.stock-panel,
.purchases-panel { min-height: 315px; }

.cash-panel,
.production-panel,
.delivery-panel { min-height: 272px; }

.events-panel {
  grid-column: span 2;
  min-height: 146px;
}

.calendar-panel { min-height: 146px; }

.panel__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.panel__header h2 {
  margin: 0;
  color: var(--heading);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.panel__header small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.panel__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.legend::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: currentColor;
}

.legend--blue { color: var(--vitokin-blue); }
.legend--green { color: var(--vitokin-green); }
.legend--purple { color: #8655ba; }

.mini-select,
.dots {
  border: 1px solid var(--line);
  color: var(--text);
  background: #ffffff;
  border-radius: 9px;
  min-height: 30px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.mini-select:hover,
.dots:hover {
  border-color: var(--vitokin-blue);
  color: var(--vitokin-blue);
}

.dots {
  width: 30px;
  padding: 0;
}

.chart {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 38px;
  min-height: 230px;
}

.chart__y,
.chart__right-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 11px;
}

.chart__right-scale { align-items: end; }

.bar-chart {
  position: relative;
  height: 218px;
  display: grid;
  grid-template-columns: repeat(31, minmax(6px, 1fr));
  align-items: end;
  gap: 8px;
  padding: 0 6px;
  border-bottom: 1px solid var(--line-strong);
  background:
    repeating-linear-gradient(to top, transparent 0, transparent 35px, rgba(16,24,32,0.06) 36px),
    #ffffff;
}

.bar-chart__day {
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
}

.bar {
  width: 8px;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  opacity: 0.95;
}

.bar--blue { background: linear-gradient(180deg, #2e8ed2, var(--vitokin-blue)); }
.bar--green { background: linear-gradient(180deg, #47bd83, var(--vitokin-green)); }

.chart-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.chart-line--purple {
  color: #8655ba;
  filter: drop-shadow(0 0 4px rgba(134, 85, 186, 0.18));
}

.chart__x {
  position: relative;
  z-index: 1;
  margin: 8px 38px 0 52px;
  display: flex;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 11px;
}

.stock-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.donut {
  position: relative;
  width: 208px;
  height: 208px;
  border-radius: 50%;
  background: conic-gradient(var(--vitokin-green) 0 37.8%, var(--vitokin-blue) 37.8% 77.7%, var(--vitokin-yellow) 77.7% 91%, var(--vitokin-red) 91% 100%);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 20px rgba(16,24,32,0.14), 0 9px 24px rgba(16,24,32,0.08);
}

.donut::before {
  content: "";
  position: absolute;
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background: #ffffff;
}

.donut__center {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  text-align: center;
}

.donut__center span,
.donut__center small {
  color: var(--muted);
  font-size: 12px;
}

.donut__center strong {
  color: var(--heading);
  font-size: 17px;
}

.stock-legend {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  list-style: none;
}

.stock-legend li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 4px;
  color: var(--text);
  font-size: 13px;
}

.stock-legend strong {
  grid-column: 2;
  color: var(--muted);
  font-weight: 500;
}

.stock-color {
  width: 12px;
  height: 12px;
  margin-top: 2px;
  border-radius: 2px;
}

.stock-color--green { background: var(--vitokin-green); }
.stock-color--cyan { background: var(--vitokin-blue); }
.stock-color--yellow { background: var(--vitokin-yellow); }
.stock-color--red { background: var(--vitokin-red); }

.panel-link,
.template-card a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 15px;
  color: var(--vitokin-blue);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.panel-link:hover,
.template-card a:hover { color: var(--vitokin-blue-hover); }

.data-table {
  position: relative;
  z-index: 1;
  display: grid;
}

.data-table__head,
.data-table__row {
  display: grid;
  align-items: center;
  gap: 12px;
}

.data-table__head {
  min-height: 32px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.data-table__row {
  min-height: 45px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
}

.data-table__row strong {
  display: block;
  color: var(--heading);
  font-size: 13px;
  font-weight: 700;
}

.data-table__row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.data-table--purchases .data-table__head,
.data-table--purchases .data-table__row {
  grid-template-columns: minmax(0, 1.35fr) 90px minmax(86px, 0.7fr);
}

.data-table--production .data-table__head,
.data-table--production .data-table__row {
  grid-template-columns: 92px minmax(0, 1.25fr) minmax(0, 1fr) 130px 110px;
}

.data-table--delivery .data-table__head,
.data-table--delivery .data-table__row {
  grid-template-columns: 108px minmax(0, 1.2fr) 92px 92px;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 700;
  font-size: 11px;
}

.status--danger { color: #9f1d1d; background: #ffe8e7; }
.status--warning { color: #8a6200; background: #fff2c7; }
.status--risk { color: #92520e; background: #fff0e5; }
.status--success { color: #126a43; background: #e6f7ee; }
.status--info { color: #07598f; background: var(--vitokin-blue-soft); }
.status--muted { color: #4c5965; background: #eef1f4; }

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  vertical-align: middle;
}

.badge--danger { color: #ffffff; background: var(--vitokin-red); }
.badge--info { color: #ffffff; background: var(--vitokin-blue); }

.cash-chart {
  position: relative;
  z-index: 1;
  height: 150px;
  display: grid;
  grid-template-columns: repeat(31, minmax(5px, 1fr));
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  border-bottom: 1px solid var(--line-strong);
  background: repeating-linear-gradient(to top, transparent 0, transparent 28px, rgba(16,24,32,0.06) 29px);
}

.cash-day {
  height: 130px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
}

.cash-bar {
  width: 7px;
  min-height: 4px;
  border-radius: 3px;
}

.cash-bar--in {
  align-self: end;
  background: linear-gradient(180deg, #47bd83, var(--vitokin-green));
}

.cash-bar--out {
  align-self: start;
  background: linear-gradient(180deg, #2e8ed2, var(--vitokin-blue));
}

.cash-summary {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.cash-summary div {
  min-height: 62px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  border-right: 1px solid var(--line);
}

.cash-summary div:last-child { border-right: 0; }
.cash-summary span { color: var(--muted); font-size: 12px; }
.cash-summary strong { color: var(--heading); font-size: 18px; }
.cash-summary small { font-size: 12px; font-style: normal; }

.progress {
  width: 86px;
  height: 7px;
  display: inline-flex;
  margin-right: 8px;
  border-radius: 999px;
  background: #e6ebef;
  overflow: hidden;
  vertical-align: middle;
}

.progress i {
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--vitokin-blue), #43a5df);
}

.event-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.event-card {
  min-height: 78px;
  padding: 3px 18px 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 2px;
  border-right: 1px solid var(--line);
  font-size: 12px;
}

.event-card:last-child { border-right: 0; }

.event-card__icon {
  grid-row: span 4;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.event-card__icon--blue { color: var(--vitokin-blue); background: var(--vitokin-blue-soft); }
.event-card__icon--cyan { color: var(--vitokin-blue); background: var(--vitokin-blue-soft); }
.event-card__icon--green { color: var(--vitokin-green); background: #e6f7ee; }
.event-card__icon--red { color: var(--vitokin-red); background: #ffe8e7; }

.event-card strong { color: var(--heading); font-size: 13px; }
.event-card span:not(.event-card__icon) { color: var(--text); }
.event-card small { color: var(--muted); }
.event-card em { color: var(--muted-2); font-style: normal; }

.calendar-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px 8px;
  color: var(--text);
  font-size: 12px;
  text-align: center;
}

.calendar-grid span {
  min-height: 18px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}

.calendar-grid__header { color: var(--muted); font-size: 11px; }
.calendar-grid__empty { opacity: 0; }
.calendar-grid__weekend { color: var(--vitokin-red); }
.calendar-grid__active { color: white; background: var(--vitokin-blue); }

.page-card { padding: 22px; }

.page-card h2,
.template-card h3 {
  margin: 0 0 10px;
  color: var(--heading);
}

.page-card p,
.template-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.template-card { padding: 18px; }
.template-card a { margin-top: 16px; }

.auth-shell {
  min-height: 100vh;
  padding: 38px 20px;
  display: grid;
  align-items: center;
  justify-items: center;
}

.auth-card {
  width: min(100%, 452px);
  margin: 40px auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--vitokin-blue);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 65px rgba(16, 24, 32, 0.14);
}

.auth-card__head { margin-bottom: 24px; }


.auth-card h1 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 30px;
  line-height: 1.1;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 8px;
  color: var(--heading);
  font-size: 13px;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 14px;
  color: var(--heading);
  background: #ffffff;
  outline: none;
}

.auth-field input::placeholder { color: #a3adb6; }

.auth-field input:focus {
  border-color: var(--vitokin-blue);
  box-shadow: 0 0 0 3px rgba(0, 103, 177, 0.12);
}

.auth-field em {
  color: #b42318;
  font-style: normal;
  font-size: 12px;
  line-height: 1.45;
}

.auth-validation {
  color: #b42318;
  font-style: normal;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid rgba(180, 35, 24, 0.22);
  border-radius: 10px;
  background: #fff7f5;
  padding: 10px 12px;
}

.auth-validation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-validation li + li { margin-top: 4px; }

.auth-validation:empty { display: none; }

.auth-check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--vitokin-blue);
}

.auth-submit {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: var(--vitokin-blue);
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(0, 103, 177, 0.22);
}

.auth-submit:hover { background: var(--vitokin-blue-hover); }

.auth-note {
  margin-top: 20px;
  padding: 13px 14px;
  border: 1px solid #d7e8f5;
  border-radius: 12px;
  color: var(--muted);
  background: var(--vitokin-blue-soft);
  font-size: 13px;
  line-height: 1.5;
}

.auth-note strong {
  display: block;
  color: #07598f;
  margin-bottom: 4px;
}

@media (max-width: 1680px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.75fr); }
  .events-panel { grid-column: span 1; }
}

@media (max-width: 1180px) {
  .dashboard-control { align-items: flex-start; flex-direction: column; }
  .dashboard-config__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .erp-shell { grid-template-columns: 1fr; }

  .erp-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 272px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

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

  .erp-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .erp-topbar__actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .dashboard-grid { grid-template-columns: 1fr; }
  .kpi-grid, .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-layout { grid-template-columns: 1fr; justify-items: center; }
  .event-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
}

@media (max-width: 720px) {
  .dashboard-control, .dashboard-config { padding: 14px; }
  .dashboard-control__actions { width: 100%; }
  .dashboard-control__actions .period-button { flex: 1; justify-content: center; }
  .dashboard-config__groups { grid-template-columns: 1fr; }
  .erp-content { padding: 12px; }
  .kpi-grid, .template-grid { grid-template-columns: 1fr; }
  .panel { padding: 14px; }
  .data-table { overflow-x: auto; }
  .data-table__head, .data-table__row { min-width: 620px; }
  .period-button--muted, .user-chip__text { display: none; }
  .event-strip { grid-template-columns: 1fr; }
  .cash-summary { grid-template-columns: 1fr; }
  .cash-summary div { border-right: 0; border-bottom: 1px solid var(--line); }
  .cash-summary div:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
  .auth-shell {
    padding: 24px 14px;
    align-items: start;
  }

  .auth-card {
    margin: 32px auto 0;
    padding: 22px;
  }

  .auth-card h1 { font-size: 26px; }
}

/* Dashboard without demo business data */
.module-widget__empty span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-status-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.dashboard-status-grid .kpi-card {
  min-height: 170px;
  padding-bottom: 16px;
}

.dashboard-status-grid .kpi-card[data-widget-id="system.dashboard-admin-status"] {
  grid-column: 1 / -1;
}

.dashboard-status-grid .kpi-card strong {
  margin-top: 14px;
  font-size: 21px;
}

.status-note {
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.status-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-system-status-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.dashboard-system-status-list__item {
  display: grid;
  grid-template-columns: minmax(140px, 0.75fr) auto minmax(0, 1.6fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.dashboard-system-status-list__item > span {
  color: var(--heading);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-system-status-list__item > small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .dashboard-system-status-list__item {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.dashboard-module-grid {
  align-items: stretch;
}

.module-widget {
  min-height: 190px;
  display: flex;
  flex-direction: column;
}

.module-widget--wide {
  grid-column: span 2;
}

.module-widget--small {
  min-height: 170px;
}

.module-widget__empty {
  flex: 1;
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #f8fafc;
}

.module-widget__empty strong {
  color: var(--heading);
  font-size: 15px;
  word-break: break-word;
}

.module-widget__empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .dashboard-status-grid {
    grid-template-columns: 1fr;
  }

  .module-widget--wide {
    grid-column: auto;
  }
}

.empty-state {
  margin-top: 16px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: var(--card-soft);
}

.empty-state h3 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 16px;
}

.empty-state p {
  margin: 0;
  max-width: 760px;
}

/* Real ERP section shell pages */
.module-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
}

.module-hero__text h2 {
  margin: 6px 0 10px;
  color: var(--heading);
  font-size: 28px;
  line-height: 1.12;
}

.module-hero__text p,
.module-access-note p {
  margin: 0;
  max-width: 860px;
  color: var(--muted);
  line-height: 1.55;
}

.module-access-note p + p {
  margin-top: 10px;
}

.module-eyebrow,
.module-hero__status span,
.module-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-hero__status {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid #d7e8f5;
  border-radius: 16px;
  background: var(--vitokin-blue-soft);
}

.module-hero__status strong {
  color: #07598f;
  font-size: 15px;
  word-break: break-word;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.module-card {
  min-height: 146px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.module-card--wide {
  grid-column: 1 / -1;
}

.module-card strong {
  display: block;
  margin-top: 8px;
  color: var(--heading);
  font-size: 17px;
  word-break: break-word;
}

.module-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.module-feature-list {
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.module-feature-list li {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-soft);
  color: var(--heading);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .module-hero,
  .module-grid,
  .module-feature-list {
    grid-template-columns: 1fr;
  }
}

/* Dashboard module widgets with real module data */
.module-widget__primary {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #d7e8f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.module-widget__primary span,
.module-widget__metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-widget__primary strong {
  display: block;
  margin-top: 5px;
  color: var(--heading);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.module-widget__metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.module-widget__metrics div {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.module-widget__metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--heading);
  font-size: 19px;
  line-height: 1.1;
}

.module-widget__metrics small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.module-widget__rows {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.module-widget__row {
  min-height: 42px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
}

.module-widget__row span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.module-widget__row strong {
  color: var(--heading);
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-widget__row small {
  color: var(--muted);
  font-size: 11px;
}

.module-widget__row em {
  flex: 0 0 auto;
  min-width: 52px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--vitokin-blue);
  background: var(--vitokin-blue-soft);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.module-widget__empty--compact {
  min-height: 104px;
  align-content: start;
}

@media (max-width: 720px) {
  .module-widget__metrics {
    grid-template-columns: 1fr;
  }
}

/* Native ERP UI primitives for embedded web modules */
.erp-section {
  padding: 0;
}

.erp-surface {
  color: var(--text);
}

.erp-container {
  width: min(100%, 1480px);
  margin: 0 auto;
}

.erp-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.erp-card:hover {
  box-shadow: var(--shadow);
}

.erp-h1 {
  font-size: 26px;
  line-height: 1.18;
  font-weight: 800;
  color: var(--heading);
}

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

.erp-btn {
  min-height: 38px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.erp-btn-sm {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.erp-btn-primary {
  color: #ffffff;
  background: var(--vitokin-blue);
  border-color: var(--vitokin-blue);
  box-shadow: 0 9px 18px rgba(0, 103, 177, 0.18);
}

.erp-btn-primary:hover,
.erp-btn-primary:focus-visible {
  color: #ffffff;
  background: var(--vitokin-blue-hover);
  border-color: var(--vitokin-blue-hover);
}

.erp-btn-secondary {
  color: var(--text);
  background: #ffffff;
  border-color: var(--line-strong);
}

.erp-btn-secondary:hover,
.erp-btn-secondary:focus-visible {
  color: var(--vitokin-blue);
  border-color: var(--vitokin-blue);
  background: var(--vitokin-blue-soft);
}

.erp-btn-danger {
  color: var(--vitokin-red);
  background: #ffffff;
  border-color: rgba(229, 57, 53, 0.35);
}

.erp-btn-danger:hover,
.erp-btn-danger:focus-visible {
  color: #ffffff;
  background: var(--vitokin-red);
  border-color: var(--vitokin-red);
}

.erp-btn-link {
  color: var(--vitokin-blue);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.erp-btn:focus-visible,
.erp-input:focus-visible,
.erp-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 103, 177, 0.12);
}

.erp-form-grid {
  display: flex;
  flex-wrap: wrap;
  margin: -8px;
  row-gap: 16px;
}

.erp-form-grid > [class*="erp-col-"] {
  width: 100%;
  padding: 8px;
}

.erp-col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.erp-col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.erp-col-3 { flex: 0 0 25%; max-width: 25%; }
.erp-col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.erp-col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.erp-col-6 { flex: 0 0 50%; max-width: 50%; }
.erp-col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.erp-col-9 { flex: 0 0 75%; max-width: 75%; }
.erp-col-12 { flex: 0 0 100%; max-width: 100%; }

.erp-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.erp-input,
.erp-select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: #ffffff;
  outline: none;
}

.erp-input::placeholder {
  color: #a3adb6;
}

.erp-input:focus,
.erp-select:focus {
  border-color: var(--vitokin-blue);
  box-shadow: 0 0 0 3px rgba(0, 103, 177, 0.12);
}

textarea.erp-input {
  min-height: 86px;
  resize: vertical;
}

.erp-validation {
  display: block;
  margin-top: 4px;
  color: var(--vitokin-red);
  font-size: 12px;
  line-height: 1.4;
}

.erp-alert {
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  font-size: 13px;
  line-height: 1.45;
}

.erp-alert-success {
  border-color: rgba(29, 157, 99, 0.25);
  background: #eefaf4;
  color: #12633f;
}

.erp-alert-warning {
  border-color: rgba(244, 123, 32, 0.25);
  background: #fff7ed;
  color: #8a3d08;
}

.erp-grid {
  display: grid;
  gap: 14px;
}

.erp-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.erp-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.erp-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.erp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.erp-table th,
.erp-table td {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.erp-table th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.erp-table tbody tr:hover td {
  background: #fbfdff;
}

.erp-text-end {
  text-align: right !important;
}

.erp-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--vitokin-blue-soft);
  color: var(--vitokin-blue);
  font-size: 12px;
  font-weight: 800;
}

.erp-badge-accent {
  background: var(--vitokin-blue-soft);
  color: var(--vitokin-blue);
}

.erp-badge-muted {
  background: #eef1f4;
  color: #4c5965;
}

.erp-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.erp-check-input {
  width: 18px;
  height: 18px;
  accent-color: var(--vitokin-blue);
}

.erp-check-label {
  color: var(--text);
  font-weight: 700;
}

.erp-flex { display: flex !important; }
.erp-align-end { align-items: flex-end !important; }
.erp-u-d-inline { display: inline !important; }
.erp-u-d-flex { display: flex !important; }
.erp-u-ai-center { align-items: center !important; }
.erp-u-ai-end { align-items: flex-end !important; }
.erp-u-jc-space-between { justify-content: space-between !important; }
.erp-u-jc-end { justify-content: flex-end !important; }
.erp-u-flex-wrap { flex-wrap: wrap !important; }
.erp-u-gap-8px { gap: 8px !important; }
.erp-u-gap-10px { gap: 10px !important; }
.erp-u-gap-12px { gap: 12px !important; }
.erp-u-gap-16px { gap: 16px !important; }
.erp-u-m-0 { margin: 0 !important; }
.erp-u-mt-6px { margin-top: 6px !important; }
.erp-u-mt-16px { margin-top: 16px !important; }
.erp-u-mt-18px { margin-top: 18px !important; }
.erp-u-mb-2px { margin-bottom: 2px !important; }
.erp-u-mb-6px { margin-bottom: 6px !important; }
.erp-u-mb-8px { margin-bottom: 8px !important; }
.erp-u-mb-12px { margin-bottom: 12px !important; }
.erp-u-mb-16px { margin-bottom: 16px !important; }
.erp-u-mb-18px { margin-bottom: 18px !important; }
.erp-u-p-0 { padding: 0 !important; }
.erp-u-p-14px { padding: 14px !important; }
.erp-u-p-16px { padding: 16px !important; }
.erp-u-p-18px { padding: 18px !important; }
.erp-u-ov-hidden { overflow: hidden !important; }
.erp-u-ov-auto { overflow: auto !important; }
.erp-u-color-text { color: var(--text) !important; }
.erp-u-fw-850 { font-weight: 850 !important; }
.erp-u-fw-900 { font-weight: 900 !important; }
.erp-u-fs-28px { font-size: 28px !important; }
.erp-u-wb-break-word { word-break: break-word !important; }

.erp-table code,
.erp-card code {
  padding: 2px 5px;
  border-radius: 6px;
  background: #f2f5f8;
  color: #1f2933;
  word-break: break-word;
}

@media (max-width: 1100px) {
  .erp-grid-4,
  .erp-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .erp-col-1,
  .erp-col-2,
  .erp-col-3,
  .erp-col-4,
  .erp-col-5,
  .erp-col-6,
  .erp-col-8,
  .erp-col-9 {
    flex-basis: 100%;
    max-width: 100%;
  }

  .erp-u-d-flex.erp-u-jc-space-between {
    align-items: flex-start !important;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .erp-grid-2,
  .erp-grid-3,
  .erp-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* UTM module visual layer based on ERP primitives and OW.Web.Foundation theme contract. */
.utm-page {
  --utm-surface: var(--ow-web-surface, var(--card, #ffffff));
  --utm-surface-soft: var(--ow-web-surface-soft, var(--card-soft, #fbfcfd));
  --utm-border: var(--ow-web-border, var(--line, #e2e6ea));
  --utm-border-strong: var(--ow-web-border-strong, var(--line-strong, #cfd6dd));
  --utm-text: var(--ow-web-text, var(--text, #1f2933));
  --utm-heading: var(--ow-web-heading, var(--heading, #111820));
  --utm-muted: var(--ow-web-muted, var(--muted, #697783));
  --utm-muted-soft: var(--ow-web-muted-soft, var(--muted-2, #8b98a3));
  --utm-accent: var(--ow-web-accent, var(--vitokin-blue, #0067b1));
  --utm-accent-hover: var(--ow-web-accent-hover, var(--vitokin-blue-hover, #00518d));
  --utm-accent-soft: var(--ow-web-accent-soft, var(--vitokin-blue-soft, #e7f2fb));
  --utm-success: var(--ow-web-success, var(--vitokin-green, #1d9d63));
  --utm-orange: var(--ow-web-orange, var(--vitokin-orange, #f47b20));
  --utm-shadow-soft: var(--ow-web-shadow-soft, var(--shadow-soft, 0 5px 18px rgba(16, 24, 32, 0.06)));
  --utm-radius: var(--ow-web-radius, var(--radius, 14px));
  display: grid;
  gap: 16px;
}

.utm-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.utm-page-head__title h1 {
  margin: 0;
  color: var(--utm-heading);
  font-size: 28px;
  line-height: 1.14;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.utm-page-head__title p {
  margin: 7px 0 0;
  color: var(--utm-muted);
  font-size: 14px;
  line-height: 1.45;
}

.utm-page-head__actions,
.utm-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.utm-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--utm-border);
  overflow-x: auto;
}

.utm-tabs__item {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--utm-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.utm-tabs__item:hover {
  color: var(--utm-accent);
}

.utm-tabs__item.is-active {
  color: var(--utm-accent);
}

.utm-tabs__item.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: var(--utm-accent);
}

.utm-tabs__item.is-disabled {
  color: var(--utm-muted-soft);
  cursor: not-allowed;
}

.utm-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.utm-stat-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.utm-stat-grid--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.utm-stat-card {
  min-height: 112px;
  padding: 18px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--utm-border);
  border-radius: var(--utm-radius);
  background: var(--utm-surface);
  box-shadow: var(--utm-shadow-soft);
}

.utm-stat-card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--utm-accent-soft);
  color: var(--utm-accent);
  font-size: 24px;
  font-weight: 900;
}

.utm-stat-card span {
  display: block;
  color: var(--utm-text);
  font-size: 13px;
  font-weight: 750;
}

.utm-stat-card strong {
  display: block;
  margin-top: 5px;
  color: var(--utm-heading);
  font-size: 27px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.utm-stat-card small {
  display: block;
  margin-top: 6px;
  color: var(--utm-muted);
  font-size: 12px;
}

.utm-positive {
  color: var(--utm-accent) !important;
  font-weight: 800;
}

.utm-layout-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 16px;
  align-items: start;
}

.utm-layout-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.utm-filter-bar {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(4, minmax(148px, 0.48fr)) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--utm-border);
  border-radius: var(--utm-radius);
  background: var(--utm-surface);
  box-shadow: var(--utm-shadow-soft);
}

.utm-filter-bar--compact {
  grid-template-columns: minmax(260px, 1fr) minmax(148px, 0.35fr) auto;
}

.utm-table-card {
  border: 1px solid var(--utm-border);
  border-radius: var(--utm-radius);
  background: var(--utm-surface);
  box-shadow: var(--utm-shadow-soft);
  overflow: hidden;
}

.utm-table-card__footer {
  min-height: 52px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--utm-border);
  color: var(--utm-muted);
  font-size: 13px;
}

.utm-pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.utm-pager span,
.utm-pager a {
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--utm-text);
  text-decoration: none;
  font-weight: 750;
}

.utm-pager .is-active {
  color: var(--utm-accent);
  background: var(--utm-accent-soft);
}

.utm-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid var(--utm-border);
  border-radius: 999px;
  color: var(--utm-text);
  background: var(--utm-surface);
  font-size: 12px;
  font-weight: 800;
}

.utm-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.utm-status--active { color: var(--utm-accent); border-color: rgba(0, 103, 177, 0.22); background: var(--utm-accent-soft); }
.utm-status--paused { color: var(--utm-orange); border-color: rgba(244, 123, 32, 0.24); background: color-mix(in srgb, var(--utm-orange) 10%, var(--utm-surface)); }
.utm-status--archived,
.utm-status--draft,
.utm-status--muted { color: var(--utm-muted); background: var(--utm-surface-soft); }

.utm-link-title strong {
  display: block;
  color: var(--utm-heading);
  font-size: 13px;
}

.utm-link-title small,
.utm-subline {
  display: block;
  margin-top: 4px;
  color: var(--utm-muted);
  font-size: 12px;
}

.utm-copy-link {
  color: var(--utm-accent);
  text-decoration: none;
  font-weight: 800;
}

.utm-copy-link:hover {
  color: var(--utm-accent-hover);
}

.utm-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}

.utm-builder-side {
  display: grid;
  gap: 14px;
}

.utm-preset-list {
  display: grid;
  gap: 9px;
}

.utm-preset-button {
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--utm-border);
  border-radius: 12px;
  background: var(--utm-surface);
  color: var(--utm-text);
  text-align: left;
  cursor: pointer;
}

.utm-preset-button:hover {
  border-color: var(--utm-accent);
  background: var(--utm-accent-soft);
}

.utm-preset-button i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--utm-accent);
  background: var(--utm-accent-soft);
  font-style: normal;
  font-weight: 900;
}

.utm-preset-button strong {
  display: block;
  color: var(--utm-heading);
  font-size: 13px;
}

.utm-preset-button small {
  display: block;
  margin-top: 3px;
  color: var(--utm-muted);
  font-size: 11px;
}

.utm-preview-card {
  display: grid;
  gap: 16px;
}

.utm-preview-field {
  display: grid;
  gap: 7px;
}

.utm-preview-field label {
  color: var(--utm-heading);
  font-size: 13px;
  font-weight: 800;
}

.utm-preview-box {
  min-height: 54px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--utm-border);
  border-radius: 12px;
  background: var(--utm-surface-soft);
  color: var(--utm-text);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-all;
}

.utm-qr-panel {
  min-height: 122px;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.utm-qr-placeholder {
  width: 92px;
  height: 92px;
  border: 6px solid var(--utm-surface);
  outline: 1px solid var(--utm-border-strong);
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--utm-heading) 10px, transparent 10px 18px, var(--utm-heading) 18px 26px, transparent 26px 36px, var(--utm-heading) 36px 44px, transparent 44px),
    linear-gradient(0deg, transparent 10px, var(--utm-heading) 10px 18px, transparent 18px 28px, var(--utm-heading) 28px 36px, transparent 36px 46px),
    repeating-linear-gradient(45deg, var(--utm-surface) 0 7px, var(--utm-heading) 7px 11px);
  background-size: 46px 46px, 46px 46px, 18px 18px;
}

.utm-check-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.utm-check-list li {
  position: relative;
  padding-left: 22px;
  color: var(--utm-muted);
  font-size: 13px;
  line-height: 1.35;
}

.utm-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--utm-accent);
  font-weight: 900;
}

.utm-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.utm-bar-chart {
  height: 238px;
  padding: 12px 6px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
  align-items: end;
  gap: 8px;
  border-bottom: 1px solid var(--utm-border);
  background: repeating-linear-gradient(to top, transparent 0, transparent 39px, rgba(16,24,32,0.06) 40px);
}

.utm-bar-chart__item {
  min-height: 2px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #43a5df, var(--utm-accent));
}

.utm-bar-list {
  display: grid;
  gap: 13px;
}

.utm-bar-list__row {
  display: grid;
  grid-template-columns: minmax(108px, 0.8fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--utm-text);
  font-size: 13px;
}

.utm-bar-list__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--utm-border);
  overflow: hidden;
}

.utm-bar-list__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--utm-accent);
}

.utm-donut {
  width: 176px;
  height: 176px;
  margin: 8px auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--utm-accent) 0 42%, color-mix(in srgb, var(--utm-accent) 35%, var(--utm-surface)) 42% 66%, color-mix(in srgb, var(--utm-accent) 16%, var(--utm-surface)) 66% 82%, var(--utm-surface-soft) 82% 100%);
}

.utm-donut::before {
  content: attr(data-total);
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--utm-surface);
  color: var(--utm-heading);
  font-size: 20px;
  font-weight: 900;
}

.utm-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}

.utm-settings-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.utm-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--utm-border);
}

.utm-setting-row:first-child { border-top: 0; }
.utm-setting-row strong { color: var(--utm-heading); font-size: 13px; }
.utm-setting-row small { display:block; color: var(--utm-muted); font-size: 12px; margin-top: 3px; }

@media (max-width: 1280px) {
  .utm-stat-grid,
  .utm-stat-grid--3,
  .utm-stat-grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .utm-chart-grid,
  .utm-layout-2,
  .utm-layout-main,
  .utm-settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .utm-page-head {
    flex-direction: column;
  }

  .utm-filter-bar,
  .utm-filter-bar--compact,
  .utm-builder-grid,
  .utm-settings-cards {
    grid-template-columns: 1fr;
  }

  .utm-stat-grid,
  .utm-stat-grid--3,
  .utm-stat-grid--5 {
    grid-template-columns: 1fr;
  }
}
.erp-u-mt-12px { margin-top: 12px !important; }

/* Company area */
.company-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.company-card-link:hover strong {
  color: var(--vitokin-blue);
}

/* Breadcrumbs */
.erp-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 13px;
}

.erp-breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
}

.erp-breadcrumbs a:hover {
    color: var(--vitokin-blue);
    text-decoration: underline;
}

.erp-breadcrumbs span[aria-current="page"] {
    color: var(--heading);
    font-weight: 600;
}

.erp-breadcrumbs em {
    color: var(--line-strong);
    font-style: normal;
}

/* Global browser WebPhone host from VITOKIN.ERP.Telephony.
   Compact button styling lives in the Razor class library static asset. */
.erp-global-webphone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.erp-global-webphone:empty {
    display: none;
}

.erp-global-webphone--topbar {
    position: relative;
    flex: 0 0 auto;
}

