:root {
  --sidebar-width: 230px;
  --sidebar-bg: #1a1a2e;
  --sidebar-color: rgba(255,255,255,0.75);
  --sidebar-active-bg: rgba(255,255,255,0.12);
  --sidebar-active-color: #fff;
  --topbar-height: 52px;
}

body {
  background: #f4f6fb;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  color: #fff !important;
  font-size: 1.25rem;
  font-weight: 700;
  display: block;
}

.sidebar .nav-link {
  color: var(--sidebar-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.sidebar .nav-link:hover {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-color);
}

.sidebar .nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-color);
  font-weight: 600;
}

.sidebar-divider {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer {
  color: var(--sidebar-color);
  font-size: 0.85rem;
}

.sidebar-footer .nav-link {
  padding: 4px 0;
  font-size: 0.875rem;
}

/* Main content */
.main-content {
  min-height: 100vh;
  overflow-x: hidden;
}

.topbar {
  height: var(--topbar-height);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

/* KPI Cards */
.kpi-card .kpi-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Tables */
.table th {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6c757d;
}

/* Card overrides */
.card {
  border-radius: 12px;
}

.card-header {
  border-radius: 12px 12px 0 0 !important;
  font-size: 0.9rem;
}

/* Small button variant */
.btn-xs {
  padding: 1px 6px;
  font-size: 0.75rem;
}

/* Badge fixes */
.badge {
  font-weight: 500;
}

/* Forms */
.form-label {
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

/* Print view button in topbar */
@media (max-width: 768px) {
  .sidebar {
    display: none !important;
  }
  .main-content {
    width: 100%;
  }
}

/* Item row highlight on hover */
#itemsBody tr:hover {
  background: rgba(0,0,0,0.02);
}
