/* =====================================================================
   P2DD KALSEL — tema antarmuka
   Palet diturunkan dari logo TP2DD Kalsel: biru tua (atap & grafik) dan
   oranye-kuning (orbit). Dimuat setelah Bootstrap 5.3.
   ===================================================================== */
:root {
  --navy-900: #082a66;
  --navy-800: #0b3b8c;
  --navy-700: #0f4ca8;
  --blue-600: #1565c0;
  --blue-500: #1e88e5;
  --orange-500: #f7931e;
  --orange-600: #ea6a0a;
  --amber-400: #ffc233;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --line: #e6eaf2;
  --line-strong: #d5dbe7;
  --ink: #0f1b33;
  --ink-2: #3b4a66;
  --muted: #6b7a96;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 33, 72, .05);
  --shadow: 0 1px 2px rgba(16, 33, 72, .04), 0 6px 20px -8px rgba(16, 33, 72, .12);
  --shadow-lg: 0 24px 60px -20px rgba(8, 42, 102, .35);

  --sidebar-w: 268px;
  --sidebar-mini: 78px;
  --topbar-h: 68px;

  --bs-primary: var(--navy-800);
  --bs-primary-rgb: 11, 59, 140;
  --bs-link-color: var(--blue-600);
  --bs-link-color-rgb: 21, 101, 192;
  --bs-link-hover-color: var(--navy-800);
  --bs-border-color: var(--line);
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--muted);
  --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--bs-body-font-family);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(247, 147, 30, .25); }
