.ap-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.32);
  font-family: ui-monospace, SF Mono, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.72);
  letter-spacing: 0.02em;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.08);
}

.admin-tab-kbd {
  margin-left: auto;
  font-family: ui-monospace, SF Mono, Menlo, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.05);
  color: rgba(15, 23, 42, 0.55);
  opacity: 0.7;
}

.ap-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(40px, 12vh, 120px) 16px 16px;
}
.ap-palette-overlay.hidden { display: none; }
.ap-palette-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: ap-fade-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
body.ap-overlay-open { overflow: hidden; }
@keyframes ap-fade-in { from { opacity: 0; } to { opacity: 1; } }

.ap-palette {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--lg-card-bg, rgba(255, 255, 255, 0.95));
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    0 30px 80px rgba(15, 23, 42, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.45) inset;
  overflow: hidden;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: ap-pop-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes ap-pop-in {
  from { opacity: 0; transform: scale(0.96) translateY(-6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.ap-palette-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.ap-palette-search > i { color: rgba(15, 23, 42, 0.45); font-size: 0.95rem; }
.ap-palette-search input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: inherit;
  outline: none;
}
.ap-palette-results {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  min-height: 60px;
}
.ap-palette-empty {
  padding: 28px 16px;
  text-align: center;
  color: rgba(15, 23, 42, 0.5);
  font-size: 0.9rem;
}
.ap-palette-group {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.4);
  padding: 10px 12px 4px;
}
.ap-palette-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 120ms ease, transform 120ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ap-palette-item:hover { background: rgba(15, 23, 42, 0.04); }
.ap-palette-item.is-active {
  background: rgba(34, 189, 255, 0.10);
  box-shadow: inset 0 0 0 1px rgba(34, 189, 255, 0.22);
  transform: translateX(2px);
}
.ap-palette-item-text { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.ap-palette-item-label {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ap-palette-item-sub {
  font-size: 0.78rem;
  color: rgba(15, 23, 42, 0.55);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ap-palette-icon {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(34, 189, 255, 0.10);
  color: var(--lg-accent-primary, #22BDFF);
  font-size: 0.78rem;
}
.ap-palette-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.06);
}
.ap-palette-foot {
  display: flex;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.78rem;
  color: rgba(15, 23, 42, 0.55);
  flex-wrap: wrap;
}
.ap-palette-foot-help { margin-left: auto; }

.ap-shortcuts {
  position: relative;
  width: min(480px, calc(100vw - 32px));
  background: var(--lg-card-bg, rgba(255, 255, 255, 0.96));
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
  overflow: hidden;
  animation: ap-pop-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ap-shortcuts header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.ap-shortcuts ul {
  list-style: none;
  margin: 0;
  padding: 12px 0;
}
.ap-shortcuts li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
}
.ap-shortcuts li > span {
  margin-left: auto;
  font-size: 0.88rem;
  color: rgba(15, 23, 42, 0.7);
}

.ap-overview-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1240px;
}
.ap-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.ap-overview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ap-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 980px) { .ap-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .ap-kpi-grid { grid-template-columns: 1fr; } }
.ap-kpi {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 14px !important;
  min-height: 110px;
}
.ap-kpi-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ap-kpi-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.ap-kpi-icon-blue { background: rgba(34, 189, 255, 0.13); color: #22BDFF; }
.ap-kpi-icon-amber { background: rgba(211, 131, 0, 0.13);  color: #d38300; }
.ap-kpi-icon-red { background: rgba(255, 69, 58, 0.13);  color: #d11507; }
.ap-kpi-icon-green { background: rgba(15, 159, 95, 0.13);  color: #0f9f5f; }
.ap-kpi-num {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: block;
  line-height: 1.1;
}
.ap-kpi-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
}
.ap-kpi-foot {
  font-size: 0.78rem;
  color: rgba(15, 23, 42, 0.55);
  margin: 0;
  min-height: 1em;
}
.ap-kpi-foot.is-warn { color: #d11507; font-weight: 600; }

.ap-overview-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 0.9fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 1100px) {
  .ap-overview-grid { grid-template-columns: 1fr 1fr; }
  .ap-overview-grid > section:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .ap-overview-grid { grid-template-columns: 1fr; }
}
.ap-card {
  padding: 16px 18px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ap-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ap-card-head h4 { margin: 0; font-size: 0.95rem; }
.ap-card-head-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.ap-card-head-text { flex: 1; min-width: 0; }
.ap-card-head .lg-btn { margin-left: auto; }

.ap-workload {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ap-workload-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ap-workload-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.7);
}
.ap-workload-avatar--initials {
  background: linear-gradient(135deg, rgba(34, 189, 255, 0.15), rgba(124, 58, 237, 0.15));
}
.ap-workload-main { flex: 1; min-width: 0; }
.ap-workload-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
}
.ap-workload-count {
  font-variant-numeric: tabular-nums;
  color: var(--lg-accent-primary, #22BDFF);
}
.ap-workload-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  margin-top: 4px;
}
.ap-workload-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22BDFF, #7c3aed);
  border-radius: inherit;
  transition: width 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ap-activity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 360px;
  overflow-y: auto;
}
.ap-activity-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 6px;
  border-radius: 10px;
  transition: background 160ms ease;
}
.ap-activity-row:hover { background: rgba(15, 23, 42, 0.04); }
.ap-activity-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.74rem;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.65);
}
.ap-activity-opened  .ap-activity-icon { background: rgba(34, 189, 255, 0.14); color: #22BDFF; }
.ap-activity-reply   .ap-activity-icon { background: rgba(124, 58, 237, 0.14); color: #6450dc; }
.ap-activity-claimed .ap-activity-icon { background: rgba(211, 131, 0, 0.14);  color: #d38300; }
.ap-activity-closed  .ap-activity-icon { background: rgba(15, 159, 95, 0.14);  color: #0f9f5f; }
.ap-activity-text { min-width: 0; }
.ap-activity-title {
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ap-activity-sub {
  font-size: 0.76rem;
  color: rgba(15, 23, 42, 0.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ap-activity-time {
  font-size: 0.75rem;
  color: rgba(15, 23, 42, 0.5);
  font-variant-numeric: tabular-nums;
}

.ap-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ap-quick .lg-btn { justify-content: flex-start; }

@media (prefers-reduced-motion: reduce) {
  .ap-palette,
.ap-shortcuts,
.ap-palette-backdrop { animation: none !important; }
  .ap-palette-item.is-active { transform: none !important; }
}

body[data-page="admin"] .admin-content {
  display: flex !important;
  flex-direction: column !important;
}
body[data-page="admin"] .admin-content > .admin-panel {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
}

.ap-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  margin: -10px -10px 14px;  /* bleed to the panel edges */
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.74));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 14px 14px 0 0;
  flex: 0 0 auto;  /* don't let the column flex collapse the topbar */
}
@media (max-width: 1180px) {
  .ap-topbar { grid-template-columns: minmax(200px, 1fr) auto auto; }
  .ap-topbar-online { display: none; }
}
@media (max-width: 880px) {
  .ap-topbar { grid-template-columns: 1fr auto; gap: 10px; padding: 10px 12px; }
  .ap-topbar-pills { display: none; }
}

.ap-topbar-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.18);
  cursor: pointer;
  font: inherit;
  color: rgba(15, 23, 42, 0.65);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ap-topbar-search:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(34, 189, 255, 0.4);
  transform: translateY(-1px);
}
.ap-topbar-search-text { flex: 1; text-align: left; font-size: 0.86rem; }
.ap-topbar-search > i { font-size: 0.85rem; }

.ap-topbar-pills {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.ap-topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
  cursor: pointer;
  font: inherit;
  transition:
    transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 180ms ease,
    background 180ms ease;
}
.ap-topbar-pill:hover { transform: translateY(-1px); }
.ap-topbar-pill-num {
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.ap-topbar-pill-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
}
.ap-topbar-pill--blue { color: #22BDFF; }
.ap-topbar-pill--blue:hover { border-color: rgba(34, 189, 255, 0.4); }
.ap-topbar-pill--amber { color: #d38300; }
.ap-topbar-pill--amber:hover { border-color: rgba(211, 131, 0, 0.4); }
.ap-topbar-pill--red { color: #d11507; }
.ap-topbar-pill--red:hover { border-color: rgba(255, 69, 58, 0.4); }
.ap-topbar-pill.is-empty .ap-topbar-pill-num { color: rgba(15, 23, 42, 0.35); }
.ap-topbar-pill.is-pulsing { animation: ap-pulse-attention 1.6s ease-in-out infinite; }
@keyframes ap-pulse-attention {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 69, 58, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(255, 69, 58, 0.15); }
}

.ap-topbar-online {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 159, 95, 0.10);
  min-height: 36px;
}
.ap-topbar-online-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -6px;
  background: rgba(15, 23, 42, 0.06);
  object-fit: cover;
}
.ap-topbar-online-avatar:first-child { margin-left: 0; }
.ap-topbar-online-count {
  margin-left: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f9f5f;
}

.ap-topbar-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.ap-topbar-icon-btn {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.6);
  color: rgba(15, 23, 42, 0.7);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ap-topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--lg-accent-primary, #22BDFF);
  transform: translateY(-1px);
}

.ap-topbar-create {
  position: relative;
}
.ap-topbar-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px !important;
}
.ap-topbar-create-caret {
  font-size: 0.7rem;
  margin-left: 2px;
  transition: transform 180ms ease;
}
.ap-topbar-create.is-open .ap-topbar-create-caret { transform: rotate(180deg); }
.ap-topbar-create-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--lg-card-bg, rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: 60;
  animation: ap-pop-in 200ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ap-topbar-create-menu.hidden { display: none; }
