/* ERP Satker — desain dasar. Ubah token di :root untuk mengganti tema. */
:root {
  --canvas: #f0f3ec;
  --surface: #fff;
  --ink: #151a17;
  --muted: #768079;
  --green: #398b64;
  --blue: #1974c9;
  --line: #e9eee8;
  --radius: 25px;
  --shadow: 0 8px 30px rgba(39, 58, 43, 0.035);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at top, #fafcf8, var(--canvas));
  color: var(--ink);
  font:
    14px/1.55 "Inter",
    "Segoe UI",
    system-ui,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
select,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid #378bd4;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.icon {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  vertical-align: middle;
}
.shell {
  width: calc(100% - 160px);
  max-width: 1600px;
  margin-left: auto;
  margin-right: 40px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 25px 0;
  min-height: 106px;
}
.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 245px;
}
.brand img {
  width: 52px;
  height: 58px;
  object-fit: contain;
}
.brand strong {
  display: block;
  font-size: 23px;
  letter-spacing: -0.8px;
  font-weight: 780;
}
.brand small {
  color: var(--muted);
  font-size: 12px;
}
.top-nav {
  margin: auto;
  padding: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-nav a {
  border-radius: 99px;
  padding: 12px 19px;
  white-space: nowrap;
  font-size: 13px;
}
.top-nav a:hover {
  background: #eaf0e9;
}
.top-nav a.active {
  background: #171916;
  color: white;
  box-shadow: 0 3px 6px #0001;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}
.circle,
.avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
}
.avatar {
  background: #c9e4da;
  border: 3px solid #fff;
  color: #294a3f;
  font-size: 12px;
}
.floating-rail {
  position: fixed;
  left: 25px;
  top: 225px;
  z-index: 20;
  padding: 13px 8px;
  border-radius: 36px;
  background: linear-gradient(140deg, #23241f, #11130f);
  color: #fff;
  display: grid;
  gap: 9px;
  box-shadow: 0 12px 22px #17251b14;
}
.floating-rail a,
.floating-rail button {
  width: 43px;
  height: 42px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: inherit;
  border-radius: 50%;
}
.floating-rail a:hover,
.floating-rail button:hover {
  background: #fff2;
}
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 9px;
  display: flex;
  gap: 12px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 21px;
}
h1 {
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.2;
  letter-spacing: -1.5px;
  margin: 0 0 5px;
  font-weight: 740;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.8px;
  line-height: 1.3;
  margin: 9px 0 10px;
}
h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.3px;
}
p {
  margin: 6px 0 15px;
}
.page-heading p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}
.demo-tag {
  color: #41725b;
  background: #e0ece0;
  border: 1px solid #d6e5d6;
  padding: 6px 11px;
  border-radius: 99px;
  font-size: 10px;
  letter-spacing: 0.7px;
  white-space: nowrap;
}
.filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filters label {
  display: grid;
  gap: 4px;
  font-size: 10px;
  color: #7a827c;
  min-width: 110px;
}
input,
select {
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #343b35;
  background: #ffffffd9;
  max-width: 100%;
}
select {
  width: 100%;
  min-width: 110px;
  max-width: 270px;
}
input {
  width: 210px;
}
.filters .button {
  min-height: 45px;
}
.button {
  border: 1px solid #e2e7e1;
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 99px;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px #2038260a;
}
.button.dark {
  color: #fff;
  background: #171a16;
  border-color: #171a16;
}
.button.ghost {
  background: transparent;
}
.button.small {
  padding: 6px 12px;
  font-size: 11px;
}
.button.small .icon {
  width: 13px;
  height: 13px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.grid {
  display: grid;
  gap: 17px;
  margin-bottom: 18px;
}
.grid-welcome {
  grid-template-columns: 2.1fr 1fr;
}
.grid-map {
  grid-template-columns: 1.7fr 1fr 1fr;
}
.grid-bottom {
  grid-template-columns: 1.5fr 1fr;
}
.grid-analytics {
  grid-template-columns: minmax(0, 1.8fr) repeat(auto-fit, minmax(240px, 1fr));
}
.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.panel {
  min-width: 0;
  border: 1px solid #ffffffb3;
  background: #ffffffd9;
  padding: 23px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}
.panel-heading h3 {
  margin: 0;
}
.welcome {
  padding: 27px;
}
.eyebrow {
  font-size: 10px;
  color: #b07f42;
  letter-spacing: 1.4px;
  font-weight: 650;
}
.welcome h2 {
  font-size: clamp(23px, 2.1vw, 32px);
}
.welcome p {
  color: var(--muted);
}
.module-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #dce4db;
  margin-top: 28px;
  padding-top: 12px;
  font-size: 11px;
}
.module-line a {
  display: flex;
  align-items: center;
  gap: 7px;
}
.dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
  background: #97b8a3;
  flex-shrink: 0;
}
.dot.green {
  background: var(--green);
}
.completeness strong {
  display: block;
  font-size: 44px;
  letter-spacing: -2px;
  font-weight: 650;
}
.completeness p {
  font-size: 12px;
  color: var(--muted);
}
progress {
  border: 0;
  height: 10px;
  width: 100%;
  background: #e9eeea;
  border-radius: 99px;
  overflow: hidden;
  accent-color: var(--green);
}
progress::-webkit-progress-bar {
  background: #e9eeea;
  border-radius: 99px;
}
progress::-webkit-progress-value {
  background: var(--green);
  border-radius: 99px;
}
progress::-moz-progress-bar {
  background: var(--green);
  border-radius: 99px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.kpi-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.kpi {
  min-width: 0;
  background: #ffffffdf;
  border-radius: 22px;
  border: 1px solid #fff8;
  padding: 21px 24px;
  min-height: 147px;
  display: flex;
  flex-direction: column;
}
.kpi-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}
.kpi-label .icon {
  opacity: 0.8;
}
.kpi strong {
  display: block;
  margin: 11px 0 1px;
  font-size: clamp(27px, 2.7vw, 42px);
  line-height: 1.2;
  letter-spacing: -1.6px;
  font-weight: 670;
  overflow-wrap: anywhere;
}
.kpi small {
  font-size: 11px;
  color: #748078;
  margin-top: auto;
}
.kpi.dark {
  background: linear-gradient(130deg, #272923, #11130f);
  color: #fff;
}
.kpi.dark small {
  color: #c8cdc7;
}
.kpi.blue {
  background: linear-gradient(130deg, #e1efff, #d8eafb);
}
.sage,
.kpi.sage {
  background: #eaf5eb;
}
.kpi.warm {
  background: #faf5e9;
}
.chart-box {
  height: 245px;
  position: relative;
}
.chart-box canvas {
  width: 100% !important;
  height: 100% !important;
}
.map-wrap {
  position: relative;
  min-height: 220px;
}
.indonesia-map {
  display: block;
  width: 100%;
  height: auto;
  max-height: 265px;
  overflow: visible;
}
.land {
  fill: #c2d9dc;
  stroke: #fff;
  stroke-width: 1;
}
.map-point {
  fill: #378964;
  stroke: #fff;
  stroke-width: 2;
  cursor: pointer;
}
.map-point:hover {
  fill: #1268aa;
}
.map-point:focus {
  outline: none;
  stroke: #151a17;
  stroke-width: 3;
}
.map-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 260px;
  pointer-events: none;
  background: #18261f;
  color: #fff;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 11px;
  box-shadow: 0 8px 20px #0002;
}
.map-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 10px;
  margin-top: 12px;
}
.map-caption .dot {
  width: 7px;
  height: 7px;
}
.table-scroll {
  width: 100%;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  background: #f0f3ef;
  font-size: 10px;
  color: #647067;
  font-weight: 550;
  padding: 11px 12px;
  white-space: nowrap;
}
th:first-child {
  border-radius: 10px 0 0 10px;
}
th:last-child {
  border-radius: 0 10px 10px 0;
}
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  vertical-align: middle;
}
td:first-child {
  min-width: 90px;
}
td .button {
  margin: 0;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #f8faf6;
}
.numeric {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 10px;
  white-space: nowrap;
}
.badge.green {
  background: #e0f0e4;
  color: #286749;
}
.badge.blue {
  background: #e1effb;
  color: #276da5;
}
.badge.amber {
  background: #fff0cc;
  color: #966b22;
}
.badge.red {
  background: #ffe4de;
  color: #a54e39;
}
.table-progress {
  min-width: 135px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-progress progress {
  width: 80px;
  height: 7px;
}
.pagination-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 17px;
  color: var(--muted);
}
.pagination {
  display: flex;
  gap: 5px;
}
.pagination a {
  min-width: 30px;
  height: 31px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid #e4e9e2;
  background: #fff;
  font-size: 11px;
}
.pagination a.current {
  background: #dcebe2;
  color: #23583f;
}
.section {
  margin-bottom: 18px;
}
.quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.quick-links a {
  background: #eaf3ed;
  border-radius: 18px;
  padding: 19px;
  display: grid;
  gap: 7px;
}
.quick-links a:nth-child(2) {
  background: #e9f1fb;
}
.quick-links a:nth-child(3) {
  background: #fbf2de;
}
.quick-links a:nth-child(4) {
  background: #f0ecf9;
}
.quick-links .icon {
  width: 28px;
  height: 28px;
  color: #37694d;
}
.quick-links strong {
  font-size: 12px;
}
.quick-links small {
  font-size: 10px;
  color: var(--muted);
}
.text-link {
  color: #3c7957;
  font-size: 11px;
}
.scope-note,
.muted {
  color: var(--muted);
  font-size: 12px;
}
.empty {
  padding: 45px 15px;
  text-align: center;
  color: var(--muted);
}
.footer {
  padding: 25px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 25px;
}
.building-art {
  min-width: 155px;
  height: 180px;
  border-radius: 20px;
  background: linear-gradient(145deg, #dce9df, #c5dcd4);
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  justify-content: center;
  color: #4d7d62;
}
.building-art .icon {
  width: 75px;
  height: 75px;
  stroke-width: 1;
}
.profile-list {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 13px 20px;
  font-size: 12px;
  margin-bottom: 0;
}
.profile-list dt {
  color: var(--muted);
}
.profile-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.coordinate-card {
  text-align: center;
  min-height: 225px;
  background: #edf4ef;
  padding: 24px;
  border-radius: 18px;
  margin-bottom: 10px;
}
.coordinate-card > .icon {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 15px;
  color: var(--green);
}
.tabs {
  display: flex;
  gap: 6px;
  background: #ffffffa6;
  padding: 6px;
  border-radius: 99px;
  margin: 20px 0;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.tabs button {
  border: 0;
  border-radius: 99px;
  padding: 12px 24px;
  background: transparent;
  font-size: 12px;
}
.tabs button.active {
  background: #161915;
  color: white;
}
.detail-actions {
  margin-bottom: 20px;
}
.report-card {
  padding: 30px;
  min-height: 230px;
}
.report-card h2 {
  font-size: 22px;
}
.report-card p {
  color: var(--muted);
  font-size: 13px;
}
.report-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #e6f0e7;
  color: #38845c;
  border-radius: 13px;
}
dialog {
  border: 0;
  border-radius: 24px;
  max-width: 620px;
  width: calc(100% - 40px);
  padding: 26px;
  box-shadow: 0 30px 100px #18271f40;
}
dialog::backdrop {
  background: #17291c66;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.dialog-heading h2 {
  font-size: 22px;
}
.dialog-heading button {
  background: #f1f4ef;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
}
dialog dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  font-size: 13px;
}
dialog dt {
  color: var(--muted);
}
dialog dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.mobile-toggle {
  display: none;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 15px;
  z-index: 100;
  padding: 12px;
  background: #fff;
}
.skip-link:focus {
  top: 10px;
}
.directory-cards table,
.directory-cards tbody {
  display: block;
}
.directory-cards thead {
  display: none;
}
.directory-cards tbody {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.directory-cards tr {
  display: grid;
  padding: 15px;
  border: 1px solid #e3eae2;
  border-radius: 18px;
}
.directory-cards td {
  border: 0;
  padding: 4px;
}
.directory-cards td:nth-child(2) {
  font-weight: 650;
}
@media (min-width: 1900px) {
  .shell {
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 1250px) {
  .shell {
    width: calc(100% - 120px);
    margin-right: 22px;
  }
  .topbar {
    gap: 14px;
    flex-wrap: wrap;
  }
  .brand {
    min-width: 200px;
  }
  .top-nav a {
    padding: 10px 14px;
  }
  .top-actions {
    display: none;
  }
  .grid-map {
    grid-template-columns: 1.5fr 1fr;
  }
  .grid-map article:first-child {
    grid-column: 1 / -1;
  }
  .grid-analytics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-analytics article:first-child {
    grid-column: 1 / -1;
  }
  .kpi {
    padding: 19px;
  }
  .kpi-label {
    font-size: 11px;
  }
  .kpi strong {
    font-size: 30px;
  }
  .panel {
    padding: 20px;
  }
}
@media (max-width: 900px) {
  .shell {
    width: calc(100% - 40px);
    margin: 0 auto;
  }
  .floating-rail {
    display: none;
  }
  .topbar {
    padding: 20px 0;
  }
  .brand {
    margin-right: auto;
  }
  .mobile-toggle {
    display: grid;
    place-items: center;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
  }
  .top-nav {
    display: none;
    width: 100%;
    flex-wrap: wrap;
    margin-top: 10px;
    border-radius: 20px;
  }
  .top-nav.open {
    display: flex;
  }
  .grid-welcome,
  .grid-bottom,
  .three {
    grid-template-columns: 1fr;
  }
  .kpi-grid,
  .kpi-grid.five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-heading {
    align-items: flex-start;
  }
  .demo-tag {
    font-size: 8px;
  }
  .profile-card {
    flex-wrap: wrap;
  }
  .directory-cards tbody {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .shell {
    width: calc(100% - 28px);
  }
  .brand strong {
    font-size: 21px;
  }
  .brand img {
    width: 42px;
    height: 48px;
  }
  .page-heading {
    flex-direction: column;
    gap: 10px;
  }
  h1 {
    font-size: 29px;
  }
  .grid-map,
  .grid-analytics {
    grid-template-columns: 1fr;
  }
  .kpi {
    padding: 16px;
    min-height: 132px;
    border-radius: 19px;
  }
  .kpi strong {
    font-size: 28px;
  }
  .kpi small {
    font-size: 10px;
  }
  .filters {
    gap: 8px;
  }
  .filters label {
    width: calc(50% - 4px);
    min-width: 0;
  }
  .filters label.search-field {
    width: 100%;
  }
  .filters input,
  .filters select {
    width: 100%;
    max-width: none;
    font-size: 12px;
  }
  .panel {
    padding: 18px;
  }
  .module-line {
    flex-wrap: wrap;
  }
  .map-wrap {
    min-height: 140px;
  }
  .profile-list,
  dialog dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .profile-list dd,
  dialog dd {
    margin-bottom: 12px;
  }
  .tabs button {
    padding: 10px 16px;
  }
  .footer {
    flex-direction: column;
    gap: 5px;
  }
  .pagination-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .directory-cards tbody {
    grid-template-columns: 1fr;
  }
}
@media print {
  body {
    background: #fff;
    font-size: 11px;
  }
  .shell {
    width: 100%;
    margin: 0;
  }
  .floating-rail,
  .filters,
  .top-nav,
  .top-actions,
  .button,
  .mobile-toggle,
  .pagination,
  .tabs {
    display: none !important;
  }
  .panel,
  .kpi {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  .kpi.dark {
    color: #111;
    background: #eee;
  }
  .kpi.dark small {
    color: #555;
  }
  .table-scroll {
    overflow: visible;
  }
  .grid {
    display: block;
  }
  .panel {
    margin-bottom: 15px;
  }
  .kpi-grid.five {
    grid-template-columns: repeat(5, 1fr);
  }
  .demo-tag {
    color: #555;
  }
  [data-tab-panel] {
    display: block !important;
    margin-bottom: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Versi 2: susunan header utuh, kepadatan desktop, dan ruang pengelola. */
.shell {
  width: calc(100% - 152px);
  max-width: 1660px;
  margin-left: auto;
  margin-right: 38px;
}
.topbar {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 94px;
  padding: 19px 0;
}
.brand {
  min-width: 0;
}
.brand strong {
  font-size: 23px;
}
.brand img {
  width: 49px;
  height: 54px;
}
.top-nav {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  justify-content: center;
  gap: 1px;
  padding: 4px;
}
.top-nav a {
  padding: 10px 15px;
  font-size: 12px;
}
.top-actions {
  display: flex;
  gap: 8px;
}
.top-actions form {
  margin: 0;
}
.top-actions .button {
  white-space: nowrap;
}
.page-heading {
  margin-bottom: 16px;
}
h1 {
  font-size: clamp(28px, 2.4vw, 37px);
}
.breadcrumb {
  margin-top: 6px;
}
.filters {
  margin-bottom: 18px;
}
.filters input,
.filters select {
  padding: 9px 12px;
}
.filters .button {
  min-height: 40px;
}
.welcome {
  padding: 24px;
}
.welcome h2 {
  font-size: clamp(23px, 2vw, 30px);
}
.module-line {
  margin-top: 21px;
}
.kpi {
  min-height: 132px;
  padding: 19px 21px;
}
.kpi strong {
  font-size: clamp(27px, 2.6vw, 39px);
}
.chart-box {
  height: 216px;
}
.grid-map .map-wrap {
  min-height: 190px;
}
.floating-rail {
  top: 195px;
}
.notice {
  padding: 14px 18px;
  background: #e7f3e9;
  border: 1px solid #d1e5d6;
  border-radius: 15px;
  color: #2b6143;
  margin-bottom: 20px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.notice.error {
  background: #fff0eb;
  color: #8c4330;
  border-color: #f0d5ca;
}
.notice ul {
  margin: 0;
  padding-left: 18px;
}
.admin-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.admin-menu a:hover {
  background: #e5eee5;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 30px auto 50px;
}
.auth-intro {
  background: linear-gradient(140deg, #e2eddf, #f3f6ed);
  padding: 42px;
}
.auth-intro h2 {
  font-size: 36px;
  letter-spacing: -1.3px;
  margin: 20px 0;
}
.auth-intro p {
  color: #69786b;
  max-width: 400px;
}
.auth-intro .text-link {
  display: inline-block;
  margin-top: 28px;
}
.auth-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  font-size: 13px;
  color: #43634b;
}
.auth-form {
  padding: 36px;
}
.auth-form h2 {
  font-size: 25px;
}
.auth-form > p {
  margin: 15px 0;
}
.narrow-panel {
  max-width: 600px;
  margin: 25px auto;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px 24px;
}
.form-grid.single {
  grid-template-columns: minmax(0, 1fr);
}
.form-grid label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: #526558;
  min-width: 0;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  max-width: none;
  min-width: 0;
  border: 1px solid #dde5db;
  background: #fafcf9;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: #202d24;
  font-family: inherit;
}
.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus {
  background: white;
  border-color: #77a88a;
}
.form-grid input[type="file"] {
  white-space: normal;
}
.form-grid textarea {
  resize: vertical;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-grid small {
  color: #79847c;
}
.form-grid .actions {
  margin-top: 8px;
}
.delete-details {
  position: relative;
  font-size: 11px;
  color: #985845;
}
.delete-details summary {
  cursor: pointer;
  padding: 6px;
}
.delete-details form {
  display: grid;
  gap: 8px;
  border: 1px solid #f0d9cb;
  background: #fff8f4;
  padding: 12px;
  border-radius: 12px;
  min-width: 190px;
}
.delete-details label {
  display: grid;
  gap: 5px;
}
.delete-details input {
  width: 160px;
  border: 1px solid #ead0c5;
  padding: 7px;
}
.button.danger {
  background: #a35440;
  color: #fff;
  border-color: #a35440;
}
.audit-detail {
  max-width: 450px;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 10px;
}
.import-columns {
  word-break: break-word;
  font-family: monospace;
  font-size: 12px;
  line-height: 2;
}
@media (min-width: 1850px) {
  .shell {
    margin-right: auto;
    margin-left: auto;
  }
}
@media (min-width: 1001px) and (max-width: 1250px) {
  .shell {
    width: calc(100% - 115px);
    margin-right: 22px;
  }
  .topbar {
    grid-template-columns: 180px minmax(0, 1fr) auto;
    gap: 9px;
  }
  .brand strong {
    font-size: 21px;
  }
  .brand img {
    width: 38px;
  }
  .top-nav a {
    padding: 10px 8px;
    font-size: 11px;
  }
  .top-actions .circle {
    display: none;
  }
  .top-actions .avatar {
    width: 34px;
    height: 34px;
  }
}
@media (max-width: 1000px) {
  .shell {
    width: calc(100% - 40px);
    margin-left: auto;
    margin-right: auto;
  }
  .topbar {
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 17px 0;
  }
  .floating-rail {
    display: none;
  }
  .mobile-toggle {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    place-items: center;
    background: #fff;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }
  .top-actions {
    grid-column: 3;
    grid-row: 1;
  }
  .top-actions .circle {
    display: none;
  }
  .top-nav {
    display: none;
    grid-column: 1/-1;
    grid-row: 2;
    width: 100%;
    border-radius: 20px;
    flex-wrap: wrap;
    margin: 0;
    justify-content: flex-start;
  }
  .top-nav.open {
    display: flex;
  }
  .grid-welcome,
  .grid-bottom {
    grid-template-columns: 1fr;
  }
  .kpi-grid.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .auth-layout {
    grid-template-columns: 1fr;
    max-width: 650px;
  }
  .auth-intro {
    padding: 28px;
  }
  .auth-intro h2 {
    font-size: 29px;
  }
  .auth-feature {
    margin: 12px 0;
  }
}
@media (max-width: 600px) {
  .shell {
    width: calc(100% - 28px);
  }
  .topbar {
    grid-template-columns: 1fr auto auto;
    gap: 6px;
  }
  .brand {
    gap: 6px;
  }
  .brand img {
    width: 35px;
    height: 44px;
  }
  .brand strong {
    font-size: 20px;
  }
  .brand small {
    font-size: 10px;
  }
  .top-actions .avatar {
    display: none;
  }
  .top-actions .button {
    padding: 7px 10px;
    font-size: 10px;
  }
  .kpi-grid.five,
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .auth-form {
    padding: 23px;
  }
  .auth-layout {
    margin-top: 15px;
  }
  .auth-intro {
    display: none;
  }
  .auth-form .button {
    width: 100%;
  }
  .admin-menu {
    gap: 6px;
  }
  .admin-menu .button {
    font-size: 10px;
    padding: 6px 10px;
  }
  .grid-map .map-wrap {
    min-height: 145px;
  }
}
@media print {
  .topbar {
    display: block;
  }
  .top-nav,
  .top-actions,
  .admin-menu,
  .auth-layout,
  .delete-details,
  .notice {
    display: none !important;
  }
  .shell {
    width: 100%;
    margin: 0;
  }
}

/* Versi 2.2: panel utilitas, preferensi browser, dan tema gelap. */
.rail-divider {
  height: 1px;
  background: #ffffff26;
  margin: 4px 9px;
}
.floating-rail button {
  position: relative;
}
.floating-rail button::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 17px);
  background: #171d19;
  color: #fff;
  padding: 7px 12px;
  border-radius: 9px;
  white-space: nowrap;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 0.15s,
    transform 0.15s;
}
.floating-rail button:hover::after,
.floating-rail button:focus-visible::after {
  opacity: 1;
  transform: none;
}
.utility-dialog {
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
.utility-dialog .muted {
  font-size: 13px;
  margin-bottom: 22px;
}
.utility-links {
  display: grid;
  gap: 9px;
}
.utility-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.utility-links a:hover {
  border-color: var(--green);
}
.utility-links a span {
  flex: 1;
}
html[data-density="compact"] .panel {
  padding: 17px;
}
html[data-density="compact"] .kpi {
  min-height: 112px;
  padding: 15px 18px;
}
html[data-density="compact"] td {
  padding-top: 8px;
  padding-bottom: 8px;
}
html[data-density="compact"] .grid {
  gap: 14px;
}

@media screen {
  html[data-theme="dark"] {
    color-scheme: dark;
    --canvas: #161d19;
    --surface: #222c26;
    --ink: #edf3ee;
    --muted: #acbbb1;
    --green: #80c79e;
    --blue: #92c8fa;
    --line: #36423a;
    --shadow: 0 8px 30px #0002;
  }
  html[data-theme="dark"] body {
    background: radial-gradient(ellipse at top, #263129, var(--canvas));
  }
  html[data-theme="dark"]
    :is(
      .panel,
      .kpi,
      .top-nav,
      .circle,
      .mobile-toggle,
      dialog,
      .button,
      .tabs,
      .skip-link
    ) {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line);
  }
  html[data-theme="dark"]
    :is(
      input,
      select,
      textarea,
      .form-grid input,
      .form-grid select,
      .form-grid textarea,
      .dialog-heading button
    ) {
    background: #1a231d;
    color: var(--ink);
    border-color: #495a4e;
  }
  html[data-theme="dark"]
    :is(
      .form-grid input:focus,
      .form-grid select:focus,
      .form-grid textarea:focus
    ) {
    background: #29372d;
  }
  html[data-theme="dark"]
    :is(
      .filters label,
      .form-grid label,
      .form-grid small,
      .auth-intro p,
      .auth-feature,
      .kpi small,
      .quick-links small,
      .profile-list dt
    ) {
    color: var(--muted);
  }
  html[data-theme="dark"] :is(.module-line, td, .directory-cards tr) {
    border-color: var(--line);
  }
  html[data-theme="dark"]
    :is(th, .top-nav a:hover, .admin-menu a:hover, .pagination a) {
    background: #2c3930;
    color: #d1ddd4;
  }
  html[data-theme="dark"]
    :is(
      .top-nav a.active,
      .button.dark,
      .tabs button.active,
      .pagination a.current
    ) {
    background: #dcebdd;
    color: #18231b;
    border-color: #dcebdd;
  }
  html[data-theme="dark"] .kpi.dark {
    background: #101712;
    border-color: #36483b;
  }
  html[data-theme="dark"] .kpi.blue {
    background: #263e50;
  }
  html[data-theme="dark"] :is(.sage, .kpi.sage, .auth-intro) {
    background: #293e30;
  }
  html[data-theme="dark"] .kpi.warm {
    background: #403a28;
  }
  html[data-theme="dark"] :is(.demo-tag, .badge.green, .notice, .report-icon) {
    background: #294333;
    color: #b0e1bf;
    border-color: #405e49;
  }
  html[data-theme="dark"] .badge.blue {
    background: #263f54;
    color: #acd8ff;
  }
  html[data-theme="dark"] .badge.amber {
    background: #4b4026;
    color: #f0d395;
  }
  html[data-theme="dark"] :is(.badge.red, .notice.error, .delete-details form) {
    background: #4a302b;
    color: #ffc2b2;
    border-color: #765044;
  }
  html[data-theme="dark"] .button.danger {
    background: #9d4f3c;
    color: white;
  }
  html[data-theme="dark"]
    :is(
      .quick-links a,
      .quick-links a:nth-child(n),
      .building-art,
      .coordinate-card
    ) {
    background: #2b3a30;
    color: var(--ink);
  }
  html[data-theme="dark"] .land {
    fill: #4e6d6c;
    stroke: #222c26;
  }
  html[data-theme="dark"] .map-point {
    fill: #94d5ad;
    stroke: #19251d;
  }
  html[data-theme="dark"] :is(progress, progress::-webkit-progress-bar) {
    background: #3b4a3f;
  }
  html[data-theme="dark"] .text-link {
    color: #9fd3b2;
  }
  html[data-theme="dark"] .eyebrow {
    color: #e0ba83;
  }
}
@media (max-width: 1000px) {
  /* Satu panel yang sama menjadi toolbar bawah agar utilitas tetap tersedia di ponsel. */
  .floating-rail {
    display: flex;
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    gap: 3px;
    padding: 7px 10px;
    border: 1px solid #ffffff20;
  }
  .rail-divider {
    width: 1px;
    height: 25px;
    align-self: center;
    margin: 0 5px;
  }
  .floating-rail button::after {
    display: none;
  }
  .footer {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}
@media print {
  .floating-rail,
  .utility-dialog {
    display: none !important;
  }
}
