/* ==========================================================================
   SISTEM INVENTORY PROFESIONAL — STYLESHEET
   Clean, Modern, Responsive, Enterprise Grade
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --dark: #0f172a;
  --dark-sidebar: #0f172a;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--light-bg);
  color: var(--text-main);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

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

/* Sidebar */
.sidebar {
  width: 270px;
  background-color: var(--dark-sidebar);
  color: #94a3b8;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  z-index: 1040;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-menu {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.menu-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 14px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 3px;
}

.sidebar-link i {
  width: 18px;
  font-size: 1rem;
  text-align: center;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.sidebar-link.active {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Top Navbar */
.top-navbar {
  height: 68px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.content-body {
  padding: 24px;
  flex: 1;
}

/* Cards */
.card-modern {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-stat {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-stat .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

/* Tables */
.table-modern {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.table-modern th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.table-modern td {
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

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

/* Badges */
.badge-pill {
  padding: 5px 10px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.75rem;
}

/* Barcode Container */
.barcode-preview {
  background: white;
  padding: 8px 12px;
  border: 1px dashed #cbd5e1;
  display: inline-block;
  text-align: center;
  border-radius: 8px;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  z-index: 1050;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.72rem;
  color: #64748b;
  text-decoration: none;
  gap: 3px;
}

.mobile-nav-item.active {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 991px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -270px;
  }
  .sidebar.show {
    left: 0;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .content-body {
    padding-bottom: 80px;
  }
}

/* Print Styling */
@media print {
  .sidebar, .top-navbar, .mobile-bottom-nav, .btn-no-print, .dataTables_filter, .dataTables_length, .dataTables_paginate {
    display: none !important;
  }
  .content-body {
    padding: 0 !important;
  }
  .card-modern {
    border: none !important;
    box-shadow: none !important;
  }
}
