/* Базовые стили. Адаптив по экранам — app/responsive.css */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Плавность для интерактивных элементов */
a,
.nav-link,
.row-link,
.btn-primary,
.btn-secondary,
.logout-btn,
.row-menu-btn,
.dots-menu-btn,
.row-menu-item,
.user-logout,
.collapse-btn,
.modal-close,
.log-more,
.pager-num,
.pager-arrow {
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Фон и цвет текста задаются здесь — меняешь в одном месте */
body {
    font-family: var(--font-inter), sans-serif;
    color: #ffffff;
    background: #f7f7f7;
    --brand: #324f96;
    --radius: 12px;
}

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

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

.app {
  display: flex;
  min-height: 100vh;
}

/* Сайдбар: на мобиле спрятан за левым краем, выезжает при .open */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 236px;
  padding: 16px;
  background: #1e2233;
  /* border-right: 1px solid #eeeeee; */
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  z-index: 20;
  display: flex;
  flex-direction: column;
  box-shadow: 5px 2px 12px rgba(0, 0, 0, 0.18);
}
.sidebar.open {
  transform: translateX(0);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  margin-bottom: 20px;
  overflow: visible;
}
.brand-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: inline-block;
  background-color: #7f7fcc;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.brand-text {
  font-size: 18px;
  font-weight: 600;
}
.brand-lockup {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
}
.brand-beta {
  position: absolute;
  top: -2px;
  right: -22px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #7c88b2;
  pointer-events: none;
}
.app.collapsed .brand-lockup,
.app.collapsed .brand-beta {
  display: none;
}

.nav {
  flex: 1;
  overflow-y: auto;
}

.nav-section + .nav-section {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #3e4358;
}
.nav-section-label {
  padding: 0 12px 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6078;
}

.nav-link {
  position: relative;
  color: #8087a5;
  border-radius: 8px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 14px;
  display: flex;
  font-weight: 300;
}

.nav-link.active {
  color: #ffffff;
  background: transparent;
  font-weight: 500;
}

.nav-link.active:hover {
  font-weight: 500;
}

.nav-link:hover {
  color: #ffffff;
  background: transparent;
  font-weight: 300;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  background-color: rgb(157 157 157);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  background-color: #7f7fcc;
}

/* Затемнение позади сайдбара на мобиле */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 10;
}

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.header {
  align-items: center;
    gap: 12px;
    padding: 16px 16px;
    display: flex;
    background: #f7f7f7;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 6;
}
.header-pixels {
  padding: 16px 16px 16px;
}
.header-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e2233;
}
.header-action {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-wrap {
  position: relative;
}
.notif-btn {
  position: relative;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notif-btn:hover {
  background: #ececec;
}
.notif-icon {
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.7;
}
.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e5484d;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: min(380px, calc(100vw - 24px));
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(30, 34, 51, 0.16);
  z-index: 40;
  overflow: hidden;
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 8px;
}
.notif-title {
  font-size: 15px;
  font-weight: 500;
  color: #1e2233;
}
.notif-mark-all {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  border-bottom: 1px solid;
  font-weight: 400;
  color: #424b75;
  white-space: nowrap;
}
.notif-mark-all:disabled {
  opacity: 0.4;
  cursor: default;
}
.notif-tabs {
  display: flex;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid #eeeeee;
}
.notif-tab {
  padding: 8px 0 10px;
  font-size: 13px;
  font-weight: 400;
  color: #8087a5;
}
.notif-tab.active {
  color: #1e2233;
  box-shadow: inset 0 -2px 0 #424b75;
}
.notif-list {
  max-height: 420px;
  overflow-y: auto;
}
.notif-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 13px;
  color: #8087a5;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #eeeeee;
  background: none;
  text-align: left;
  cursor: pointer;
  padding: 14px 16px;
}
.notif-item:last-child {
  border-bottom: 0;
}
.notif-item:hover,
.notif-item.unread {
  background: #f7f8fb;
}
.notif-item.level.unread,
.notif-item.level.unread:hover {
  background: #f8f1dc;
}
.notif-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.notif-avatar.rank {
  border-radius: 0;
  object-fit: contain;
}
.notif-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.notif-item-title {
  font-size: 12px;
  font-weight: 400;
  color: #4a506c;
  line-height: 1.35;
}
.notif-item-text {
  font-size: 12px;
  color: #5b6178;
  line-height: 1.35;
}
.notif-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 2px;
}
.notif-item-time {
  font-size: 11px;
  color: #9aa0b5;
  white-space: nowrap;
}
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4c6fff;
}
.header-action .btn-primary,
.header-action .btn-archive {
  box-sizing: border-box;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
  border-width: 1px;
  border-style: solid;
}
.header-action .btn-primary {
  border-color: transparent;
}
.header-action .btn-primary:hover {
  border-color: transparent;
}
.header-search-wrap {
  position: relative;
  flex-shrink: 0;
  height: 40px;
}
.header-search-lupa {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 1;
}
.header-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.header-search-clear img {
  width: 10px;
  height: 10px;
  opacity: 0.45;
}
.header-search-clear:hover img {
  opacity: 0.8;
}
.burger {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
}
.header-user {
  font-size: 13px;
  color: #666;
  margin-right: auto;
}
.logout-btn {
  padding: 6px 12px;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}
.logout-btn:hover {
  background: #f0f0f0;
}

.content {
      flex: 1;
    padding: 0px 16px 16px;
    min-width: 0; overflow-x: hidden;
}

.wk-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.wk-stat {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 0;
  box-shadow: 0 1px 4px rgba(36, 48, 72, 0.05);
}
.wk-stat-label {
  font-size: 13px;
  color: #8a8a8a;
  margin-bottom: 8px;
}
.wk-stat-value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  font-family: var(--font-jetbrains), monospace;
  color: #424b75;
}
.wk-stat-value-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.ba-stat-side {
  font-size: 13px;
  font-weight: 500;
  color: #9b2c3c;
  min-width: 0;
}

.mk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.mk-toolbar .header-search-wrap {
  margin-right: 0;
}
.filter-menu {
  position: relative;
  flex-shrink: 0;
}
.filter-menu-btn {
  box-sizing: border-box;
  height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #fff;
}
.filter-menu-btn.open,
.filter-menu-btn:hover {
  border-color: #c5d4f5;
}
.filter-menu-open {
  box-sizing: border-box;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
}
.filter-menu-wipe {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  margin-right: 6px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.filter-menu-wipe img {
  width: 10px;
  height: 10px;
  opacity: 0.4;
}
.filter-menu-wipe:hover img {
  opacity: 0.8;
}
.filter-menu-icon {
  width: 14px;
  height: 14px;
  color: #5b6475;
}
.filter-menu-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #226cfb;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.filter-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 176px minmax(240px, 280px);
  background: #fff;
  border: 1px solid #eceff5;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(20, 30, 50, 0.14);
  overflow: hidden;
}
.filter-menu-nav {
  background: #f7f8fb;
  padding: 8px;
  border-right: 1px solid #eceff5;
  max-height: 360px;
  overflow-y: auto;
}
.filter-menu-nav-rule {
  height: 1px;
  margin: 8px 6px;
  background: #e4e8f0;
}
.filter-menu-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: #3d4454;
}
.filter-menu-nav-item:hover {
  background: #eef1f7;
}
.filter-menu-nav-item.on {
  background: #e8ebf2;
  color: #1a1a1a;
  font-weight: 600;
}
.filter-menu-nav-mark {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filter-menu-nav-check {
  width: 12px;
  height: 12px;
  color: #226cfb;
}
.filter-menu-pane {
  padding: 8px;
  max-height: 360px;
  overflow-y: auto;
}
.filter-menu-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: #1a1a1a;
}
.filter-menu-option:hover {
  background: #f5f6fa;
}
.filter-menu-option-label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-menu-empty {
  padding: 12px 8px;
  font-size: 13px;
  color: #8a8a8a;
}
.filter-menu-pane .fin-dates {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 0 8px 8px;
}
.filter-menu-pane .fin-dates .input {
  width: calc(50% - 10px);
  min-width: 0;
  height: 36px;
}
.mk-toolbar .btn-archive {
  box-sizing: border-box;
  height: 40px;
  flex-shrink: 0;
  white-space: nowrap;
}
.cards-toolbar {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.cards-toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cards-last-sync {
  font-family: var(--font-inter), sans-serif;
  font-size: 13px;
    font-weight: 400;
    color: #949494;
    padding-left: 2px;
    margin-top: 10px;
}
.mk-toolbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-right: auto;
}
.mk-toolbar-left .header-search-wrap {
  margin-right: 0;
  border-radius: 100%;
}
.ba-collapse-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: #8a8a8a;
  white-space: nowrap;
}
.mk-filter {
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(36, 48, 72, 0.05);
}
.mk-filter-btn {
  box-sizing: border-box;
  height: 40px;
  min-width: 188px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #eeeeee;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.mk-filter-btn.open {
  border-color: #e2e2e2;
}
.mk-filter-name {
  color: #bebebe;
  white-space: nowrap;
}
.mk-filter-value {
  margin-left: auto;
  color: #1a1a1a;
  white-space: nowrap;
}
.mk-filter-check {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  opacity: 0.45;
}
.mk-filter-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  z-index: 40;
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  padding: 4px;
  max-height: 280px;
  overflow-y: auto;
}
.mk-filter-list-all {
  max-height: none;
  overflow: visible;
}
.mk-filter-empty {
  padding: 8px 12px;
  font-size: 13px;
  color: #8a8a8a;
}
.mk-filter-item-lead {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mk-filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  color: #1a1a1a;
}
.mk-filter-item:hover,
.mk-filter-item.on {
  background: #f8f6f6b3;
}
.mk-filter-item-check {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}
.mk-free-toggle {
  box-sizing: border-box;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #eeeeee;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: #1a1a1a;
  white-space: nowrap;
}
.mk-free-toggle.on {
  border-color: #c0cae4;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
}
.muted {
  color: #8f8f8f;
  font-size: 12px;
}

/* Планшет и шире: сайдбар всегда виден, бургер прячется */
.collapse-btn {
  display: none;
}
.collapse-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  opacity: 0.6;
  /* transform: rotate(180deg); */
  position: relative;
  bottom: 0px;
}

.collapse-icon:hover{
  opacity: 1;
}

/* Страница входа */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #eceff3;
}
.login-shell {
  width: 100%;
  max-width: 980px;
  min-height: 560px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(20, 30, 50, 0.12);
}
.login-visual {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #1a2744;
}
.login-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.login-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.login-visual-title {
  position: absolute;
  z-index: 2;
  top: 36px;
  left: 36px;
  right: 36px;
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 56px;
}
.login-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1a1a1a;
}
.login-sub {
  margin: 0 0 28px;
  font-size: 14px;
  color: #777;
  line-height: 1.4;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-form .field,
.login-input-wrap {
  width: 100%;
  align-self: stretch;
}
.login-input-wrap {
  position: relative;
  display: block;
}
.login-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
}
.login-input-wrap .input {
  width: 100%;
  padding-left: 38px;
}
.login-form input::placeholder {
  color: #c4c4c4;
}
.login-submit {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  cursor: pointer;
  background: var(--brand);
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
}
.login-submit:hover:not(:disabled) {
  filter: brightness(1.06);
}
.login-submit:disabled {
  cursor: wait;
  opacity: 0.55;
  filter: none;
}

.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #eceff3;
}
.not-found-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(20, 30, 50, 0.12);
}
.not-found-code {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: #226cfb;
  margin: 0 0 12px;
}
.not-found-card h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
}
.not-found-card p {
  margin: 0 0 24px;
  color: #777;
  font-size: 14px;
}
.not-found-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  background: #226cfb;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.not-found-card a:hover {
  background: #356bd5;
}

.input {
  padding: 12px 12px;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  font-size: 14px;
  width: 100%;
}
.input:focus {
  outline: none;
  border-color: #888;
}
.input:disabled {
  background: #f7f7f7;
  color: #888;
  cursor: not-allowed;
}
textarea.input {
  min-height: 120px;
  resize: vertical;
  line-height: 1.4;
}
.header-search {
  box-sizing: border-box;
  width: 210px;
  height: 40px;
  padding: 0 32px 0 36px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(36, 48, 72, 0.05);
  /* border-radius: 100px; */
}
.header-search::placeholder,
.modal-window .header-search::placeholder {
  color: #bebebe;
  opacity: 1;
}
.header-search:focus {
  outline: none;
  border-color: #eeeeee;
}
.mfp-search .header-search {
  width: 280px;
}
.btn-primary {
  color: #fff;
  cursor: pointer;
  background: #424b75;
  border: none;
  border-radius: 5px;
  padding: 10px 16px;
  font-size: 14px;
  transition: transform 0.2s ease;
}
.btn-primary:hover {
  filter: brightness(1.26);
  transition: transform 0.2s ease;
}
.btn-primary:disabled {
  opacity: 0.55;
  filter: none;
  cursor: default;
}
.btn-archive {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #000;
  background: #eeeeee;
  border: 1px solid #e4e4e4;
  border-radius: 5px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(36, 48, 72, 0.05);
}
.btn-archive-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.btn-archive:hover {
  background: #e7e7e7;
}
.error {
  color: #c0392b;
  font-size: 13px;
}

/* Заголовок страницы с кнопкой справа */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

/* Таблица */
.table-wrap {
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: var(--radius);
  overflow-x: auto;
}

