
:root {
  --bg: #0b1220;
  --panel: #101827;
  --panel-2: #162132;
  --panel-3: #0f1b2d;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.16);
  --danger: #ef4444;
  --border: #2b3a53;
  --shadow: 0 16px 40px rgba(2, 8, 23, 0.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1280px; margin: 0 auto; padding: 20px; }
.header { border-bottom: 1px solid var(--border); background: rgba(15,23,42,.95); }
.header-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { color: #fff; font-size: 22px; font-weight: 700; }
.nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card, .login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.login-card { max-width: 420px; margin: 64px auto; }
.stats-grid, .grid-two { display: grid; gap: 20px; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-two { grid-template-columns: 1fr 1fr; }
.label { color: var(--muted); font-size: 14px; }
.value { font-size: 34px; font-weight: 700; margin-top: 6px; }
.form-grid { display: grid; gap: 14px; }
input[type="text"], input[type="password"], input[type="url"], input[type="number"] {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
}
.btn {
  background: var(--accent);
  color: #03111b;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: white; }
.actions-row, .inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239,68,68,.35);
  color: #fecaca;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.muted { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { text-align: left; color: var(--muted); }
ul { margin: 0; padding-left: 20px; }
.checkbox-line { display: flex; align-items: center; gap: 10px; }
.toast-container {
  position: fixed;
  top: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  max-width: 360px;
}
.toast {
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}
.toast-visible {
  transform: translateY(0);
  opacity: 1;
}
.toast-title { font-weight: 700; margin-bottom: 6px; }
.toast-text { color: var(--text); margin-bottom: 8px; }
.toast-link { font-weight: 600; }
@media (max-width: 900px) {
  .grid-two { grid-template-columns: 1fr; }
  .toast-container { left: 20px; right: 20px; max-width: none; }
}


.btn-small {
  padding: 8px 12px;
  font-size: 13px;
}
.actions-row-compact {
  gap: 8px;
}
.row-viewed {
  opacity: .6;
}
.row-viewed td {
  color: var(--muted);
}

@media (max-width: 768px) {
  .container {
    padding: 14px;
  }
  .header-row {
    flex-direction: column;
    align-items: stretch;
  }
  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .nav a,
  .nav form,
  .nav .btn {
    width: 100%;
  }
  .brand {
    font-size: 20px;
  }
  h1 {
    font-size: 24px;
    margin-bottom: 12px;
  }
  h2 {
    font-size: 18px;
  }
  .value {
    font-size: 28px;
  }
  .card,
  .login-card {
    padding: 16px;
    border-radius: 14px;
  }
  .actions-row,
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }
  .actions-row > *,
  .inline-form > *,
  .actions-row .btn,
  .inline-form .btn {
    width: 100%;
  }
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tbody {
    display: grid;
    gap: 12px;
  }
  tr {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
  }
  td {
    border: none;
    padding: 8px 0;
  }
  td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
  }
  .table-empty td::before {
    content: none;
  }
  .toast-container {
    top: auto;
    bottom: 14px;
    left: 14px;
    right: 14px;
    max-width: none;
  }
  .toast {
    padding: 14px;
  }
}

html {
  overflow-y: scroll;
}
body {
  min-height: 100vh;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-decoration: none; transition: color .18s ease, opacity .18s ease; }
a:hover { text-decoration: none; color: #7dd3fc; }
.container { max-width: 1320px; margin: 0 auto; padding: 24px; }
.header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(12px); border-bottom: 1px solid rgba(43, 58, 83, 0.8); background: rgba(11, 18, 32, 0.82); }
.brand { letter-spacing: -0.02em; }
.nav a { color: var(--text); padding: 10px 14px; border-radius: 12px; }
.nav a:hover { background: rgba(255,255,255,0.04); color: #fff; }
.card, .login-card {
  background: linear-gradient(180deg, rgba(16,24,39,0.98), rgba(16,24,39,0.94));
  box-shadow: var(--shadow);
}
h1, h2, h3, .value { letter-spacing: -0.03em; }
p, label, .muted, .toast-text { overflow-wrap: anywhere; }
th, td { overflow-wrap: normal; word-break: normal; }
.table-cell-wrap, .cell-error, .cell-title { overflow-wrap: anywhere; word-break: break-word; }
.cell-id, .cell-num, .cell-listing, .state-badge { white-space: nowrap; }
input[type="text"], input[type="password"], input[type="url"], input[type="number"] {
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="url"]:focus, input[type="number"]:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
  background: var(--panel-3);
}
.btn, .link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
}
.btn:hover, .link-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.18);
}
.btn:active, .link-btn:active { transform: translateY(0); }
.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04131d;
}
.btn-ghost, .link-btn-secondary {
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}
.btn-ghost:hover, .link-btn-secondary:hover {
  background: rgba(148, 163, 184, 0.09);
  color: #fff;
}
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}
.btn[disabled], .link-btn[aria-disabled="true"] {
  opacity: .55;
  cursor: default;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}
