:root {
  --app-sidebar: 16rem;
  --app-sidebar-collapsed: 3.5rem;
  --app-border: #e3e6ed;
  --app-muted: #6e7891;
  --app-surface: #fff;
  --app-font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --app-font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  --sidebar-scroll-size: 5px;
  --sidebar-scroll-thumb: rgba(49, 55, 74, .22);
  --sidebar-scroll-thumb-hover: rgba(49, 55, 74, .38);
  --sidebar-scroll-track: transparent;
}

body {
  background: #f5f7fb;
  color: #31374a;
  font-family: var(--app-font);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
}

[data-bs-theme="dark"] body {
  background: #0f1723;
  --app-border: #293445;
  --app-surface: #182230;
  --app-muted: #a7b0c3;
  --sidebar-scroll-thumb: rgba(167, 176, 195, .28);
  --sidebar-scroll-thumb-hover: rgba(167, 176, 195, .45);
}

.app-topbar {
  min-height: 4.25rem;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  z-index: 1040;
}

.navbar-brand {
  color: inherit;
  font-weight: 700;
  letter-spacing: -.035em;
}

.navbar-brand:hover {
  color: inherit;
}

.brand-mark,
.avatar {
  align-items: center;
  background: #3874ff;
  border-radius: .7rem;
  color: #fff;
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.avatar {
  background: #dce7ff;
  color: #2454ba;
  font-size: .75rem;
  font-weight: 700;
  object-fit: cover;
}

img.avatar {
  padding: 0;
}

.avatar-lg {
  height: 3.5rem;
  width: 3.5rem;
  border-radius: .85rem;
}

.btn-icon {
  border: 0;
  border-radius: .65rem;
  color: var(--bs-body-color);
  height: 2.4rem;
  width: 2.4rem;
}

.btn-icon:hover {
  background: var(--bs-tertiary-bg);
}

.notif-badge {
  align-items: center;
  background: #e11d48;
  border: 2px solid var(--app-surface);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: .65rem;
  font-weight: 700;
  height: 1.15rem;
  justify-content: center;
  line-height: 1;
  min-width: 1.15rem;
  padding: 0 .28rem;
  position: absolute;
  right: -.1rem;
  top: -.15rem;
}

.user-menu {
  align-items: center;
  border: 0;
  display: flex;
  gap: .5rem;
  font-size: .875rem;
}

.app-sidebar {
  --bs-offcanvas-width: var(--app-sidebar);
  background: var(--app-surface);
  border-right: 1px solid var(--app-border);
  top: 4.25rem;
  width: var(--app-sidebar);
  transition: width .2s ease-linear;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  overflow-x: hidden;
  width: 100%;
  scrollbar-color: var(--sidebar-scroll-thumb) var(--sidebar-scroll-track);
  scrollbar-width: thin;
}

/* Sidebar scroll — tipis, tanpa tombol panah, overlay-like */
.app-sidebar .sidebar-content,
.app-sidebar .offcanvas-body {
  scrollbar-gutter: stable;
}

.app-sidebar .sidebar-content::-webkit-scrollbar,
.app-sidebar .offcanvas-body::-webkit-scrollbar {
  width: var(--sidebar-scroll-size);
  height: var(--sidebar-scroll-size);
}

.app-sidebar .sidebar-content::-webkit-scrollbar-track,
.app-sidebar .offcanvas-body::-webkit-scrollbar-track {
  background: var(--sidebar-scroll-track);
  margin-block: .35rem;
}

.app-sidebar .sidebar-content::-webkit-scrollbar-thumb,
.app-sidebar .offcanvas-body::-webkit-scrollbar-thumb {
  background-color: var(--sidebar-scroll-thumb);
  background-clip: padding-box;
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: 2.5rem;
}

.app-sidebar .sidebar-content:hover::-webkit-scrollbar-thumb,
.app-sidebar .offcanvas-body:hover::-webkit-scrollbar-thumb {
  background-color: var(--sidebar-scroll-thumb-hover);
}

.app-sidebar .sidebar-content::-webkit-scrollbar-thumb:hover,
.app-sidebar .offcanvas-body::-webkit-scrollbar-thumb:hover {
  background-color: var(--sidebar-scroll-thumb-hover);
}

/* Hilangkan tombol panah atas/bawah (Chrome/Edge legacy) */
.app-sidebar .sidebar-content::-webkit-scrollbar-button,
.app-sidebar .offcanvas-body::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

.app-sidebar .sidebar-content::-webkit-scrollbar-corner,
.app-sidebar .offcanvas-body::-webkit-scrollbar-corner {
  background: transparent;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
}

.nav-section {
  display: block;
  flex: 0 0 auto;
  padding: 1rem .5rem .25rem;
  width: 100%;
}

.nav-section + .nav-section {
  border-top: 1px solid var(--app-border);
}

.nav-label {
  color: var(--app-muted);
  display: block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  margin: 0 .65rem .55rem;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .15s ease;
}

.app-sidebar .nav-link {
  align-items: center;
  border-radius: .55rem;
  color: var(--bs-body-color);
  display: flex;
  font-size: .875rem;
  gap: .75rem;
  height: 2rem;
  margin: .12rem 0;
  padding: .5rem .65rem;
  white-space: nowrap;
  overflow: hidden;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
  background: #eaf0ff;
  color: #2454ba;
}

.app-sidebar .nav-link i {
  font-size: 1rem;
  width: 1rem;
  min-width: 1rem;
  flex-shrink: 0;
  text-align: center;
}

.app-sidebar .nav-link-text {
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .15s ease;
}

/* Toggle di tepi kanan sidebar (bukan di topbar) */
.sidebar-edge-trigger {
  align-items: center;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 999px;
  box-shadow: 0 .15rem .4rem rgba(30, 45, 80, .08);
  color: var(--app-muted);
  display: none;
  height: 1.75rem;
  justify-content: center;
  padding: 0;
  position: absolute;
  /* sepenuhnya di luar rail agar tidak menutupi ikon */
  right: -1rem;
  top: .55rem;
  width: 1.75rem;
  z-index: 30;
}

.sidebar-edge-trigger:hover {
  background: #eaf0ff;
  color: #2454ba;
}

.sidebar-edge-trigger i {
  font-size: .85rem;
  line-height: 1;
}

/* shadcn-like edge rail to toggle (desktop) */
.sidebar-rail {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: ew-resize;
  inset-block: 0;
  position: absolute;
  right: -12px;
  top: 0;
  width: 16px;
  z-index: 20;
}

.sidebar-rail::after {
  background: transparent;
  content: "";
  display: block;
  height: 100%;
  margin-inline: auto;
  transition: background-color .15s ease;
  width: 2px;
}

.sidebar-rail:hover::after,
body.sidebar-collapsed .sidebar-rail:hover::after {
  background: #3874ff;
}

.app-main {
  min-height: calc(100vh - 4.25rem);
  margin-left: var(--app-sidebar);
  transition: margin-left .2s ease-linear;
}

/* Desktop: override Bootstrap offcanvas-lg + icon collapse (shadcn collapsible=icon) */
@media (min-width: 992px) {
  .app-sidebar.offcanvas-lg {
    position: fixed !important;
    top: 4.25rem !important;
    bottom: 0;
    left: 0;
    z-index: 1030;
    display: flex !important;
    flex-direction: column;
    visibility: visible !important;
    transform: none !important;
    width: var(--app-sidebar) !important;
    max-width: var(--app-sidebar) !important;
    height: calc(100vh - 4.25rem) !important;
    background: var(--app-surface) !important;
    border-right: 1px solid var(--app-border) !important;
    overflow: visible;
  }

  .app-sidebar .offcanvas-body,
  .app-sidebar .sidebar-content {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sidebar-edge-trigger {
    display: inline-flex !important;
  }

  body.sidebar-collapsed {
    --app-sidebar: var(--app-sidebar-collapsed);
  }

  body.sidebar-collapsed .app-sidebar.offcanvas-lg {
    width: var(--app-sidebar-collapsed) !important;
    max-width: var(--app-sidebar-collapsed) !important;
  }

  /* ruang di bawah toggle + center horizontal */
  body.sidebar-collapsed .app-sidebar .sidebar-content {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    padding-top: 2.5rem;
  }

  body.sidebar-collapsed .app-sidebar .sidebar-nav {
    align-items: stretch;
    width: 100%;
  }

  body.sidebar-collapsed .app-sidebar .nav-label {
    height: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
  }

  body.sidebar-collapsed .app-sidebar .nav-link-text {
    display: none;
  }

  body.sidebar-collapsed .app-sidebar .nav-section {
    align-items: center;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    padding: .35rem 0 .2rem;
    width: 100%;
  }

  body.sidebar-collapsed .app-sidebar .nav-section + .nav-section {
    border-top: 1px solid var(--app-border);
    margin-top: .15rem;
  }

  body.sidebar-collapsed .app-sidebar .nav-link {
    align-items: center;
    flex: 0 0 auto;
    gap: 0;
    height: 2.25rem;
    justify-content: center;
    margin: .05rem auto;
    padding: 0;
    width: 2.25rem;
  }

  body.sidebar-collapsed .app-sidebar .nav-link i {
    display: block;
    font-size: 1.05rem;
    line-height: 1;
    margin: 0 auto;
    min-width: 0;
    text-align: center;
    width: 1.1rem;
  }

  /* Collapsed: scrollbar lebih tipis + tidak makan lebar ikon */
  body.sidebar-collapsed {
    --sidebar-scroll-size: 4px;
  }

  body.sidebar-collapsed .app-sidebar .sidebar-content,
  body.sidebar-collapsed .app-sidebar .offcanvas-body {
    scrollbar-gutter: auto;
    scrollbar-width: none;
  }

  body.sidebar-collapsed .app-sidebar .sidebar-content::-webkit-scrollbar,
  body.sidebar-collapsed .app-sidebar .offcanvas-body::-webkit-scrollbar {
    width: 0;
  }

  body.sidebar-collapsed .app-sidebar .sidebar-content:hover,
  body.sidebar-collapsed .app-sidebar .offcanvas-body:hover {
    scrollbar-width: thin;
  }

  body.sidebar-collapsed .app-sidebar .sidebar-content:hover::-webkit-scrollbar,
  body.sidebar-collapsed .app-sidebar .offcanvas-body:hover::-webkit-scrollbar {
    width: var(--sidebar-scroll-size);
  }
}

.eyebrow {
  color: var(--app-muted);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.page-title {
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -.04em;
  margin: .15rem 0;
}

.page-description {
  color: var(--app-muted);
  margin: 0;
  max-width: 44rem;
}

.card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: .85rem;
  box-shadow: 0 .15rem .5rem rgba(0, 0, 0, .02);
}

.metric-card .metric-icon {
  align-items: center;
  background: #eef3ff;
  border-radius: .7rem;
  color: #2d61d8;
  display: inline-flex;
  font-size: 1.2rem;
  height: 2.6rem;
  justify-content: center;
  width: 2.6rem;
}

.metric-value {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.035em;
}

.metric-label {
  color: var(--app-muted);
  font-size: .8rem;
}

.action-card {
  height: 100%;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}

.action-card:hover {
  box-shadow: 0 .5rem 1.5rem rgba(30, 45, 80, .1);
  transform: translateY(-2px);
}

.action-card .card-body {
  color: var(--bs-body-color);
}

.action-card p {
  color: var(--app-muted);
  font-size: .875rem;
}

/* Header halaman + toolbar aksi */
.page-header-bar {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .page-header-bar {
    flex-direction: row;
    justify-content: space-between;
  }
}

.page-header-bar__main {
  flex: 1 1 auto;
  min-width: 0;
}

.page-header-bar__actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: .5rem;
}

/* Kartu + tabel — pola acuan IoT Devices / Monitoring */
.app-data-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: .85rem;
  box-shadow: 0 .15rem .5rem rgba(0, 0, 0, .02);
  overflow: hidden;
}

