@charset "UTF-8";
:root {
  --font-sans: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --accent: #10b981;
  --accent-hover: #0ea371;
  --accent-soft: rgba(16,185,129,.12);
  --bg: #fafbfc;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --border: #e6e8ec;
  --border-strong: #d7dbe2;
  --text: #0f1116;
  --text-muted:#6b7280;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-xs: 0 1px 0 rgba(15,17,22,.04);
  --shadow-sm: 0 1px 2px rgba(15,17,22,.06), 0 1px 1px rgba(15,17,22,.04);
  --shadow-md: 0 4px 12px rgba(15,17,22,.08);
  --sidebar-bg: #0f1116;
  --sidebar-fg: #cbd3df;
  --sidebar-fg-muted: #8791a1;
  --sidebar-active-bg: rgba(16,185,129,.14);
  --sidebar-active-fg: #eafff5;
}

:root[data-bs-theme=dark] {
  --bg: #0b0d10;
  --surface: #12151a;
  --surface-2: #171b21;
  --border: #232830;
  --border-strong: #2c333c;
  --text: #e8ecf4;
  --text-muted:#98a1b0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 6px 18px rgba(0,0,0,.5);
}

:root {
  --bs-primary: var(--accent);
  --bs-primary-rgb: 16,185,129;
  --bs-body-font-family: var(--font-sans);
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-border-radius: var(--radius);
  --bs-border-radius-sm: var(--radius-sm);
  --bs-border-radius-lg: var(--radius-lg);
}

.btn-primary {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent-hover);
  --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-active-bg: var(--accent-hover);
  --bs-btn-active-border-color: var(--accent-hover);
  --bs-btn-disabled-bg: var(--accent);
  --bs-btn-disabled-border-color: var(--accent);
}

.btn-outline-primary {
  --bs-btn-color: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent);
  --bs-btn-hover-border-color: var(--accent);
  --bs-btn-active-bg: var(--accent-hover);
  --bs-btn-active-border-color: var(--accent-hover);
  --bs-btn-disabled-color: var(--accent);
  --bs-btn-disabled-border-color: var(--accent);
}

:root {
  --bs-link-color: var(--text);
  --bs-link-hover-color: var(--accent);
  --bs-link-color-rgb: 15,17,22;
  --bs-link-hover-color-rgb: 16,185,129;
}

:root[data-bs-theme=dark] {
  --bs-link-color-rgb: 232,236,244;
}

.admin-table .btn, .panel-header .btn, .col-actions .btn, .row-actions .btn {
  --bs-btn-padding-y: .25rem;
  --bs-btn-padding-x: .5rem;
  --bs-btn-font-size: .8125rem;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  font-size: 14.5px;
}

.admin-main {
  margin-left: 248px;
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}

body.sidebar-collapsed .admin-main {
  margin-left: 64px;
}

.admin-content {
  padding: 20px 28px 48px;
  max-width: 1320px;
}

.content-narrow {
  max-width: 520px;
}

.content-form {
  max-width: 640px;
}

.content-wide {
  max-width: 760px;
}