.actions-row, .inline-form { gap: 12px; }
.actions-row-compact { gap: 10px; align-items: stretch; }
.table-shell { overflow-x: auto; }
table { table-layout: fixed; }
th, td { padding: 14px 10px; }
.table-empty td { padding: 18px 10px; color: var(--muted); }
.match-row-link { min-width: 150px; }
.row-viewed { opacity: .72; }
.row-viewed .match-open-link { background: rgba(56, 189, 248, 0.08); color: #93c5fd; border-color: rgba(56, 189, 248, 0.18); }
.status-stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.link-btn.match-open-link { width: 100%; max-width: 190px; }
.toast { will-change: opacity; transform: none; }
.toast-visible { transform: none; }
.toast .actions-row { margin-top: 10px; }
@media (max-width: 1024px) {
  .container { padding: 18px; }
  .status-stack, .link-btn.match-open-link { max-width: none; }
}
@media (max-width: 768px) {
  .header { position: static; backdrop-filter: none; }
  .nav a, .nav form, .nav .btn { width: 100%; }
  .btn, .link-btn { width: 100%; }
  tbody { display: grid; gap: 14px; }
  tr { padding: 14px 14px 10px; }
  td { padding: 7px 0; }
  .status-stack { align-items: stretch; }
  .link-btn.match-open-link { max-width: none; }
}


/* overlap + spacing fixes */
.table-shell {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.table-shell table {
  width: 100%;
  table-layout: auto;
}

#dashboard-items-table {
  min-width: 760px;
}

#recent-matches-table,
#matches-table {
  min-width: 1180px;
}

.btn,
.link-btn {
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}

.link-btn.match-open-link,
#dashboard-items-table .link-btn {
  width: 100%;
  max-width: 220px;
  min-width: 170px;
}

#dashboard-items-table td,
#recent-matches-table td,
#matches-table td {
  padding-top: 16px;
  padding-bottom: 16px;
}

#dashboard-items-table td[data-label="Ссылка"],
#recent-matches-table td[data-label="Ссылка на предмет"],
#recent-matches-table td[data-label="Статус"],
#matches-table td[data-label="Ссылка на предмет"],
#matches-table td[data-label="Действия"] {
  min-width: 170px;
}

.status-stack {
  gap: 12px;
  min-width: 160px;
}

.status-stack .btn {
  width: 100%;
  max-width: 160px;
}

@media (max-width: 1024px) {
  .table-shell table {
    width: max-content;
  }

  .link-btn.match-open-link,
  #dashboard-items-table .link-btn,
  .status-stack .btn {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .table-shell {
    overflow-x: visible;
    padding-bottom: 0;
  }

  .table-shell table,
  #dashboard-items-table,
  #recent-matches-table,
  #matches-table {
    min-width: 0;
    width: 100%;
  }

  #dashboard-items-table td,
  #recent-matches-table td,
  #matches-table td {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .status-stack {
    min-width: 0;
    gap: 10px;
  }
}


.section-note {
  margin-top: -6px;
  margin-bottom: 14px;
  font-size: 13px;
}

.state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.state-badge.is-on {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.28);
}
.state-badge.is-off {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.28);
}
.state-badge.compact {
  min-height: 26px;
  padding: 2px 8px;
  font-size: 12px;
}

#dashboard-items-table {
  table-layout: auto;
  font-size: 13px;
}
#dashboard-items-table th,
#dashboard-items-table td {
  padding: 12px 10px;
  font-size: 13px;
  line-height: 1.35;
}
#dashboard-items-table th {
  font-size: 11px;
  letter-spacing: 0.01em;
}
#dashboard-items-table .col-id {
  width: 56px;
}
#dashboard-items-table .col-status {
  width: 88px;
}
#dashboard-items-table .col-link {
  width: 150px;
}
#dashboard-items-table .col-error {
  min-width: 180px;
}
#dashboard-items-table .link-btn {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
}
#dashboard-items-table td:nth-child(2) {
  min-width: 220px;
}
#dashboard-items-table td:nth-child(5) {
  color: var(--muted);
  max-width: 320px;
}

@media (max-width: 768px) {
  #dashboard-items-table,
  #dashboard-items-table tbody,
  #dashboard-items-table tr,
  #dashboard-items-table td {
    font-size: 13px;
  }
  .state-badge {
    font-size: 12px;
  }
}


