    :root {
      --tni-green: #2e7d32;
      --tni-green-dark: #1b5e20;
      --tni-green-light: #4caf50;
      --tni-green-bg: #e8f5e9;
      --tni-gold: #eab308;
      --tni-yellow: #f59e0b;
      --tni-blue: #3b82f6;
      --sidebar-width: 250px;

      --sl-color-primary-50:  #f0fdf4;
      --sl-color-primary-100: #dcfce7;
      --sl-color-primary-200: #bbf7d0;
      --sl-color-primary-300: #86efac;
      --sl-color-primary-400: #4ade80;
      --sl-color-primary-500: #22c55e;
      --sl-color-primary-600: #16a34a;
      --sl-color-primary-700: #15803d;
      --sl-color-primary-800: #166534;
      --sl-color-primary-900: #14532d;
      --sl-color-primary-950: #052e16;

      /* Shoelace global form controls aligned with buttons (32px, 6px radius) */
      --sl-input-height-small: 32px;
      --sl-input-height-medium: 32px;
      --sl-input-border-radius-small: 6px;
      --sl-input-border-radius-medium: 6px;
      --sl-input-font-size-small: 0.8rem;
      --sl-input-font-size-medium: 0.8rem;

      /* Shoelace z-index stack: dialog & dropdown di atas sticky topbar (1020) & mobile topbar (1025) */
      --sl-z-index-drawer: 1040;
      --sl-z-index-dialog: 1055;
      --sl-z-index-dropdown: 1065;
      --sl-z-index-toast: 1075;
      --sl-z-index-tooltip: 1085;
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }

    body {
      font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
      background: #f0f2f5;
      overflow-x: hidden;
    }

    .sidebar {
      width: var(--sidebar-width);
      height: 100vh;
      align-self: flex-start;
      background: #fff;
      color: #374151;
      flex-shrink: 0;
      transition: transform 0.3s ease, width 0.3s ease;
      position: sticky;
      top: 0;
      z-index: 100;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 1px 0 8px rgba(0,0,0,0.04);
    }

    .sidebar-nav .nav-children {
      list-style: none;
      padding: 0;
      padding-left: 1.75rem;
      border-left: 2px solid rgba(0,0,0,0.06);
      margin-left: 1.5rem;
    }

    .sidebar-nav .nav-link-parent {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.55rem 1.5rem;
      color: #6b7280;
      text-decoration: none;
      font-size: 0.875rem;
      border-left: 3px solid transparent;
      transition: all 0.2s ease;
    }

    .sidebar-nav .nav-link-parent:hover {
      color: var(--tni-green-dark);
      background: rgba(0,0,0,0.03);
    }

    .sidebar-nav .collapse-icon {
      font-size: 0.65rem;
      transition: transform 0.2s ease;
    }

    .sidebar-nav .nav-link-parent:not(.collapsed) .collapse-icon {
      transform: rotate(180deg);
    }

    .sidebar::after {
      content: '';
      position: absolute;
      right: 0;
      top: 0;
      bottom: 0;
      width: 1px;
      background: #ced0d4;
    }

    .sidebar .brand {
      padding: 1.25rem 1.5rem;
      display: flex;
      align-items: center;
      gap: 0.75rem;
      border-bottom: 1px solid #ced0d4;
    }

    .sidebar .brand .brand-icon {
      width: 40px; height: 40px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      color: var(--tni-green-dark);
      flex-shrink: 0;
      overflow: hidden;
      background: transparent;
    }

    .sidebar .brand .brand-icon .brand-img {
      object-fit: cover;
      border-radius: inherit;
      height: 40px;
      width: 40px;
    }

    .sidebar .brand .brand-text { line-height: 1.2; }
    .sidebar .brand .brand-text .top {
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--tni-green-dark);
      letter-spacing: 0.02em;
    }

    .sidebar .brand .brand-text .sub {
      font-size: 0.65rem;
      color: rgba(0,0,0,0.35);
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .sidebar .nav-section {
      padding: 1rem 1.5rem 0.35rem;
      font-size: 0.65rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: rgba(0,0,0,0.35);
      font-weight: 600;
    }

    .sidebar .nav-item { padding: 0.4rem 0; }
    .sidebar .nav-link {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.55rem 1.5rem;
      color: #6b7280;
      text-decoration: none;
      font-size: 0.875rem;
      border-radius: 0;
      transition: all 0.2s ease;
      border-left: 3px solid transparent;
    }

    .sidebar .nav-link:hover { color: var(--tni-green-dark); background: rgba(0,0,0,0.03); }
    .sidebar .nav-link.active {
      color: var(--tni-green-dark);
      background: rgba(46,125,50,0.07);
      border-left-color: var(--tni-green);
      font-weight: 600;
    }

    .sidebar .nav-link i { font-size: 1.1rem; width: 20px; text-align: center; }

    /* ── Sidebar nav scrollable ──────────────────────── */
    .sidebar-nav {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
    }

    /* ── Sidebar collapse: hide/show helpers ─────────── */
    .hide-when-close { /* visible by default */ }
    .show-when-close { display: none !important; }

    .sidebar.is-closed {
      width: 62px;
    }

    .sidebar.is-closed .hide-when-close {
      display: none !important;
    }

    .sidebar.is-closed .show-when-close {
      display: block !important;
    }

    /* Center icons in collapsed state */
    .sidebar.is-closed .nav-link,
    .sidebar.is-closed .nav-link-parent {
      padding-left: 0;
      padding-right: 0;
      justify-content: center;
    }

    .sidebar.is-closed .brand {
      justify-content: center;
      padding: 1.25rem 0;
    }

    /* ── Sidebar footer panel ────────────────────────── */
    .sidebar-footer-panel {
      border-top: 1px solid #ced0d4;
      min-height: 60px;
      padding: 0.65rem 0.85rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      flex-shrink: 0;
    }

    .sidebar.is-closed .sidebar-footer-panel {
      justify-content: center;
      padding: 0.65rem 0;
    }

    .sidebar-user-wrap {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      overflow: hidden;
      min-width: 0;
    }

    .sidebar-user-avatar {
      width: 32px; height: 32px;
      border-radius: 50%;
      background: var(--tni-green);
      border: 2px solid rgba(46,125,50,0.2);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.72rem;
      font-weight: 700;
      flex-shrink: 0;
      letter-spacing: 0.02em;
    }

    .sidebar-user-text {
      min-width: 0;
      overflow: hidden;
    }

    .sidebar-user-name {
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--tni-green-dark);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .sidebar-user-role {
      font-size: 0.65rem;
      color: rgba(0,0,0,0.4);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .sidebar-toggle-btn {
      background: rgba(0,0,0,0.04);
      border: none;
      color: rgba(0,0,0,0.5);
      width: 28px; height: 28px;
      border-radius: 7px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      cursor: pointer;
      transition: background 0.2s, color 0.2s;
      padding: 0;
    }

    .sidebar-toggle-btn:hover {
      background: rgba(0,0,0,0.08);
      color: var(--tni-green-dark);
    }

    .sidebar-expand-icon {
      font-size: 0.75rem;
      transition: transform 0.3s ease;
    }

    /* .sidebar.is-closed .sidebar-expand-icon { transform: rotate(180deg); } */

    .sidebar.is-closed #sidebarCollapseBtn::part(base) {
      rotate: 180deg;
      transition: rotate 0.3s ease;
    }

    #sidebarCollapseBtn::part(base) {
      transition: rotate 0.3s ease, background 0.2s;
    }

    /* Divider shown in collapsed state instead of section label */
    .sidebar-section-divider {
      border-color: rgba(0,0,0,0.06);
      margin: 0.35rem 0.75rem;
    }

    .sidebar-backdrop {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.4);
      z-index: 99;
    }

    .sidebar-backdrop.show { display: block; }

    .main-wrapper {
      flex: 1;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    .topbar {
      height: 56px;
      background: rgba(255,255,255,0.95);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid #ced0d4;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 0.75rem;
      position: static;
    }

    .topbar .page-title {
      font-weight: 600;
      font-size: 0.95rem;
      color: #1a3c1f;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .avatar-wrapper {
      position: relative;
      display: inline-flex;
    }

    .avatar-wrapper .avatar {
      width: 34px; height: 34px;
      border-radius: 50%;
      background: var(--tni-green);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      font-weight: 700;
      flex-shrink: 0;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
      letter-spacing: 0.02em;
      border: 2px solid rgba(255,255,255,0.8);
    }

    .avatar-wrapper .status-dot {
      position: absolute;
      bottom: 1px; right: 1px;
      width: 9px; height: 9px;
      border-radius: 50%;
      background: #22c55e;
      border: 2px solid #fff;
      box-shadow: 0 0 0 1px rgba(34,197,94,0.25);
    }

    .profile-trigger {
      background: none;
      border: none;
      padding: 4px 8px 4px 4px;
      border-radius: 100px;
      transition: background 0.15s ease;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .profile-trigger:hover {
      background: rgba(0,0,0,0.04);
    }

    .profile-trigger:focus-visible {
      outline: 2px solid var(--tni-green);
      outline-offset: 2px;
    }

    .profile-trigger:hover .avatar {
      transform: scale(1.06);
      box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
    }

    .profile-trigger .username {
      font-size: 0.82rem;
      font-weight: 600;
      color: #1f2937;
      display: none;
      line-height: 1.2;
    }

    .profile-trigger .chevron {
      font-size: 0.6rem;
      color: #9ca3af;
      transition: transform 0.2s ease;
    }

    .profile-trigger[aria-expanded="true"] .chevron {
      transform: rotate(180deg);
    }

    sl-button .dropdown-chevron {
      transition: transform 0.2s ease;
      font-size: 0.7rem;
    }
    sl-button[aria-expanded="true"] .dropdown-chevron,
    .dropdown.show sl-button .dropdown-chevron {
      transform: rotate(180deg);
    }

    /* ── Profile Dropdown ──────────────────────────── */
    .topbar .dropdown { position: relative; z-index: 10; }

    .profile-dropdown {
      border: none;
      border-radius: 14px;
      box-shadow: 0 12px 40px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.06);
      min-width: 220px;
      padding: 0;
      inset: 100% 0 auto auto !important;
      transform: none !important;
      overflow-x: hidden;
    }

    .profile-dropdown.show {
      animation: dropReveal 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
      transform-origin: top var(--drop-x, 50%);
    }

    @keyframes dropReveal {
      0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.94);
        clip-path: inset(0 0 100% 0 round 14px);
      }
      60% {
        opacity: 1;
        transform: translateY(2px) scale(1.015);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        clip-path: inset(0 0 0 0 round 14px);
      }
    }

    .profile-dropdown.hiding {
      animation: dropHide 0.18s cubic-bezier(0.4, 0, 0.2, 1) forwards;
      transform-origin: top var(--drop-x, 50%);
      pointer-events: none;
    }

    @keyframes dropHide {
      0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        clip-path: inset(0 0 0 0 round 14px);
      }
      100% {
        opacity: 0;
        transform: translateY(-6px) scale(0.95);
        clip-path: inset(0 0 100% 0 round 14px);
      }
    }

    .profile-dropdown .dropdown-header {
      background: var(--tni-green);
      color: #fff;
      padding: 14px 16px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .profile-dropdown .dropdown-header .header-avatar {
      width: 40px; height: 40px;
      border-radius: 50%;
      background: rgba(255,255,255,0.2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 0.9rem;
      flex-shrink: 0;
      border: 2px solid rgba(255,255,255,0.3);
      margin-right: 8px;
    }

    .profile-dropdown .dropdown-header .header-info { line-height: 1.3; }
    .profile-dropdown .dropdown-header .header-name {
      font-weight: 700;
      font-size: 0.85rem;
    }
    .profile-dropdown .dropdown-header .header-role {
      font-size: 0.7rem;
      opacity: 0.75;
    }

    .profile-dropdown .dropdown-divider {
      margin: 4px 0;
      border-color: #f0f0f0;
    }

    .profile-dropdown .dropdown-item {
      width: calc(100% - 12px);
      box-sizing: border-box;
      border-radius: 8px;
      padding: 8px 14px;
      margin: 2px 6px;
      font-size: 0.82rem;
      color: #374151;
      display: flex;
      align-items: center;
      gap: 10px;
      transition: all 0.15s ease;
    }

    .profile-dropdown .dropdown-item i {
      font-size: 1rem;
      width: 18px;
      text-align: center;
      color: #6b7280;
      transition: color 0.15s ease;
    }

    .profile-dropdown .dropdown-item:hover {
      background: rgba(46,125,50,0.08);
      color: var(--tni-green);
    }

    .profile-dropdown .dropdown-item:hover i {
      color: var(--tni-green);
    }

    .profile-dropdown .dropdown-item.text-danger {
      position: relative;
      overflow: hidden;
      z-index: 0;
    }

    .profile-dropdown .dropdown-item.text-danger::before {
      content: '';
      position: absolute;
      inset: 0;
      z-index: -1;
      background: #fef2f2;
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.2s ease;
      border-radius: inherit;
    }

    .profile-dropdown .dropdown-item.text-danger:hover::before {
      transform: scaleX(1);
    }

    .profile-dropdown .dropdown-item.text-danger:hover {
      color: #dc2626 !important;
    }

    .profile-dropdown .dropdown-item.text-danger i {
      transition: transform 0.2s ease;
    }

    .profile-dropdown .dropdown-item.text-danger:hover i {
      color: #dc2626;
      transform: translateX(3px);
    }

    .profile-dropdown .dropdown-item.text-danger .dropdown-text {
      transition: transform 0.2s ease;
    }

    .profile-dropdown .dropdown-item.text-danger:hover .dropdown-text {
      transform: translateX(3px);
    }

    html.dark-mode .profile-dropdown .dropdown-item.text-danger,
    html[data-bs-theme="dark"] .profile-dropdown .dropdown-item.text-danger {
      color: #f87171 !important;
    }

    html.dark-mode .profile-dropdown .dropdown-item.text-danger::before,
    html[data-bs-theme="dark"] .profile-dropdown .dropdown-item.text-danger::before {
      background: rgba(220, 38, 38, 0.16);
    }

    html.dark-mode .profile-dropdown .dropdown-item.text-danger:hover,
    html[data-bs-theme="dark"] .profile-dropdown .dropdown-item.text-danger:hover {
      color: #fca5a5 !important;
    }

    html.dark-mode .profile-dropdown .dropdown-item.text-danger i,
    html[data-bs-theme="dark"] .profile-dropdown .dropdown-item.text-danger i {
      color: #f87171;
    }

    html.dark-mode .profile-dropdown .dropdown-item.text-danger:hover i,
    html[data-bs-theme="dark"] .profile-dropdown .dropdown-item.text-danger:hover i {
      color: #fca5a5;
    }

    /* ── Themed Dropdown Menu (Export / Excel filters) ── */
    .dropdown-menu-tni {
      border: none;
      border-radius: 14px;
      box-shadow: 0 12px 40px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.06);
      padding: 0.3rem;
      font-size: 0.82rem;
    }
    .dropdown-menu-tni .dropdown-item {
      border-radius: 8px;
      padding: 8px 12px;
      margin: 2px 0;
      font-size: 0.82rem;
      color: #374151;
      transition: all 0.15s ease;
    }
    .dropdown-menu-tni .dropdown-item:hover,
    .dropdown-menu-tni .dropdown-item:focus,
    .dropdown-menu-tni .dropdown-item:active,
    .dropdown-menu-tni .dropdown-item.active {
      background: var(--tni-green-bg) !important;
      color: var(--tni-green-dark) !important;
    }
    .dropdown-menu-tni .dropdown-item:hover strong,
    .dropdown-menu-tni .dropdown-item:focus strong,
    .dropdown-menu-tni .dropdown-item:active strong,
    .dropdown-menu-tni .dropdown-item.active strong {
      color: var(--tni-green-dark);
    }
    .dropdown-menu-tni .dropdown-item:hover .text-muted,
    .dropdown-menu-tni .dropdown-item:focus .text-muted,
    .dropdown-menu-tni .dropdown-item:active .text-muted,
    .dropdown-menu-tni .dropdown-item.active .text-muted {
      color: #6b7280 !important;
    }
    .dropdown-menu-tni .dropdown-item:hover i,
    .dropdown-menu-tni .dropdown-item:focus i,
    .dropdown-menu-tni .dropdown-item:active i,
    .dropdown-menu-tni .dropdown-item.active i {
      color: var(--tni-green) !important;
    }
    .dropdown-menu-tni .dropdown-item strong {
      display: block;
      font-weight: 600;
    }
    .dropdown-menu-tni .dropdown-item .text-muted {
      font-size: 0.7rem;
      margin-top: 1px;
    }
    .dropdown-menu-tni .dropdown-item i {
      font-size: 1rem;
      width: 18px;
      text-align: center;
      color: #6b7280;
      transition: color 0.15s ease;
    }
    .dropdown-menu-tni .dropdown-divider {
      margin: 4px 0;
      border-color: #f0f0f0;
    }

    html.dark-mode .dropdown-menu-tni {
      background: #1e1e1e;
    }
    html.dark-mode .dropdown-menu-tni .dropdown-item {
      color: #e0e0e0;
    }
    html.dark-mode .dropdown-menu-tni .dropdown-item:hover,
    html.dark-mode .dropdown-menu-tni .dropdown-item:focus,
    html.dark-mode .dropdown-menu-tni .dropdown-item:active,
    html.dark-mode .dropdown-menu-tni .dropdown-item.active {
      background: rgba(76,175,80,0.15) !important;
      color: #86efac !important;
    }
    html.dark-mode .dropdown-menu-tni .dropdown-divider {
      border-color: #2a2a2a;
    }

    /* ── Dark mode toggle switch ───────────────────── */
    #darkModeSwitch::part(control) {
      background: #d1d5db;
    }

    #darkModeSwitch[checked]::part(control) {
      background: var(--tni-green);
    }
    
    .theme-toggle {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 14px;
      margin: 2px 6px;
      border-radius: 8px;
      font-size: 0.82rem;
      color: #374151;
      gap: 10px;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .theme-toggle:hover {
      background: rgba(46,125,50,0.08);
      color: var(--tni-green);
    }

    .theme-toggle .toggle-left {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .theme-toggle .toggle-left i { font-size: 1rem; width: 18px; text-align: center; color: #6b7280; }

    .theme-switch {
      position: relative;
      display: inline-block;
      width: 36px; height: 20px;
      flex-shrink: 0;
    }

    .theme-switch input { opacity: 0; width: 0; height: 0; }

    .theme-switch .slider {
      position: absolute;
      cursor: pointer;
      inset: 0;
      background: #d1d5db;
      border-radius: 20px;
      transition: 0.25s;
    }

    .theme-switch .slider::before {
      content: '';
      position: absolute;
      height: 16px; width: 16px;
      left: 2px; bottom: 2px;
      background: #fff;
      border-radius: 50%;
      transition: 0.25s;
      box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }

    .theme-switch input:checked + .slider { background: var(--tni-green); }
    .theme-switch input:checked + .slider::before { transform: translateX(16px); }

    /* .hamburger {
      display: none;
      background: none;
      border: none;
      font-size: 1.4rem;
      color: #374151;
      cursor: pointer;
      padding: 0.25rem;
      margin-right: 0.5rem;
    } */ 

    .hamburger::part(base) {
      display: none;
      color: #374151;
      padding: 0.25rem;
      border: none;
      background: none;
      border-radius: 6px;
      font-size: 1.4rem;
      margin-right: 0.5rem;
    }

    .hamburger::part(base):hover {
      background: rgba(0,0,0,0.05);
      color: var(--tni-green-dark);
    }

    .content-area { padding: 1rem; flex: 1; }

    .card-tni {
      background: #fff;
      border: none;
      border-radius: 16px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
      display: flex;
      flex-direction: column;
      height: calc(100vh - 88px);
      max-height: calc(100vh - 88px);
      overflow: hidden;
    }

    .card-tni .card-header {
      background: transparent;
      border-bottom: 1px solid #f0f0f0;
      padding: 0.75rem 1rem;
      border-radius: 16px 16px 0 0;
      flex-shrink: 0;
    }

    .card-tni .card-body { padding: 0; }

    .card-tni .card-body.hot-pagination-wrap {
      flex: 1;
      overflow: hidden;
      min-height: 0;
    }

    /* ── Shoelace custom button classes ── */
    sl-button.btn-tni,
    sl-button.btn-tni-outline,
    sl-button.btn-yellow-sl,
    sl-button.btn-outline-yellow-sl,
    sl-button.btn-blue-sl,
    sl-button.btn-outline-blue-sl,
    sl-button.btn-danger-sl,
    sl-button.btn-outline-danger-sl {
      --sl-spacing-x-small: 0;
      --sl-spacing-small:   0;
      --sl-spacing-medium:  0;
      --sl-input-height-medium: auto;
      --sl-input-height-small:  auto;
    }

    /* Shared layout — WAJIB display:inline-flex agar icon+teks sejajar */
    sl-button.btn-tni::part(base),
    sl-button.btn-tni-outline::part(base),
    sl-button.btn-yellow-sl::part(base),
    sl-button.btn-outline-yellow-sl::part(base),
    sl-button.btn-blue-sl::part(base),
    sl-button.btn-outline-blue-sl::part(base),
    sl-button.btn-danger-sl::part(base),
    sl-button.btn-outline-danger-sl::part(base) {
      display: inline-flex !important;
      align-items: center      !important;
      justify-content:  center      !important;
      gap:              5px         !important;
      line-height:      1           !important;
      height:           32px        !important;
      padding:          0 12px      !important;
      border-radius:    6px         !important;
      font-size:        0.8rem      !important;
      font-weight:      600         !important;
      white-space:      nowrap;
      transition:       all 0.2s ease;
    }

    /* Icon slot */
    sl-button::part(prefix) {
      display:      inline-flex !important;
      align-items:  center      !important;
      line-height:  1           !important;
      margin-right: 3px;
      font-size:    0.85rem     !important;
    }
    sl-button::part(suffix) {
      display:      inline-flex !important;
      align-items:  center      !important;
      line-height:  1           !important;
      margin-left:  3px;
      font-size:    0.85rem     !important;
    }
    sl-button::part(caret) {
      display:      inline-flex !important;
      align-items:  center      !important;
      line-height:  1           !important;
      margin-left:  2px;
      font-size:    0.85rem     !important;
    }
    sl-button sl-icon {
      font-size:    0.85rem     !important;
    }

    /* ── Warna per varian ── */
    sl-button.btn-tni::part(base) {
      background: var(--tni-green) !important;
      border: none !important; color: #fff !important;
    }

    sl-button.btn-tni::part(base):hover {
      background: var(--tni-green-dark) !important;
      transform: translateY(-1px) !important;
      box-shadow: 0 4px 14px rgba(22,163,74,.3) !important;
    }

    sl-button.btn-tni-outline::part(base) {
      background: transparent !important;
      color: var(--tni-green) !important;
      border: 1px solid var(--tni-green) !important;
    }

    sl-button.btn-tni-outline::part(base):hover {
      background: var(--tni-green) !important;
      color: #fff !important;
      transform: translateY(-1px) !important;
      box-shadow: 0 4px 14px rgba(22,163,74,.3) !important;
    }

    sl-button.btn-tni-outline::part(base):active {
      transform: translateY(0) !important;
      box-shadow: none !important;
    }

    sl-button.btn-yellow-sl::part(base) {
      background: var(--tni-yellow, #f59e0b) !important;
      border: none !important; color: #fff !important;
    }
    sl-button.btn-yellow-sl::part(base):hover {
      background: #d97706 !important;
      transform: translateY(-1px) !important;
      box-shadow: 0 4px 14px rgba(245,158,11,.3) !important;
    }

    sl-button.btn-outline-yellow-sl::part(base) {
      background: #fffbeb !important; color: #d97706 !important;
      border: 1px solid #f59e0b !important;
    }
    sl-button.btn-outline-yellow-sl::part(base):hover {
      background: var(--tni-yellow, #f59e0b) !important;
      color: #fff !important; border-color: transparent !important;
    }

    sl-button.btn-blue-sl::part(base) {
      background: var(--tni-blue, #3b82f6) !important;
      border: none !important; color: #fff !important;
    }
    sl-button.btn-blue-sl::part(base):hover {
      transform: translateY(-1px) !important;
      box-shadow: 0 4px 14px rgba(37,99,235,.3) !important;
    }

    sl-button.btn-outline-blue-sl::part(base) {
      background: #eef4ff !important; color: #3b82f6 !important;
      border: 1px solid #3b82f6 !important;
    }
    sl-button.btn-outline-blue-sl::part(base):hover {
      background: var(--tni-blue, #3b82f6) !important;
      color: #fff !important; border-color: transparent !important;
    }

    sl-button.btn-danger-sl::part(base) {
      background: #dc2626 !important;
      border: none !important; color: #fff !important;
    }
    sl-button.btn-danger-sl::part(base):hover {
      background: #b91c1c !important; transform: translateY(-1px) !important;
      box-shadow: 0 4px 14px rgba(185,28,28,.3) !important;
    }

    sl-button.btn-outline-danger-sl::part(base) {
      background: transparent !important; color: #dc2626 !important;
      border: 1px solid #dc2626 !important;
    }
    sl-button.btn-outline-danger-sl::part(base):hover {
      background: #dc2626 !important; color: #fff !important;
    }

    sl-button[size="small"].btn-tni::part(base),
    sl-button[size="small"].btn-tni-outline::part(base),
    sl-button[size="small"].btn-yellow-sl::part(base),
    sl-button[size="small"].btn-outline-yellow-sl::part(base),
    sl-button[size="small"].btn-blue-sl::part(base),
    sl-button[size="small"].btn-outline-blue-sl::part(base),
    sl-button[size="small"].btn-danger-sl::part(base),
    sl-button[size="small"].btn-outline-danger-sl::part(base),
    sl-button[size="small"].btn-outline-secondary::part(base),
    sl-button[size="small"]::part(base) {
      height:        32px    !important;
      padding:       0 11px  !important;
      font-size:     0.8rem  !important;
      border-radius: 6px     !important;
    }

    /* ── Universal Badge / Chip Standards across all modules ── */
    .badge-tni-pill,
    .tni-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 24px;
      padding: 0 10px;
      border-radius: 9999px;
      font-size: 0.75rem;
      font-weight: 600;
      line-height: 1;
      border: 1px solid transparent;
      box-sizing: border-box;
      white-space: nowrap;
      vertical-align: middle;
    }
    /* ── Native <button> classes (for SwalModal / legacy inline buttons) ── */
    button.btn-tni {
      background: var(--tni-green);
      color: #fff;
      border: none;
      border-radius: 6px;
      height: 32px;
      padding: 0 12px;
      font-size: 0.8rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      transition: all 0.2s ease;
      white-space: nowrap;
    }
    button.btn-tni:hover {
      background: var(--tni-green-dark);
      transform: translateY(-1px);
      box-shadow: 0 4px 14px rgba(22,163,74,0.3);
      color: #fff;
    }

    button.btn-yellow {
      background: var(--tni-yellow, #f59e0b);
      color: #fff;
      border: none;
      border-radius: 6px;
      height: 32px;
      padding: 0 12px;
      font-size: 0.8rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      transition: all 0.2s ease;
      white-space: nowrap;
    }
    button.btn-yellow:hover {
      background: #d97706;
      transform: translateY(-1px);
      box-shadow: 0 4px 14px rgba(245,158,11,0.3);
      color: #fff;
    }

    button.btn-blue {
      background: var(--tni-blue, #3b82f6);
      color: #fff;
      border: none;
      border-radius: 10px;
      padding: 0.45rem 1.1rem;
      font-size: 0.85rem;
      font-weight: 600;
      transition: all 0.2s ease;
      white-space: nowrap;
    }
    button.btn-blue:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 14px rgba(37,99,235,0.3);
      color: #fff;
    }

    .text-yellow {
      color: #d97706;
    }
    .text-blue { 
      color: #3b82f6; 
    }

    .text-blue { 
      color: #3b82f6; 
    }

    .handsontable th {
      background: #f0f2f5;
      font-size: 0.78rem;
      font-weight: 600;
      color: #374151;
      border-color: #ced0d4;
    }

    .handsontable td { font-size: 0.82rem; border-color: #f0f0f0; }
    .handsontable td.cell-pending {
      background-color: #fff8e1 !important;
      border-left: 3px solid #f59e0b !important;
    }

    .handsontable .ht__active_highlight { background: rgba(46,125,50,0.06); }

    .alert {
      border-width: 1px;
      border-radius: 8px;
      padding: 0.65rem 0.85rem;
      margin-bottom: 0.75rem;
      font-size: 0.82rem;
      line-height: 1.45;
    }

    .alert-tni { border-radius: 8px; }

    sl-alert { margin-bottom: 0.75rem; font-family: inherit; }

    sl-alert::part(base) {
      border-width: 1px;
      border-radius: 8px;
      box-shadow: none;
    }

    sl-alert::part(message) {
      padding: 0.65rem 0.85rem;
      font-size: 0.82rem;
      font-weight: 500;
      line-height: 1.45;
    }

    sl-alert::part(icon) { font-size: 1rem; }

    sl-alert[variant="danger"]::part(base),
    .alert-danger {
      background: #fef2f2;
      border-color: #fecaca;
      color: #991b1b;
    }

    sl-alert[variant="danger"]::part(icon),
    sl-alert[variant="danger"]::part(close-button) { color: #b91c1c; }

    sl-alert[variant="warning"]::part(base),
    .alert-warning {
      background: #fffbeb;
      border-color: #fcd34d;
      color: #92400e;
    }

    sl-alert[variant="warning"]::part(icon),
    sl-alert[variant="warning"]::part(close-button) { color: #b45309; }

    sl-alert[variant="success"]::part(base),
    .alert-success {
      background: #f0fdf4;
      border-color: #bbf7d0;
      color: #166534;
    }

    sl-alert[variant="success"]::part(icon),
    sl-alert[variant="success"]::part(close-button) { color: #15803d; }

    sl-alert[variant="primary"]::part(base),
    .alert-info {
      background: #eff6ff;
      border-color: #bfdbfe;
      color: #1e40af;
    }

    sl-alert[variant="primary"]::part(icon),
    sl-alert[variant="primary"]::part(close-button) { color: #2563eb; }

    sl-alert[variant="neutral"]::part(base) {
      background: #f9fafb;
      border-color: #d1d5db;
      color: #374151;
    }

    sl-alert[variant="neutral"]::part(icon),
    sl-alert[variant="neutral"]::part(close-button) { color: #6b7280; }

    .form-select-tni {
      height: 36px;
      border-radius: 10px;
      border: 2px solid #ced0d4;
      padding: 0.4rem 2rem 0.4rem 0.75rem;
      font-size: 0.82rem;
      background-color: #fff;
      transition: border-color 0.2s;
    }

    .form-select-tni:focus {
      border-color: var(--tni-green);
      box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
    }

    /* ── Glassmorphism modals ─────────────────────────── */
    .modal-glass .modal-content {
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border: 1px solid rgba(255,255,255,0.3);
      box-shadow: 0 25px 60px rgba(0,0,0,0.15), 0 8px 20px rgba(0,0,0,0.08);
    }

    .modal-glass .modal-header {
      border-bottom: 1px solid rgba(255,255,255,0.15);
    }

    .modal-glass .modal-footer {
      border-top: 1px solid rgba(255,255,255,0.15);
    }

    .modal-backdrop.show { opacity: 0.5; }

    /* ── Loader Overlay (reusable) ──────────────────── */
    #loaderOverlay {
      display: none;
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      z-index: 99999;
    }

    #loaderOverlay.show {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 12px;
      background: rgba(255,255,255,0.93);
    }

    /* ── Loader Overlay Dark Mode ──────────────────────────── */
    html.dark-mode #loaderOverlay.show {
      background: rgba(20,20,20,0.93);
    }

    html.dark-mode #loaderOverlay .small,
    html.dark-mode #loaderOverlay p,
    html.dark-mode #loaderOverlay span {
      color: #e2e8f0;
    }

    html.dark-mode #loaderOverlay .spinner-border.text-success {
      color: var(--tni-green-light) !important;
    }

    /* ── Shoelace <sl-select> filter & dropdown layout (32px height, 6px radius, matching buttons) ── */
    sl-select,
    sl-select.filter-select,
    sl-select.sl-select-tni,
    sl-select.orgas-select,
    sl-select.sort-select,
    sl-select[size="small"] {
      display: inline-flex !important;
      width: auto;
      min-width: 0;
      height: 32px !important;
      min-height: 32px !important;
      max-height: 32px !important;
      vertical-align: middle !important;
      --sl-input-height-small: 32px !important;
      --sl-input-height-medium: 32px !important;
      --sl-input-font-size-small: 0.8rem;
      --sl-input-font-size-medium: 0.8rem;
      --sl-input-border-radius-small: 6px !important;
      --sl-input-border-radius-medium: 6px !important;
      --sl-input-border-color: #ced0d4;
      --sl-input-border-color-hover: #d1d5db;
      --sl-input-border-color-focus: var(--tni-green);
      --sl-input-border-width: 1px;
      --sl-focus-ring-color: var(--tni-green);
      --sl-focus-ring-width: 2px;
      --sl-focus-ring-offset: 0px;
      --sl-input-focus-ring-color: rgba(46,125,50,0.2);
    }

    sl-select::part(form-control),
    sl-select::part(form-control-input) {
      height: 32px !important;
      min-height: 32px !important;
      max-height: 32px !important;
    }

    sl-select::part(base),
    sl-select.filter-select::part(base),
    sl-select.sl-select-tni::part(base),
    sl-select.orgas-select::part(base),
    sl-select.sort-select::part(base),
    sl-select[size="small"]::part(base) {
      height: 32px !important;
      min-height: 32px !important;
      max-height: 32px !important;
      width: 100%;
      box-sizing: border-box !important;
      border-radius: 6px !important;
      border: 1px solid #ced0d4 !important;
      background: #fff;
      transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
      box-shadow: none !important;
      outline: none !important;
    }

    sl-select.filter-select:hover::part(base),
    sl-select.sl-select-tni:hover::part(base),
    sl-select.sort-select:hover::part(base),
    sl-select[size="small"]:hover::part(base) {
      border-color: #d1d5db !important;
      background-color: var(--tni-green-bg);
      box-shadow: none !important;
    }

    sl-select.filter-select[focused]::part(base),
    sl-select.filter-select[open]::part(base),
    sl-select.sl-select-tni[focused]::part(base),
    sl-select.sl-select-tni[open]::part(base),
    sl-select.sort-select[focused]::part(base),
    sl-select.sort-select[open]::part(base),
    sl-select[size="small"][focused]::part(base),
    sl-select[size="small"][open]::part(base) {
      border-color: var(--tni-green) !important;
      box-shadow: 0 0 0 2px rgba(46,125,50,0.2) !important;
    }

    sl-select.filter-select::part(combobox),
    sl-select.sl-select-tni::part(combobox),
    sl-select.sort-select::part(combobox),
    sl-select[size="small"]::part(combobox) {
      height: 32px !important;
      min-height: 32px !important;
      max-height: 32px !important;
      padding: 0 0.5rem !important;
      font-size: 0.8rem !important;
      color: #374151;
      line-height: 30px !important;
    }

    sl-select.filter-select::part(display-input),
    sl-select.sl-select-tni::part(display-input),
    sl-select.sort-select::part(display-input),
    sl-select[size="small"]::part(display-input) {
      font-size: 0.8rem !important;
      line-height: 30px !important;
    }

    sl-select.filter-select::part(placeholder),
    sl-select.sl-select-tni::part(placeholder),
    sl-select.sort-select::part(placeholder),
    sl-select[size="small"]::part(placeholder) {
      font-size: 0.78rem !important;
      color: #6b7280;
    }

    /* Nilai terpilih berwarna hijau */
    sl-select.filter-select::part(display-input):not(:placeholder-shown),
    sl-select.sl-select-tni::part(display-input):not(:placeholder-shown),
    sl-select.sort-select::part(display-input):not(:placeholder-shown) {
      color: var(--tni-green-dark);
      font-weight: 600;
    }

    sl-select.filter-select::part(expand-icon),
    sl-select.sl-select-tni::part(expand-icon),
    sl-select.sort-select::part(expand-icon),
    sl-select[size="small"]::part(expand-icon) {
      color: #6b7280;
      font-size: 0.62rem !important;
      transition: transform 0.2s ease, color 0.2s ease;
    }

    sl-select.filter-select[open]::part(expand-icon),
    sl-select.sl-select-tni[open]::part(expand-icon),
    sl-select.sort-select[open]::part(expand-icon),
    sl-select[size="small"][open]::part(expand-icon) {
      transform: rotate(180deg);
      color: var(--tni-green);
    }

    sl-select.filter-select::part(clear-button),
    sl-select.sl-select-tni::part(clear-button),
    sl-select.sort-select::part(clear-button),
    sl-select[size="small"]::part(clear-button) {
      font-size: 0.72rem !important;
      color: #9ca3af;
    }

    sl-select.filter-select::part(listbox),
    sl-select.sl-select-tni::part(listbox),
    sl-select.sort-select::part(listbox),
    sl-select[size="small"]::part(listbox) {
      border: 1px solid #ced0d4;
      border-radius: 8px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.05);
      padding: 0.25rem;
      /* overflow: hidden; */
      overflow-y: auto;
      max-height: var(--auto-size-available-height);
    }

    sl-select.filter-select[multiple]::part(tags) {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      gap: 4px;
      min-width: 0;
      overflow: hidden;
    }

    /* Searchable filter dropdowns (filter-select-search.js): max 6 options visible, scroll for the rest.
       --ss-max-height is measured by the script; the calc() is the fallback before the first open. */
    sl-select.filter-select:not(.sort-select)::part(listbox),
    sl-select.searchable-select::part(listbox) {
      overflow-y: auto;
      max-height: min(
        var(--auto-size-available-height, 100vh),
        var(--ss-max-height, calc(6 * 2.05rem + 2.5rem))
      );
      scroll-padding-top: var(--ss-search-height, 2rem);
    }

    /* Warna opsi dropdown diatur lewat token Shoelace, bukan ::part().
       State "current" (opsi aktif saat listbox dibuka atau dipilih lewat panah
       keyboard) hanya berupa class di dalam shadow DOM, jadi tidak bisa dipilih
       dari luar. Menyetel background/color pada ::part(base) justru membuat
       opsi aktif ikut tertimpa dan kontrasnya rusak. */
    sl-option {
      --sl-color-primary-600: var(--tni-green);       /* latar opsi aktif */
      --sl-color-neutral-0: #ffffff;                  /* teks opsi aktif */
      --sl-color-neutral-100: var(--tni-green-bg);    /* latar opsi saat hover */
      --sl-color-neutral-1000: var(--tni-green-dark); /* teks opsi saat hover */
      --sl-color-neutral-700: #374151;                /* teks opsi biasa */
    }

    sl-option::part(base) {
      border-radius: 6px;
      padding: 5px 10px;
      font-size: 0.78rem;
      transition: background-color 0.15s ease, color 0.15s ease;
    }

    sl-option[aria-selected="true"]::part(base) {
      font-weight: 600;
    }

    /* Ikon centang mengikuti warna teks opsi: putih saat opsi aktif. */
    sl-option::part(checked-icon) {
      color: inherit;
      font-size: 0.78rem;
    }

    /* ── Shoelace <sl-input> search bar & compact inputs (32px height, 6px radius, matching buttons) ── */
    sl-input,
    sl-input.satuan-list-search,
    sl-input.sl-input-tni,
    sl-input[size="small"],
    #daftarSearchInput,
    #searchInput,
    #searchKolom {
      display: inline-flex !important;
      height: 32px !important;
      min-height: 32px !important;
      max-height: 32px !important;
      vertical-align: middle !important;
      --sl-input-height-small: 32px !important;
      --sl-input-height-medium: 32px !important;
      --sl-input-font-size-small: 0.8rem;
      --sl-input-font-size-medium: 0.8rem;
      --sl-input-border-radius-small: 6px !important;
      --sl-input-border-radius-medium: 6px !important;
      --sl-input-border-color: #ced0d4;
      --sl-input-border-color-hover: #d1d5db;
      --sl-input-border-color-focus: var(--tni-green);
      --sl-input-border-width: 1px;
      --sl-focus-ring-color: var(--tni-green);
      --sl-focus-ring-width: 2px;
      --sl-focus-ring-offset: 0px;
    }

    sl-input::part(form-control),
    sl-input::part(form-control-input) {
      height: 32px !important;
      min-height: 32px !important;
      max-height: 32px !important;
    }

    sl-input::part(base),
    sl-input.satuan-list-search::part(base),
    sl-input.sl-input-tni::part(base),
    sl-input[size="small"]::part(base),
    #daftarSearchInput::part(base),
    #searchInput::part(base) {
      height: 32px !important;
      min-height: 32px !important;
      max-height: 32px !important;
      box-sizing: border-box !important;
      border-radius: 6px !important;
      border: 1px solid #ced0d4 !important;
      background: #fff;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
      box-shadow: none !important;
      outline: none !important;
    }

    sl-input.satuan-list-search:hover::part(base),
    sl-input.sl-input-tni:hover::part(base),
    sl-input[size="small"]:hover::part(base),
    #daftarSearchInput:hover::part(base),
    #searchInput:hover::part(base) {
      border-color: #d1d5db !important;
      box-shadow: none !important;
    }

    sl-input.satuan-list-search[focused]::part(base),
    sl-input.satuan-list-search:focus-within::part(base),
    sl-input.sl-input-tni[focused]::part(base),
    sl-input.sl-input-tni:focus-within::part(base),
    sl-input[size="small"][focused]::part(base),
    sl-input[size="small"]:focus-within::part(base),
    #daftarSearchInput[focused]::part(base),
    #daftarSearchInput:focus-within::part(base),
    #searchInput[focused]::part(base),
    #searchInput:focus-within::part(base) {
      border-color: var(--tni-green) !important;
      box-shadow: 0 0 0 2px rgba(46,125,50,0.2) !important;
    }

    sl-input::part(input),
    sl-input.satuan-list-search::part(input),
    sl-input.sl-input-tni::part(input),
    sl-input[size="small"]::part(input),
    #daftarSearchInput::part(input),
    #searchInput::part(input) {
      height: 100% !important;
      font-size: 0.8rem !important;
      color: #374151;
      padding: 0 0.5rem !important;
      line-height: 30px !important;
      border-radius: 6px !important;
      box-sizing: border-box !important;
    }

    sl-input::part(prefix),
    sl-input.satuan-list-search::part(prefix),
    sl-input.sl-input-tni::part(prefix),
    sl-input[size="small"]::part(prefix),
    #daftarSearchInput::part(prefix),
    #searchInput::part(prefix) {
      color: var(--tni-green);
      font-size: 0.85rem !important;
      padding-left: 0.5rem !important;
      display: inline-flex !important;
      align-items: center !important;
      height: 100% !important;
    }

    sl-input.satuan-list-search::part(clear-button),
    sl-input.sl-input-tni::part(clear-button),
    sl-input[size="small"]::part(clear-button),
    #daftarSearchInput::part(clear-button),
    #searchInput::part(clear-button) {
      color: #9ca3af;
      font-size: 0.72rem !important;
      padding-right: 0.35rem !important;
      display: inline-flex;
      align-items: center;
    }

    sl-input.satuan-list-search::part(clear-button):hover,
    sl-input.sl-input-tni::part(clear-button):hover,
    sl-input[size="small"]::part(clear-button):hover,
    #daftarSearchInput::part(clear-button):hover,
    #searchInput::part(clear-button):hover {
      color: #ef4444 !important;
    }

    /* ── Green-themed form controls ──────────────────── */
    .form-control-tni {
      border-radius: 10px;
      border: 2px solid #ced0d4;
      padding: 0.45rem 0.85rem;
      font-size: 0.85rem;
      background: #fff;
      transition: all 0.25s ease;
    }

    .form-control-tni:focus {
      border-color: var(--tni-green);
      box-shadow: 0 0 0 4px rgba(46,125,50,0.12);
      background: #fff;
    }

    .form-select-tni-focus {
      border-radius: 10px;
      border: 2px solid #ced0d4;
      padding: 0.4rem 2rem 0.4rem 0.75rem;
      font-size: 0.85rem;
      background: #fff;
      transition: all 0.25s ease;
    }

    .form-select-tni-focus:focus {
      border-color: var(--tni-green);
      box-shadow: 0 0 0 4px rgba(46,125,50,0.12);
    }

    textarea.form-control-tni {
      border-radius: 10px;
    }

    .form-check-input-tni:checked {
      background-color: var(--tni-green);
      border-color: var(--tni-green);
    }

    /* ── Dropdown Menu Customization ─────────────────── */
    .dropdown-menu .dropdown-item:hover,
    .dropdown-menu .dropdown-item:focus,
    .dropdown-menu .dropdown-item:active {
        background: var(--tni-green-bg) !important;
        color: var(--tni-green-dark) !important;
        z-index: 1055;
    }

    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

    @media (max-width: 768px) {
      html { overflow-x: hidden; }

      .topbar {
        position: relative;
        z-index: 1025;
      }

      .dropdown-menu.dropdown-menu-end:not(.profile-dropdown):not(.notif-dropdown) {
        min-width: 200px !important;
        max-width: calc(100vw - 20px) !important;
        width: auto !important;
      }

      .hamburger::part(base) { 
        display: inline-flex; 
        font-size: 1.4rem; 
        margin-top: 0.3rem;
        color: var(--tni-green);
      }

      .icon-header-kelola {
        display: none;
      }

      .sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        z-index: 1060;
        transform: translateX(-100%);
      }

      .sidebar.open { transform: translateX(0); }
      /* Reset collapse state on mobile — always show full sidebar */
      .sidebar.is-closed { width: var(--sidebar-width) !important; }
      .sidebar.is-closed .hide-when-close { display: revert !important; }
      .sidebar.is-closed .show-when-close { display: none !important; }
      .sidebar.is-closed .nav-link,
      .sidebar.is-closed .nav-link-parent { padding-left: 1.5rem; padding-right: 1.5rem; justify-content: flex-start; }
      .sidebar.is-closed .brand { justify-content: flex-start; padding: 1.25rem 1.5rem; }
      .sidebar.is-closed .sidebar-footer-panel { justify-content: space-between; padding: 0.65rem 0.85rem; }
      .sidebar-backdrop { z-index: 1055; }
      .profile-trigger .username { display: none; }
      .content-area { padding: 0.75rem; }
      .card-tni { border-radius: 12px; }
      .card-tni .card-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.5rem;
      }

      .card-tni .card-header .d-flex { width: 100%; }
      .card-tni .card-header select { width: 100% !important; }
      .card-tni .card-header .d-flex.gap-2 { justify-content: flex-end; }

      sl-select.filter-select {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
      }

      sl-select.filter-select::part(base) {
        height: 32px !important;
        min-height: 32px !important;
        width: 100% !important;
      }
    }

    @media (min-width: 769px) and (max-width: 1199px) {
      .content-area { padding: 0.75rem; }
      .filter-row { flex-wrap: nowrap !important; }
      .filter-row .filter-group { flex-wrap: wrap !important; flex: 1; }
      .filter-level { min-width: 85px; }
      #searchInput { max-width: 200px !important; }
    }

    @media (min-width: 769px) {
      .profile-trigger .username { display: inline; }
      .profile-trigger .chevron { display: inline; }
      .topbar {
        position: sticky;
        top: 0;
        z-index: 1020;
        height: 60px;
        padding: 0 1rem;
      }
    }

    /* Pastikan topbar, sidebar, dan elemen turunannya berada di bawah backdrop saat modal dibuka */
    body.modal-open .topbar,
    body.modal-open .topbar .dropdown,
    body.modal-open .topbar .notif-dropdown-wrap,
    body.sl-dialog-open .topbar,
    body.sl-dialog-open .topbar .dropdown,
    body.sl-dialog-open .topbar .notif-dropdown-wrap,
    body:has(sl-dialog[open]) .topbar,
    body:has(sl-dialog[open]) .topbar .dropdown,
    body:has(sl-dialog[open]) .topbar .notif-dropdown-wrap,
    body.modal-open .sidebar,
    body.sl-dialog-open .sidebar,
    body:has(sl-dialog[open]) .sidebar {
      z-index: 1 !important;
    }

    /* ── SweetAlert-style Modal ─────────────────────────── */
    #swalModal {
      z-index: 1070 !important;
    }
    #swalModal .modal-dialog {
      max-width: 440px;
    }

    #swalModal .modal-content {
      border-radius: 18px;
      box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    }

    #swalModal .swal-icon { font-size: 3rem; line-height: 1; }
    #swalModal .swal-icon.success { color: #22c55e; }
    #swalModal .swal-icon.error { color: #ef4444; }
    #swalModal .swal-icon.warning { color: #f59e0b; }
    #swalModal .swal-icon.info { color: #3b82f6; }
    #swalModal .swal-icon.question { color: #2e7d32; }

    #swalModal .swal-title {
      font-weight: 700;
      color: var(--tni-green-dark);
      margin-bottom: 4px;
    }

    #swalModal .swal-text {
      font-size: 0.85rem;
      color: #6b7280;
    }

    /* ── Universal Pagination Footer ───────────────────── */
    .pagination-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.9rem;
      flex-wrap: wrap;
      transition: all 0.25s ease;
      background: #fafdfa;
      border-top: 2px solid var(--tni-green-bg) !important;
      min-height: 52px;
      flex-shrink: 0;
    }

    .pagination-footer .pagination-meta {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex-wrap: wrap;
      min-width: 0;
    }

    .pagination-footer .pagination-nav {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      flex-wrap: wrap;
      justify-content: flex-end;
      margin-left: auto;
    }

    .pagination-footer .pagination-pages {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      flex-wrap: wrap;
    }

    .pagination-footer .page-size-select {
      border-radius: 8px;
      border: 2px solid #ced0d4;
      padding: 0.25rem 1.5rem 0.25rem 0.5rem;
      font-size: 0.75rem;
      font-weight: 600;
      color: #374151;
      background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3e%3cpath fill='%23374151' d='M6 8L1 3h10z'/%3e%3c/svg%3e") no-repeat right 0.4rem center/0.7rem;
      appearance: none;
      cursor: pointer;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .pagination-footer .page-size-select:focus {
      border-color: var(--tni-green);
      box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
      outline: none;
    }

    .pagination-footer .page-info {
      font-size: 0.75rem;
      color: #6b7280;
      font-weight: 500;
      letter-spacing: 0.01em;
      user-select: none;
    }

    .pagination-footer .page-info strong {
      color: var(--tni-green-dark);
      font-weight: 700;
    }

    .pagination-footer .page-nav-btn {
      min-width: 34px;
      height: 34px;
      padding: 0 10px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      border: 2px solid #ced0d4;
      background: #fff;
      color: #374151;
      font-size: 0.72rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .pagination-footer .page-nav-btn.active {
      background: var(--tni-green) !important;
      border-color: var(--tni-green) !important;
      color: #fff !important;
      box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
    }

    .pagination-footer .page-nav-btn.page-nav-ellipsis {
      cursor: default;
      pointer-events: none;
      background: transparent;
      border-color: transparent;
      box-shadow: none;
      min-width: auto;
      padding: 0 2px;
    }

    .pagination-footer .page-nav-btn:not(:disabled):hover {
      border-color: var(--tni-green);
      background: var(--tni-green-bg);
      color: var(--tni-green-dark);
      transform: translateY(-1px);
      box-shadow: 0 3px 8px rgba(46, 125, 50, 0.15);
    }

    .pagination-footer .page-nav-btn:not(:disabled):active {
      transform: translateY(0);
      box-shadow: none;
    }

    .pagination-footer .page-nav-btn:disabled {
      opacity: 0.35;
      cursor: not-allowed;
      background: #f3f4f6;
    }

    .pagination-footer .page-nav-btn:focus-visible {
      outline: 2px solid var(--tni-green);
      outline-offset: 2px;
    }

    @media (max-width: 768px) {
      .pagination-footer {
        align-items: stretch;
        gap: 0.5rem;
      }
      .pagination-footer .pagination-meta,
      .pagination-footer .pagination-nav {
        width: 100%;
      }
      .pagination-footer .pagination-nav {
        justify-content: space-between;
      }
      .pagination-footer .pagination-pages {
        justify-content: center;
        flex: 1;
      }
    }

    html.dark-mode .pagination-footer {
      background: #1e1e1e !important;
      border-top-color: #2a2a2a !important;
    }
    html.dark-mode .pagination-footer .page-size-select {
      background-color: #262626;
      border-color: #3a3a3a;
      color: #d1d5db;
      background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3e%3cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3e%3c/svg%3e");
    }
    html.dark-mode .pagination-footer .page-info {
      color: #9ca3af;
    }
    html.dark-mode .pagination-footer .page-info strong {
      color: var(--tni-green-light);
    }
    html.dark-mode .pagination-footer .page-nav-btn {
      background: #2a2a2a;
      border-color: #404040;
      color: #d1d5db;
    }
    html.dark-mode .pagination-footer .page-nav-btn:not(:disabled):hover {
      background: rgba(76, 175, 80, 0.15);
      border-color: var(--tni-green-light);
      color: #fff;
    }
    html.dark-mode .pagination-footer .page-nav-btn:disabled {
      background: #1a1a1a;
      border-color: #333;
      opacity: 0.3;
    }


/* Floating Bulk Progress Widget (Global) */
.mdm-bulk-progress-card {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1060;
  width: 360px;
  max-width: calc(100vw - 32px);
  background-color: var(--bs-body-bg, #ffffff);
  border: 1px solid rgba(46, 125, 50, 0.3);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 14px 16px;
  transition: all 0.25s ease-in-out;
  backdrop-filter: blur(8px);
}

.mdm-bulk-progress-card .progress-title {
  font-size: 0.9rem;
  color: var(--bs-body-color, #1f2937);
  letter-spacing: -0.01em;
}

.mdm-bulk-progress-card .mdm-bulk-progress-bar-track {
  height: 8px;
  background-color: rgba(46, 125, 50, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.mdm-bulk-progress-card .progress-bar {
  transition: width 0.3s ease;
  background: linear-gradient(90deg, #2e7d32 0%, #43a047 100%) !important;
}

.mdm-bulk-progress-card.is-minimized {
  width: auto;
  padding: 8px 14px;
  cursor: pointer;
}

.mdm-bulk-progress-card.is-minimized:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.22);
}

html.dark-mode .mdm-bulk-progress-card {
  background-color: #1e1e1e;
  border-color: rgba(76, 175, 80, 0.35);
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.5);
}

html.dark-mode .mdm-bulk-progress-card .mdm-bulk-progress-bar-track {
  background-color: rgba(255, 255, 255, 0.1);
}
