/* ============================================================
   AGRINATA Ã¢â‚¬â€ Dashboard / Backend CSS
   Sidebar layout, cards, tables, dan modul-modul backend
   Ultra Mobile & Tablet & Desktop Responsive
   ============================================================ */
/* ============ Global Reset ============ */
html, body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

/* ============ Dashboard Layout ============ */
.dash-layout {
  display: flex;
  min-height: 100vh;
  background: var(--gray-100);
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* ============ Sidebar ============ */
.dash-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #F5F4F0 0%, #EFECE6 100%);
  color: #292524;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 950;
  transition: transform 0.3s var(--ease-default);
  border-right: 1px solid rgba(28, 25, 23, 0.085);
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 2px 0 16px -6px rgba(28, 25, 23, 0.06);
}

.dash-sidebar-nav::-webkit-scrollbar { width: 4px; }
.dash-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.dash-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(28, 25, 23, 0.18); border-radius: 4px; }

/* Sidebar Brand */
.dash-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.25rem 1.25rem 0.5rem 1.25rem;
  border-bottom: none;
  text-decoration: none;
  flex-shrink: 0;
}

.dash-sidebar-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

.dash-brand-text strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 800;
  color: #1C1917;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.dash-brand-text span {
  display: block;
  font-size: 0.6875rem;
  color: #78716C;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-top: 0.125rem;
}

/* Sidebar Nav */
.dash-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0.25rem 0.5rem 1.25rem 0.5rem;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 25, 23, 0.16) transparent;
}

.dash-nav-section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #78716C;
  padding: 1.25rem 0.75rem 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.8rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #44403C;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.dash-nav-item i {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #78716C;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: color, transform;
}

.dash-nav-item:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #1C1917;
}

.dash-nav-item.active {
  background: #FFFFFF;
  color: #0F766E;
  font-weight: 700;
  border: 1px solid rgba(15, 118, 110, 0.18);
  padding-left: 0.75rem;
}
.dash-nav-item.active i { color: #0F766E; }

.sidebar-badge {
    background-color: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #FECACA;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: 2px;
    flex-shrink: 0;
    line-height: 1;
}
.sidebar-badge.warning {
    background-color: #FEF3C7;
    color: #B45309;
    border: 1px solid #FDE68A;
}

/* Sidebar User */
.dash-sidebar-user {
  padding: 1rem 0.875rem;
  border-top: 1px solid rgba(28, 25, 23, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  background: rgba(28, 25, 23, 0.032);
}

.dash-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0F766E 0%, #074440 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.dash-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1C1917;
  line-height: 1.2;
}
.dash-user-role {
  font-size: 0.75rem;
  color: #78716C;
}

.dash-sidebar-logout {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: #78716C;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}
.dash-sidebar-logout:hover {
  background: #FEE2E2;
  color: #DC2626;
}

/* ============ Main Content ============ */
.dash-main {
  flex: 1;
  margin-left: 260px;
  min-width: 0;
  max-width: calc(100% - 260px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  transition: margin-left 0.3s, max-width 0.3s;
  padding-top: 64px; /* Space for fixed topbar */
  box-sizing: border-box;
  overflow-x: hidden;
}

.dash-content {
  flex: 1;
  padding: 1.75rem 2rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.dash-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: fixed;
  top: 0;
  left: 260px;
  right: 0;
  z-index: 900;
  box-shadow: var(--shadow-xs);
  transition: left 0.3s;
}

.dash-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex: 1;
  min-width: 0;
}

.dash-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  color: var(--deep);
  font-size: 1.375rem;
  cursor: pointer;
  transition: all 0.2s;
}
.dash-sidebar-toggle:hover { background: var(--tint-alpha); }

.dash-page-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--deep);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Topbar Date & Real-time Clock (Unified Pill Shape) */
.dash-topbar-datetime {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.875rem;
  height: 38px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-full);
  box-shadow: none;
  user-select: none;
  color: var(--dark);
  font-weight: 600;
  font-size: 0.875rem;
}

.dash-topbar-datetime i {
  color: var(--primary);
  font-size: 1.125rem;
}

.dash-topbar-datetime-text {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dash-topbar-date {
  color: var(--dark);
}

.dash-topbar-time {
  color: var(--gray-500);
  font-weight: 500;
}

.dash-topbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  color: var(--dark);
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  text-decoration: none;
}
.dash-topbar-btn:hover { background: var(--gray-100); color: var(--primary); }

.dash-topbar-badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

/* Notification Dropdown Menu */
.dash-notif-dropdown-wrap {
  position: relative;
}

.dash-notif-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.1);
  border-radius: 14px;
  box-shadow: 0 18px 40px -12px rgba(6, 55, 59, 0.18), 0 4px 12px rgba(28, 25, 23, 0.06);
  z-index: 1050;
  overflow: hidden;
  animation: notifSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-notif-menu.show {
  display: block;
}

@keyframes notifSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile & Small Screen (<= 640px): Floating Full-Width Menu with Safe Margins */
@media (max-width: 640px) {
  .dash-notif-menu {
    position: fixed !important;
    top: 64px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 48px rgba(6, 55, 59, 0.22), 0 4px 16px rgba(28, 25, 23, 0.08) !important;
    z-index: 10000 !important;
  }

  .dash-notif-header {
    padding: 0.75rem 1rem !important;
  }

  .dash-notif-body {
    max-height: 60vh !important;
  }
}

.dash-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: #FAF9F6;
  border-bottom: 1px solid rgba(28, 25, 23, 0.085);
}

.dash-notif-body {
  max-height: 380px;
  overflow-y: auto;
}

.dash-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(28, 25, 23, 0.065);
  text-decoration: none;
  color: #1C1917;
  transition: background 0.15s ease, opacity 0.15s ease;
  position: relative;
}

.dash-notif-item:last-child {
  border-bottom: none;
}

.dash-notif-item:hover {
  background: #FAF9F6;
}

.dash-notif-item.is-read {
  opacity: 0.68;
}

.dash-notif-item.is-read:hover {
  opacity: 0.95;
}

.dash-notif-item.notif-today,
.dash-notif-item.notif-danger {
  background: rgba(220, 38, 38, 0.035);
}
.dash-notif-item.notif-today:hover,
.dash-notif-item.notif-danger:hover {
  background: rgba(220, 38, 38, 0.07);
}

.dash-notif-item.notif-overdue,
.dash-notif-item.notif-warning {
  background: rgba(217, 119, 6, 0.04);
}
.dash-notif-item.notif-overdue:hover,
.dash-notif-item.notif-warning:hover {
  background: rgba(217, 119, 6, 0.08);
}

.dash-notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0F766E;
  flex-shrink: 0;
  margin-top: 6px;
}

.dash-notif-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #F0FDFA;
  border: 1px solid #CCFBF1;
  color: #0F766E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.12rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.dash-notif-icon.sev-danger {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #DC2626;
}

.dash-notif-icon.sev-warning {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #D97706;
}

.dash-notif-content {
  flex: 1;
  min-width: 0;
}

.dash-notif-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1C1917;
  line-height: 1.35;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-notif-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: #78716C;
  flex-wrap: wrap;
}

.dash-notif-footer {
  padding: 0.7rem 1rem;
  background: #FAF9F6;
  border-top: 1px solid rgba(28, 25, 23, 0.085);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dash-notif-mark-btn {
  background: transparent;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #57534E;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.dash-notif-mark-btn:hover {
  background: #ECEAE3;
  color: #1C1917;
}

.dash-notif-footer-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0F766E;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s ease;
}

.dash-notif-footer-link:hover {
  color: #06373B;
  text-decoration: underline;
}

.dash-user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-full);
  padding: 0 0.875rem 0 0.375rem;
  height: 38px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.2s;
}
.dash-user-chip:hover { background: var(--gray-100); border-color: var(--gray-200); }

.dash-user-chip-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #073C45;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ============ Page Content Area ============ */
@keyframes pageMicroFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dash-content {
  padding: 2rem 1.75rem;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

/* ============ Page Header ============ */
.dash-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.dash-page-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dash-page-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 800;
  color: var(--deep);
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
  line-height: 1.15;
}
.dash-page-header-title i {
  font-size: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1em;
  width: 1em;
  line-height: 1;
  vertical-align: middle;
  flex-shrink: 0;
}

.dash-page-header-sub {
  font-size: 0.9rem;
  color: var(--gray-500);
}

.dash-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.dash-breadcrumb a { color: var(--medium); text-decoration: none; }
.dash-breadcrumb a:hover { color: var(--deep); }
.dash-breadcrumb i { font-size: 0.75rem; }

/* ============ Stat Cards (Unified, Consistent & Responsive) ============ */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.125rem;
  margin-bottom: 1.25rem;
  align-items: stretch;
}

/* Dynamic auto-distribution for 2, 3, and 5 card rows */
.dash-stats-grid:has(> :nth-child(5):last-child),
.dash-stats-grid.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.dash-stats-grid:has(> :nth-child(3):last-child),
.dash-stats-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dash-stats-grid:has(> :nth-child(2):last-child),
.dash-stats-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1280px) {
  .dash-stats-grid:has(> :nth-child(5):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1023px) {
  .dash-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem;
  }
}
@media (max-width: 640px) {
  .dash-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
}

.dash-stat-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(28, 25, 23, 0.085);
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.04);
  display: flex;
  align-items: center;
  gap: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  min-height: 86px;
  box-sizing: border-box;
}

.dash-stat-card:hover {
  box-shadow: 0 10px 24px -12px rgba(28, 25, 23, 0.16);
  transform: translateY(-2px);
}

/* Color Themed Stat Cards (Warm Stone 60-30-10 Botanical) */
.dash-stat-card.green,
.dash-stat-card.primary,
.dash-stat-card:has(.dash-stat-icon.green),
.dash-stat-card:has(.dash-stat-icon.primary),
.dash-stat-card.red,
.dash-stat-card.danger,
.dash-stat-card:has(.dash-stat-icon.red),
.dash-stat-card:has(.dash-stat-icon.danger),
.dash-stat-card.amber,
.dash-stat-card.warning,
.dash-stat-card:has(.dash-stat-icon.amber),
.dash-stat-card:has(.dash-stat-icon.warning),
.dash-stat-card.orange,
.dash-stat-card:has(.dash-stat-icon.orange),
.dash-stat-card.blue,
.dash-stat-card.info,
.dash-stat-card:has(.dash-stat-icon.blue),
.dash-stat-card:has(.dash-stat-icon.info),
.dash-stat-card.slate,
.dash-stat-card.gray,
.dash-stat-card:has(.dash-stat-icon.slate),
.dash-stat-card:has(.dash-stat-icon.gray),
.dash-stat-card.teal,
.dash-stat-card:has(.dash-stat-icon.teal) {
  background: #ffffff;
  border-color: rgba(28, 25, 23, 0.085);
}
.dash-stat-card .dash-stat-value {
  color: #1c1917;
}
.dash-stat-card.red .dash-stat-value,
.dash-stat-card:has(.dash-stat-icon.red) .dash-stat-value {
  color: #b91c1c;
}
.dash-stat-card.amber .dash-stat-value,
.dash-stat-card.warning .dash-stat-value,
.dash-stat-card:has(.dash-stat-icon.amber) .dash-stat-value,
.dash-stat-card:has(.dash-stat-icon.warning) .dash-stat-value,
.dash-stat-card.orange .dash-stat-value,
.dash-stat-card:has(.dash-stat-icon.orange) .dash-stat-value {
  color: #b45309;
}
.dash-stat-card.blue:hover,
.dash-stat-card.info:hover,
.dash-stat-card:has(.dash-stat-icon.blue):hover,
.dash-stat-card:has(.dash-stat-icon.info):hover,
.dash-stat-card.teal:hover,
.dash-stat-card:has(.dash-stat-icon.teal):hover {
  border-color: rgba(15, 118, 110, 0.25);
}
.dash-stat-card.teal:hover,
.dash-stat-card:has(.dash-stat-icon.teal):hover {
  border-color: #5eead4;
  }
.dash-stat-card.teal .dash-stat-value,
.dash-stat-card:has(.dash-stat-icon.teal) .dash-stat-value {
  color: #134e4a;
}

.dash-stat-card.purple,
.dash-stat-card:has(.dash-stat-icon.purple) {
  background: #faf5ff;
  border-color: #e9d5ff;
  }
.dash-stat-card.purple:hover,
.dash-stat-card:has(.dash-stat-icon.purple):hover {
  border-color: #c084fc;
  }
.dash-stat-card.purple .dash-stat-value,
.dash-stat-card:has(.dash-stat-icon.purple) .dash-stat-value {
  color: #581c87;
}

/* Icon Box */
.dash-stat-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.dash-stat-card:hover .dash-stat-icon {
  transform: scale(1.08);
}

