@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Surface Colors */
  --surface: #f7f9ff;
  --surface-dim: #d7dadf;
  --surface-bright: #f7f9ff;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f1f4f9;
  --surface-container: #ebeef3;
  --surface-container-high: #e5e8ee;
  --surface-container-highest: #e0e3e8;
  --on-surface: #181c20;
  --on-surface-variant: #3f4945;
  --outline: #707975;
  --outline-variant: #bfc9c4;
  --surface-tint: #004d40;

  /* Primary Brand (Petra Deep Green) */
  --primary: #00342b;
  --on-primary: #ffffff;
  --primary-container: #004d40;
  --on-primary-container: #7ebdac;

  /* Secondary (Warm Gold) */
  --secondary: #785900;
  --secondary-container: #fdc003;
  --on-secondary-container: #6c5000;

  /* Status Colors */
  --status-sangat-baik-bg: #d0f5e5;
  --status-sangat-baik-text: #00513b;
  --status-cukup-bg: #fff1c2;
  --status-cukup-text: #6c5000;
  --status-kritis-bg: #ffdad6;
  --status-kritis-text: #93000a;
  --status-info-bg: #d1e4ff;
  --status-info-text: #00497d;

  /* Dimensions & Spacing */
  --sidebar-width: 290px;
  --topbar-height: 64px;
  --gutter: 24px;
  --container-padding: 32px;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-tabular: 'JetBrains Mono', monospace;

  /* Radii */
  --radius-sm: 2px;
  --radius-default: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--surface);
  color: var(--on-surface);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Modern Light Sidebar (Matching Screenshot & DESIGN.md) */
.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background-color: #ffffff;
  color: var(--on-surface);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--surface-container-high);
}

.sidebar-header {
  padding: 20px 20px 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--surface-container-high);
}

.sidebar-brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.sidebar-logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6ee7b7;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 52, 43, 0.18);
}

.sidebar-brand-text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-brand-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.sidebar-brand-sub {
  font-size: 12.5px;
  color: #5a605d;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding-left: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px 24px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Corporate & Elegant Group Header */
.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px 6px 10px;
  margin-top: 6px;
  user-select: none;
}

.nav-section-header:first-child {
  padding-top: 4px;
  margin-top: 0;
}

.nav-section-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.nav-section-pill {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  letter-spacing: 0.03em;
}

/* Elegant Menu Item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  color: #334155;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
  white-space: nowrap;
}

.nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  color: #64748b;
  stroke-width: 1.8;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.nav-item:hover {
  background-color: #f8fafc;
  color: #00342b;
}

.nav-item:hover svg {
  color: #00342b;
}

.nav-item.active {
  background-color: #eef7f4;
  color: #00342b;
  font-weight: 600;
}

.nav-item.active svg {
  color: #00342b;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background-color: #00342b;
  border-radius: 0 3px 3px 0;
}

.nav-item-badge {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
}

.sidebar-bottom {
  padding: 12px;
  border-top: 1px solid var(--surface-container-high);
}

/* Main Area */
.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Bar */
.app-topbar {
  height: var(--topbar-height);
  background-color: #ffffff;
  border-bottom: 1px solid var(--surface-container-high);
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--container-padding);
}

.topbar-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--outline);
}

.topbar-breadcrumbs a {
  color: var(--outline);
  text-decoration: none;
}

.topbar-breadcrumbs a:hover {
  color: var(--on-surface);
}

.topbar-breadcrumbs .current {
  color: var(--on-surface);
  font-weight: 600;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-icon-btn {
  background: none;
  border: none;
  color: #3f4945;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.topbar-icon-btn:hover {
  background-color: var(--surface-container);
  color: var(--on-surface);
}

.topbar-user-dropdown {
  position: relative;
}

.topbar-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  color: var(--on-surface);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.topbar-user-badge:hover,
.topbar-user-badge.active {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  color: #00342b;
}

.topbar-user-badge svg {
  width: 18px;
  height: 18px;
  color: #3f4945;
  flex-shrink: 0;
}

.topbar-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 8px;
  z-index: 1000;
  display: none;
  animation: fadeInDown 0.15s ease-out;
}

.topbar-user-menu.show {
  display: block;
}

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

.topbar-user-header {
  padding: 10px 12px 12px 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 6px;
}

