:root {
  color-scheme: dark;
  --bg: #121212;
  --bg-2: #0a0a0a;
  --sidebar: #0a0a0a;
  --panel: #181818;
  --panel-2: #202020;
  --panel-3: #2a2a2a;
  --field: #151515;
  --line: #2a2a2a;
  --line-soft: rgba(255, 255, 255, .10);
  --line-strong: #3a3a3a;
  --text: #ffffff;
  --muted: #a0a0a0;
  --soft: #d7d7d7;
  --red: #ff2850;
  --red-soft: #ff5b78;
  --green: #38d98b;
  --blue: #ff2850;
  --violet: #ffffff;
  --amber: #f4bf45;
  --shadow: 0 20px 55px rgba(0, 0, 0, .34);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% -16%, rgba(255, 40, 80, .16), transparent 34%),
    radial-gradient(circle at 10% 8%, rgba(255, 255, 255, .05), transparent 24%),
    linear-gradient(180deg, #0a0a0a 0%, #121212 420px, #0a0a0a 100%);
  color: var(--text);
  font: 13px/1.45 Poppins, Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
}

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

svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
h1, h2, h3, p { margin: 0; letter-spacing: 0; }
h1 { font-size: 22px; line-height: 1.15; font-weight: 850; }
h2 { font-size: 14px; line-height: 1.2; display: flex; align-items: center; gap: 8px; font-weight: 850; }
h3 { color: var(--soft); font-size: 13px; }
a { color: inherit; }

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 760;
  min-width: 0;
}

input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field);
  color: var(--text);
  outline: none;
}

input, select { height: 36px; padding: 0 11px; }
textarea { min-height: 84px; resize: vertical; padding: 10px 11px; }
input:focus, select:focus, textarea:focus { border-color: rgba(255, 40, 80, .72); box-shadow: 0 0 0 3px rgba(255, 40, 80, .14); }

.login-page {
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-shell { width: min(430px, 100%); }

.login-panel {
  display: grid;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(32, 32, 32, .98), rgba(15, 15, 15, .98));
  box-shadow: var(--shadow);
}

.login-form { display: grid; gap: 12px; }

.console-frame {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 16px;
  border-right: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(10, 10, 10, .98), rgba(5, 5, 5, .98)),
    var(--sidebar);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 22px;
}

.brand, .brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-copy, .brand-row div:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong, .brand-row h1 {
  font-size: 17px;
  line-height: 1.1;
  font-weight: 900;
}

.brand-copy span, .brand-row p {
  color: var(--muted);
  font-weight: 780;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 40, 80, .10);
  color: var(--red);
  border: 1px solid rgba(255, 40, 80, .28);
  box-shadow: inset 0 0 18px rgba(255, 40, 80, .08);
  font-weight: 950;
}

.brand-mark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.nav-stack {
  display: grid;
  gap: 7px;
  align-content: start;
  overflow: auto;
  padding-right: 2px;
}

.nav-label {
  margin: 16px 4px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.nav-item, .icon-button, .primary-action, .danger-action, .quick-filter, .range-chip, .text-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--panel-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 820;
  cursor: pointer;
  white-space: nowrap;
}

.nav-item {
  width: 100%;
  height: 42px;
  justify-content: flex-start;
  padding: 0 13px;
  color: var(--soft);
  border-color: transparent;
  background: transparent;
}

.nav-item:hover { background: rgba(255, 255, 255, .06); border-color: var(--line-soft); }
.nav-item.active { background: linear-gradient(90deg, rgba(255, 40, 80, .24), rgba(255, 255, 255, .04)); border-color: rgba(255, 40, 80, .28); color: #fff; }
.nav-item.active svg { color: var(--blue); }
.muted-nav { color: #b5c0cf; }

.profile-card {
  width: 100%;
  min-height: 58px;
  padding: 9px 10px;
  justify-content: flex-start;
  background: rgba(24, 24, 24, .86);
  text-align: left;
}

.profile-card span:nth-child(2), .admin-chip span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.profile-card strong, .admin-chip strong { font-size: 13px; }
.profile-card small, .admin-chip small { color: var(--muted); }
.profile-card svg { margin-left: auto; }

.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--red), #8b102c);
  color: #fff;
  font-weight: 900;
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 74px;
  padding: 13px 28px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 10, 10, .90);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.topbar-title p, .panel-head p {
  color: var(--muted);
  font-weight: 720;
}