.dash-stat-card.teal .dash-stat-icon,
.dash-stat-icon.teal    { background: #ccfbf1; color: #0f766e; }

.dash-stat-card.green .dash-stat-icon,
.dash-stat-card.primary .dash-stat-icon,
.dash-stat-icon.green,
.dash-stat-icon.primary { background: #dcfce7; color: #16a34a; }

.dash-stat-card.amber .dash-stat-icon,
.dash-stat-card.warning .dash-stat-icon,
.dash-stat-icon.amber,
.dash-stat-icon.warning { background: #fef3c7; color: #d97706; }

.dash-stat-card.orange .dash-stat-icon,
.dash-stat-icon.orange  { background: #ffedd5; color: #ea580c; }

.dash-stat-card.blue .dash-stat-icon,
.dash-stat-card.info .dash-stat-icon,
.dash-stat-icon.blue,
.dash-stat-icon.info    { background: #dbeafe; color: #2563eb; }

.dash-stat-card.purple .dash-stat-icon,
.dash-stat-icon.purple  { background: #f3e8ff; color: #7c3aed; }

.dash-stat-card.red .dash-stat-icon,
.dash-stat-card.danger .dash-stat-icon,
.dash-stat-icon.red,
.dash-stat-icon.danger  { background: #fee2e2; color: #dc2626; }

.dash-stat-card.slate .dash-stat-icon,
.dash-stat-icon.slate   { background: #f1f5f9; color: #475569; }

/* Text Content Wrapper */
.dash-stat-info,
.dash-stat-card > div:not(.dash-stat-icon) {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dash-stat-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.dash-stat-value {
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  color: #0f172a;
  line-height: 1.2 !important;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.dash-stat-change,
.dash-stat-sub,
.dash-stat-desc {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 0.2rem;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-stat-change i,
.dash-stat-sub i,
.dash-stat-desc i {
  font-size: 0.85rem;
  flex-shrink: 0;
}
.dash-stat-change.up,
.dash-stat-sub.up {
  color: #16a34a;
  font-weight: 600;
}
.dash-stat-change.down,
.dash-stat-sub.down {
  color: #dc2626;
  font-weight: 600;
}
.dash-stat-change.warn,
.dash-stat-sub.warn {
  color: #d97706;
  font-weight: 600;
}
.dash-stat-change.neutral,
.dash-stat-sub.neutral {
  color: #64748b;
}

/* Public Portal & Module Talangan KPI Card System (60-30-10 Warm Stone) */
.talangan-kpi-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 14px;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(28, 25, 23, 0.085);
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.035);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 86px;
  box-sizing: border-box;
}
.talangan-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0f766e 0%, #2dd4bf 100%);
}
.talangan-kpi-card:hover {
  box-shadow: 0 10px 24px -12px rgba(28, 25, 23, 0.16);
  border-color: rgba(15, 118, 110, 0.24);
  transform: translateY(-2px);
}
.talangan-kpi-card.green::before, .talangan-kpi-card:has(.talangan-kpi-icon.green)::before {
  background: linear-gradient(90deg, #059669 0%, #34d399 100%);
}
.talangan-kpi-card.green .talangan-kpi-value { color: #047857; }
.talangan-kpi-card.red::before, .talangan-kpi-card:has(.talangan-kpi-icon.red)::before {
  background: linear-gradient(90deg, #dc2626 0%, #fb7185 100%);
}
.talangan-kpi-card.red .talangan-kpi-value { color: #b91c1c; }
.talangan-kpi-card.amber::before, .talangan-kpi-card:has(.talangan-kpi-icon.amber)::before {
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 100%);
}
.talangan-kpi-card.amber .talangan-kpi-value { color: #b45309; }
.talangan-kpi-card.blue::before, .talangan-kpi-card:has(.talangan-kpi-icon.blue)::before {
  background: linear-gradient(90deg, #06373b 0%, #0f766e 100%);
}
.talangan-kpi-card.blue .talangan-kpi-value { color: #0f766e; }
.talangan-kpi-card.slate::before, .talangan-kpi-card:has(.talangan-kpi-icon.slate)::before {
  background: linear-gradient(90deg, #57534e 0%, #a8a29e 100%);
}
.talangan-kpi-card.slate .talangan-kpi-value { color: #1c1917; }

.talangan-kpi-icon {
  width: 44px; height: 44px; min-width: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0;
}
.talangan-kpi-icon.green { background: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
.talangan-kpi-icon.red   { background: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }
.talangan-kpi-icon.amber { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.talangan-kpi-icon.blue  { background: #f0fdfa; color: #0f766e; border: 1px solid #ccfbf1; }
.talangan-kpi-icon.slate { background: #f5f4f0; color: #57534e; border: 1px solid rgba(28, 25, 23, 0.08); }
.talangan-kpi-icon.teal  { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }

.talangan-kpi-content { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.talangan-kpi-label { font-size: 0.7rem; color: #78716c; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.2rem; line-height: 1.25; }
.talangan-kpi-value { font-family: var(--font-mono, 'JetBrains Mono', monospace) !important; font-size: 1.28rem !important; font-weight: 700 !important; color: #1c1917; line-height: 1.2 !important; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.talangan-kpi-sub { font-size: 0.72rem; font-weight: 500; color: #78716c; margin-top: 0.2rem; line-height: 1.3; }

@media (max-width: 768px) {
  .dash-stat-card {
    padding: 0.75rem 0.875rem;
    gap: 0.75rem;
    min-height: 72px;
  }
  .dash-stat-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 1.3rem;
    border-radius: 8px;
  }
  .dash-stat-label {
    font-size: 0.65rem;
  }
  .dash-stat-value {
    font-size: 1.15rem;
  }
  .dash-stat-change,
  .dash-stat-sub,
  .dash-stat-desc {
    font-size: 0.7rem;
  }
}

/* ============ Content Grid ============ */
.dash-chart-container { position: relative; height: 320px; width: 100%; }
@media (max-width: 768px), (orientation: portrait) {
  .dash-chart-container { height: 240px; }
}

.dash-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
}

.dash-content-grid-full { grid-template-columns: 1fr; }

/* ============ Search & Filter Bar ============ */
.dash-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.dash-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.dash-search-wrap i {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--medium);
  font-size: 1rem;
  pointer-events: none;
}

.dash-search-input {
  width: 100%;
  padding: 0.625rem 0.875rem 0.625rem 2.5rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  background: var(--white);
  color: var(--gray-700);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 42px;
}
.dash-search-input:focus {
  border-color: var(--medium);
  box-shadow: 0 0 0 3px rgba(109,150,154,0.15);
}

.dash-filter-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.dash-filter-pills::-webkit-scrollbar { display: none; }

/* ============ Empty State ============ */
.dash-empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--gray-400);
}
.dash-empty i { font-size: 3.5rem; margin-bottom: 1rem; color: var(--tint); }
.dash-empty h3 { font-size: 1.125rem; color: var(--gray-600); margin-bottom: 0.5rem; }
.dash-empty p  { font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ============ Modal (Warm Stone Botanical) ============ */
.dash-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.56);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease-default);
}
.dash-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.dash-modal {
  background: #faf9f6;
  border: 1px solid rgba(28, 25, 23, 0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 26px 56px -16px rgba(28, 25, 23, 0.28), 0 8px 20px -8px rgba(15, 118, 110, 0.1);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.22s var(--ease-default);
}
.dash-modal > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.dash-modal-overlay.open .dash-modal { transform: scale(1) translateY(0); }

.dash-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.45rem;
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
  border-radius: 16px 16px 0 0;
  background: linear-gradient(135deg, #faf9f6 0%, #f0fdfa 60%, #fefce8 100%);
}
.dash-modal-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #1c1917;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dash-modal-title i {
  color: #0f766e;
}
.dash-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.11);
  color: #57534e;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}
.dash-modal-close:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}
.dash-modal-body {
  padding: 1.35rem 1.45rem;
  background: #faf9f6;
  overflow-y: auto;
  flex: 1;
}
.dash-modal-footer {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  padding: 0.95rem 1.45rem;
  border-top: 1px solid rgba(28, 25, 23, 0.08);
  background: #ffffff;
  border-radius: 0 0 16px 16px;
}

/* ============ Tabs (Warm Stone Segmented Control) ============ */
.dash-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #eceae3;
  border: 1px solid rgba(28, 25, 23, 0.07);
  border-radius: 12px;
  margin-bottom: 1.35rem;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.dash-tabs::-webkit-scrollbar { display: none; }

.dash-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #57534e;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  margin-bottom: 0;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  min-height: 36px;
}
.dash-tab:hover {
  color: #1c1917;
  background: rgba(255, 255, 255, 0.6);
}
.dash-tab.active,
.dash-tab.active:hover {
  color: #0f766e;
  font-weight: 700;
  background: #ffffff;
  border-color: rgba(15, 118, 110, 0.18);
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.09);
}
.dash-tab i { font-size: 1.05rem; color: #78716c; }
.dash-tab.active i,
.dash-tab.active:hover i { color: #0f766e; }

.dash-tab-panel {
  display: block;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
.dash-tab-panel.active {
  visibility: visible;
  height: auto;
  overflow: visible;
  pointer-events: auto;
}

/* ============ HPP Calculator Specific ============ */
.hpp-biaya-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.hpp-biaya-row:last-child { border-bottom: none; }
.hpp-biaya-nama { flex: 1; }

.hpp-biaya-input {
  width: 160px;
  text-align: right;
}

/* Grids for Advanced HPP Features */
.hpp-insight-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.hpp-risk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.hpp-risk-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.hpp-biaya-remove {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #fee2e2;
  border: none;
  color: #dc2626;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.hpp-biaya-remove:hover { background: #dc2626; color: white; }

/* Responsive HPP Analysis Grid */
.hpp-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
}
@media (max-width: 900px) {
  .hpp-analysis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .hpp-analysis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============ HPP Ã¢â‚¬â€ Semantic Classes (mobile-friendly) ============ */
.hpp-info-banner {
  background: #faf9f6;
  border: 1px solid rgba(28, 25, 23, 0.08);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.84rem;
  color: #57534e;
  line-height: 1.6;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.hpp-info-banner i { flex-shrink: 0; margin-top: 1px; color: #0f766e; }

.hpp-result-card {
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 14px;
  padding: 1.25rem;
  color: #1c1917;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px -2px rgba(28, 25, 23, 0.05);
}

.hpp-result-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #78716c;
  margin-bottom: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hpp-result-item {
  background: #faf9f6;
  border: 1px solid rgba(28, 25, 23, 0.075);
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}

.hpp-result-item--highlight {
  background: #f0fdfa;
  border-color: #99f6e4;
}

.hpp-result-label {
  font-size: 0.69rem;
  font-weight: 600;
  color: #78716c;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.3;
}

.hpp-result-value {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  font-size: 0.98rem;
  font-weight: 700;
  color: #1c1917;
  word-break: break-word;
  line-height: 1.25;
}

.hpp-form-actions {
  display: flex;
  gap: 0.875rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
}

.hpp-submit-btn {
  flex: 1;
  min-width: 180px;
  justify-content: center;
}

.hpp-reset-btn {
  justify-content: center;
}

.hpp-add-btn {
  margin-top: 0.875rem;
  width: 100%;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.hpp-riwayat-card {
  position: static !important;
  top: auto !important;
  margin-top: 0 !important;
}

/* ============ Map ============ */
#kebun-map {
  height: clamp(320px, 50vh, 520px);
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  border: none;
  z-index: 1;
}

/* ============ Progress Bar ============ */
.progress-wrap {
  height: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: #167375;
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-default);
}

/* ============ Timeline ============ */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
  padding-left: 0.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -1rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--deep);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--deep);
  transform: translateX(-50%);
}
.timeline-dot.done { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-dot.pending { background: var(--gray-300); box-shadow: 0 0 0 2px var(--gray-300); }
.timeline-date {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.timeline-content {
  font-size: 0.9rem;
  color: var(--gray-700);
  font-weight: 500;
}

/* ============ Mobile Bottom Navigation Bar ============ */
.dash-bottom-nav {
  display: none;
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  left: 1rem;
  right: 1rem;
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 100px;
  height: 64px;
  z-index: 850;
  padding: 0 0.5rem;
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.1), 0 4px 12px rgba(15, 118, 110, 0.08);
  justify-content: space-evenly;
  align-items: center;
}

.dash-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: #78716C;
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 600;
  gap: 4px;
  transition: all 0.25s ease;
  padding: 4px 2px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-width: 0; /* Important for flex child truncation */
}
.dash-bottom-nav-item span {
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}
.dash-bottom-nav-item i {
  font-size: 1.35rem;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dash-bottom-nav-item.active,
.dash-bottom-nav-item:hover {
  color: #0F766E;
}
.dash-bottom-nav-item.active i {
  color: #0F766E;
  transform: translateY(-2px);
}

/* ============ Responsive Breakpoints ============ */

/* Tablet & iPad (iPad Mini, iPad Air, iPad Pro, Android Tablets: portrait / < 1024px; landscape memakai tampilan laptop) */
@media (max-width: 1023px) {
  .dash-sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(28, 25, 23, 0.16);
  }
  .dash-sidebar.open {
    transform: translateX(0);
  }
  .dash-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-top: 62px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .dash-topbar {
    left: 0 !important;
    height: 62px !important;
    padding: 0 1.25rem !important;
  }
  .dash-sidebar-toggle { 
    display: flex !important; 
  }
  .dash-content { 
    padding: 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .dash-page-header { 
    margin-bottom: 1.25rem !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
  }
  .dash-stats-grid { 
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important; 
    gap: 1rem !important; 
    margin-bottom: 1.25rem !important; 
  }
  .dash-content-grid { 
    grid-template-columns: minmax(0, 1fr) !important; 
    gap: 1.25rem !important; 
  }
  .dash-grid-2col { 
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.25rem !important; 
  }
  .card { 
    margin-bottom: 1.25rem !important; 
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .card-header {
    padding: 0.875rem 1.25rem !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
  }
  .card-header-tools {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    width: auto !important;
    margin-left: auto !important;
  }
  .card-header-tools .datatable-search,
  .card-header-tools .dataTable-search {
    flex: 1;
    min-width: 140px;
  }
  .card-header-tools .datatable-input,
  .card-header-tools .dataTable-input {
    min-width: 130px !important;
    width: 100% !important;
  }
  .table-wrapper,
  .table-responsive,
  .datatable-container,
  .dataTable-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .table,
  .datatable-table {
    min-width: 620px; /* Preserve columns while scrolling smoothly */
  }
}

/* Mobile Devices (iPhone & Android: <= 768px) */
@media (max-width: 768px) {
  .dash-main {
    padding-bottom: calc(85px + env(safe-area-inset-bottom)) !important; /* Space for bottom nav */
    padding-top: 58px !important;
  }
  .dash-topbar {
    padding: 0 1rem !important;
    height: 58px !important;
  }
  .dash-topbar-left {
    gap: 0.5rem !important;
  }
  .dash-page-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    max-width: 145px !important;
    letter-spacing: -0.01em !important;
  }
  .dash-user-chip span.user-name-text { display: none; }
  .dash-content { padding: 1rem 0.875rem 2rem !important; }
  
  /* ============ Consistent Page Header & Title ============ */
  .dash-page-header { 
    margin-bottom: 1.125rem !important; 
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }
  .dash-breadcrumb {
    font-size: 0.75rem !important;
    gap: 0.35rem !important;
    margin-bottom: 0.25rem !important;
    color: var(--gray-500) !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
  }
  .dash-breadcrumb a {
    color: var(--gray-500) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
  }
  .dash-breadcrumb i {
    font-size: 0.75rem !important;
  }
  .dash-page-header-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: var(--deep) !important;
    letter-spacing: -0.02em !important;
    line-height: 1.25 !important;
    margin-bottom: 0.25rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
  }
  .dash-page-header-title i {
    font-size: 1.25rem !important;
    color: var(--deep) !important;
    flex-shrink: 0 !important;
  }
  .dash-page-header-sub {
    font-size: 0.8125rem !important;
    line-height: 1.35 !important;
    color: var(--gray-500) !important;
    margin-bottom: 0 !important;
  }
  .dash-page-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin-top: 0.15rem !important;
  }
  .dash-page-header-actions .btn {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 0.8125rem !important;
    padding: 0.55rem 0.875rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
  }
  .card-header h3,
  .card-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--deep) !important;
  }

  /* ============ Stat Cards: Always 2 Columns on Mobile ============ */
  .dash-stats-grid,
  .stats-grid,
  .summary-grid,
  .hpp-analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.625rem !important;
    margin-bottom: 1rem !important;
  }
  .dash-content-grid { 
    grid-template-columns: minmax(0, 1fr) !important; 
    gap: 1rem !important; 
    width: 100% !important;
    max-width: 100% !important;
  }
  .dash-grid-2col { 
    grid-template-columns: minmax(0, 1fr) !important; 
    gap: 1rem !important; 
    width: 100% !important;
    max-width: 100% !important;
  }
  .card { 
    margin-bottom: 1rem !important; 
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .card-header {
    padding: 0.875rem 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .card-body {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .dash-stat-card {
    padding: 0.75rem 0.65rem !important;
    flex-direction: row !important;
    gap: 0.5rem !important;
    align-items: center !important;
    text-align: left !important;
    border-radius: 8px !important;
  }
  .dash-stat-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.15rem !important;
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
  }
  .dash-stat-value {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    word-break: break-word;
  }
  .dash-stat-label {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    color: var(--gray-500) !important;
    line-height: 1.2 !important;
    margin-bottom: 0.1rem !important;
  }
  .dash-bottom-nav { display: flex; }

  .card-header-tools {
    width: 100% !important;
    margin-left: 0 !important;
  }

  /* Mobile Bottom Sheet style modal */
  .dash-modal {
    max-height: 85vh;
    border-radius: var(--radius-lg);
  }
}

/* Small Mobile (<= 480px) */
@media (max-width: 480px) {
  .dash-page-title {
    font-size: 0.9375rem !important;
    max-width: 120px !important;
  }
  .dash-page-header-title {
    font-size: 1.1875rem !important;
  }
  .dash-page-header-title i {
    font-size: 1.1875rem !important;
  }
  .dash-page-header-sub {
    font-size: 0.775rem !important;
  }

  .dash-stats-grid,
  .stats-grid,
  .summary-grid,
  .hpp-analysis-grid { 
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important; 
    gap: 0.5rem !important; 
  }
  .dash-stat-card {
    padding: 0.65rem 0.5rem !important;
    flex-direction: row !important;
    gap: 0.45rem !important;
    align-items: center !important;
    text-align: left !important;
    border-radius: 6px !important;
  }
  .dash-stat-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.05rem !important;
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
  }
  .dash-stat-value {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    word-wrap: break-word;
  }
  .dash-stat-label {
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
  }
  .dash-search-wrap { max-width: 100%; }

  /* Tab: compact on mobile */
  .dash-tab {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    gap: 0.375rem;
    white-space: nowrap;
  }
  .dash-tab i { font-size: 1rem; }

  /* Grid-responsive-sidebar: always 1 col on mobile */
  .grid-responsive-sidebar {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Sidebar Overlay (mobile) */
.dash-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 20, 22, 0.5);
  z-index: 920;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s ease;
}
.dash-sidebar-overlay.open,
.dash-sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ============ Toast Notifications ============ */
.toast-container { position: fixed; top: 76px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 1rem 1.25rem; display: flex; align-items: center; gap: 0.75rem; min-width: 300px; max-width: 400px; position: relative; overflow: hidden; pointer-events: all; }
.toast-success { background: #dcfce7; border: 1px solid #bbf7d0; color: #166534; }
.toast-error { background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; }
.toast-icon { font-size: 1.5rem; }
.toast-success .toast-icon { color: #16a34a; }
.toast-error .toast-icon { color: #dc2626; }
.toast-content { flex: 1; font-size: 0.9rem; font-weight: 600; }
.toast-close { background: none; border: none; cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); transition: all 0.2s; }
.toast-success .toast-close { color: #16a34a; }
.toast-error .toast-close { color: #dc2626; }
.toast-success .toast-close:hover { background: rgba(22, 163, 74, 0.15); }
.toast-error .toast-close:hover { background: rgba(220, 38, 38, 0.15); }
.toast-progress { position: absolute; bottom: 0; left: 0; height: 4px; width: 100%; animation: toastProgress 4s linear forwards; }
.toast-success .toast-progress { background: #22c55e; }
.toast-error .toast-progress { background: #ef4444; }
@keyframes toastProgress { 0% { width: 100%; } 100% { width: 0%; } }
@keyframes animate-slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.animate-slideIn { animation: animate-slideIn 0.3s var(--ease-default); }
@keyframes animate-slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
.animate-slideOut { animation: animate-slideOut 0.3s var(--ease-default) forwards; }

/* ============ Global Unified Table Design System ============ */
.table,
.datatable-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--gray-700);
  background: var(--white);
  margin: 0;
}

/* Header Cells (thead th) */
.table thead th,
.datatable-table thead th,
.table th,
.datatable-table th,
.datatable-table > thead > tr > th,
.dataTable-table > thead > tr > th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 0.725rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  padding: 0.65rem 0.45rem !important;
  border-bottom: 1px solid var(--gray-200) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  white-space: nowrap;
  vertical-align: middle;
  text-align: center !important; /* Judul Kolom Tabel Berada di Tengah */
}

/* Simple-DataTables sorter header center alignment */
.datatable-sorter,
.dataTable-sorter {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
  padding-right: 0.65rem !important;
  position: relative !important;
}

.datatable-sorter::before,
.datatable-sorter::after,
.dataTable-sorter::before,
.dataTable-sorter::after {
  right: 0 !important;
}

/* Body Cells (tbody td) */
.table tbody td,
.datatable-table tbody td,
.table td,
.datatable-table td {
  padding: 0.65rem 0.45rem !important;
  border-bottom: 1px solid #f1f5f9;
  border-top: none;
  vertical-align: middle;
  color: var(--gray-700);
  background: transparent;
  white-space: nowrap !important; /* Mencegah teks turun jadi 2 baris */
  font-size: 0.8125rem !important;
  transition: background-color 0.15s ease;
}

/* Row Hover State */
.table tbody tr:hover,
.table-hover tbody tr:hover,
.datatable-table tbody tr:hover {
  background-color: #f8fafc !important;
}

.table tbody tr:last-child td,
.datatable-table tbody tr:last-child td {
  border-bottom: none;
}

/* Table Scrollbar Styling (Subtle Gray, No Green Bars) */
.table-responsive::-webkit-scrollbar,
.table-wrapper::-webkit-scrollbar,
.datatable-container::-webkit-scrollbar,
.dataTable-container::-webkit-scrollbar {
  height: 5px !important;
  width: 5px !important;
}

.table-responsive::-webkit-scrollbar-track,
.table-wrapper::-webkit-scrollbar-track,
.datatable-container::-webkit-scrollbar-track,
.dataTable-container::-webkit-scrollbar-track {
  background: #f8fafc !important;
}

.table-responsive::-webkit-scrollbar-thumb,
.table-wrapper::-webkit-scrollbar-thumb,
.datatable-container::-webkit-scrollbar-thumb,
.dataTable-container::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 99px !important;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.table-wrapper::-webkit-scrollbar-thumb:hover,
.datatable-container::-webkit-scrollbar-thumb:hover,
.dataTable-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

/* Table First and Last Column Padding Alignment with Card Header */
.table thead th:first-child,
.datatable-table thead th:first-child,
.table tbody td:first-child,
.datatable-table tbody td:first-child,
.table th:first-child,
.table td:first-child {
  padding-left: 1.25rem !important;
}

.table thead th:last-child,
.datatable-table thead th:last-child,
.table tbody td:last-child,
.datatable-table tbody td:last-child,
.table th:last-child,
.table td:last-child {
  padding-right: 1.25rem !important;
}

@media (max-width: 1023px) {
  .table thead th:first-child,
  .datatable-table thead th:first-child,
  .table tbody td:first-child,
  .datatable-table tbody td:first-child,
  .table th:first-child,
  .table td:first-child {
    padding-left: 1rem !important;
  }
  .table thead th:last-child,
  .datatable-table thead th:last-child,
  .table tbody td:last-child,
  .datatable-table tbody td:last-child,
  .table th:last-child,
  .table td:last-child {
    padding-right: 1rem !important;
  }
}

@media (max-width: 768px) {
  .table thead th:first-child,
  .datatable-table thead th:first-child,
  .table tbody td:first-child,
  .datatable-table tbody td:first-child,
  .table th:first-child,
  .table td:first-child {
    padding-left: 0.75rem !important;
  }
  .table thead th:last-child,
  .datatable-table thead th:last-child,
  .table tbody td:last-child,
  .datatable-table tbody td:last-child,
  .table th:last-child,
  .table td:last-child {
    padding-right: 0.75rem !important;
  }
}

/* Card and Table Container Consistency */
.card {
  background: var(--white);
  border-radius: var(--radius-lg, 12px) !important;
  border: 1px solid var(--gray-200) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important;
  overflow: hidden !important;
  margin-bottom: 1.5rem;
}

/* Card in List & Nested Grid Spacing Resets */
.lahan-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.lahan-list-wrapper .card,
.lahan-card {
  margin-bottom: 0 !important;
}
.dash-grid-2col > .card {
  margin-bottom: 0 !important;
}

/* Ensure single consistent spacing for cards in flex column layouts */
.dash-content-grid > div > .card,
.dash-content-grid > div > .dash-grid-2col,
.grid-responsive-form > div > .card,
.grid-responsive-sidebar > div > .card,
div[style*="flex-direction:column"] > .card {
  margin-bottom: 0 !important;
}

.card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.875rem 1.5rem !important;
  border-bottom: 1px solid var(--gray-200) !important;
  background: var(--white) !important;
  gap: 1rem !important;
  flex-wrap: wrap !important;
  min-height: 58px;
}

.card-header-title-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.625rem !important;
  flex-shrink: 0;
}

.card-header-tools {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  margin-left: auto !important;
  flex-wrap: wrap !important;
}

.card-header-tools .datatable-dropdown,
.card-header-tools .dataTable-dropdown {
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}

.card-header-tools .datatable-dropdown label,
.card-header-tools .dataTable-dropdown label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  margin: 0 !important;
  font-size: 0.8125rem !important;
  color: var(--gray-500) !important;
  font-weight: 500 !important;
}

.card-header-tools .datatable-selector,
.card-header-tools .dataTable-selector {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0.25rem 1.75rem 0.25rem 0.65rem !important;
  border-radius: 8px !important;
  border: 1px solid var(--gray-200) !important;
  font-size: 0.8125rem !important;
  background-position: right 0.4rem center !important;
}

.card-header-tools .datatable-search,
.card-header-tools .dataTable-search {
  margin: 0 !important;
}

.card-header-tools .datatable-input,
.card-header-tools .dataTable-input {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0.35rem 0.875rem !important;
  border-radius: 8px !important;
  border: 1px solid var(--gray-200) !important;
  font-size: 0.8125rem !important;
  min-width: 180px;
}

.card-header h3,
.card-header strong {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: 1.0625rem !important;
  font-weight: 700 !important;
  color: var(--deep) !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.card-header-title-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0.15rem !important;
}

.card-header .card-subtitle,
.card-header .header-subtitle,
.card-header-subtitle,
.card-header div > strong + span:not(.badge),
.card-header div > strong + small {
  display: block !important;
  font-size: 0.75rem !important;
  font-weight: 400 !important;
  color: var(--gray-500) !important;
  line-height: 1.35 !important;
  margin-top: 0.15rem !important;
}

.card-header i {
  font-size: 1.25rem !important;
  color: var(--deep);
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

/* Hide empty datatable-top when controls are moved to header */
.datatable-top:empty,
.dataTable-top:empty {
  display: none !important;
}

/* ============ DataTables Overrides ============ */
.datatable-wrapper, .dataTable-wrapper { font-family: var(--font-sans); }
.datatable-input, .dataTable-input { 
  border-radius: 8px; 
  border: 1px solid var(--gray-200); 
  padding: 0.45rem 1rem; 
  font-size: 0.875rem;
  color: var(--gray-700);
  transition: all 0.2s ease;
  height: 38px !important;
  box-sizing: border-box;
}
.datatable-input:focus, .dataTable-input:focus { 
  border-color: var(--medium); 
  box-shadow: 0 0 0 3px var(--tint-alpha); 
  outline: none; 
}
.datatable-selector, .dataTable-selector { 
  border-radius: 8px !important; 
  border: 1px solid var(--gray-200) !important; 
  padding: 0.45rem 2rem 0.45rem 0.75rem !important; 
  appearance: none !important;
  -moz-appearance: none !important;
  -webkit-appearance: none !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23059669'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.5rem center !important;
  background-size: 1.25em 1.25em !important;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--deep) !important;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 4.5rem;
  box-sizing: border-box;
  height: 38px !important;
}
.datatable-selector:focus, .dataTable-selector:focus {
  border-color: var(--medium);
  box-shadow: 0 0 0 3px var(--tint-alpha);
  outline: none;
}

.datatable-top,
.dataTable-top {
  padding: 1.25rem 1.5rem 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.datatable-dropdown label,
.dataTable-dropdown label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 500;
  margin: 0;
}

.datatable-search,
.dataTable-search {
  margin: 0 !important;
}

@media (max-width: 768px) {
  .datatable-top,
  .dataTable-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .datatable-search,
  .dataTable-search,
  .datatable-search .datatable-input,
  .dataTable-search .dataTable-input {
    width: 100%;
    box-sizing: border-box;
  }
  .datatable-dropdown,
  .dataTable-dropdown {
    display: none !important;
  }
}

/* ============ Professional Pagination Design System ============ */
.datatable-bottom,
.dataTable-bottom {
  padding: 0.875rem 1.5rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  border-top: 1px solid var(--gray-200) !important;
  background: var(--white) !important;
  font-size: 0.875rem !important;
}

.datatable-info,
.dataTable-info {
  font-size: 0.8125rem !important;
  color: var(--gray-500) !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
}

.datatable-pagination,
.dataTable-pagination,
.pagination {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin-left: auto !important; /* Simpan di sebelah kanan tabel */
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
}

.datatable-pagination ul,
.dataTable-pagination ul,
.pagination-list {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.35rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.datatable-pagination li,
.dataTable-pagination li,
.page-item {
  display: inline-flex !important;
  align-items: center !important;
}

.datatable-pagination li a,
.dataTable-pagination li a,
.datatable-pagination-list-item-link,
.page-link {
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 0.65rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  border: 1px solid var(--gray-200) !important;
  background: var(--white) !important;
  color: var(--gray-700) !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  user-select: none !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.datatable-pagination li a:hover,
.dataTable-pagination li a:hover,
.page-link:hover {
  background-color: #f8fafc !important;
  border-color: var(--gray-300) !important;
  color: var(--deep) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04) !important;
}

/* Active Page Pill */
.datatable-pagination .datatable-active a,
.datatable-pagination .datatable-active a:focus,
.datatable-pagination .datatable-active a:hover,
.dataTable-pagination .active a,
.dataTable-pagination .active a:focus,
.dataTable-pagination .active a:hover,
.page-item.active .page-link {
  background: var(--deep) !important;
  border-color: var(--deep) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25) !important;
  transform: none !important;
}

/* Disabled Page Pill (Prev/Next when inactive) */
.datatable-pagination .datatable-disabled a,
.datatable-pagination .datatable-disabled a:hover,
.dataTable-pagination .disabled a,
.dataTable-pagination .disabled a:hover,
.page-item.disabled .page-link {
  background: var(--gray-50) !important;
  border-color: var(--gray-200) !important;
  color: var(--gray-400) !important;
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Ellipsis Item */
.datatable-pagination .datatable-ellipsis a,
.dataTable-pagination .ellipsis a {
  border: none !important;
  background: transparent !important;
  color: var(--gray-400) !important;
  box-shadow: none !important;
  cursor: default !important;
  pointer-events: none !important;
}

/* ============ Unified Table Action Buttons & Icons ============ */
.table-action-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.btn-action-square,
.btn-row-action-delete {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  flex-shrink: 0;
  text-decoration: none;
}

.btn-action-square i,
.btn-row-action-delete i {
  font-size: 1.05rem;
  line-height: 1;
  pointer-events: none;
}

.btn-action-square:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(15, 23, 42, 0.06);
}

/* Variant: View / Detail (Teal) */
.btn-action-square.view {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e;
}
.btn-action-square.view:hover {
  background: #ccfbf1;
  border-color: #5eead4;
  color: #115e59;
}

/* Variant: Edit / Modify (Blue) */
.btn-action-square.edit {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0284c7;
}
.btn-action-square.edit:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

/* Variant: Approve / Success (Green) */
.btn-action-square.approve,
.btn-action-square.text-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}
.btn-action-square.approve:hover,
.btn-action-square.text-success:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

/* Variant: Warning / Key / Crown (Amber) */
.btn-action-square.warning,
.btn-action-square.amber {
  background: #fffbeb;
  border-color: #fde68a;
  color: #d97706;
}
.btn-action-square.warning:hover,
.btn-action-square.amber:hover {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #b45309;
}

/* Variant: Delete / Void / Danger (Red) */
.btn-action-square.text-danger,
.btn-action-square.delete,
.btn-row-action-delete {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}
.btn-action-square.text-danger:hover,
.btn-action-square.delete:hover,
.btn-row-action-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(220, 38, 38, 0.1);
}

.btn-action-square:disabled,
.btn-row-action-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.table td.text-center,
.table th.text-center,
.datatable-table td.text-center,
.datatable-table th.text-center {
  text-align: center !important;
}


/* ============ Page Transitions ============ */
@keyframes pageSlideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pageSlideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(30px); }
}
@keyframes pageSlideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-30px); }
}
.page-slide-in-right { animation: pageSlideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.page-slide-out-right { animation: pageSlideOutRight 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.page-slide-out-left { animation: pageSlideOutLeft 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards; }


/* Custom Select & Date Picker Overrides */
.form-group { position: relative; z-index: 1; }
.form-group.has-open-dropdown, .form-group:focus-within, .form-group:has(.choices.is-open), .form-group:has(.choices.is-focused) { position: relative !important; z-index: 1000 !important; }
.form-row-2, .form-row-3, .form-row-4, .form-row { position: relative; z-index: 1; }
.form-row-2.has-open-dropdown, .form-row-3.has-open-dropdown, .form-row-4.has-open-dropdown, .form-row.has-open-dropdown, .form-row-2:focus-within, .form-row-3:focus-within, .form-row-4:focus-within, .form-row:focus-within, .form-row-2:has(.choices.is-open), .form-row-3:has(.choices.is-open), .form-row-4:has(.choices.is-open) { position: relative !important; z-index: 1000 !important; }
.card.has-open-dropdown, .card:focus-within, .card:has(.choices.is-open) { position: relative !important; z-index: 500 !important; }

.choices { position: relative; z-index: 1; margin-bottom: 0 !important; }
.choices.is-open, .choices.is-focused { z-index: 1001 !important; position: relative !important; }
.choices__inner { background-color: white; border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 5px 12px 2px; min-height: 42px; display: flex; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,0.05); position: relative; z-index: 1; }
.choices.is-focused .choices__inner { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(32,160,144,0.15); }
.choices__list--dropdown { border-radius: var(--radius-md); border-color: var(--gray-200); box-shadow: 0 10px 25px -3px rgba(0,0,0,0.15); margin-top: 5px; z-index: 10000 !important; background-color: #ffffff !important; position: absolute !important; width: 100% !important; min-width: 100% !important; left: 0 !important; right: 0 !important; }
.choices__list--dropdown .choices__item--selectable.is-highlighted { background-color: var(--tint-alpha); color: var(--deep); }
.flatpickr-calendar { border: none; border-radius: var(--radius-md); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); z-index: 99999 !important; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay { background: var(--primary); border-color: var(--primary); }
.flatpickr-day.today { border-color: var(--tint); }



/* ============ Responsive Table Cards (Mobile) ============ */
@media (max-width: 768px), (orientation: portrait) {
  .hpp-biaya-row {
    flex-wrap: wrap;
    align-items: center;
    padding: 0.875rem 0;
    gap: 0.5rem;
  }
  .hpp-biaya-nama {
    flex: 0 0 100% !important;
    width: 100% !important;
  }
  .hpp-biaya-input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0;
  }
  .hpp-biaya-remove {
    flex-shrink: 0;
  }

  /* HPP Ã¢â‚¬â€ mobile card & layout overrides */
  .hpp-riwayat-card { position: static !important; }
  .hpp-result-card  { padding: 1rem !important; border-radius: var(--radius-md) !important; }
  .hpp-result-item  { padding: 0.625rem 0.75rem !important; border-radius: 8px !important; }
  .hpp-result-value { font-size: 0.875rem !important; }
  .hpp-result-label { font-size: 0.65rem !important; }
  .hpp-analysis-grid{ gap: 0.5rem !important; }
  .hpp-insight-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .hpp-risk-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .hpp-risk-result-grid {
    grid-template-columns: 1fr;
  }
  .hpp-info-banner  { padding: 0.75rem !important; font-size: 0.8rem !important; }
  
  /* Tabs yang rapih proporsional di mobile */
  .dash-tabs {
    gap: 0 !important;
    justify-content: space-between !important;
    margin-bottom: 1.25rem !important;
  }
  .dash-tab {
    flex: 1 !important;
    justify-content: center !important;
    padding: 0.75rem 0.25rem !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
  }
  .dash-tab i {
    font-size: 1rem !important;
  }
  
  .hpp-form-actions { gap: 0.625rem !important; margin-top: 1.25rem !important; padding-top: 1.25rem !important; }
  .hpp-submit-btn   { min-width: 0 !important; width: 100%; }
  .hpp-reset-btn    { width: 100%; }
  .hpp-add-btn      { margin-top: 0.5rem; }
  /* Ensure minimum touch targets (44px) on mobile */
  .hpp-biaya-input  { min-height: 44px !important; }
  .hpp-biaya-remove { width: 44px !important; height: 44px !important; }
  .hpp-add-btn,
  .hpp-submit-btn,
  .hpp-reset-btn    { min-height: 44px; }
}

/* ============ Dashboard Proyek Tanam Terbaru: Modern Pro Cards for Mobile ============ */
.mobile-proyek-cards {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.desktop-proyek-table {
  display: block;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1100px) {
  .desktop-proyek-table {
    display: none !important;
  }
  .mobile-proyek-cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    padding: 0.75rem !important;
    gap: 0.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

.dash-proyek-card-mobile {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  text-decoration: none;
  color: var(--dark);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.dash-proyek-card-mobile:active,
.dash-proyek-card-mobile:hover {
  border-color: var(--primary-light, #10b981);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dash-proyek-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.dash-proyek-card-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--deep);
  line-height: 1.25;
  min-width: 0;
}

.dash-proyek-card-title span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-proyek-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.dash-proyek-card-meta .meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.dash-proyek-card-meta .meta-pill i {
  font-size: 0.825rem;
  color: var(--gray-500);
}

.dash-proyek-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid var(--gray-100);
}

.dash-proyek-card-date {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  color: var(--gray-500);
}

.dash-proyek-card-date strong {
  color: var(--dark);
  font-weight: 600;
}

.dash-proyek-card-arrow {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.dash-proyek-card-mobile:hover .dash-proyek-card-arrow {
  background: var(--primary);
  color: var(--white);
}

/* ============ Very Small Screens (Ã¢â€°Â¤ 380px) Ã¢â‚¬â€ HPP polish ============ */
@media (max-width: 380px) {
  /* Result grid: single column on tiny phones */
  .hpp-analysis-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  /* Tighter card padding */
  .card-body { padding: 1rem !important; }
  /* Compact tabs: hide icons so 3 labels fit without scrolling */
  .dash-tab {
    padding: 0.5rem 0.5rem !important;
    font-size: 0.75rem !important;
    gap: 0.25rem !important;
  }
  .dash-tab i { display: none; }
  /* HPP input rows: tighter gaps */
  .hpp-biaya-row { gap: 0.375rem !important; }
}

/* ============================================================
   Komoditas Table Ã¢â€ â€™ Responsive & Compact Table (Tablet / iPad / Desktop)
   ============================================================ */

.datatable-wrapper,
.dataTable-wrapper {
  width: 100% !important;
  max-width: 100% !important;
}

.datatable-container,
.dataTable-container,
.komoditas-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.komoditas-table {
  width: 100% !important;
  border-collapse: collapse !important;
}

.komoditas-table th,
.komoditas-table td {
  padding: 0.6rem 0.4rem !important;
  vertical-align: middle !important;
}

@media (max-width: 1023px) {
  .komoditas-table th,
  .komoditas-table td {
    padding: 0.5rem 0.3rem !important;
    font-size: 0.8rem !important;
  }
}

/* ============ Professional Pagination: Always Flush Right ============ */
.datatable-bottom,
.dataTable-bottom {
  padding: 0.875rem 1.25rem !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  border-top: 1px solid var(--gray-200) !important;
  background: var(--white) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.datatable-info,
.dataTable-info {
  font-size: 0.8125rem !important;
  color: var(--gray-500) !important;
  font-weight: 500 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  text-align: left !important;
}

.datatable-pagination,
.dataTable-pagination {
  margin-left: auto !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
}

.datatable-pagination ul,
.dataTable-pagination ul {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.35rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Smartphone Portrait (< 576px): Pagination responsif */
@media (max-width: 576px) {
  .datatable-bottom,
  .dataTable-bottom {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.625rem !important;
    padding: 0.75rem 1rem !important;
  }
  .datatable-pagination,
  .dataTable-pagination {
    margin-left: 0 !important;
    justify-content: center !important;
  }
}

/* ============================================================
   RESPONSIVE UTILITIES FOR PROYEK TANAM & DASHBOARD
   ============================================================ */

/* 2-Column Responsive Grid (Data Agronomi & Ringkasan Finansial) */
.dash-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
@media (max-width: 1023px) {
  .dash-grid-2col {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Detail Info & Map Grid (Detail Proyek) */
.detail-info-map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Kolom Kiri: Detail Info, Kolom Kanan: Peta */
  gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 1023px) {
  .detail-info-map-grid {
    grid-template-columns: minmax(0, 1fr) !important; /* Pada Tablet/iPad / Mobile jadi 1 kolom bertumpuk */
  }
}

/* Detail Info Items Grid (Komoditas, Varietas, Lokasi, Luas, Target, Kepemilikan) */
.detail-info-items-grid {
  display: grid;
  gap: 1.125rem 1.5rem;
}
.detail-info-items-grid.no-map {
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 Kolom pada Laptop / Desktop jika tidak ada peta */
}
.detail-info-items-grid.is-with-map {
  grid-template-columns: 1fr; /* 1 Kolom pada Laptop jika ada peta di samping */
}

/* KHUSUS TABLET / IPAD & MOBILE: WAJIB 1 KOLOM */
@media (max-width: 1023px), (max-width: 1180px) and (orientation: portrait) {
  .detail-info-items-grid,
  .detail-info-items-grid.no-map,
  .detail-info-items-grid.is-with-map {
    grid-template-columns: minmax(0, 1fr) !important; /* 1 Kolom penuh pada Tablet / iPad / Mobile */
    gap: 1rem !important;
  }
}

.detail-info-item {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  min-width: 0;
}

.detail-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.detail-info-content {
  min-width: 0;
  flex: 1;
}

.detail-info-label {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
  white-space: nowrap;
}

.detail-info-value {
  font-weight: 700;
  color: var(--gray-800);
  font-size: 0.9375rem;
  line-height: 1.2;
  white-space: nowrap;
}

/* Map Container Widget height stabilization */
.detail-map-widget {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  height: 100%;
  min-height: 280px;
}
@media (max-width: 1023px) {
  .detail-map-widget {
    height: 260px !important;
    min-height: 260px !important;
  }
}

/* ============================================================
   ULTRA MOBILE RESPONSIVE TABLES & MODALS (MOBILE CARD VIEW)
   ============================================================ */
@media (max-width: 768px) {
  .table-responsive, .table-wrapper {
      display: block !important;
      width: 100% !important;
      max-width: 100% !important;
      overflow: visible !important;
      padding: 0.75rem !important;
      background: #f8fafc !important;
      border: none !important;
      box-sizing: border-box !important;
  }
  
  .table, .dash-table, .datatable-table {
      display: block !important;
      width: 100% !important;
      min-width: 0 !important;
      max-width: 100% !important;
      background: transparent !important;
      border: none !important;
  }
  
  .table thead, .dash-table thead, .datatable-table thead {
      display: none !important;
  }
  
  .table tbody, .dash-table tbody, .datatable-table tbody {
      display: flex !important;
      flex-direction: column !important;
      gap: 0.75rem !important;
      width: 100% !important;
  }
  
  .table tbody tr, .dash-table tbody tr, .datatable-table tbody tr {
      display: flex !important;
      flex-direction: column !important;
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      background: #ffffff !important;
      border: 1px solid #e2e8f0 !important;
      border-radius: 12px !important;
      box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
      box-sizing: border-box !important;
      overflow: hidden !important;
  }

  .table tbody td, .dash-table tbody td, .datatable-table tbody td {
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      justify-content: space-between !important;
      position: static !important;
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      margin: 0 !important;
      padding: 0.65rem 1rem !important;
      border-bottom: 1px dashed #e2e8f0 !important;
      border-top: none !important;
      text-align: right !important;
      font-size: 0.825rem !important;
      color: #334155 !important;
      white-space: normal !important;
      word-break: break-word !important;
      overflow-wrap: anywhere !important;
      box-sizing: border-box !important;
      gap: 0.75rem !important;
  }

  .table tbody td:last-child, .dash-table tbody td:last-child {
      border-bottom: none !important;
  }
  
  .table tbody td::before, .dash-table tbody td::before {
      content: attr(data-label) !important;
      display: block !important;
      position: static !important;
      transform: none !important;
      flex: 0 0 40% !important;
      max-width: 42% !important;
      text-align: left !important;
      font-size: 0.7rem !important;
      font-weight: 700 !important;
      text-transform: uppercase !important;
      letter-spacing: 0.025em !important;
      color: #64748b !important;
      line-height: 1.3 !important;
      white-space: normal !important;
      word-break: break-word !important;
  }

  /* =========================================
     Fix for Custom Mobile Cards (Gudang/etc)
     ========================================= */
  .gmc-footer {
      display: flex !important;
      width: 100% !important;
      gap: 0.5rem !important;
      padding: 0.75rem 1rem !important;
      border-top: 1px dashed var(--gray-200) !important;
      background: var(--gray-50) !important;
      border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
      margin: 0 !important;
  }
  .gmc-footer > form { display: flex; margin: 0; }
  .gmc-footer .gmc-btn-edit {
      flex: 1 !important;
      display: flex !important;
      justify-content: center !important;
      align-items: center !important;
      height: 42px !important;
      border-radius: 8px !important;
      font-size: 0.9rem !important;
      font-weight: 600 !important;
      gap: 0.4rem !important;
      color: var(--primary) !important;
      border: 1px solid var(--primary-light) !important;
      background: rgba(26, 94, 99, 0.05) !important;
  }
  .gmc-footer .gmc-btn-del {
      flex: 0 0 42px !important;
      height: 42px !important;
      display: flex !important;
      justify-content: center !important;
      align-items: center !important;
      border-radius: 8px !important;
      border: 1px solid #fecdd3 !important;
      color: #e11d48 !important;
      background: #fff1f2 !important;
      font-size: 0 !important; /* hide text */
      padding: 0 !important;
  }
  .gmc-footer .gmc-btn-del i { font-size: 1.25rem !important; }
  .dash-modal {
      width: 95% !important;
      max-height: 90vh !important;
      margin: 5vh auto !important;
      border-radius: 8px !important;
  }
  
  .dash-modal-body {
      padding: 1rem !important;
  }

  .dash-modal-dialog { margin: 0.5rem; max-width: 95% !important; }
  
  /* Forms inside modals switch to 1 column on mobile */
  .dash-modal-body > div[style*="display:grid"] { grid-template-columns: minmax(0, 1fr) !important; gap: 1rem !important; }

  /* Hide row number column */
  .table tbody td[data-label="#"] { display: none; }

  /* Content padding reduction */
  .dash-content {
      padding: 1rem !important;
  }
}
/* ============================================================
   MOBILE OVERFLOW FIX Ã¢â‚¬â€ DEFINITIVE OVERRIDE (loaded last)
   Prevents any element from causing horizontal scroll on mobile
   ============================================================ */
@media (max-width: 768px) {
  /* Hard clip the main container */
  .dash-layout {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .dash-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .dash-content {
    padding: 0.875rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  /* Card and grid containers */
  .dash-content-grid,
  .dash-grid-2col {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .card-header {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.875rem 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.65rem !important;
    flex-wrap: wrap !important;
  }
  .card-body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  /* Mobile proyek cards */
  .mobile-proyek-cards {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.75rem !important;
  }
  .dash-proyek-card-mobile {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .dash-proyek-card-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .dash-proyek-card-title {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }
  .dash-proyek-card-title span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }
  .dash-proyek-card-top .badge {
    flex-shrink: 0 !important;
    max-width: 90px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .dash-proyek-card-meta {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .dash-proyek-card-footer {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}

/* ============ Unified Global Box Radius Consistency ============ */
/* Primary Cards & Box Containers: 12px */
.card,
.dash-card,
.dash-stat-card,
.lahan-card,
.dash-proyek-card-mobile,
.hpp-result-card,
.dash-modal,
.dash-modal-dialog,
.dash-modal-content,
.table-wrapper,
#agronomi_info_card {
  border-radius: var(--radius-lg, 12px) !important;
}

.card-header {
  border-top-left-radius: calc(var(--radius-lg, 12px) - 1px) !important;
  border-top-right-radius: calc(var(--radius-lg, 12px) - 1px) !important;
}
.card-footer {
  border-bottom-left-radius: calc(var(--radius-lg, 12px) - 1px) !important;
  border-bottom-right-radius: calc(var(--radius-lg, 12px) - 1px) !important;
}
.card-body:last-child {
  border-bottom-left-radius: calc(var(--radius-lg, 12px) - 1px) !important;
  border-bottom-right-radius: calc(var(--radius-lg, 12px) - 1px) !important;
}

/* Form Controls, Inputs, Dropdowns, Search, Tabs & Sub-boxes: 8px */
.form-control,
select.form-control,
textarea.form-control,
.form-select,
.choices__inner,
.choices__list--dropdown,
.dash-search-input,
.dash-search-wrap,
.flatpickr-calendar,
.input-group,
.input-group-text,
.dash-tab,
.dash-nav-item,
.dash-filter-pill,
.alert,
.dash-alert,
.metric-box,
.stat-mini-box {
  border-radius: var(--radius-md, 8px) !important;
}

/* Standard Buttons: 8px, Small: 6px, Large: 12px */
.btn {
  border-radius: var(--radius-md, 8px) !important;
}
.btn-sm,
.btn-action-square {
  border-radius: var(--radius-sm, 6px) !important;
}
.btn-lg,
.btn-xl {
  border-radius: var(--radius-lg, 12px) !important;
}

/* Badges: 6px, Rounded Pills: 9999px */
.badge {
  border-radius: var(--radius-sm, 6px) !important;
}
.badge-pill,
.badge-rounded {
  border-radius: var(--radius-full, 9999px) !important;
}

/* ============ Table Box & Container Corner Radius Consistency ============ */
/* Standalone Table Wrappers: 12px with border */
.table-wrapper,
.table-responsive {
  border-radius: var(--radius-lg, 12px) !important;
  border: 1px solid var(--gray-200);
  background: var(--white);
  width: 100%;
  box-sizing: border-box;
}

/* Table Wrappers nested inside .card: Seamless integration without double border */
.card > .table-wrapper,
.card > .table-responsive,
.card > .datatable-wrapper,
.card > .dataTable-wrapper,
.card > form > .table-wrapper,
.card > form > .table-responsive,
.card > .datatable-container,
.card > .dataTable-container,
.card-body > .table-wrapper,
.card-body > .table-responsive,
.card-body > .datatable-wrapper,
.card-body > .dataTable-wrapper {
  border: none !important;
  border-radius: 0 0 calc(var(--radius-lg, 12px) - 1px) calc(var(--radius-lg, 12px) - 1px) !important;
}

/* Table Top Header Corners */
.table thead:first-child tr:first-child th:first-child,
.datatable-table thead:first-child tr:first-child th:first-child {
  border-top-left-radius: calc(var(--radius-lg, 12px) - 1px);
}
.table thead:first-child tr:first-child th:last-child,
.datatable-table thead:first-child tr:first-child th:last-child {
  border-top-right-radius: calc(var(--radius-lg, 12px) - 1px);
}

.card-header + .table-responsive thead tr:first-child th,
.card-header + .table-wrapper thead tr:first-child th,
.card-header + .datatable-wrapper thead tr:first-child th,
.card-header + .dataTable-wrapper thead tr:first-child th {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

/* Table Bottom Last Row Corners */
.table tbody tr:last-child td:first-child,
.datatable-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: calc(var(--radius-lg, 12px) - 1px) !important;
}
.table tbody tr:last-child td:last-child,
.datatable-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: calc(var(--radius-lg, 12px) - 1px) !important;
}

/* DataTable Bottom Footer Container */
.datatable-bottom,
.dataTable-bottom {
  border-bottom-left-radius: calc(var(--radius-lg, 12px) - 1px) !important;
  border-bottom-right-radius: calc(var(--radius-lg, 12px) - 1px) !important;
}

/* DataTable Search & Selector Controls */
.datatable-input,
.dataTable-input,
.datatable-selector,
.dataTable-selector {
  border-radius: var(--radius-md, 8px) !important;
}

/* DataTable Pagination Buttons */
.datatable-pagination li a,
.dataTable-pagination li a,
.pagination .page-link,
.page-item .page-link {
  border-radius: var(--radius-md, 8px) !important;
}

/* Mobile Responsive Table Row Cards */
@media (max-width: 768px) {
  .table tbody tr,
  .datatable-table tbody tr,
  .responsive-table-cards tbody tr {
    border-radius: var(--radius-lg, 12px) !important;
    border: 1px solid var(--gray-200) !important;
    background: var(--white) !important;
    margin-bottom: 0.875rem !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
  }
  .table tbody tr td:first-child,
  .datatable-table tbody tr td:first-child {
    border-top-left-radius: calc(var(--radius-lg, 12px) - 1px) !important;
    border-top-right-radius: calc(var(--radius-lg, 12px) - 1px) !important;
    border-bottom-left-radius: 0 !important;
  }
  .table tbody tr td:last-child,
  .datatable-table tbody tr td:last-child {
    border-bottom-left-radius: calc(var(--radius-lg, 12px) - 1px) !important;
    border-bottom-right-radius: calc(var(--radius-lg, 12px) - 1px) !important;
  }
  .table tbody td:empty, .datatable-table tbody td:empty {
      display: none !important;
  }
  
  .table tbody tr.dataTable-empty, .datatable-table tbody tr.dataTable-empty {
      border: none !important;
      box-shadow: none !important;
      background: transparent !important;
  }
  
  .table tbody tr.dataTable-empty td, .datatable-table tbody tr.dataTable-empty td {
      border: none !important;
      text-align: center !important;
      justify-content: center !important;
      color: var(--gray-500);
      font-style: italic;
      display: block !important;
      padding: 2rem !important;
      width: 100% !important;
  }
  
  .table tbody td[colspan], .datatable-table tbody td[colspan] {
      display: block !important;
      text-align: center !important;
      padding: 1rem !important;
      font-weight: 600;
  }
  .table tbody td[colspan]::before, .datatable-table tbody td[colspan]::before {
      display: none !important;
  }
}

.dash-sidebar-nav { position: relative; z-index: 1; }
.dash-nav-indicator {
  position: absolute;
  top: 0;
  left: 0.75rem;
  right: 0.75rem;
  background: var(--primary);
  border-radius: var(--radius-md);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  pointer-events: none;
}
.dash-nav-item { position: relative; z-index: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: transparent !important; }
.dash-nav-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: var(--radius-md); z-index: -2; transition: background-color 0.2s ease; pointer-events: none; } .dash-nav-item:not(.active):hover::before { background: var(--gray-50); } .dash-nav-item:not(.active):hover { color: var(--primary-700); }



/* Fix for tables that are the first child of a card (no card-header) */
.card > .table-responsive:first-child,
.card > .table-wrapper:first-child,
.card > .datatable-wrapper:first-child,
.card > .dataTable-wrapper:first-child {
  border-top-left-radius: calc(var(--radius-lg, 12px) - 1px) !important;
  border-top-right-radius: calc(var(--radius-lg, 12px) - 1px) !important;
}
.card > .table-responsive:first-child .table thead tr:first-child th:first-child,
.card > .table-wrapper:first-child .table thead tr:first-child th:first-child,
.card > .datatable-wrapper:first-child .table thead tr:first-child th:first-child {
  border-top-left-radius: calc(var(--radius-lg, 12px) - 1px) !important;
}
.card > .table-responsive:first-child .table thead tr:first-child th:last-child,
.card > .table-wrapper:first-child .table thead tr:first-child th:last-child,
.card > .datatable-wrapper:first-child .table thead tr:first-child th:last-child {
  border-top-right-radius: calc(var(--radius-lg, 12px) - 1px) !important;
}

/* ============================================================
   Tablet & iPad Ã¢â‚¬â€ Tabel Daftar Proyek (#tabel-proyek)
   Kolom Nama Proyek & Lahan: wrap 2 baris (769px Ã¢â‚¬â€œ 1099px)
   Override simple-datatables white-space:nowrap
   ============================================================ */
@media (min-width: 769px) and (max-width: 1099px) and (orientation: portrait) {

  /* ---- Padding & font semua sel ---- */
  #tabel-proyek th,
  #tabel-proyek td,
  .datatable-table#tabel-proyek th,
  .datatable-table#tabel-proyek td {
    padding: 0.5rem 0.4rem !important;
    font-size: 0.8rem !important;
    vertical-align: top !important;
  }

  /* Beri jarak lebih pada tepi kiri dan kanan tabel agar rapi dan tidak terlalu mepet */
  #tabel-proyek th:first-child,
  #tabel-proyek td:first-child,
  .datatable-table#tabel-proyek th:first-child,
  .datatable-table#tabel-proyek td:first-child {
    padding-left: 1.25rem !important;
  }

  #tabel-proyek th:last-child,
  #tabel-proyek td:last-child,
  .datatable-table#tabel-proyek th:last-child,
  .datatable-table#tabel-proyek td:last-child {
    padding-right: 1.25rem !important;
  }

  /* ---- Kolom NAMA PROYEK (th ke-2, td[data-label]) ---- */
  #tabel-proyek th:nth-child(2),
  #tabel-proyek td:nth-child(2),
  #tabel-proyek td[data-label="Nama Proyek"] {
    min-width: 70px !important;
    max-width: 160px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.3 !important;
  }

  /* Link di dalam kolom Nama Proyek */
  #tabel-proyek td:nth-child(2) a,
  #tabel-proyek td[data-label="Nama Proyek"] a {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    display: block !important;
    line-height: 1.3 !important;
  }

  /* ---- Kolom LAHAN (th ke-4, td[data-label]) ---- */
  #tabel-proyek th:nth-child(4),
  #tabel-proyek td:nth-child(4),
  #tabel-proyek td[data-label="Lahan"] {
    min-width: 70px !important;
    max-width: 120px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.3 !important;
  }

  /* ---- Kolom KOMODITAS (th ke-3) ---- */
  #tabel-proyek th:nth-child(3),
  #tabel-proyek td:nth-child(3),
  #tabel-proyek td[data-label="Komoditas"] {
    min-width: 60px !important;
    max-width: 95px !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.3 !important;
  }

  /* ---- Kolom TANGGAL: tetap 1 baris, font kecil ---- */
  #tabel-proyek th:nth-child(5),
  #tabel-proyek td:nth-child(5),
  #tabel-proyek td[data-label="Tgl Tanam"],
  #tabel-proyek th:nth-child(6),
  #tabel-proyek td:nth-child(6),
  #tabel-proyek td[data-label="Target Panen"] {
    white-space: nowrap !important;
    font-size: 0.75rem !important;
    min-width: 72px !important;
  }

  /* ---- Kolom TARGET KG ---- */
  #tabel-proyek th:nth-child(7),
  #tabel-proyek td:nth-child(7),
  #tabel-proyek td[data-label="Target (kg)"] {
    white-space: nowrap !important;
    min-width: 58px !important;
    text-align: center !important;
  }

  /* ---- Badge STATUS: compact ---- */
  #tabel-proyek td[data-label="Status"] .badge,
  #tabel-proyek td:nth-child(8) .badge {
    font-size: 0.68rem !important;
    padding: 0.2rem 0.4rem !important;
    white-space: nowrap !important;
  }
}




/* FIX UNTUK DROPDOWN ENTRI DATATABLE (CHOICES.JS INTEGRATION) */
.datatable-dropdown .choices,
.dataTable-dropdown .choices {
    min-width: 75px !important;
    width: auto !important;
    margin-bottom: 0 !important;
}
.datatable-dropdown .choices__inner,
.dataTable-dropdown .choices__inner {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 12px 0 8px !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 8px !important;
    background-image: none !important; /* Mencegah duplikasi ikon chevron */
}
.datatable-dropdown .choices__list--single,
.dataTable-dropdown .choices__list--single {
    padding: 0 !important;
}
.datatable-dropdown .choices__list--dropdown .choices__item,
.dataTable-dropdown .choices__list--dropdown .choices__item {
    white-space: nowrap !important;
    text-align: center !important;
}
.datatable-selector, .dataTable-selector {
    background-image: none !important;
}

.dash-nav-item:not(.active) i {
    color: var(--primary);
}
/* Custom Scrollbar for sidebars */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 6px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}
/* Base sparkline */
.dash-stat-card::after {
  content: """";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 120px;
  height: 50px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: bottom right;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}
.dash-stat-card > div {
  position: relative;
  z-index: 2;
}
.dash-stat-card.teal::after, .dash-stat-card:has(.dash-stat-icon.teal)::after {
  background-image: url(""data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M0,40 L0,20 C20,20 30,10 50,25 C70,40 80,5 100,10 L100,40 Z' fill='%230f766e' /%3E%3Cpath d='M0,20 C20,20 30,10 50,25 C70,40 80,5 100,10' fill='none' stroke='%230f766e' stroke-width='2' /%3E%3C/svg%3E"");
}
.dash-stat-card.green::after, .dash-stat-card.primary::after, .dash-stat-card:has(.dash-stat-icon.green)::after, .dash-stat-card:has(.dash-stat-icon.primary)::after {
  background-image: url(""data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M0,40 L0,30 C30,30 40,5 60,15 C80,25 90,0 100,5 L100,40 Z' fill='%2316a34a' /%3E%3Cpath d='M0,30 C30,30 40,5 60,15 C80,25 90,0 100,5' fill='none' stroke='%2316a34a' stroke-width='2' /%3E%3C/svg%3E"");
}
.dash-stat-card.amber::after, .dash-stat-card.warning::after, .dash-stat-card:has(.dash-stat-icon.amber)::after, .dash-stat-card:has(.dash-stat-icon.warning)::after {
  background-image: url(""data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M0,40 L0,35 C20,35 30,20 50,25 C70,30 80,10 100,15 L100,40 Z' fill='%23d97706' /%3E%3Cpath d='M0,35 C20,35 30,20 50,25 C70,30 80,10 100,15' fill='none' stroke='%23d97706' stroke-width='2' /%3E%3C/svg%3E"");
}
.dash-stat-card.blue::after, .dash-stat-card.info::after, .dash-stat-card:has(.dash-stat-icon.blue)::after, .dash-stat-card:has(.dash-stat-icon.info)::after {
  background-image: url(""data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M0,40 L0,15 C20,15 30,30 50,20 C70,10 80,25 100,25 L100,40 Z' fill='%232563eb' /%3E%3Cpath d='M0,15 C20,15 30,30 50,20 C70,10 80,25 100,25' fill='none' stroke='%232563eb' stroke-width='2' /%3E%3C/svg%3E"");
}
.dash-stat-card.red::after, .dash-stat-card.danger::after, .dash-stat-card:has(.dash-stat-icon.red)::after, .dash-stat-card:has(.dash-stat-icon.danger)::after {
  background-image: url(""data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M0,40 L0,20 C20,20 30,35 50,25 C70,15 80,5 100,20 L100,40 Z' fill='%23dc2626' /%3E%3Cpath d='M0,20 C20,20 30,35 50,25 C70,15 80,5 100,20' fill='none' stroke='%23dc2626' stroke-width='2' /%3E%3C/svg%3E"");
}

/* Base stat card typography */
.dash-stat-card .dash-stat-value {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.dash-stat-card .dash-stat-label {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dash-stat-card.slate::after, .dash-stat-card:has(.dash-stat-icon.slate)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M0,40 L0,25 C20,25 35,15 50,20 C65,25 80,10 100,15 L100,40 Z' fill='%2364748b' /%3E%3Cpath d='M0,25 C20,25 35,15 50,20 C65,25 80,10 100,15' fill='none' stroke='%2364748b' stroke-width='2' /%3E%3C/svg%3E");
}

@media (max-width: 768px) {
  .dash-topbar-datetime {
    display: none !important;
  }
  .dash-topbar-btn {
    width: 36px !important;
    height: 36px !important;
  }
}

/* --- MOBILE TOPBAR FIXES --- */
@media (max-width: 768px) {
  /* Completely hide the bulky clock on mobile */
  .dash-topbar-datetime {
    display: none !important;
  }
  
  /* Hide the user chip on mobile, since user info is already in the sidebar */
  .dash-user-chip {
    display: none !important;
  }
  
  /* Ensure right buttons are perfectly circular and don't shrink/warp */
  .dash-topbar-right {
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
  }
  
  .dash-topbar-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  
  /* Ensure the left section uses available space properly */
  .dash-topbar-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    gap: 0.5rem !important;
  }
  
  /* Ensure title truncates cleanly instead of wrapping */
  .dash-page-title {
    font-size: 1rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: none !important; /* override previous max-width limits */
  }
}
@media (max-width: 768px) {
  .dash-topbar-btn {
    -webkit-appearance: none !important;
    appearance: none !important;
  }
}

/* ============================================================
   TABLET & IPAD PRO LANDSCAPE LAYOUT FIXES
   ============================================================ */

/* 1. Fix horizontal overflow caused by flex + margin-left on dash-main */
.dash-layout {
    display: block !important; /* Remove flex to allow native block margin calculations */
}

.dash-main {
    flex: none !important;
    margin-left: 260px !important;
    width: auto !important; /* Auto width + margin-left correctly fills screen without overflow */
    max-width: none !important;
    min-width: 0 !important;
}

/* On screens where sidebar is hidden, reset margin */
@media (max-width: 1023px) {
    .dash-main {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* 2. Fix Grid Stacking for Tablet Landscape (1025px - 1200px) 
   Because sidebar takes 260px, the remaining width is too small for 2 columns. */
@media (max-width: 1200px) {
    .dash-content-grid,
    .dash-grid-2col,
    .detail-info-map-grid,
    .grid-responsive-sidebar,
    .grid-responsive-form {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
    }
    
    /* Ensure charts and cards can shrink if necessary */
    .dash-chart-container,
    .card {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
}







/* ============ Typography Utilities ============ */
.font-mono {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
    letter-spacing: -0.2px;
}



/* ============================================================
   GLOBAL TYPOGRAPHY STANDARDIZATION
   Menyeragamkan ukuran font di seluruh modul & halaman
   ============================================================ */

/* 1. Base App Font */
body, .dash-layout, .dash-content {
    font-family: var(--font-sans), system-ui, sans-serif;
    font-size: 0.875rem; /* 14px */
    color: var(--gray-800);
}

/* 2. Headings & Titles */
.dash-page-header-title { font-size: 1.25rem !important; font-weight: 700 !important; }
.dash-page-header-sub { font-size: 0.85rem !important; color: var(--gray-500) !important; }
.card-title, .card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5 { 
    font-size: 1rem !important; 
    font-weight: 700 !important; 
    margin-bottom: 0 !important;
}

/* 3. Tables (Desktop) */
.table th, .datatable-table th, .dataTable-table th {
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 700 !important;
    color: var(--gray-500) !important;
    padding: 1rem 1.25rem !important;
}
.table td, .datatable-table td, .dataTable-table td {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: var(--gray-800) !important;
    padding: 0.875rem 1.25rem !important;
    vertical-align: middle;
}

/* 4. Form Elements & Buttons */
.form-control, .form-select, .choices__input, .choices__inner {
    font-size: 0.875rem !important;
    font-family: var(--font-sans) !important;
}
.form-label {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: var(--gray-600) !important;
    margin-bottom: 0.4rem !important;
}
.btn {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px;
}
.btn-sm {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.75rem !important;
}

/* 5. Badges */
.badge {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    padding: 0.35em 0.65em !important;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 6. Modals */
.dash-modal-title { 
    font-size: 1.1rem !important; 
    font-weight: 700 !important; 
}

/* 7. Sidebar Menu */
.dash-nav-item {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
}
.dash-nav-section-label {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
}

/* 8. Fix icon sizes that might get squished by line heights */
.ph-duotone, .ph, .ph-fill, .ph-bold {
    line-height: 1 !important;
}

/* Override inline styles using a broad wildcard just for generic texts inside table / cards if needed */
.card-body p, .dash-alert-text {
    font-size: 0.875rem !important;
}




/* ============================================================
   TYPOGRAPHY OVERRIDE V2 — Konsistensi Font Menyeluruh
   Berlaku di atas inline styles (via lebih tinggi specificity)
   ============================================================ */

/* Standard text sizes for ALL dashboard pages */
.dash-content h1:not(.dash-page-header-title), 
.dash-content h2 { font-size: 1.25rem; font-weight: 700; }
.dash-content h3 { font-size: 1.1rem; font-weight: 700; }
.dash-content h4 { font-size: 1rem; font-weight: 700; }
.dash-content h5 { font-size: 0.938rem; font-weight: 600; }
.dash-content h6 { font-size: 0.875rem; font-weight: 600; }
.dash-content p   { font-size: 0.875rem; line-height: 1.6; }
.dash-content small, .dash-content .small { font-size: 0.8rem; }

/* Card header consistent */
.card-header { padding: 1rem 1.25rem !important; }
.card-body    { padding: 1.25rem !important; }

/* Info/stat boxes (dash-stat-card, metric-box, summary cards) */
.dash-stat-value, .metric-box-value, .stat-value {
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    font-variant-numeric: tabular-nums !important;
}
.dash-stat-label, .metric-box-label, .stat-label {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #64748b !important;
    margin-bottom: 0.2rem !important;
}

/* Alert & notification text */
.alert, .dash-alert { font-size: 0.875rem !important; }
.alert strong, .dash-alert strong { font-size: 0.875rem !important; }

/* Mobile Card inner text sizes — standardise across all mob-cards */
[class*='-card-title'] { font-size: 0.938rem !important; font-weight: 700 !important; }
[class*='-card-sub'],
[class*='-card-kode'],
[class*='-card-email'],
[class*='-card-info'] { font-size: 0.8rem !important; }
[class*='-lbl'] { font-size: 0.78rem !important; font-weight: 600 !important; }
[class*='-val'] { font-size: 0.875rem !important; font-weight: 500 !important; }

/* Fix inconsistency in sidebar user section */
.dash-user-name { font-size: 0.875rem !important; font-weight: 700 !important; }
.dash-user-role { font-size: 0.75rem !important; }

/* Topbar */
.dash-page-title { font-size: 1rem !important; font-weight: 700 !important; }

/* Toast */
.toast-content { font-size: 0.875rem !important; font-weight: 600 !important; }

/* Pagination */
.datatable-pagination, .dataTable-pagination { font-size: 0.8rem !important; }
.datatable-info, .dataTable-info { font-size: 0.8rem !important; }

/* Filter pills */
.dash-filter-pill { font-size: 0.8rem !important; font-weight: 600 !important; }

/* Breadcrumb */
.dash-breadcrumb, .dash-breadcrumb a { font-size: 0.8rem !important; }










/* --- OVERRIDES FOR DARK TEAL SIDEBAR ACTIVE/HOVER STATES --- */
.dash-sidebar-nav {
  padding: 0.5rem 0.625rem 1.5rem 0.625rem !important;
  scroll-behavior: smooth;
  position: relative;
  overflow-x: hidden !important;
}
.dash-nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
}
.dash-nav-indicator {
  background: #FFFFFF !important;
  border-radius: 10px !important;
  border: 1px solid rgba(15, 118, 110, 0.18) !important;
  left: 0.625rem !important;
  right: 0.625rem !important;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), height 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease !important;
  will-change: transform, height;
}

/* 1. Passive Link (Normal state) */
.dash-nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-height: 42px !important;
  padding: 0.55rem 0.65rem 0.55rem 0.75rem !important;
  font-size: 0.825rem !important;
  border-radius: 10px !important;
  margin: 0 !important;
  transform: none !important;
  color: #44403C !important;
  transition: color 0.2s ease, padding-left 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease !important;
}
.dash-nav-item::before {
  content: '';
  position: absolute;
  inset: 0 !important;
  border-radius: 10px !important;
  z-index: -1;
  transition: background-color 0.2s ease !important;
  pointer-events: none;
}
.dash-nav-item i {
  font-size: 1.15rem !important;
  width: 20px !important;
}
.dash-nav-item:not(.active) i {
  color: #78716C !important;
  transition: color 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* 2. Hover Link */
.dash-nav-item:not(.active):hover::before { 
  background: rgba(255, 255, 255, 0.72) !important; 
  border-radius: 10px !important;
}
.dash-nav-item:not(.active):hover {
  color: #1C1917 !important;
  transform: none !important;
}
.dash-nav-item:not(.active):hover i { 
  color: #0F766E !important;
  transform: scale(1.06);
}

/* 3. Active Link */
.dash-nav-item.active {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 118, 110, 0.18) !important;
  position: relative;
  color: #0F766E !important;
  font-weight: 700 !important;
  padding-left: 0.75rem !important;
  padding-right: 0.65rem !important;
  transform: none !important;
}
.dash-sidebar-nav.has-indicator .dash-nav-item.active {
  background: transparent !important;
  border-color: transparent !important;
}
.dash-nav-item.active i {
  color: #0F766E !important;
  transform: scale(1.06);
}

/* Hilangkan titik neon cyan sisa tema gelap lama */
.dash-nav-item.active::after {
  display: none !important;
  content: none !important;
}

.sidebar-badge {
  min-width: 20px !important;
  width: auto !important;
  height: 20px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
}






/* ============================================================
   PROYEK TANAM MODULE - ENTERPRISE MODAL & AGRONOMIC STYLING
   ============================================================ */
.proyek-modal-pro {
  max-width: 780px !important;
  width: 95% !important;
  border-radius: 18px !important;
  border: 1px solid rgba(28, 25, 23, 0.1) !important;
  box-shadow: 0 26px 56px -16px rgba(28, 25, 23, 0.28), 0 8px 20px -8px rgba(15, 118, 110, 0.1) !important;
}

.proyek-modal-header {
  padding: 1.15rem 1.45rem !important;
  background: linear-gradient(135deg, #faf9f6 0%, #f0fdfa 60%, #fefce8 100%) !important;
  border-bottom: 1px solid rgba(28, 25, 23, 0.08) !important;
}

.proyek-modal-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.proyek-modal-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, #06373b 0%, #0f766e 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 6px 14px -6px rgba(15, 118, 110, 0.45);
}

.proyek-modal-subtitle {
  font-size: 0.78rem;
  color: #78716c;
  margin-top: 0.16rem;
  line-height: 1.38;
}

.proyek-modal-body {
  padding: 1.25rem 1.45rem !important;
  background: #faf9f6 !important;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-height: calc(85vh - 140px);
  overflow-y: auto;
}

.proyek-modal-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.proyek-modal-section {
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 13px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.03);
}

.proyek-modal-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1c1917;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(28, 25, 23, 0.07);
}

.proyek-section-step {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.proyek-varietas-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.proyek-varietas-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.proyek-varietas-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.proyek-varietas-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.proyek-agronomi-banner {
  background: linear-gradient(135deg, rgba(22, 115, 117, 0.06) 0%, rgba(51, 160, 165, 0.08) 100%);
  border: 1px solid rgba(22, 115, 117, 0.2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-top: 0.85rem;
}

.proyek-agronomi-banner-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.proyek-agronomi-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.proyek-agronomi-pill {
  background: #ffffff;
  border: 1px solid rgba(22, 115, 117, 0.2);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  display: flex;
  flex-direction: column;
}

.proyek-agronomi-pill .pill-label {
  font-size: 0.6875rem;
  color: var(--primary);
  font-weight: 600;
}

.proyek-agronomi-pill .pill-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 0.15rem;
}

.proyek-label-with-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.proyek-helper-pill {
  font-size: 0.6875rem;
  font-weight: 600;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
}

.proyek-spacing-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.proyek-spacing-sep {
  font-weight: 700;
  color: #94a3b8;
  font-size: 1.1rem;
}

.proyek-live-summary {
  background: #0f172a;
  color: #ffffff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.proyek-summary-item {
  display: flex;
  flex-direction: column;
}

.proyek-summary-item .summary-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  font-weight: 600;
}

.proyek-summary-item .summary-val {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 0.25rem;
}

.proyek-modal-footer {
  padding: 0.95rem 1.45rem !important;
  background: #ffffff !important;
  border-top: 1px solid rgba(28, 25, 23, 0.08) !important;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

/* Cycle Progress Bar Styling */
.proyek-progress-container {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.proyek-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.proyek-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.proyek-progress-label {
  font-size: 0.7125rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
}

/* Proyek Detail - Segmented Status Pill Group & Theme Enhancements */
.proyek-status-pill-group {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  gap: 2px;
}

.proyek-status-pill-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 7px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.proyek-status-pill-btn:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.6);
}

.proyek-status-pill-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.proyek-header-meta-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.proyek-header-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #475569;
}

.proyek-header-meta-pill strong {
  color: var(--dark);
}

/* Agronomic / Cultivation Cycle Banner Card */
.proyek-cycle-banner-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.proyek-cycle-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.proyek-cycle-banner-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.proyek-cycle-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.proyek-cycle-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.proyek-cycle-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #167375 0%, #33a0a5 100%);
  transition: width 0.4s ease;
}

.proyek-cycle-banner-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.proyek-cycle-stat-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.proyek-cycle-stat-item strong {
  color: var(--dark);
}

/* ============================================================
   JADWAL KEGIATAN CHECKLIST CARD STYLING (RESPONSIVE & SPACIOUS)
   ============================================================ */
.jadwal-card-list {
  display: flex;
  flex-direction: column;
}

.jadwal-card-item {
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid rgba(28, 25, 23, 0.065);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: background-color 0.15s ease;
}

.jadwal-card-item:hover {
  background-color: #faf9f6;
}

.jadwal-card-item:last-child {
  border-bottom: none;
}

.jadwal-card-item.selesai {
  background-color: #faf9f6;
}

.jadwal-card-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.jadwal-card-item-title-group {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  flex: 1;
}

.jadwal-status-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.jadwal-status-icon.selesai {
  color: #0f766e;
}

.jadwal-status-icon.pending {
  color: #a8a29e;
}

.jadwal-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1c1917;
  line-height: 1.4;
  word-break: break-word;
}

.jadwal-card-title.selesai {
  text-decoration: line-through;
  color: #a8a29e;
}

.jadwal-btn-delete {
  background: transparent;
  color: #a8a29e;
  border: none;
  padding: 0.3rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.jadwal-btn-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.jadwal-card-desc {
  font-size: 0.8125rem;
  color: #57534e;
  line-height: 1.5;
  margin: 0;
  padding-left: 2rem;
  word-break: break-word;
}

.jadwal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding-left: 2rem;
  flex-wrap: wrap;
}

.jadwal-card-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.jadwal-card-date.selesai {
  color: #78716c;
  background: #f5f4f0;
  border-color: rgba(28, 25, 23, 0.09);
}

.jadwal-toggle-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.jadwal-toggle-btn.btn-pending {
  background: #ffffff;
  border-color: #0f766e;
  color: #0f766e;
}

.jadwal-toggle-btn.btn-pending:hover {
  background: #0f766e;
  color: #ffffff;
}

.jadwal-toggle-btn.btn-selesai {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e;
}

.jadwal-toggle-btn.btn-selesai:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

/* ============================================================
   PROYEK DETAIL - 2-COLUMN SPLIT LAYOUT (MAIN & SOP SIDEBAR)
   ============================================================ */
.proyek-detail-split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1023px) {
  .proyek-detail-split-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.proyek-main-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.proyek-main-column > .card {
  margin-bottom: 0 !important;
}

.proyek-sidebar-column {
  min-width: 0;
}

.proyek-sidebar-column > .card,
.proyek-checklist-card {
  display: flex;
  flex-direction: column;
  margin-bottom: 0 !important;
}

.proyek-checklist-card .card-body {
  max-height: 520px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Custom sleek scrollbar for checklist */
.proyek-checklist-card .card-body::-webkit-scrollbar {
  width: 5px;
}
.proyek-checklist-card .card-body::-webkit-scrollbar-track {
  background: transparent;
}
.proyek-checklist-card .card-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
.proyek-checklist-card .card-body::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Checklist Filter Tabs (Warm Stone) */
.jadwal-filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  background: #faf9f6;
  border-bottom: 1px solid rgba(28, 25, 23, 0.075);
  flex-wrap: wrap;
}

.jadwal-filter-tab {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.28rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 8px;
  color: #57534e;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.jadwal-filter-tab:hover {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.06);
}

.jadwal-filter-tab.active,
.jadwal-filter-tab.active:hover {
  background: #ffffff;
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.22);
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.08);
}

.jadwal-filter-count {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.68rem;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  background: #e7e5e0;
  color: #44403c;
}

.jadwal-filter-tab.active .jadwal-filter-count {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

/* ============================================================
   JADWAL & KEGIATAN MODULE - VIEW SWITCHER, MOBILE CARDS & TIMELINE
   ============================================================ */

/* View Mode Switcher (Warm Stone Segmented Pill Toggle) */
.jadwal-view-pill-group {
  display: inline-flex;
  align-items: center;
  background: #eceae3;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid rgba(28, 25, 23, 0.07);
  gap: 2px;
}

.jadwal-view-pill-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 0.34rem 0.75rem;
  font-size: 0.79rem;
  font-weight: 600;
  border-radius: 6px;
  color: #57534e;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.jadwal-view-pill-btn:hover {
  color: #1c1917;
  background: rgba(255, 255, 255, 0.6);
}

.jadwal-view-pill-btn.active,
.jadwal-view-pill-btn.active:hover {
  background: #ffffff;
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.18);
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.1);
}

/* Mobile Schedule Cards */
.mobile-jadwal-cards {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem;
}

.desktop-jadwal-table {
  display: block;
}

@media (max-width: 768px) {
  .desktop-jadwal-table {
    display: none !important;
  }
  .mobile-jadwal-cards {
    display: flex !important;
  }
}

.dash-jadwal-card-mobile {
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.04);
  transition: all 0.2s ease;
}

.dash-jadwal-card-mobile:hover {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 6px 16px -8px rgba(28, 25, 23, 0.14);
}

.dash-jadwal-card-mobile.is-overdue {
  border-left: 4px solid #dc2626;
}

.dash-jadwal-card-mobile.is-today {
  border-left: 4px solid #0f766e;
}

.dash-jadwal-card-mobile.is-selesai {
  border-left: 4px solid #059669;
}

.dash-jadwal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.dash-jadwal-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1c1917;
  line-height: 1.35;
  margin: 0;
}

.dash-jadwal-card-title.selesai {
  text-decoration: line-through;
  color: #a8a29e;
}

.dash-jadwal-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: #57534e;
}

.dash-jadwal-card-desc {
  font-size: 0.8125rem;
  color: #57534e;
  line-height: 1.45;
  background: #faf9f6;
  padding: 0.48rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(28, 25, 23, 0.075);
}

.dash-jadwal-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(28, 25, 23, 0.07);
  margin-top: 0.25rem;
}

/* Timeline / Agenda View */
.jadwal-timeline-wrapper {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
}

.jadwal-timeline-group-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px solid rgba(28, 25, 23, 0.1);
}

.jadwal-timeline-group-header.overdue {
  color: #dc2626;
  border-bottom-color: #fecaca;
}

.jadwal-timeline-group-header.today {
  color: #0f766e;
  border-bottom-color: #99f6e4;
}

.jadwal-timeline-group-header.upcoming {
  color: var(--primary);
  border-bottom-color: rgba(22, 115, 117, 0.25);
}

.jadwal-timeline-group-header.completed {
  color: #059669;
  border-bottom-color: #a7f3d0;
}

.jadwal-timeline-items {
  position: relative;
  padding-left: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.jadwal-timeline-items::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: #e2e8f0;
}

.jadwal-timeline-item {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.15rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.jadwal-timeline-item:hover {
  border-color: rgba(22, 115, 117, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.jadwal-timeline-dot {
  position: absolute;
  left: -1.75rem;
  top: 1.15rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1.5px #cbd5e1;
  background: #94a3b8;
  transform: translateX(-50%);
}

.jadwal-timeline-dot.overdue {
  background: #ef4444;
  box-shadow: 0 0 0 1.5px #ef4444;
}

.jadwal-timeline-dot.today {
  background: #3b82f6;
  box-shadow: 0 0 0 1.5px #3b82f6;
}

.jadwal-timeline-dot.upcoming {
  background: var(--primary);
  box-shadow: 0 0 0 1.5px var(--primary);
}

.jadwal-timeline-dot.completed {
  background: #10b981;
  box-shadow: 0 0 0 1.5px #10b981;
}

/* Schedule Filter Bar & Aligned Controls */
/* ============================================================
   TABLE TOOLBAR: FILTER & SEARCH BAR (UNIFIED DESIGN SYSTEM)
   Standard filter card placed above data tables across all modules
   ============================================================ */
.table-filter-bar,
.jadwal-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  align-items: center;
}

.table-filter-tabs,
.jadwal-filter-tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.table-filter-actions,
.jadwal-filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: nowrap;
  flex: 0 1 auto;
  justify-content: flex-end;
}

.table-filter-select,
.jadwal-filter-select {
  height: 38px !important;
  min-height: 38px !important;
  font-size: 0.875rem !important;
  padding: 0 0.75rem !important;
  border-radius: 8px !important;
  width: auto;
  min-width: 175px;
  max-width: 240px;
  box-sizing: border-box !important;
}

.table-filter-search-wrap,
.jadwal-filter-search-wrap {
  position: relative;
  min-width: 220px;
  max-width: 340px;
  flex: 1 1 auto;
}

.table-filter-search-wrap i,
.jadwal-filter-search-wrap i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
}

.table-filter-search-input,
.jadwal-filter-search-input {
  height: 38px !important;
  min-height: 38px !important;
  font-size: 0.875rem !important;
  padding: 0 0.75rem 0 2.2rem !important;
  border-radius: 8px !important;
  width: 100%;
  box-sizing: border-box !important;
}

.table-filter-reset-btn,
.jadwal-filter-reset-btn {
  height: 38px !important;
  min-height: 38px !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  padding: 0 0.85rem !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  cursor: pointer;
  box-sizing: border-box !important;
  transition: all 0.15s ease;
}

.table-filter-reset-btn:hover,
.jadwal-filter-reset-btn:hover {
  background: #e2e8f0 !important;
  color: var(--primary) !important;
  border-color: #94a3b8 !important;
}

@media (max-width: 991px) {
  .table-filter-bar,
  .jadwal-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .table-filter-actions,
  .jadwal-filter-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .table-filter-search-wrap,
  .jadwal-filter-search-wrap {
    flex: 1;
    max-width: none;
  }
}

@media (max-width: 576px) {
  .table-filter-actions,
  .jadwal-filter-actions {
    flex-wrap: wrap;
  }
  .table-filter-select,
  .jadwal-filter-select,
  .table-filter-search-wrap,
  .jadwal-filter-search-wrap,
  .table-filter-reset-btn,
  .jadwal-filter-reset-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }
}

/* ============================================================
   PANEN / HARVEST MODULE STYLING
   ============================================================ */
.desktop-panen-table {
  display: block;
}

.mobile-panen-cards {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem;
}

@media (max-width: 768px) {
  .desktop-panen-table {
    display: none !important;
  }
  .mobile-panen-cards {
    display: flex !important;
  }
}

.dash-panen-card-mobile {
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.04);
  transition: all 0.2s ease;
}

.dash-panen-card-mobile:hover {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 6px 16px -8px rgba(28, 25, 23, 0.14);
}

.dash-panen-card-mobile.is-diterima {
  border-left: 4px solid #059669;
}

.dash-panen-card-mobile.is-menunggu {
  border-left: 4px solid #d97706;
}

.panen-susut-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.panen-susut-badge.safe {
  background: #ecfdf5;
  color: #059669;
}

.panen-susut-badge.warning {
  background: #fffbeb;
  color: #b45309;
}

.panen-susut-badge.danger {
  background: #fee2e2;
  color: #dc2626;
}

/* ============================================================
   GUDANG PANEN & FIFO INVENTARIS STYLING
   ============================================================ */
.desktop-gudang-table {
  display: block;
}

.mobile-gudang-cards {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem;
}

@media (max-width: 768px) {
  .desktop-gudang-table {
    display: none !important;
  }
  .mobile-gudang-cards {
    display: flex !important;
  }
}

.dash-gudang-card-mobile {
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.04);
  transition: all 0.2s ease;
}

.dash-gudang-card-mobile:hover {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 6px 16px -8px rgba(28, 25, 23, 0.14);
}

.dash-gudang-card-mobile.is-masuk {
  border-left: 4px solid #059669;
}

.dash-gudang-card-mobile.is-keluar {
  border-left: 4px solid #0f766e;
}

.dash-gudang-card-mobile.is-afkir {
  border-left: 4px solid #dc2626;
}

.gudang-grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.gudang-grade-badge.grade-a {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.gudang-grade-badge.grade-b {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.gudang-grade-badge.grade-c {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* FIFO Shelf-Life Aging Badges */
.fifo-aging-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.fifo-aging-badge.fresh {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.fifo-aging-badge.warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.fifo-aging-badge.danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  animation: pulse-border 2s infinite ease-in-out;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  70% { box-shadow: 0 0 0 5px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.fifo-aging-badge.habis {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

/* Print Styles for Stock Opname Sheet & Surat Jalan */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-opname-sheet, #printable-opname-sheet *,
  #printable-surat-jalan, #printable-surat-jalan * {
    visibility: visible;
  }
  #printable-opname-sheet, #printable-surat-jalan {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 1.5rem;
    background: #ffffff !important;
  }
  .no-print {
    display: none !important;
  }
}

/* ============================================================
   GUDANG PACKING & SALES ORDER STYLING
   ============================================================ */
.desktop-packing-table {
  display: block;
}

.mobile-packing-cards {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem;
}

@media (max-width: 768px) {
  .desktop-packing-table {
    display: none !important;
  }
  .mobile-packing-cards {
    display: flex !important;
  }
}

.dash-packing-card-mobile {
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.04);
  transition: all 0.2s ease;
}

.dash-packing-card-mobile:hover {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 6px 16px -8px rgba(28, 25, 23, 0.14);
}

.dash-packing-card-mobile.is-selesai {
  border-left: 4px solid #059669;
}

.dash-packing-card-mobile.is-proses {
  border-left: 4px solid #d97706;
}

.dash-packing-card-mobile.is-belum {
  border-left: 4px solid #78716c;
}

.packing-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.packing-stock-badge.deducted {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.packing-stock-badge.pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.so-item-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.58rem;
  background: #faf9f6;
  border: 1px solid rgba(28, 25, 23, 0.09);
  border-radius: 999px;
  font-size: 0.74rem;
  color: #44403c;
}

.so-item-pill strong {
  color: #0f766e;
}

/* ============================================================
   TALANGAN MODAL PO (BAGI HASIL) - RESPONSIVE & POLISHED STYLING
   ============================================================ */
.desktop-talangan-table {
  display: block;
}

.mobile-talangan-cards {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
}

@media (max-width: 768px) {
  .desktop-talangan-table {
    display: none !important;
  }
  .mobile-talangan-cards {
    display: flex !important;
  }
}

.dash-talangan-card-mobile {
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 13px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.04);
  transition: all 0.2s ease;
}

.dash-talangan-card-mobile:hover {
  border-color: rgba(15, 118, 110, 0.3);
  box-shadow: 0 6px 18px -10px rgba(28, 25, 23, 0.16);
}

.dash-talangan-card-mobile.is-selesai {
  border-left: 5px solid #059669;
}

.dash-talangan-card-mobile.is-pelunasan {
  border-left: 5px solid #d97706;
}

.dash-talangan-card-mobile.is-menunggu {
  border-left: 5px solid #f59e0b;
}

.dash-talangan-card-mobile.is-berjalan {
  border-left: 5px solid #0f766e;
}

.dash-talangan-card-mobile.is-terkunci {
  border-left: 5px solid #06373b;
}

.dash-talangan-card-mobile.is-draft {
  border-left: 5px solid #78716c;
}

.dash-talangan-card-mobile.is-batal {
  border-left: 5px solid #dc2626;
}

/* Responsive Form Grids for Modals */
.talangan-grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.85rem;
}

.talangan-grid-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.talangan-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.85rem;
}

.talangan-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 768px) {
  .talangan-grid-2,
  .talangan-grid-split,
  .talangan-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .talangan-grid-4 {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.65rem !important;
  }
}

@media (max-width: 480px) {
  .talangan-grid-4 {
    grid-template-columns: 1fr !important;
  }
}

/* Stepper Component (Warm Stone Botanical) */
.talangan-stepper-box {
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 14px;
  padding: 0.9rem 1.2rem 1rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.03);
}

.talangan-stepper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(28, 25, 23, 0.07);
}

.talangan-stepper-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1c1917;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: -0.01em;
}

.talangan-stepper-title i {
  color: #0f766e;
  font-size: 1rem;
}

.talangan-stepper-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  margin: 0.2rem 0 0 0;
  padding: 10px 0.5rem 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 0.4rem;
}

.talangan-stepper-wrap::before {
  content: '';
  position: absolute;
  top: 25px;
  left: 45px;
  right: 45px;
  height: 2px;
  background: #e7e5e4;
  z-index: 1;
}

.talangan-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
  min-width: 82px;
  flex: 1;
}

.talangan-step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #faf9f6;
  border: 2px solid #d6d3d1;
  color: #78716c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.76rem;
  font-weight: 700;
  transition: all 0.2s ease;
  margin-bottom: 0.38rem;
  z-index: 2;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.talangan-step-item.completed .talangan-step-circle {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.talangan-step-item.active .talangan-step-circle {
  background: #0f766e;
  border-color: #06373b;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.16);
}

.talangan-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #78716c;
  max-width: 96px;
  line-height: 1.25;
}

.talangan-step-sub {
  font-size: 0.65rem;
  color: #a8a29e;
  margin-top: 0.15rem;
  line-height: 1.2;
}

.talangan-step-item.completed .talangan-step-label {
  color: #047857;
  font-weight: 700;
}

.talangan-step-item.active .talangan-step-label {
  color: #0f766e;
  font-weight: 700;
}

/* Waterfall Ledger Styles (Warm Stone Fintech) */
.talangan-waterfall-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 0.9rem;
  border-radius: 9px;
  font-size: 0.84rem;
  color: #292524;
  background: #faf9f6;
  border: 1px solid rgba(28, 25, 23, 0.055);
}

.talangan-waterfall-row strong,
.talangan-waterfall-row > span:last-child {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.talangan-waterfall-row.plus {
  background: #ecfdf5;
  border-color: #d1fae5;
}

.talangan-waterfall-row.minus {
  background: #fef2f2;
  border-color: #fee2e2;
}

.talangan-waterfall-row.net {
  background: #f0fdfa;
  font-weight: 700;
  border: 1px solid #99f6e4;
  color: #06373b;
}



/* Multi-Pemodal Responsive Row */
.talangan-pemodal-input-row {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .talangan-pemodal-input-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
    padding: 0.65rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  .talangan-pemodal-input-row > :nth-child(1) {
    grid-column: span 2;
  }
  .talangan-pemodal-input-row > :last-child {
    grid-column: span 2;
    justify-self: flex-end;
  }
}

/* Responsive Biaya (Buku Kas) Views */
.desktop-biaya-table {
  display: block;
}

.mobile-biaya-cards {
  display: none;
}

@media (max-width: 768px) {
  .desktop-biaya-table {
    display: none !important;
  }
  .mobile-biaya-cards {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
  }
}

.dash-biaya-card-mobile {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dash-biaya-card-mobile.is-terverifikasi {
  border-left: 4px solid #059669;
}

.dash-biaya-card-mobile.is-menunggu {
  border-left: 4px solid #f59e0b;
}

.dash-biaya-card-mobile.is-ditolak {
  }

/* ============================================================
   TALANGAN 360° MODAL DETAIL HUB - WARM STONE BOTANICAL THEME
   ============================================================ */
.talangan-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.6rem;
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
  gap: 1.15rem;
  background: linear-gradient(135deg, #faf9f6 0%, #f0fdfa 55%, #fefce8 100%);
}

.talangan-detail-header-left {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.talangan-detail-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #06373b 0%, #0f766e 100%);
  border: 1px solid rgba(15, 118, 110, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.35rem;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 6px 14px -6px rgba(15, 118, 110, 0.45);
}

.talangan-detail-header-titlebox {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.talangan-detail-badge-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.talangan-code-badge {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  font-weight: 700;
  color: #1c1917;
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.12);
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.talangan-po-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.7rem;
  font-weight: 600;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
}

.talangan-detail-title-main {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: #1c1917;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.025em;
}

.talangan-detail-chips-row {
  display: flex;
  align-items: center;
  gap: 0.4rem 0.5rem;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: #57534e;
  margin-top: 0.12rem;
}

.talangan-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(28, 25, 23, 0.09);
  padding: 0.16rem 0.58rem;
  border-radius: 999px;
  line-height: 1.25;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.03);
}

.talangan-chip-label {
  color: #78716c;
  font-weight: 500;
}

.talangan-chip strong {
  color: #1c1917;
  font-weight: 600;
}

.talangan-detail-header-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.talangan-detail-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(28, 25, 23, 0.08);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.03);
}

.talangan-detail-toolbar .btn-icon-tool,
.talangan-detail-toolbar .btn-tool {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #57534e;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.talangan-detail-toolbar .btn-icon-tool:hover,
.talangan-detail-toolbar .btn-tool:hover {
  background: #ffffff;
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(28, 25, 23, 0.08);
}

.talangan-detail-toolbar .btn-icon-tool.btn-icon-pdf {
  color: #047857;
}

.talangan-detail-toolbar .btn-icon-tool.btn-icon-danger,
.talangan-detail-toolbar .btn-tool.btn-tool-danger {
  color: #dc2626;
}

.talangan-detail-toolbar .btn-icon-tool.btn-icon-danger:hover,
.talangan-detail-toolbar .btn-tool.btn-tool-danger:hover {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.12);
}

.talangan-modal-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.11);
  color: #57534e;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.talangan-modal-close-btn:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.12);
}

/* Tabs Navigation in Modal — Warm Stone Segmented Control Strip */
.talangan-modal-tabs-bar {
  background: #f5f4f0;
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
  padding: 0.55rem 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.talangan-modal-tabs-bar::-webkit-scrollbar {
  display: none;
}

.talangan-modal-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eceae3;
  border: 1px solid rgba(28, 25, 23, 0.065);
  border-radius: 11px;
  padding: 4px;
  gap: 4px;
  width: 100%;
  min-width: max-content;
  box-sizing: border-box;
}

.talangan-modal-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 0.4rem;
  padding: 0.46rem 0.72rem;
  font-size: 0.785rem;
  line-height: 1.1;
  font-weight: 600;
  color: #57534e;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-sizing: border-box;
}

.talangan-modal-tab i {
  font-size: 1.02rem;
  color: #78716c;
  transition: color 0.15s ease;
}

.talangan-modal-tab:hover {
  color: #1c1917;
  background: rgba(255, 255, 255, 0.58);
}

.talangan-modal-tab:hover i {
  color: #0f766e;
}

.talangan-modal-tab.active,
.talangan-modal-tab.active:hover {
  color: #0f766e;
  font-weight: 700;
  background: #ffffff;
  border-color: rgba(15, 118, 110, 0.18);
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.09);
}

.talangan-modal-tab.active i,
.talangan-modal-tab.active:hover i {
  color: #0f766e;
}

.talangan-tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  min-width: 18px;
  padding: 0 5px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.67rem;
  font-weight: 700;
  border-radius: 9999px;
  background: rgba(28, 25, 23, 0.08);
  color: #57534e;
  line-height: 18px;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.talangan-modal-tab:hover .talangan-tab-pill {
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
}

.talangan-modal-tab.active .talangan-tab-pill {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

/* Elevated 60-30-10 Hub KPI Cards (Semantic 3px Top Bar) */
.talangan-hub-kpi {
  position: relative;
  overflow: hidden;
  padding: 0.85rem 0.95rem;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(28, 25, 23, 0.085);
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.03);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.talangan-hub-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -12px rgba(28, 25, 23, 0.18);
  border-color: rgba(15, 118, 110, 0.22);
}

.talangan-hub-kpi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #78716c;
}

.talangan-hub-kpi.accent-stone::before {
  background: linear-gradient(90deg, #57534e 0%, #a8a29e 100%);
}

.talangan-hub-kpi.accent-emerald::before {
  background: linear-gradient(90deg, #059669 0%, #34d399 100%);
}

.talangan-hub-kpi.accent-jade::before {
  background: linear-gradient(90deg, #0f766e 0%, #2dd4bf 100%);
}

.talangan-hub-kpi.accent-amber::before {
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 100%);
}

.talangan-hub-kpi.accent-crimson::before {
  background: linear-gradient(90deg, #dc2626 0%, #fb7185 100%);
}

.talangan-hub-kpi-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #78716c;
}

.talangan-hub-kpi-value {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  font-size: 1.12rem;
  font-weight: 700;
  color: #1c1917;
  margin-top: 0.2rem;
  line-height: 1.25;
}

.talangan-hub-kpi-sub {
  font-size: 0.71rem;
  color: #78716c;
  margin-top: 0.2rem;
  line-height: 1.3;
}

/* Compact Zero-Overflow Hub Table */
.talangan-hub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.81rem;
}

.talangan-hub-table thead th {
  background: #faf9f6 !important;
  color: #78716c !important;
  font-size: 0.69rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.65rem 0.75rem !important;
  border-bottom: 1px solid rgba(28, 25, 23, 0.08) !important;
  white-space: nowrap;
}

.talangan-hub-table tbody td {
  padding: 0.68rem 0.75rem !important;
  border-bottom: 1px solid rgba(28, 25, 23, 0.055) !important;
  vertical-align: middle;
}

.talangan-hub-table tbody tr:last-child td {
  border-bottom: none !important;
}

.talangan-hub-table tbody tr:hover {
  background: rgba(15, 118, 110, 0.03) !important;
}

.talangan-hub-table tfoot tr {
  background: #faf9f6 !important;
  border-top: 2px solid rgba(28, 25, 23, 0.09) !important;
}

.talangan-hub-table tfoot td {
  padding: 0.72rem 0.75rem !important;
}

/* Parameter Grid */
.talangan-params-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 1023px) {
  .talangan-params-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .talangan-params-grid {
    grid-template-columns: 1fr;
  }
}

.talangan-param-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.03);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.talangan-param-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #0f766e;
}

.talangan-param-card:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: 0 8px 18px -12px rgba(28, 25, 23, 0.16);
}

.talangan-param-card.is-po::before { background: linear-gradient(90deg, #06373b 0%, #0f766e 100%); }
.talangan-param-card.is-po .talangan-param-icon { background: #f0fdfa; color: #0f766e; border: 1px solid #ccfbf1; }
.talangan-param-card.is-po .talangan-param-value { color: #1c1917; }

.talangan-param-card.is-modal::before { background: linear-gradient(90deg, #059669 0%, #34d399 100%); }
.talangan-param-card.is-modal .talangan-param-icon { background: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
.talangan-param-card.is-modal .talangan-param-value { color: #047857; }

.talangan-param-card.is-nisbah::before { background: linear-gradient(90deg, #0f766e 0%, #2dd4bf 100%); }
.talangan-param-card.is-nisbah .talangan-param-icon { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.talangan-param-card.is-nisbah .talangan-param-value { color: #0f766e; }

.talangan-param-card.is-tempo::before { background: linear-gradient(90deg, #d97706 0%, #fbbf24 100%); }
.talangan-param-card.is-tempo .talangan-param-icon { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.talangan-param-card.is-tempo .talangan-param-value { color: #b45309; }

.talangan-param-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.talangan-param-info {
  min-width: 0;
  flex: 1;
}

.talangan-param-label {
  font-size: 0.67rem;
  color: #78716c;
  font-weight: 700;
  margin-bottom: 0.14rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.talangan-param-value {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.25;
}

.talangan-param-sub {
  font-size: 0.7rem;
  color: #78716c;
  margin-top: 0.18rem;
  line-height: 1.25;
}

/* Escrow Card */
.talangan-escrow-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  gap: 1rem;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.05);
}

.talangan-escrow-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.talangan-escrow-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #047857;
  flex-shrink: 0;
}

.talangan-badge-escrow {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 9999px;
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.talangan-escrow-details {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.talangan-bank-pill {
  padding: 0.1rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 4px;
  background: #06373b;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.talangan-norek {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.9rem;
  font-weight: 700;
  color: #064e3b;
  letter-spacing: 0.02em;
}

.btn-salin-escrow {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  background: #ffffff;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-salin-escrow:hover {
  background: #ecfdf5;
  border-color: #059669;
}

.talangan-atas-nama {
  font-size: 0.75rem;
  color: #047857;
  font-weight: 500;
}

.talangan-escrow-right {
  text-align: right;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.75);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(167, 243, 208, 0.8);
}

/* Funder Badges */
.talangan-funder-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.71rem;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.talangan-funder-badge.internal {
  background: #06373b;
  color: #ffffff;
}

.talangan-funder-badge.external {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .talangan-detail-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    position: relative;
  }
  .talangan-detail-header-left {
    padding-right: 2.75rem;
  }
  .talangan-detail-title-main {
    white-space: normal;
    font-size: 1rem;
  }
  .talangan-detail-header-right {
    width: 100%;
    justify-content: flex-start;
  }
  .talangan-detail-toolbar {
    width: 100%;
    overflow-x: auto;
  }
  .talangan-detail-header .talangan-modal-close-btn {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
  }
  .talangan-modal-tabs-bar {
    padding: 0.5rem 0.85rem;
  }
  .talangan-escrow-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .talangan-escrow-right {
    text-align: left;
    width: 100%;
    padding-top: 0.5rem;
    border-top: 1px dashed #a7f3d0;
  }
}

/* Trust Bank Accounts Section */
.talangan-trust-accounts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 768px) {
  .talangan-trust-accounts-grid {
    grid-template-columns: 1fr;
  }
}

.talangan-account-card {
  padding: 0.75rem 0.95rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  position: relative;
  transition: all 0.2s ease;
}

.talangan-account-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.talangan-account-card.penerima {
  border: 1px solid #ccfbf1;
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%);
}

.talangan-account-card.penerima:hover {
  border-color: #99f6e4;
}

.talangan-account-card.pengirim {
  border: 1px solid #e0f2fe;
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
}

.talangan-account-card.pengirim:hover {
  border-color: #bae6fd;
}

.talangan-account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.talangan-account-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.talangan-account-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.talangan-account-card.penerima .talangan-account-icon {
  background: #ccfbf1;
  color: #0f766e;
}

.talangan-account-card.pengirim .talangan-account-icon {
  background: #e0f2fe;
  color: #0284c7;
}

.talangan-account-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #073C45;
}

.talangan-account-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.talangan-account-card.penerima .talangan-account-badge {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.talangan-account-card.pengirim .talangan-account-badge {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.talangan-account-body {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.talangan-account-footer {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.1rem;
  line-height: 1.35;
}

.talangan-escrow-card-optional {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.talangan-escrow-icon-optional {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #64748b;
  flex-shrink: 0;
}

/* Talangan RAB Input Row */
.talangan-rab-input-row {
  display: grid;
  grid-template-columns: 190px 1fr 180px 36px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .talangan-rab-input-row {
    grid-template-columns: 1fr 1fr 36px !important;
    gap: 0.45rem !important;
    padding: 0.65rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.65rem;
  }
  .talangan-rab-input-row > :nth-child(1) {
    grid-column: span 3;
  }
  .talangan-rab-input-row > :nth-child(2) {
    grid-column: span 3;
  }
  .talangan-rab-input-row > :nth-child(3) {
    grid-column: span 2;
  }
  .talangan-rab-input-row > :nth-child(4) {
    grid-column: span 1;
    justify-self: flex-end;
  }
}

/* ============================================================
   KALKULATOR HPP & ANALISIS USAHA TANI - RESPONSIVE & CLEAN UI
   ============================================================ */

.hpp-wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  background: transparent;
  padding: 0;
  border: none;
  border-radius: 0;
  margin-bottom: 1.25rem;
}

.hpp-wizard-step-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0.35rem;
  border-radius: 8px;
  min-width: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.hpp-hok-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  background: #faf9f6;
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 11px;
  margin-bottom: 0.85rem;
}

.hpp-hok-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hpp-hok-controls .form-control {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0.25rem 0.6rem !important;
  font-size: 0.82rem !important;
}

.hpp-phase-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.hpp-phase-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.65rem 0.8rem;
  background: #f5f4f0;
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.18s ease;
  min-width: 0;
  text-align: left;
}

.hpp-phase-tab:hover {
  background: #ffffff;
  border-color: rgba(15, 118, 110, 0.25);
}

.hpp-phase-tab.active,
.hpp-phase-tab.active:hover {
  background: #ffffff;
  border: 1.5px solid #0f766e;
  box-shadow: 0 4px 12px -6px rgba(15, 118, 110, 0.28);
}

.hpp-phase-tab-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #44403c;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hpp-phase-tab.active .hpp-phase-tab-top {
  color: #0f766e;
}

.hpp-phase-tab-amount {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.76rem;
  font-weight: 700;
  color: #78716c;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.hpp-phase-tab.active .hpp-phase-tab-amount {
  color: #047857;
}

/* RAB Table Grid */
.hpp-rab-table {
  border: 1px solid rgba(28, 25, 23, 0.085);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.hpp-rab-thead {
  background: #faf9f6;
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
  padding: 0.6rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #78716c;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hpp-rab-row {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(28, 25, 23, 0.055);
  transition: background 0.15s ease;
}

.hpp-rab-row:last-child {
  border-bottom: none;
}

.hpp-rab-row:hover {
  background: rgba(15, 118, 110, 0.03);
}

.hpp-rab-grid-var {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) 72px 100px minmax(0, 1.25fr) minmax(0, 1.25fr) 36px;
  gap: 0.5rem;
  align-items: center;
}

.hpp-rab-grid-tetap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 64px 94px minmax(0, 1.15fr) 74px minmax(0, 1.15fr) 36px;
  gap: 0.5rem;
  align-items: center;
}

.hpp-rab-row .form-control {
  min-height: 38px !important;
  height: 38px !important;
  padding: 0.35rem 0.6rem !important;
  font-size: 0.82rem !important;
  border-radius: 8px !important;
}

.hpp-rab-row .form-icon-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.hpp-rab-row .form-icon-wrapper .form-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #0f766e;
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
  line-height: 1;
}

.hpp-rab-row .form-control.has-icon {
  padding-left: 2.15rem !important;
}

.hpp-subtotal-box {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 0.65rem;
  background: #faf9f6;
  border: 1px solid rgba(28, 25, 23, 0.09);
  border-radius: 8px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.81rem;
  font-weight: 700;
  color: #1c1917;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hpp-delete-btn {
  width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 7px !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #94a3b8 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.hpp-delete-btn:hover {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #ef4444 !important;
}

.hpp-mobile-label {
  display: none;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hpp-detail-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 1100px) {
  .hpp-detail-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .hpp-wizard-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hpp-wizard-steps > :last-child {
    grid-column: span 2;
  }
  .hpp-phase-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hpp-rab-thead {
    display: none !important;
  }
  .hpp-mobile-label {
    display: block;
  }
  .hpp-rab-row.hpp-rab-grid-var,
  .hpp-rab-row.hpp-rab-grid-tetap {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
  }
  .hpp-rab-row.hpp-rab-grid-var > :nth-child(1),
  .hpp-rab-row.hpp-rab-grid-tetap > :nth-child(1) {
    grid-column: span 2;
  }
  .hpp-rab-row.hpp-rab-grid-var > :nth-child(6),
  .hpp-rab-row.hpp-rab-grid-tetap > :nth-child(7) {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
  }
}

@media (max-width: 540px) {
  .hpp-detail-grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hpp-sticky-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.hpp-sticky-stat-item {
  min-width: 0;
}

.hpp-sticky-stat-item:not(:first-child) {
  border-left: 1px solid #e2e8f0;
  padding-left: 1.25rem;
}

@media (max-width: 768px) {
  .hpp-sticky-summary-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }
  .hpp-sticky-stat-item:not(:first-child) {
    border-left: none;
    border-top: 1px solid #e2e8f0;
    padding-left: 0;
    padding-top: 0.65rem;
  }
}









/* ============================================================
   MULTI-TENANT / ORGANISASI SWITCHER STYLES (Langkah 4)
   ============================================================ */
.dash-org-switcher-wrap {
  position: relative;
}

.dash-org-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #FFFFFF;
  border: 1px solid rgba(28, 25, 23, 0.1);
  border-radius: var(--radius-full, 9999px);
  padding: 0 0.75rem 0 0.5rem;
  height: 38px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #1C1917;
  text-align: left;
  max-width: 250px;
}

.dash-org-chip:hover {
  background: #F0FDFA;
  border-color: rgba(15, 118, 110, 0.35);
}

.dash-org-chip.global-mode {
  background: #FEF3C7;
  border-color: rgba(217, 119, 6, 0.35);
}

.dash-org-chip.global-mode:hover {
  background: #FDE68A;
}

.dash-org-chip-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0F766E;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.dash-org-chip.global-mode .dash-org-chip-icon {
  background: #D97706;
}

.dash-org-chip-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.dash-org-chip-name {
  font-size: 0.785rem;
  font-weight: 700;
  color: #1C1917;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.dash-org-chip-role {
  font-size: 0.65rem;
  font-weight: 600;
  color: #78716C;
}

.dash-org-caret {
  font-size: 0.75rem;
  color: #78716C;
  margin-left: 0.15rem;
  flex-shrink: 0;
}

.dash-org-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.1);
  border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(28, 25, 23, 0.2), 0 4px 12px -4px rgba(28, 25, 23, 0.08);
  z-index: 1050;
  overflow: hidden;
  animation: fadeIn 0.15s ease-out;
}

.dash-org-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #FAF9F6;
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
}

.dash-org-count {
  font-size: 0.685rem;
  font-weight: 700;
  background: #ECEAE3;
  color: #57534E;
  padding: 2px 8px;
  border-radius: 9999px;
}

.dash-org-menu-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.4rem;
}

.dash-org-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.dash-org-item:hover {
  background: #F5F4F0;
}

.dash-org-item.active {
  background: #F0FDFA;
  border-color: rgba(15, 118, 110, 0.22);
}

.dash-org-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #F5F4F0;
  color: #0F766E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.dash-org-item-icon.global {
  background: #FEF3C7;
  color: #B45309;
}

.dash-org-item.active .dash-org-item-icon {
  background: #0F766E;
  color: #ffffff;
}

.dash-org-item.active .dash-org-item-icon.global {
  background: #D97706;
  color: #ffffff;
}

.dash-org-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dash-org-item-name {
  font-size: 0.825rem;
  font-weight: 700;
  color: #1C1917;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-org-item.active .dash-org-item-name {
  color: #06373B;
}

.dash-org-item-desc {
  font-size: 0.7rem;
  color: #78716C;
  margin-top: 1px;
}

.dash-org-item-check {
  color: #0F766E;
  font-size: 1rem;
  flex-shrink: 0;
}

.sample-badge {
  font-size: 0.6rem;
  font-weight: 700;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 1px 5px;
}

.dash-org-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: #78716C;
  font-size: 0.8rem;
}

.dash-org-switching-overlay {
  padding: 0.65rem 1rem;
  background: rgba(15, 118, 110, 0.96);
  color: #ffffff;
  font-size: 0.775rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.spinner-anim {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .dash-org-chip-role {
    display: none;
  }
  .dash-org-chip-name {
    max-width: 90px;
  }
}

/* ============================================================
   FORM CONTROLS COMPACT (Matching .btn-sm size & border-radius)
   ============================================================ */
.form-control-sm,
select.form-control-sm,
input.form-control-sm {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  font-size: 0.8125rem !important;
  border-radius: var(--radius-sm, 6px) !important;
  padding: 0 0.75rem !important;
  line-height: 34px !important;
  border: 1px solid var(--gray-200) !important;
}

select.form-control-sm {
  padding-right: 1.85rem !important;
  appearance: auto !important;
  cursor: pointer;
}

.search-input-sm {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  font-size: 0.8125rem !important;
  border-radius: var(--radius-sm, 6px) !important;
  padding: 0 1.8rem 0 2.1rem !important;
  line-height: 34px !important;
  border: 1px solid var(--gray-200) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ============================================================
   FLOATING QUICK NAVIGATION DOCK (BILAH MENU PINTAS MELAYANG)
   Capsule / Pill dock at bottom right for quick jumping to
   10 core operational modules (Peta, Tanam, Panen, Gudang, etc.)
   Default position: Bottom Right (Kanan Bawah), Default: Collapsed
   ============================================================ */
.dash-floating-dock-wrap {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: auto;
  transform: none;
  z-index: 995;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-floating-dock {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  background: rgba(250, 249, 246, 0.96);
  border: 1px solid rgba(28, 25, 23, 0.1);
  border-radius: 9999px;
  padding: 0.32rem 0.6rem 0.32rem 0.45rem;
  box-shadow: 0 12px 30px -5px rgba(28, 25, 23, 0.14), 0 4px 12px -2px rgba(28, 25, 23, 0.06);
  max-width: calc(100vw - 3rem);
  user-select: none;
  gap: 0.2rem;
  backdrop-filter: blur(12px);
  animation: dockFadeSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dockFadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Tombol Lingkaran Melayang saat Tertutup (Warm Deep Pine & Botanical Jade) */
.dash-dock-circle-btn {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0F766E 0%, #06373B 100%);
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px -3px rgba(6, 55, 59, 0.42), 0 4px 10px -2px rgba(28, 25, 23, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.45rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.dash-dock-circle-btn:hover {
  background: linear-gradient(135deg, #0D9488 0%, #0F766E 100%);
  color: #FFFFFF;
  transform: translateY(-3px) scale(1.06);
  border-color: rgba(204, 251, 241, 0.65);
  box-shadow: 0 14px 30px -2px rgba(15, 118, 110, 0.45), 0 6px 14px -2px rgba(28, 25, 23, 0.2);
}

.dash-dock-circle-btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* Tombol Toggle di Ujung Kiri */
.dash-dock-toggle {
  width: 32px;
  height: 38px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #78716C;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.15s ease;
  margin-right: 0.15rem;
}

.dash-dock-toggle:hover {
  background: #F0FDFA;
  color: #0F766E;
}

/* Tombol Tutup Cepat di Ujung Kanan Dock */
.dash-dock-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #ECEAE3;
  color: #57534E;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: 0.25rem;
  transition: all 0.15s ease;
}

.dash-dock-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.dash-dock-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.dash-dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 0.35rem 0.6rem;
  border-radius: 12px;
  text-decoration: none;
  color: #0f766e;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.dash-dock-item:hover {
  background-color: #f0fdfa;
  color: #115e59;
  transform: translateY(-2px);
}

.dash-dock-item.active {
  background-color: #ccfbf1;
  color: #0f766e;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #99f6e4;
}

.dash-dock-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 0.22rem;
  transition: transform 0.15s ease;
}

.dash-dock-item:hover .dash-dock-icon {
  transform: scale(1.08);
}

.dash-dock-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

/* Hide floating dock on small mobile screens to prevent overlap with .dash-bottom-nav */
@media (max-width: 768px) {
  .dash-floating-dock-wrap {
    display: none !important;
  }
}

/* Ensure desktop content area has comfortable bottom breathing room */
@media (min-width: 769px) {
  .dash-content {
    padding-bottom: 5.5rem !important;
  }
}




