:root {
  --brand-blue: #1a99d3;
  --brand-gray: #6f7072;
}

body {
  background: #f3f6f8;
  color: #172033;
}

.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
}

.page-wrap.narrow {
  max-width: 760px;
}

.page-title {
  font-size: 1.55rem;
  font-weight: 750;
  margin-bottom: .25rem;
}

.panel {
  background: #fff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.panel-title,
.section-heading {
  font-weight: 750;
  color: #172033;
  margin-bottom: .8rem;
}

.section-heading {
  border-top: 1px solid #e5eaf0;
  padding-top: 1rem;
  margin-top: 1.25rem;
}

.section-heading:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.kpi-card {
  background: #fff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 1rem;
  min-height: 92px;
}

.kpi-card span {
  display: block;
  color: #65758b;
  font-size: .82rem;
  margin-bottom: .45rem;
}

.kpi-card strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.15;
}

.kpi-card.good {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.kpi-card.warn {
  border-color: #fed7aa;
  background: #fff7ed;
}

.kpi-card.muted {
  border-color: #e5e7eb;
  background: #f9fafb;
}

.status-badge {
  font-weight: 650;
}

.status-converted,
.status-done {
  background: #059669;
}

.status-lost,
.status-cancelled {
  background: #dc2626;
}

.status-follow_up,
.status-negotiation,
.status-quotation_sent {
  background: #d97706;
}

.status-new,
.status-assigned,
.status-contacted,
.status-postponed,
.status-duplicate {
  background: #2563eb;
}

.followup-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  padding: .75rem;
  margin-bottom: .6rem;
  background: #fbfcfd;
}

.followup-link span {
  display: block;
  color: #65758b;
  font-size: .85rem;
}

.followup-link.urgent {
  border-color: #fed7aa;
  background: #fff7ed;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid #edf1f5;
}

.summary-row:last-child {
  border-bottom: 0;
}

.sales-total {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.chart-bars {
  min-height: 150px;
  display: flex;
  align-items: flex-end;
  gap: .8rem;
  border-left: 1px solid #d8e0e8;
  border-bottom: 1px solid #d8e0e8;
  padding: 1rem 1rem 1.6rem;
}

.chart-bar {
  width: 36px;
  min-height: 12px;
  max-height: 130px;
  background: var(--brand-blue);
  border-radius: 6px 6px 0 0;
  position: relative;
}

.chart-bar span {
  position: absolute;
  bottom: -1.4rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: .75rem;
  color: #65758b;
}

.timeline-item {
  border-left: 3px solid var(--brand-blue);
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.timeline-item span,
.timeline-item small {
  display: block;
  color: #65758b;
  font-size: .84rem;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f8fafc, #e6f4f1);
}

.login-card {
  width: min(420px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .12);
}

.login-logo {
  height: 56px;
  width: auto;
  max-width: 60%;
  object-fit: contain;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.navbar-brand .brand-logo {
  height: 28px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar.bg-dark {
  border-bottom: 3px solid var(--brand-blue);
}

.btn-success {
  --bs-btn-bg: var(--brand-blue);
  --bs-btn-border-color: var(--brand-blue);
  --bs-btn-hover-bg: #1683b3;
  --bs-btn-hover-border-color: #1683b3;
}

.errorlist {
  color: #dc2626;
  list-style: none;
  padding-left: 0;
  margin: .35rem 0 0;
  font-size: .85rem;
}

.target-card {
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  padding: .75rem .9rem;
  margin-bottom: .6rem;
  background: #fbfcfd;
}

.target-progress {
  height: 8px;
  border-radius: 4px;
  background: #e5eaf0;
  overflow: hidden;
  margin-top: .4rem;
}

.target-progress > span {
  display: block;
  height: 100%;
  background: var(--brand-blue);
}

.target-card.met .target-progress > span {
  background: #059669;
}