.table-wrap,
.accounts,
.mk-card,
.mfp-card {
  scrollbar-width: thin;
  scrollbar-color: #c0cae4 transparent;
}
.table-wrap::-webkit-scrollbar:horizontal,
.accounts::-webkit-scrollbar:horizontal,
.mk-card::-webkit-scrollbar:horizontal,
.mfp-card::-webkit-scrollbar:horizontal {
  height: 3px;
}
.table-wrap::-webkit-scrollbar-thumb:horizontal,
.accounts::-webkit-scrollbar-thumb:horizontal,
.mk-card::-webkit-scrollbar-thumb:horizontal,
.mfp-card::-webkit-scrollbar-thumb:horizontal {
  background: #c0cae4;
  border-radius: 2px;
}
.table-wrap::-webkit-scrollbar-track:horizontal,
.accounts::-webkit-scrollbar-track:horizontal,
.mk-card::-webkit-scrollbar-track:horizontal,
.mfp-card::-webkit-scrollbar-track:horizontal {
  background: transparent;
}
.table-wrap::-webkit-scrollbar-button:horizontal,
.accounts::-webkit-scrollbar-button:horizontal,
.mk-card::-webkit-scrollbar-button:horizontal,
.mfp-card::-webkit-scrollbar-button:horizontal {
  display: none;
  width: 0;
  height: 0;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}
table.data th,
table.data td {
  text-align: left;
  padding: 12px 16px;
  white-space: nowrap;
  font-size: 13px;
}
.mk-group td {
    padding: 5px 16px !important;
}
table.data thead th {
  color: #000; background: #fafafb; font-size: 12px; font-weight: 500;
  border-bottom: 1px solid #eeeeee;
}
table.data tbody td {
  background: #fff;
  color: #000;
}

/* Моноширинный шрифт для содержимого таблиц (не шапок) */
table.data tbody,
.mk-card-table tbody,
.mfp-main,
.mfp-inner-table tbody,
.acc-main,
.mini-table tbody,
.info-val {
  font-family: var(--font-jetbrains), monospace;
}

table.data tbody tr {
  border-bottom: 1px solid #eeeeee;
}
table.data tbody tr:last-child {
  border-bottom: none;
}

.empty {
  color: #858585;
    padding: 24px 16px;
    font-size: 13px;
    font-weight: 300;
    font-family: var(--font-jetbrains), monospace;
}
.empty-panel {
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: var(--radius);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  background: #eee;
  color: #333;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.inline-form .input {
  width: auto;
  flex: 0 1 200px;
}
.btn-secondary {
  padding: 10px 12px;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}
.btn-secondary:hover {
  background: #f0f0f0;
}

/* Бейджи статусов */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.status-new {
  background: #eceff1;
  color: #455a64;
}
.status-in_work {
  background: #fff4d6;
  color: #8a6d00;
}
.status-active {
  background: #e7f4ec;
  color: #2f855a;
}
.status-ready {
  background: #e3f5e8;
  color: #1f7a3d;
}
.status-issued {
  background: #ede7f6;
  color: #5b3d8c;
}
.status-problem {
  background: #fde8e8;
  color: #c0392b;
}
.status-archive {
  background: #f0f0f0;
  color: #777;
}
.status-selfie {
  background: #fbeaea;
  color: #c0392b;
}
.status-pause {
  background: #eeeeee;
  color: #888;
}
.status-docs_check,
.status-dofarm {
  background: #fff1e0;
  color: #c05621;
}
.status-block,
.status-problem {
  background: #f9e8ea;
  color: #9b2c3c;
}
.status-buyer-new {
  background: #eceff1;
  color: #455a64;
}
.status-buyer-dofarm {
  background: #fff1e0;
  color: #c05621;
}
.status-buyer-active {
  background: #e7f4ec;
  color: #2f855a;
}
.status-buyer-selfie {
  background: #fbeaea;
  color: #c0392b;
}
.status-buyer-block {
  background: #f9e8ea;
  color: #9b2c3c;
}

.back-link {
  font-size: 13px;
  color: #666;
}
.back-link:hover {
  color: #1a1a1a;
}

.card {
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: var(--radius);
  padding: 8px 16px;
  max-width: 520px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #eeeeee;
  font-size: 14px;
}
.info-row:last-child {
  border-bottom: none;
}
.info-label {
  color: #666;
}

.row-link {
  color: #2b6cb0;
}
.row-link:hover {
  text-decoration: underline;
}

.assets-block {
  margin-top: 24px;
  max-width: 640px;
}
.assets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.assets-title {
  font-size: 16px;
  font-weight: 600;
}

.status-select {
  width: auto;
  padding: 6px 10px;
}

.history-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.history-item {
  padding: 10px 0;
  border-bottom: 1px solid #eeeeee;
}
.history-item:last-child {
  border-bottom: none;
}
.history-text {
  font-size: 14px;
}
.history-meta {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

/* Аккаунты — строки-аккордеоны */
.accounts {
  --col-chev: 24px;
  --col-name: 240px;
  --col-geo: 80px;
  --col-type: 140px;
  --col-farmer: 80px;
  --col-farm-date: 100px;
  --col-bm: 70px;
  --col-ads: 70px;
  --col-meta-pay: 70px;
  --col-fp: 70px;
  --col-status: 140px;
  --col-buyer: 80px;
  --col-issued: 88px;
  --col-menu: 72px;
  --acc-gap: 10px;
  --wk-head-pad-y: 12px;
  --wk-head-pad-x: 16px;
  --acc-pad-x: calc(var(--wk-head-pad-x) * 2);
  --acc-cols: var(--col-chev) minmax(var(--col-name), 2fr) var(--col-geo) var(--col-type) var(--col-farmer) minmax(var(--col-farm-date), 1.1fr) var(--col-bm) var(--col-ads) var(--col-meta-pay) var(--col-fp) minmax(var(--col-status), 1fr) var(--col-buyer) var(--col-issued) var(--col-menu);
  --acc-min: calc(
    var(--col-chev) + var(--col-name) + var(--col-geo) + var(--col-type) + var(--col-farmer) + var(--col-farm-date)
    + var(--col-bm) + var(--col-ads) + var(--col-meta-pay) + var(--col-fp) + var(--col-status) + var(--col-buyer)
    + var(--col-issued) + var(--col-menu) + (13 * var(--acc-gap)) + var(--acc-pad-x)
  );
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: var(--radius);
  overflow-x: auto;
}
.accounts.ba-accounts {
  --col-drag: 18px;
  --col-chev: 30px;
  --col-name: minmax(240px, 2fr);
  --col-even: minmax(110px, 1fr);
  --col-menu: 72px;
  --acc-cols: var(--col-drag) var(--col-chev) var(--col-name) var(--col-even) var(--col-even) var(--col-even) var(--col-even) var(--col-even) var(--col-even) var(--col-even) var(--col-menu);
  --acc-min: calc(var(--col-drag) + var(--col-chev) + 240px + 770px + var(--col-menu) + 132px);
  background: transparent;
  border: none;
  overflow-x: auto;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}
.ba-accounts .acc-head {
  background: transparent;
  border: none;
  padding-left: 17px;
  padding-right: 17px;
}
.ba-accounts .acc-head > span {
  white-space: nowrap;
}
.ba-accounts .acc-head > span:nth-child(n+4),
.ba-accounts .acc-main > span:nth-child(n+4) {
  border-left: 1px solid #eeeeee;
  padding-left: 10px;
}
.ba-accounts .acc-row {
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: var(--radius);
  /* box-shadow: 0 1px 4px rgba(36, 48, 72, 0.05); */
}
.ba-accounts .acc-row.open {
  background: #eff3fc;
  border: 1px solid #e9e9e9;
  border-radius: var(--radius);
  padding: 0;
  /* box-shadow: 0 2px 10px rgba(36, 48, 72, 0.07); */
}
.ba-accounts .acc-row:last-child {
  border-bottom: 1px solid #eeeeee;
}
.ba-accounts .acc-head,
.ba-accounts .acc-main {
  justify-content: start;
}
.ba-accounts .acc-main {
  padding: 16px;
}
.ba-accounts .acc-main:hover {
  background: transparent;
}
.ba-accounts .acc-row.open .acc-main,
.ba-accounts .acc-row.open .acc-main:hover {
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(36, 48, 72, 0.04);
  border-bottom: 1px solid #e9e9e9;
}
.ba-accounts .acc-ind {
  text-align: center;
}
.ba-accounts .acc-menu-h,
.ba-accounts .acc-menu-cell {
  text-align: center;
  justify-self: stretch;
}
.ba-worker-icon {
  opacity: .75;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: #eeeeeea1;
    padding: 7px;
    border-radius: 100%;
}
.ba-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 28px;
  cursor: grab;
  color: #c0c4c8;
  flex-shrink: 0;
}
.ba-drag:hover {
  color: #8a8f96;
}
.ba-drag:active,
.ba-accounts .acc-row.ba-dragging .ba-drag {
  cursor: grabbing;
}
.ba-drag img {
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
  opacity: 0.4;
}
.ba-accounts .acc-row.ba-dragging {
  opacity: 0.55;
}
.ba-accounts .acc-row.ba-drag-over {
  box-shadow: 0 0 0 2px rgba(34, 108, 251, 0.18);
}
.ba-expand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 0.5fr);
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  min-width: 0;
}
.ba-expand-split {
  background: #dee2e9;
  width: 1px;
  min-height: 80px;
}
.ba-expand-empty {
  padding: 20px 16px;
  align-items: start;
}
.ba-expand-empty .ba-expand-split {
  min-height: 0;
  align-self: stretch;
}
.ba-col {
  background: none;
  border-radius: 0;
  padding: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ba-col-empty {
  color: #9aa0a6;
  font-size: 13px;
  text-align: left;
}
.ba-accounts .acc-cell,
.ba-accounts .acc-ind,
.ba-accounts .acc-ind-h,
.ba-accounts .acc-menu-h {
  white-space: nowrap;
}
.ba-accounts .ba-card {
  background: #fff;
  overflow-x: hidden;
  max-width: 100%;
  min-width: 0;
}
.acc-row {
  min-width: var(--acc-min, 0);
  width: 100%;
  border-bottom: 1px solid #eeeeee;
  background: #fff;
}
.acc-row:last-child {
  border-bottom: none;
}
.acc-row.open {
  background: #fafbff;
}
.accounts:not(.ba-accounts) .acc-row.open {
  border-radius: 0 0 var(--radius) var(--radius);
}

.acc-main {
  width: 100%;
  min-width: var(--acc-min, 0);
  border: none;
  background: #fff;
  cursor: pointer;
  display: grid;
  grid-template-columns: var(--acc-cols);
  align-items: center;
  gap: var(--acc-gap, 10px);
  padding: 14px 16px;
  text-align: left;
  font-size: 13px;
  color: inherit;
  font-weight: 400;
  border-radius: 12px;
}
.acc-main:hover {
  background: #f7f8fa;
  border-radius: 0;
}
.acc-row.open .acc-main {
  background: transparent;
  border-radius: 0;
}
.acc-row.open .acc-main:hover {
  background: transparent;
}
.acc-chevron {
  display: inline-flex; align-items: center; justify-content: center;
  color: #999;
}
.acc-chevron img {
  width: 11px;
  height: 11px;
  transition: transform 0.2s ease;
}
.acc-chevron.open img {
  transform: rotate(90deg);
}
.acc-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
}
.acc-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000;
}
.acc-row.acc-archived .acc-name,
.acc-row.acc-archived .acc-name-text {
  color: #999999;
}
.acc-asset-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}
.acc-asset-row + .acc-asset-row {
  margin-top: 10px;
}
.acc-asset-row .acc-asset-name {
  flex: 1;
  min-width: 0;
}
.acc-asset-bm {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.acc-bm-id {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #888;
}
.acc-asset-edit {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  opacity: 0.4;
  position: relative;
  bottom: 3px;
}
.acc-asset-edit:hover {
  opacity: 1;
}
.acc-asset-edit img {
  width: 14px;
  height: 14px;
}
.bm-edit-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bm-delete-link {
  align-self: center;
  border: none;
  background: none;
  padding: 0;
  color: #c0392b;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.bm-delete-link:hover {
  color: #9b2c23;
}
.acc-type {
  min-width: 0;
}
.acc-cell {
  color: #333;
}

.badge-type {
  background: #edf3fd;
  color: #002793;
}
.badge-type-empty {
  background: #eeeeee;
  color: #888;
}

/* Разворот: плавно по высоте */
.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.acc-row.open .acc-panel {
  grid-template-rows: 1fr;
}
.acc-panel-inner {
  overflow: hidden;
}

.acc-section {
  padding: 8px 16px 20px;
}
.acc-section-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #000;
}
.acc-section-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.4;
  display: block;
}
.acc-ad-group + .acc-ad-group {
  margin-top: 18px;
}
.acc-ad-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.acc-cols .ba-card .ba-bm-table th:last-child,
.acc-cols .ba-card .ba-bm-table td:last-child {
  width: auto;
  text-align: left;
  padding-left: 12px;
  padding-right: 12px;
}
.form-error {
  margin: -8px 0 0;
  font-size: 13px;
  color: #c0392b;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.mini-table th {
  text-align: left;
  padding: 8px 12px;
  color: #888;
  font-weight: 400;
  font-size: 11px;
  border-bottom: 1px solid #eeeeee;
}
.mini-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eeeeee;
  font-size: 12px;
    font-weight: 500;
}
.mini-table tr:last-child td {
  border-bottom: none;
}

.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.chip-active {
  background: #e3f5e8;
  color: #1f7a3d;
}