#items-table, #dashboard-items-table { min-width: 980px; }
#items-table th, #dashboard-items-table th { white-space: nowrap; }
#items-table .col-id, #dashboard-items-table .col-id { width: 72px; }
#items-table .col-link, #dashboard-items-table .col-link { width: 190px; }
#items-table .col-float { width: 110px; }
#items-table .col-price { width: 110px; }
#items-table .col-status, #dashboard-items-table .col-status { width: 110px; }
#items-table .col-checked { width: 170px; }
#items-table .col-actions { width: 260px; }
#items-table td:nth-child(2), #dashboard-items-table td:nth-child(2) { min-width: 260px; }
#items-table td:nth-child(7) { white-space: nowrap; }

.system-state p {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  #items-table, #dashboard-items-table { min-width: 980px; }
}


body[data-page="dashboard"] .container {
  max-width: 1160px;
}

.dashboard-grid {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.system-state {
  position: sticky;
  top: 88px;
}

.system-status-box {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.system-status-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}

.state-badge-xl {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 15px;
  width: 100%;
  justify-content: center;
}

.system-meta {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.system-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(43,58,83,.8);
  border-radius: 12px;
}

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

.system-meta-row strong {
  font-size: 13px;
  text-align: right;
  max-width: 58%;
  word-break: break-word;
}

.state-error-text {
  color: #fca5a5;
}

.system-actions form,
.system-actions .btn,
.compact-form .btn {
  width: 100%;
}

.compact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.dashboard-items-card {
  padding-bottom: 12px;
}

.section-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.items-total-chip {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.18);
  color: #bae6fd;
  font-size: 13px;
  font-weight: 700;
}

#dashboard-items-table {
  min-width: 0;
}

#dashboard-items-table td:nth-child(2) {
  min-width: 320px;
}

#dashboard-items-table th,
#dashboard-items-table td {
  font-size: 12px;
}

#dashboard-items-table th {
  font-size: 11px;
}

#dashboard-items-table .col-link {
  width: 170px;
}

#dashboard-items-table .col-status {
  width: 94px;
}

@media (max-width: 1024px) {
  body[data-page="dashboard"] .container {
    max-width: 100%;
  }

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

  .system-state {
    position: static;
  }
}

@media (max-width: 768px) {
  .section-header-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .items-total-chip {
    width: fit-content;
  }
}


/* compact dashboard and stable edit page */
body[data-page="dashboard"] .container {
  max-width: 1040px;
}

body[data-page="dashboard"] h1 {
  margin: 0 0 14px;
  font-size: 28px;
}

body[data-page="dashboard"] .stats-grid {
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

body[data-page="dashboard"] .stats-grid .card {
  padding: 14px 16px;
  margin-bottom: 0;
}

body[data-page="dashboard"] .stats-grid .label {
  font-size: 12px;
}

body[data-page="dashboard"] .stats-grid .value {
  font-size: 28px;
  margin-top: 2px;
}

.dashboard-grid {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
}

.system-state {
  padding: 16px;
}

.system-state h2,
.dashboard-items-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.system-status-box {
  gap: 8px;
  margin-bottom: 14px;
}

.system-status-label {
  font-size: 12px;
}

.state-badge-xl {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 14px;
}

.system-meta {
  gap: 8px;
  margin-bottom: 14px;
}

.system-meta-row {
  padding: 8px 10px;
  border-radius: 10px;
}

.system-meta-row span,
.system-meta-row strong {
  font-size: 12px;
}

.system-actions {
  gap: 8px;
}

.compact-form {
  gap: 8px;
}

.compact-form label {
  font-size: 13px;
}

.compact-form input[type="number"] {
  padding: 10px 12px;
}

.dashboard-items-card {
  padding: 16px;
}

.section-header-inline {
  margin-bottom: 6px;
}

.section-note {
  margin: 0;
  font-size: 12px;
}

.items-total-chip {
  padding: 6px 10px;
  font-size: 12px;
}

#dashboard-items-table {
  min-width: 760px;
  font-size: 12px;
}

#dashboard-items-table th,
#dashboard-items-table td {
  padding: 10px 8px;
  font-size: 12px;
}

#dashboard-items-table .link-btn {
  min-height: 34px;
  padding: 7px 10px;
  min-width: 150px;
}

#dashboard-items-table .col-id {
  width: 68px;
}

#dashboard-items-table .col-link {
  width: 170px;
}

#dashboard-items-table .col-status {
  width: 84px;
}

#dashboard-items-table td:nth-child(2) {
  min-width: 220px;
}

body[data-page="items"] .card h2 {
  margin-top: 0;
}

body[data-page="items"] .muted.items-live-note {
  font-size: 12px;
}

@media (max-width: 1100px) {
  body[data-page="dashboard"] .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  body[data-page="dashboard"] .container {
    max-width: 100%;
  }

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

  .system-state {
    position: static;
  }
}

