/* ─────────────────────────────────────────────────────────────
   SmartGO4AAM – Theme
   ───────────────────────────────────────────────────────────── */

/* Brand palette, sampled from the logo: skyline green #97c63b, lettering
   navy #000030. White on the lime is only 2:1, so a lime fill always carries
   navy text; text on white uses the deep green (5.5:1). */
:root {
  --brand-lime: #97c63b;
  --brand-lime-hover: #88b52f;
  --brand-lime-active: #7aa22a;
  --brand-navy: #000030;
  --brand-green: #4a7518;
  --brand-green-hover: #3d6113;
  --brand-tint: #eef5e1;

  --sidebar-width: 260px;
  --sidebar-bg: #0e1340;
  --sidebar-text: #c5c9de;
  --sidebar-active: #ffffff;
  --sidebar-accent: var(--brand-lime);
  --header-height: 60px;

  /* Bootstrap 5.3 reads these at runtime: bg-/text-/border-primary, links,
     breadcrumbs, bg-dark and every template rule using var(--bs-primary). */
  --bs-primary: #4a7518;
  --bs-primary-rgb: 74, 117, 24;
  --bs-primary-bg-subtle: #eef5e1;
  --bs-primary-border-subtle: #cfe3a8;
  --bs-primary-text-emphasis: #3d6113;
  --bs-link-color: #4a7518;
  --bs-link-color-rgb: 74, 117, 24;
  --bs-link-hover-color: #3d6113;
  --bs-link-hover-color-rgb: 61, 97, 19;
  --bs-dark: #000030;
  --bs-dark-rgb: 0, 0, 48;
}

/* ── BOOTSTRAP COMPONENTS ────────────────────────────────────── */
/* These are compiled to fixed blue, so each needs its own override. */

.btn-primary {
  --bs-btn-color: var(--brand-navy);
  --bs-btn-bg: var(--brand-lime);
  --bs-btn-border-color: var(--brand-lime);
  --bs-btn-hover-color: var(--brand-navy);
  --bs-btn-hover-bg: var(--brand-lime-hover);
  --bs-btn-hover-border-color: var(--brand-lime-hover);
  --bs-btn-active-color: var(--brand-navy);
  --bs-btn-active-bg: var(--brand-lime-active);
  --bs-btn-active-border-color: var(--brand-lime-active);
  --bs-btn-disabled-color: var(--brand-navy);
  --bs-btn-disabled-bg: var(--brand-lime);
  --bs-btn-disabled-border-color: var(--brand-lime);
  --bs-btn-focus-shadow-rgb: 74, 117, 24;
}
.btn-outline-primary {
  --bs-btn-color: var(--brand-green);
  --bs-btn-border-color: var(--brand-green);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-green);
  --bs-btn-hover-border-color: var(--brand-green);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-green-hover);
  --bs-btn-active-border-color: var(--brand-green-hover);
  --bs-btn-disabled-color: var(--brand-green);
  --bs-btn-disabled-border-color: var(--brand-green);
  --bs-btn-focus-shadow-rgb: 74, 117, 24;
}
.pagination {
  --bs-pagination-active-color: var(--brand-navy);
  --bs-pagination-active-bg: var(--brand-lime);
  --bs-pagination-active-border-color: var(--brand-lime);
  --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(74, 117, 24, .25);
}
.progress { --bs-progress-bar-bg: var(--brand-green); }
.form-check-input:checked {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
}
.form-check-input:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--brand-lime);
  box-shadow: 0 0 0 .25rem rgba(74, 117, 24, .25);
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand i { font-size: 1.6rem; color: var(--sidebar-accent); }

/* Brand mark (253×177) — pin the height and let the width follow. Its navy
   lettering would vanish on the dark sidebar, so it sits on a white chip. */
.sidebar-brand-logo {
  height: 40px;
  width: auto;
  flex: 0 0 auto;
  display: block;
  background: #fff;
  padding: 3px 6px;
  border-radius: 6px;
  box-sizing: content-box;
}
.sidebar-brand span { font-size: 1rem; line-height: 1.15; }

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.sidebar-nav .nav-section {
  padding: 18px 24px 6px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #8f94b8;
  font-weight: 700;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}
.sidebar-nav .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}
.sidebar-nav .nav-link.active {
  color: var(--sidebar-active);
  background: rgba(255,255,255,0.08);
  border-left-color: var(--sidebar-accent);
  font-weight: 600;
}
.sidebar-nav .nav-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-nav .nav-link .badge { font-size: 0.7rem; }
.sidebar-nav .badge.bg-primary {
  background-color: var(--brand-lime) !important;
  color: var(--brand-navy);
}

.sidebar-footer {
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar .text-muted { color: #8f94b8 !important; }

/* ── MAIN CONTENT ────────────────────────────────────────────── */

.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: #f5f7fa;
}

.content-header {
  display: flex;
  align-items: center;
  padding: 12px 28px;
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.content-header .breadcrumb { font-size: 0.88rem; }

.content-body {
  padding: 24px 28px;
}

/* ── STAT CARDS ──────────────────────────────────────────────── */

.stat-card { border-radius: 12px; }
.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  font-weight: 600;
}
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1.2; }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

/* ── AVATAR ──────────────────────────────────────────────────── */

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sidebar-accent);
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.avatar-circle-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d47a1, #1976d2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
}

/* ── STEP INDICATOR ──────────────────────────────────────────── */

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.step-indicator.active .step-number {
  background: #0d6efd;
  color: #fff;
}
.step-indicator.completed .step-number {
  background: #198754;
  color: #fff;
}
.step-label { font-size: 0.8rem; color: #6c757d; }
.step-indicator.active .step-label { color: #0d6efd; font-weight: 600; }

.step-line {
  width: 60px;
  height: 2px;
  background: #dee2e6;
  margin: 0 8px;
  align-self: flex-start;
  margin-top: 18px;
}
.step-line.active { background: #198754; }

/* ── CARDS ───────────────────────────────────────────────────── */

.card { border-radius: 12px; }
.card-header {
  padding: 14px 20px;
  font-size: 0.92rem;
}
.card-body { padding: 20px; }

/* ── TABLE ───────────────────────────────────────────────────── */

.table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: #6c757d;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  }
  .main-content {
    margin-left: 0;
  }
  .content-body {
    padding: 16px;
  }
}

/* ── SCROLLBAR ───────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

/* ── MISC ────────────────────────────────────────────────────── */

.font-monospace { font-family: 'SF Mono', 'Fira Code', monospace; }

.table-hover tbody tr { transition: background 0.1s ease; }

pre {
  font-size: 0.82rem;
  line-height: 1.5;
}