.acc-cols {
  grid-template-columns: 0.8fr 1.5fr 0.85fr;
    gap: 24px;
    padding: 20px 20px 20px;
    display: grid;
    background: #fff;
    margin: 0px 12px 12px;
    border-radius: var(--radius);
    border: 1px solid #eeeeee;
}
.acc-cols .acc-section {
  padding: 0;
}

/* Additional Info */
.info-grid {
  grid-template-columns: auto 1fr;
    gap: 20px 16px;
    font-size: 12px;
    display: grid;
    align-items: start;
}
.info-key {
  color: #888;
}
.info-val {
  color: #1a1a1a;
  font-weight: 400;
}

/* Activity Log */
.log-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.log-item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 8px;
  align-items: start;
}
.log-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  margin-top: 5px;
}
.log-user {
  font-size: 12px;
  font-weight: 500;
  color: #000;
}
.log-desc {
  font-size: 12px;
  color: #888;
  margin-top: 5px;
}
.log-time {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}
.log-more {
  cursor: pointer;
    color: #000000;
    background: none;
    border: none;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 0;
    font-size: 13px;
    display: inline-flex;
    width: 100%;
    text-align: center;
    justify-content: center;
    font-family: var(--font-inter), sans-serif;
    font-weight: 500;
}
.log-more:hover { color: #1a1a1a; }

.log-more-icon {
  width: 14px;
  height: 14px;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}
.log-more-icon.up {
  transform: rotate(-90deg);
}
.log-wrap {
  position: relative;
}
.log-list-clip {
  position: relative;
}
.log-fade {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 75%);
}

.acc-ind {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  color: #333;
}
.indicator {
    object-fit: contain;
    width: 14px;
    min-width: 14px;
    max-width: 14px;
    height: 14px;
    min-height: 14px;
    max-height: 14px;
    display: block;
}
.indicator-bad {
  filter: brightness(0) saturate(100%) invert(27%) sepia(62%) saturate(1800%) hue-rotate(343deg);
}

.acc-head {
  color: #000000;
    border-bottom: 1px solid #eeeeee;
    grid-template-columns: var(--acc-cols);
    align-items: center;
    gap: var(--acc-gap, 10px);
    width: 100%;
    padding: 5px 16px 5px;
    font-size: 12px;
    font-weight: 600;
    display: grid;
    background: #fafafb;
    min-width: var(--acc-min, 0);
}
.wk-acc-head {
  padding: var(--wk-head-pad-y) var(--wk-head-pad-x);
}
.acc-ind-h {
  text-align: center;
}

/* Модальные окна */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal-window {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.modal-window input::placeholder,
.modal-window textarea::placeholder {
  color: #c4c4c4;
}
.modal-window .select-value.placeholder {
  color: #c4c4c4;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eeeeee;
}
.modal-title {
  font-size: 16px;
  font-weight: 500;
  color: #000;
}
.modal-close {
  border: none; background: none; cursor: pointer;
  padding: 4px; display: inline-flex; align-items: center; border-radius: 6px;
}
.modal-close:hover { background: #f0f0f0; }
.modal-close-icon {width: 14px;height: 14px;display: block;}
.modal-body {
  padding: 15px 20px 20px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
      color: #000000;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
}
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.modal-actions > .btn-primary,
.modal-actions > .btn-secondary {
  flex: 1 1 0;
  width: 50%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
}
.modal-footer-error {
  margin: 0px 0 0;
  font-size: 13px;
  color: #c0392b;
  text-align: center;
}
.confirm-message {
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #000;
}
.confirm-form {
  gap: 15px;
}
.confirm-form .modal-actions {
  margin-top: 0;
}

.acc-menu-cell {
  display: flex;
  justify-content: center;
}
.acc-menu-h {
  text-align: center;
}
.row-menu {
  position: relative;
}
.row-menu-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  color: #888;
  padding: 4px 8px;
  border-radius: 6px;
}
.row-menu-btn:hover:not(:disabled) {
  background: #eee;
  color: #1a1a1a;
}
.row-menu-btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.dots-menu-btn {
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  /* border: 1px solid #eee; */
}
.dots-menu-btn:hover:not(:disabled) {
  background: #eee;
}
.dots-menu-btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.dots-menu-icon {
  width: 16px;
  height: 16px;
  display: block;
  opacity: 0.45;
}
.dots-menu-btn:hover:not(:disabled) .dots-menu-icon {
  opacity: 0.85;
}
.row-menu-list {
  z-index: 1000;
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  width: 220px;
  padding: 4px;
  text-align: left;
}
.row-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  padding: 12px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #1a1a1a;
  font-family: var(--font-inter), sans-serif;
}
.row-menu-item:hover:not(:disabled) {
  background: #f2f2f2;
}
.row-menu-meta {
  padding: 8px 12px 4px;
  font-size: 12px;
  color: #8a8a8a;
  font-family: var(--font-inter), sans-serif;
  text-align: left;
}
.row-menu-item:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.row-menu-item.danger {
  color: #c0392b;
}

.status-inline {
  width: auto;
  padding: 4px 8px;
  font-size: 13px;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: visible;
}

.user-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px 12px;
  border-radius: 18px;
  background: radial-gradient(140px 110px at 100% 0%, rgb(67 67 135 / 49%), rgb(63 63 122 / 14%) 36%, transparent 68%), #252a3d;
  border: 1px solid #7f7fcc85;
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.08);
}
.user-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid #676f8e;
}
.user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}
.user-name {
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 12px;
  color: #8087a5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-rank {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 2px;
}
.user-rank-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.user-rank-icon {
  width: 42px;
  height: 48px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}
.user-rank-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.user-rank-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-rank-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #8b93ab;
}
.user-rank-infinity {
  width: 18px;
  height: 10px;
  display: block;
  position: relative;
  top: 1px;
}
.user-rank-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.user-rank-bar {
  height: 5px;
  border-radius: 99px;
  background: #3a4158;
  box-shadow: 0 0 5px 1px rgba(127, 127, 204, 0.28);
}
.user-rank-bar.on {
  background: #7f7fcc;
  box-shadow: 0 0 4px 1px rgb(127 127 204 / 10%), 0 0 10px 2px rgb(127 127 204 / 43%);
}
.user-rank-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #8b93ab;
}
.user-rank-next img {
  width: 10px;
  height: 10px;
  opacity: 0.55;
  filter: invert(1);
  flex-shrink: 0;
}
.user-card form {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.user-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #c5c9d8;
}
.user-logout-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-color: #c5c9d8;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.user-logout:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.user-logout:hover .user-logout-icon {
  background-color: #fff;
}


.acc-cols .acc-section:nth-child(2) {
  border-left: 1px solid #eeeeee;
  border-right: 1px solid #eeeeee;
  padding-left: 24px;
  padding-right: 24px;
}

.log-list { position: relative; }

.log-list::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: #ddd;
}

.log-dot {
  position: relative;
  z-index: 1;
}

/* Кастомный выпадающий статус */
.status-dd { position: relative; display: inline-block; }

.status-dd-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; cursor: pointer; font: inherit;
}

.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}

.status-dd-list {
  position: relative;
  z-index: 1000;
  background: #fff; border: 1px solid #eeeeee; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  padding: 4px; min-width: 160px;
}

.status-dd-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: none; background: none; cursor: pointer; text-align: left;
  padding: 6px 10px; border-radius: 6px; font: inherit; font-size: 13px;
}
.status-dd-item:hover { filter: brightness(0.96); }

.status-dd-item.disabled {
  color: #bbb; cursor: not-allowed;
  background: none;
}
.status-dd-item.disabled:hover { filter: none; }

.geo-flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  flex-shrink: 0;
}

.select { position: relative; width: 100%; }