.topbar-user-header-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.topbar-user-header-email {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user-header-role {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: #eef7f4;
  color: #00342b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.topbar-menu-item:hover {
  background-color: #f8fafc;
  color: #00342b;
}

.topbar-menu-item svg {
  width: 16px;
  height: 16px;
  color: #64748b;
  flex-shrink: 0;
  stroke-width: 1.8;
}

.topbar-menu-item:hover svg {
  color: #00342b;
}

.topbar-menu-item.danger {
  color: #dc2626;
}

.topbar-menu-item.danger:hover {
  background-color: #fef2f2;
  color: #b91c1c;
}

.topbar-menu-item.danger svg {
  color: #dc2626;
}

.topbar-menu-divider {
  height: 1px;
  background-color: #f1f5f9;
  margin: 6px 0;
}

/* Page Content */
.app-content {
  flex: 1;
  padding: var(--container-padding);
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  margin-bottom: var(--gutter);
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--on-surface);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 14px;
  color: var(--outline);
  margin-top: 4px;
}

/* Institutional Card System (DESIGN.MD Compliant) */
.card {
  background: #ffffff;
  border: 1px solid var(--surface-container-high);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 20px 24px !important;
  border-bottom: 1px solid #e5e8ee !important;
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.015em;
  margin: 0;
  line-height: 1.3;
}

.card-subtitle {
  font-size: 13px;
  color: #5a605d;
  margin-top: 4px;
  font-weight: 400;
  line-height: 1.4;
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 16px 24px;
  background-color: #fafbfc;
  border-top: 1px solid #e5e8ee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* Profile Specific Layout */
.profile-grid-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 960px) {
  .profile-grid-layout {
    grid-template-columns: 1fr;
  }
}

.profile-summary-card {
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}


.avatar-wrapper {
  margin-bottom: 20px;
}

.avatar-container {
  width: 130px;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--surface-container-high);
  background-color: var(--surface-container-low);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  background: var(--primary);
  color: #ffffff;
  font-size: 42px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--on-surface);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.profile-role {
  font-size: 13.5px;
  color: var(--outline);
  margin-bottom: 28px;
}

.profile-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-profile-primary {
  width: 100%;
  height: 42px;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-default);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-profile-primary:hover {
  background-color: var(--primary-container);
}

.btn-profile-secondary {
  width: 100%;
  height: 42px;
  background-color: #ffffff;
  color: var(--on-surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-default);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-profile-secondary:hover {
  background-color: var(--surface-container-low);
  border-color: var(--outline);
}

/* Profile Details Card */
.profile-details-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}


.card-title-lg {
  font-size: 18px;
  font-weight: 700;
  color: var(--on-surface);
}

.divider-line {
  height: 1px;
  background-color: var(--surface-container);
  margin: 16px 0 28px 0;
}

.info-grid-2cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 28px;
  column-gap: 32px;
}

@media (max-width: 600px) {
  .info-grid-2cols {
    grid-template-columns: 1fr;
  }
}

.info-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--outline);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.info-value {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--on-surface);
}

.badge-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--status-sangat-baik-bg);
  color: var(--status-sangat-baik-text);
  padding: 3px 10px;
  border-radius: var(--radius-default);
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--status-sangat-baik-text);
}

.profile-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logout-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3f4945;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.logout-link-btn:hover {
  color: var(--error);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--surface-container-high);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--on-surface);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--outline);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  background: var(--surface-container-low);
  border-top: 1px solid var(--surface-container-high);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Tabular Numerals */
.data-tabular {
  font-family: var(--font-tabular);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-default);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-container);
}

.btn-outline {
  background: #ffffff;
  border-color: var(--outline-variant);
  color: var(--on-surface);
}

.btn-outline:hover {
  background: var(--surface-container);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--outline);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: var(--font-body);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-default);
  background: #ffffff;
  color: var(--on-surface);
}

.form-control:focus {
  outline: none;
  border-color: var(--surface-tint);
  box-shadow: 0 0 0 2px rgba(0, 77, 64, 0.15);
}

/* Master Sub-nav Tabs */
.master-tabs-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--surface-container-high);
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 6px 12px 0 12px;
  box-shadow: var(--shadow-card);
}

