:root {
  --sp-primary: #2357a6;
  --sp-accent: #16a085;
  --sp-ink: #182235;
  --sp-muted: #687386;
  --sp-bg: #f6f8fb;
}

body {
  color: var(--sp-ink);
}

.btn-primary,
.bg-primary {
  background-color: var(--sp-primary) !important;
  border-color: var(--sp-primary) !important;
}

.text-primary {
  color: var(--sp-primary) !important;
}

.app-body {
  background: var(--sp-bg);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: 260px;
  background: #fff;
  border-right: 1px solid #e3e8f0;
  transform: translateX(0);
  transition: transform .2s ease;
}

.sidebar-brand {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  border-bottom: 1px solid #e3e8f0;
}

.sidebar-logo,
.sidebar-logo-fallback {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
}

.sidebar-logo-fallback {
  display: inline-grid;
  place-items: center;
  background: var(--sp-primary);
  color: #fff;
  font-weight: 800;
}

.sidebar-title {
  color: var(--sp-ink);
  font-weight: 800;
  text-decoration: none;
}

.sidebar-subtitle,
.topbar-subtitle {
  color: var(--sp-muted);
  font-size: .82rem;
}

.sidebar-nav {
  padding: .75rem;
  display: grid;
  gap: .15rem;
}

.sidebar-link {
  color: #314057;
  text-decoration: none;
  padding: .68rem .75rem;
  border-radius: 8px;
  font-weight: 650;
}

.sidebar-link:hover {
  background: #eef3fb;
  color: var(--sp-primary);
}

.app-main {
  width: 100%;
  min-width: 0;
  padding-left: 260px;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 1.5rem;
  background: rgba(246, 248, 251, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e3e8f0;
}

.topbar-title {
  font-weight: 800;
}

.hamburger-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  display: inline-grid;
  place-content: center;
  gap: 4px;
}

.hamburger-btn span {
  width: 18px;
  height: 2px;
  background: var(--sp-ink);
  display: block;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-main {
    padding-left: 0;
  }

  .app-body.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1035;
    background: rgba(15, 23, 42, .45);
  }
}

.hero {
  min-height: 72vh;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(10, 24, 48, .82), rgba(10, 24, 48, .34)),
    url('https://images.unsplash.com/photo-1507692049790-de58290a4334?auto=format&fit=crop&w=1800&q=80') center/cover;
  color: #fff;
}

.section-band {
  padding: 4rem 0;
}

.feature-card,
.stat-card,
.table-panel,
.form-panel {
  background: #fff;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
}

.feature-card,
.stat-card {
  padding: 1.25rem;
}

.stat-number {
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1;
  font-weight: 800;
}

.muted-label {
  color: var(--sp-muted);
  font-size: .88rem;
}

.table-panel {
  overflow: hidden;
}

.form-panel {
  padding: 1.5rem;
}

.module-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .2rem .55rem;
  font-size: .78rem;
  font-weight: 700;
  background: #eef3fb;
}

.status-active,
.status-approved {
  color: #0f7b55;
  background: #e8f7f0;
}

.status-pending {
  color: #93610b;
  background: #fff6df;
}

.status-suspended,
.status-inactive,
.status-needs_repair,
.status-open {
  color: #9a2f2f;
  background: #fdecec;
}

.status-excellent,
.status-good,
.status-completed,
.status-answered,
.status-closed {
  color: #0f7b55;
  background: #e8f7f0;
}

.status-fair,
.status-in_progress,
.status-in_prayer,
.status-contacted,
.status-assigned {
  color: #93610b;
  background: #fff6df;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  background: var(--sp-bg);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.settings-logo-preview {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  padding: .5rem;
}
