@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --side-width: 238px;
  --side-collapsed-width: 146px;
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f6f8fa;
  --ink: #252a31;
  --muted: #6c747d;
  --line: #dfe4e8;
  --green: #13a05f;
  --green-dark: #087146;
  --blue: #165dba;
  --red: #b42318;
  --yellow: #fff319;
  --shadow: 0 12px 28px rgba(35, 43, 52, 0.08);
}

* {
  box-sizing: border-box;
}

iconify-icon {
  display: inline-block;
  height: 1em;
  width: 1em;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, Arial, "Helvetica Neue", sans-serif;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

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

.topbar {
  background: #ffffff;
  border-bottom: 0;
  margin-left: var(--side-width);
  transition: margin-left 180ms ease;
}

body.sidebar-collapsed .topbar {
  margin-left: var(--side-collapsed-width);
}

.topbar__inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 86px;
  padding: 10px 30px;
}

.topbar__primary {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 24px;
  min-width: 0;
}

.topbar-back {
  align-items: center;
  background: #f4fbf7;
  border: 1px solid #cfe8da;
  border-radius: 999px;
  color: #0f1a34;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 22px;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.topbar-back:hover {
  background: #e8f7ef;
  border-color: #a8d7bd;
}

.topbar__title {
  color: #111827;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}

.topbar__workspace-tools {
  align-items: end;
  display: grid;
  flex: 1;
  gap: 12px;
  grid-template-columns: minmax(260px, 520px);
  max-width: 850px;
}

.topbar__workspace-tools.has-mod {
  grid-template-columns: minmax(210px, 1fr) minmax(300px, 1.4fr);
}

.topbar-filter {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.topbar-filter > span {
  color: #7b838c;
  font-size: 12px;
}

.topbar-filter select {
  background: #ffffff;
  border: 1px solid #cbd6d0;
  border-radius: 6px;
  color: #30373f;
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.topbar__menu,
.topbar__icon,
.topbar__bell {
  align-items: center;
  background: #ffffff;
  border: 0;
  color: #333942;
  display: inline-flex;
  font-size: 22px;
  height: 36px;
  justify-content: center;
  position: relative;
  width: 36px;
}

.topbar__icon {
  border: 1px solid transparent;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 700;
}

.topbar__bell {
  font-size: 24px;
}

.topbar__bell b {
  align-items: center;
  background: #ef3d55;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  font-size: 10px;
  height: 16px;
  justify-content: center;
  position: absolute;
  right: 3px;
  top: 3px;
  width: 16px;
}

.topbar__meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 18px;
  font-size: 14px;
  flex-shrink: 0;
}

.org-profile {
  position: relative;
}

.org-chip {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e7ebef;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-width: 265px;
  padding: 12px 16px;
  text-align: left;
}

.org-chip__avatar {
  align-items: center;
  background: #f1f4f7;
  border-radius: 999px;
  color: #263241;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 25px;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.org-chip__avatar iconify-icon {
  stroke-width: 2.4px;
}

.org-chip:hover,
.org-chip[aria-expanded="true"] {
  border-color: #b9d8c7;
  box-shadow: 0 8px 18px rgba(24, 88, 55, 0.08);
}

.org-chip__main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.org-chip strong {
  color: #2b3038;
  font-size: 15px;
}

.org-chip span {
  color: #7b838c;
  font-size: 13px;
}

.org-chip__chevron {
  color: #425466;
  flex: 0 0 auto;
  font-size: 20px;
  transition: transform 160ms ease;
}

.org-chip[aria-expanded="true"] .org-chip__chevron {
  transform: rotate(180deg);
}

.org-profile__menu {
  background: #ffffff;
  border: 1px solid #e0e6ec;
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(20, 31, 45, 0.14);
  display: grid;
  gap: 4px;
  min-width: 265px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
}

.org-profile__item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #263241;
  cursor: pointer;
  display: flex;
  gap: 13px;
  font-size: 16px;
  min-height: 52px;
  padding: 13px 14px;
  position: relative;
  text-align: left;
  width: 100%;
}

.org-profile__item:hover {
  background: #f4f8f6;
}

.org-profile__item iconify-icon {
  color: #263241;
  font-size: 22px;
}

.org-profile__item--logout {
  border-top: 1px solid #edf1f4;
  color: #087146;
  margin-top: 4px;
}

.org-profile__item--notify .nav-badge {
  right: 9px;
  top: 9px;
}

.shell {
  margin: 0;
  max-width: none;
  padding: 0;
}

.login-screen {
  background:
    radial-gradient(circle at 50% 24%, rgba(245, 247, 250, 0.72), transparent 34%),
    #ffffff;
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 100vh;
  padding: 34px 24px;
}

.login-hero {
  background: transparent;
  min-height: auto;
  padding: 0;
  text-align: center;
}

.brand {
  align-items: center;
  color: #4b4f59;
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.brand__logo {
  display: block;
  height: auto;
  max-width: 100%;
  width: 330px;
}

.logo-mark {
  overflow: visible;
}

.logo-mark__board {
  fill: none;
  stroke: #081936;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 7;
}

.logo-mark__clip {
  fill: #081936;
}

.logo-mark__tick {
  fill: none;
  stroke: #f6c618;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
}

.logo-mark__text {
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0;
}

.logo-mark__text--dark {
  fill: #081936;
}

.logo-mark__text--yellow {
  fill: #f6c618;
}

.brand__mark {
  align-items: center;
  border: 8px solid #4b4f59;
  border-radius: 12px;
  display: flex;
  font-size: 54px;
  font-weight: 700;
  height: 86px;
  justify-content: center;
  line-height: 1;
  width: 86px;
}

.brand__name {
  font-size: 34px;
  font-weight: 800;
  line-height: 0.9;
}

.brand__sub {
  font-size: 17px;
  font-weight: 700;
  margin-top: 6px;
  text-transform: uppercase;
}

.login-hero h1 {
  color: #081936;
  font-family: Manrope, Arial, "Helvetica Neue", sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.08;
  margin: 0 auto 34px;
  max-width: 980px;
}

.login-card {
  background: #ffffff;
  border: 1px solid #f0f2f5;
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  margin: 0 auto;
  max-width: 900px;
  min-height: 0;
  padding: 44px 48px;
  width: min(100%, 900px);
}

.login-row {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 64px;
}

.login-select {
  border-color: #dfe4ea;
  border-radius: 8px;
  color: #4b5667;
  font-size: 18px;
  min-height: 58px;
  padding: 0 20px;
}

.icon-button {
  background: #ffffff;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  cursor: pointer;
  color: #26364c;
  font-size: 30px;
  min-height: 58px;
}

.login-actions {
  display: block;
  margin-top: 32px;
}

.login-help {
  display: none;
}

.login-card .certificate {
  display: none;
}

.login-actions .button {
  background: #061832;
  border-color: #061832;
  border-radius: 6px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  min-height: 58px;
  width: 100%;
}

.login-actions .button:hover {
  background: #0b2247;
  border-color: #0b2247;
  color: #ffffff;
}

.app {
  background: #fbfcfd;
  min-height: 100vh;
}

.main-shell {
  display: grid;
  grid-template-columns: var(--side-width) minmax(0, 1fr);
  min-height: calc(100vh - 72px);
  transition: grid-template-columns 180ms ease;
}

body.sidebar-collapsed .main-shell {
  grid-template-columns: var(--side-collapsed-width) minmax(0, 1fr);
}

.side-nav {
  background: #ffffff;
  border-right: 1px solid #edf0f3;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  left: 0;
  padding: 20px 20px;
  position: fixed;
  top: 0;
  width: var(--side-width);
  z-index: 4;
  transition: width 180ms ease, padding 180ms ease;
}

.side-nav__svg {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.side-nav__svg svg {
  fill: none;
  height: 25px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 25px;
}

.side-nav__iconify {
  flex: 0 0 auto;
  font-size: 28px;
}

body.sidebar-collapsed .side-nav {
  align-items: center;
  padding: 20px 18px;
  width: var(--side-collapsed-width);
}

.side-brand {
  align-items: center;
  color: #20242b;
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  min-height: 98px;
  padding: 0;
  width: 100%;
}

.side-brand__logo {
  display: block;
  height: auto;
}

.side-brand__logo--full {
  width: 178px;
}

.side-brand__logo--collapsed {
  display: none;
  border-radius: 14px;
  height: 102px;
  object-fit: cover;
  width: 102px;
}

body.sidebar-collapsed .side-brand__logo--full {
  display: none;
}

body.sidebar-collapsed .side-brand__logo--collapsed {
  display: block;
}

.side-toggle {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  color: #172033;
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 50px;
  justify-content: flex-start;
  margin: 10px 0 0;
  padding: 8px 12px;
  width: 100%;
}

.side-toggle__icon {
  align-items: center;
  background: #ffffff;
  border-radius: 999px;
  color: #0f2340;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 22px;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.side-toggle span {
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
}

body.sidebar-collapsed .side-toggle {
  border: 1px solid #dfe5eb;
  box-shadow: none;
  height: 66px;
  justify-content: center;
  min-height: 66px;
  padding: 0;
  width: 66px;
}

body.sidebar-collapsed .side-toggle__icon {
  background: transparent;
  font-size: 26px;
  height: auto;
  transform: rotate(180deg);
  width: auto;
}

body.sidebar-collapsed .side-toggle span {
  display: none;
}

.side-divider {
  background: #e8edf2;
  height: 1px;
  margin: 0 0 24px;
  width: 100%;
}

.side-nav__item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #242a33;
  cursor: pointer;
  display: flex;
  font-size: 16px;
  font-weight: 800;
  gap: 16px;
  min-height: 58px;
  padding: 0 16px;
  text-align: left;
  width: 100%;
}

.side-nav__item img {
  height: 32px;
  width: 32px;
}

.side-nav__item span {
  overflow: hidden;
  white-space: nowrap;
}

.side-nav__item:hover,
.side-nav__item.is-active {
  background: #fff9cf;
  color: #11151b;
}

.side-nav__item--notify {
  position: relative;
}

.nav-badge {
  align-items: center;
  background: #e03131;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  position: absolute;
  right: 7px;
  top: 7px;
}

body.sidebar-collapsed .side-nav__item {
  border: 1px solid #dfe5eb;
  border-radius: 10px;
  justify-content: center;
  padding: 0;
  height: 66px;
  min-height: 66px;
  width: 66px;
}

body.sidebar-collapsed .side-nav__item.is-active {
  background: linear-gradient(145deg, #fffdf2 0%, #fff1a8 100%);
  border-color: transparent;
}

body.sidebar-collapsed .side-nav__item img {
  height: 36px;
  width: 36px;
}

body.sidebar-collapsed .side-nav__item span {
  display: none;
}

.support-card {
  align-items: center;
  border: 1px solid #edf0f3;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding: 14px 18px;
  width: 100%;
}

.support-card img {
  border-radius: 10px;
  height: 50px;
  object-fit: cover;
  width: 50px;
}

.support-card__text {
  display: grid;
  gap: 0;
}

.support-card__text span,
.support-card__text strong {
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

.support-card__text strong {
  font-size: 13px;
}

body.sidebar-collapsed .support-card {
  justify-content: center;
  padding: 8px;
  width: 66px;
}

body.sidebar-collapsed .support-card img {
  height: 50px;
  width: 50px;
}

body.sidebar-collapsed .support-card div {
  display: none;
}

.support-card button,
.wide-button,
.panel-head button {
  background: #ffffff;
  border: 1px solid #e5e9ee;
  border-radius: 8px;
  color: #26303a;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-height: 36px;
  padding: 0 14px;
}

.support-card button {
  background: #fff5bf;
  border-color: #fff0a6;
  margin-top: 8px;
  width: 100%;
}

.main-content {
  grid-column: 2;
  min-width: 0;
  padding: 8px 12px 16px;
}

.home-screen {
  display: grid;
  gap: 24px;
  width: 100%;
}

.accounting-state {
  display: grid;
  gap: 14px;
  width: 100%;
}

.accounting-state h2 {
  color: #111827;
  font-size: 18px;
  font-weight: 800;
}

.deviation-widget {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5eaf0;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(30, 49, 73, 0.07);
  display: grid;
  gap: 34px;
  grid-template-columns: 245px minmax(420px, 1fr) 86px;
  min-height: 220px;
  padding: 34px 38px;
}

.deviation-widget h3 {
  color: #0f1a34;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 8px;
}

.deviation-widget__metric {
  align-self: stretch;
  border-right: 1px solid #e3e8ee;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 36px;
}

.deviation-widget__metric > span {
  color: #7776a4;
  display: block;
  font-size: 15px;
  margin-bottom: 38px;
}

.deviation-widget__metric > strong {
  color: #3477da;
  display: block;
  font-size: 52px;
  font-weight: 500;
  line-height: 1;
}

.deviation-widget__workspace {
  display: grid;
  gap: 28px;
  max-width: 650px;
}

.deviation-widget__period {
  border: 1px solid #b9cce7;
  border-radius: 10px;
  min-height: 58px;
  position: relative;
}

.deviation-widget__period:focus-within {
  border-color: #3477da;
  box-shadow: 0 0 0 3px rgba(52, 119, 218, 0.12);
}

.deviation-widget__period > iconify-icon {
  color: #0f1a34;
  font-size: 24px;
  left: 18px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.deviation-widget__controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.deviation-widget__select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #6b7280 50%) right 18px top 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #6b7280 50%, transparent 50%) right 12px top 50% / 6px 6px no-repeat,
    transparent;
  border: 0;
  color: #0f1a34;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  height: 56px;
  min-width: 0;
  outline: 0;
  padding: 0 42px 0 56px;
  width: 100%;
}

.deviation-widget__select:focus {
  outline: none;
}

.deviation-widget__button {
  align-items: center;
  background: #061937;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  min-height: 52px;
  padding: 0 24px;
  gap: 9px;
  justify-content: center;
}

.deviation-widget__button iconify-icon {
  flex: 0 0 auto;
  font-size: 18px;
}

.deviation-widget__button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.deviation-widget__button--secondary {
  background: #ffffff;
  border: 1px solid #a9bddc;
  color: #0f1a34;
}

.deviation-widget__button--secondary:hover {
  background: #f1f5fa;
}

.deviation-load-progress {
  background: #ffffff;
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  padding: 14px 18px;
}

.deviation-load-progress__meta {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.deviation-load-progress__meta strong {
  color: #26384f;
  font-size: 13px;
}

.deviation-load-progress__meta span {
  color: #2368b5;
  font-size: 13px;
  font-weight: 800;
}

.deviation-load-progress__track {
  background: #e8eef6;
  border-radius: 999px;
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
}

.deviation-load-progress__track span {
  background: #3477da;
  display: block;
  height: 100%;
  transition: width 220ms ease;
}

.deviation-widget__icon {
  align-items: center;
  background: linear-gradient(145deg, #f0f0ff, #e8e7fb);
  border-radius: 20px;
  color: #7772b4;
  display: flex !important;
  height: 76px;
  justify-content: center;
  margin: 0 !important;
  width: 76px;
}

.deviation-widget__icon iconify-icon {
  font-size: 42px;
}

.deviation-breakdown {
  display: grid;
  gap: 18px;
}

.deviation-overview-card,
.detected-deviations {
  background: #ffffff;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  overflow: hidden;
}

.deviation-breakdown__summary {
  background: #f3f6fa;
  border-bottom: 1px solid #dbe6f3;
  border-radius: 0;
  color: #222b36;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  padding: 9px 14px;
}

.deviation-breakdown__hint {
  color: #647084;
  font-size: 13px;
  margin: 0;
  padding: 10px 14px;
}

.deviation-groups-list {
  display: grid;
}

.deviation-group {
  border-bottom: 1px solid #dbe6f3;
}

.deviation-group:last-child {
  border-bottom: 0;
}

.deviation-group__title {
  align-items: center;
  background: #f4f7fb;
  color: #061937;
  cursor: pointer;
  display: flex;
  gap: 12px;
  font-size: 15px;
  list-style: none;
  min-height: 56px;
  padding: 0 14px;
}

.deviation-group__title::-webkit-details-marker {
  display: none;
}

.deviation-group__title strong {
  flex: 1;
  font-size: 15px;
  font-weight: 800;
}

.deviation-group__title b {
  color: #061937;
  font-size: 15px;
  font-weight: 800;
  margin-left: auto;
}

.deviation-more {
  align-items: center;
  background: #ffffff;
  border: 1px solid #cfd9e6;
  border-radius: 6px;
  color: #21324a;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  padding: 0 10px;
}

.deviation-group__icon {
  align-items: center;
  background: #e8eef6;
  border-radius: 8px;
  color: #26384f;
  display: inline-flex;
  font-size: 20px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.deviation-group__icon iconify-icon {
  height: 20px;
  width: 20px;
}

.deviation-group__chevron,
.deviation-row__chevron {
  color: #2d72d9;
  flex: 0 0 auto;
  font-size: 20px;
  transition: transform 160ms ease;
}

.deviation-group[open] .deviation-group__chevron,
.deviation-reason[open] .deviation-row__chevron {
  transform: rotate(180deg);
}

.deviation-group__details {
  background: #ffffff;
  display: grid;
  gap: 0;
  padding: 0;
}

.deviation-reason {
  border-top: 1px solid #eef2f7;
}

.deviation-row {
  align-items: center;
  color: #061937;
  cursor: pointer;
  display: grid;
  font-size: 14px;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 48px auto 24px;
  line-height: 1.3;
  min-height: 54px;
  padding: 0 14px;
}

.deviation-row::-webkit-details-marker {
  display: none;
}

.deviation-row strong {
  color: #061937;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.deviation-detail {
  border-top: 1px solid #eef2f7;
  overflow-x: auto;
  padding: 0 8px 8px;
}

.deviation-detail table {
  border-collapse: collapse;
  min-width: 900px;
  width: 100%;
}

.deviation-detail th,
.deviation-detail td {
  border-bottom: 1px solid #edf2f7;
  color: #061937;
  font-size: 12px;
  line-height: 1.3;
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.deviation-detail th {
  color: #647084;
  font-size: 11px;
  font-weight: 800;
}

.detected-deviations {
  border-color: #dbe6f3;
}

.detected-deviations__head {
  align-items: center;
  background: #f7f9fb;
  border-bottom: 1px solid #e3e8ee;
  display: flex;
  justify-content: space-between;
  padding: 18px 20px;
}

.detected-deviations__head h3,
.detected-deviations__head p {
  margin: 0;
}

.detected-deviations__head h3 {
  color: #17202b;
  font-size: 18px;
}

.detected-deviations__head p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.detected-deviations__head > span {
  align-items: center;
  background: #fff3cf;
  border-radius: 999px;
  color: #795f00;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0 9px;
}

.detected-deviations__list {
  display: grid;
}

.detected-deviation {
  border-bottom: 1px solid #edf0f3;
  padding: 18px 20px;
}

.detected-deviation:last-child {
  border-bottom: 0;
}

.detected-deviation__title {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.detected-deviation__title strong {
  color: #17202b;
  font-size: 15px;
}

.detected-deviation__title b {
  background: #ffe8e5;
  border-radius: 999px;
  color: var(--red);
  flex: 0 0 auto;
  font-size: 12px;
  padding: 4px 9px;
}

.detected-deviation p {
  color: #4f5965;
  font-size: 13px;
  line-height: 1.55;
  margin: 8px 0;
}

.detected-deviation small {
  color: #7b838c;
  font-size: 11px;
  font-weight: 700;
}

.home-title {
  padding-top: 0;
}

.home-title h1 {
  color: #1f242c;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 6px;
}

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

.quick-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e8edf2;
  border-radius: 10px;
  color: #1f242c;
  cursor: pointer;
  display: grid;
  gap: 18px;
  grid-template-columns: 68px minmax(0, 1fr) 22px;
  min-height: 110px;
  padding: 20px;
  text-align: left;
}

.quick-card strong,
.quick-card small {
  display: block;
}

.quick-card strong {
  font-size: 17px;
  margin-bottom: 7px;
}

.quick-card small {
  color: #606a75;
  font-size: 14px;
  line-height: 1.35;
}

.quick-card b {
  color: #1b4d89;
  font-size: 28px;
  font-weight: 400;
}

.quick-card__icon,
.metric-icon,
.notice-icon {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-size: 28px;
  height: 66px;
  justify-content: center;
  width: 66px;
}

.quick-card__icon--green,
.metric-icon--green,
.notice-icon--green {
  background: #e9faef;
  color: #14864f;
}

.quick-card__icon--blue,
.metric-icon--blue,
.notice-icon--blue {
  background: #eef5ff;
  color: #2368b5;
}

.quick-card__icon--purple {
  background: #faefff;
  color: #8927a9;
}

.metric-icon--yellow,
.notice-icon--yellow {
  background: #fff7d9;
  color: #b7791f;
}

.metric-icon--red {
  background: #fff0f0;
  color: #d62f43;
}

.metric-icon--orange {
  background: #fff4e9;
  color: #c56a23;
}

.metrics-panel,
.chart-panel,
.list-panel {
  background: #ffffff;
  border: 1px solid #edf0f3;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.04);
}

.metrics-panel {
  padding: 18px 18px 22px;
}

.panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-head h2 {
  color: #1f242c;
  font-size: 16px;
  font-weight: 800;
}

.panel-head h2 span {
  background: #f3f5f7;
  border-radius: 999px;
  color: #7b838c;
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  margin-left: 8px;
  min-width: 24px;
  padding: 2px 8px;
}

.metrics-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-card {
  align-items: center;
  display: grid;
  gap: 4px 16px;
  grid-template-columns: 52px minmax(0, 1fr);
}

.metric-card .metric-icon {
  font-size: 23px;
  grid-row: span 3;
  height: 48px;
  width: 48px;
}

.metric-card small {
  color: #68717c;
  font-size: 12px;
}

.metric-card strong {
  color: #141920;
  font-size: 24px;
  line-height: 1.1;
}

.metric-card em {
  color: #13935a;
  font-size: 12px;
  font-style: normal;
}

.dashboard-row {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.25fr 1fr 0.95fr;
}

.chart-panel,
.list-panel {
  padding: 18px;
}

.chart-legend {
  color: #4f5a66;
  display: flex;
  font-size: 12px;
  gap: 24px;
  margin-bottom: 8px;
}

.chart-legend span::before {
  content: "";
  display: inline-block;
  height: 2px;
  margin-right: 7px;
  vertical-align: middle;
  width: 18px;
}

.blue-line::before {
  background: #2f78b7;
}

.green-line::before {
  background: #3f9b4d;
}

.red-line::before {
  background: #cf3344;
}

.chart-box {
  height: 248px;
}

.chart-box svg {
  height: 100%;
  width: 100%;
}

.grid-line {
  fill: none;
  stroke: #e9edf1;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-width: 3;
}

.chart-line--blue {
  stroke: #2f78b7;
}

.chart-line--green {
  stroke: #3f9b4d;
}

.chart-line--red {
  stroke: #cf3344;
}

.issue-list,
.notify-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.issue-list li,
.notify-list li {
  align-items: start;
  border-bottom: 1px solid #edf0f3;
  display: grid;
  gap: 12px;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  padding: 11px 0;
}

.notify-list li {
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 80px;
}

.issue-list strong,
.notify-list strong {
  color: #27303a;
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}

.issue-list small,
.notify-list small,
.issue-list time {
  color: #7b838c;
  display: block;
  font-size: 12px;
}

.dot {
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  margin-top: 5px;
  width: 9px;
}

.dot--red {
  background: #ee344c;
}

.dot--orange {
  background: #e49a2e;
}

.notify-list .notice-icon {
  font-size: 22px;
  height: 48px;
  width: 48px;
}

.wide-button {
  margin-top: 14px;
  width: 100%;
}

.help-strip {
  align-items: center;
  background: linear-gradient(90deg, #fffdf2 0%, #fffaf0 100%);
  border: 1px solid #f1d86c;
  border-radius: 10px;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(330px, 1.25fr) repeat(4, minmax(190px, 1fr));
  max-width: none;
  min-height: 154px;
  padding: 28px 30px;
  width: 100%;
}

.help-strip__intro {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: 78px minmax(0, 1fr);
}

.help-strip__icon,
.help-strip__button-icon {
  align-items: center;
  border-radius: 12px;
  color: #26384f;
  display: inline-flex;
  height: 76px;
  justify-content: center;
  width: 76px;
}

.help-strip__icon img {
  display: none;
}

.help-strip .help-strip__icon {
  align-items: center;
  background: #ffe552;
  border: 8px solid #fff6be;
  border-radius: 50%;
  color: #173358;
  display: flex;
  justify-content: center;
}

.help-strip__icon iconify-icon {
  font-size: 46px;
}

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

.help-strip strong {
  color: #061937;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.help-strip span {
  color: #647084;
  font-size: 15px;
  line-height: 1.3;
}

.help-strip button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  color: #26303a;
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: 58px minmax(0, 1fr) 18px;
  height: 96px;
  min-width: 0;
  padding: 14px 16px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.help-strip button:hover {
  border-color: #bdc9d8;
  box-shadow: 0 8px 20px rgba(29, 46, 70, 0.08);
  transform: translateY(-1px);
}

.help-strip button strong {
  align-items: center;
  display: flex;
  min-height: 38px;
}

.help-strip .help-strip__button-icon {
  align-items: center;
  border-radius: 10px;
  display: flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.help-strip__button-icon iconify-icon {
  font-size: 30px;
}

.help-strip__button-icon--blue {
  background: #edf4ff;
  color: #244f86;
}

.help-strip__button-icon--green {
  background: #edf9f1;
  color: #28704e;
}

.help-strip__button-icon--violet {
  background: #f2efff;
  color: #6757a8;
}

.help-strip__button-icon--cyan {
  background: #edf8fc;
  color: #245f7b;
}

.help-strip__chevron {
  color: #0f1a34;
  font-size: 20px;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 700;
  padding: 0;
}

@media (max-width: 1450px) {
  .deviation-widget {
    grid-template-columns: 210px minmax(360px, 1fr) 76px;
    padding: 30px;
  }

  .help-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .help-strip__intro {
    grid-column: 1 / -1;
  }
}

.step-screen {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 26px;
}

.settings-screen {
  display: grid;
  gap: 26px;
  max-width: 1180px;
}

.settings-screen > h1 {
  margin-bottom: 0;
}

.settings-group__head {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.settings-group__head h2 {
  margin: 0 0 4px;
}

.settings-group__head p {
  color: var(--muted);
  margin: 0;
}

.settings-mods {
  display: grid;
  gap: 14px;
}

.settings-mods__summary {
  background: #f5f8fb;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #344054;
  padding: 12px 14px;
}

.settings-mods__table {
  max-height: 430px;
}

.settings-mods__table th,
.settings-mods__table td {
  vertical-align: top;
}

.mod-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.mod-status--active {
  background: #e8f7ee;
  color: #15733c;
}

.mod-status--blocked {
  background: #fff0f0;
  color: #b42318;
}

.settings-mods__debug {
  margin-top: 0;
}

.documents-screen {
  background: #ffffff;
  border: 1px solid #dfe6e2;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.documents-screen:has(#documentView:not(.hidden)) {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.documents-head {
  align-items: center;
  border-bottom: 1px solid #e5ebe8;
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px 24px 0;
}

.documents-table-wrap {
  border: 0;
  box-shadow: none;
  margin: 20px 24px 0;
  min-height: 0;
  overflow: visible;
}

.documents-table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.documents-table-wrap thead th {
  background: #f8fafc;
  border-bottom: 1px solid #e4e9ee;
  color: #344054;
  font-size: 14px;
  height: 56px;
  padding: 0 18px;
}

.documents-table-wrap thead th:first-child {
  border-top-left-radius: 12px;
}

.documents-table-wrap thead th:last-child {
  border-top-right-radius: 12px;
}

.documents-table-wrap thead th iconify-icon {
  color: #667085;
  font-size: 16px;
  margin-right: 8px;
  vertical-align: -3px;
}

.documents-table-wrap tbody tr {
  background: #ffffff;
  box-shadow: inset 0 -1px 0 #e7ece9;
}

.document-row {
  cursor: pointer;
  height: 62px;
}

.document-row:hover {
  background: #fbfdfc;
}

.document-row td {
  color: #1f2937;
  font-size: 14px;
  padding: 0 18px;
}

.document-row td:first-child {
  border-bottom-left-radius: 12px;
  border-top-left-radius: 12px;
}

.document-row td:last-child {
  border-bottom-right-radius: 12px;
  border-top-right-radius: 12px;
}

.document-date {
  align-items: center;
  display: inline-flex;
  gap: 9px;
}

.document-date iconify-icon {
  color: #344054;
  font-size: 16px;
}

.document-count--good {
  color: #00875a !important;
  font-weight: 700;
}

.document-count--bad {
  color: #e11919 !important;
  font-weight: 700;
}

.document-actions-col,
.document-actions-cell {
  width: 54px;
}

.document-actions-cell {
  overflow: visible;
  padding: 5px 8px;
  position: relative;
  text-align: center;
}

.document-menu {
  display: inline-block;
  position: relative;
}

.document-menu__button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e3e8ee;
  border-radius: 999px;
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  height: 38px;
  justify-content: center;
  line-height: 1;
  width: 38px;
}

.document-menu__button:hover {
  background: #f8fafc;
  border-color: #cfd8d3;
}

.document-menu__popup {
  background: #ffffff;
  border: 1px solid #dfe5e1;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  min-width: 210px;
  padding: 6px;
  position: absolute;
  right: 0;
  text-align: left;
  top: 36px;
  z-index: 20;
}

.document-menu__delete {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #b42318;
  cursor: pointer;
  font: inherit;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.document-menu__delete:hover {
  background: #fff1f0;
}

.documents-tabs {
  align-self: stretch;
  border-bottom: 0;
  display: flex;
  gap: 0;
  padding: 0;
}

.documents-tabs .reports-tab {
  background: #ffffff;
  border: 1px solid #e1e7ec;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  color: #1f2937;
  font-size: 15px;
  font-weight: 800;
  min-width: 124px;
  padding: 16px 22px;
  position: relative;
}

.documents-tabs .reports-tab + .reports-tab {
  margin-left: 4px;
}

.documents-tabs .reports-tab.is-active {
  background: #ffffff;
  color: #111827;
}

.documents-tabs .reports-tab.is-active::after {
  background: #f7d928;
  bottom: -1px;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
}

.documents-refresh {
  border-color: #b8d8c9;
  color: #087146;
  gap: 8px;
  margin-bottom: 14px;
}

.documents-footer {
  align-items: center;
  color: #475467;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  padding: 18px 24px 42px;
}

.documents-page-size {
  align-items: center;
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.documents-page-size select {
  border-radius: 6px;
  height: 34px;
  min-height: 34px;
  min-width: 0;
  padding: 0 28px 0 12px;
  width: 66px;
}

.documents-range {
  font-weight: 600;
}

.documents-pager {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.documents-pager button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe5e1;
  border-radius: 7px;
  color: #667085;
  display: inline-flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  min-width: 34px;
}

.documents-pager button.is-active {
  border-color: #18a05e;
  color: #087146;
}

.document-detail {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.document-view__toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  min-height: 72px;
  padding: 12px 22px;
}

.document-view__toolbar h1,
.document-view__toolbar p {
  margin: 0;
}

.document-view__toolbar h1 {
  font-size: 24px;
}

.document-view__toolbar p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.document-detail__head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.document-detail__head h2 {
  font-size: 26px;
  margin: 0;
}

.document-status {
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  padding: 7px 12px;
  white-space: nowrap;
}

.document-status iconify-icon {
  font-size: 14px;
}

.document-status--ready {
  background: #fff4bf;
  color: #795700;
}

.document-status--success {
  background: #e7f7ee;
  color: #087146;
}

.document-status--error {
  background: #ffe8e5;
  color: #b42318;
}

.document-status--processing {
  background: #eaf2ff;
  color: #165dba;
}

.document-status--sent {
  background: #e8f3ff;
  color: #175b96;
}

.document-status--draft {
  background: #f1f3f5;
  color: #59636e;
}

.document-status--muted {
  background: #f4f0ff;
  color: #6941c6;
}

.document-detail__meta {
  background: #f8fafc;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  color: #566270;
  display: grid;
  font-size: 14px;
  gap: 12px 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 16px;
}

.document-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.document-summary-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe7e3;
  border-left: 3px solid var(--green);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 22px;
  grid-template-columns: 86px 1fr auto;
  padding: 28px 30px;
}

.document-summary-card__icon {
  align-items: center;
  background: #eefaf4;
  border: 1px solid #d7f0e4;
  border-radius: 8px;
  color: var(--green);
  display: inline-flex;
  font-size: 34px;
  height: 72px;
  justify-content: center;
  width: 72px;
}

.document-summary-card__grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.document-summary-card__grid > div {
  border-right: 1px solid #e0e7e4;
  display: grid;
  gap: 14px;
  min-height: 86px;
  padding-right: 28px;
}

.document-summary-card__grid > div:last-child {
  border-right: 0;
}

.document-summary-card__grid span {
  color: #334155;
  font-size: 14px;
  font-weight: 600;
}

.document-info-card {
  background: #ffffff;
  border: 1px solid #dfe7e3;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 16px;
  padding: 18px 20px;
}

.document-info-card__head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.document-info-card__title {
  align-items: center;
  display: flex;
  gap: 14px;
}

.document-info-card__title .document-summary-card__icon {
  font-size: 28px;
  height: 58px;
  width: 58px;
}

.document-info-card__title h3 {
  color: #10233f;
  font-size: 18px;
  margin: 0;
}

.document-info-card__grid {
  align-items: start;
  display: grid;
  gap: 14px 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.document-info-card__wide,
.document-info-card__extras {
  grid-column: 1 / -1;
}

.document-info-card__extras {
  box-shadow: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px;
}

.document-info-card__hint {
  color: var(--muted);
  font-size: 12px;
}

.document-info-card__stats {
  border-top: 1px solid #e3e8ee;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 14px;
}

.document-info-card__stats span {
  display: grid;
  gap: 4px;
}

.document-info-card__stats b {
  color: #10233f;
  font-size: 18px;
}

.document-info-card__stats small {
  color: var(--muted);
  font-size: 12px;
}

.document-info-card--readonly {
  background: #f8fafc;
}

.document-info-card--readonly input,
.document-info-card--readonly select,
.document-products-panel input:disabled {
  background: #f1f4f7;
  border-color: #d9e0e7;
  color: #6b7787;
  cursor: not-allowed;
}

.document-info-card--readonly .withdraw-extra {
  background: #f3f6f8;
}

.document-products-panel button:disabled {
  background: #f4f6f8;
  color: #8a95a3;
  cursor: not-allowed;
  opacity: 0.7;
}

.document-code-group {
  border: 1px solid #e3e8ee;
  border-radius: 6px;
  overflow: hidden;
}

.document-code-group summary {
  background: #f7f9fb;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 12px;
}

.document-edit-row {
  align-items: end;
  display: flex;
  gap: 16px;
  padding: 0 0 18px;
}

.document-edit-row .field {
  max-width: 360px;
}

.document-edit-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  max-width: 430px;
  padding-bottom: 10px;
}

.document-code-table {
  max-height: 440px;
}

.document-products-panel {
  background: #ffffff;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  padding: 18px 20px;
}

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

.document-products-panel__head h3 {
  align-items: center;
  color: #1f2937;
  display: flex;
  font-size: 20px;
  gap: 10px;
  margin: 0;
}

.document-products-panel .document-code-table {
  border: 1px solid #e3e8ee;
  border-radius: 7px;
}

.document-line-quantity,
.document-line-price {
  max-width: 170px;
}

.document-line-delete {
  color: #b42318;
  gap: 6px;
}

.document-products-panel__total {
  color: #334155;
  font-weight: 700;
  padding: 14px 16px 0;
}

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

@media (max-width: 760px) {
  .document-info-card__head,
  .document-info-card__title {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-info-card__grid,
  .document-info-card__stats {
    grid-template-columns: 1fr;
  }

  .document-info-card__wide,
  .document-info-card__extras {
    grid-column: auto;
  }
}

.settings-screen h1 {
  color: #1f242c;
  font-size: 28px;
  margin: 0 0 26px;
}

.settings-group h2 {
  color: #1f242c;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
}

.settings-card {
  background: #ffffff;
  border: 1px solid #edf0f3;
  border-radius: 10px;
  overflow: hidden;
}

.settings-toggle-row {
  align-items: center;
  border-bottom: 1px solid #e2e6eb;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  min-height: 82px;
  padding: 18px 22px;
}

.settings-toggle-row strong,
.settings-toggle-row small {
  display: block;
}

.settings-toggle-row strong {
  color: #1f242c;
  font-size: 17px;
  font-weight: 600;
}

.settings-toggle-row small {
  color: #9aa1aa;
  font-size: 14px;
}

.settings-toggle-row input {
  appearance: none;
  background: #c8cbd0;
  border-radius: 999px;
  height: 22px;
  position: relative;
  width: 42px;
}

.settings-toggle-row input::before {
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  content: "";
  height: 26px;
  left: -2px;
  position: absolute;
  top: -2px;
  transition: transform 160ms ease;
  width: 26px;
}

.settings-toggle-row input:checked {
  background: #13a05f;
}

.settings-toggle-row input:checked::before {
  transform: translateX(20px);
}

.settings-port-row {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  padding: 18px 22px;
}

.settings-query-grid {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px 22px;
}

.settings-query-grid .field {
  margin: 0;
}

.settings-actions {
  align-items: center;
  border-top: 1px solid #e2e6eb;
  display: flex;
  gap: 14px;
  padding: 12px 22px;
}

.settings-actions .settings-hint {
  border-top: 0;
  padding: 0;
}

.settings-hint {
  border-top: 1px solid #e2e6eb;
  color: #7a838d;
  font-size: 13px;
  padding: 12px 22px;
}

.serial-status {
  background: #f6f8fa;
  border-top: 1px solid #edf0f3;
  color: #7a8493;
  font-size: 13px;
  padding: 12px 22px;
}

.serial-status--ok {
  color: #087146;
}

.serial-status--error {
  color: #b42318;
}

.choice-list,
.group-grid {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.choice-card,
.group-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 18px;
  text-align: left;
}

.choice-card:hover,
.group-card:hover,
.choice-card.is-selected,
.group-card.is-selected {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(19, 160, 95, 0.12);
}

.choice-card span,
.group-card span {
  color: var(--muted);
}

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

#groupScreen {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 18px;
  padding: 12px 12px 28px;
}

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

.goods-tab {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e3e9ef;
  border-radius: 10px;
  color: #111827;
  cursor: pointer;
  display: flex;
  gap: 16px;
  min-height: 70px;
  padding: 0 34px;
  position: relative;
  text-align: left;
}

.goods-tab::after {
  background: transparent;
  border-radius: 999px;
  bottom: -1px;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
}

.goods-tab.is-active::after {
  background: #ffd600;
}

.goods-tab iconify-icon {
  color: #0f1a34;
  font-size: 25px;
}

.goods-tab span {
  font-size: 16px;
  font-weight: 800;
}

.goods-search {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e3e9ef;
  border-radius: 10px;
  color: #64748b;
  display: flex;
  gap: 12px;
  min-height: 58px;
  padding: 0 20px;
}

.goods-search iconify-icon {
  font-size: 22px;
}

.goods-search input {
  background: transparent;
  border: 0;
  color: #111827;
  flex: 1;
  font-weight: 700;
  min-width: 0;
  outline: 0;
}

.goods-search input::placeholder {
  color: #8b95a5;
}

.goods-section {
  display: grid;
  gap: 14px;
}

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

.goods-group-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e3e9ef;
  border-radius: 10px;
  color: #111827;
  cursor: pointer;
  display: grid;
  gap: 16px;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  min-height: 74px;
  padding: 12px 18px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.goods-group-card:hover {
  border-color: #cfd8e3;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.goods-group-card:disabled,
.goods-group-card--unavailable {
  background: #f3f5f7;
  border-color: #e1e6eb;
  color: #8b95a1;
  cursor: not-allowed;
  opacity: 1;
}

.goods-group-card:disabled:hover,
.goods-group-card--unavailable:hover {
  border-color: #e1e6eb;
  box-shadow: none;
  transform: none;
}

.goods-group-card__icon {
  color: #1f2937;
  font-size: 34px;
}

.goods-group-card--unavailable .goods-group-card__icon,
.goods-group-card--unavailable .goods-group-card__chevron {
  color: #9aa4af;
}

.goods-group-card__text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.goods-group-card strong {
  color: #111827;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.goods-group-card--unavailable strong {
  color: #6b7280;
}

.goods-group-card small {
  color: #8b95a1;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.goods-group-card__chevron {
  color: #0f1a34;
  font-size: 22px;
}

@media (max-width: 1500px) {
  .goods-group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

.hero {
  align-items: end;
  background: linear-gradient(135deg, #eaf8ef 0%, #ffffff 54%, #e9f2ff 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  min-height: 170px;
  padding: 28px;
}

.eyebrow {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 38px;
  line-height: 1.08;
  margin-bottom: 12px;
}

h2 {
  font-size: 18px;
  margin-bottom: 0;
}

.lead {
  color: var(--muted);
  max-width: 700px;
  margin-bottom: 0;
}

.hero__status {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  margin-top: 24px;
  min-height: 54px;
  min-width: 220px;
  padding: 13px 16px;
  text-align: center;
  width: 100%;
}

.hero__status.ok {
  border-color: rgba(19, 160, 95, 0.35);
  color: var(--green-dark);
}

.hero__status.error {
  border-color: rgba(180, 35, 24, 0.35);
  color: var(--red);
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.panel {
  align-self: start;
  padding: 20px;
}

.workspace {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 10px;
  overflow: visible;
  padding: 8px 12px 20px;
}

.panel__head,
.filters,
.result-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.panel__head--spaced {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.badge {
  background: var(--surface-soft);
  border-radius: 4px;
  color: var(--green-dark);
  font-weight: 700;
  min-width: 30px;
  padding: 3px 9px;
  text-align: center;
}

.button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b9c8c0;
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
}

.button:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.button--green {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.button--green:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #ffffff;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button--dark {
  background: #17231d;
  border-color: #17231d;
  color: #ffffff;
  margin-top: 16px;
  width: 100%;
}

.button--dark:hover {
  background: #23382d;
  border-color: #23382d;
  color: #ffffff;
}

.button--yellow {
  background: #fff319;
  border-color: #fff319;
  color: #4b4f59;
}

.button--yellow:hover {
  background: #eadf00;
  border-color: #eadf00;
  color: #30343b;
}

.field {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

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

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid #cbd8d1;
  border-radius: 4px;
  color: var(--ink);
  min-height: 34px;
  padding: 6px 10px;
  width: 100%;
}

select[multiple] {
  min-height: 132px;
}

textarea {
  margin-top: 14px;
  min-height: 88px;
  resize: vertical;
}

.certificate {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
  min-height: 76px;
  padding: 12px;
  word-break: break-word;
}

.actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

.check {
  align-items: start;
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 9px;
  grid-template-columns: 18px 1fr;
  margin-top: 14px;
}

.check input {
  min-height: 18px;
  margin: 1px 0 0;
  width: 18px;
}

.check--inline {
  margin-top: 0;
}

.filters {
  border-bottom: 1px solid var(--line);
  padding: 20px 22px;
}

.workspace > .filters {
  display: none;
}

.filters p {
  color: var(--muted);
  margin-bottom: 0;
}

.filter-grid {
  display: grid;
  align-items: end;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 8px 12px;
}

.filter-grid .field {
  margin-top: 0;
}

.mod-filter-control {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.mod-filter-control .button {
  min-height: 42px;
}

.scanner-panel {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(360px, 1.35fr) minmax(260px, 0.9fr) minmax(230px, 300px);
  padding: 8px 14px;
}

.scan-input-card,
.table-search-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  color: #64748b;
  display: grid;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
}

.scan-input-card {
  grid-template-columns: 24px minmax(0, 1fr) 20px;
}

.table-search-card {
  grid-template-columns: 22px minmax(0, 1fr);
}

.scan-input-card iconify-icon,
.table-search-card iconify-icon {
  color: #0f1a34;
  font-size: 19px;
}

.scan-input-card input,
.table-search-card input {
  border: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  min-height: 34px;
  outline: 0;
  padding: 0;
}

.scan-input-card input::placeholder,
.table-search-card input::placeholder {
  color: #8b95a5;
}

.scanner-panel__state {
  align-items: center;
  background: #edf8f1;
  border: 0;
  border-radius: 8px;
  color: #102033;
  display: grid;
  font-size: 13px;
  gap: 9px;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  min-height: 42px;
  padding: 6px 10px;
}

.scanner-panel__state > iconify-icon:first-child {
  color: #15a466;
  font-size: 28px;
}

.scanner-panel__state span {
  display: grid;
  gap: 2px;
}

.scanner-panel__state strong {
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.scanner-panel__state small {
  color: #475569;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
}

.scanner-panel__check {
  color: #13a05f;
  font-size: 16px;
}

.scanner-panel__state--ok {
  background: #ecfdf3;
  color: #087146;
}

.scanner-panel__state--error {
  background: #fff1f1;
  color: #b42318;
}

.scanner-panel__state--error .scanner-panel__check,
.scanner-panel__state--error > iconify-icon:first-child {
  color: #b42318;
}

.inline-options {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
}

.inline-options .button {
  border-color: #dfe7f0;
  border-radius: 7px;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
}

.inline-options .button--green {
  background: #13a05f;
  border-color: #13a05f;
  box-shadow: 0 10px 18px rgba(19, 160, 95, 0.18);
}

.inline-options .button iconify-icon {
  font-size: 17px;
}

.inline-options .result-stats {
  border-left: 1px solid #e5eaf0;
  margin-left: 16px;
  padding-left: 22px;
}

.scan-filter {
  display: inline-flex;
  gap: 8px;
}

.scan-filter__button {
  background: #ffffff;
  border: 1px solid #d6e0e8;
  border-radius: 7px;
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  min-height: 38px;
  padding: 0 14px;
}

.scan-filter__button iconify-icon {
  color: #0f1a34;
  font-size: 19px;
}

.scan-filter__button.is-active {
  background: #ffffff;
  border-color: #d6e0e8;
  color: #061937;
}

.scan-filter__button.is-active iconify-icon {
  color: #13a05f;
}

.emission-filter-head {
  position: relative;
}

.emission-filter-menu {
  left: auto;
  min-width: 300px;
  right: 8px;
}

.emission-filter-menu .field {
  align-items: stretch;
  cursor: default;
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
  min-height: auto;
  padding: 7px 10px;
}

.emission-filter-menu .field:hover {
  background: #ffffff;
}

.emission-filter-menu .field span {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}

.emission-filter-menu input[type="date"] {
  border: 1px solid #d6e0e8;
  border-radius: 7px;
  font: inherit;
  min-height: 36px;
  padding: 0 9px;
  width: 100%;
}

.emission-filter-menu .package-filter-menu__actions {
  justify-content: flex-end;
}

.result-head {
  display: none;
}

.request-state-inline {
  color: #a0a7b2;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  margin-left: 10px;
  min-width: 170px;
}

.result-stats {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  white-space: nowrap;
}

.result-stats span {
  display: grid;
  min-width: 58px;
  text-align: center;
}

.result-stats strong {
  color: #0f1a34;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.result-stats small {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  margin-top: 5px;
}

.field--table-search {
  margin-top: 0;
}

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

.table-wrap {
  background: #ffffff;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  max-height: calc(100vh - 270px);
  min-height: 260px;
  overflow: auto;
}

table {
  border-collapse: collapse;
  min-width: 780px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #edf1f5;
  padding: 7px 14px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  height: 42px;
  padding: 9px 14px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.product-filter-head,
.expiration-filter-head,
.emission-filter-head {
  overflow: visible;
  position: sticky;
  z-index: 3;
}

.product-filter-btn {
  align-items: center;
  background: transparent;
  border: 0;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  padding: 0;
}

.filter-icon {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dfe7f0;
  border-radius: 7px;
  color: #0f1a34;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  transition: background 140ms ease, border-color 140ms ease;
  width: 28px;
}

.filter-icon iconify-icon {
  font-size: 15px;
}

.product-filter-btn:hover .filter-icon {
  background: #eaf5ef;
  border-color: #afd2bf;
}

.product-filter-btn.is-filtered .filter-icon {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.package-filter-menu {
  background: #ffffff;
  border: 1px solid #dfe6e2;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(26, 45, 36, 0.14);
  display: grid;
  gap: 4px;
  left: 8px;
  min-width: 290px;
  padding: 10px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 25;
}

.package-filter-menu label {
  align-items: center;
  background: #ffffff;
  border-radius: 7px;
  color: #34423b;
  cursor: pointer;
  display: grid;
  font-size: 14px;
  font-weight: 600;
  gap: 10px;
  grid-template-columns: 20px minmax(0, 1fr);
  min-height: 40px;
  padding: 7px 10px;
}

.package-filter-menu label:hover {
  background: #f2f8f5;
}

.expiration-filter-menu {
  left: auto;
  min-width: 240px;
  right: 8px;
}

.package-filter-check,
#expiredOnlyCheck {
  appearance: none;
  background: #ffffff;
  border: 1px solid #bdc9c3;
  border-radius: 5px;
  cursor: pointer;
  height: 20px;
  margin: 0;
  min-height: 20px;
  position: relative;
  width: 20px;
}

.package-filter-check:checked,
#expiredOnlyCheck:checked {
  background: var(--green);
  border-color: var(--green);
}

.package-filter-check:checked::after,
#expiredOnlyCheck:checked::after {
  color: #ffffff;
  content: "✓";
  font-size: 14px;
  font-weight: 900;
  left: 3px;
  line-height: 1;
  position: absolute;
  top: 2px;
}

.package-filter-menu__actions {
  border-top: 1px solid #e8eeeb;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
  padding-top: 10px;
}

.package-filter-apply,
.package-filter-reset {
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-height: 36px;
  padding: 0 14px;
}

.package-filter-apply {
  background: var(--green);
  color: #ffffff;
}

.package-filter-apply:hover {
  background: var(--green-dark);
}

.package-filter-reset {
  background: #ffffff;
  border-color: #cbd6d0;
  color: #536159;
}

.package-filter-reset:hover {
  background: #f4f7f5;
  border-color: #aebdb5;
}

td {
  font-size: 12px;
  line-height: 1.2;
}

tbody tr.is-active-scan {
  background: #dcf7e6;
  outline: 2px solid #13a05f;
  outline-offset: -2px;
}

tbody tr.is-active-scan td {
  background: #dcf7e6;
}

.select-col {
  width: 46px;
}

.select-col input,
td input[type="checkbox"] {
  min-height: 20px;
  width: 20px;
}

.scan-state {
  align-items: center;
  color: #6d4b00;
  display: inline-flex;
  font-size: 11px;
  gap: 4px;
  white-space: nowrap;
}

.scan-state--scanned {
  color: var(--green-dark);
}

.scan-state__icon {
  color: #ff9d00;
  font-size: 12px;
  line-height: 1;
}

.scan-state--scanned .scan-state__icon {
  color: var(--green);
}

.product-cell {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: 16px minmax(0, 1fr);
}

.pack-icon {
  align-items: center;
  color: #3f4852;
  display: inline-flex;
  height: 14px;
  justify-content: center;
  width: 14px;
}

.pack-icon iconify-icon {
  font-size: 14px;
}

.pack-icon--empty {
  color: transparent;
}

.product-code {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.product-name {
  color: #2f4150;
  font-size: 11px;
  line-height: 1.18;
  margin-top: 1px;
  overflow-wrap: anywhere;
}

.osu-screen {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 10px;
  overflow: visible;
  padding: 8px 12px 20px;
}

.back-button {
  background: transparent;
  border: 0;
  color: #4b5563;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  padding: 0 6px;
}

.osu-toolbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 64px;
  padding: 12px 16px;
}

.osu-toolbar .button {
  border-color: #dfe7f0;
  border-radius: 7px;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
}

.osu-toolbar .button--green {
  background: #13a05f;
  border-color: #13a05f;
  box-shadow: 0 10px 18px rgba(19, 160, 95, 0.18);
}

.osu-toolbar .button iconify-icon {
  font-size: 17px;
}

.field--toolbar {
  margin-top: 0;
  width: min(360px, 100%);
}

.osu-toolbar .table-search-card {
  flex: 1 1 320px;
  max-width: 520px;
}

.osu-toolbar #osuDocumentStatus {
  color: #a0a7b2;
  font-size: 13px;
  font-weight: 700;
  margin-left: 6px;
}

.osu-table-wrap {
  max-height: calc(100vh - 265px);
  min-height: 260px;
}

.osu-balance-tabs {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #edf1f5;
  display: flex;
  gap: 34px;
  min-height: 58px;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 4;
}

.osu-balance-tab {
  align-items: center;
  align-self: stretch;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #0f1a34;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  padding: 0;
}

.osu-balance-tab.is-active {
  border-bottom-color: #13a05f;
}

.osu-balance-tab iconify-icon {
  color: #13a05f;
  font-size: 18px;
}

.osu-balance-tab[data-osu-filter="negative"] iconify-icon {
  color: #ff3b4f;
}

.osu-balance-tab b {
  background: #eef2f7;
  border-radius: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  min-width: 28px;
  padding: 2px 7px;
  text-align: center;
}

.osu-table-selected {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  margin-left: auto;
}

.osu-table {
  min-width: 980px;
}

.osu-table th,
.osu-table td {
  padding: 7px 14px;
}

.osu-table tbody tr.is-selected-row {
  background: #ecfdf3;
}

.sortable {
  cursor: pointer;
  user-select: none;
}

.sortable::before {
  color: #68737d;
  content: "↕ ";
  font-weight: 400;
}

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

.code-sort-button iconify-icon {
  font-size: 16px;
}

.reports-screen {
  display: grid;
  gap: 20px;
}

.reports-head,
.audit-report-view__toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.reports-head h1,
.audit-report-view__toolbar h1 {
  margin: 0;
}

.reports-head p,
.audit-report-view__toolbar p {
  color: var(--muted);
  margin: 5px 0 0;
}

.reports-head .button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.reports-tabs {
  border-bottom: 1px solid #e1e7ec;
  display: flex;
}

.reports-tab {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #647084;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  gap: 8px;
  padding: 12px 18px;
}

.reports-tab.is-active {
  border-bottom-color: #f0cf00;
  color: #061937;
}

.reports-tab iconify-icon {
  font-size: 20px;
}

.audit-reports-table-wrap {
  background: #ffffff;
  border: 1px solid #e2e8ed;
  border-radius: 12px;
  max-height: none;
  overflow: hidden;
}

.audit-reports-table {
  min-width: 760px;
}

.audit-report-row {
  cursor: pointer;
}

.audit-report-row:hover {
  background: #f8fafc;
}

.audit-report-row__title {
  align-items: center;
  color: #17202b;
  display: inline-flex;
  gap: 10px;
}

.audit-report-row__title iconify-icon {
  color: #315f98;
  font-size: 22px;
}

.audit-report-row__chevron {
  color: #718096;
  font-size: 20px;
}

.audit-report-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.audit-report-status--completed {
  background: #e7f7ee;
  color: var(--green-dark);
}

.audit-report-status--partial {
  background: #fff7cc;
  color: #786500;
}

.audit-report-view {
  display: grid;
  gap: 20px;
}

.audit-report-view__toolbar {
  justify-content: flex-start;
}

.audit-report-view__toolbar .back-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.audit-report-view__toolbar .back-button iconify-icon {
  font-size: 21px;
}

.audit-report-groups {
  margin: 0;
}

.osu-product {
  align-items: center;
  display: block;
}

.osu-product__name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.osu-product__gtin {
  color: #2f4150;
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}

.country-tag {
  background: #eef2f4;
  border-radius: 3px;
  color: #4b5563;
  display: inline-flex;
  font-size: 11px;
  margin-left: 6px;
  padding: 1px 4px;
}

.fact-input {
  max-width: 110px;
  min-height: 30px;
  padding: 4px 8px;
}

.writeoff-negative {
  color: var(--red);
}

.writeoff-positive {
  color: var(--green-dark);
}

.osu-table tfoot td {
  background: #ffffff;
  bottom: 0;
  color: #24313a;
  font-size: 12px;
  position: sticky;
}

.empty {
  color: var(--muted);
  padding: 36px 14px;
  text-align: center;
}

.codes-empty {
  height: 210px;
  padding: 34px 20px !important;
}

.codes-empty__icon {
  align-items: center;
  background: #f4f7fb;
  border: 1px solid #dfe7f0;
  border-radius: 999px;
  color: #64748b;
  display: inline-flex;
  height: 58px;
  justify-content: center;
  margin-bottom: 14px;
  width: 58px;
}

.codes-empty__icon iconify-icon {
  font-size: 29px;
}

.codes-empty strong,
.codes-empty small {
  display: block;
}

.codes-empty strong {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
}

.codes-empty small {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  padding: 3px 8px;
  white-space: nowrap;
}

.km-status-cell {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.expiration-date--expired {
  background: #ffe8e5;
  border-radius: 999px;
  color: var(--red);
  display: inline-block;
  font-weight: 800;
  line-height: 1.15;
  padding: 3px 8px;
}

.status--introduced,
.status--applied {
  background: #e7f7ee;
  color: #087146;
}

.status--retired,
.status--written_off {
  background: #fff0ec;
  color: #a33423;
}

.status--expired {
  background: #ffe8e5;
  color: var(--red);
}

.status--emitted {
  background: #eaf2ff;
  color: #165dba;
}

.debug {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 14px 22px 18px;
}

.debug--home {
  background: #ffffff;
  border: 1px solid #edf0f3;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(30, 49, 73, 0.035);
  padding: 0;
}

.debug--home summary {
  color: #607086;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  min-height: 62px;
  padding: 21px 24px;
}

.debug--home summary::-webkit-details-marker {
  display: none;
}

.debug--home summary::before {
  content: "▶";
  display: inline-block;
  font-size: 11px;
  margin-right: 12px;
  transition: transform 160ms ease;
}

.debug--home[open] summary::before {
  transform: rotate(90deg);
}

.debug--home pre {
  margin: 0 18px 18px;
}

.debug pre {
  background: #111c17;
  border-radius: 6px;
  color: #e8f5ef;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
}

.document-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  padding: 16px 22px;
}

.audit-screen {
  display: grid;
  gap: 22px;
}

.audit-head,
.audit-meta,
.audit-section-title,
.audit-progress__meta,
.audit-risk-card__head,
.audit-health {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.audit-head h1,
.audit-section-title h2,
.audit-empty h2 {
  margin: 0;
}

.audit-head p,
.audit-section-title p,
.audit-empty p {
  color: var(--muted);
  margin: 5px 0 0;
}

.audit-actions {
  display: flex;
  gap: 10px;
}

.audit-progress,
.audit-empty,
.audit-summary-card,
.audit-risks,
.audit-criteria,
.audit-groups {
  background: #ffffff;
  border: 1px solid #e4e9ed;
  border-radius: 12px;
}

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

.audit-criterion {
  background: #f9fafb;
  border: 1px solid #e7ebef;
  border-radius: 9px;
  padding: 16px;
}

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

.audit-criterion__head span {
  background: #eef2f4;
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
}

.audit-criterion__score {
  font-size: 28px;
  font-weight: 800;
  margin: 12px 0 8px;
}

.audit-criterion__track {
  background: #e8ecef;
  border-radius: 999px;
  height: 7px;
  margin-bottom: 9px;
  overflow: hidden;
}

.audit-criterion__track span {
  display: block;
  height: 100%;
}

.audit-criterion--ok .audit-criterion__track span {
  background: var(--green);
}

.audit-criterion--warning .audit-criterion__track span {
  background: #e2b900;
}

.audit-criterion--danger .audit-criterion__track span {
  background: var(--red);
}

.audit-criterion small {
  color: var(--muted);
  line-height: 1.45;
}

.audit-progress {
  padding: 16px 18px;
}

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

.audit-progress__track,
.audit-health__track,
.audit-risk-card__track,
.audit-row-state__track {
  background: #e9edf0;
  border-radius: 999px;
  display: block;
  overflow: hidden;
}

.audit-progress__track {
  height: 8px;
  margin-top: 12px;
}

.audit-progress__track span {
  background: var(--green);
  display: block;
  height: 100%;
  transition: width 180ms ease;
}

.audit-empty {
  align-items: center;
  display: flex;
  flex-direction: column;
  min-height: 390px;
  justify-content: center;
  padding: 44px;
  text-align: center;
}

.audit-empty p {
  max-width: 620px;
}

.audit-empty__icon {
  align-items: center;
  background: #fffbe0;
  border-radius: 50%;
  color: #746b00;
  display: flex;
  height: 78px;
  justify-content: center;
  margin-bottom: 20px;
  width: 78px;
}

.audit-empty__icon svg {
  fill: none;
  height: 42px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 42px;
}

.audit-results {
  display: grid;
  gap: 22px;
}

.audit-meta {
  color: var(--muted);
  font-size: 13px;
}

.audit-summary {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 0.95fr) minmax(380px, 1.35fr);
}

.audit-summary-card {
  align-items: stretch;
  display: block;
  min-height: 330px;
  padding: 30px 32px;
}

.audit-summary-card__icon {
  align-items: center;
  border-radius: 14px;
  display: flex;
  flex: 0 0 auto;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.audit-summary-card__icon iconify-icon {
  font-size: 26px;
}

.audit-summary-card__icon--codes {
  background: #eaf2ff;
  color: var(--blue);
}

.audit-summary-card__icon--osu {
  background: #e7f7ee;
  color: var(--green-dark);
}

.audit-summary-card__icon--state {
  background: #f1edff;
  color: #7259c7;
}

.audit-summary-card__content {
  display: grid;
  gap: 7px;
  min-width: 0;
  width: 100%;
}

.audit-summary-card__content > span,
.audit-summary-card__content > small,
.audit-health > div > span {
  color: var(--muted);
}

.audit-summary-card strong {
  color: #17202b;
  font-size: 40px;
  line-height: 1.1;
}

.audit-summary-card small b {
  color: var(--red);
}

.audit-summary-card__details {
  align-items: start;
  border-top: 1px solid #e6ebef;
  display: grid;
  gap: 18px;
  grid-template-columns: 54px minmax(0, 1fr);
  margin-top: 14px;
  padding-top: 18px;
}

.audit-summary-card__groups {
  display: grid;
  gap: 12px;
}

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

.audit-summary-card__group span {
  color: #344052;
  font-size: 13px;
  line-height: 1.4;
}

.audit-summary-card__group strong {
  color: #17202b;
  flex: 0 0 auto;
  font-size: 14px;
  white-space: nowrap;
}

.audit-summary-card--state {
  display: block;
}

.audit-health strong {
  display: block;
  font-size: 40px;
  margin-top: 12px;
}

.audit-health__status {
  min-height: 56px;
  padding-top: 20px;
}

.audit-health__badge,
.audit-row-state__label {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 9px;
}

.audit-health__badge--ok,
.audit-row-state__label--ok {
  background: #e7f7ee;
  color: var(--green-dark);
}

.audit-health__badge--warning,
.audit-row-state__label--warning,
.audit-row-state__label--pending {
  background: #fff7cc;
  color: #786500;
}

.audit-health__badge--danger,
.audit-row-state__label--risk,
.audit-row-state__label--error {
  background: #ffe8e5;
  color: var(--red);
}

.audit-health__track {
  height: 11px;
  margin: 8px 0 30px;
}

.audit-health__bar {
  display: block;
  height: 100%;
}

.audit-health__bar--ok {
  background: var(--green);
}

.audit-health__bar--warning {
  background: #e2b900;
}

.audit-health__bar--danger {
  background: var(--red);
}

.audit-risks,
.audit-groups {
  padding: 28px 30px;
}

.audit-section-title {
  margin-bottom: 18px;
}

.audit-section-title > span {
  background: #f3f5f7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 11px;
}

.audit-risk-grid {
  display: grid;
  gap: 18px 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audit-risk-card {
  align-items: start;
  background: #ffffff;
  border: 1px solid #e2e7eb;
  border-left: 4px solid #e2b900;
  border-radius: 10px;
  display: grid;
  gap: 18px;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 154px;
  padding: 20px 22px;
}

.audit-risk-card--danger {
  border-left-color: var(--red);
}

.audit-risk-card__icon {
  align-items: center;
  background: #fff8df;
  border-radius: 50%;
  color: #d6a900;
  display: flex;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.audit-risk-card--danger .audit-risk-card__icon {
  background: #fff0ef;
  color: var(--red);
}

.audit-risk-card__icon iconify-icon {
  font-size: 28px;
}

.audit-risk-card__body {
  min-width: 0;
}

.audit-risk-card__head {
  gap: 14px;
}

.audit-risk-card__head strong {
  font-size: 15px;
  line-height: 1.35;
}

.audit-risk-card__head span {
  background: #fff8df;
  border-radius: 999px;
  color: #b37d00;
  flex: 0 0 auto;
  font-weight: 800;
  padding: 6px 12px;
}

.audit-risk-card--danger .audit-risk-card__head span {
  background: #fff0ef;
  color: var(--red);
}

.audit-risk-card p,
.audit-risk-card small {
  color: var(--muted);
}

.audit-risk-card p {
  margin: 7px 0 16px;
}

.audit-risk-card__track {
  height: 6px;
  margin-bottom: 9px;
}

.audit-risk-card__track span {
  background: #e2b900;
  display: block;
  height: 100%;
}

.audit-risk-card--danger .audit-risk-card__track span {
  background: var(--red);
}

.audit-no-risks {
  background: #eaf8f0;
  border-radius: 9px;
  color: var(--green-dark);
  font-weight: 700;
  grid-column: 1 / -1;
  padding: 18px;
}

.audit-table-wrap {
  border: 1px solid #edf0f3;
  border-radius: 8px;
}

.audit-table {
  min-width: 900px;
}

.audit-table td > strong,
.audit-table td > small {
  display: block;
}

.audit-table td > small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.audit-value--danger {
  color: var(--red);
  font-weight: 800;
}

.audit-row-state {
  display: grid;
  gap: 7px;
  min-width: 170px;
}

.audit-row-state__label {
  justify-self: start;
}

.audit-row-state__track {
  height: 5px;
}

.audit-row-state__track i {
  display: block;
  height: 100%;
}

.audit-row-state__bar--ok {
  background: var(--green);
}

.audit-row-state__bar--warning,
.audit-row-state__bar--pending {
  background: #e2b900;
}

.audit-row-state__bar--risk,
.audit-row-state__bar--error {
  background: var(--red);
}

.audit-print__head,
.audit-print__footer {
  display: none;
}

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

  body.audit-print {
    background: #ffffff;
    color: #17202b;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.audit-print main {
    margin: 0;
    padding: 0;
  }

  body.audit-print .audit-print__head,
  body.audit-print .audit-print__footer {
    display: block;
  }

  body.audit-print .audit-print__head {
    border-bottom: 2px solid #17202b;
    margin-bottom: 16px;
    padding-bottom: 10px;
  }

  body.audit-print .audit-print__head h1,
  body.audit-print .audit-print__head p {
    margin: 0;
  }

  body.audit-print .audit-print__footer {
    color: #6c747d;
    font-size: 10px;
    margin-top: 14px;
  }

  body.audit-print .audit-results {
    display: grid !important;
    gap: 14px;
  }

  body.audit-print .audit-print-block {
    break-inside: avoid;
  }

  body.audit-print .audit-summary-card,
  body.audit-print .audit-risks,
  body.audit-print .audit-groups {
    box-shadow: none;
  }
}

.modal {
  align-items: center;
  background: rgba(15, 23, 42, 0.28);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal__panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  max-width: 560px;
  overflow: hidden;
  width: min(560px, 100%);
}

.modal__panel--small {
  max-width: 520px;
  width: min(520px, 100%);
}

.modal__head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px 22px;
}

.modal__head h2 {
  font-size: 22px;
  margin: 0;
}

.modal__head button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  color: #243b5a;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.modal__body {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
}

.modal__text {
  color: #667085;
  line-height: 1.5;
  margin: 0;
}

.modal__status {
  background: #f6f8fb;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  color: #243b5a;
  line-height: 1.45;
  padding: 12px 14px;
}

.withdraw-extra {
  background: #f8fbfa;
  border: 1px solid #dce8e2;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.withdraw-extra__title {
  color: #10233f;
  font-size: 14px;
  font-weight: 800;
}

.withdraw-extra__field small {
  color: #6c7a90;
  display: block;
  font-size: 12px;
  margin-top: 6px;
}

.withdraw-extra__badge {
  background: #eef2f6;
  border-radius: 999px;
  color: #536176;
  display: inline-flex;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  margin-left: 6px;
  padding: 2px 7px;
}

.withdraw-extra__badge--required {
  background: #fff2d2;
  color: #8b5d00;
}

.document-withdraw-extra {
  margin: 14px 0;
}

.modal__actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 22px;
}

@media (max-width: 980px) {
  .reports-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .deviation-widget {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .deviation-widget__metric {
    border-bottom: 1px solid #e3e8ee;
    border-right: 0;
    padding: 0 0 22px;
  }

  .deviation-widget__metric > span {
    margin-bottom: 18px;
  }

  .deviation-widget__icon {
    display: none !important;
  }

  .deviation-widget__controls {
    align-items: stretch;
    display: grid;
  }

  .help-strip button {
    width: 100%;
  }

  .audit-summary,
  .audit-risk-grid,
  .audit-criteria-grid {
    grid-template-columns: 1fr;
  }

  .audit-head {
    align-items: flex-start;
  }
  .document-detail__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-query-grid {
    grid-template-columns: 1fr;
  }

  .settings-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .layout,
  .filter-grid,
  .group-grid,
  .quick-grid,
  .metrics-grid,
  .dashboard-row,
  .help-strip {
    grid-template-columns: 1fr;
  }

  .topbar {
    margin-left: 0;
  }

  .topbar__inner {
    align-items: start;
  }

  .topbar__primary {
    align-items: stretch;
    display: grid;
  }

  .topbar__workspace-tools,
  .topbar__workspace-tools.has-mod {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .main-shell {
    display: block;
  }

  .side-nav {
    border-bottom: 1px solid #edf0f3;
    border-right: 0;
    bottom: auto;
    position: static;
    width: auto;
  }

  .main-content {
    padding: 20px 16px 30px;
  }

  .scanner-panel {
    grid-template-columns: 1fr 1fr;
  }

  .scanner-panel__state {
    grid-column: 1 / -1;
  }

  .hero {
    align-items: stretch;
    display: grid;
  }

  h1 {
    font-size: 30px;
  }
}

@media (max-width: 620px) {
  .goods-tabs,
  .goods-group-grid {
    grid-template-columns: 1fr;
  }

  .audit-head,
  .audit-actions,
  .audit-meta {
    align-items: stretch;
    display: grid;
  }
  .document-detail__meta {
    grid-template-columns: 1fr;
  }

  .document-view__toolbar {
    align-items: flex-start;
  }

  .shell,
  .topbar__inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar__inner,
  .topbar__meta,
  .actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .filters {
    align-items: stretch;
    display: grid;
  }

  .scanner-panel {
    grid-template-columns: 1fr;
  }

  .result-head {
    justify-content: flex-start;
  }
}

/* Keep document tabs independent from generic report tabs. */
.documents-head .documents-tabs {
  border-bottom: 0;
}

.documents-head .documents-tabs .reports-tab {
  background: #ffffff;
  border: 1px solid #e1e7ec;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  color: #1f2937;
  font-size: 15px;
  font-weight: 800;
  min-width: 124px;
  padding: 16px 22px;
  position: relative;
}

.documents-head .documents-tabs .reports-tab.is-active {
  background: #ffffff;
  border-color: #e1e7ec;
  color: #111827;
}

.documents-footer .documents-page-size select {
  min-height: 34px;
  min-width: 0;
  width: 66px;
}

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

.page-head h1 {
  color: #111827;
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 4px;
}

.page-head p {
  color: #687385;
  margin: 0;
}

.tariff-card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  margin-bottom: 22px;
}

.user-tariff-card {
  background: #ffffff;
  border: 1px solid #dfe7ee;
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(30, 45, 64, 0.06);
  display: grid;
  gap: 14px;
  min-height: 360px;
  padding: 22px;
}

.user-tariff-card--gold {
  border-color: #f4c542;
}

.user-tariff-card--green {
  border-color: #a9ddbf;
}

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

.user-tariff-card h3 {
  color: #122039;
  font-size: 22px;
  margin: 0;
}

.user-tariff-card p {
  color: #667085;
  margin: 0;
  min-height: 44px;
}

.user-tariff-card__top span,
.user-tariff-card__note {
  background: #fff2bf;
  border-radius: 999px;
  color: #8a5a00;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
}

.user-tariff-card > strong {
  color: #061937;
  font-size: 34px;
  line-height: 1;
}

.user-tariff-card > small {
  color: #667085;
  font-weight: 700;
}

.user-tariff-card__features {
  border-top: 1px solid #edf1f5;
  display: grid;
  gap: 9px;
  padding-top: 14px;
}

.user-tariff-card__features span {
  color: #16324f;
  font-size: 14px;
}

.user-tariff-card__auto {
  background: #f0fbf5;
  border: 1px solid #cdebd9;
  border-radius: 8px;
  color: #087146;
  font-size: 14px;
  font-weight: 800;
  padding: 12px 14px;
}

.user-tariff-card__note {
  border-radius: 8px;
  margin-top: auto;
}

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

.support-ticket-list,
.support-ticket-view {
  background: #ffffff;
  border: 1px solid #dfe7ee;
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(30, 45, 64, 0.05);
  min-height: 420px;
  padding: 14px;
}

.support-ticket-item {
  background: #ffffff;
  border: 1px solid #e5ebf0;
  border-radius: 8px;
  color: #14233a;
  cursor: pointer;
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  padding: 13px 14px;
  position: relative;
  text-align: left;
  width: 100%;
}

.support-ticket-item:hover,
.support-ticket-item.is-active {
  border-color: #9ed5b7;
  box-shadow: 0 8px 18px rgba(26, 128, 77, 0.08);
}

.support-ticket-item span {
  color: #6b7686;
  font-size: 13px;
}

.support-ticket-item small {
  align-items: center;
  background: #e03131;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
  position: absolute;
  right: 12px;
  top: 12px;
}

.support-ticket-view.empty {
  align-items: center;
  color: #7a8594;
  display: flex;
  justify-content: center;
}

.support-ticket-view__head {
  align-items: center;
  border-bottom: 1px solid #e8edf2;
  display: flex;
  justify-content: space-between;
  margin: -2px 0 14px;
  padding-bottom: 12px;
}

.support-ticket-view__head h3 {
  margin: 0;
}

.support-ticket-view__head span {
  background: #e7f7ee;
  border-radius: 999px;
  color: #087146;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 11px;
}

.support-messages {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.support-message {
  background: #f6f8fa;
  border: 1px solid #e6ebf0;
  border-radius: 10px;
  max-width: 78%;
  padding: 12px 14px;
}

.support-message--user {
  justify-self: end;
}

.support-message--admin {
  background: #f0fbf5;
  border-color: #cfead9;
}

.support-message p {
  margin: 6px 0;
  white-space: pre-wrap;
}

.support-message span {
  color: #7a8594;
  font-size: 12px;
}

.support-reply {
  border-top: 1px solid #e8edf2;
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
}

.support-reply textarea {
  border: 1px solid #cfd9e3;
  border-radius: 8px;
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
}

@media (max-width: 1200px) {
  .tariff-card-grid,
  .support-layout {
    grid-template-columns: 1fr;
  }
}

.support-toolbar {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.support-layout {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: 330px minmax(0, 1fr);
}

.support-list-panel,
.support-conversation-panel {
  background: #ffffff;
  border: 1px solid #e4e9ee;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(30, 45, 64, 0.05);
}

.support-list-panel {
  display: grid;
  gap: 14px;
  grid-template-rows: auto auto 1fr;
  min-height: 690px;
  padding: 18px;
}

.support-list-panel h2 {
  color: #111827;
  font-size: 18px;
  margin: 0;
}

.support-search {
  align-items: center;
  border: 1px solid #dfe7ee;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
}

.support-search iconify-icon {
  color: #98a2b3;
  font-size: 18px;
}

.support-search input {
  border: 0;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.support-ticket-list {
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

.support-ticket-item {
  border: 1px solid #e2e8ef;
  border-radius: 8px;
  box-shadow: none;
  margin: 0;
  min-height: 84px;
  padding: 16px;
}

.support-ticket-item.is-active {
  background: #effcf6;
  border-color: #bde8d0;
  border-left: 4px solid #12b76a;
}

.support-ticket-item__top {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.support-status {
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}

.support-status--success {
  background: #dcfae6;
  color: #079455;
}

.support-status--info {
  background: #e0f2fe;
  color: #0277bd;
}

.support-status--muted {
  background: #eef2f6;
  color: #667085;
}

.support-conversation-panel {
  min-height: 690px;
}

.support-ticket-view {
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 690px;
  padding: 0;
}

.support-ticket-view__head {
  margin: 0;
  padding: 22px 24px;
}

.support-ticket-view__head p {
  color: #7a8697;
  margin: 6px 0 0;
}

.support-messages {
  align-content: start;
  gap: 18px;
  max-height: none;
  overflow: auto;
  padding: 24px;
}

.support-message {
  align-items: flex-start;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr);
  max-width: none;
  padding: 0;
}

.support-message--user {
  justify-self: stretch;
}

.support-message--admin .support-message__body {
  background: #eafaf2;
  border-radius: 8px;
  padding: 18px 20px;
}

.support-message__avatar {
  align-items: center;
  background: #f1f4f7;
  border-radius: 999px;
  color: #263241;
  display: inline-flex;
  font-size: 22px;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.support-message--admin .support-message__avatar {
  background: #dff8ea;
  color: #079455;
}

.support-message__meta {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.support-message__meta span {
  color: #7a8697;
  font-size: 13px;
}

.support-message__body p {
  margin: 10px 0 0;
  white-space: pre-wrap;
}

.support-attachment {
  align-items: center;
  color: #087146;
  display: inline-flex;
  gap: 6px;
  font-weight: 800;
  margin-top: 10px;
  text-decoration: none;
}

.support-reply {
  border-top: 1px solid #e8edf2;
  margin: 0;
  padding: 16px;
}

.support-reply textarea {
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  min-height: 92px;
  resize: vertical;
}

.support-reply__actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.support-reply__actions .button {
  margin-left: auto;
  min-width: 128px;
}

.support-file-button {
  align-items: center;
  background: #f4f7fa;
  border: 1px solid #dfe7ee;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.support-file-button input {
  display: none;
}

.support-file-name {
  color: #667085;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-reply small {
  color: #7a8697;
}

.support-closed-note {
  align-items: center;
  background: #f6f8fa;
  border-top: 1px solid #e8edf2;
  color: #667085;
  display: flex;
  gap: 10px;
  font-weight: 800;
  padding: 18px 20px;
}

.support-closed-note iconify-icon {
  font-size: 20px;
}

@media (max-width: 1200px) {
  .support-layout {
    grid-template-columns: 1fr;
  }
}

.support-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 112px);
  min-height: 0;
  overflow: hidden;
}

.support-toolbar {
  flex: 0 0 auto;
}

.support-layout {
  min-height: 0;
  overflow: hidden;
}

.support-list-panel,
.support-conversation-panel {
  min-height: 0;
  overflow: hidden;
}

.support-list-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.support-ticket-list {
  align-content: start;
  min-height: 0;
  overflow-y: auto;
}

.support-ticket-item {
  align-content: center;
  gap: 8px;
  min-height: 78px;
  padding: 14px 16px;
}

.support-ticket-item.is-active {
  min-height: 78px;
}

.support-ticket-item__top {
  min-width: 0;
}

.support-ticket-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-ticket-item > span:not(.support-ticket-item__top) {
  color: #7a8697;
  font-size: 13px;
  line-height: 1.2;
}

.support-conversation-panel,
.support-ticket-view {
  height: 100%;
  min-height: 0;
}

.support-ticket-view {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.support-messages {
  min-height: 0;
  overflow-y: auto;
}

.support-reply {
  flex: 0 0 auto;
}

@media (max-width: 1200px) {
  .support-screen {
    height: auto;
    overflow: visible;
  }

  .support-list-panel,
  .support-conversation-panel {
    max-height: none;
  }
}