.master-tabs-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.master-tabs-nav::-webkit-scrollbar {
  display: none;
}

.master-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--outline);
  text-decoration: none;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.master-tab-item:hover {
  color: var(--on-surface);
  background-color: var(--surface-container-low);
  border-radius: var(--radius-default) var(--radius-default) 0 0;
}

.master-tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background-color: #f1f8f6;
  border-radius: var(--radius-default) var(--radius-default) 0 0;
}

/* Sliding Drawer Panel (Matching Reference UI) */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  backdrop-filter: blur(2px);
  transition: opacity 0.25s ease;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 540px;
  background: #ffffff;
  z-index: 1010;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-header {
  padding: 24px 28px 18px 28px;
  border-bottom: 1px solid var(--surface-container-high);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #ffffff;
}

.drawer-title {
  font-size: 20px;
  font-weight: 700;
  color: #181c20;
  letter-spacing: -0.01em;
}

.drawer-subcode {
  font-family: var(--font-tabular);
  font-size: 13px;
  color: #707975;
  margin-top: 2px;
  font-weight: 500;
}

.drawer-close-btn {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #707975;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s ease;
}

.drawer-close-btn:hover {
  color: #181c20;
}

.drawer-body {
  padding: 28px;
  flex: 1;
  overflow-y: auto;
}

.drawer-footer {
  padding: 16px 28px;
  background: var(--surface-container-low);
  border-top: 1px solid var(--surface-container-high);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

/* Toggle Switch */
.toggle-switch-container {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.toggle-switch-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background-color: #bfc9c4;
  border-radius: 24px;
  transition: background-color 0.2s;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch-container input:checked + .toggle-slider {
  background-color: #00342b;
}

.toggle-switch-container input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ==========================================
   PROFESSIONAL DATA TABLES & LIST STYLING
   ========================================== */
.data-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.5;
}

.data-table th {
  background-color: #fafbfc;
  color: #5d6360;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e8ee;
  white-space: nowrap;
}

.data-table td {
  padding: 16px 20px;
  color: #181c20;
  border-bottom: 1px solid #f1f4f9;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.12s ease;
}

.data-table tbody tr:hover {
  background-color: #f7f9fd;
}

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

/* Table Specific Components */
.table-code-cell {
  font-family: var(--font-tabular);
  font-weight: 700;
  color: #181c20;
  letter-spacing: -0.01em;
}

.table-name-cell {
  font-weight: 600;
  color: #181c20;
}

.table-desc-cell {
  color: #5d6360;
  font-size: 13px;
  line-height: 1.45;
  max-width: 380px;
}

.table-action-btns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-action-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-default);
  background: #ffffff;
  border: 1px solid #bfc9c4;
  color: #181c20;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-action-edit:hover {
  background: #f1f4f9;
  border-color: #707975;
  color: #00342b;
}

.btn-action-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  width: auto;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-default);
  background: #ffffff;
  border: 1px solid #bfc9c4;
  color: #ba1a1a;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.btn-action-delete:hover {
  background: #ffe2de;
  border-color: #ba1a1a;
}

.table-footer-meta {
  padding: 14px 20px;
  font-size: 12.5px;
  color: #707975;
  border-top: 1px solid #ebeef3;
  background: #ffffff;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ==========================================
   DRAG & DROP REORDERING STYLES
   ========================================== */
.drag-handle-col {
  width: 44px;
  text-align: center;
  padding: 16px 8px 16px 16px !important;
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  cursor: grab;
  color: #a0aba6;
  border-radius: 4px;
  transition: all 0.15s ease;
  user-select: none;
}

.drag-handle:hover {
  color: #00342b;
  background-color: #e8f0ed;
}

.drag-handle:active {
  cursor: grabbing;
}

tr.draggable-row {
  cursor: default;
}

tr.draggable-row.dragging {
  opacity: 0.45;
  background-color: #f1f8f6 !important;
  outline: 2px dashed #004d40;
}

tr.draggable-row.drag-over-top {
  border-top: 2.5px solid #004d40 !important;
}

tr.draggable-row.drag-over-bottom {
  border-bottom: 2.5px solid #004d40 !important;
}

/* Reorder Toast Notification */
.reorder-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #00342b;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 52, 43, 0.25);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.reorder-toast.show {
  transform: translateY(0);
  opacity: 1;
}





