/* ================================================
   DASHBOARD COMBINED STYLES - BMKG WILAYAH IV
   Responsive untuk Mobile & Tablet (Desktop tetap)
   ================================================ */

/* VARIABLES */
:root {
  /* Colors - BMKG Theme */
  --bmkg-blue-dark: #003366;
  --bmkg-blue-medium: #0055a4;
  --bmkg-blue-light: #0080ff;
  --bmkg-white: #ffffff;

  /* Status Colors */
  --status-draft: #f39c12;
  --status-process: #4a90e2;
  --status-completed: #28a745;
  --status-warning: #dc3545;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Z-index */
  --z-sidebar: 900;
  --z-navbar: 1000;
  --z-overlay: 800;
  --z-toast: 10000;
}

/* RESET & BASE STYLES */
.dashboard-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==================== NAVBAR (DESKTOP STYLE TETAP) ==================== */
.dashboard-navbar {
  background: linear-gradient(
    135deg,
    var(--bmkg-blue-dark),
    var(--bmkg-blue-medium)
  );
  color: var(--bmkg-white);
  padding: 0 var(--space-xl);
  box-shadow: var(--shadow-lg);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-navbar);
  height: 70px;
}

.navbar-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Brand Section - TETAP DESKTOP STYLE */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  padding: 5px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.navbar-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--bmkg-white);
  line-height: 1.3;
}

.navbar-title small {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.9;
  display: block;
  margin-top: 2px;
}

/* Mobile Menu Toggle - HANYA TAMPIL DI MOBILE */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--bmkg-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  transition: var(--transition-normal);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* User Info - TETAP DESKTOP STYLE */
.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 12px;
  transition: var(--transition-normal);
  cursor: pointer;
}

.navbar-user:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-info {
  text-align: right;
  order: 1;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: white;
  white-space: nowrap;
}

.user-role {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 10px;
  border-radius: 12px;
  display: inline-block;
  color: white;
  font-weight: 500;
  white-space: nowrap;
}

/* Role Colors */
.user-role.pegawai {
  background: #3b82f6;
}
.user-role.penanggung_jawab {
  background: #f59e0b;
}
.user-role.pemberi_persetujuan {
  background: #10b981;
}
.user-role.pelaksana {
  background: #06b6d4;
}
.user-role.admin {
  background: #ef4444;
}

.profile-icon {
  order: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

/* ==================== MAIN LAYOUT ==================== */
.dashboard-main {
  display: flex;
  min-height: calc(100vh - 70px);
  margin-top: 70px;
  position: relative;
}

/* Sidebar Overlay - HANYA UNTUK MOBILE */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-overlay);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ==================== SIDEBAR (DESKTOP STYLE TETAP) ==================== */
.dashboard-sidebar {
  width: 250px;
  background: var(--bmkg-white);
  border-right: 1px solid rgba(0, 51, 102, 0.1);
  position: fixed;
  top: 70px;
  left: 0;
  bottom: 0;
  z-index: var(--z-sidebar);
  overflow-y: auto;
  transition: transform var(--transition-normal);
}

/* Sidebar Header - HANYA TAMPIL DI MOBILE */
.sidebar-header {
  display: none;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
  justify-content: space-between;
}

.sidebar-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #6b7280;
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: var(--transition-normal);
}

.sidebar-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.sidebar-card {
  padding: var(--space-xl);
  height: 100%;
  min-height: calc(100vh - 70px);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bmkg-blue-dark);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--bmkg-blue-light);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Sidebar Menu - TETAP DESKTOP STYLE */
.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: var(--space-xs);
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  color: #4b5563;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
  font-size: 0.875rem;
  font-weight: 500;
}

.sidebar-menu a:hover {
  background: rgba(0, 85, 164, 0.08);
  color: var(--bmkg-blue-dark);
  transform: translateX(5px);
}

.sidebar-menu a.active {
  background: linear-gradient(
    135deg,
    rgba(0, 85, 164, 0.1),
    rgba(0, 119, 204, 0.15)
  );
  color: var(--bmkg-blue-dark);
  border-left: 4px solid var(--bmkg-blue-medium);
  font-weight: 600;
}

.sidebar-menu i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.sidebar-menu span {
  flex: 1;
}

.sidebar-divider {
  height: 1px;
  background: #e5e7eb;
  margin: var(--space-lg) 0;
}

