/* ===================================================
   SBCFeeARB – Application Styles
   =================================================== */

/* Layout */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Top header */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 85px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  z-index: 1030;
}

/* Navbar logo */
.navbar-logo {
  height: 75px;
  width: auto;
  object-fit: contain;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 85px;
  left: 0;
  bottom: 0;
  width: 180px;
  z-index: 1020;
  overflow-y: auto;
  padding-top: 1rem;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: background 0.15s;
}

.sidebar-link:hover {
  background-color: #e8e8e8;
  color: #000;
}

.sidebar-link.active {
  border-left-color: #0d6efd;
  background-color: #e8effe;
  color: #0d6efd;
  font-weight: 500;
}

/* Page wrapper */
.page-wrapper {
  display: flex;
  padding-top: 85px;
}

/* Main content */
.main-content {
  margin-left: 180px;
  flex: 1;
  min-height: calc(100vh - 85px);
}

/* ===================================================
   Navbar / Search
   =================================================== */
#global-search-results {
  z-index: 1050;
  max-height: 400px;
  overflow-y: auto;
}

/* ===================================================
   Workflow Stepper
   =================================================== */
.workflow-stepper {
  padding: 0.5rem 0;
}

.step-item {
  position: relative;
}

.step-node {
  position: relative;
  z-index: 1;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #dee2e6;
  background: #fff;
  color: #adb5bd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.step-circle.current {
  border-color: var(--bs-primary);
  background: var(--bs-primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
}

.step-circle.passed {
  border-color: var(--bs-success);
  background: var(--bs-success);
  color: #fff;
}

.step-label {
  font-size: 0.7rem;
  max-width: 72px;
  text-align: center;
  line-height: 1.2;
}

.step-connector {
  height: 2px;
  background: #dee2e6;
  margin: 0 4px;
  margin-bottom: 18px; /* align with circle centers */
  transition: background 0.2s ease;
}

.step-connector.passed {
  background: var(--bs-success);
}

/* ===================================================
   Cards & Shadows
   =================================================== */
.card {
  border-radius: 0.75rem;
}

.card-header {
  border-radius: 0.75rem 0.75rem 0 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/* ===================================================
   Avatar
   =================================================== */
.avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bs-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}

/* ===================================================
   Stats Cards
   =================================================== */
.stat-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===================================================
   Timeline
   =================================================== */
.timeline-list {
  position: relative;
}

.timeline-item {
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: #f0f0f0;
}

.timeline-icon {
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

/* ===================================================
   HTMX Loading Indicators
   =================================================== */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request.htmx-indicator {
  display: inline-block;
}

/* Global loading bar */
#htmx-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--bs-primary);
  width: 0;
  z-index: 9999;
  transition: width 0.3s ease;
}

/* ===================================================
   Table tweaks
   =================================================== */
.table > :not(caption) > * > * {
  vertical-align: middle;
}

.font-monospace {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

/* ===================================================
   Badge color utilities (subtle variants)
   =================================================== */
.bg-secondary-subtle { background-color: #e2e3e5 !important; }
.bg-primary-subtle   { background-color: #cfe2ff !important; }
.bg-success-subtle   { background-color: #d1e7dd !important; }
.bg-danger-subtle    { background-color: #f8d7da !important; }
.bg-warning-subtle   { background-color: #fff3cd !important; }
.bg-info-subtle      { background-color: #cff4fc !important; }

/* ===================================================
   County program info (Quill rich-text output)
   =================================================== */
.county-program-info p {
  margin-bottom: 0;
  line-height: 1.5;
}


/* ===================================================
   Responsive tweaks
   =================================================== */
@media (max-width: 768px) {
  .step-label {
    display: none;
  }

  .workflow-stepper {
    overflow-x: auto;
  }
}