@media (max-width: 768px) {
  body[data-page="dashboard"] .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .system-state,
  .dashboard-items-card {
    padding: 14px;
  }
}


.toast {
  min-width: 300px;
}
.toast .status-stack {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.toast .match-open-link,
.toast .btn-small {
  min-height: 38px;
}


.toggle-badge {
  border: 1px solid var(--border);
  cursor: pointer;
}

.toggle-badge:hover {
  filter: brightness(1.06);
}

.dashboard-item-actions {
  display: flex;
  flex-wrap: wrap;
}

#dashboard-items-table {
  min-width: 920px;
}

#dashboard-items-table .col-checked {
  width: 180px;
}

#dashboard-items-table .col-actions {
  width: 220px;
}

#dashboard-items-table .toggle-badge {
  width: 100%;
  justify-content: center;
}

@media (max-width: 768px) {
  .dashboard-item-actions {
    align-items: stretch;
  }

  #dashboard-items-table .toggle-badge {
    width: 100%;
  }
}


/* dashboard width + status toggle refinements */
body[data-page="dashboard"] .container {
  max-width: 1560px;
}

body[data-page="dashboard"] .stats-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.dashboard-grid {
  grid-template-columns: 300px minmax(0, 1fr);
}

#dashboard-items-table {
  min-width: 1080px;
}

#dashboard-items-table .col-title {
  min-width: 260px;
}

#dashboard-items-table .col-actions {
  width: 240px;
}

#dashboard-items-table td[data-label="Статус"] {
  min-width: 92px;
}

#dashboard-items-table .toggle-badge {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

#dashboard-items-table .toggle-badge:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

@media (max-width: 1200px) {
  body[data-page="dashboard"] .container {
    max-width: 100%;
  }

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


/* compact dashboard/items update */
.container { max-width: 1560px; }
body[data-page="dashboard"] .container,
body[data-page="items"] .container { max-width: 1660px; }
.dashboard-intro { margin-top: -6px; margin-bottom: 16px; }
.section-header-tight { margin-bottom: 10px; }
.add-item-card, .add-item-page-card { padding: 18px 20px; }
.add-item-form-inline {
  display: grid;
  grid-template-columns: minmax(420px, 2.4fr) minmax(150px, .8fr) minmax(150px, .8fr) auto;
  gap: 12px;
  align-items: end;
}
.add-item-form-inline label { margin: 0; }
.add-item-actions { display:flex; align-items:flex-end; }
.add-item-actions .btn { min-width: 130px; }
.compact-items-card #dashboard-items-table { min-width: 0; width: 100%; table-layout: fixed; }
.compact-items-card #dashboard-items-table th,
.compact-items-card #dashboard-items-table td { padding: 9px 8px; font-size: 12px; line-height: 1.25; }
.compact-items-card #dashboard-items-table th { font-size: 10px; }
.compact-items-card #dashboard-items-table .col-id { width: 52px; }
.compact-items-card #dashboard-items-table .col-status { width: 80px; }
.compact-items-card #dashboard-items-table .col-float,
.compact-items-card #dashboard-items-table .col-price { width: 88px; }
.compact-items-card #dashboard-items-table .col-checked { width: 150px; }
.compact-items-card #dashboard-items-table .col-actions { width: 210px; }
.compact-items-card #dashboard-items-table td:nth-child(2) { min-width: 0; }
.dashboard-item-actions { gap: 6px; flex-wrap: nowrap; }
.dashboard-item-actions .btn { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.toggle-badge {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .18s ease, filter .18s ease, background .18s ease, border-color .18s ease;
  user-select: none;
}
.toggle-badge:hover { transform: translateY(-1px) scale(1.03); box-shadow: 0 10px 18px rgba(15, 23, 42, 0.28); }
.toggle-badge:active { transform: translateY(0) scale(0.98); }
.toggle-badge:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18); }
.toggle-badge.is-busy { opacity: .75; filter: saturate(1.2); }
.toggle-badge.is-on:hover { background: rgba(34, 197, 94, 0.16); border-color: rgba(34, 197, 94, 0.42); }
.toggle-badge.is-off:hover { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.42); }
@media (max-width: 1024px) {
  .add-item-form-inline { grid-template-columns: 1fr 1fr; }
  .add-item-actions { grid-column: 1 / -1; }
  .dashboard-item-actions { flex-wrap: wrap; }
  .compact-items-card #dashboard-items-table { min-width: 860px; }
}
@media (max-width: 768px) {
  .add-item-form-inline { grid-template-columns: 1fr; }
  .add-item-actions .btn { width: 100%; }
}

.hidden { display: none !important; }
.container { max-width: 1560px; }