.sidebar-subtitle {
  color: #6c757d;
  font-size: 0.875rem;
  margin: 1.5rem 0 0.75rem;
  padding: 0 var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==================== CONTENT AREA (DESKTOP STYLE TETAP) ==================== */
.dashboard-content {
  margin-left: 250px; /* Offset untuk sidebar tetap */
  width: calc(100% - 250px);
  padding: var(--space-xl);
  min-height: calc(100vh - 70px);
  overflow-y: auto;
  background: transparent;
}

/* ==================== WELCOME SECTION ==================== */
.welcome-card {
  background: linear-gradient(
    135deg,
    var(--bmkg-white),
    rgba(255, 255, 255, 0.9)
  );
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 51, 102, 0.1);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.welcome-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--bmkg-blue-dark);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.welcome-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

.welcome-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--bmkg-blue-medium),
    var(--bmkg-blue-dark)
  );
  color: var(--bmkg-white);
  border: none;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  text-align: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--bmkg-white);
  text-decoration: none;
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.813rem;
}

/* ==================== STATS GRID ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bmkg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 51, 102, 0.1);
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Stat Card Colors */
.stat-card:nth-child(1) {
  border-left: 4px solid #0055a4;
}
.stat-card:nth-child(2) {
  border-left: 4px solid #28a745;
}
.stat-card:nth-child(3) {
  border-left: 4px solid #f39c12;
}
.stat-card:nth-child(4) {
  border-left: 4px solid #6f42c1;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon {
  background: linear-gradient(135deg, #0055a4, #0077cc);
}

.stat-card:nth-child(2) .stat-icon {
  background: linear-gradient(135deg, #28a745, #34ce57);
}

.stat-card:nth-child(3) .stat-icon {
  background: linear-gradient(135deg, #f39c12, #f8c471);
}

.stat-card:nth-child(4) .stat-icon {
  background: linear-gradient(135deg, #6f42c1, #9b67ea);
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--bmkg-blue-dark);
  margin-bottom: var(--space-xs);
  line-height: 1;
}

.stat-card:nth-child(2) .stat-value {
  color: #28a745;
}
.stat-card:nth-child(3) .stat-value {
  color: #f39c12;
}
.stat-card:nth-child(4) .stat-value {
  color: #6f42c1;
}

.stat-label {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.stat-breakdown {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.badge {
  font-size: 0.688rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  display: inline-block;
}

.badge-draft {
  background: #ffd700;
  color: #856404;
}

.badge-warning {
  background: #f39c12;
  color: white;
}

.badge-completed {
  background: #28a745;
  color: white;
}

.badge-primary {
  background: #0055a4;
  color: white;
}

.badge-success {
  background: #28a745;
  color: white;
}

/* ==================== TABLE CONTAINER ==================== */
.table-container {
  background: var(--bmkg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 51, 102, 0.1);
  overflow: hidden;
}

.table-header {
  margin-bottom: var(--space-lg);
}

.table-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--bmkg-blue-dark);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Tab Navigation */
.table-tabs {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.tab-btn {
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #495057;
  transition: var(--transition-normal);
  white-space: nowrap;
}

.tab-btn:hover {
  background: #e9ecef;
  border-color: #ced4da;
}

.tab-btn.active {
  background: var(--bmkg-blue-medium);
  color: white;
  border-color: var(--bmkg-blue-medium);
}

/* ==================== DOCUMENTS CONTAINER ==================== */
.documents-container {
  margin-top: var(--space-lg);
}

.documents-section {
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background: #f8f9fa;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: var(--transition-normal);
}

.documents-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid;
  font-size: 1rem;
  font-weight: 600;
}

/* Section Colors */
#usulanSection .section-title {
  color: #0055a4;
  border-bottom-color: #0055a4;
}

#suratSection .section-title {
  color: #28a745;
  border-bottom-color: #28a745;
}

#insidenSection .section-title {
  color: #f39c12;
  border-bottom-color: #f39c12;
}

.section-count {
  background: currentColor;
  color: white;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  margin-left: auto;
}

/* ==================== DOCUMENTS GRID ==================== */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

/* Compact Grid untuk Surat */
.documents-grid.documents-compact {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-sm);
}

/* Document Card */
.document-card {
  display: flex;
  background: white;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: var(--transition-normal);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.document-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Document Card Borders */
.document-card[data-type="usulan"] {
  border-left: 4px solid #0055a4;
}

.document-card[data-type="usulan"]:hover {
  box-shadow: 0 5px 15px rgba(0, 85, 164, 0.15);
}

.document-card[data-type="surat"] {
  border-left: 4px solid #28a745;
}

.document-card[data-type="surat"]:hover {
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.15);
}