.app-data-card > .table-responsive > .table {
  margin-bottom: 0;
}

.app-data-card > .pagination-wrap,
.app-data-card .pagination {
  border-top: 1px solid var(--app-border);
  margin-bottom: 0;
  padding: .75rem 1rem;
}

/* Keep legacy filter card markup aligned with the shared filter panel. */
.app-data-card > .card-body.border-bottom {
  margin-bottom: 1rem;
  padding: 1.25rem;
}

.app-panel-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: .85rem;
  box-shadow: 0 .15rem .5rem rgba(0, 0, 0, .02);
}

.app-panel-card > .app-panel-card__header {
  background: transparent;
  border-bottom: 1px solid var(--app-border);
  font-size: .875rem;
  font-weight: 600;
  padding: .85rem 1rem;
}

.app-panel-card > .app-panel-card__body {
  padding: 1rem;
}

/* Bootstrap card-* inside app-panel-card (legacy markup during migration) */
.app-panel-card > .card-header {
  background: transparent;
  border-bottom: 1px solid var(--app-border);
  font-size: .875rem;
  font-weight: 600;
  padding: .85rem 1rem;
}

.app-panel-card > .card-body {
  padding: 1rem;
}

.app-panel-card > .card-footer {
  background: transparent;
  border-top: 1px solid var(--app-border);
  padding: .75rem 1rem;
}