.dashboard-layout-single {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.add-item-form-inline {
  grid-template-columns: minmax(0, 1.8fr) 180px 180px 140px;
  align-items: end;
}

.add-item-actions { display: flex; }
.section-header-inline { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.section-header-tight { margin-bottom: 14px; }
.section-note { margin: 4px 0 0; }
.items-total-chip {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
}

#dashboard-items-table { table-layout: fixed; }
#dashboard-items-table th, #dashboard-items-table td { padding-top: 9px; padding-bottom: 9px; }
#dashboard-items-table .col-id { width: 62px; }
#dashboard-items-table .col-title { width: 27%; }
#dashboard-items-table .col-status { width: 190px; }
#dashboard-items-table .col-float { width: 100px; }
#dashboard-items-table .col-price { width: 100px; }
#dashboard-items-table .col-checked { width: 28%; }
#dashboard-items-table .col-actions { width: 210px; }

.cell-title {
  max-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-switches {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.btn-soft-success {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.45);
}
.btn-soft-success:hover {
  background: rgba(34, 197, 94, 0.28);
  color: #dcfce7;
}
.btn-soft-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.45);
}
.btn-soft-danger:hover {
  background: rgba(239, 68, 68, 0.28);
  color: #fee2e2;
}

.cell-error-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.check-time {
  color: var(--text);
  font-size: 13px;
}
.error-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.error-line.has-error {
  color: #fca5a5;
}
.row-pending {
  opacity: .55;
  transition: opacity .18s ease;
}

.recent-sidebar-card {
  position: sticky;
  top: 88px;
}
.recent-matches-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 170px);
  overflow: auto;
  padding-right: 4px;
}
.match-card {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 12px;
}
.match-card.is-viewed { opacity: .65; }
.match-card-head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 8px;
}
.match-card-title {
  font-weight: 700;
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-card-time, .match-card-meta {
  color: var(--muted);
  font-size: 12px;
}
.match-card-meta { margin-bottom: 8px; }
.empty-state-inline {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 14px;
}

.edit-modal {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0;
  width: min(680px, calc(100vw - 24px));
  background: transparent;
}
.edit-modal::backdrop {
  background: rgba(3, 8, 20, 0.72);
  backdrop-filter: blur(4px);
}
.edit-form-card {
  background: linear-gradient(180deg, rgba(16,24,39,0.99), rgba(16,24,39,0.97));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
}
.modal-actions { justify-content: flex-end; margin-top: 16px; }

@media (max-width: 1180px) {
  .dashboard-layout-single { grid-template-columns: 1fr; }
  .recent-sidebar-card {
    position: static;
  }
  .recent-matches-list {
    max-height: none;
  }
  .add-item-form-inline {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .add-item-form-inline { grid-template-columns: 1fr; }
  .section-header-inline { flex-direction: column; }
  .inline-switches { flex-wrap: wrap; }
  .cell-title {
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }
  .recent-sidebar-card { top: 0; }
}

.parser-control-card {
  margin-bottom: 18px;
}
.parser-top-grid {
  display: grid;
  grid-template-columns: minmax(320px, 540px) minmax(420px, 1fr);
  gap: 16px;
  align-items: start;
}
.parser-control-panel,
.parser-meta-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.parser-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.mini-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.parser-settings-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) auto;
  gap: 12px;
  align-items: end;
}
.parser-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}
.parser-meta-card-wide {
  grid-column: 1 / -1;
}
.parser-meta-value {
  font-size: 14px;
  font-weight: 600;
}
.parser-error-text {
  overflow-wrap: anywhere;
}
.state-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
}
.state-on {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.35);
  background: rgba(34, 197, 94, 0.12);
}
.state-off {
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.35);
  background: rgba(239, 68, 68, 0.12);
}
#dashboard-items-table .col-title {
  width: 34%;
}
#dashboard-items-table .col-float,
#dashboard-items-table .col-price {
  width: 10%;
}
#dashboard-items-table .col-checked {
  width: 26%;
}
#dashboard-items-table .col-actions {
  width: 20%;
}
.cell-title {
  max-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-item-actions {
  flex-wrap: nowrap;
}
.dashboard-item-actions .btn {
  min-height: 34px;
  padding: 7px 10px;
}
.cell-num {
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .parser-top-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .parser-settings-row,
  .parser-meta-grid {
    grid-template-columns: 1fr;
  }
  .parser-status-line {
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-item-actions {
    flex-wrap: wrap;
  }
}

.item-toggle-btn { min-width: 126px; font-weight: 700; }
.cell-enabled { white-space: nowrap; }
.match-state { font-weight: 700; }
.match-state-active { color: #86efac; }
.match-state-inactive { color: #fca5a5; }
.edit-modal { color: var(--text); }
.edit-form-card,
.edit-form-card h2,
.edit-form-card label,
.edit-form-card .muted,
.edit-form-card input,
.edit-form-card button { color: var(--text); }
.edit-form-card input { background: var(--panel-2); }
#dashboard-items-table .col-enabled { width: 140px; }
#dashboard-items-table .col-actions { width: 190px; }
#dashboard-items-table .col-float,
#dashboard-items-table .col-price { width: 84px; }
#dashboard-items-table .col-checked { width: 24%; }
.cell-title { max-width: 340px; }
.dashboard-item-actions { gap: 6px; }
.dashboard-item-actions .btn { min-width: 0; }

/* responsive table polish for tablets and phones */
.table-shell {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#dashboard-items-table,
#matches-table {
  min-width: 0;
}

@media (max-width: 1180px) {
  .compact-items-card #dashboard-items-table,
  #matches-table {
    min-width: 920px;
    table-layout: auto;
  }

  #dashboard-items-table th,
  #dashboard-items-table td,
  #matches-table th,
  #matches-table td {
    white-space: nowrap;
  }

  #dashboard-items-table .cell-title,
  #matches-table td[data-label="Название"] {
    min-width: 220px;
    max-width: 320px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  #dashboard-items-table .cell-error-stack {
    min-width: 220px;
  }

  .dashboard-item-actions {
    min-width: 190px;
  }
}

@media (max-width: 767px) {
  .table-shell {
    overflow: visible;
  }

  .compact-items-card #dashboard-items-table,
  #matches-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  #dashboard-items-table,
  #dashboard-items-table thead,
  #dashboard-items-table tbody,
  #dashboard-items-table tr,
  #dashboard-items-table th,
  #dashboard-items-table td,
  #matches-table,
  #matches-table thead,
  #matches-table tbody,
  #matches-table tr,
  #matches-table th,
  #matches-table td {
    display: block;
    width: 100%;
  }

  #dashboard-items-table thead,
  #matches-table thead {
    display: none;
  }

  #dashboard-items-table tbody,
  #matches-table tbody {
    display: grid;
    gap: 12px;
  }

  #dashboard-items-table tr,
  #matches-table tr {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel-2);
  }

  #dashboard-items-table td,
  #matches-table td {
    border: 0;
    padding: 8px 0;
    white-space: normal;
    overflow: visible;
  }

  #dashboard-items-table td::before,
  #matches-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
  }

  #dashboard-items-table .table-empty td::before,
  #matches-table .table-empty td::before {
    content: none;
  }

  #dashboard-items-table .cell-title,
  #matches-table td[data-label="Название"],
  #matches-table td[data-label="Ссылка на предмет"],
  #dashboard-items-table .cell-error-stack,
  #matches-table td[data-label="Действия"] {
    min-width: 0;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  .item-toggle-btn,
  .dashboard-item-actions,
  .dashboard-item-actions .btn,
  .match-open-link,
  #matches-table .status-stack,
  #matches-table .status-stack .btn {
    width: 100%;
    max-width: none;
  }

  .dashboard-item-actions,
  #matches-table .status-stack,
  .actions-row.actions-row-compact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .check-time,
  .error-line,
  .match-card-time,
  .match-card-meta {
    font-size: 13px;
  }
}


