:root {
  --pcpms-primary: #1e3a5f;
  --pcpms-accent: #2a9d8f;
  --pcpms-sidebar-w: 250px;
}

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

.app-topbar {
  background-color: var(--pcpms-primary);
  padding: 0.6rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.app-topbar .navbar-brand { color: #fff; }

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

.app-sidebar {
  width: var(--pcpms-sidebar-w);
  background: #ffffff;
  border-right: 1px solid #e3e6ea;
  min-height: calc(100vh - 56px);
  position: sticky;
  top: 56px;
  align-self: flex-start;
}

.app-sidebar .nav-link {
  color: #495057;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-size: 0.92rem;
  margin-bottom: 2px;
}
.app-sidebar .nav-link i { width: 20px; display: inline-block; }
.app-sidebar .nav-link:hover { background: #eef2f7; color: var(--pcpms-primary); }
.app-sidebar .nav-link.active { background: var(--pcpms-primary); color: #fff; }
.app-sidebar .nav-link.disabled { color: #b0b6bd; pointer-events: none; }

.sidebar-heading {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9aa4af;
  margin: 1rem 0 0.35rem 0.8rem;
  font-weight: 600;
}

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

.kpi-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.kpi-card .kpi-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.kpi-card .kpi-label { font-size: 0.8rem; color: #6c757d; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.35rem; }
.kpi-card small { margin-top: 0.35rem; }

/* Section headings used to group dashboard KPI cards (Project Overview / Profit Overview / Commercial Analysis) */
.dashboard-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a94a0;
  margin: 0 0 0.6rem 0.15rem;
}

/* Featured card (Actual Profit) - the single most important number for the business owner */
.kpi-card-featured {
  background: linear-gradient(135deg, #ffffff 0%, #f0f7f5 100%);
  border: 1px solid rgba(42, 157, 143, 0.25) !important;
  box-shadow: 0 4px 18px rgba(42, 157, 143, 0.16);
}
.kpi-card-featured .kpi-value-lg { font-size: 2rem; }
.kpi-card-featured .kpi-label { color: var(--pcpms-accent); font-weight: 700; }

.card { border: none; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f2; font-weight: 600; }

.traffic-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.traffic-dot.success { background: #2a9d8f; }
.traffic-dot.warning { background: #e9c46a; }
.traffic-dot.danger { background: #e76f51; }

table.table thead { background: #f8f9fb; }
.table-costing tfoot td { font-weight: 700; background: #f8f9fb; }

.cost-item-row { cursor: grab; }
.cost-item-row .drag-handle { cursor: grab; }
.cost-item-row.dragging-row { opacity: 0.4; background: #eef2f7; }
.cost-item-row td { vertical-align: middle; }
.cost-header-row { background: #eef1f4; }
.cost-header-row td { font-size: 0.85rem; letter-spacing: 0.03em; }

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a5f 0%, #2a9d8f 100%);
}
.login-card { max-width: 400px; width: 100%; border-radius: 14px; }

@media (max-width: 991.98px) {
  .app-sidebar { position: fixed; left: -260px; z-index: 1040; transition: left 0.2s ease; box-shadow: 4px 0 12px rgba(0,0,0,0.1); }
  .app-sidebar.show { left: 0; }
}
