/* Custom tweaks for a trustworthy, government-style UI */

:root {
  --brand-primary: #0d6efd;
  --brand-success: #198754;
  --brand-bg: #f8f9fa;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
}

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.app-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  z-index: 1040;
  transition: width 0.25s ease-in-out;
  overflow: hidden;
}

.mobile-header {
  min-height: 56px;
}

.mobile-header .btn-link {
  text-decoration: none;
}

.mobile-offcanvas {
  --bs-offcanvas-width: 280px;
}

.app-sidebar .nav-link {
  color: #495057;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.15rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link:focus {
  background-color: #e9ecef;
  color: #212529;
}

.app-sidebar .nav-link.active {
  background-color: var(--brand-primary);
  color: #fff;
}

.app-sidebar .nav-section-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  padding: 0.75rem 0.75rem 0.35rem;
}

.sidebar-brand {
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--brand-primary);
}

.app-sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.app-sidebar.collapsed .sidebar-brand-text,
.app-sidebar.collapsed .nav-label,
.app-sidebar.collapsed .nav-section-title,
.app-sidebar.collapsed .user-name,
.app-sidebar.collapsed .logout-label {
  display: none;
}

.app-sidebar.collapsed .nav-link {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.app-sidebar.collapsed .nav-icon {
  margin-right: 0 !important;
  font-size: 1.25rem;
}

.app-sidebar.collapsed .logout-btn i,
.app-sidebar.collapsed .sidebar-toggle i {
  margin-right: 0 !important;
}

.app-sidebar.collapsed .sidebar-toggle .bi-chevron-left::before {
  content: "\f285"; /* chevron-right */
}

.app-sidebar .sidebar-toggle {
  text-decoration: none;
  flex-shrink: 0;
}

.sidebar-brand-text {
  transition: opacity 0.2s ease;
}

.search-results {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid rgba(0,0,0,0.125);
  border-radius: 0.375rem;
  background: #fff;
}

.card {
  border: 0;
  border-radius: 0.5rem;
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.form-label .required {
  color: #dc3545;
  margin-left: 0.15rem;
}

.form-text {
  font-size: 0.875rem;
}

.table thead th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.btn {
  border-radius: 0.375rem;
}

.hero {
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  color: #fff;
}

.hero-eyebrow {
  letter-spacing: 0.18em;
  opacity: 0.85;
}

.stat-card {
  transition: transform 0.15s ease-in-out;
}

.stat-card:hover {
  transform: translateY(-2px);
}

footer {
  margin-top: auto;
}

/* Responsive tweaks */
@media (max-width: 767.98px) {
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  h1, .h1 { font-size: 1.5rem; }
  h2, .h2 { font-size: 1.25rem; }
  h3, .h3 { font-size: 1.1rem; }

  .btn-sm {
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.4rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 768px) {
  .app-sidebar {
    display: flex !important;
  }
}

@media (max-width: 767.98px) {
  .app-sidebar {
    display: none !important;
  }
}

.action-card {
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}