.status-inline { color: var(--blue); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.popover-wrap {
  position: relative;
  display: inline-flex;
}

.popover-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(32, 32, 32, .98), rgba(12, 12, 12, .98));
  box-shadow: var(--shadow);
  padding: 12px;
}

.range-menu {
  display: grid;
  gap: 7px;
}

.range-menu > button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--soft);
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.range-menu > button:hover {
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, .06);
}

.range-custom {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 9px;
}

.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-soft);
}

.notification-list {
  display: grid;
  gap: 7px;
  max-height: 420px;
  overflow: auto;
  padding-top: 9px;
}

.notification-item {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(18, 18, 18, .78);
  color: var(--text);
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  text-align: left;
  cursor: pointer;
}

.notification-item.read {
  opacity: .62;
}

.notification-item.read .event-dot {
  background: var(--line-strong) !important;
}

.notification-item.unread {
  border-color: rgba(239, 23, 79, .34);
  background: rgba(255, 40, 80, .10);
}

.notification-item em {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
}

.notification-item.unread em {
  border-color: rgba(239, 23, 79, .4);
  color: var(--red-soft);
  background: rgba(239, 23, 79, .1);
}

.notification-item:hover {
  border-color: var(--line-strong);
  background: rgba(42, 42, 42, .78);
}

.notification-item > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.notification-item small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.range-chip {
  height: 44px;
  padding: 0 14px;
  background: rgba(24, 24, 24, .92);
}

.icon-button {
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(24, 24, 24, .92);
}

.icon-button:hover, .range-chip:hover, .quick-filter:hover {
  border-color: var(--line-strong);
  background: var(--panel-3);
}

.icon-button.compact {
  width: auto;
  min-width: 34px;
  height: 30px;
  padding: 0 9px;
}

.notify { position: relative; }
.notify span {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 900;
}

.notify span.hidden {
  display: none;
}

.admin-chip {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.content {
  min-width: 0;
  padding: 28px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.view { display: none; gap: 16px; min-width: 0; align-content: start; }
.view.active { display: grid; }

.panel {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(28, 28, 28, .96), rgba(15, 15, 15, .96)),
    var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 14px;
}

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

.pager {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-weight: 820;
}

.pager select {
  width: 112px;
}

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

.metric-card {
  min-height: 172px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(28, 28, 28, .98), rgba(15, 15, 15, .98)),
    var(--panel);
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto 42px;
  gap: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.metric-card span {
  color: var(--soft);
  font-weight: 760;
}

.metric-card strong {
  display: block;
  margin-top: 7px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 760;
}

.metric-trend {
  width: fit-content;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(148, 163, 184, .08);
  color: var(--muted);
  font-weight: 850;
  font-size: 12px;
}

.metric-trend.up { color: var(--green); background: rgba(25, 201, 137, .1); }
.metric-trend.down { color: var(--red-soft); background: rgba(239, 23, 79, .1); }
.sparkline svg { width: 100%; height: 42px; display: block; }
.accent-blue { border-top: 2px solid rgba(255, 40, 80, .75); }
.accent-green { border-top: 2px solid rgba(25, 201, 137, .75); }
.accent-red { border-top: 2px solid rgba(239, 23, 79, .75); }
.accent-violet { border-top: 2px solid rgba(255, 255, 255, .46); }
.accent-amber { border-top: 2px solid rgba(245, 158, 11, .75); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .75fr);
  gap: 16px;
  align-items: stretch;
}

.dashboard-grid > section:last-child { grid-column: 1 / -1; }
.span-2 { grid-column: span 2; }
.chart-panel { min-height: 308px; }

.line-chart {
  width: 100%;
  height: 260px;
  overflow: visible;
}

.line-grid { stroke: rgba(148, 163, 184, .14); stroke-width: 1; }
.line-axis {
  fill: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  font-stretch: normal;
}
.line-area { opacity: .24; }
.line-path { fill: none; stroke-width: 3; }