.content-xwide {
  max-width: 880px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 6px 0 18px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.page-subtitle {
  color: var(--text-muted);
  margin: 4px 0 0;
  font-size: 13.5px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex: none;
}

.page-actions .btn {
  white-space: nowrap;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.005em;
}

.panel-body {
  padding: 16px;
}

.panel-aside {
  display: flex;
  gap: 8px;
}

.panel-selected {
  border-color: var(--accent);
}

.panel-note {
  padding: 12px 16px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
}

.panel-note:last-child {
  border-bottom: 0;
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.admin-breadcrumbs ol {
  list-style: none;
  display: flex;
  gap: 6px;
  padding: 0;
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.admin-breadcrumbs li:not(:first-child)::before {
  content: "/";
  margin-right: 6px;
  opacity: 0.5;
}

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

.admin-breadcrumbs a:hover {
  color: var(--accent);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

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

.stat-card--warn {
  border-color: rgba(245, 158, 11, 0.5);
}

.stat-card--warn .stat-value {
  color: #b45309;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.stat-icon {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 26px;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: -0.02em;
}

.detail-list {
  display: grid;
  grid-template-columns: fit-content(200px) 1fr;
  gap: 10px 18px;
  padding: 14px 16px;
  margin: 0;
  font-size: 13.5px;
}

.detail-list dt {
  color: var(--text-muted);
  font-weight: 500;
}

.detail-list dd {
  margin: 0;
}

.list-rows {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-rows li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  gap: 4px 12px;
}

.list-rows li:last-child {
  border-bottom: 0;
}

.list-rows li.is-unread {
  background: var(--surface-2);
}

.list-primary {
  font-weight: 500;
  font-size: 13.5px;
}

.list-secondary {
  color: var(--text-muted);
  font-size: 12.5px;
  grid-column: 1;
}

.list-meta {
  grid-row: 1/span 2;
  grid-column: 2;
  justify-self: end;
}

.entity-cards {
  display: grid;
  gap: 12px;
}

.entity-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 14px 16px;
  display: grid;
  gap: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.entity-card:hover,
.entity-card:has(:focus-visible) {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.entity-card:hover {
  transform: translateY(-1px);
}

.entity-card:hover .entity-card-name {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .entity-card:hover {
    transform: none;
  }
}
.entity-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.entity-card-head > :first-child {
  flex: 1;
  min-width: 200px;
}

.entity-card-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.005em;
}

.entity-card .row-actions,
.entity-card .entity-next .btn {
  position: relative;
  z-index: 2;
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-chip {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 9px;
}

.meta-chip b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.meta-chip.is-missing {
  border-style: dashed;
  border-color: var(--border-strong);
}

.entity-card-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entity-card-progress .progress {
  flex: 1;
  max-width: 260px;
  height: 5px;
}

.entity-next {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
}

.entity-next > :first-child {
  flex: 1;
  min-width: 220px;
}

.entity-next-label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.entity-card-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.entity-card-note .bi {
  margin-right: 4px;
}

.stepper {
  list-style: none;
  margin: 0;
  padding: 14px 16px;
  display: flex;
  gap: 8px;
}

.stepper-step {
  flex: 1;
  min-width: 0;
  text-align: center;
  position: relative;
}

.stepper-knob {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: 0 auto 7px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  color: var(--text-muted);
  border: 1.5px solid var(--border-strong);
}

.stepper-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}

.stepper-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stepper-step.is-pending .stepper-label {
  color: var(--text-muted);
  font-weight: 500;
}

.stepper-step.is-done .stepper-knob {
  background: var(--accent);
  border-color: var(--accent);
  color: #02150d;
}

.stepper-step.is-current .stepper-knob {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.stepper-step.is-current .stepper-hint {
  color: var(--accent);
  font-weight: 600;
}

.stepper-step::before, .stepper-step::after {
  content: "";
  position: absolute;
  top: 13px;
  height: 1.5px;
  background: var(--border-strong);
  z-index: 1;
}

.stepper-step::before {
  left: 0;
  width: calc(50% - 17px);
}

.stepper-step::after {
  right: 0;
  width: calc(50% - 17px);
}

.stepper-step:first-child::before, .stepper-step:last-child::after {
  display: none;
}

.stepper-step.is-done::before, .stepper-step.is-done::after,
.stepper-step.is-current::before {
  background: var(--accent);
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px 18px;
  font-size: 13px;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist .bi {
  font-size: 13px;
}

.checklist li.is-done {
  color: var(--text-muted);
}

.checklist li.is-done .bi {
  color: var(--accent);
}

.checklist li.is-missing {
  font-weight: 500;
}

.checklist li.is-missing .bi {
  color: var(--border-strong);
}

.stat-note {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

.empty-state {
  display: grid;
  place-items: center;
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--text);
  font-size: 16px;
  margin: 10px 0 4px;
}

.empty-state .empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--text-muted);
}

.empty-state.compact {
  padding: 22px 16px;
}

.empty-state.compact .empty-icon {
  width: 34px;
  height: 34px;
  font-size: 15px;
}

.empty-state.compact h3 {
  font-size: 14px;
  margin: 8px 0 2px;
}

.empty-state.compact p {
  font-size: 12.5px;
  margin: 0;
}

.auth-body {
  background: var(--bg);
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth-card {
  padding: 56px;
  max-width: 460px;
  margin: auto;
  width: 100%;
}

.auth-card h1 {
  font-size: 26px;
  margin: 24px 0 4px;
  letter-spacing: -0.01em;
}

.auth-card .auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.auth-card .auth-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
}

.auth-form label {
  display: block;
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 500;
}

.auth-form .btn {
  display: block;
  width: 100%;
  margin-top: 20px;
}

.auth-form .check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 400;
  color: var(--text-muted);
}

.auth-foot {
  text-align: center;
  font-size: 12px;
  margin-top: 16px;
}

.auth-aside {
  background: var(--surface-2);
  display: grid;
  place-items: center;
  padding: 56px;
  background-image: radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.14), transparent 60%);
}

.auth-aside blockquote {
  font-size: 22px;
  line-height: 1.35;
  max-width: 460px;
  letter-spacing: -0.01em;
}

.auth-aside cite {
  display: block;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13px;
  font-style: normal;
}

@media (max-width: 900px) {
  .admin-main {
    margin-left: 0;
  }
  .stat-grid, .stat-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-aside {
    display: none;
  }
}
.dash {
  container-type: inline-size;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 52px;
  gap: 12px;
  margin-bottom: 18px;
}

.dash-tile {
  grid-column: calc(var(--x) + 1)/span var(--w);
  grid-row: calc(var(--y) + 1)/span var(--h);
  min-width: 0;
  position: relative;
}

.dash-tile > .stat-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@container (max-width: 1080px) {
  .dash-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .dash-tile {
    grid-column: calc(var(--x6) + 1)/span var(--w6);
    grid-row: calc(var(--y6) + 1)/span var(--h6);
  }
}
@container (max-width: 560px) {
  .dash-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .dash-tile {
    grid-column: 1/-1;
    grid-row: auto;
  }
  .dash-tile > .stat-card--list {
    max-height: 320px;
  }
}
.dash-tile > .stat-card--list {
  padding: 0;
  align-items: stretch;
}

.stat-list-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.stat-list-head b {
  color: var(--text);
  font-weight: 600;
}

.stat-list-head .dash-limit {
  width: auto;
  flex: none;
  text-transform: none;
  letter-spacing: 0;
}

.stat-list-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.stat-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

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

.stat-list-row .t {
  font-weight: 500;
  min-width: 0;
}

.stat-list-row .m {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stat-list-row .w {
  grid-column: 1/-1;
  color: var(--text-muted);
  font-size: 12px;
}

.stat-list-empty, .stat-list-note {
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 13px;
}

.dash-editbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.dash-editbar-note {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12.5px;
}

.dash-grid--edit .dash-tile {
  cursor: move;
  user-select: none;
  touch-action: none;
}

.dash-grid--edit .stat-card {
  outline: 1px dashed rgba(47, 111, 237, 0.55);
  outline-offset: -1px;
  pointer-events: none;
}

.dash-grid--edit .dash-remove,
.dash-grid--edit .dash-grip,
.dash-grid--edit .dash-limit {
  pointer-events: auto;
}

.dash-tile--dragging {
  z-index: 6;
}

.dash-tile--dragging > .stat-card {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.dash-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 20px;
  height: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.dash-remove:hover {
  color: var(--text);
}

.dash-grip {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 3;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, var(--text-muted) 50%, var(--text-muted) 60%, transparent 60%, transparent 72%, var(--text-muted) 72%, var(--text-muted) 82%, transparent 82%);
  opacity: 0.55;
}

.dash-tray {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.dash-tray-title {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 9px;
}

.dash-tray-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px 6px 9px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
}

.dash-chip-size {
  color: var(--text-muted);
  font-size: 11.5px;
}

.dash-chip-add {
  width: 20px;
  height: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
}

.stat-value--build {
  font-size: 20px;
  letter-spacing: 0;
}

.stat-build-sha {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.dash-hint {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 20px;
  height: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.dash-tile:hover .dash-hint,
.dash-hint:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .dash-hint {
    opacity: 0.6;
  }
}
.dash-hint:hover {
  color: var(--text);
  background: var(--surface-muted, #f1f5f9);
}

.dash-hint-pop {
  max-width: 380px;
  margin: auto;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  line-height: 1.5;
}
.dash-hint-pop::backdrop {
  background: rgba(15, 23, 42, 0.28);
}
.dash-hint-pop p {
  margin: 0 0 8px;
}
.dash-hint-pop p:last-child {
  margin-bottom: 0;
}
.dash-hint-pop ul {
  margin: 0 0 8px;
  padding-left: 18px;
}

.dash-hint-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.dash-hint-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

:root {
  --an-s1: #1baf7a;
  --an-s2: #2a78d6;
  --an-s3: #eb6834;
  --an-s1-soft: rgba(27,175,122,.14);
  --an-o1: #4ec59d;
  --an-o2: #22a87e;
  --an-o3: #127f5e;
  --an-o4: #0a5c43;
  --an-heat-0: #f2f7f5;
  --an-heat-1: #d6efe4;
  --an-heat-2: #a9e0c9;
  --an-heat-3: #6fcaa9;
  --an-heat-4: #34b08a;
  --an-heat-5: #158f6b;
  --an-heat-6: #0b6d50;
  --an-grid: #eceef2;
}

[data-bs-theme=dark] {
  --an-s1: #199e70;
  --an-s2: #3987e5;
  --an-s3: #d95926;
  --an-s1-soft: rgba(25,158,112,.2);
  --an-o1: #0a5c43;
  --an-o2: #127f5e;
  --an-o3: #22a87e;
  --an-o4: #4ec59d;
  --an-heat-0: #171b21;
  --an-heat-1: #123528;
  --an-heat-2: #0f4a36;
  --an-heat-3: #116045;
  --an-heat-4: #177a58;
  --an-heat-5: #22a87e;
  --an-heat-6: #4ec59d;
  --an-grid: #232830;
}

.an-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}

.an-filters .f-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.an-filters label, .an-filters .f-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0;
}

.an-filters select, .an-filters input[type=date], .an-filters input[type=search] {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 13px;
  color: var(--text);
}

.an-spacer {
  flex: 1;
  min-width: 8px;
}

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

.an-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.an-dot.is-stale {
  background: #f59e0b;
}

.an-seg {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.an-seg a {
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
}

.an-seg a + a {
  border-left: 1px solid var(--border);
}

.an-seg a.is-on {
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 600;
}

[data-bs-theme=dark] .an-seg a.is-on {
  color: var(--an-s1);
}

.an-notices {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.an-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.45;
}

.an-note b {
  font-weight: 600;
}

.an-note-warn {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.an-note-info {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

[data-bs-theme=dark] .an-note-warn {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

[data-bs-theme=dark] .an-note-info {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

.an-metric .stat-value {
  font-size: 24px;
}

.an-delta {
  margin-top: 6px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.an-delta .up {
  color: var(--accent-hover);
}

.an-delta .down {
  color: #b91c1c;
}

[data-bs-theme=dark] .an-delta .up {
  color: var(--an-s1);
}

[data-bs-theme=dark] .an-delta .down {
  color: #f87171;
}

.an-hint {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 9.5px;
  display: inline-grid;
  place-items: center;
  cursor: help;
  flex: none;
  line-height: 1;
  background: transparent;
}

.an-hint:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chart {
  container: chart/inline-size;
}

.chart svg {
  width: 100%;
  height: auto;
  overflow: visible;
  display: block;
  --k: 1;
}

.chart-empty {
  padding: 28px 0;
  text-align: center;
}

.gridline {
  stroke: var(--an-grid);
  stroke-width: 1;
}

.axisline {
  stroke: var(--border-strong);
  stroke-width: 1;
}

.ax {
  font-size: calc(10.5px * var(--k));
  fill: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dlabel {
  font-size: calc(11px * var(--k));
  font-weight: 600;
  fill: var(--an-s1);
  font-variant-numeric: tabular-nums;
}

.chart .endpoint {
  r: calc(4px * var(--k));
}

.chart :is(path, line, circle) {
  vector-effect: non-scaling-stroke;
}

@container chart (min-width: 800px) {
  .chart svg {
    --k: calc(720 / 840);
  }
}
@container chart (min-width: 880px) {
  .chart svg {
    --k: calc(720 / 920);
  }
}
@container chart (min-width: 960px) {
  .chart svg {
    --k: calc(720 / 1000);
  }
}
@container chart (min-width: 1040px) {
  .chart svg {
    --k: calc(720 / 1080);
  }
}
@container chart (min-width: 1120px) {
  .chart svg {
    --k: calc(720 / 1160);
  }
}
@container chart (min-width: 1200px) {
  .chart svg {
    --k: calc(720 / 1240);
  }
}
@container chart (min-width: 1280px) {
  .chart svg {
    --k: calc(720 / 1320);
  }
}
@container chart (min-width: 1360px) {
  .chart svg {
    --k: calc(720 / 1400);
  }
}
@container chart (min-width: 1440px) {
  .chart svg {
    --k: calc(720 / 1480);
  }
}
@container chart (min-width: 1520px) {
  .chart svg {
    --k: calc(720 / 1560);
  }
}
@container chart (min-width: 1600px) {
  .chart svg {
    --k: calc(720 / 1640);
  }
}
@container chart (min-width: 1680px) {
  .chart svg {
    --k: calc(720 / 1720);
  }
}
@container chart (min-width: 1760px) {
  .chart svg {
    --k: calc(720 / 1800);
  }
}
@container chart (min-width: 1840px) {
  .chart svg {
    --k: calc(720 / 1880);
  }
}
@container chart (min-width: 1920px) {
  .chart svg {
    --k: calc(720 / 1960);
  }
}
@container chart (min-width: 2000px) {
  .chart svg {
    --k: calc(720 / 2040);
  }
}
@container chart (min-width: 2080px) {
  .chart svg {
    --k: calc(720 / 2120);
  }
}
@container chart (min-width: 2160px) {
  .chart svg {
    --k: calc(720 / 2200);
  }
}
@container chart (min-width: 2240px) {
  .chart svg {
    --k: calc(720 / 2280);
  }
}
@container chart (min-width: 2320px) {
  .chart svg {
    --k: calc(720 / 2360);
  }
}
@container chart (min-width: 2400px) {
  .chart svg {
    --k: calc(720 / 2440);
  }
}
@container chart (min-width: 2480px) {
  .chart svg {
    --k: calc(720 / 2520);
  }
}
@container chart (min-width: 2560px) {
  .chart svg {
    --k: calc(720 / 2600);
  }
}
.an-coverage-bar {
  display: flex;
  gap: 2px;
  height: 10px;
  margin-block: 4px 10px;
}

.an-coverage-bar span {
  display: block;
  min-width: 0;
}

.an-coverage-bar span:first-child {
  border-radius: 4px 0 0 4px;
}

.an-coverage-bar span:last-child {
  border-radius: 0 4px 4px 0;
}

.an-coverage-bar span:only-child {
  border-radius: 4px;
}

.an-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-muted);
}

.an-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 6px;
}

.funnel {
  display: grid;
  gap: 7px;
}

.f-row {
  display: grid;
  grid-template-columns: minmax(120px, 190px) 1fr auto;
  gap: 12px;
  align-items: center;
}

.f-name {
  font-size: 13px;
}

.f-bar {
  height: 26px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}

.f-fill {
  height: 100%;
  border-radius: 4px;
}

.f-num {
  min-width: 104px;
  text-align: right;
}

.f-val {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
}

.f-drop {
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.an-share {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 150px;
}

.an-share .f-bar {
  flex: 1;
  height: 10px;
  min-width: 60px;
}

.an-segments {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.an-segment-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.heat {
  display: grid;
  gap: 3px;
}

.heat-row {
  display: grid;
  grid-template-columns: 34px repeat(var(--heat-cols, 14), minmax(0, 1fr));
  gap: 3px;
  align-items: center;
}

.heat-lbl {
  color: var(--text-muted);
  font-size: 10.5px;
  text-align: right;
  padding-right: 2px;
}

.heat-hour {
  text-align: center;
}

.heat-c {
  aspect-ratio: 1;
  border-radius: 3px;
}

.heat-scale {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.heat-scale i {
  width: 20px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.an-export {
  display: flex;
  gap: 6px;
}

.an-up {
  color: var(--accent-hover);
  font-weight: 600;
}

.an-down {
  color: #b91c1c;
  font-weight: 600;
}

.an-pair {
  display: flex;
  gap: 26px;
  margin-bottom: 10px;
}

.an-pair > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.an-pair-num {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.an-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.an-grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.an-stack {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

@media (max-width: 1100px) {
  .an-grid-2, .an-grid-2-1 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .f-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .f-num {
    text-align: left;
    min-width: 0;
  }
}
.an-bb-filters {
  flex-wrap: wrap;
}

.an-bb-hint {
  flex-basis: 100%;
  font-size: 12.5px;
  color: #b45309;
}

.an-bb-context {
  font-size: 13px;
  color: var(--text-muted);
  margin: -4px 0 14px;
}

.an-bb-cost {
  font-size: 26px;
  margin: 2px 0 12px;
}

.an-bb-unit td:first-child {
  color: var(--text-muted);
}

.an-bb-locked {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  font-size: 13px;
  color: var(--text-muted);
}

.an-bb-locked i {
  margin-right: 6px;
}

.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 248px;
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: width 0.2s ease;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

body.sidebar-collapsed .admin-sidebar {
  width: 64px;
}

body.sidebar-collapsed .admin-sidebar .brand-name,
body.sidebar-collapsed .admin-sidebar .nav-section,
body.sidebar-collapsed .admin-sidebar .nav-link span,
body.sidebar-collapsed .admin-sidebar .nav-count,
body.sidebar-collapsed .admin-sidebar .user-meta,
body.sidebar-collapsed .user-chip button {
  display: none;
}

body.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding: 16px 0;
}

body.sidebar-collapsed .user-chip {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-collapse i {
  transform: rotate(180deg);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  position: relative;
}

.sidebar-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #02150d;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-title {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
  display: block;
}

.brand-sub {
  font-size: 11px;
  color: var(--sidebar-fg-muted);
}

.sidebar-collapse {
  position: absolute;
  top: 22px;
  right: -13px;
  z-index: 41;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar-collapse i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.admin-sidebar:hover .sidebar-collapse,
.sidebar-collapse:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.sidebar-collapse:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.sb-switcher {
  padding: 6px 12px 2px;
}

.sb-switcher > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--sidebar-fg);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sb-switcher > summary::-webkit-details-marker {
  display: none;
}

.sb-switcher > summary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
}

.sb-switcher > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.sb-switcher-name {
  flex: 1;
  min-width: 0;
}

.sb-switcher-name b {
  display: block;
  color: #fff;
  font-weight: 600;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-switcher-name span {
  font-size: 10.5px;
  color: var(--sidebar-fg-muted);
}

.sb-switcher-menu {
  margin-top: 4px;
  padding: 4px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.sb-switcher-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--sidebar-fg);
  text-decoration: none;
}

.sb-switcher-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-switcher-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sb-switcher-item.is-current {
  color: var(--sidebar-active-fg);
}

.sb-switcher-all {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 4px;
  padding-top: 9px;
  color: var(--sidebar-fg-muted);
}

body.sidebar-collapsed .sb-switcher {
  display: none;
}

.nav-link.is-locked {
  color: #5c6675;
  cursor: default;
}

.nav-link.is-locked:hover {
  background: transparent;
  color: #5c6675;
}

.nav-lock {
  margin-left: auto;
  font-size: 12px;
}

body.sidebar-collapsed .nav-lock {
  display: none;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.nav-section {
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--sidebar-fg-muted);
  padding: 14px 10px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: var(--sidebar-fg);
  border-radius: 8px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}

.nav-link i {
  width: 16px;
  font-size: 15px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-fg);
}

.nav-count {
  margin-left: auto;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-fg-muted);
  padding: 1px 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
}

.nav-link.active .nav-count {
  background: rgba(16, 185, 129, 0.25);
  color: #eafff5;
}

.nav-sub {
  display: grid;
  gap: 1px;
  margin: 2px 0 6px 20px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-sublink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  color: var(--sidebar-fg-muted);
  border-radius: 7px;
  text-decoration: none;
  font-size: 12.5px;
}

.nav-sublink:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-sublink.active {
  color: var(--sidebar-active-fg);
  background: var(--sidebar-active-bg);
  font-weight: 600;
}

.nav-sublink.is-locked {
  color: #5c6675;
  cursor: default;
}

.nav-sublink.is-locked:hover {
  background: transparent;
  color: #5c6675;
}

.nav-chevron {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.55;
  width: auto;
}

body.sidebar-collapsed .nav-sub, body.sidebar-collapsed .nav-chevron {
  display: none;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip .avatar {
  width: 32px;
  height: 32px;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.user-role {
  font-size: 11px;
  color: var(--sidebar-fg-muted);
}

.user-chip button {
  margin-left: auto;
  color: var(--sidebar-fg-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.user-chip button:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #065f46);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.avatar.sm {
  width: 26px;
  height: 26px;
  font-size: 10.5px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-search {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.topbar-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  min-width: 0;
  cursor: pointer;
}

.topbar-input::placeholder {
  color: var(--text-muted);
}

.topbar-search kbd {
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
}

.btn-icon:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn-icon.danger:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.impersonation-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  background: #fefce8;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 13.5px;
  font-weight: 500;
}
.impersonation-banner i {
  color: #d97706;
}
.impersonation-banner form {
  margin: 0;
}
.impersonation-banner .btn {
  padding: 2px 12px;
  font-size: 12.5px;
  line-height: 1.6;
}

.notif-count {
  position: absolute;
  top: 0;
  left: 100%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  min-width: 18px;
  padding: 1px 5px;
  font-size: 10.5px;
}

/* «Кто сейчас в системе»: стек аватарок в топбаре суперадминки и точка
   присутствия в списке внутренних пользователей. */
.presence-stack {
  display: flex;
  padding-right: 6px;
}

.presence-stack .avatar {
  margin-left: -6px;
  border: 2px solid var(--surface);
}

.presence-stack .avatar:first-child {
  margin-left: 0;
}

.presence-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.admin-table thead th {
  background: var(--surface-2);
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.admin-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:hover {
  background: var(--surface-2);
}

.admin-table.compact tbody td {
  padding: 8px 14px;
}

.admin-table .nowrap {
  white-space: nowrap;
}

.admin-table tfoot th, .admin-table tfoot td {
  padding: 12px 14px;
  vertical-align: middle;
  font-weight: 600;
  text-align: left;
  border-top: 1px solid var(--border);
}

.admin-table.compact tfoot th, .admin-table.compact tfoot td {
  padding: 8px 14px;
}

.admin-table .col-actions {
  width: 80px;
  text-align: right;
}

.col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}

.admin-table thead th a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-table thead th a.asc::after {
  content: "↑";
  font-size: 10px;
}

.admin-table thead th a.desc::after {
  content: "↓";
  font-size: 10px;
}

.cell-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell-primary {
  display: block;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.cell-primary:hover {
  color: var(--accent);
}

.cell-secondary {
  font-size: 11.5px;
  color: var(--text-muted);
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.row-actions:has(> .btn-icon) {
  gap: 2px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.badge-active, .badge-paid, .badge-published, .badge-delivered {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.badge-invited, .badge-pending, .badge-draft {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.badge-suspended, .badge-cancelled, .badge-archived, .badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.badge-shipped, .badge-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.badge-refunded {
  background: rgba(100, 116, 139, 0.18);
  color: #475569;
}

[data-bs-theme=dark] .badge {
  filter: brightness(1.6);
}

.card > .table,
.card > .table-responsive > .table {
  border-collapse: separate;
  border-spacing: 0;
}

.card > .table:first-child > :first-child > tr:first-child > th:first-child, .card > .table:first-child > :first-child > tr:first-child > td:first-child,
.card > .table-responsive:first-child > .table > :first-child > tr:first-child > th:first-child,
.card > .table-responsive:first-child > .table > :first-child > tr:first-child > td:first-child {
  border-top-left-radius: calc(var(--radius) - 1px);
}
.card > .table:first-child > :first-child > tr:first-child > th:last-child, .card > .table:first-child > :first-child > tr:first-child > td:last-child,
.card > .table-responsive:first-child > .table > :first-child > tr:first-child > th:last-child,
.card > .table-responsive:first-child > .table > :first-child > tr:first-child > td:last-child {
  border-top-right-radius: calc(var(--radius) - 1px);
}

.card > .table:last-child > :last-child > tr:last-child > th:first-child, .card > .table:last-child > :last-child > tr:last-child > td:first-child,
.card > .table-responsive:last-child > .table > :last-child > tr:last-child > th:first-child,
.card > .table-responsive:last-child > .table > :last-child > tr:last-child > td:first-child {
  border-bottom-left-radius: calc(var(--radius) - 1px);
}
.card > .table:last-child > :last-child > tr:last-child > th:last-child, .card > .table:last-child > :last-child > tr:last-child > td:last-child,
.card > .table-responsive:last-child > .table > :last-child > tr:last-child > th:last-child,
.card > .table-responsive:last-child > .table > :last-child > tr:last-child > td:last-child {
  border-bottom-right-radius: calc(var(--radius) - 1px);
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  font-size: 13.5px;
}

.notice-rail {
  width: 3px;
  border-radius: 2px;
  background: var(--border-strong);
  flex: none;
  align-self: stretch;
}

.notice-body {
  flex: 1;
  min-width: 0;
}

.notice-title {
  display: block;
  margin-bottom: 2px;
}

.notice-aside {
  flex: none;
  align-self: flex-start;
}

.notice ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.notice ul li + li {
  margin-top: 2px;
}

.notice-warning .notice-rail {
  background: #f59e0b;
}

.notice-danger .notice-rail {
  background: #ef4444;
}

.notice-info .notice-rail {
  background: var(--accent);
}

.day-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.day-bar {
  display: block;
  height: 6px;
  border-radius: 3px;
  min-width: 1px;
}

.day-bar--handed {
  background: var(--accent);
  opacity: 0.35;
}

.day-bar--redeemed {
  background: var(--accent);
}

@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.form-section {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.form-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.form-section[hidden] {
  display: none;
}

.form-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}

.form-section-note {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 12px;
  max-width: 68ch;
}

.form-label-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.field-required {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-hover);
  background: var(--accent-soft);
  padding: 1px 7px;
  border-radius: var(--radius-sm);
}

.field-required[hidden] {
  display: none;
}

.kind-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.kind-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.kind-tile:hover {
  border-color: var(--border-strong);
}

.kind-tile-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kind-tile-name {
  font-size: 14px;
  font-weight: 600;
}

.kind-tile-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.kind-tile:has(.kind-tile-input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.kind-tile:has(.kind-tile-input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.outlet-picker {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.outlet-picker-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.outlet-picker-bar .form-control {
  flex: 1 1 200px;
  width: auto;
}

.outlet-picker-count {
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.outlet-picker-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 6px 12px;
}

.outlet-picker-row[hidden] {
  display: none;
}

.outlet-picker-empty {
  font-size: 12.5px;
  margin: 8px 0;
}

.form-section-service {
  border-top: 1px solid var(--border);
}

.form-actions-sticky {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 -1.5rem -1.5rem;
  padding: 14px 1.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.form-actions-note {
  font-size: 12.5px;
  color: var(--text-muted);
}

.form-error-link {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-error-link:hover {
  text-decoration-thickness: 2px;
}

.form-error-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 2px;
}

.prize-preview {
  max-width: 360px;
}

.prize-preview-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.cmdk-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 17, 22, 0.55);
  display: grid;
  place-items: start center;
  padding-top: 14vh;
  animation: fadein 0.15s ease;
}

.cmdk {
  width: min(640px, 100vw - 24px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.cmdk-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.cmdk-input input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.cmdk-input kbd {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.cmdk-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}

.cmdk-group-title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 10px 4px;
}

.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
}

.cmdk-item:hover, .cmdk-item:focus {
  background: var(--surface-2);
  outline: none;
}

.cmdk-item > span:first-of-type {
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmdk-meta {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 12px;
}

.cmdk-badge {
  flex: 0 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.cmdk-more {
  color: var(--text-muted);
  font-size: 12.5px;
}

.cmdk-empty {
  padding: 12px 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.flash-toast {
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 13.5px;
  animation: flash-slidein 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.flash-toast.leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition: 0.2s;
}

.flash-toast i {
  font-size: 16px;
}

.flash-notice i {
  color: var(--accent);
}

.flash-alert i {
  color: #ef4444;
}

.flash-close {
  margin-left: auto;
  background: none;
  border: none;
  padding: 0 0 0 6px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.flash-close:hover {
  color: var(--text);
}

.admin-body .flash-toast {
  top: 68px;
}

@keyframes flash-slidein {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes quest-row-new {
  0% {
    background-color: rgba(25, 135, 84, 0.35);
    transform: translateY(-6px);
  }
  100% {
    background-color: transparent;
    transform: translateY(0);
  }
}
.quest-row-new > td {
  animation: quest-row-new 1.6s ease-out;
}

.mod-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.mod-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.mod-filter .n {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  opacity: 0.7;
}
.mod-filter:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.mod-filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.mod-filter.is-active .n {
  opacity: 0.9;
}

.mod-split {
  display: grid;
  grid-template-columns: minmax(300px, 360px) 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .mod-split {
    grid-template-columns: 1fr;
  }
}
.mod-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden auto;
  max-height: calc(100vh - 220px);
}

.mod-empty {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

.mod-item {
  position: relative;
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.mod-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}
.mod-item:hover {
  background: var(--surface-2);
}
.mod-item.is-active {
  background: var(--surface-2);
}
.mod-item.is-active::before {
  background: var(--accent);
}
.mod-item .top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.mod-item .age {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.mod-item .sum {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mod-org {
  position: relative;
  z-index: 2;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mod-org .bi {
  font-size: 11px;
  opacity: 0.5;
}
.mod-org:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mod-org:hover .bi {
  opacity: 1;
}

.mod-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.mod-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 6px;
  white-space: nowrap;
  background: color-mix(in srgb, var(--ch, #64748b) 14%, transparent);
  color: color-mix(in srgb, var(--ch, #64748b) 72%, var(--text));
}
.mod-chip .bi {
  font-size: 12px;
}

[data-channel=profile] {
  --ch:#14a0a0;
}

[data-channel=change_request] {
  --ch:#2b8fd6;
}

[data-channel=partner_inn] {
  --ch:#8b5cd6;
}

[data-channel=quest_card] {
  --ch:#4b57c4;
}

[data-channel=boss] {
  --ch:#e0663c;
}

[data-channel=unique_slot_week] {
  --ch:#d4a12a;
}

[data-channel=billboard] {
  --ch:#2ea36b;
}

[data-channel=ad_material] {
  --ch:#d05a9e;
}

.mod-fdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ch, #94a3b8);
  display: inline-block;
  flex: none;
}

.mod-review {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 16px;
  overflow: hidden;
}

.mod-rv-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.mod-rv-head .who {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.mod-rv-head .meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.mod-rv-head .meta code {
  font-family: var(--font-mono);
  font-size: 12px;
}

.mod-rv-head .age {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.mod-rv-body {
  padding: 18px 20px;
}

.mod-dl {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 9px 16px;
  margin: 0;
}

.mod-dl dt {
  color: var(--text-muted);
  font-size: 12.5px;
}

.mod-dl dd {
  margin: 0;
  font-size: 13px;
}

.mod-dl code {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.mod-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mod-blk {
  font-size: 11.5px;
  border: 1px dashed var(--border-strong);
  border-radius: 7px;
  padding: 5px 9px;
  color: var(--text-muted);
}

.mod-media {
  max-width: 100%;
  max-height: 240px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.mod-media-none {
  color: var(--text-muted);
  font-size: 12.5px;
}

.mod-diff {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.mod-diff .k {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 2px;
}

.mod-diff .old {
  color: #cf4b5f;
  text-decoration: line-through;
  opacity: 0.8;
}

.mod-diff .arr {
  color: var(--text-muted);
  margin: 0 7px;
}

.mod-diff .new {
  color: var(--accent);
  font-weight: 600;
}

.mod-decide {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.mod-decide textarea {
  width: 100%;
  resize: vertical;
  min-height: 40px;
  margin-bottom: 10px;
}

.mod-decide .bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mod-decide .hint {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-muted);
}

.lightbox-thumb {
  cursor: zoom-in;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px;
  background: rgba(15, 17, 22, 0.72);
  backdrop-filter: blur(2px);
  animation: lightbox-fade 0.12s ease-out;
}

.lightbox-backdrop img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
  cursor: default;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.lightbox-close {
  position: fixed;
  top: 14px;
  right: 18px;
  width: 38px;
  height: 38px;
  line-height: 1;
  font-size: 26px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

@keyframes lightbox-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.map-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 17, 22, 0.6);
  backdrop-filter: blur(2px);
  animation: lightbox-fade 0.12s ease-out;
}

.map-picker-card {
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  max-height: 90vh;
  background: var(--bs-body-bg, #fff);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.map-picker-head,
.map-picker-foot {
  padding: 12px 16px;
}

.map-picker-head {
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.map-picker-foot {
  border-top: 1px solid var(--bs-border-color, #dee2e6);
  display: flex;
  gap: 8px;
  align-items: center;
}

.map-picker-map {
  flex: 1 1 auto;
  min-height: 320px;
  height: 58vh;
}

.map-picker-address {
  font-weight: 600;
}

.map-picker-hint {
  font-size: 13px;
  color: var(--bs-secondary-color, #6c757d);
}

.map-picker-marker {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -32px 0 0 -16px;
  font-size: 30px;
  line-height: 1;
  color: #d6336c;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.address-row-btn {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 38px;
  padding: 0;
}

.address-row-name {
  flex: 0 1 210px;
  min-width: 0;
}

.address-row-address {
  flex: 1 1 300px;
  min-width: 0;
  position: relative;
}

.address-row-coord {
  flex: 0 1 130px;
  min-width: 0;
}

.address-row-note {
  flex: 1 0 100%;
  font-size: 12.5px;
  color: var(--text-muted);
}

.address-row-note:empty {
  display: none;
}

.address-row-kkt {
  flex: 0 0 auto;
}

.address-row-kkt-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  white-space: nowrap;
}

.address-row-kkt-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bs-warning, #ffc107);
  box-shadow: 0 0 0 2px var(--bs-body-bg, #fff);
}

.kkt-modal {
  width: min(520px, 100vw - 32px);
  max-height: 90vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bs-body-bg, #fff);
  color: inherit;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.kkt-modal[open] {
  display: flex;
  flex-direction: column;
}

.kkt-modal::backdrop {
  background: rgba(15, 17, 22, 0.6);
  backdrop-filter: blur(2px);
}

.kkt-modal-head,
.kkt-modal-foot {
  padding: 12px 16px;
}

.kkt-modal-head {
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.kkt-modal-foot {
  border-top: 1px solid var(--bs-border-color, #dee2e6);
  display: flex;
  gap: 8px;
  align-items: center;
}

.kkt-modal-body {
  padding: 16px;
  overflow-y: auto;
}

.kkt-modal-title {
  font-weight: 600;
}

.kkt-modal-address,
.kkt-modal-hint {
  font-size: 13px;
  color: var(--bs-secondary-color, #6c757d);
}

.kkt-modal-hint {
  margin-bottom: 10px;
}

.kkt-modal-foot .kkt-modal-hint {
  margin-bottom: 0;
}

.kkt-modal-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  align-items: flex-start;
}

.kkt-modal-field {
  flex: 1 1 auto;
  min-width: 0;
}

.kkt-modal-feedback {
  font-size: 12.5px;
  margin-top: 3px;
  color: var(--bs-secondary-color, #6c757d);
}

.kkt-modal-feedback:empty {
  display: none;
}

.kkt-modal-feedback.is-error {
  color: var(--bs-danger, #dc3545);
}

.kkt-modal-hints {
  margin-top: 16px;
}

.qr-svg svg {
  width: 100%;
  height: auto;
  display: block;
}

.drag-handle {
  cursor: grab;
  color: var(--bs-secondary-color, #6c757d);
  user-select: none;
  transition: color 0.15s ease-in-out;
}
.drag-handle:hover {
  color: var(--bs-primary, #0d6efd);
}
.drag-handle:active {
  cursor: grabbing;
}

.sortable-dragging {
  opacity: 0.5;
  outline: 2px dashed var(--bs-primary, #0d6efd);
}

.wheel-sectors-head,
.wheel-sector {
  display: grid;
  grid-template-columns: 24px 26px 132px minmax(0, 1fr) 74px 56px;
  align-items: center;
  gap: 0 10px;
  padding: 10px 16px;
}

.wheel-sectors-head {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 500;
}

.wheel-sector {
  border-bottom: 1px solid var(--border);
}

.wheel-sector.is-drop-target {
  background: var(--accent-soft);
}

.wheel-sector-num {
  font-size: 13px;
  color: var(--text-muted);
}

.wheel-sector-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.wheel-sector .is-hidden, .wheel-sector-weight.is-hidden {
  visibility: hidden;
}

.wheel-sector.is-destroyed {
  opacity: 0.5;
}

.wheel-sector.is-destroyed .wheel-chip-title {
  text-decoration: line-through;
}

.wheel-slot-empty {
  border: 1.5px dashed var(--border-strong);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.wheel-sector.is-drop-target .wheel-slot-empty {
  border-color: var(--accent);
  color: #047857;
}

.wheel-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wheel-chip-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.wheel-chip-title {
  font-size: 13.5px;
  font-weight: 500;
}

.wheel-chip-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.wheel-chip-meta code {
  font-size: 11px;
  background: var(--surface-2);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-muted);
}

.badge-kind {
  background: var(--surface-2);
  color: var(--text-muted);
}

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

.wheel-fund-list {
  max-height: 520px;
  overflow-y: auto;
  padding: 4px 10px 12px;
}

.wheel-fund-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: grab;
}

.wheel-fund-card.is-assigned {
  background: var(--surface-2);
}

.wheel-fund-card.is-blocked {
  cursor: default;
  opacity: 0.7;
}

.wheel-fund-card.is-dragging {
  opacity: 0.5;
  outline: 2px dashed var(--accent);
}

.wheel-fund-card .wheel-chip {
  flex: 1;
}

.wheel-fund-state {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.wheel-preview {
  width: 100%;
  height: auto;
}

.wheel-wedge {
  fill: var(--surface);
  stroke: var(--border);
}

.wheel-wedge.is-empty {
  fill: rgba(245, 158, 11, 0.1);
  stroke-dasharray: 4 3;
}

.wheel-wedge-num {
  font-size: 13px;
  font-weight: 600;
  fill: var(--text);
}

.wheel-wedge-title {
  font-size: 9px;
  fill: var(--text-muted);
}

.wheel-hub {
  fill: var(--surface);
  stroke: var(--border);
}

.wheel-pointer {
  fill: var(--accent);
}

.bb-map {
  text-align: center;
}

.bb-map-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.bb-map-image {
  display: block;
  max-width: 100%;
  max-height: 480px;
  width: auto;
  height: auto;
  user-select: none;
}

.bb-map.is-editable .bb-map-frame {
  cursor: crosshair;
}

.bb-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font: 700 14px/26px var(--bs-body-font-family, sans-serif);
  text-align: center;
  transition: transform 0.15s ease, background-color 0.15s ease;
  pointer-events: auto;
}

.bb-marker.is-mine {
  background: #2563eb;
}

.bb-marker.is-active {
  transform: translate(-50%, -50%) scale(1.35);
  z-index: 2;
}

.bb-map-legend {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.bb-map-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: -1px;
  margin: 0 4px 0 10px;
}

.bb-slot.is-active {
  box-shadow: 0 0 0 2px var(--accent);
}