.select-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 12px 12px;
  border: 1px solid #eeeeee; border-radius: 8px;
  background: #fff; cursor: pointer; font: inherit; font-size: 14px;
  text-align: left;
}
.select-btn:hover {}
.select-btn.open { border-color: #e2e2e2; }
.select-btn:disabled {
  cursor: not-allowed;
  background: #f7f7f7;
  color: #999;
}
.select-btn:disabled .select-value { color: #999; }

.select-value { color: #1a1a1a; display: inline-flex; align-items: center; }
.select-value.placeholder { color: #999; }
.select-search {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: #1a1a1a;
  padding: 0;
}
.select-search::placeholder { color: #bebebe; opacity: 1; }
.select-empty {
  padding: 8px 12px;
  font-size: 13px;
  color: #999;
}

.select-arrow {
  width: 14px; height: 14px; flex-shrink: 0;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}
.select-arrow.up { transform: rotate(-90deg); }

.select-list {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; z-index: 50;
  background: #fff; border: 1px solid #eeeeee; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  padding: 4px; max-height: 280px; overflow-y: auto;
}
.select-item {
  display: flex; align-items: center; width: 100%; text-align: left;
  border: none; background: none; cursor: pointer;
  padding: 8px 12px; border-radius: 6px; font: inherit; font-size: 14px; color: #1a1a1a;
}
.select-item:hover { background: #f8f6f6b3; }
.select-item.active { background: #f8f6f6b3; color: #3538cd; }
.modal-window .select-item.active {
  background: #f8f8f8;
  color: #000;
}

.btn-with-icon {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
}
.btn-icon-plus { width: 14px; height: 14px; }
.btn-primary .btn-icon-sync {
  filter: brightness(0) invert(1);
}
.btn-icon-sync.spin {
  animation: sync-spin 1s linear infinite;
}
@keyframes sync-spin {
  to { transform: rotate(360deg); }
}
.btn-icon-arrow { width: 14px; height: 14px; }
.login-submit-icon { width: 18px; height: 18px; }

/* Кнопки в модалке делят ряд поровну */
.btn-grow { flex: 1; }

.datepicker { position: relative; width: 100%; }

.cal {
  position: absolute; top: 100%; left: 0; margin-top: 4px; z-index: 50;
  background: #fff; border: 1px solid #eeeeee; border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  padding: 12px; width: 260px;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #000;
}
.cal-title { font-size: 14px; font-weight: 500; }
.cal-nav {
  border: none; background: none; cursor: pointer;
  width: 28px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.cal-nav:hover { background: #f0f0f0; }
.cal-nav-icon { width: 14px; height: 14px; }
.cal-nav-icon.left { transform: rotate(180deg); }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.cal-wd {
  font-size: 11px; color: #999; text-align: center;
  padding: 4px 0; font-weight: 500;
}
.cal-day {
  display: flex; align-items: center; justify-content: center;
  height: 32px; min-height: 32px;
  border: none; background: none; cursor: pointer;
  border-radius: 6px; font: inherit; font-size: 13px;
  color: #1a1a1a; padding: 0;
}
.cal-day:hover { background: #f0f0f0; }
.cal-day.empty { visibility: hidden; cursor: default; }
.cal-day.empty:hover { background: none; }
.cal-day.selected { background: #1a1a1a; color: #fff; }
.cal-day.selected:hover { background: #1a1a1a; }

/* Спиннер на кнопке */
.spinner {
  display: inline-block;
  box-sizing: border-box;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Ошибки валидации */
.input-error { border-color: #c0392b; }
.field-error { font-size: 12px; color: #c0392b; margin-top: 4px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pager-num,
.pager-arrow,
.pager-dots {
  box-sizing: border-box;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: #1a1a1a;
  line-height: 1;
}
.pager-num,
.pager-arrow {
  cursor: pointer;
}
.pager-num:hover,
.pager-arrow:hover:not(:disabled) {
  background: #f5f5f5;
}
.pager-num.is-active {
  border-color: #226cfb;
  color: #226cfb;
  box-shadow: inset 0 0 0 1px #226cfb;
}
.pager-dots {
  cursor: default;
  font-size: 18px;
  letter-spacing: 1px;
  color: #888;
}
.pager-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
.pager-arrow img {
  width: 12px;
  height: 12px;
  display: block;
}
.pager-arrow-prev img {
  transform: rotate(180deg);
}

.mk-table { table-layout: fixed; width: 100%; border-collapse: collapse; }
.mk-table td, .mk-table th { vertical-align: middle; }

.mk-table thead {
  background: #fafafb;
  color: #000;
  font-size: 12px;
  font-weight: 500;
}

/* Полная сетка: линии между всеми ячейками */
.mk-table th,
.mk-table td {
  border-right: 1px solid #eeeeee;
  border-bottom: 1px solid #eeeeee;
}
.mk-table th,
.mk-table td {
  border: 1px solid #eeeeee;
}
.mk-table tbody.mk-group { border-bottom: 2px solid #000; }

/* Жирная линия между мастер кингами (низ каждой группы) */
.mk-table tbody.mk-group { border-bottom: 2px solid #c5d1f5 }

.mk-menu-cell { text-align: center; }

.mk-table th:nth-child(1), .mk-table td:nth-child(1) { width: 18%; }
.mk-table th:nth-child(2), .mk-table td:nth-child(2) { width: 12%; }
.mk-table th:nth-child(3), .mk-table td:nth-child(3) { width: 22%; }
.mk-table th:nth-child(4), .mk-table td:nth-child(4) { width: 18%; }
.mk-table th:nth-child(5), .mk-table td:nth-child(5) { width: 22%; }
.mk-table th:nth-child(6), .mk-table td:nth-child(6) { width: 8%; }

/* Цвета баеров — основной (текст) и фоновый */
.buyer-SHK { background: #dbe7ff; color: #1e4e9c; }
.buyer-VIT { background: #d4f0de; color: #1f6f45; }
.buyer-SGB { background: #e6dcff; color: #5b2bbd; }
.buyer-QWE { background: #ffe9b3; color: #9a6700; }
.buyer-KTR { background: #ffd4e6; color: #a61e66; }
.buyer-OBJ { background: #f8d4d8; color: #8f1d2c; }
.buyer-ZHU { background: #c8efe9; color: #0f6f72; }
.buyer-LWS { background: #ddd6fe; color: #5b21b6; }
.buyer-LBN { background: #ffd8b5; color: #b45309; }
.buyer-WEB { background: #fae8ff; color: #86198f; }
.buyer-POV { background: #bae6fd; color: #0369a1; }
.buyer-AYV { background: #ffedd5; color: #9a3412; }

/* Мелкий статус с точкой (В блоке, статусы баеров и т.п.) */
.state-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.state-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.state-red   { background: #fbeaea; color: #c0392b; }
.state-green { background: #e7f4ec; color: #2f855a; }
.state-orange { background: #fff4d6; color: #c05621; }
.state-gray  { background: #eeeeee; color: #888; }
.state-yellow { background: #eee8d0; color: #8a7a3c; }

.mk-table thead th { color: #000; background: #fafafb; font-size: 12px; font-weight: 500; }

.mk-name { font-weight: 500; }

.mk-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.mk-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.mk-status-active { background: #e7f4ec; color: #2f855a; }
.mk-status-empty { background: #eee8d0; color: #8a7a3c; }
.mk-status-archive { background: #eeeeee; color: #888; }
.mk-status-selfie,
.mk-status-deleted { background: #fbeaea; color: #c0392b; }
.mk-status-block { background: #fbeaea; color: #6b1c23; }

.menu-item-icon { display: flex; align-items: center; gap: 8px; }
.menu-icon { width: 14px; height: 14px; }

.mk-cards { display: flex; flex-direction: column; gap: 16px; }

.mk-card {
  background: #fff; border: 1px solid #eeeeee; border-radius: var(--radius);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.mk-card::-webkit-scrollbar-thumb:horizontal {
  background: transparent;
}
.mk-card.mk-scrolling {
  scrollbar-color: #c0cae4 transparent;
}
.mk-card.mk-scrolling::-webkit-scrollbar-thumb:horizontal {
  background: #c0cae4;
}

.mk-card-table { width: 100%; min-width: 1596px; border-collapse: collapse; table-layout: fixed; font-size: 14px; }

.mk-card-table th {
  text-align: left; padding: 12px 16px;
  color: #000; background: #fafafb; font-size: 12px; font-weight: 500;
  border-bottom: 1px solid #eeeeee;
  border-right: 1px solid #eeeeee;
}
.mk-card-table td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #eeeeee;
  border-right: 1px solid #eeeeee;
  font-size: 13px;
}
.mk-card-table th:last-child,
.mk-card-table td:last-child { border-right: none; }
.mk-card-table tbody tr:last-child td { border-bottom: none; }

.mk-card-table td.mk-name {
  font-size: 13px;
  font-weight: 400;
}
.mk-card-table .mk-name-text {
  font-size: 14px;
  font-weight: 500;
}
.mk-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.mk-name-menu {
  margin-left: auto;
  flex-shrink: 0;
}
.mk-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-card.mk-archived .mk-name-text,
.mk-card.mk-archived .mk-acc-cell > span:last-child,
.mk-card.mk-archived .mk-shop-name,
.mk-card.mk-archived .mk-issued-name {
  color: #8a8a8a;
}
.mk-acc-count {
  flex-shrink: 0;
  color: #8a8a8a;
  font-size: 13px;
  font-weight: 400;
}

.mk-card-table th,
.mk-card-table td {
  white-space: nowrap;
  color: #000;
}
.mk-card-table th:nth-child(1), .mk-card-table td:nth-child(1) { width: 270px; }
.mk-card-table th:nth-child(2), .mk-card-table td:nth-child(2) { width: 110px; }
.mk-card-table th:nth-child(3), .mk-card-table td:nth-child(3) { width: 150px; }
.mk-card-table th:nth-child(4), .mk-card-table td:nth-child(4) { width: 110px; }
.mk-card-table th:nth-child(5), .mk-card-table td:nth-child(5) { width: 96px; }
.mk-card-table th:nth-child(6), .mk-card-table td:nth-child(6) { width: 100px; }
.mk-card-table th:nth-child(7), .mk-card-table td:nth-child(7) { width: 170px; }
.mk-card-table th:nth-child(8), .mk-card-table td:nth-child(8) { width: 180px; }
.mk-card-table th:nth-child(9), .mk-card-table td:nth-child(9) { width: 380px; }
.mk-card-table th:nth-child(10), .mk-card-table td:nth-child(10) { width: 90px; text-align: center; }
.mk-card-table th:nth-child(10) { text-align: center; }
.mk-card-table td:nth-child(9) {
  overflow: hidden;
  max-width: 0;
}
.mk-issued-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.mk-issued-line .badge {
  flex-shrink: 0;
}
.mk-issued-line .mk-issued-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mk-account-used { color: #8a8a8a; }

.mk-acc-th,
.mk-acc-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mk-acc-th-label { flex: 1; min-width: 0; }
.mk-acc-th .dots-menu-btn { margin: -4px -4px -4px 0; }

.mk-check {
  flex-shrink: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1.5px solid #eeeeee;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  appearance: none;
}
.mk-check:hover:not(:disabled) { border-color: #236df9; }
.mk-check.on,
.mk-check.mixed {
  background-color: #236df9;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  border-color: #236df9;
}
.mk-check.on {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M4 8.3l2.6 2.6L12.2 5'/%3E%3C/svg%3E");
}
.mk-check.on::after { content: none; }
.mk-check.mixed {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='4' y='7' width='8' height='2' rx='1' fill='%23fff'/%3E%3C/svg%3E");
}
.mk-check.mixed::after { content: none; }
.mk-check:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.mk-check-spacer {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.dir-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.dir-table thead,
.dir-table tbody,
.dir-table tr {
  display: revert;
}
.dir-table th,
.dir-table td {
  width: auto;
  min-width: 0;
  vertical-align: middle;
  border-bottom: 1px solid #eeeeee;
  border-right: 1px solid #eeeeee;
}
.dir-table th:last-child,
.dir-table td:last-child {
  border-right: none;
}
.dir-table tbody tr:last-child td {
  border-bottom: none;
}
.dir-table .col-menu {
  width: 90px;
  text-align: center;
}
.dir-table .col-combo-flag .indicator {
  margin: 0;
}

.dir-farmers {
  --col-id: 90px;
  --col-name: 188px;
  --col-level: 170px;
  --col-access: 280px;
  --col-login: 110px;
  --col-status: 130px;
  --col-menu: 90px;
  table-layout: fixed;
  width: 100%;
  min-width: calc(var(--col-id) + var(--col-name) + var(--col-level) + var(--col-access) + var(--col-login) + var(--col-status) + var(--col-menu));
}
.dir-farmers th:nth-child(1), .dir-farmers td:nth-child(1) { width: var(--col-id); }
.dir-farmers th:nth-child(2), .dir-farmers td:nth-child(2) { width: var(--col-name); }
.dir-farmers th:nth-child(3), .dir-farmers td:nth-child(3) { width: var(--col-level); }
.dir-farmers th:nth-child(4), .dir-farmers td:nth-child(4) { width: var(--col-access); }
.dir-farmers th:nth-child(5), .dir-farmers td:nth-child(5) { width: var(--col-login); }
.dir-farmers th:nth-child(6), .dir-farmers td:nth-child(6) { width: var(--col-status); }
.dir-farmers th:nth-child(7), .dir-farmers td:nth-child(7) { width: var(--col-menu); }

.dir-buyers {
  --col-id: 110px;
  --col-name: 188px;
  --col-level: 150px;
  --col-combo-id: 100px;
  --col-combo-email: 120px;
  --col-access: 200px;
  --col-status: 120px;
  --col-last-login: 160px;
  --col-menu: 90px;
  table-layout: fixed;
  width: 100%;
  min-width: calc(var(--col-id) + var(--col-name) + var(--col-level) + var(--col-combo-id) + var(--col-combo-email) + var(--col-access) + var(--col-status) + var(--col-last-login) + var(--col-menu));
}
.dir-buyers th:nth-child(1), .dir-buyers td:nth-child(1) { width: var(--col-id); }
.dir-buyers th:nth-child(2), .dir-buyers td:nth-child(2) { width: var(--col-name); }
.dir-buyers th:nth-child(3), .dir-buyers td:nth-child(3) { width: var(--col-level); }
.dir-buyers th:nth-child(4), .dir-buyers td:nth-child(4) { width: var(--col-combo-id); }
.dir-buyers th:nth-child(5), .dir-buyers td:nth-child(5) { width: var(--col-combo-email); }
.dir-buyers th:nth-child(6), .dir-buyers td:nth-child(6) { width: var(--col-access); }
.dir-buyers th:nth-child(7), .dir-buyers td:nth-child(7) { width: var(--col-status); }
.dir-buyers th:nth-child(8), .dir-buyers td:nth-child(8) { width: var(--col-last-login); }
.dir-buyers th:nth-child(9), .dir-buyers td:nth-child(9) { width: var(--col-menu); }

.dir-shops {
  --col-id: 120px;
  --col-name: 280px;
  --col-status: 140px;
  --col-menu: 90px;
  table-layout: fixed;
  width: 100%;
  min-width: calc(var(--col-id) + var(--col-name) + var(--col-status) + var(--col-menu));
}
.dir-shops th:nth-child(1), .dir-shops td:nth-child(1) { width: var(--col-id); }
.dir-shops th:nth-child(2), .dir-shops td:nth-child(2) { width: var(--col-name); }
.dir-shops th:nth-child(3), .dir-shops td:nth-child(3) { width: var(--col-status); }
.dir-shops th:nth-child(4), .dir-shops td:nth-child(4) { width: var(--col-menu); }

.dir-types {
  --col-name: 320px;
  --col-status: 140px;
  --col-menu: 90px;
  table-layout: fixed;
  width: 100%;
  min-width: calc(var(--col-name) + var(--col-status) + var(--col-menu));
}
.dir-types th:nth-child(1), .dir-types td:nth-child(1) { width: var(--col-name); }
.dir-types th:nth-child(2), .dir-types td:nth-child(2) { width: var(--col-status); }
.dir-types th:nth-child(3), .dir-types td:nth-child(3) { width: var(--col-menu); }

.dir-farmers td:nth-child(4) {
  white-space: normal;
}
.dir-farmers .access-codes {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  width: 100%;
  min-width: 0;
}
.dir-farmers .access-codes .badge {
  flex-shrink: 0;
}
.dir-buyers .access-codes {
  flex-wrap: nowrap;
}

.dir-buyers tr.buyer-assist-row td {
  background: #f7f8fa;
}
.dir-buyers tr.buyer-assist-row td:first-child,
.dir-buyers tr.buyer-team-row td:first-child {
  padding-left: 22px;
}
.dir-buyers tr.buyer-team-row td {
  background: #f7f8fa;
}
.dir-buyers .assist-mark {
  display: inline-block;
  margin-right: 8px;
  color: #aaa;
  font-size: 12px;
}
.buyer-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.buyer-name-cell span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.buyer-seat-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.role-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.role-teamlead { background: #eee6ff; color: #5b2bbd; }
.role-mediabuyer { background: #dbe7ff; color: #1e4e9c; }
.role-helper { background: #e8eef2; color: #4b6272; }
.role-tester { background: #fff1d6; color: #9a6700; }
.level-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #1a1a1a;
}
.level-helper { background: #e4e4e4; }
.level-tester {background: #ffe5667a;}
.level-test_period {background: #f3e9b88f;}
.level-junior {background: #cfe8d47a;}
.level-middle {background: #cfdcf07a;}
.level-senior { background: #ddd4ea; }
.level-partner {background: #e4cfd47a;}
.level-teamlead {background: #c5e4d87a;}

.row-menu-item { white-space: nowrap; }

.modal-form { text-align: left; }
.field { align-items: flex-start; }

.modal-window, .modal-window input, .modal-window .select-btn, .modal-window .select-item {
  font-family: var(--font-inter), sans-serif;
}

.mfp-card {
  --mfp-master-name: 2.1fr;
  --mfp-master-date: 1fr;
  --mfp-master-farmer: 0.6fr;
  --mfp-master-status: 0.9fr;
  --mfp-master-total: 0.7fr;
  --mfp-master-ready: 1fr;
  --mfp-master-menu: 72px;
  --mfp-master-min: 1100px;
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: var(--radius);
  overflow-x: auto;
}
.mfp-head,
.mfp-row {
  min-width: var(--mfp-master-min);
  width: max(100%, var(--mfp-master-min));
}
.mfp-head,
.mfp-main {
  display: grid;
  grid-template-columns: var(--mfp-master-name) var(--mfp-master-date) var(--mfp-master-farmer) var(--mfp-master-status) var(--mfp-master-total) var(--mfp-master-ready) var(--mfp-master-menu);
  align-items: center;
  gap: 0;
  font-size: 13px;
}
.mfp-head {
  padding: 0;
  color: #000;
  background: #fafafb;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-inter), sans-serif;
  border-bottom: 1px solid #eeeeee;
}
.mfp-head > span,
.mfp-main > * {
  padding: 12px 16px;
  border-right: 1px solid #eeeeee;
  min-width: 0;
  color: #000;
}
.mfp-head > span:last-child,
.mfp-main > :last-child {
  border-right: none;
}
.mfp-head span:nth-child(7),
.mfp-main > .mk-menu-cell {
  text-align: center;
}
.mfp-row {
  border-bottom: 1px solid #eeeeee;
}
.mfp-row:last-child { border-bottom: none; }
.mfp-row.open {
  background: #fafbff;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.mfp-row.open:last-child {
  margin-bottom: 0;
}
.mfp-main {
  width: 100%;
  cursor: pointer;
  padding: 0;
  text-align: left;
  color: inherit;
}
.mfp-main:hover { background: #f7f8fa; }
.mfp-row.open .mfp-main:hover { background: transparent; }
.mfp-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mfp-name-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.mfp-name-icon {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.45;
  line-height: 0;
}
.mfp-name-icon img {
  width: 13px;
  height: 13px;
  display: block;
}
.mfp-name-icon:hover {
  opacity: 0.9;
}
.mfp-name-icon.is-locked {
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
}
.mfp-inner {
  padding: 4px 16px 16px;
  background: #fafbff;
}
.mfp-inner-wrap {
  width: 100%;
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: var(--radius);
  overflow: hidden;
}
.mfp-inner-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  font-size: 13px;
}
.mfp-inner .mfp-inner-table {
  --mfp-col-name: 280px;
  --mfp-col-date: 110px;
  --mfp-col-decor: 120px;
  --mfp-col-stop: 110px;
  --mfp-col-status: 100px;
  --mfp-col-issued: 200px;
  --mfp-col-menu: 72px;
}
.mfp-inner .mfp-col-name { width: var(--mfp-col-name); }
.mfp-inner .mfp-col-date { width: var(--mfp-col-date); }
.mfp-inner .mfp-col-decor { width: var(--mfp-col-decor); }
.mfp-inner .mfp-col-stop { width: var(--mfp-col-stop); }
.mfp-inner .mfp-col-status { width: var(--mfp-col-status); }
.mfp-inner .mfp-col-issued { width: var(--mfp-col-issued); }
.mfp-inner .mfp-col-menu { width: var(--mfp-col-menu); }
.mfp-inner .mfp-inner-table th:first-child,
.mfp-inner .mfp-inner-table td:first-child { width: var(--mfp-col-name); }
.mfp-inner .mfp-inner-table th:nth-child(2),
.mfp-inner .mfp-inner-table td:nth-child(2) { width: var(--mfp-col-date); }
.mfp-inner .mfp-inner-table th:nth-child(3),
.mfp-inner .mfp-inner-table td:nth-child(3) { width: var(--mfp-col-decor); }
.mfp-inner .mfp-inner-table th:nth-child(4),
.mfp-inner .mfp-inner-table td:nth-child(4) { width: var(--mfp-col-stop); }
.mfp-inner .mfp-inner-table th:nth-child(5),
.mfp-inner .mfp-inner-table td:nth-child(5) { width: var(--mfp-col-status); }
.mfp-inner .mfp-inner-table th:nth-child(6),
.mfp-inner .mfp-inner-table td:nth-child(6) { width: var(--mfp-col-issued); }
.mfp-inner .mfp-inner-table th:last-child,
.mfp-inner .mfp-inner-table td:last-child { width: var(--mfp-col-menu); }
.mfp-inner-table thead,
.mfp-inner-table thead th {
  font-family: var(--font-inter), sans-serif;
}
.mfp-inner-table th {
  text-align: left;
  padding: 9px 16px;
  color: #000;
  background: #f5f5f5;
  font-size: 12px;
  font-weight: 500;
  border-bottom: 1px solid #eeeeee;
  border-right: 1px solid #eeeeee;
}
.mfp-inner-table td {
  padding: 7px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #eeeeee;
  border-right: 1px solid #eeeeee;
  color: #000;
  border-top: 0px;
}
.mfp-inner-table th:last-child,
.mfp-inner-table td:last-child {
  border-right: none;
  text-align: center;
}
.mfp-inner-table tbody tr:last-child td { border-bottom: none; }
.mfp-inner-table tbody tr:hover td { background: #f7f8fa; }
.mfp-inner-table tbody tr.mfp-fp-ready td { background: #f9fffa; }
.mfp-inner-table tbody tr.mfp-fp-issued td { background: #fcf9ff; }
.mfp-inner-table tbody tr.mfp-fp-ready:hover td { background: #f0faf3; }
.mfp-inner-table tbody tr.mfp-fp-issued:hover td { background: #f6f0fc; }
.ba-accounts .mfp-inner-table tbody tr:hover td,
.ba-accounts .mfp-inner-table tbody tr.mfp-fp-ready:hover td,
.ba-accounts .mfp-inner-table tbody tr.mfp-fp-issued:hover td {
  background: transparent;
}
.mfp-fp-link {
  color: #3c6bab;
  font-size: 13px;
}
.mfp-fp-menu {
  width: max-content;
  transform: translateX(-100%);
}
.mfp-flag-row { display: inline-flex; align-items: center; gap: 8px; }
.mfp-flag { display: inline-flex; }
.mfp-flag-toggles { display: flex; flex-wrap: wrap; gap: 12px; }
.mfp-flag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.mfp-flag-btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
}

@keyframes update-slide-in {
  from { transform: translateX(calc(100% + 40px)); }
  to { transform: translateX(0); }
}
.update-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 400;
  width: 280px;
  overflow: visible;
  pointer-events: none;
  animation: update-slide-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.update-banner-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: visible;
  pointer-events: auto;
  filter: drop-shadow(0 22px 40px rgba(28, 46, 90, 0.22));
}
.update-banner-art {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.update-banner-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin-top: -36px;
  padding: 15px 22px 24px;
  background: #fff;
  border-radius: 0 0 8px 8px;
  text-align: center;
  position: relative;
  z-index: 2;
}
.update-banner-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 600;
  color: #1a1d2c;
}
.update-banner-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  color: #9aa0a6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.update-banner button {
  color: #ffffff;
  cursor: pointer;
  background: #424b75;
  border: none;
  border-radius: 6px;
  width: 100%;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 500;
}
.update-banner button:hover {
  background: #5865a1;
}

.ba-tabs {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 16px;
  overflow-x: auto;
  border-bottom: 1px solid #dddddd;
}
.ba-tab {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 15px 10px;
  font-size: 14px;
  font-weight: 500;
  color: #9aa0a6;
  background: none;
  border: none;
  border-radius: 0;
  white-space: nowrap;
  margin-bottom: 0px;
}
.ba-tab:hover {
  color: #6b6b6b;
  background: none;
}
.ba-tab.active {
  color: #1a1a1a;
  font-weight: 600;
  background: none;
}
.ba-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--brand);
}
.ba-row { cursor: pointer; }
.ba-row:hover td { background: #f7f8fa; }
.ba-row.open td { background: #fafbff; }
.ba-table { table-layout: fixed; width: 100%; }
.ba-table th,
.ba-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.ba-table th:nth-child(1), .ba-table td:nth-child(1) { width: 16%; }
.ba-table th:nth-child(2), .ba-table td:nth-child(2) { width: 12%; }
.ba-table th:nth-child(3), .ba-table td:nth-child(3) { width: 10%; }
.ba-table th:nth-child(4), .ba-table td:nth-child(4) { width: 10%; }
.ba-table th:nth-child(5), .ba-table td:nth-child(5) { width: 14%; }
.ba-table th:nth-child(6), .ba-table td:nth-child(6) { width: 8%; }
.ba-table th:nth-child(7), .ba-table td:nth-child(7) { width: 10%; }
.ba-table th:nth-child(8), .ba-table td:nth-child(8) { width: 8%; }
.ba-table th:nth-child(9), .ba-table td:nth-child(9) { width: 72px; text-align: center; }
.ba-clip {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ba-dim {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.28);
  z-index: 40;
  animation: ba-dim-in 0.2s ease;
}
.ba-dim.closing {
  animation: ba-dim-out 0.28s ease forwards;
}
@keyframes ba-dim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ba-dim-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
.ba-drawer {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: 620px;
  max-width: calc(100% - 32px);
  background: #fff;
  z-index: 41;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(20, 30, 50, 0.16);
  animation: ba-slide-in 0.28s ease;
}
.ba-drawer.closing {
  animation: ba-slide-out 0.28s ease forwards;
}
@keyframes ba-slide-in {
  from { transform: translateX(110%); }
  to { transform: translateX(0); }
}
@keyframes ba-slide-out {
  from { transform: translateX(0); }
  to { transform: translateX(110%); }
}
.ba-drawer-info {
  background: #f6f7f8;
  padding: 20px 22px 18px;
  flex-shrink: 0;
}
.ba-drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e4e4e4;
    padding-bottom: 15px;
}
.ba-drawer-heading {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ba-drawer-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ba-drawer-heading .status {
  flex-shrink: 0;
}
.ba-drawer-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  color: #888;
}
.ba-drawer-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.ba-drawer-close {
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
}
.ba-drawer-close:hover { background: #f0f0f0; }
.ba-drawer-close-icon {
  width: 14px;
  height: 14px;
  display: block;
}
.ba-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}
.ba-meta-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ba-meta-key {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9aa0a6;
  margin-bottom: 7px;
}
.ba-meta-val {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ba-drawer-scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ba-drawer-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
}
.ba-drawer-fade {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 72%);
}
.ba-drawer-split {
  border: none;
  border-top: 1px solid #eeeeee;
  margin: 2px 0;
  width: 100%;
}
.ba-empty {
  margin: 0;
  font-size: 14px;
  color: #888;
}
.ba-card .mfp-inner-table {
  margin-top: 4px;
  width: 100%;
}
.ba-card .mfp-inner-table th,
.ba-card .mfp-inner-table td {
  box-sizing: border-box;
}
.ba-card .mfp-inner-table th {
  /* height: 44px; */
}
.ba-card .mfp-inner-table td {
  height: 40px;
}
.ba-card .ba-bm-table th:first-child,
.ba-card .ba-bm-table td:first-child {
  width: auto;
}
.ba-accounts {
  --ba-fp-name: 220px;
  --ba-fp-st: 110px;
  --ba-fp-menu: 44px;
}
.ba-accounts .ba-bm-table {
  --ba-bm-col-cab: auto;
  --ba-bm-col-st: 190px;
  --ba-bm-col-geo: 60px;
  --ba-bm-col-tz: 75px;
  --ba-bm-col-cards: 170px;
  --ba-bm-col-menu: 44px;
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}
.ba-accounts .ba-bm-table th,
.ba-accounts .ba-bm-table td {
  overflow: hidden;
}
.ba-accounts .ba-bm-col-cab { width: var(--ba-bm-col-cab); }
.ba-accounts .ba-bm-col-st { width: var(--ba-bm-col-st); }
.ba-accounts .ba-bm-col-geo { width: var(--ba-bm-col-geo); }
.ba-accounts .ba-bm-col-tz { width: var(--ba-bm-col-tz); }
.ba-accounts .ba-bm-col-cards { width: var(--ba-bm-col-cards); }
.ba-accounts .ba-bm-col-menu { width: var(--ba-bm-col-menu); }
.ba-accounts .ba-bm-table th:first-child,
.ba-accounts .ba-bm-table td:first-child {
  width: var(--ba-bm-col-cab);
}
.ba-accounts .ba-bm-table th:nth-child(2),
.ba-accounts .ba-bm-table td:nth-child(2) {
  width: var(--ba-bm-col-st);
}
.ba-accounts .ba-bm-table th:nth-child(3),
.ba-accounts .ba-bm-table td:nth-child(3) {
  width: var(--ba-bm-col-geo);
  text-align: center;
}
.ba-accounts .ba-bm-table td:nth-child(3) .geo-flag {
  display: inline-block;
  vertical-align: middle;
}
.ba-accounts .ba-bm-table th:nth-child(4),
.ba-accounts .ba-bm-table td:nth-child(4) {
  width: var(--ba-bm-col-tz);
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.ba-accounts .ba-bm-table th:nth-child(5),
.ba-accounts .ba-bm-table td:nth-child(5) {
  width: var(--ba-bm-col-cards);
}
.ba-accounts .ba-card .ba-bm-table th:last-child,
.ba-accounts .ba-card .ba-bm-table td:last-child {
  width: var(--ba-bm-col-menu);
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}
.ba-card .ba-fp-table th:first-child,
.ba-card .ba-fp-table td:first-child {
  width: var(--ba-fp-name, 220px);
}
.ba-accounts .ba-fp-table {
  table-layout: fixed;
  width: max(100%, calc(var(--ba-fp-name) + var(--ba-fp-st) + var(--ba-fp-menu)));
  min-width: calc(var(--ba-fp-name) + var(--ba-fp-st) + var(--ba-fp-menu));
}
.ba-accounts .ba-fp-table th,
.ba-accounts .ba-fp-table td {
  overflow: hidden;
}
.ba-accounts .ba-fp-table th:nth-child(2),
.ba-accounts .ba-fp-table td:nth-child(2) {
  width: var(--ba-fp-st);
}
.ba-accounts .ba-fp-table th:last-child,
.ba-accounts .ba-fp-table td:last-child {
  width: var(--ba-fp-menu);
}
.ba-card .mfp-inner-table th:last-child,
.ba-card .mfp-inner-table td:last-child {
  width: auto;
  text-align: left;
}
.ba-fp-table {
  table-layout: fixed;
}
.ba-card .ba-fp-table th:last-child,
.ba-card .ba-fp-table td:last-child,
.ba-card .ba-bm-table th:last-child,
.ba-card .ba-bm-table td:last-child {
  width: 44px;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}
.ba-st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.ba-st::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: currentColor;
}
.ba-st-new {
  background: #f1f1f1;
    color: #858585;
}
.ba-st-active {
  color: #2f4085;
  background: #eff3f8;
}
.ba-st-block,
.ba-st-ban {
  background: #f9e8ea;
  color: #9b2c3c;
}
.ba-st-warmup {
  background: #f8eadc;
    color: #b64c18;
}
.ba-st-launch,
.ba-st-ready {
  background: #e6f5ec;
  color: #2f855a;
}
.ba-st-bill,
.ba-st-error {
  color: #b46831;
    background: #fae2d1;
}
.ba-st-pause {
  background: #fff5c7;
    color: #a3822b;
}
.ba-st-pick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  max-width: 100%;
}
.ba-st-pick:disabled {
  opacity: 0.65;
  cursor: default;
}
.ba-st-pick-list {
  z-index: 80;
}
.ba-accounts .ba-bm-table td.ba-st-cell {
  overflow: visible;
}
.ba-st-frozen {
  background: #eee8d0;
  color: #8a7a3c;
}
.ba-st-locked {
  background: #eeeeee;
  color: #888;
}
.ba-fp-table .mfp-fp-link,
.ba-fp-table .mk-acc-cell > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ba-card {
  border: 1px solid #eeeeee;
  border-radius: var(--radius);
  padding: 14px 16px 12px;
}
.ba-card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.ba-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.ba-card-head .ba-card-title {
  margin: 0;
}
.ba-card-menu {
  flex-shrink: 0;
  margin: -4px -8px -4px 0;
}
.ba-card-title-menu {
  flex-shrink: 0;
  margin: 0;
}
.ba-show-archive {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  color: #a1a1a1;
  white-space: nowrap;
}
.ba-card-id-split {
  width: 1px;
  height: 12px;
  background: #dddddd;
  flex-shrink: 0;
}
.ba-card-id-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: #adadad;
  flex-shrink: 0;
}
.ba-card-id-inline .copy-btn,
.acc-bm-id .copy-btn {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.ba-card:hover .ba-card-id-inline .copy-btn,
.acc-asset-row:hover .acc-bm-id .copy-btn {
  opacity: 0.25;
  pointer-events: auto;
}
.ba-card:hover .ba-card-id-inline .copy-btn:hover,
.acc-asset-row:hover .acc-bm-id .copy-btn:hover {
  opacity: 0.4;
}
.ba-fp-heading {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #000;
  min-width: 0;
  flex: 1;
}
.ba-card-head .ba-fp-heading {
  margin: 0;
}
.ba-fp-archived .mfp-fp-link,
.ba-fp-archived .mk-acc-cell > span {
  color: #999999;
}
.ba-card-bm-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
  opacity: 0.25;
}
.ba-card-bm-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #000;
  font-weight: 500;
}
.ba-card .muted { margin: 0; }

.copy-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.25;
}
.copy-btn img {
  width: 13px;
  height: 13px;
  display: block;
}
.copy-btn:hover {
  opacity: 0.4;
}
.copy-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: #e1f6e9;
  color: #144f31;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid #cfecda;
  pointer-events: none;
}
.copy-toast-wait {
  color: #2c3d50;
  background: #e7edf2;
  border: 1px solid #dae4ec;
  font-weight: 400;
  box-shadow: 0 6px 8px #00000012;
  border: 1px solid #dbe4ec !important;
}
.copy-toast-err {
  background: #fdecec;
  color: #551c16;
  border: 1px solid #f5e1e1 !important;
}

.cards-table {
  --col-name: 200px;
  --col-status: 130px;
  --col-last4: 110px;
  --col-bin: 120px;
  --col-remain: 140px;
  --col-cab: 180px;
  table-layout: fixed;
  width: 100%;
  min-width: calc(var(--col-name) + var(--col-status) + var(--col-last4) + var(--col-bin) + var(--col-remain) + var(--col-cab));
}
.cards-table th:nth-child(1), .cards-table td:nth-child(1) { width: var(--col-name); }
.cards-table th:nth-child(2), .cards-table td:nth-child(2) { width: var(--col-status); }
.cards-table th:nth-child(3), .cards-table td:nth-child(3) { width: var(--col-last4); }
.cards-table th:nth-child(4), .cards-table td:nth-child(4) { width: var(--col-bin); }
.cards-table th:nth-child(5), .cards-table td:nth-child(5) { width: var(--col-remain); }
.cards-table th:nth-child(6), .cards-table td:nth-child(6) { width: var(--col-cab); }
.card-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}
.card-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-combo-link {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background: #324f96;
  -webkit-mask: url(/icons/external-link.svg) center / contain no-repeat;
  mask: url(/icons/external-link.svg) center / contain no-repeat;
}
.card-last4-cell {
  vertical-align: middle;
}
.card-last4 {
  display: inline-block;
  background: #f4f5f7;
  padding: 3px 8px;
  border-radius: 5px;
}
.card-last4.ba-st {
  gap: 0;
  padding: 3px 8px;
}
.card-last4.ba-st::before {
  content: none;
  display: none;
}
.card-bin {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
}
.card-remain-low {
  color: #e39457;
}
.ba-card-chip {
  position: relative;
  padding-right: 10px;
}
.ba-card-chip-del {
  display: none;
  position: absolute;
  top: -5px;
  right: -5px;
  width: 14px;
  height: 14px;
  padding: 0;
  border: none;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  line-height: 0;
  box-shadow: 0 0 0 1px #eeeeee;
}
.ba-card-chip:hover .ba-card-chip-del,
.ba-card-chip-del:focus-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ba-card-chip-del img {
  width: 10px;
  height: 10px;
  display: block;
}

.ba-accounts .ba-bm-table td {
  height: auto;
  min-height: 44px;
  vertical-align: middle;
}
.ba-cab-name {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}
.ba-cab-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.ba-cab-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #999;
}
.ba-cab-chevron img {
  width: 10px;
  height: 10px;
  display: block;
  transition: transform 0.2s ease, opacity 0.12s ease;
  opacity: 0.3;
}
.ba-cab-chevron.open img {
  transform: rotate(90deg);
}
.ba-accounts .ba-bm-table tbody tr:hover .ba-cab-chevron img {
  opacity: 0.5;
}
.ba-accounts .ba-bm-table td.ba-cab-name {
  overflow: visible;
}
.mfp-inner-table tbody tr.ba-trk-row:hover td,
.mfp-inner-table tbody tr.ba-trk-row td {
  background: #fff;
}
.ba-trk-row > td {
  overflow: visible !important;
  padding: 0 !important;
  height: auto !important;
  width: auto !important;
  text-align: left !important;
  background: #fff !important;
  border-bottom: none;
  border-radius: 0;
}
.ba-accounts .ba-bm-table tbody tr.ba-trk-row:not(:last-child) > td {
  padding-bottom: 10px !important;
}
.ba-accounts .ba-bm-table tbody tr.ba-trk-row + tr > td {
  border-top: 1px solid #eeeeee;
  /* box-shadow: inset 0 1px 0 #eeeeee; */
}
.ba-trk-wrap {
  position: relative;
  padding: 8px 16px 8px;
  background: #f4f6ff;
  border-radius: 0 0 6px 6px;
}
.ba-trk-wrap.has-list {
  padding: 8px 16px 16px;
}
.ba-trk-wrap.has-list:not(.is-open) {
  padding: 8px 16px 8px;
}
.ba-trk-wrap.has-list .ba-trk-head,
.ba-trk-wrap.has-list .ba-trk-list {
  /* 16 chevron + 8 gap + 6 dot + 8 gap — left edge of cabinet name */
  margin-left: 38px;
}
.ba-trk-wrap.has-list::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 0;
  width: 22px;
  height: 20px;
  box-sizing: border-box;
  border-left: 1px dashed #c5cad8;
  border-bottom: 1px dashed #c5cad8;
  border-bottom-left-radius: 8px;
  pointer-events: none;
}
.ba-trk-wrap.has-list.is-open::after {
  content: '';
  position: absolute;
  left: 23px;
  top: 20px;
  height: 20px;
  border-left: 1.5px dashed #c5cad8;
  pointer-events: none;
}
.ba-trk-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.ba-trk-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ba-trk-chevron img {
  width: 10px;
  height: 10px;
  display: block;
  transition: transform 0.2s ease, opacity 0.12s ease;
  opacity: 0.3;
}
.ba-trk-toggle.open .ba-trk-chevron img {
  transform: rotate(90deg);
}
.ba-trk-toggle:hover .ba-trk-chevron img {
  opacity: 0.5;
}
.ba-trk {
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.ba-trk-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}
.ba-trk-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #424b75;
}
.ba-trk-count {
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 99px;
  background: #e4e8f2;
  color: #424b75;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ba-trk-bind {
  margin-left: auto;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #424b75;
  white-space: nowrap;
}
.ba-trk-bind:hover {
  color: #3566d6;
}
.ba-trk-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.ba-trk-list.merged {
  gap: 0;
  background: #fff;
  border-radius: 10px;
  overflow: visible;
}
.ba-trk-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 10px;
  min-width: 0;
}
.ba-trk-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: calc(-50% - 6px);
  width: 22px;
  height: calc(100% + 6px);
  box-sizing: border-box;
  border-left: 1px dashed #c5cad8;
  border-bottom: 1px dashed #c5cad8;
  border-bottom-left-radius: 8px;
  pointer-events: none;
}
.ba-trk-item:first-child::before {
  top: 0;
  height: 50%;
}
.ba-trk-list.merged .ba-trk-item:not(:first-child)::before {
  top: -50%;
  height: 100%;
}
.ba-trk-list.merged .ba-trk-item {
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid #e8ebf4;
}
.ba-trk-list.merged .ba-trk-item:last-child {
  border-bottom: none;
}
.ba-trk-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #424b75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ba-trk-flag-gap {
  width: 18px;
  flex-shrink: 0;
}
.ba-trk-item .dots-menu-btn {
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.ba-trk-item:hover .dots-menu-btn,
.ba-trk-item .dots-menu-btn.open {
  opacity: 1;
  pointer-events: auto;
}
.ba-cab-name-text {
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.ba-cab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.6;
  box-shadow: 0 0 5px 1px color-mix(in srgb, currentColor 45%, transparent);
}
.ba-cab-dot-new { background: #858585; color: #858585; }
.ba-cab-dot-active {background: #2f4085;color: #2f4085;}
.ba-cab-dot-warmup { background: #b64c18; color: #b64c18; }
.ba-cab-dot-ready { background: #2f855a; color: #2f855a; }
.ba-cab-dot-pause { background: #a3822b; color: #a3822b; }
.ba-cab-dot-ban { background: #9b2c3c; color: #9b2c3c; }
.ba-cab-dot-error { background: #b46831; color: #b46831; }
.ba-cab-archived .ba-cab-name-text,
.ba-cab-archived .ba-cab-time {
  color: #999999;
}
.ba-cab-name-copy {
  width: 15px;
  height: 15px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.ba-cab-name-copy img {
  width: 13px;
  height: 13px;
  display: block;
}
.ba-accounts .ba-bm-table tbody tr:hover .ba-cab-name-copy,
.acc-main:hover .ba-cab-name-copy {
  opacity: 0.2;
  pointer-events: auto;
}
.ba-accounts .ba-bm-table tbody tr:hover .ba-cab-name-copy:hover,
.acc-main:hover .ba-cab-name-copy:hover {
  opacity: 0.5;
}
.ba-notes-btn {
  width: 15px;
  height: 15px;
  margin-left: auto;
  padding: 0;
  border: none;
  background: #324f96;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  -webkit-mask: url(/icons/notes.svg) center / contain no-repeat;
  mask: url(/icons/notes.svg) center / contain no-repeat;
}
.ba-notes-btn img {
  width: 100%;
  height: 100%;
  opacity: 0;
}
.ba-accounts .ba-bm-table tbody tr:hover .ba-notes-btn:not(.has-notes) {
  opacity: 0.4;
  pointer-events: auto;
}
.ba-accounts .ba-bm-table tbody tr:hover .ba-notes-btn:not(.has-notes):hover {
  opacity: 0.7;
}
.ba-notes-btn.has-notes {
  width: 15px;
  height: 15px;
  opacity: 0.9;
  pointer-events: auto;
}
.modal-window:has(.ba-notes) {
  width: 420px;
  max-width: 420px;
  height: 520px;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  resize: none;
}
.modal-window:has(.ba-notes) .modal-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.ba-notes {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ba-notes-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 16px;
}
.ba-notes-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #b0b0b0;
  font-size: 13px;
  text-align: center;
}
.ba-notes-empty img {
  width: 28px;
  height: 28px;
  opacity: 0.28;
}
.ba-note {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 -6px;
  padding: 8px 48px 8px 8px;
  border-radius: 8px;
  transition: background 0.12s ease;
}
.ba-note:hover {
  background: #f8f8f8;
}
.ba-note + .ba-note {
  margin-top: 8px;
}
.ba-note.cont {
  margin-top: 2px;
}
.ba-note-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.ba-note-avatar-slot {
  width: 28px;
  flex-shrink: 0;
}
.ba-note-content {
  min-width: 0;
  flex: 1;
}
.ba-note.cont .ba-note-content {
  display: inline-flex;
  max-width: 100%;
  align-items: flex-end;
  gap: 0;
}
.ba-note-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #888;
  margin-bottom: 3px;
}
.ba-note-body {
  font-size: 13px;
  line-height: 1.45;
  color: #1a1a1a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ba-note.cont .ba-note-body {
  flex: 0 1 auto;
  min-width: 0;
}
.ba-note-body.deleted {
  color: #b0b0b0;
  font-style: italic;
  font-size: 12px;
}
.ba-note-stamp {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
}
.ba-note-stamp.follow {
  align-self: flex-end;
  margin-left: 6px;
}
.ba-note-time {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 400;
  color: #b0b0b0;
  cursor: default;
}
.ba-note-time.follow {
  padding: 0 1px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #c5c5c5;
  line-height: 1.45;
  position: relative;
  bottom: 1.3px;
}
.ba-note-edited {
  font-size: 11px;
  font-weight: 400;
  font-style: italic;
  color: #b0b0b0;
}
.ba-note-stamp.follow .ba-note-edited {
  font-size: 10px;
  color: #c5c5c5;
  position: relative;
  bottom: 1px;
}
.ba-note-time-tip {
  position: fixed;
  right: auto;
  bottom: auto;
  z-index: 400;
  padding: 5px 8px;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 8px));
}
.ba-note-time-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -4px;
  border: 4px solid transparent;
  border-top-color: #1a1a1a;
}
.ba-note-actions {
  position: absolute;
  top: 5px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.ba-note:hover .ba-note-actions,
.ba-note:focus-within .ba-note-actions {
  opacity: 1;
  pointer-events: auto;
}
.ba-note-action {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  transition: opacity 0.16s ease;
}
.ba-note-action:hover:not(:disabled) {
  background: none;
  opacity: 0.7;
}
.ba-note-action:disabled {
  opacity: 0.3;
  cursor: default;
}
.ba-note-action img {
  width: 14px;
  height: 14px;
  display: block;
}
.ba-notes-confirm {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
}
.ba-notes-confirm p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.4;
}
.ba-notes-confirm-actions {
  display: flex;
  gap: 8px;
}
.ba-notes-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid #eeeeee;
}
.ba-notes-input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  max-height: 72px;
  resize: none;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  outline: none;
  overflow-y: auto;
}
.ba-notes-input:focus {
  border-color: #d8d8d8;
}
.ba-notes-send {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: #324f96;
  color: #324f96;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ba-notes-send img {
  width: 16px;
  height: 16px;
  display: block;
  filter: brightness(0) invert(1);
}
.ba-notes-send:hover:not(:disabled) {
  background: #4b6cc0;
}
.ba-notes-send:disabled {
  opacity: 0.45;
  cursor: default;
}
.ba-cabinet-agent {
  display: inline-block;
  background: #eee8f8;
  color: #5b4a7a;
  padding: 3px 8px;
  border-radius: 5px;
  font-family: var(--font-jetbrains), monospace;
  font-size: 13px;
}
.ba-cabinet-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-height: 22px;
  min-width: 0;
  width: 100%;
}
.ba-cabinet-cards .ba-card-chip {
  flex: 0 0 auto;
}
.ba-accounts .ba-bm-table td:nth-child(5) {
  overflow: hidden;
  white-space: normal;
}
.attach-card-empty {
  text-align: center;
  margin: 0;
}
.attach-card-search,
.attach-trk-search {
  width: 100%;
  flex-shrink: 1;
}
.attach-card-search .header-search,
.attach-trk-search .header-search {
  width: 100%;
}
.attach-trk-search .header-search {
  border-radius: 5px;
}
.attach-trk-form {
  text-align: left;
}
.attach-trk-form:has(.attach-card-empty) {
  gap: 0;
}
.attach-trk-form .attach-card-empty {
  text-align: center;
  margin: 0;
  padding: 15px 0;
}
.attach-trk-list .mk-filter-item {
  justify-content: flex-start;
  text-align: left;
  min-width: 0;
}
.attach-trk-list .mk-filter-item span {
  text-align: left;
}
.attach-trk-list .attach-trk-name {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attach-card-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 360px;
  overflow: auto;
  color: #000;
}
.attach-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.attach-card-row:hover { background: #f7f8fa; }
.attach-card-name,
.attach-card-row .card-last4 {
  font-family: var(--font-jetbrains), monospace;
  font-size: 13px;
}
.attach-card-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attach-card-row .card-last4 {
  flex-shrink: 0;
}

.access-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.access-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.access-check {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}
.access-check.on {
  border-color: #cfd6ea;
  background: #f4f6fb;
}
.access-check input {
  margin: 0;
}

/* FB Finance */
.fin-status {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #8a8a8a;
}
.fin-status-error { color: #c0392b; }
.fin-dates {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8a8a8a;
}
.fin-dates .input { height: 40px; width: 150px; }
.fin-stats { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.fin-stats .wk-stat-value { font-size: 22px; white-space: nowrap; }
.fin-stat-sub {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: #a0a0a0;
}
.fin-collapse-all {
  margin: 0 0 6px auto;
  padding: 4px 10px;
  border: 1px solid #eeeeee;
  border-radius: 5px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  color: #6b6b6b;
  cursor: pointer;
}
.fin-collapse-all:hover { background: #f7f8fa; }
table.data.fin-table th.num,
table.data.fin-table td.num { text-align: right; }
.fin-sort { cursor: pointer; user-select: none; }
.fin-sort-arrow { margin-left: 6px; font-size: 10px; color: transparent; }
.fin-sort:hover .fin-sort-arrow { color: #b0b0b0; }
.fin-sort.on .fin-sort-arrow { color: var(--brand); }
.fin-click { cursor: pointer; }
.fin-click:hover td { background: #f7f8fa; }
table.data.fin-table tbody tr.fin-group td {
  background: #fafbff;
  font-weight: 500;
  cursor: pointer;
}
table.data.fin-table tbody tr.fin-group:hover td { background: #f3f5fc; }
.fin-caret {
  width: 10px;
  height: 10px;
  margin-right: 10px;
  opacity: 0.5;
  transition: transform 0.15s ease;
}
.fin-caret.open { transform: rotate(90deg); }
table.data.fin-table tbody tr.fin-total td {
  background: #fafafb;
  font-weight: 600;
  border-top: 1px solid #eeeeee;
}
.fin-name { display: flex; align-items: center; gap: 8px; }
.fin-hidden { font-size: 11px; }
.fin-muted { color: #8a8a8a; font-size: 12px; }
.fin-neg { color: #c0392b; }
.fin-buyer-select {
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.fin-buyer-select:hover { border-color: #eeeeee; background: #fff; }
.fin-last-sync {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 8px;
  line-height: 1.3;
}
.fin-last-sync-label { font-size: 11px; color: #8a8a8a; }
.fin-last-sync-value { font-size: 13px; font-family: var(--font-jetbrains), monospace; }

.px-card {
  --px-col-geo: 140px;
  --px-col-name: 370px;
  --px-col-vertical: 170px;
  --px-col-status: 120px;
  --px-col-id: 200px;
  --px-col-token: 260px;
  --px-col-menu: 72px;
}
.px-card .mk-card-table {
  min-width: calc(var(--px-col-geo) + var(--px-col-name) + var(--px-col-vertical) + var(--px-col-status) + var(--px-col-id) + var(--px-col-token) + var(--px-col-menu));
}
.px-card .mk-card-table .px-col-geo { width: var(--px-col-geo); }
.px-card .mk-card-table .px-col-geo-nested { text-align: right; }
.px-card .mk-card-table .px-col-name { width: var(--px-col-name); }
.px-card .mk-card-table .px-col-vertical { width: var(--px-col-vertical); }
.px-card .mk-card-table .px-col-status { width: var(--px-col-status); }
.px-card .mk-card-table .px-col-id { width: var(--px-col-id); }
.px-card .mk-card-table .px-col-token { width: var(--px-col-token); }
.px-card .mk-card-table .px-col-menu { width: var(--px-col-menu); text-align: center; }
.px-card .mk-card-table tr.px-geo-gap td {
  height: 16px;
  padding: 0;
  border-right: none;
  background: #f7f7f7;
}
.px-naming {
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
}
.px-geo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.px-geo .geo-flag {
  width: 22px;
  height: 16px;
}
.px-geo-mark {
  display: inline-block;
  color: #aaa;
  font-size: 12px;
}
.px-vertical {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
}
.px-copy-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.px-copy-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-jetbrains), ui-monospace, monospace;
  font-size: 13px;
}
.px-empty {
  text-align: center;
  color: #8a8a8a;
  padding: 28px 16px !important;
}
.mk-filter-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: #8a8a8a;
}

/* Адаптив. Базовые стили — app/style.css
 *
 *  …520   телефон, узкий
 *  …640   телефон
 *  768+   планшет и шире (сайдбар всегда на экране)
 *  …760   узкий планшет
 *  …800   логин в одну колонку
 *  …900   аккаунты в столбик
 *  …960   статистика Worker King
 *  …1100  карточка кабинета
 */

/* ——— до 520px ——— */
@media (max-width: 520px) {
  .wk-stats { grid-template-columns: 1fr; }
}

/* ——— до 640px ——— */
@media (max-width: 640px) {
  .ba-meta { grid-template-columns: 1fr; }
}

/* ——— от 768px: десктоп-сайдбар ——— */
@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
    overflow: visible;
    z-index: 30;
    transition: width 0.2s ease;
  }
  .burger, .overlay { display: none; }
  .collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    width: 17px;
    height: 17px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
    transform: none;
    line-height: 0;
  }
  .collapse-btn:hover {
    background: #f7f7f7;
  }
  .collapse-btn:hover .collapse-icon {
    opacity: 0.85;
  }
  .app.collapsed .collapse-icon {
    transform: none;
  }

  .app.collapsed .sidebar {
    width: 64px;
    padding: 16px 8px;
    overflow: visible;
  }
  .app.collapsed .brand-text,
  .app.collapsed .nav-text,
  .app.collapsed .nav-section-label,
  .app.collapsed .user-info,
  .app.collapsed .user-rank,
  .app.collapsed .user-logout-text {
    display: none;
  }
  .app.collapsed .nav-link,
  .app.collapsed .user-card-top {
    justify-content: center;
  }
  .app.collapsed .user-card {
    padding: 8px;
    gap: 8px;
    align-items: stretch;
  }
  .app.collapsed .user-logout {
    padding: 8px;
  }
  .app.collapsed .nav-section + .nav-section {
    margin-top: 6px;
    padding-top: 10px;
  }
  .app.collapsed .brand {
    justify-content: center;
  }
  .app.collapsed .user-menu {
    left: 0;
    right: auto;
    bottom: 100%;
    margin-bottom: 4px;
    width: max-content;
    min-width: 0;
    transform: none;
  }
  .app.collapsed .user-menu-item {
    width: max-content;
    white-space: nowrap;
    text-align: left;
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* ——— до 760px ——— */
@media (max-width: 760px) {
  .fin-last-sync { display: none; }
}

/* ——— до 800px ——— */
@media (max-width: 800px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .login-visual {
    min-height: 220px;
  }
  .login-visual-title {
    font-size: 22px;
    top: 24px;
    left: 24px;
  }
  .login-panel {
    padding: 32px 24px 40px;
  }
}

/* ——— до 900px ——— */
@media (max-width: 900px) {
  .acc-cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .acc-cols .acc-section:nth-child(2) {
    border-left: none;
    border-right: none;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ——— до 960px ——— */
@media (max-width: 960px) {
  .wk-stats { grid-template-columns: 1fr 1fr; }
}

/* ——— до 1100px ——— */
@media (max-width: 1100px) {
  .ba-expand {
    grid-template-columns: 1fr;
  }
  .ba-expand-split {
    width: 100%;
    height: 1px;
    min-height: 0;
  }
}


/* Адаптив. Базовые стили — app/style.css
 *
 *  …520   телефон, узкий
 *  …640   телефон
 *  768+   планшет и шире (сайдбар всегда на экране)
 *  …760   узкий планшет
 *  …800   логин в одну колонку
 *  …900   аккаунты в столбик
 *  …960   статистика Worker King
 *  …1100  карточка кабинета
 */

/* ——— до 520px ——— */
@media (max-width: 520px) {
  .wk-stats { grid-template-columns: 1fr; }
}

/* ——— до 640px ——— */
@media (max-width: 640px) {
  .ba-meta { grid-template-columns: 1fr; }
}

/* ——— от 768px: десктоп-сайдбар ——— */
@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
    overflow: visible;
    z-index: 30;
    transition: width 0.2s ease;
  }
  .burger, .overlay { display: none; }
  .collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    width: 17px;
    height: 17px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
    transform: none;
    line-height: 0;
  }
  .collapse-btn:hover {
    background: #f7f7f7;
  }
  .collapse-btn:hover .collapse-icon {
    opacity: 0.85;
  }
  .app.collapsed .collapse-icon {
    transform: none;
  }

  .app.collapsed .sidebar {
    width: 64px;
    padding: 16px 8px;
    overflow: visible;
  }
  .app.collapsed .brand-text,
  .app.collapsed .nav-text,
  .app.collapsed .nav-section-label,
  .app.collapsed .user-info,
  .app.collapsed .user-rank,
  .app.collapsed .user-logout-text {
    display: none;
  }
  .app.collapsed .nav-link,
  .app.collapsed .user-card-top {
    justify-content: center;
  }
  .app.collapsed .user-card {
    padding: 8px;
    gap: 8px;
    align-items: stretch;
  }
  .app.collapsed .user-logout {
    padding: 8px;
  }
  .app.collapsed .nav-section + .nav-section {
    margin-top: 6px;
    padding-top: 10px;
  }
  .app.collapsed .brand {
    justify-content: center;
  }
  .app.collapsed .user-menu {
    left: 0;
    right: auto;
    bottom: 100%;
    margin-bottom: 4px;
    width: max-content;
    min-width: 0;
    transform: none;
  }
  .app.collapsed .user-menu-item {
    width: max-content;
    white-space: nowrap;
    text-align: left;
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* ——— до 760px ——— */
@media (max-width: 760px) {
  .fin-last-sync { display: none; }
}

/* ——— до 800px ——— */
@media (max-width: 800px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .login-visual {
    min-height: 220px;
  }
  .login-visual-title {
    font-size: 22px;
    top: 24px;
    left: 24px;
  }
  .login-panel {
    padding: 32px 24px 40px;
  }
}

/* ——— до 900px ——— */
@media (max-width: 900px) {
  .acc-cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .acc-cols .acc-section:nth-child(2) {
    border-left: none;
    border-right: none;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ——— до 960px ——— */
@media (max-width: 960px) {
  .wk-stats { grid-template-columns: 1fr 1fr; }
}

/* ——— до 1100px ——— */
@media (max-width: 1100px) {
  .ba-expand {
    grid-template-columns: 1fr;
  }
  .ba-expand-split {
    width: 100%;
    height: 1px;
    min-height: 0;
  }
}


/* Адаптив. Базовые стили — app/style.css
 *
 *  …520   телефон, узкий
 *  …640   телефон
 *  768+   планшет и шире (сайдбар всегда на экране)
 *  …760   узкий планшет
 *  …800   логин в одну колонку
 *  …900   аккаунты в столбик
 *  …960   статистика Worker King
 *  …1100  карточка кабинета
 */

/* ——— до 520px ——— */
@media (max-width: 520px) {
  .wk-stats { grid-template-columns: 1fr; }
}

/* ——— до 640px ——— */
@media (max-width: 640px) {
  .ba-meta { grid-template-columns: 1fr; }
}

/* ——— от 768px: десктоп-сайдбар ——— */
@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
    overflow: visible;
    z-index: 30;
    transition: width 0.2s ease;
  }
  .burger, .overlay { display: none; }
  .collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    width: 17px;
    height: 17px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
    transform: none;
    line-height: 0;
  }
  .collapse-btn:hover {
    background: #f7f7f7;
  }
  .collapse-btn:hover .collapse-icon {
    opacity: 0.85;
  }
  .app.collapsed .collapse-icon {
    transform: none;
  }

  .app.collapsed .sidebar {
    width: 64px;
    padding: 16px 8px;
    overflow: visible;
  }
  .app.collapsed .brand-text,
  .app.collapsed .nav-text,
  .app.collapsed .nav-section-label,
  .app.collapsed .user-info,
  .app.collapsed .user-rank,
  .app.collapsed .user-logout-text {
    display: none;
  }
  .app.collapsed .nav-link,
  .app.collapsed .user-card-top {
    justify-content: center;
  }
  .app.collapsed .user-card {
    padding: 8px;
    gap: 8px;
    align-items: stretch;
  }
  .app.collapsed .user-logout {
    padding: 8px;
  }
  .app.collapsed .nav-section + .nav-section {
    margin-top: 6px;
    padding-top: 10px;
  }
  .app.collapsed .brand {
    justify-content: center;
  }
  .app.collapsed .user-menu {
    left: 0;
    right: auto;
    bottom: 100%;
    margin-bottom: 4px;
    width: max-content;
    min-width: 0;
    transform: none;
  }
  .app.collapsed .user-menu-item {
    width: max-content;
    white-space: nowrap;
    text-align: left;
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* ——— до 760px ——— */
@media (max-width: 760px) {
  .fin-last-sync { display: none; }
}

/* ——— до 800px ——— */
@media (max-width: 800px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .login-visual {
    min-height: 220px;
  }
  .login-visual-title {
    font-size: 22px;
    top: 24px;
    left: 24px;
  }
  .login-panel {
    padding: 32px 24px 40px;
  }
}

/* ——— до 900px ——— */
@media (max-width: 900px) {
  .acc-cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .acc-cols .acc-section:nth-child(2) {
    border-left: none;
    border-right: none;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ——— до 960px ——— */
@media (max-width: 960px) {
  .wk-stats { grid-template-columns: 1fr 1fr; }
}

/* ——— до 1100px ——— */
@media (max-width: 1100px) {
  .ba-expand {
    grid-template-columns: 1fr;
  }
  .ba-expand-split {
    width: 100%;
    height: 1px;
    min-height: 0;
  }
}


/* Адаптив. Базовые стили — app/style.css
 *
 *  …520   телефон, узкий
 *  …640   телефон
 *  768+   планшет и шире (сайдбар всегда на экране)
 *  …760   узкий планшет
 *  …800   логин в одну колонку
 *  …900   аккаунты в столбик
 *  …960   статистика Worker King
 *  …1100  карточка кабинета
 */

/* ——— до 520px ——— */
@media (max-width: 520px) {
  .wk-stats { grid-template-columns: 1fr; }
}

/* ——— до 640px ——— */
@media (max-width: 640px) {
  .ba-meta { grid-template-columns: 1fr; }
}

/* ——— от 768px: десктоп-сайдбар ——— */
@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
    overflow: visible;
    z-index: 30;
    transition: width 0.2s ease;
  }
  .burger, .overlay { display: none; }
  .collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    width: 17px;
    height: 17px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
    transform: none;
    line-height: 0;
  }
  .collapse-btn:hover {
    background: #f7f7f7;
  }
  .collapse-btn:hover .collapse-icon {
    opacity: 0.85;
  }
  .app.collapsed .collapse-icon {
    transform: none;
  }

  .app.collapsed .sidebar {
    width: 64px;
    padding: 16px 8px;
    overflow: visible;
  }
  .app.collapsed .brand-text,
  .app.collapsed .nav-text,
  .app.collapsed .nav-section-label,
  .app.collapsed .user-info,
  .app.collapsed .user-rank,
  .app.collapsed .user-logout-text {
    display: none;
  }
  .app.collapsed .nav-link,
  .app.collapsed .user-card-top {
    justify-content: center;
  }
  .app.collapsed .user-card {
    padding: 8px;
    gap: 8px;
    align-items: stretch;
  }
  .app.collapsed .user-logout {
    padding: 8px;
  }
  .app.collapsed .nav-section + .nav-section {
    margin-top: 6px;
    padding-top: 10px;
  }
  .app.collapsed .brand {
    justify-content: center;
  }
  .app.collapsed .user-menu {
    left: 0;
    right: auto;
    bottom: 100%;
    margin-bottom: 4px;
    width: max-content;
    min-width: 0;
    transform: none;
  }
  .app.collapsed .user-menu-item {
    width: max-content;
    white-space: nowrap;
    text-align: left;
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* ——— до 760px ——— */
@media (max-width: 760px) {
  .fin-last-sync { display: none; }
}

/* ——— до 800px ——— */
@media (max-width: 800px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .login-visual {
    min-height: 220px;
  }
  .login-visual-title {
    font-size: 22px;
    top: 24px;
    left: 24px;
  }
  .login-panel {
    padding: 32px 24px 40px;
  }
}

/* ——— до 900px ——— */
@media (max-width: 900px) {
  .acc-cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .acc-cols .acc-section:nth-child(2) {
    border-left: none;
    border-right: none;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ——— до 960px ——— */
@media (max-width: 960px) {
  .wk-stats { grid-template-columns: 1fr 1fr; }
}

/* ——— до 1100px ——— */
@media (max-width: 1100px) {
  .ba-expand {
    grid-template-columns: 1fr;
  }
  .ba-expand-split {
    width: 100%;
    height: 1px;
    min-height: 0;
  }
}


/* Адаптив. Базовые стили — app/style.css
 *
 *  …520   телефон, узкий
 *  …640   телефон
 *  768+   планшет и шире (сайдбар всегда на экране)
 *  …760   узкий планшет
 *  …800   логин в одну колонку
 *  …900   аккаунты в столбик
 *  …960   статистика Worker King
 *  …1100  карточка кабинета
 */

/* ——— до 520px ——— */
@media (max-width: 520px) {
  .wk-stats { grid-template-columns: 1fr; }
}

/* ——— до 640px ——— */
@media (max-width: 640px) {
  .ba-meta { grid-template-columns: 1fr; }
}

/* ——— от 768px: десктоп-сайдбар ——— */
@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
    overflow: visible;
    z-index: 30;
    transition: width 0.2s ease;
  }
  .burger, .overlay { display: none; }
  .collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    width: 17px;
    height: 17px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
    transform: none;
    line-height: 0;
  }
  .collapse-btn:hover {
    background: #f7f7f7;
  }
  .collapse-btn:hover .collapse-icon {
    opacity: 0.85;
  }
  .app.collapsed .collapse-icon {
    transform: none;
  }

  .app.collapsed .sidebar {
    width: 64px;
    padding: 16px 8px;
    overflow: visible;
  }
  .app.collapsed .brand-text,
  .app.collapsed .nav-text,
  .app.collapsed .nav-section-label,
  .app.collapsed .user-info,
  .app.collapsed .user-rank,
  .app.collapsed .user-logout-text {
    display: none;
  }
  .app.collapsed .nav-link,
  .app.collapsed .user-card-top {
    justify-content: center;
  }
  .app.collapsed .user-card {
    padding: 8px;
    gap: 8px;
    align-items: stretch;
  }
  .app.collapsed .user-logout {
    padding: 8px;
  }
  .app.collapsed .nav-section + .nav-section {
    margin-top: 6px;
    padding-top: 10px;
  }
  .app.collapsed .brand {
    justify-content: center;
  }
  .app.collapsed .user-menu {
    left: 0;
    right: auto;
    bottom: 100%;
    margin-bottom: 4px;
    width: max-content;
    min-width: 0;
    transform: none;
  }
  .app.collapsed .user-menu-item {
    width: max-content;
    white-space: nowrap;
    text-align: left;
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* ——— до 760px ——— */
@media (max-width: 760px) {
  .fin-last-sync { display: none; }
}

/* ——— до 800px ——— */
@media (max-width: 800px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .login-visual {
    min-height: 220px;
  }
  .login-visual-title {
    font-size: 22px;
    top: 24px;
    left: 24px;
  }
  .login-panel {
    padding: 32px 24px 40px;
  }
}

/* ——— до 900px ——— */
@media (max-width: 900px) {
  .acc-cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .acc-cols .acc-section:nth-child(2) {
    border-left: none;
    border-right: none;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ——— до 960px ——— */
@media (max-width: 960px) {
  .wk-stats { grid-template-columns: 1fr 1fr; }
}

/* ——— до 1100px ——— */
@media (max-width: 1100px) {
  .ba-expand {
    grid-template-columns: 1fr;
  }
  .ba-expand-split {
    width: 100%;
    height: 1px;
    min-height: 0;
  }
}


/* Адаптив. Базовые стили — app/style.css
 *
 *  …520   телефон, узкий
 *  …640   телефон
 *  768+   планшет и шире (сайдбар всегда на экране)
 *  …760   узкий планшет
 *  …800   логин в одну колонку
 *  …900   аккаунты в столбик
 *  …960   статистика Worker King
 *  …1100  карточка кабинета
 */

/* ——— до 520px ——— */
@media (max-width: 520px) {
  .wk-stats { grid-template-columns: 1fr; }
}

/* ——— до 640px ——— */
@media (max-width: 640px) {
  .ba-meta { grid-template-columns: 1fr; }
}

/* ——— от 768px: десктоп-сайдбар ——— */
@media (min-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
    overflow: visible;
    z-index: 30;
    transition: width 0.2s ease;
  }
  .burger, .overlay { display: none; }
  .collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    width: 17px;
    height: 17px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
    transform: none;
    line-height: 0;
  }
  .collapse-btn:hover {
    background: #f7f7f7;
  }
  .collapse-btn:hover .collapse-icon {
    opacity: 0.85;
  }
  .app.collapsed .collapse-icon {
    transform: none;
  }

  .app.collapsed .sidebar {
    width: 64px;
    padding: 16px 8px;
    overflow: visible;
  }
  .app.collapsed .brand-text,
  .app.collapsed .nav-text,
  .app.collapsed .nav-section-label,
  .app.collapsed .user-info,
  .app.collapsed .user-rank,
  .app.collapsed .user-logout-text {
    display: none;
  }
  .app.collapsed .nav-link,
  .app.collapsed .user-card-top {
    justify-content: center;
  }
  .app.collapsed .user-card {
    padding: 8px;
    gap: 8px;
    align-items: stretch;
  }
  .app.collapsed .user-logout {
    padding: 8px;
  }
  .app.collapsed .nav-section + .nav-section {
    margin-top: 6px;
    padding-top: 10px;
  }
  .app.collapsed .brand {
    justify-content: center;
  }
  .app.collapsed .user-menu {
    left: 0;
    right: auto;
    bottom: 100%;
    margin-bottom: 4px;
    width: max-content;
    min-width: 0;
    transform: none;
  }
  .app.collapsed .user-menu-item {
    width: max-content;
    white-space: nowrap;
    text-align: left;
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* ——— до 760px ——— */
@media (max-width: 760px) {
  .fin-last-sync { display: none; }
}

/* ——— до 800px ——— */
@media (max-width: 800px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .login-visual {
    min-height: 220px;
  }
  .login-visual-title {
    font-size: 22px;
    top: 24px;
    left: 24px;
  }
  .login-panel {
    padding: 32px 24px 40px;
  }
}

/* ——— до 900px ——— */
@media (max-width: 900px) {
  .acc-cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .acc-cols .acc-section:nth-child(2) {
    border-left: none;
    border-right: none;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ——— до 960px ——— */
@media (max-width: 960px) {
  .wk-stats { grid-template-columns: 1fr 1fr; }
}

/* ——— до 1100px ——— */
@media (max-width: 1100px) {
  .ba-expand {
    grid-template-columns: 1fr;
  }
  .ba-expand-split {
    width: 100%;
    height: 1px;
    min-height: 0;
  }
}