.donut-wrap {
  min-height: 210px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.donut-chart {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 72%, var(--red) 72% 88%, #ffffff 88% 96%, var(--amber) 96% 100%);
  position: relative;
  box-shadow: inset 0 0 32px rgba(0, 0, 0, .25);
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 42px;
  border-radius: 50%;
  background: #151515;
  border: 1px solid var(--line-soft);
}

.legend-list, .rank-list, .timeline {
  display: grid;
  gap: 10px;
}

.legend-item, .rank-row, .timeline-row {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

.legend-main, .rank-main, .timeline-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-item > span {
  white-space: nowrap;
}

.legend-dot, .event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.legend-item span, .rank-row span, .timeline-meta {
  color: var(--muted);
  font-weight: 760;
}

.rank-row {
  min-height: 36px;
  border-bottom: 1px solid var(--line-soft);
}

.rank-row:last-child { border-bottom: 0; }

.rank-number {
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  color: var(--soft);
  font-weight: 900;
}

.session-grid {
  display: grid;
  gap: 9px;
}

.session-item {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(18, 18, 18, .74);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.session-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.session-users, .badge-row, .quick-row, .table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.active-user, .user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
}

.active-user {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--field);
  min-height: 28px;
  padding: 2px 9px 2px 3px;
}

.avatar {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-2);
}

.active-user .avatar { width: 23px; height: 23px; }

.compact-list .timeline-row {
  min-height: 48px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line-soft);
}

.compact-list .timeline-row:last-child { border-bottom: 0; padding-bottom: 0; }

.table-panel { padding-bottom: 0; }

.table-actions {
  color: var(--muted);
  font-weight: 820;
}

.active-filter-row {
  min-height: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.filter-chip {
  min-height: 28px;
  border: 1px solid rgba(255, 40, 80, .28);
  border-radius: 999px;
  background: rgba(255, 40, 80, .08);
  color: var(--soft);
  padding: 3px 9px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-weight: 820;
}

.filter-chip strong {
  color: var(--blue);
  font-size: 11px;
  text-transform: uppercase;
}

.filter-empty {
  color: var(--muted);
  font-weight: 800;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(25, 201, 137, .1);
}

.count-pill, .pill, .role, .result-chip {
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--soft);
  background: var(--panel-2);
  font-weight: 820;
  width: fit-content;
}

.role {
  text-transform: uppercase;
  font-size: 11px;
}

.role.admin { border-color: rgba(239, 23, 79, .55); color: #ffe4e6; background: rgba(239, 23, 79, .12); }
.role.banned { border-color: rgba(239, 23, 79, .7); color: #fecdd3; background: rgba(127, 29, 29, .32); }

.result-chip.success { border-color: rgba(25, 201, 137, .4); color: var(--green); background: rgba(25, 201, 137, .08); }
.result-chip.failure, .result-chip.error { border-color: rgba(239, 23, 79, .5); color: var(--red-soft); background: rgba(239, 23, 79, .08); }
.result-chip.warning { border-color: rgba(245, 158, 11, .45); color: var(--amber); background: rgba(245, 158, 11, .08); }
.result-chip.info { border-color: rgba(255, 40, 80, .42); color: var(--blue); background: rgba(255, 40, 80, .08); }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.compact-filters {
  grid-template-columns: repeat(6, minmax(128px, 1fr));
}

.advanced-filters {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(18, 18, 18, .54);
  padding: 10px;
}

.advanced-filters summary {
  color: var(--soft);
  cursor: pointer;
  font-weight: 860;
  list-style-position: inside;
}

.advanced-filters[open] summary {
  margin-bottom: 10px;
}

.inline-grid {
  display: grid;
  gap: 10px;
}

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

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

.build-layout {
  display: grid;
  grid-template-columns: minmax(340px, .7fr) minmax(0, 1.3fr);
  gap: 16px;
  align-items: start;
}

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

.mapping-panel {
  min-width: 0;
}

.mapping-grid {
  display: grid;
  gap: 12px;
}

.mapping-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)),
    rgba(18, 18, 18, .74);
  overflow: hidden;
}

.mapping-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .025);
}

.mapping-product-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
}

.mapping-photo-preview {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 40, 80, .28);
  border-radius: 8px;
  background: rgba(16, 6, 10, .86);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.mapping-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mapping-photo-preview span {
  color: var(--red-soft);
  font-size: 13px;
  font-weight: 900;
}

.mapping-photo-preview.empty {
  background:
    linear-gradient(135deg, rgba(255, 40, 80, .13), rgba(255, 255, 255, .03)),
    rgba(16, 6, 10, .86);
}

