:root {
  --brand: #4f46e5;
  --brand-light: #eef2ff;
  --radius: 14px;
  --sidebar-width: 240px;
}

body {
  background: #f5f6fb;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

[data-bs-theme="dark"] body { background: #0f1117; }

.app-topbar {
  background: #fff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
[data-bs-theme="dark"] .app-topbar { background: #161925; border-color: #262b3a; }

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

.app-sidebar {
  width: var(--sidebar-width);
  background: #fff;
  border-right: 1px solid #eee;
  flex-shrink: 0;
}
[data-bs-theme="dark"] .app-sidebar { background: #161925; border-color: #262b3a; }

.app-sidebar .nav-link {
  color: #555;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 4px;
  font-weight: 500;
}
.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
  background: var(--brand-light);
  color: var(--brand);
}
[data-bs-theme="dark"] .app-sidebar .nav-link { color: #ccc; }

.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.btn { border-radius: 10px; }
.form-control, .form-select { border-radius: 10px; }

.kpi-card {
  border-radius: var(--radius);
  padding: 1.25rem;
  color: #fff;
}
.kpi-card .kpi-value { font-size: 1.6rem; font-weight: 700; }
.kpi-card .kpi-label { font-size: .85rem; opacity: .9; }

.bg-grad-1 { background: linear-gradient(135deg,#4f46e5,#7c73f1); }
.bg-grad-2 { background: linear-gradient(135deg,#059669,#34d399); }
.bg-grad-3 { background: linear-gradient(135deg,#d97706,#fbbf24); }
.bg-grad-4 { background: linear-gradient(135deg,#dc2626,#f87171); }

.table thead th { font-size: .8rem; text-transform: uppercase; color: #888; border-bottom-width: 1px; }

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#4f46e5,#312e81);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 18px;
  padding: 2.5rem;
  background: #fff;
}

.dropzone {
  border: 2px dashed #ccc;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: .2s;
}
.dropzone.dragover { border-color: var(--brand); background: var(--brand-light); }

@media (max-width: 991px) {
  .app-sidebar {
    position: fixed;
    z-index: 1030;
    top: 56px;
    bottom: 0;
    left: -260px;
    transition: left .2s;
  }
  .app-sidebar.show { left: 0; }
}
