:root {
  --primary: #4361ee;
  --primary-dark: #3242a8;
  --sidebar-width: 240px;
}

body.app-body {
  background-color: #f4f6fb;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Navbar */
.app-navbar {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  z-index: 1030;
}

/* Layout */
.app-wrapper {
  display: flex;
  min-height: calc(100vh - 56px - 52px);
}

.app-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid #e9ecef;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.app-sidebar .nav-link {
  color: #495057;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 4px;
  font-weight: 500;
}

.app-sidebar .nav-link:hover {
  background: #eef1ff;
  color: var(--primary);
}

.app-sidebar .nav-link.active {
  background: var(--primary);
  color: #fff;
}

.app-content {
  flex: 1;
  min-width: 0;
}

.app-footer {
  background: #fff;
  border-top: 1px solid #e9ecef;
}

/* Stat cards */
.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.stat-card .stat-icon {
  position: absolute;
  right: 16px;
  bottom: 10px;
  font-size: 2.6rem;
  opacity: 0.15;
}

.card {
  border-radius: 14px;
}

/* Login page */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #4361ee 0%, #3242a8 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  border-radius: 18px;
}

/* Mobile sidebar */
@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    z-index: 1020;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
}

/* Print styles for reports */
@media print {
  .app-navbar, .app-sidebar, .app-footer, .no-print, #sidebarToggle {
    display: none !important;
  }
  .app-content {
    padding: 0 !important;
  }
  body {
    background: #fff !important;
  }
}