.mapping-product-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mapping-product-title strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapping-product-title span,
.mapping-product-title em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapping-product-title span {
  color: var(--red-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.mapping-product-controls {
  display: grid;
  grid-template-columns: 150px 144px 76px 82px;
  gap: 8px;
  align-items: center;
}

.mapping-product-controls .primary-action,
.mapping-product-controls .danger-action {
  min-height: 32px;
  padding: 0 12px;
}

.mapping-image-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .32fr);
  gap: 10px;
  padding: 12px 14px 0;
}

.mapping-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 10px;
  padding: 12px;
}

.mapping-channel {
  min-width: 0;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(11, 11, 11, .64);
  padding: 11px;
}

.mapping-channel.enabled {
  border-color: rgba(25, 201, 137, .28);
  background:
    linear-gradient(180deg, rgba(25, 201, 137, .055), rgba(255, 255, 255, .012)),
    rgba(11, 11, 11, .68);
}

.mapping-channel.disabled {
  opacity: .78;
}

.mapping-channel-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mapping-channel-head strong {
  color: var(--soft);
  font-size: 13px;
}

.mapping-access {
  min-height: 22px;
  max-width: 112px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapping-channel.enabled .mapping-access {
  border-color: rgba(25, 201, 137, .28);
  color: var(--green);
  background: rgba(25, 201, 137, .08);
}

.mapping-control-row {
  display: grid;
  grid-template-columns: minmax(104px, .8fr) minmax(104px, .8fr) minmax(108px, 1fr);
  gap: 8px;
  align-items: center;
}

.mapping-select {
  height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  background-color: rgba(10, 10, 10, .88);
}

.mapping-field {
  gap: 5px;
}

.mapping-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.mapping-field input {
  height: 32px;
  padding: 0 9px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.mapping-image-field input {
  width: 100%;
}

.switch-row {
  height: 32px;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-row span {
  width: 34px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  position: relative;
  transition: background .16s ease, border-color .16s ease;
}

.switch-row span::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .16s ease, background .16s ease;
}

.switch-row input:checked + span {
  border-color: rgba(25, 201, 137, .55);
  background: rgba(25, 201, 137, .18);
}

.switch-row input:checked + span::after {
  transform: translateX(14px);
  background: var(--green);
}

.switch-row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.cloud-console {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(255, 40, 80, .12), transparent 38%),
    rgba(12, 12, 12, .82);
  padding: 14px;
  display: grid;
  gap: 14px;
}

.cloud-command {
  min-height: 176px;
  border: 1px solid rgba(255, 40, 80, .24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 40, 80, .14), rgba(255, 255, 255, .035)),
    rgba(18, 18, 18, .88);
  padding: 18px;
  display: grid;
  gap: 10px;
  align-content: center;
}

.cloud-command strong {
  font-size: 22px;
  line-height: 1.15;
}

.cloud-command p {
  max-width: 720px;
  color: var(--muted);
  font-weight: 760;
}

.cloud-status {
  width: fit-content;
  min-height: 25px;
  border: 1px solid rgba(255, 40, 80, .35);
  border-radius: 999px;
  background: rgba(255, 40, 80, .10);
  color: var(--red-soft);
  padding: 3px 9px;
  font-weight: 900;
}

.cloud-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

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

.cloud-grid article {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(255, 40, 80, .08), transparent 34%),
    rgba(18, 18, 18, .72);
  padding: 13px;
  display: grid;
  gap: 8px;
  min-height: 128px;
}

.cloud-grid span {
  color: var(--muted);
  font-weight: 760;
}

.cloud-grid em {
  color: var(--red-soft);
  font-style: normal;
  font-weight: 850;
}

.upload-panel, .inspector { position: sticky; top: 96px; }

.table-wrap {
  max-height: 640px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--field);
}

.dashboard-table { max-height: 520px; border-radius: 7px 7px 0 0; border-bottom: 0; }
.table-wrap.versions { max-height: 730px; }

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

.logs-table table { min-width: 1120px; }
.users-table table { min-width: 980px; }

th, td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #181818;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

tbody tr { background: rgba(24, 24, 24, .62); }
tbody tr:nth-child(even) { background: rgba(15, 15, 15, .7); }
tr[data-row], tr[data-user-row], tr[data-build] { cursor: pointer; }
tr[data-row]:hover td, tr[data-user-row]:hover td, tr[data-build]:hover td { background: rgba(42, 42, 42, .8); }

.audit-row td {
  white-space: normal;
}