/* final responsive fixes for dashboard tables and small screens */
body[data-page="dashboard"] .dashboard-items-card,
body[data-page="matches"] .card {
  min-width: 0;
}

body[data-page="dashboard"] .table-shell,
body[data-page="matches"] .table-shell {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

body[data-page="dashboard"] #dashboard-items-table {
  width: max-content;
  min-width: 1080px;
  table-layout: auto;
}

body[data-page="dashboard"] #dashboard-items-table th,
body[data-page="dashboard"] #dashboard-items-table td {
  white-space: nowrap;
  vertical-align: middle;
}

body[data-page="dashboard"] #dashboard-items-table .col-id { width: 72px; }
body[data-page="dashboard"] #dashboard-items-table .col-float,
body[data-page="dashboard"] #dashboard-items-table .col-price { width: 96px; }
body[data-page="dashboard"] #dashboard-items-table .col-enabled { width: 150px; }
body[data-page="dashboard"] #dashboard-items-table .col-checked { width: 240px; }
body[data-page="dashboard"] #dashboard-items-table .col-actions { width: 210px; }
body[data-page="dashboard"] #dashboard-items-table .cell-title {
  min-width: 240px;
  max-width: 360px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}
body[data-page="dashboard"] #dashboard-items-table .cell-error-stack {
  min-width: 220px;
}
body[data-page="dashboard"] .dashboard-item-actions {
  display: flex;
  flex-wrap: nowrap;
  min-width: 190px;
}
body[data-page="dashboard"] .dashboard-item-actions .btn {
  white-space: nowrap;
}

