:root {
  --brand: #3d5af1;
  --brand-dark: #2d3fc1;
  --sidebar-w: 250px;
}

body { background: #f4f6fb; }

/* ---------- LOGIN ---------- */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3d5af1 0%, #6a3df1 100%);
}
.login-card {
  background: #fff;
  padding: 2.2rem;
  border-radius: 14px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}

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

.sidebar {
  width: var(--sidebar-w);
  background: #171a2e;
  color: #cfd3ec;
  flex-shrink: 0;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  z-index: 1000;
  transition: transform .2s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.1rem 1.2rem;
  font-weight: 700; font-size: 1.05rem;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-nav { padding: .8rem 0; display: flex; flex-direction: column; }
.sidebar-nav a {
  color: #b7bbe0;
  padding: .55rem 1.2rem;
  text-decoration: none;
  display: flex; align-items: center; gap: .6rem;
  font-size: .92rem;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar-nav a.active { background: rgba(61,90,241,.18); color: #fff; border-left-color: var(--brand); font-weight: 600; }
.nav-section {
  text-transform: uppercase;
  font-size: .68rem;
  letter-spacing: .06em;
  color: #6d72a0;
  padding: .9rem 1.2rem .3rem;
}

.main-content { margin-left: var(--sidebar-w); flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: #fff;
  padding: .7rem 1.4rem;
  display: flex; align-items: center; gap: 1rem;
  border-bottom: 1px solid #e6e8f0;
  position: sticky; top: 0; z-index: 900;
}

.page-content { padding: 1.4rem; flex-grow: 1; }

.card { border: none; border-radius: 12px; box-shadow: 0 2px 10px rgba(20,20,60,.05); }
.stat-card { border-radius: 14px; padding: 1.1rem 1.3rem; color: #fff; }
.stat-card h3 { margin: 0; font-weight: 700; }
.stat-card .label { font-size: .8rem; opacity: .9; }
.stat-card .bi { font-size: 1.8rem; opacity: .85; }

.bg-grad-1 { background: linear-gradient(135deg,#3d5af1,#6a3df1); }
.bg-grad-2 { background: linear-gradient(135deg,#0fb389,#0891b2); }
.bg-grad-3 { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.bg-grad-4 { background: linear-gradient(135deg,#6366f1,#ec4899); }

.table-responsive { border-radius: 10px; overflow: hidden; }

.kanban-col { background: #eef0f7; border-radius: 12px; padding: .8rem; min-height: 300px; }
.kanban-card { background: #fff; border-radius: 10px; padding: .7rem .8rem; margin-bottom: .6rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); font-size: .85rem; }

.progress { border-radius: 6px; height: 10px; }

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