/* Gap Analysis CSS - Faith & Fire Preparedness Suite */

.gap-analysis-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
  color: #f3f4f6;
  font-family: inherit;
}

/* Preparedness Top Navigation Tabs */
.preparedness-nav-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  background: #1f2937;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #374151;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.preparedness-nav-tab {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #9ca3af;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preparedness-nav-tab:hover {
  color: #f3f4f6;
  background: rgba(55, 65, 81, 0.5);
}

.preparedness-nav-tab.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Overall Preparedness Hero Banner */
.gap-hero-card {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.gap-hero-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: center;
}

@media (max-width: 850px) {
  .gap-hero-grid {
    grid-template-columns: 1fr;
  }
}

.overall-score-dial {
  background: #15191c;
  border: 1px solid #2d3748;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.dial-percentage-value {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.dial-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dial-status-badge {
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-block;
}

.status-excellent {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.status-good {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-critical {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

/* Overall Progress Bar */
.overall-progress-track {
  width: 100%;
  height: 14px;
  background: #111827;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #374151;
  margin: 12px 0;
}

.overall-progress-fill {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
}

/* Hero Stats Quad */
.hero-stats-quad {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 550px) {
  .hero-stats-quad {
    grid-template-columns: 1fr;
  }
}

.gap-stat-tile {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.tile-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.tile-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.tile-lbl {
  font-size: 0.78rem;
  font-weight: 600;
  color: #9ca3af;
  margin-top: 2px;
}

/* Gap Controls Filter Bar */
.gap-controls-bar {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.gap-filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gap-filter-btn {
  background: #111827;
  border: 1px solid #374151;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gap-filter-btn:hover {
  color: #f3f4f6;
  border-color: #4b5563;
}

.gap-filter-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
}

/* Category Gap Accordion Card */
.category-gap-card {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 12px;
  margin-bottom: 18px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.category-gap-card[open] {
  border-color: #3b82f6;
}

.category-gap-header {
  padding: 18px 22px;
  background: #111827;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.category-gap-header::-webkit-details-marker {
  display: none;
}

.category-header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-title-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f9fafb;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-completion-badge {
  font-size: 0.88rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
}

/* Category Progress Track */
.category-progress-track {
  width: 100%;
  height: 10px;
  background: #1f2937;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #374151;
}

.category-progress-fill {
  height: 100%;
  transition: width 0.5s ease;
  border-radius: 6px;
}

/* Gap Table Layout */
.gap-items-table-wrapper {
  overflow-x: auto;
  background: #15191c;
  border-top: 1px solid #374151;
}

.gap-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.gap-table th {
  background: #1f2937;
  color: #9ca3af;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid #374151;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.gap-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #2d3748;
  color: #e5e7eb;
  vertical-align: middle;
}

.gap-table tr:last-child td {
  border-bottom: none;
}

.gap-table tr:hover td {
  background: rgba(31, 41, 55, 0.4);
}

.item-name-cell {
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

.pill-complete {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.pill-partial {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.pill-missing {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.update-inventory-link-btn {
  background: #374151;
  color: #60a5fa;
  border: 1px solid #4b5563;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.update-inventory-link-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
}