/* ==========================================
   UNIFORM HIGH-QUALITY DATA TABLES & LISTS
   ========================================== */
.data-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.5;
}

.data-table th {
  background-color: #fafbfc;
  color: #5d6360;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e8ee;
  white-space: nowrap;
}

.data-table td {
  padding: 18px 24px;
  color: #181c20;
  border-bottom: 1px solid #f1f4f9;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.12s ease;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

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

/* Table Specific Components */
.table-code-cell {
  font-family: var(--font-tabular);
  font-weight: 700;
  color: #181c20;
  letter-spacing: -0.01em;
  font-size: 13.5px;
}

.table-name-cell {
  font-weight: 600;
  color: #181c20;
  font-size: 13.5px;
}

.table-desc-cell {
  color: #5d6360;
  font-size: 13.5px;
  line-height: 1.45;
}

.table-action-btns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-action-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-default);
  background: #ffffff;
  border: 1px solid #bfc9c4;
  color: #181c20;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-action-edit:hover {
  background: #f1f4f9;
  border-color: #707975;
  color: #00342b;
}

.btn-action-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  width: auto;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-default);
  background: #ffffff;
  border: 1px solid #bfc9c4;
  color: #ba1a1a;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.btn-action-delete:hover {
  background: #ffe2de;
  border-color: #ba1a1a;
}

.badge-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #d0f5e5;
  color: #00513b;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.badge-status-pill.inactive {
  background-color: #f1f4f9;
  color: #707975;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #00513b;
}

.badge-status-pill.inactive .status-dot {
  background-color: #707975;
}

.table-footer-meta {
  padding: 16px 24px;
  font-size: 13px;
  color: #707975;
  border-top: 1px solid #ebeef3;
  background: #ffffff;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Pagination Component */
.pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-default);
  background: #ffffff;
  border: 1px solid var(--outline-variant);
  color: var(--on-surface);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.page-btn:hover:not(.disabled) {
  background-color: var(--surface-container-low);
  border-color: var(--outline);
  color: var(--primary);
}

.page-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  cursor: default;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #ffffff;
}



/* ==========================================================================
   ELEGANT DELETE CONFIRMATION MODAL & TOAST NOTIFICATION SYSTEM
   ========================================================================== */

/* Danger Button */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--error);
  color: #ffffff;
  border: 1px solid var(--error);
  border-radius: var(--radius-default);
  padding: 8px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(186, 26, 26, 0.2);
}

.btn-danger:hover {
  background-color: #93000a;
  border-color: #93000a;
  box-shadow: 0 4px 8px rgba(186, 26, 26, 0.3);
  transform: translateY(-1px);
}

.btn-danger:active {
  transform: translateY(0);
}

/* Delete Modal Dialog */
.delete-modal-dialog {
  max-width: 440px !important;
  text-align: center;
  padding: 32px 28px !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid var(--surface-container-high) !important;
}

.delete-modal-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: var(--error-container);
  color: var(--error);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px auto;
  box-shadow: 0 0 0 8px rgba(255, 218, 214, 0.4);
}

.delete-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 8px;
}

.delete-modal-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--on-surface-variant);
  margin-bottom: 24px;
}

.delete-modal-desc strong {
  color: var(--on-surface);
  font-weight: 600;
}

.delete-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.delete-modal-actions .btn {
  min-width: 120px;
  height: 40px;
}

/* Toast Notification Container */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 400px;
  width: 100%;
}

.toast-card {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 0, 0, 0.06);
  border-left: 5px solid #00342b;
  position: relative;
  overflow: hidden;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.toast-card.toast-hiding {
  opacity: 0;
  transform: translateX(40px);
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 2px;
}

.toast-msg {
  font-size: 12.5px;
  color: var(--on-surface-variant);
  line-height: 1.4;
}

.toast-close {
  background: transparent;
  border: none;
  color: #a0a6a3;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.toast-close:hover {
  color: var(--on-surface);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(0, 0, 0, 0.08);
}