a { text-decoration: none; }
.text-muted { color: var(--muted) !important; }
.text-primary { color: var(--navy-800) !important; }
.bg-primary { background-color: var(--navy-800) !important; }
code { color: #b4441b; background: #fff4ea; padding: .1rem .35rem; border-radius: 6px; font-size: .85em; }

/* ---------------------------------------------------------------- Sidebar */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 1040;
  display: flex; flex-direction: column;
  transition: width .22s ease, transform .25s ease;
}
.sidebar-brand {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: center;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.sidebar-brand .brand-logo { height: 46px; width: auto; }
.sidebar-brand .brand-mark { height: 40px; width: 40px; display: none; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem .85rem 1rem; scrollbar-width: thin; }
.sidebar-section {
  padding: 1rem .75rem .4rem;
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: #9aa6bd;
  white-space: nowrap;
}
.sidebar-link {
  position: relative;
  display: flex; align-items: center; gap: .8rem;
  padding: .62rem .8rem;
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.sidebar-link i { font-size: 1.12rem; width: 22px; text-align: center; color: #7d8bab; transition: color .15s ease; flex-shrink: 0; }
.sidebar-link:hover { background: var(--surface-2); color: var(--navy-800); }
.sidebar-link:hover i { color: var(--navy-700); }
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(11, 59, 140, .10), rgba(11, 59, 140, .04));
  color: var(--navy-800); font-weight: 600;
}
.sidebar-link.active i { color: var(--navy-800); }
.sidebar-link.active::before {
  content: ''; position: absolute; left: -.85rem; top: 8px; bottom: 8px; width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--amber-400), var(--orange-600));
}
.sidebar-link .badge { margin-left: auto; }
.sidebar-foot { padding: .85rem; border-top: 1px solid var(--line); flex-shrink: 0; }
.sidebar-user {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .6rem; border-radius: var(--radius-sm); background: var(--surface-2);
  overflow: hidden;
}
.sidebar-user .meta { min-width: 0; line-height: 1.25; }
.sidebar-user .meta strong { display: block; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .meta span { font-size: .72rem; color: var(--muted); }

.avatar {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; color: #fff;
  background: linear-gradient(135deg, var(--navy-800), var(--blue-500));
}

/* Sidebar ringkas (desktop) */
@media (min-width: 992px) {
  .sidebar-mini .sidebar { width: var(--sidebar-mini); }
  .sidebar-mini .main-wrap { margin-left: var(--sidebar-mini); }
  .sidebar-mini .sidebar-brand { padding: 0; }
  .sidebar-mini .sidebar-brand .brand-logo { display: none; }
  .sidebar-mini .sidebar-brand .brand-mark { display: block; }
  .sidebar-mini .sidebar-nav { padding-inline: .7rem; }
  .sidebar-mini .sidebar-section { font-size: 0; padding: .6rem 0 .3rem; }
  .sidebar-mini .sidebar-section::after { content: ''; display: block; height: 1px; background: var(--line); margin: 0 .4rem; }
  .sidebar-mini .sidebar-link { justify-content: center; padding: .7rem 0; font-size: 0; }
  .sidebar-mini .sidebar-link i { font-size: 1.2rem; }
  .sidebar-mini .sidebar-link .badge { position: absolute; top: 2px; right: 4px; font-size: .6rem; padding: .2rem .35rem; }
  .sidebar-mini .sidebar-link.active::before { left: -.7rem; }
  .sidebar-mini .sidebar-user { justify-content: center; background: transparent; padding: 0; }
  .sidebar-mini .sidebar-user .meta { display: none; }
}

/* ---------------------------------------------------------------- Topbar & isi */
.main-wrap { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .22s ease; }
.topbar {
  height: var(--topbar-h);
  position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1.75rem;
  background: rgba(244, 246, 251, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.topbar.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.topbar .page-heading { min-width: 0; margin-right: auto; }
.page-title { font-size: 1.28rem; font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-crumb { font-size: .78rem; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-subtitle { color: var(--muted); font-size: .86rem; }
.btn-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  transition: all .15s ease; flex-shrink: 0;
}
.btn-icon:hover { color: var(--navy-800); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-icon i { font-size: 1.15rem; }
.cmd-trigger {
  display: flex; align-items: center; gap: .6rem;
  height: 40px; padding: 0 .6rem 0 .85rem; min-width: 250px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  color: var(--muted); font-size: .86rem; transition: all .15s ease;
}
.cmd-trigger:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); color: var(--ink-2); }
.cmd-trigger kbd, .kbd {
  margin-left: auto; font-family: inherit; font-size: .7rem; font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
  border-radius: 6px; padding: .1rem .4rem; box-shadow: none;
}
.user-chip {
  display: flex; align-items: center; gap: .6rem;
  padding: .25rem .65rem .25rem .25rem; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
}
.user-chip:hover, .user-chip[aria-expanded="true"] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.user-chip .who { line-height: 1.15; text-align: left; }
.user-chip .who strong { display: block; font-size: .84rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .who span { font-size: .7rem; color: var(--muted); }
.content { padding: 1.5rem 1.75rem 2rem; flex: 1; animation: masuk .35s ease both; }
@keyframes masuk { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.app-footer { padding: 1rem 1.75rem 1.5rem; color: var(--muted); font-size: .78rem; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; }

/* ---------------------------------------------------------------- Komponen */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--line);
  font-weight: 650; font-size: .95rem;
  padding: 1rem 1.25rem;
}
.card-header:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.card-header i { color: var(--navy-700); }
.card-body { padding: 1.25rem; }
.card-footer { background: var(--surface-2); border-top: 1px solid var(--line); }

.btn { border-radius: var(--radius-sm); font-weight: 600; padding: .5rem 1rem; transition: all .15s ease; }
.btn-sm { border-radius: 8px; padding: .32rem .7rem; font-size: .8rem; }
.btn-lg { border-radius: 12px; }
.btn-primary {
  --bs-btn-bg: var(--navy-800); --bs-btn-border-color: var(--navy-800);
  --bs-btn-hover-bg: var(--navy-900); --bs-btn-hover-border-color: var(--navy-900);
  --bs-btn-active-bg: var(--navy-900); --bs-btn-active-border-color: var(--navy-900);
  --bs-btn-disabled-bg: var(--navy-700); --bs-btn-disabled-border-color: var(--navy-700);
  background-image: linear-gradient(135deg, var(--navy-800), var(--blue-600));
  border: 0;
  box-shadow: 0 4px 12px -4px rgba(11, 59, 140, .45);
}
.btn-primary:hover { background-image: linear-gradient(135deg, var(--navy-900), var(--navy-800)); transform: translateY(-1px); }
.btn-outline-primary {
  --bs-btn-color: var(--navy-800); --bs-btn-border-color: rgba(11, 59, 140, .35);
  --bs-btn-hover-bg: var(--navy-800); --bs-btn-hover-border-color: var(--navy-800);
  --bs-btn-active-bg: var(--navy-900);
}
.btn-accent {
  color: #fff; border: 0;
  background-image: linear-gradient(135deg, var(--amber-400), var(--orange-600));
  box-shadow: 0 4px 12px -4px rgba(234, 106, 10, .5);
}
.btn-accent:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.04); }
.btn-light { background: var(--surface); border-color: var(--line); }
.btn-outline-secondary { --bs-btn-color: var(--ink-2); --bs-btn-border-color: var(--line-strong); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-color: var(--navy-800); --bs-btn-hover-border-color: var(--line-strong); }
.btn.is-loading { pointer-events: none; opacity: .85; }

.form-control, .form-select {
  border-color: var(--line-strong); border-radius: var(--radius-sm);
  padding: .55rem .85rem; font-size: .9rem;
}
.form-control-sm, .form-select-sm { border-radius: 8px; padding: .32rem .65rem; font-size: .82rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(30, 136, 229, .14);
}
.form-check-input:checked { background-color: var(--navy-800); border-color: var(--navy-800); }
.form-label { font-weight: 600; color: var(--ink-2); font-size: .84rem; margin-bottom: .35rem; }
.input-group-text { background: var(--surface-2); border-color: var(--line-strong); color: var(--muted); border-radius: var(--radius-sm); }

.badge { font-weight: 600; letter-spacing: .01em; padding: .38em .62em; border-radius: 7px; }
.bg-primary-soft { background: rgba(11, 59, 140, .09) !important; color: var(--navy-800) !important; }
.bg-success-soft { background: rgba(16, 163, 110, .11) !important; color: #0b7a53 !important; }
.bg-warning-soft { background: rgba(247, 147, 30, .14) !important; color: #b45a06 !important; }
.bg-danger-soft  { background: rgba(225, 54, 54, .10) !important; color: #c22727 !important; }
.bg-info-soft    { background: rgba(30, 136, 229, .11) !important; color: #1261b3 !important; }
.bg-orange-soft  { background: rgba(247, 147, 30, .14) !important; color: #c25a00 !important; }

.alert {
  border: 1px solid transparent; border-left-width: 4px;
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
}
.alert.alert-dismissible { padding-right: 3rem; }
.alert-success { background: #ecfbf4; border-color: #c4eedb; border-left-color: #10a36e; color: #0b5e41; }
.alert-danger  { background: #fdf0f0; border-color: #f6cfcf; border-left-color: #e13636; color: #8f1f1f; }
.alert-warning { background: #fff6e9; border-color: #fbdcb3; border-left-color: var(--orange-500); color: #7a3f04; }
.alert-info    { background: #eef5ff; border-color: #cfe1fb; border-left-color: var(--blue-500); color: #163e74; }
.alert-info a, .alert-warning a { font-weight: 600; }

.nav-tabs { border-bottom: 1px solid var(--line); gap: .25rem; }
.nav-tabs .nav-link {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  color: var(--muted); font-weight: 600; padding: .65rem 1rem;
}
.nav-tabs .nav-link:hover { color: var(--navy-800); border-bottom-color: var(--line-strong); }
.nav-tabs .nav-link.active { color: var(--navy-800); background: transparent; border-bottom-color: var(--orange-500); }
.nav-pills .nav-link { border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 600; }
.nav-pills .nav-link.active { background: var(--navy-800); }

.dropdown-menu {
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: .4rem; font-size: .88rem;
  animation: muncul .14s ease both;
}
.dropdown-item { border-radius: 8px; padding: .5rem .7rem; }
.dropdown-item:active { background: var(--navy-800); }
@keyframes muncul { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

.modal-content { border: 0; border-radius: 18px; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--line); padding: 1.1rem 1.4rem; }
.modal-title { font-weight: 700; font-size: 1.05rem; }
.modal-body { padding: 1.4rem; }
.modal-footer { border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 18px 18px; }
.modal-backdrop.show { opacity: .4; }

.progress { background: #e9eef7; border-radius: 99px; }
.progress-bar { border-radius: 99px; }
.pagination .page-link { border-radius: 8px !important; margin: 0 2px; border-color: var(--line); color: var(--ink-2); }
.pagination .page-item.active .page-link { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* ---------------------------------------------------------------- Tabel */
.table { --bs-table-hover-bg: #f5f8fe; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .72rem .8rem; border-bottom-color: var(--line); }
.table-sm > :not(caption) > * > * { padding: .45rem .6rem; }
.table thead th, .table .table-light th {
  background: var(--surface-2) !important; color: var(--muted) !important;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--line) !important; white-space: nowrap;
}
.table-light { --bs-table-bg: var(--surface-2); }
.table-responsive { border-radius: var(--radius-sm); }
div.dataTables_wrapper div.dataTables_filter input {
  border-radius: var(--radius-sm); border-color: var(--line-strong); padding: .4rem .8rem .4rem 2rem; margin-left: 0;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%236b7a96' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E") no-repeat .7rem center;
}
div.dataTables_wrapper div.dataTables_length select { border-radius: 8px; }
div.dataTables_wrapper div.dataTables_info { color: var(--muted); font-size: .8rem; }

/* ---------------------------------------------------------------- Kartu statistik */
.stat-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.2rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card .stat-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.stat-value { font-size: 1.65rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.stat-label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.stat-card::after {
  content: ''; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 59, 140, .06), transparent 70%);
}

.hero {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 1.5rem 1.6rem;
  color: #fff;
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(255, 194, 51, .35), transparent 60%),
    radial-gradient(500px 260px at 0% 100%, rgba(30, 136, 229, .5), transparent 60%),
    linear-gradient(135deg, var(--navy-900), var(--navy-700));
  box-shadow: var(--shadow-lg);
}
.hero h2 { font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; margin-bottom: .25rem; }
.hero p { opacity: .85; margin: 0; }
.hero .hero-orbit {
  position: absolute; right: -60px; top: -40px; width: 300px; height: 300px; border-radius: 50%;
  border: 18px solid rgba(255, 194, 51, .18); transform: rotate(-20deg) scaleY(.45);
}
.hero .chip {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 99px; padding: .3rem .75rem; font-size: .78rem; font-weight: 600; color: #fff;
}
.hero .chip:hover { background: rgba(255, 255, 255, .22); }

.metric-tile {
  border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; background: var(--surface);
  height: 100%; transition: border-color .15s ease;
}
.metric-tile:hover { border-color: var(--line-strong); }
.metric-tile .ico { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.6rem; display: block; margin-bottom: .5rem; color: #b8c2d6; }

/* ---------------------------------------------------------------- Berkas & tautan */
.file-list-item, .link-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: .45rem;
  background: var(--surface-2); transition: border-color .15s ease;
}
.file-list-item:hover, .link-item:hover { border-color: var(--line-strong); }
.file-list-item .file-icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-800), var(--blue-500)); color: #fff;
}
.link-item { background: #f2f8ff; }

/* ---------------------------------------------------------------- Palet perintah (Ctrl+K) */
.cmdk .modal-dialog { max-width: 580px; margin-top: 12vh; }
.cmdk .modal-content { overflow: hidden; }
.cmdk-search { display: flex; align-items: center; gap: .7rem; padding: .95rem 1.15rem; border-bottom: 1px solid var(--line); }
.cmdk-search i { color: var(--muted); font-size: 1.1rem; }
.cmdk-search input { border: 0; outline: 0; flex: 1; font-size: 1rem; background: transparent; color: var(--ink); }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: .45rem; }
.cmdk-group { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9aa6bd; padding: .6rem .7rem .3rem; }
.cmdk-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .7rem; border-radius: 10px; color: var(--ink-2); cursor: pointer;
}
.cmdk-item i { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--navy-700); }
.cmdk-item .hint { margin-left: auto; font-size: .72rem; color: var(--muted); }
.cmdk-item.active { background: rgba(11, 59, 140, .08); color: var(--navy-800); }
.cmdk-item.active i { background: var(--navy-800); color: #fff; }
.cmdk-empty { padding: 2rem; text-align: center; color: var(--muted); }
.cmdk-foot { display: flex; gap: 1rem; padding: .55rem 1.1rem; border-top: 1px solid var(--line); background: var(--surface-2); font-size: .72rem; color: var(--muted); }

/* ---------------------------------------------------------------- Pustaka pihak ketiga */
.select2-container--bootstrap-5 .select2-selection { border-color: var(--line-strong); border-radius: var(--radius-sm); min-height: calc(1.5em + 1.1rem + 2px); }
.select2-container--bootstrap-5.select2-container--focus .select2-selection { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(30, 136, 229, .14); }
.swal2-popup { border-radius: 18px !important; font-family: var(--bs-body-font-family) !important; }
.swal2-styled.swal2-confirm { border-radius: 10px !important; }
.swal2-styled.swal2-cancel { border-radius: 10px !important; }

/* ---------------------------------------------------------------- Responsif */
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(8, 20, 45, .45); z-index: 1035; backdrop-filter: blur(2px); }
.sidebar-backdrop.show { display: block; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.show { transform: none; }
  .main-wrap { margin-left: 0; }
  .topbar { padding: 0 1rem; }
  .content { padding: 1.1rem 1rem 1.5rem; }
  .app-footer { padding: 1rem; }
  .cmd-trigger { min-width: 0; width: 40px; padding: 0; justify-content: center; }
  .cmd-trigger span, .cmd-trigger kbd { display: none; }
}
@media (max-width: 575.98px) {
  .page-title { font-size: 1.08rem; }
  .page-crumb { display: none; }
  .stat-value { font-size: 1.35rem; }
}

/* ---------------------------------------------------------------- Cetak */
@media print {
  .sidebar, .topbar, .app-footer, .sidebar-backdrop, .btn, .dataTables_filter, .dataTables_length, .dataTables_paginate, form .btn { display: none !important; }
  .main-wrap { margin: 0 !important; }
  .content { padding: 0 !important; animation: none; }
  .card { box-shadow: none !important; border-color: #ccc; break-inside: avoid; }
  body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* angka (kolom rata kanan) tidak dipotong: "Rp" tetap satu baris dengan nilainya */
.table td.text-end, .table th.text-end { white-space: nowrap; }