.app-metric-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: .85rem;
  box-shadow: 0 .15rem .5rem rgba(0, 0, 0, .02);
  height: 100%;
  padding: 1rem 1.1rem;
}

.app-metric-card__label {
  color: var(--app-muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.app-metric-card__value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin-top: .35rem;
}

/* Demografi warga — 8 kartu horizontal (PAGE-SEK-WARGA-001) */
.demography-metrics {
  display: flex;
  flex-wrap: nowrap;
  gap: .5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .15rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 15, 20, .18) transparent;
}

.demography-metrics::-webkit-scrollbar {
  height: 5px;
}

.demography-metrics::-webkit-scrollbar-thumb {
  background: rgba(13, 15, 20, .18);
  border-radius: 999px;
}

.demography-metrics__item {
  flex: 1 1 0;
  min-width: 6.75rem;
  text-align: center;
}

.demography-metrics__item .app-metric-card__label {
  font-size: .72rem;
  letter-spacing: .06em;
}

.demography-metrics--dashboard .demography-metrics__item {
  color: inherit;
  transition: background-color 120ms ease-out, box-shadow 120ms ease-out;
}

.demography-metrics--dashboard .demography-metrics__item:hover {
  background: var(--surface-muted, #f5f7f9);
}

.demography-metrics__item .app-metric-card__value {
  font-size: 1.75rem;
  margin-top: .45rem;
}

@media (max-width: 991.98px) {
  .demography-metrics__item {
    flex: 0 0 auto;
    min-width: 5.5rem;
  }
}

.app-queue-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: .85rem;
  box-shadow: 0 .15rem .5rem rgba(0, 0, 0, .02);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.app-queue-card__header {
  align-items: center;
  border-bottom: 1px solid var(--app-border);
  display: flex;
  font-size: .875rem;
  font-weight: 600;
  justify-content: space-between;
  padding: .85rem 1rem;
}

.app-queue-card__body {
  padding: 1rem;
}

.app-filter-bar {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: .85rem;
  box-shadow: 0 .15rem .5rem rgba(0, 0, 0, .02);
  margin-bottom: 1.25rem !important;
  padding: 1rem;
}

.app-filter-bar .row {
  row-gap: .75rem;
}

/* Shared breathing room between filter controls and dense data tables. */
.app-filter-panel {
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.app-filter-panel .row {
  row-gap: .75rem;
}

@media (max-width: 575.98px) {
  .app-filter-panel {
    padding: 1rem;
    margin-bottom: .75rem;
  }
}

.app-filter-bar .input-group {
  max-width: 32rem;
}

/* Unified collapsible filter panel — PAGE-SEK-WARGA-001 */
.app-filter-panel {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: .85rem;
  box-shadow: 0 .15rem .5rem rgba(0, 0, 0, .02);
  overflow: hidden;
}

.app-filter-panel__toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: space-between;
  padding: .75rem 1rem;
}

.app-filter-panel__primary {
  align-items: center;
  display: flex;
  flex: 1 1 16rem;
  flex-wrap: wrap;
  gap: .5rem;
  min-width: 0;
}

.app-filter-panel__field {
  min-width: 9rem;
}

.app-filter-panel__field--search {
  flex: 1 1 14rem;
  max-width: 22rem;
  min-width: 12rem;
  position: relative;
}

.app-filter-panel__field--search .form-control {
  padding-left: 2rem;
}

.app-filter-panel__icon {
  color: var(--app-muted);
  font-size: .9rem;
  left: .65rem;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

/* Search autocomplete — PAGE-SEK-WARGA-001 */
.app-search-autocomplete {
  position: relative;
}

.app-search-autocomplete__menu {
  background: var(--app-surface, #fff);
  border: 1px solid var(--app-border);
  border-radius: .65rem;
  box-shadow: 0 12px 32px -4px rgba(13, 15, 20, .18), 0 2px 6px rgba(13, 15, 20, .08);
  left: 0;
  list-style: none;
  margin: .25rem 0 0;
  max-height: 16rem;
  overflow-y: auto;
  padding: .35rem;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 1050;
}

.app-search-autocomplete__item {
  border-radius: .5rem;
  cursor: pointer;
  display: block;
  padding: .45rem .55rem;
  text-align: left;
  width: 100%;
}

.app-search-autocomplete__item:hover,
.app-search-autocomplete__item.is-active {
  background: var(--app-bg, #f5f7f9);
}

.app-search-autocomplete__label {
  color: var(--app-text, #0d0f14);
  display: block;
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.25;
}

.app-search-autocomplete__meta {
  color: var(--app-muted);
  display: block;
  font-size: .72rem;
  line-height: 1.3;
  margin-top: .1rem;
}

.app-search-autocomplete__empty {
  color: var(--app-muted);
  font-size: .78rem;
  padding: .5rem .55rem;
}

.app-filter-panel__actions {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: .4rem;
}

.app-filter-panel__toggle--active {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.app-filter-panel__chips {
  border-top: 1px solid var(--app-border);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .65rem 1rem 0;
}

.app-filter-chip {
  align-items: center;
  background: var(--app-bg, #f5f7f9);
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-muted);
  display: inline-flex;
  font-size: .78rem;
  font-weight: 500;
  gap: .35rem;
  padding: .35rem .75rem;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
}

.app-filter-chip:hover {
  background: #eef1f4;
  color: var(--app-text, #0d0f14);
}

.app-filter-chip--active {
  background: #eaf0ff;
  border-color: #c7d7fe;
  color: #2454ba;
}

.app-filter-chip__count {
  background: var(--bs-primary);
  border-radius: 999px;
  color: #fff;
  font-size: .68rem;
  font-weight: 600;
  line-height: 1;
  min-width: 1.1rem;
  padding: .15rem .35rem;
  text-align: center;
}

.app-filter-chip__chev {
  font-size: .65rem;
  opacity: .7;
  transition: transform 120ms ease-out;
}

.app-filter-chip[aria-expanded="true"] .app-filter-chip__chev {
  transform: rotate(180deg);
}

.app-filter-panel__sections {
  padding: 0 1rem .75rem;
}

.app-filter-panel__section {
  background: var(--app-bg, #f8f9fb);
  border: 1px solid var(--app-border);
  border-radius: .65rem;
  margin-top: .5rem;
  padding: .75rem .85rem;
}

.app-filter-panel__section-title {
  color: var(--app-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: .55rem;
  text-transform: uppercase;
}

.app-filter-panel__checkbox-grid {
  display: grid;
  gap: .35rem .75rem;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
}

.app-filter-panel__checkbox-grid--inline {
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
}

.app-filter-check {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  font-size: .84rem;
  gap: .45rem;
  margin: 0;
}

.app-filter-check input {
  accent-color: var(--bs-primary);
  flex-shrink: 0;
}

@media (max-width: 767.98px) {
  .app-filter-panel__toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .app-filter-panel__primary,
  .app-filter-panel__actions {
    width: 100%;
  }

  .app-filter-panel__field--search {
    max-width: none;
  }
}

.table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.table th {
  background: transparent;
  color: var(--app-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.table td,
.table th {
  border-color: var(--app-border);
  padding: .8rem 1rem;
  vertical-align: middle;
}

.table-sm td,
.table-sm th {
  padding: .65rem .85rem;
}

.table code,
code {
  font-family: var(--app-font-mono);
  font-size: .85em;
}

.badge-soft-primary {
  background: #eaf0ff;
  color: #2454ba;
}

.badge-soft-success {
  background: #daf6e8;
  color: #18794e;
}

.badge-soft-warning {
  background: #fff3d6;
  color: #9b6a00;
}

.badge-soft-danger {
  background: #ffeaed;
  color: #b4233c;
}

.module-hero {
  background: linear-gradient(120deg, #1e3a8a, #3478f6);
  border-radius: 1rem;
  color: #fff;
  overflow: hidden;
}

.module-hero p {
  color: rgba(255, 255, 255, .78);
}

/* Weather widget — PAGE-WARGA-WEATHER-001 */
.weather-widget__main .app-metric-card__value {
  font-size: 1.85rem;
}

.weather-widget__icon {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

.weather-widget__icon--sm {
  width: 1.35rem;
  height: 1.35rem;
}

.weather-widget__icon--clear { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f59e0b'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3C/svg%3E"); }
.weather-widget__icon--partly-cloudy { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Ccircle cx='8' cy='10' r='4' fill='%23f59e0b'/%3E%3Cpath d='M6 18h12a4 4 0 0 0 0-8 5 5 0 0 0-9.5 1.5'/%3E%3C/svg%3E"); }
.weather-widget__icon--cloudy { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M6 18h12a4 4 0 0 0 0-8 5 5 0 0 0-9.5 1.5'/%3E%3C/svg%3E"); }
.weather-widget__icon--fog { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M4 14h16M4 17h12M6 11h14' stroke='%2394a3b8' stroke-width='2'/%3E%3C/svg%3E"); }
.weather-widget__icon--drizzle,
.weather-widget__icon--rain { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233b82f6'%3E%3Cpath d='M6 14h12a4 4 0 0 0 0-8 5 5 0 0 0-9.5 1.5'/%3E%3Cpath d='M8 18l-1 2M12 18l-1 2M16 18l-1 2' stroke='%233b82f6'/%3E%3C/svg%3E"); }
.weather-widget__icon--thunderstorm { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236366f1'%3E%3Cpath d='M6 14h12a4 4 0 0 0 0-8 5 5 0 0 0-9.5 1.5'/%3E%3Cpath d='M11 17l-2 4h3l-1 3 4-5h-3l1-2z' fill='%23f59e0b'/%3E%3C/svg%3E"); }
.weather-widget__icon--unknown { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cbd5e1'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3C/svg%3E"); }

.weather-widget__footer {
  border-top: 1px solid var(--color-neutral-200, #e2e4e6);
}

.weather-widget__attribution {
  color: var(--color-neutral-600, #4e525a);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.weather-widget__day {
  min-width: 3.25rem;
  padding: .35rem .45rem;
  border: 1px solid var(--app-border);
  border-radius: .55rem;
  background: var(--app-surface-2, #f8fafc);
}

.weather-topbar-pill {
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  background: var(--app-surface-muted, #f5f7f9);
  border: 1px solid var(--app-border, #e2e4e6);
  font-size: 0.8125rem;
  line-height: 1.2;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-topbar-pill__text {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 575.98px) {
  .weather-topbar-pill {
    max-width: 5.5rem;
    padding: 0.35rem 0.5rem;
  }

  .weather-topbar-pill__condition {
    display: none;
  }
}

/* PKG-RW-DASH-DONUT — chart perlu tindakan */
.action-donut__total {
  font-size: 0.45rem;
  font-weight: 600;
  fill: var(--ink-900, #0d0f14);
}

.action-donut__label {
  font-size: 0.28rem;
  fill: var(--muted, #4e525a);
}

.action-donut-legend__dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.action-donut-legend__link {
  color: inherit;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  transition: background-color 120ms ease-out;
}

.action-donut-legend__link:hover {
  background: var(--surface-muted, #f5f7f9);
}

@media (max-width: 991.98px) {
  .app-sidebar {
    top: 0;
  }

  .app-main {
    margin-left: 0;
  }

  .sidebar-rail,
  .sidebar-edge-trigger {
    display: none !important;
  }
}
.btn-outline-orange { color: #fd7e14; border-color: #fd7e14; }
.btn-outline-orange:hover { color: white; background-color: #fd7e14; }