.audit-row.selected td {
  background: rgba(239, 23, 79, .08);
  box-shadow: inset 0 1px 0 rgba(239, 23, 79, .16), inset 0 -1px 0 rgba(239, 23, 79, .16);
}

.audit-time,
.audit-signal,
.audit-target,
.audit-network,
.local-source,
.audit-result {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.audit-time strong {
  font-size: 13px;
}

.audit-time span,
.audit-signal span,
.audit-target span,
.audit-network span,
.local-source span,
.audit-result strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.audit-signal {
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.audit-signal div,
.audit-target,
.audit-network,
.local-source,
.audit-result {
  min-width: 0;
}

.audit-signal strong,
.audit-signal span,
.audit-target strong,
.audit-target span,
.audit-network strong,
.audit-network span,
.local-source strong,
.local-source span,
.audit-result strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-source,
.audit-local-context {
  min-width: 160px;
  border-left: 2px solid rgba(215, 215, 215, .38);
  padding-left: 9px;
}

.local-source strong,
.audit-local-context strong {
  color: var(--soft);
}

.audit-actor-link {
  min-width: 190px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.audit-actor-link.disabled {
  pointer-events: none;
}

.audit-actor-link > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.audit-actor-link strong,
.audit-actor-link small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-avatar {
  width: 38px;
  height: 38px;
  border-color: rgba(255, 40, 80, .28);
}

.audit-row.suspicious td:first-child { border-left: 2px solid var(--amber); }
.audit-row.failed td:first-child { border-left: 2px solid var(--red); }
.audit-row.ok td:first-child { border-left: 2px solid var(--green); }
.audit-row.local-audit td:first-child { border-left-color: rgba(215, 215, 215, .72); }
.audit-row.local-audit.failed td:first-child { border-left-color: var(--red); }

.audit-result {
  align-items: start;
}

.user-row-card {
  min-width: 220px;
  display: grid;
  gap: 5px;
}

.user-list-card {
  min-width: 250px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.user-list-card.ok .user-list-avatar { border-color: rgba(25, 201, 137, .38); }
.user-list-card.warning .user-list-avatar { border-color: rgba(245, 158, 11, .46); }
.user-list-card.danger .user-list-avatar { border-color: rgba(239, 23, 79, .55); }

.user-list-avatar {
  width: 46px;
  height: 46px;
}

.user-list-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.user-list-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-name.small {
  font-size: 14px;
}

.user-row-subtitle {
  margin: 7px 0 0 56px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-card > span,
.access-stack span,
.device-state span,
.device-state em,
.last-signal span,
.risk-panel small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.access-stack,
.device-state,
.last-signal,
.risk-panel {
  min-width: 136px;
  display: grid;
  gap: 3px;
}

.strong-panel {
  border-left: 2px solid var(--green);
  padding-left: 9px;
}

.device-state {
  border-left: 2px solid var(--line-strong);
  padding-left: 9px;
}

.device-state.bound { border-left-color: var(--green); }
.device-state.open { border-left-color: var(--amber); }
.device-state em { font-style: normal; }

.risk-panel.watch {
  border-left: 2px solid var(--amber);
  padding-left: 9px;
}

.risk-panel.clear {
  border-left: 2px solid var(--green);
  padding-left: 9px;
}

.last-signal {
  min-width: 150px;
}

.risk-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(245, 158, 11, .42);
  border-radius: 999px;
  background: rgba(245, 158, 11, .08);
  color: var(--amber);
  padding: 2px 8px;
  font-weight: 900;
}

pre {
  margin: 0;
  max-height: 540px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--soft);
  background: var(--field);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 12px;
  font: 12px/1.48 ui-monospace, SFMono-Regular, Consolas, monospace;
}

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

.empty-detail {
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  place-items: center;
  color: var(--muted);
  font-weight: 820;
}

.audit-detail-head {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(18, 18, 18, .74);
  padding: 12px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.audit-detail-head.suspicious { border-color: rgba(245, 158, 11, .32); }
.audit-detail-head.failed { border-color: rgba(239, 23, 79, .32); }
.audit-detail-head.ok { border-color: rgba(25, 201, 137, .24); }
.audit-detail-head.local-audit {
  background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(18, 18, 18, .82));
  border-color: rgba(215, 215, 215, .22);
}

.audit-detail-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.audit-detail-head strong,
.audit-detail-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-detail-head div span {
  color: var(--muted);
  font-weight: 780;
}

.audit-profile-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top left, rgba(255, 40, 80, .12), transparent 38%),
    rgba(18, 18, 18, .72);
  padding: 12px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
}

.audit-profile-card > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.audit-profile-card span,
.audit-profile-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.audit-profile-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-large.compact {
  width: 54px;
  height: 54px;
}

.compact-link {
  min-height: 32px;
  padding: 0 11px;
  text-decoration: none;
  white-space: nowrap;
}

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

.local-audit-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(18, 18, 18, .76);
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
}