@media (max-width: 1400px) {
  body[data-page="dashboard"] .dashboard-layout-single {
    grid-template-columns: 1fr;
  }

  body[data-page="dashboard"] .recent-sidebar-card {
    position: static;
  }

  body[data-page="dashboard"] .recent-matches-list {
    max-height: none;
  }
}

@media (max-width: 1100px) {
  body[data-page="dashboard"] #dashboard-items-table {
    min-width: 980px;
  }

  body[data-page="dashboard"] #dashboard-items-table .cell-title {
    min-width: 220px;
    max-width: 300px;
  }
}

@media (max-width: 767px) {
  body[data-page="dashboard"] .table-shell,
  body[data-page="matches"] .table-shell {
    overflow: visible;
  }

  body[data-page="dashboard"] #dashboard-items-table,
  body[data-page="matches"] #matches-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  body[data-page="dashboard"] #dashboard-items-table th,
  body[data-page="dashboard"] #dashboard-items-table td,
  body[data-page="matches"] #matches-table th,
  body[data-page="matches"] #matches-table td {
    white-space: normal;
  }

  body[data-page="dashboard"] .dashboard-item-actions,
  body[data-page="dashboard"] .dashboard-item-actions .btn,
  body[data-page="dashboard"] .item-toggle-btn {
    width: 100%;
    min-width: 0;
  }

  body[data-page="dashboard"] .cell-title,
  body[data-page="dashboard"] .cell-error-stack {
    min-width: 0;
    max-width: none;
  }
}

/* Fixed error column: prevents horizontal/vertical jumps from long stack traces */
#dashboard-items-table,
#ab-items-table {
  table-layout: fixed !important;
}

#dashboard-items-table .col-checked,
#ab-items-table .col-checked {
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
}

#dashboard-items-table .cell-error-stack,
#ab-items-table .cell-error-stack {
  box-sizing: border-box !important;
  width: 240px !important;
  min-width: 240px !important;
  max-width: 240px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 2px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

#dashboard-items-table .cell-error-stack .check-time,
#ab-items-table .cell-error-stack .check-time,
#dashboard-items-table .cell-error-stack .error-line,
#ab-items-table .cell-error-stack .error-line {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  line-height: 16px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

#dashboard-items-table .cell-error-stack .error-line,
#ab-items-table .cell-error-stack .error-line {
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
}

@media (max-width: 767px) {
  body[data-page="dashboard"] #dashboard-items-table .cell-error-stack,
  body[data-page="dashboard"] #ab-items-table .cell-error-stack,
  #dashboard-items-table .cell-error-stack,
  #ab-items-table .cell-error-stack {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
  }
}

/* hard table stability fix: keep table cells as table-cells, fix only inner error box */
#dashboard-items-table,
#ab-items-table {
  width: max-content !important;
  table-layout: fixed !important;
  border-collapse: collapse;
}

#dashboard-items-table { min-width: 1040px !important; }
#ab-items-table { min-width: 1160px !important; }

#dashboard-items-table th,
#dashboard-items-table td,
#ab-items-table th,
#ab-items-table td {
  box-sizing: border-box !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

#dashboard-items-table .col-id,
#ab-items-table .col-id { width: 56px !important; }

#dashboard-items-table .col-title { width: 220px !important; }
#ab-items-table .col-title { width: 180px !important; }

#dashboard-items-table .col-float,
#ab-items-table .col-float { width: 88px !important; }

#dashboard-items-table .col-price,
#ab-items-table .col-price { width: 96px !important; }

#dashboard-items-table .col-enabled,
#ab-items-table .col-enabled { width: 124px !important; }

#dashboard-items-table .col-checked,
#ab-items-table .col-checked {
  width: 250px !important;
  min-width: 250px !important;
  max-width: 250px !important;
}

#dashboard-items-table .col-actions,
#ab-items-table .col-actions {
  width: 190px !important;
  min-width: 190px !important;
  max-width: 190px !important;
}

#dashboard-items-table .cell-title,
#ab-items-table .cell-title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  min-width: 0 !important;
  max-width: none !important;
  word-break: normal !important;
}

#dashboard-items-table .cell-error-stack,
#ab-items-table .cell-error-stack {
  display: table-cell !important;
  width: 250px !important;
  min-width: 250px !important;
  max-width: 250px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  padding: 6px 10px !important;
  overflow: hidden !important;
}

#dashboard-items-table .error-stack-box,
#ab-items-table .error-stack-box {
  box-sizing: border-box !important;
  width: 230px !important;
  min-width: 230px !important;
  max-width: 230px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 2px !important;
  overflow: hidden !important;
}