.toast-progress-bar {
  height: 100%;
  background: var(--primary);
  width: 100%;
  animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

/* Toast Type Variants */
.toast-card.success {
  border-left-color: #00342b;
}
.toast-card.success .toast-icon {
  color: #004d40;
}
.toast-card.success .toast-progress-bar {
  background: #004d40;
}

.toast-card.error {
  border-left-color: var(--error);
}
.toast-card.error .toast-icon {
  color: var(--error);
}
.toast-card.error .toast-progress-bar {
  background: var(--error);
}

.toast-card.warning {
  border-left-color: var(--secondary);
}
.toast-card.warning .toast-icon {
  color: var(--secondary);
}
.toast-card.warning .toast-progress-bar {
  background: var(--secondary);
}

.toast-card.info {
  border-left-color: #0288d1;
}
.toast-card.info .toast-icon {
  color: #0288d1;
}
.toast-card.info .toast-progress-bar {
  background: #0288d1;
}

/* ==========================================================================
   EXECUTIVE GRID & STAT CARDS SYSTEM (DESIGN.MD COMPLIANT)
   ========================================================================== */

.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
}

.grid-cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.grid-cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
}

@media (max-width: 1200px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e0e3e8;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
  gap: 12px;
}

.stat-card:hover {
  box-shadow: 0 6px 16px rgba(0, 52, 43, 0.09);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5a605d;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: #00342b;
  line-height: 1.15;
  margin: 4px 0 6px 0;
  font-family: var(--font-tabular);
}

.stat-sub {
  font-size: 12.5px;
  color: #5a605d;
  font-weight: 500;
  line-height: 1.4;
}


/* Badges Semantic Styling */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  line-height: 1.25;
  white-space: nowrap;
}

.badge-sangat-berkelanjutan {
  background-color: #d0f5e5;
  color: #00513b;
  border: 1px solid #a3e9cc;
}

.badge-cukup-berkelanjutan {
  background-color: #fff1c2;
  color: #785900;
  border: 1px solid #ffe082;
}

.badge-kritis {
  background-color: #ffdad6;
  color: #93000a;
  border: 1px solid #ffb4ab;
}

.badge-info {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-draft {
  background-color: #ebeef3;
  color: #5a605d;
  border: 1px solid #d7dadf;
}

/* Modal Backdrops */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 32, 26, 0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}

.modal-card {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  border: 1px solid #e0e3e8;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #707975;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: #181c20;
}

.btn-ghost {
  background: transparent;
  color: #3f4945;
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: #ebeef3;
  color: #181c20;
}

/* ==========================================================================
   SANDWICH BAR & DRAWER NAVIGATION SYSTEM (UNIVERSAL & RESPONSIVE)
   ========================================================================== */

.sidebar-toggle-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #00342b;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-right: 10px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-toggle-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #004d40;
}

.sidebar-toggle-btn:active {
  transform: scale(0.96);
}

/* Universal Backdrop for Drawer Overlay */
.sidebar-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 32, 26, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