.local-audit-card > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.local-audit-card span,
.local-audit-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.local-audit-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-audit-badge {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  padding: 5px 9px;
  white-space: nowrap;
}

.local-audit-card .local-audit-badge {
  color: var(--soft);
}

.audit-detail-grid > div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(24, 24, 24, .68);
  padding: 10px;
  display: grid;
  gap: 3px;
}

.audit-local-grid > div {
  background: rgba(15, 15, 15, .76);
}

.audit-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.audit-detail-grid strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-detail-grid em {
  color: var(--muted);
  font-style: normal;
}

.json-block {
  max-height: 300px;
}

.hwid-action-card {
  border: 1px solid rgba(255, 40, 80, .30);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(255, 40, 80, .14), transparent 34%),
    rgba(18, 18, 18, .82);
  padding: 12px;
  display: grid;
  gap: 11px;
}

.hwid-action-card > div {
  display: grid;
  gap: 3px;
}

.hwid-action-card span,
.hwid-action-card small {
  color: var(--muted);
  font-weight: 780;
}

.hwid-action-card code {
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.drawer { display: grid; gap: 13px; }

.user-profile-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(239, 23, 79, .16), transparent 38%),
    rgba(18, 18, 18, .74);
  padding: 14px;
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.user-profile-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--green);
}

.user-profile-card.warning::before { background: var(--amber); }
.user-profile-card.danger::before { background: var(--red); }

.user-profile-top {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.user-profile-hero {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.profile-orbit {
  width: 86px;
  height: 86px;
  border: 1px solid rgba(239, 23, 79, .25);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(239, 23, 79, .18), transparent 64%),
    rgba(24, 24, 24, .72);
}

.profile-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.profile-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.profile-large {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(239, 23, 79, .36);
  background: var(--panel-2);
}

.state-chip {
  border: 1px solid rgba(25, 201, 137, .38);
  border-radius: 999px;
  background: rgba(25, 201, 137, .08);
  color: var(--green);
  font-size: 11px;
  font-weight: 920;
  padding: 3px 8px;
}

.state-chip.warning {
  border-color: rgba(245, 158, 11, .42);
  background: rgba(245, 158, 11, .09);
  color: var(--amber);
}

.state-chip.danger {
  border-color: rgba(239, 23, 79, .45);
  background: rgba(239, 23, 79, .1);
  color: var(--red-soft);
}

.profile-name {
  display: inline-block;
  max-width: 100%;
  color: var(--text);
  font-size: 18px;
  font-weight: 920;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.user-meta-grid > div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(24, 24, 24, .68);
  padding: 10px;
  display: grid;
  gap: 3px;
}

.user-meta-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.user-meta-grid strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-status-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.user-status-board article {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(24, 24, 24, .68);
  padding: 11px;
  display: grid;
  gap: 4px;
}

.user-status-board span,
.user-device-board span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.user-status-board strong,
.user-status-board small,
.user-device-board strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-status-board small {
  color: var(--muted);
  font-weight: 760;
}

.user-device-board {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(18, 18, 18, .56);
  padding: 11px;
  display: grid;
  gap: 9px;
}

.user-device-board > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-open {
  text-decoration: none;
}

.detail-section {
  display: grid;
  gap: 9px;
}

.signal-list {
  display: grid;
  gap: 8px;
}

.signal-list article {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(18, 18, 18, .72);
  padding: 10px;
  display: grid;
  gap: 3px;
}

.signal-list article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.signal-list span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.device-grid,
.subscription-grid,
.event-stack {
  display: grid;
  gap: 9px;
}

.device-card {
  border: 1px solid rgba(245, 158, 11, .22);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, .12), transparent 36%),
    rgba(18, 18, 18, .86);
  padding: 12px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
}

.device-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, .28);
  background: rgba(245, 158, 11, .08);
  color: var(--amber);
}

