:root {
  --bs-primary: #2563eb;
  --sidebar-width: 220px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #f0f2f5;
  padding-top: 56px;
}

.navbar {
  background-color: var(--bs-primary) !important;
}

.sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s;
}

.sidebar .nav-link {
  color: #adb5bd;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #fff;
  background-color: rgba(255,255,255,0.08);
  border-left-color: var(--bs-primary);
}

.main-content {
  margin-left: var(--sidebar-width);
  padding: 1.5rem;
  min-height: calc(100vh - 56px);
}

@media (max-width: 767.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* KPI Cards */
.kpi-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}
.kpi-card:hover {
  transform: translateY(-2px);
}
.kpi-card .kpi-value {
  font-size: 2rem;
  font-weight: 700;
}
.kpi-card .kpi-label {
  color: #6c757d;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Status badges */
.badge-active { background-color: #22c55e; }
.badge-broken { background-color: #ef4444; }
.badge-in-storage { background-color: #eab308; color: #000; }
.badge-in-repair { background-color: #f97316; }
.badge-disposed { background-color: #6b7280; }
.badge-on-loan { background-color: #3b82f6; }

/* Role badges */
.bg-purple { background-color: #8b5cf6 !important; }

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
}

/* Tables */
.table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
}

/* Activity feed */
.activity-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.9rem;
}
.activity-item:last-child { border-bottom: none; }
.activity-time {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Print styles */
@media print {
  .sidebar, .navbar, .no-print { display: none !important; }
  .main-content { margin-left: 0; padding: 0; }
}

/* QR label */
.qr-label {
  width: 5cm;
  text-align: center;
  padding: 0.5cm;
  border: 1px dashed #ccc;
}
.qr-label img { width: 3cm; height: 3cm; }
.qr-label .code { font-weight: bold; font-size: 10pt; }
.qr-label .model { font-size: 8pt; color: #666; }

/* Overdue */
.overdue { color: #ef4444; font-weight: 600; }