.document-card[data-type="insiden"] {
  border-left: 4px solid #f39c12;
}

.document-card[data-type="insiden"]:hover {
  box-shadow: 0 5px 15px rgba(243, 156, 18, 0.15);
}

/* Document Icon */
.document-icon {
  font-size: 1.5rem;
  margin-right: var(--space-md);
  align-self: flex-start;
  min-width: 40px;
  text-align: center;
}

.document-card[data-type="usulan"] .document-icon {
  color: #0055a4;
}

.document-card[data-type="surat"] .document-icon {
  color: #28a745;
}

.document-card[data-type="insiden"] .document-icon {
  color: #f39c12;
}

/* Document Info */
.document-info {
  flex: 1;
  min-width: 0; /* Untuk text truncate */
}

.document-info h5 {
  margin: 0 0 var(--space-sm) 0;
  font-size: 1rem;
  color: #212529;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.document-desc {
  color: #6c757d;
  font-size: 0.875rem;
  margin: 0 0 var(--space-md) 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Document Meta */
.document-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.813rem;
  margin-top: var(--space-sm);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.document-date {
  color: #858796;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
}

.document-status {
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.688rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-draft {
  background: #ffd700;
  color: #856404;
}

.status-process {
  background: #4a90e2;
  color: white;
}

.status-completed {
  background: #28a745;
  color: white;
}

/* Document Actions */
.document-actions {
  display: flex;
  gap: var(--space-xs);
  align-self: flex-start;
  margin-left: var(--space-sm);
}

.btn-action {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid #e0e0e0;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  transition: var(--transition-normal);
}

.btn-action:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.btn-pdf:hover {
  background: #0055a4;
  color: white;
  border-color: #0055a4;
}

.btn-delete:hover {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

.btn-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ==================== EMPTY STATES ==================== */
.empty-section {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  background: #f8f9fa;
  border-radius: var(--radius-lg);
  border: 2px dashed #dee2e6;
  margin: var(--space-lg) 0;
}

.empty-section i {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  opacity: 0.7;
}

#usulanSection .empty-section i {
  color: #0055a4;
}

#suratSection .empty-section i {
  color: #28a745;
}

#insidenSection .empty-section i {
  color: #f39c12;
}

.empty-section p {
  color: #6c757d;
  margin-bottom: var(--space-lg);
  font-size: 1rem;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.custom-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: var(--z-toast);
  animation: slideIn 0.3s ease;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-success {
  background: #28a745;
  color: white;
  border-left: 4px solid #1e7e34;
}

.toast-error {
  background: #dc3545;
  color: white;
  border-left: 4px solid #c82333;
}

.toast-info {
  background: #0055a4;
  color: white;
  border-left: 4px solid #003366;
}

.custom-toast .toast-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.custom-toast .toast-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.custom-toast .toast-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* ==================== RESPONSIVE DESIGN (MOBILE & TABLET SAJA) ==================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  /* Sidebar jadi drawer untuk tablet */
  .dashboard-sidebar {
    transform: translateX(-100%);
  }

  .dashboard-sidebar.active {
    transform: translateX(0);
  }

  .dashboard-content {
    margin-left: 0;
    width: 100%;
    padding: var(--space-lg);
  }

  /* Tampilkan mobile menu toggle untuk tablet */
  .mobile-menu-toggle {
    display: block;
  }

  /* Tampilkan sidebar header untuk tablet */
  .sidebar-header {
    display: flex;
  }

  /* Perbaiki padding sidebar */
  .sidebar-card {
    padding: var(--space-lg);
    min-height: calc(100vh - 140px);
  }

  /* Stat grid 2 kolom untuk tablet */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  /* Adjust welcome card untuk tablet */
  .welcome-card {
    padding: var(--space-lg);
  }

  .welcome-title {
    font-size: 1.5rem;
  }

  /* Documents grid untuk tablet */
  .documents-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .documents-grid.documents-compact {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .document-card {
    padding: var(--space-md);
  }

  /* Sembunyikan user info di navbar untuk tablet */
  .navbar-user .user-info {
    display: none;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* Navbar mobile style */
  .dashboard-navbar {
    padding: 0 var(--space-md);
    height: 60px;
  }

  .navbar-content {
    height: 60px;
    padding: 0 var(--space-sm);
  }

  .dashboard-main {
    margin-top: 60px;
  }

  /* Logo lebih kecil untuk mobile */
  .navbar-logo {
    width: 35px;
    height: 35px;
  }

  /* Judul navbar lebih kecil */
  .navbar-title {
    font-size: 1rem;
  }

  .navbar-title small {
    font-size: 0.688rem;
  }

  /* Content area mobile */
  .dashboard-content {
    padding: var(--space-md);
  }

  /* Welcome card mobile */
  .welcome-card {
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg);
  }

  .welcome-title {
    font-size: 1.25rem;
  }

  .welcome-subtitle {
    font-size: 0.875rem;
  }

  /* Welcome actions jadi vertikal di mobile */
  .welcome-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }

  .btn-primary {
    justify-content: center;
    padding: var(--space-md);
    width: 100%;
  }

  /* Stat grid 1 kolom untuk mobile */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .stat-card {
    padding: var(--space-md);
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  /* Table container mobile */
  .table-container {
    padding: var(--space-md);
    border-radius: var(--radius-lg);
  }

  .table-title {
    font-size: 1rem;
  }

  /* Tab buttons mobile */
  .table-tabs {
    gap: var(--space-xs);
  }

  .tab-btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.813rem;
    flex: 1;
    text-align: center;
    min-width: 80px;
  }

  /* Documents section mobile */
  .documents-section {
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-md);
  }

  /* Documents grid 1 kolom untuk mobile */
  .documents-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .documents-grid.documents-compact {
    grid-template-columns: 1fr;
  }

  /* Document card mobile layout */
  .document-card {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .document-icon {
    align-self: center;
    margin-right: 0;
    margin-bottom: var(--space-sm);
  }

  .document-actions {
    align-self: stretch;
    margin-left: 0;
    margin-top: var(--space-sm);
    justify-content: center;
  }

  .document-meta {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }

  .document-date {
    justify-content: center;
  }

  /* Empty section mobile */
  .empty-section {
    padding: var(--space-xl) var(--space-lg);
  }

  .empty-section i {
    font-size: 2.5rem;
  }

  /* Toast mobile */
  .custom-toast {
    min-width: calc(100% - 40px);
    max-width: calc(100% - 40px);
    right: 20px;
    left: 20px;
  }

  /* Overlay start position untuk mobile */
  .sidebar-overlay {
    top: 60px;
  }

  .dashboard-sidebar {
    top: 60px;
  }

  .sidebar-card {
    min-height: calc(100vh - 120px);
  }
}