.ap-topbar-create-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}
.ap-topbar-create-menu button:hover { background: rgba(34, 189, 255, 0.10); }
.ap-topbar-create-menu button > i { color: var(--lg-accent-primary, #22BDFF); width: 16px; }
.ap-topbar-create-menu button > kbd { margin-left: auto; }
.ap-topbar-create-menu button > span { flex: 1; }

.admin-sidebar {
  position: relative;
  transition: width 280ms cubic-bezier(0.2, 0.8, 0.2, 1),
              padding 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.admin-sidebar-collapse {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border: 0;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  cursor: pointer;
  color: rgba(15, 23, 42, 0.5);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  transition: background 160ms ease, color 160ms ease, transform 200ms ease;
  z-index: 4;
}
.admin-sidebar-collapse:hover {
  background: rgba(34, 189, 255, 0.12);
  color: var(--lg-accent-primary, #22BDFF);
}
.admin-sidebar.is-collapsed .admin-sidebar-collapse i { transform: rotate(180deg); }

.admin-sidebar-profile { position: relative; }
.admin-sidebar-online-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34c759;
  border: 2px solid #fff;
  bottom: 2px;
  right: 2px;
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.6);
  animation: ap-online-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ap-online-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(52, 199, 89, 0); }
}
.user-avatar-img { position: relative; }
.user-avatar-img .admin-sidebar-online-dot {
  bottom: -2px; right: -2px;
}

.admin-sidebar.is-collapsed {
  width: 76px !important;
  padding: 14px 8px !important;
}
.admin-sidebar.is-collapsed .admin-sidebar-profile {
  justify-content: center;
  flex-direction: column;
}
.admin-sidebar.is-collapsed .user-info,
.admin-sidebar.is-collapsed .admin-nav-label,
.admin-sidebar.is-collapsed .admin-tab-label,
.admin-sidebar.is-collapsed .admin-tab-kbd,
.admin-sidebar.is-collapsed .admin-tab > span:not(.admin-tab-badge) {
  display: none !important;
}
.admin-sidebar.is-collapsed .admin-tab {
  justify-content: center;
  padding: 10px 0 !important;
  position: relative;
}
.admin-sidebar.is-collapsed .admin-tab-badge {
  position: absolute;
  top: 4px; right: 8px;
  font-size: 0.55rem;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
}

body[data-page="admin"] .admin-container {
  transition: grid-template-columns 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ap-trends {
  padding: 18px 20px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ap-trends-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.ap-trends-head h4 { font-size: 0.95rem; }
.ap-trends-legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: rgba(15, 23, 42, 0.55);
  flex-wrap: wrap;
}
.ap-trends-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.ap-trends-dot--blue { background: #22BDFF; }
.ap-trends-dot--green { background: #0f9f5f; }
.ap-trends-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 720px) { .ap-trends-grid { grid-template-columns: 1fr; } }
.ap-trend {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.ap-trend-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.ap-trend-num {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.ap-trend-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
}
.ap-trend-delta {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 600;
}
.ap-trend-delta.is-up { color: #167a3a; }
.ap-trend-delta.is-down { color: #d11507; }
.ap-trend-chart {
  display: block;
  width: 100%;
  height: 80px;
}
.ap-trend-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ap-trend-line--blue { stroke: #22BDFF; }
.ap-trend-line--green { stroke: #0f9f5f; }
.ap-trend-area {
  stroke: none;
}
.ap-trend-area--blue { fill: rgba(34, 189, 255, 0.10); }
.ap-trend-area--green { fill: rgba(15, 159, 95, 0.10); }

.ap-saved-views {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 0;
}
.ap-saved-views button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.7);
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ap-saved-views button:hover {
  border-color: rgba(34, 189, 255, 0.45);
  color: var(--lg-accent-primary, #22BDFF);
  transform: translateY(-1px);
}
.ap-saved-views button.active {
  background: linear-gradient(135deg, rgba(34, 189, 255, 0.16), rgba(124, 58, 237, 0.14));
  border-color: rgba(34, 189, 255, 0.55);
  color: var(--lg-accent-primary, #22BDFF);
  box-shadow: inset 0 0 0 1px rgba(34, 189, 255, 0.2);
}

.ap-bulk-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 189, 255, 0.10), rgba(124, 58, 237, 0.06));
  border: 1px solid rgba(34, 189, 255, 0.28);
  animation: ap-pop-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ap-bulk-strip.hidden { display: none; }
.ap-bulk-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--lg-accent-primary, #22BDFF);
  margin-right: auto;
}
.ap-bulk-strip [data-bulk="clear"] {
  margin-left: auto;
}

.ap-row-hidden { display: none !important; }

.admin-ticket-row { position: relative; }
.admin-ticket-select-wrap {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.32);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 160ms ease, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}
.admin-ticket-row:hover .admin-ticket-select-wrap,
.admin-ticket-row .admin-ticket-select:checked + *,
.admin-ticket-row:has(.admin-ticket-select:checked) .admin-ticket-select-wrap {
  opacity: 1;
  transform: scale(1);
}
.admin-ticket-select {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--lg-accent-primary, #22BDFF);
}
.admin-ticket-row:has(.admin-ticket-select:checked) {
  background: rgba(34, 189, 255, 0.06) !important;
  box-shadow: inset 0 0 0 1px rgba(34, 189, 255, 0.32);
}