#dashboard-items-table .error-stack-box .check-time,
#ab-items-table .error-stack-box .check-time,
#dashboard-items-table .error-stack-box .error-line,
#ab-items-table .error-stack-box .error-line {
  box-sizing: border-box !important;
  display: block !important;
  width: 230px !important;
  min-width: 230px !important;
  max-width: 230px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  line-height: 18px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
}

#dashboard-items-table .dashboard-item-actions,
#ab-items-table .dashboard-item-actions {
  box-sizing: border-box !important;
  width: 170px !important;
  min-width: 170px !important;
  max-width: 170px !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  overflow: hidden !important;
}

#dashboard-items-table .dashboard-item-actions .btn,
#ab-items-table .dashboard-item-actions .btn {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

@media (max-width: 767px) {
  #dashboard-items-table,
  #ab-items-table {
    width: max-content !important;
    min-width: inherit !important;
    table-layout: fixed !important;
  }
  #dashboard-items-table .cell-error-stack,
  #ab-items-table .cell-error-stack {
    display: table-cell !important;
  }
}

/* v5 compact stable table fix: no clipping, no jumping, compact checked column */
#dashboard-items-table,
#ab-items-table {
  table-layout: fixed !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  border-collapse: collapse !important;
}

#dashboard-items-table th,
#dashboard-items-table td,
#ab-items-table th,
#ab-items-table td {
  box-sizing: border-box !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  overflow: hidden !important;
}

#dashboard-items-table .col-id,
#ab-items-table .col-id { width: 44px !important; min-width: 44px !important; max-width: 44px !important; }
#dashboard-items-table .col-title { width: 190px !important; min-width: 190px !important; max-width: 190px !important; }
#ab-items-table .col-title { width: 150px !important; min-width: 150px !important; max-width: 150px !important; }
#dashboard-items-table .col-float,
#ab-items-table .col-float { width: 72px !important; min-width: 72px !important; max-width: 72px !important; }
#dashboard-items-table .col-price,
#ab-items-table .col-price { width: 78px !important; min-width: 78px !important; max-width: 78px !important; }
#dashboard-items-table .col-enabled,
#ab-items-table .col-enabled { width: 106px !important; min-width: 106px !important; max-width: 106px !important; }
#dashboard-items-table .col-checked,
#ab-items-table .col-checked { width: 148px !important; min-width: 148px !important; max-width: 148px !important; }
#dashboard-items-table .col-actions,
#ab-items-table .col-actions { width: 222px !important; min-width: 222px !important; max-width: 222px !important; }

#dashboard-items-table td.cell-error-stack,
#ab-items-table td.cell-error-stack {
  display: table-cell !important; box-sizing: border-box !important;
  width: 148px !important; min-width: 148px !important; max-width: 148px !important;
  height: 48px !important; min-height: 48px !important; max-height: 48px !important;
  padding: 6px 8px !important; overflow: hidden !important;
}

#dashboard-items-table .error-stack-box,
#ab-items-table .error-stack-box {
  box-sizing: border-box !important; width: 132px !important; min-width: 132px !important; max-width: 132px !important;
  height: 36px !important; min-height: 36px !important; max-height: 36px !important;
  display: block !important; overflow: hidden !important;
}

#dashboard-items-table .error-stack-box .check-time,
#ab-items-table .error-stack-box .check-time,
#dashboard-items-table .error-stack-box .error-line,
#ab-items-table .error-stack-box .error-line {
  box-sizing: border-box !important; display: block !important;
  width: 132px !important; min-width: 132px !important; max-width: 132px !important;
  height: 18px !important; min-height: 18px !important; max-height: 18px !important; line-height: 18px !important;
  overflow: hidden !important; white-space: nowrap !important; text-overflow: ellipsis !important;
  word-break: normal !important; overflow-wrap: normal !important;
  -webkit-line-clamp: unset !important; -webkit-box-orient: unset !important;
}

#dashboard-items-table .dashboard-item-actions,
#ab-items-table .dashboard-item-actions {
  box-sizing: border-box !important; width: 206px !important; min-width: 206px !important; max-width: 206px !important;
  display: flex !important; flex-wrap: nowrap !important; align-items: center !important; gap: 4px !important; overflow: visible !important;
}

#dashboard-items-table .dashboard-item-actions .btn,
#ab-items-table .dashboard-item-actions .btn {
  flex: 0 0 auto !important; min-width: 0 !important; min-height: 32px !important;
  padding: 6px 8px !important; font-size: 12px !important; line-height: 1.1 !important; white-space: nowrap !important;
}

#dashboard-items-table .cell-title,
#ab-items-table .cell-title { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }

@media (max-width: 767px) {
  #dashboard-items-table, #ab-items-table { width: max-content !important; min-width: 0 !important; table-layout: fixed !important; }
}