/* Small Mobile (max-width: 576px) */
@media (max-width: 576px) {
  /* Sembunyikan judul navbar di small mobile */
  .navbar-brand .navbar-title {
    display: none;
  }

  /* Content padding lebih kecil */
  .dashboard-content {
    padding: var(--space-sm);
  }

  /* Welcome card lebih kecil */
  .welcome-card {
    padding: var(--space-sm);
  }

  /* Stat card lebih kecil */
  .stat-card {
    padding: var(--space-sm);
  }

  /* Table container lebih kecil */
  .table-container {
    padding: var(--space-sm);
  }

  /* Documents section lebih kecil */
  .documents-section {
    padding: var(--space-sm);
  }

  /* Document card lebih kecil */
  .document-card {
    padding: var(--space-sm);
  }

  /* Font sizes lebih kecil untuk small mobile */
  .document-info h5 {
    font-size: 0.938rem;
  }

  .document-desc {
    font-size: 0.813rem;
    -webkit-line-clamp: 3;
  }

  .section-title {
    font-size: 0.938rem;
  }

  .section-count {
    font-size: 0.688rem;
    padding: 2px 8px;
  }

  .document-status {
    font-size: 0.625rem;
    padding: 3px 8px;
  }

  .btn-action {
    width: 32px;
    height: 32px;
  }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
  /* Sesuaikan height untuk landscape */
  .dashboard-navbar {
    height: 50px;
  }

  .dashboard-main {
    margin-top: 50px;
  }

  .dashboard-sidebar {
    top: 50px;
  }

  .sidebar-overlay {
    top: 50px;
  }

  .sidebar-card {
    min-height: calc(100vh - 50px);
  }

  /* Ukuran logo dan icon lebih kecil di landscape */
  .navbar-logo {
    width: 30px;
    height: 30px;
  }

  .profile-icon {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }
}

/* Print Styles */
@media print {
  .dashboard-navbar,
  .dashboard-sidebar,
  .mobile-menu-toggle,
  .sidebar-overlay,
  .btn-delete,
  .btn-action,
  .table-tabs {
    display: none !important;
  }

  .dashboard-main {
    margin-top: 0;
  }

  .dashboard-content {
    padding: 0;
    margin-left: 0;
    width: 100%;
  }

  .welcome-card,
  .table-container,
  .document-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}