.device-card-main,
.device-fields {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.device-title {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.device-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.device-fields span {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: var(--soft);
  font-weight: 780;
}

.device-fields b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.device-fields code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

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

.subscription-card {
  border: 1px solid rgba(25, 201, 137, .24);
  border-radius: 7px;
  background: rgba(25, 201, 137, .07);
  padding: 10px;
  display: grid;
  gap: 3px;
}

.subscription-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.event-card {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(18, 18, 18, .72);
  padding: 10px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.event-card.suspicious { border-color: rgba(245, 158, 11, .32); background: rgba(245, 158, 11, .06); }
.event-card.failed { border-color: rgba(239, 23, 79, .28); background: rgba(239, 23, 79, .06); }

.event-card div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.event-card strong,
.event-card span:not(.event-dot):not(.result-chip) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-card span:not(.event-dot):not(.result-chip),
.event-card time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.event-card time {
  grid-column: 2 / -1;
}

.kv {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px 10px;
}

.kv dt {
  color: var(--muted);
  font-weight: 850;
}

.kv dd {
  margin: 0;
  min-width: 0;
  word-break: break-word;
}

.hash {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--soft);
}

.subtle, .inline-status {
  color: var(--muted);
  font-weight: 800;
}

.event-stack { display: grid; gap: 8px; }

.success { color: var(--green); font-weight: 900; }
.failure, .error { color: var(--red-soft); font-weight: 900; }
.warning { color: var(--amber); font-weight: 900; }
.info { color: var(--blue); font-weight: 900; }

.empty-state {
  grid-column: 1 / -1;
  min-height: 76px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 820;
}

.dropzone {
  min-height: 106px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: var(--field);
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 14px;
  text-align: center;
  position: relative;
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  height: 100%;
  cursor: pointer;
}

.primary-action {
  min-height: 36px;
  padding: 0 13px;
  background: linear-gradient(135deg, var(--red), #a31236);
  border-color: rgba(255, 40, 80, .70);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(255, 40, 80, .16);
}

.primary-action.wide { width: 100%; }
.danger-action {
  min-height: 36px;
  padding: 0 13px;
  background: rgba(239, 23, 79, .16);
  border-color: rgba(239, 23, 79, .52);
  color: #ffd7df;
}
.danger-action:hover {
  background: rgba(255, 40, 80, .24);
  border-color: rgba(255, 40, 80, .74);
  color: #fff;
}
.quick-filter { min-height: 32px; padding: 0 11px; background: rgba(24, 24, 24, .92); }
.text-button {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
}
button:disabled { cursor: not-allowed; opacity: .5; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--soft);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.hidden { display: none !important; }

@media (max-width: 1500px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .55fr); }
  .span-2 { grid-column: span 1; }
}

@media (max-width: 1120px) {
  .console-frame { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    grid-template-rows: auto auto;
  }
  .profile-card { display: none; }
  .nav-stack { grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
  .nav-label { grid-column: 1 / -1; margin-top: 10px; }
  .dashboard-grid, .investigation-grid, .build-layout, .settings-layout, .cloud-grid { grid-template-columns: 1fr; }
  .mapping-card-head { grid-template-columns: 1fr; align-items: stretch; }
  .mapping-product-controls { grid-template-columns: minmax(150px, 1fr) minmax(144px, 1fr) 88px 88px; }
  .upload-panel, .inspector { position: static; }
  .filter-grid { grid-template-columns: repeat(3, minmax(132px, 1fr)); }
}

@media (max-width: 780px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .range-chip { flex: 1 1 100%; }
  .popover-wrap { width: 100%; }
  .popover-panel { width: min(100vw - 28px, 360px); right: auto; left: 0; }
  .content { padding: 14px; }
  .metric-grid, .inline-grid.three, .filter-grid, .compact-filters, .nav-stack, .subscription-grid, .device-fields, .audit-detail-grid, .user-status-board, .audit-profile-card, .cloud-grid { grid-template-columns: 1fr; }
  .mapping-channels, .mapping-product-controls, .mapping-control-row, .mapping-image-row { grid-template-columns: 1fr; }
  .mapping-channel-head { align-items: flex-start; flex-direction: column; }
  .mapping-access { max-width: 100%; }
  .user-profile-hero { grid-template-columns: 1fr; justify-items: start; }
  .sidebar { padding: 14px; }
  .admin-chip { display: none; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .panel-head { flex-direction: column; }
}