body.sidebar-drawer-open .sidebar-drawer-backdrop {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.sidebar-close-btn {
  display: inline-flex !important;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-close-btn:hover {
  background: #fee2e2;
  color: #ba1a1a;
  border-color: #fecaca;
}

/* Base transitions */
.app-sidebar {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, width 0.25s ease;
}

.app-main {
  transition: margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Universal Drawer Overlay when active (Desktop & Mobile) */
body.sidebar-drawer-open .app-sidebar {
  transform: translateX(0) !important;
  z-index: 1200 !important;
  box-shadow: 0 10px 40px rgba(0, 52, 43, 0.35) !important;
}

/* Desktop Styles (> 992px) */
@media (min-width: 993px) {
  /* Default: pinned sidebar */
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    z-index: 100;
    transform: translateX(0);
  }
  .app-main {
    margin-left: var(--sidebar-width);
  }

  /* When collapsed / wide mode active: sidebar is hidden into a drawer */
  body.sidebar-collapsed .app-sidebar {
    transform: translateX(-100%);
    z-index: 1200;
  }
  body.sidebar-collapsed .app-main {
    margin-left: 0 !important;
  }
  /* When collapsed and user clicks sandwich bar to open drawer */
  body.sidebar-collapsed.sidebar-drawer-open .app-sidebar {
    transform: translateX(0) !important;
    box-shadow: 0 10px 40px rgba(0, 52, 43, 0.35) !important;
  }
}

/* Tablet & Mobile Styles (<= 992px) */
@media (max-width: 992px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 290px;
    max-width: 86vw;
    z-index: 1200;
    transform: translateX(-100%);
    box-shadow: none;
  }

  .app-main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .app-topbar {
    padding: 0 16px;
  }

  .app-content {
    padding: 16px;
  }
}

/* ==========================================================================
   UNIVERSAL MOBILE RESPONSIVE CARD VIEW FOR ALL TABLES (NO HORIZONTAL SCROLL)
   ========================================================================== */

@media (max-width: 768px) {
  /* Container overrides to prevent horizontal scrollbar */
  .data-table-container,
  .table-container,
  .table-responsive,
  .card-body > .data-table-container,
  .card-body > div[style*="overflow"] {
    overflow-x: visible !important;
    overflow-y: visible !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  /* Table base block transformation */
  .data-table,
  .table,
  .matrix-table,
  table.data-table,
  table.table,
  table[class*="table"] {
    display: block !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    border-collapse: separate !important;
    border-spacing: 0 14px !important;
  }

  /* Hide standard thead on mobile */
  .data-table thead,
  .table thead,
  .matrix-table thead,
  table.data-table thead,
  table.table thead,
  table[class*="table"] thead {
    display: none !important;
  }

  .data-table tbody,
  .table tbody,
  .matrix-table tbody,
  table.data-table tbody,
  table.table tbody,
  table[class*="table"] tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
  }

  /* Each row becomes a beautiful elevated card */
  .data-table tbody tr,
  .table tbody tr,
  .matrix-table tbody tr,
  table.data-table tbody tr,
  table.table tbody tr,
  table[class*="table"] tbody tr {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1px solid #e0e3e8 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    margin-bottom: 0 !important;
    position: relative !important;
    gap: 8px !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  }

  .data-table tbody tr:hover,
  .table tbody tr:hover,
  table.data-table tbody tr:hover,
  table.table tbody tr:hover {
    box-shadow: 0 4px 14px rgba(0, 52, 43, 0.09) !important;
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
  }

  /* Each cell becomes a key-value row inside the card */
  .data-table td,
  .table td,
  .matrix-table td,
  table.data-table td,
  table.table td,
  table[class*="table"] td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border: none !important;
    border-bottom: 1px dashed #f1f4f9 !important;
    font-size: 13.5px !important;
    text-align: right !important;
    width: 100% !important;
    min-height: 36px !important;
    box-sizing: border-box !important;
    white-space: normal !important;
  }

  .data-table td:last-child,
  .table td:last-child,
  table.data-table td:last-child,
  table.table td:last-child {
    border-bottom: none !important;
    padding-top: 12px !important;
    padding-bottom: 0 !important;
    justify-content: flex-end !important;
  }

  /* Card Label pseudo-element generated from data-label */
  .data-table td::before,
  .table td::before,
  .matrix-table td::before,
  table.data-table td::before,
  table.table td::before,
  table[class*="table"] td::before {
    content: attr(data-label);
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: #64748b !important;
    text-align: left !important;
    margin-right: 14px !important;
    flex-shrink: 0 !important;
    max-width: 45% !important;
  }

  /* Action buttons inside mobile card view */
  .table-action-btns,
  .data-table td .table-action-btns,
  .table td .table-action-btns {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }

  .btn-action-edit,
  .btn-action-delete,
  .btn-table-action {
    min-height: 38px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
  }

  /* Table meta, pagination & filters on mobile */
  .table-footer-meta,
  .pagination-container {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
    text-align: center !important;
    padding: 14px 0 !important;
  }

  .pagination {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  /* Master Tabs Header scrolling */
  .master-tabs-nav {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding-bottom: 6px !important;
  }

  .master-tab-item {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
  }

  /* Filter bar stacking */
  .filter-bar,
  .filter-row,
  .filter-form {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .filter-group,
  .filter-select,
  .filter-input {
    width: 100% !important;
  }

  /* Topbar breadcrumb truncation on small screens */
  .topbar-breadcrumbs {
    font-size: 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 160px !important;
  }
}

/* ==========================================================================
   RETINA DISPLAY & HIGH-DPI OPTIMIZATION
   ========================================================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .sidebar-logo-icon,
  .hero-logo-box,
  .topbar-icon-btn,
  .btn {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    image-rendering: -webkit-optimize-contrast;
  }
}


