body.admin-console {
  background: #f3f6fb;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 16px 12px;
  background: #172033;
  color: #d6deea;
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 16px;
}

.admin-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #1677ff;
  color: #fff;
  font-weight: 900;
}

.admin-sidebar .brand {
  color: #fff;
  font-size: 16px;
}

.admin-sidebar .sub {
  color: #8fa0ba;
}

.admin-sidebar .tabs {
  display: grid;
  gap: 4px;
}

.admin-sidebar .tab {
  border-radius: 8px;
  background: transparent;
  color: #c9d3e2;
  padding: 9px 10px;
}

.admin-sidebar .tab:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.admin-sidebar .tab.active {
  background: #1677ff;
  color: #fff;
}

.admin-system-card {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  font-size: 12px;
}

.admin-system-card span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.admin-system-card i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #22c55e;
}

.admin-system-card .warn {
  background: #f59e0b;
}

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

.admin-workspace .topbar {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}

.admin-workspace .topbar .inner,
.admin-workspace .toolbar {
  min-width: 0;
}

.admin-page-title {
  color: #1f2937;
  font-size: 20px;
  font-weight: 800;
}

.admin-search-box {
  min-width: 260px;
  padding: 9px 12px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  color: #8a94a6;
  background: #f8fafc;
  font-size: 13px;
}

.notif-trigger {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-content-wrap {
  max-width: none;
}

.stats {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.stat,
.card,
.item,
.compact-record,
.detail-block {
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

input,
textarea,
select {
  border-radius: 8px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .12);
  outline: none;
}

button,
.ghost,
.primary,
.danger {
  border-radius: 8px;
}

.primary {
  background: #1677ff;
}

.primary:hover {
  background: #0958d9;
}

.ghost {
  border: 1px solid #dfe5ee;
  background: #fff;
}

.policy-panel {
  border-radius: 10px;
}

.policy-panel.is-compact {
  width: min(920px, 100%);
  max-height: 90vh;
  overflow: auto;
}

.heading-reset {
  margin: 0;
}

.compact-grid.is-flush {
  margin-top: 0;
}

.customer-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #667085;
  font-size: 13px;
}

.customer-pager > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-pager strong {
  color: #1f2937;
}

@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
  }

  .admin-sidebar .tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .admin-sidebar .tab {
    white-space: nowrap;
  }

  .admin-search-box {
    width: 100%;
    min-width: 0;
  }

  .admin-workspace .topbar .inner {
    width: 100%;
    display: flex;
    flex-direction: column !important;
    align-items: stretch;
  }

  .admin-workspace .toolbar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .admin-workspace .toolbar > * {
    max-width: 100%;
  }

  .admin-workspace .toolbar .ghost {
    flex: 1 1 120px;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .admin-shell {
    display: block;
  }

  .admin-sidebar {
    position: static !important;
    height: auto !important;
    min-height: 0;
    display: grid !important;
    gap: 10px !important;
    padding: 12px 12px 10px !important;
  }

  .admin-brand {
    padding: 0 2px 4px !important;
  }

  .admin-brand-mark {
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    font-size: 22px !important;
  }

  .admin-sidebar .tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin: 4px 0 0 !important;
    overflow-x: auto;
    padding: 0 0 4px;
    scrollbar-width: none;
  }

  .admin-sidebar .tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-sidebar .tab {
    flex: 0 0 auto;
    min-height: 34px !important;
    padding: 0 12px !important;
    white-space: nowrap;
  }

  .admin-sidebar .tab::before {
    width: 10px !important;
    height: 10px !important;
    border-radius: 3px !important;
  }

  .admin-system-card {
    display: none !important;
  }

  .admin-workspace .topbar {
    position: static;
  }

  .admin-workspace .topbar .inner {
    gap: 10px;
    padding: 12px 0 !important;
  }

  .admin-page-title {
    font-size: 19px;
  }

  .admin-console .stats,
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .admin-console .stat,
  .stat {
    min-height: 92px;
    padding: 14px !important;
  }

  .stat .k {
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: normal;
    line-height: 1.35;
  }

  .admin-content-wrap {
    padding: 0 12px;
  }

  .customer-pager {
    align-items: flex-start;
    flex-direction: column;
  }
}
