/* styles.css — Orange Repo Health v2 */

:root {
  font-family: var(--bdl-font-sans);
  
  /* Brand Colors from Bitcoin Data Labs */
  --primary: #E8916B;
  --primary-dark: #d67e54;
  --primary-gradient-start: #E8916B;
  --primary-gradient-end: #d67e54;
  
  --primary-bg-hover: rgba(232, 145, 107, 0.1);
  --primary-focus-shadow: rgba(232, 145, 107, 0.2);

  /* Sticky offset for elements below BDL fixed header */
  --sticky-offset: 65px;
}

body {
  margin: 0;
  background-color: var(--bg-primary, #FDFBF9);
  color: var(--text-primary, #111827);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#container {
  flex: 1;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* =========================================
   SEARCH SECTION
   ========================================= */
.search-section {
  text-align: center;
  margin-bottom: 3rem;
  padding-top: 4.5rem;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-section h2 {
  font-size: 2.1rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--primary-gradient-start), var(--primary-gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-family: var(--bdl-font-serif);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-section p {
  color: var(--text-secondary, #6b7280);
  font-size: 1.1rem;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 2rem;
}

/* Dynamic Centered State */
.main-content {
  transition: min-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-content.is-centered {
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.main-content.is-centered .search-section {
  padding-top: 0;
  margin-bottom: 0;
}

.main-content.is-centered .search-section h2 {
  font-size: 2.6rem;
}

.main-content.is-centered .search-section p {
  font-size: 1.15rem;
}

/* Post-Search Hiding Logic */
.hide-on-search {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  max-height: 100px;
  overflow: hidden;
}

.main-content:not(.is-centered) .hide-on-search {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.compare-toggle-container {
  margin-top: 1rem;
  text-align: center;
}

/* Post-Search Compact Form */
.main-content:not(.is-centered) .search-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.main-content:not(.is-centered) .search-form {
  margin: 0;
  max-width: none;
  align-items: center;
}

.main-content:not(.is-centered) .search-inputs-container {
  flex-direction: row;
}

.main-content:not(.is-centered) .compare-toggle-container {
  margin-top: 0;
}

.main-content:not(.is-centered) .search-actions {
  align-items: center;
}

.main-content:not(.is-centered) .input-wrapper {
  padding: 0.4rem 0.75rem;
}

.main-content:not(.is-centered) .input-wrapper input {
  font-size: 0.9rem;
}

.main-content:not(.is-centered) .btn-primary,
.main-content:not(.is-centered) .btn-secondary {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

.search-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}

.search-inputs-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-actions {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus-shadow);
}

.input-wrapper input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  color: var(--text-primary, #111827);
}

.search-icon {
  color: var(--text-secondary, #6b7280);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-primary {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--surface, #ffffff);
  color: var(--text-secondary, #4b5563);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: var(--background-hover, #f3f4f6);
  color: var(--text-primary, #111827);
}

.error-message {
  color: #ef4444;
  background-color: #fee2e2;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-weight: 500;
  text-align: left;
}

/* =========================================
   QUICK AUDIT
   ========================================= */
.quick-audit-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.quick-audit-label {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  font-weight: 500;
}

.quick-audit-btn {
  background: none;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--text-primary, #374151);
  cursor: pointer;
  transition: all 0.2s;
}

.quick-audit-btn:hover {
  background: var(--background-hover, #f3f4f6);
  border-color: var(--primary);
  color: var(--primary);
}

/* =========================================
   LOADING STATE
   ========================================= */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
}

/* =========================================
   DASHBOARD CONTAINER
   ========================================= */
.dashboard-container {
  display: block;
  width: 100%;
}

.dashboard {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   TIER 1: HERO HEALTH CARD
   ========================================= */
.hero-health-card {
  background: linear-gradient(135deg, var(--bg-primary, #FDFBF9) 0%, var(--bg-secondary, #F5F1EE) 100%);
  border: 1px solid rgba(42, 51, 66, 0.08);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease;
}

.hero-health-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.hero-info {
  flex: 1;
  min-width: 0;
}

.hero-info .repo-name {
  font-size: 1.75rem;
  margin: 0 0 0.5rem 0;
  font-family: var(--bdl-font-serif);
  color: var(--text-primary);
}

.hero-info .repo-description {
  color: var(--text-secondary, #4b5563);
  margin: 0 0 1rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: auto;
  max-height: 3rem;
}

.hero-info .repo-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--surface, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--text-secondary, #4b5563);
}

.hero-health {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Health Signal Badges */
.health-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.health-active {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.health-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.health-critical {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.health-dormant {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.health-summary-line {
  font-size: 0.85rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
  text-align: right;
  max-width: 240px;
}

/* =========================================
   TIER 2: DASHBOARD SECTIONS & METRICS GRID
   ========================================= */
.dashboard-section {
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--bdl-font-serif);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border, rgba(42, 51, 66, 0.12));
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

.mt-4 {
  margin-top: 2rem;
}

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

.metric-card {
  background: var(--surface, #ffffff);
  border: 1px solid rgba(42, 51, 66, 0.06);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.featured-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(232, 145, 107, 0.05) 0%, rgba(232, 145, 107, 0.15) 100%);
  border-color: rgba(232, 145, 107, 0.3);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-header h4 {
  margin: 0;
  font-family: var(--bdl-font-serif);
  font-size: 0.95rem;
  color: var(--text-primary, #111827);
  font-weight: 600;
}

.stat-large {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.stat-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary, #6b7280);
}

/* =========================================
   QUALITATIVE LABELS
   ========================================= */
.qualitative-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.label-excellent { background: rgba(16, 185, 129, 0.12); color: #059669; }
.label-good     { background: rgba(16, 185, 129, 0.08); color: #10b981; }
.label-moderate { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.label-low      { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.label-critical { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.label-dormant  { background: rgba(107, 114, 128, 0.12); color: #6b7280; }

/* =========================================
   TOOLTIPS
   ========================================= */
.tooltip-icon {
  position: relative;
  display: inline-block;
  color: #9ca3af;
  cursor: help;
}

.tooltip-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1f2937;
  color: #f9fafb;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  width: max-content;
  max-width: 250px;
  text-align: center;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tooltip-icon:hover::after {
  opacity: 1;
  visibility: visible;
}

/* =========================================
   PROGRESS BARS & SPARKLINES
   ========================================= */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background-color: var(--border-color, #e5e7eb);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-bg {
  height: 8px;
  background-color: var(--border-color, #e5e7eb);
  border-radius: 9999px;
  overflow: hidden;
}

.bg-warning {
  background-color: #f59e0b !important;
}

.sparkline-container {
  display: flex;
  align-items: flex-end;
  height: 30px;
  gap: 2px;
  margin-top: 0.5rem;
}

.sparkline-bar {
  flex: 1;
  background-color: var(--primary);
  opacity: 0.7;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.5s ease-in-out;
}

.sparkline-bar:hover {
  opacity: 1;
}

/* =========================================
   GOVERNANCE SECTION — LOCK OVERLAY
   ========================================= */
.advanced-metrics-container {
  position: relative;
  border-radius: 12px;
}

.lock-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(253, 251, 249, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-primary);
  border-radius: 12px;
}

.lock-overlay h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-family: var(--bdl-font-serif);
  color: var(--text-primary);
}

.lock-overlay p {
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.lock-overlay i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.overlay-actions {
  display: flex;
  gap: 12px;
  margin-top: 1rem;
}

.advanced-metrics-container.locked .lock-overlay {
  display: flex;
}

.advanced-metrics-container.locked .advanced-grid {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

/* =========================================
   TIER 3: DEEP DIAGNOSTICS (COLLAPSIBLE)
   ========================================= */
.deep-diagnostics-section .section-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1rem;
}

.deep-diagnostics-section .section-toggle-btn .section-title {
  margin-bottom: 0;
  cursor: pointer;
}

.deep-diagnostics-section .toggle-icon {
  color: var(--text-secondary, #6b7280);
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}

.deep-diagnostics-section.is-expanded .toggle-icon {
  transform: rotate(180deg);
}

.deep-diagnostics-section .collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}

.deep-diagnostics-section.is-expanded .collapsible-content {
  max-height: 500px;
  opacity: 1;
}

/* =========================================
   COMPARISON VIEW — TABLE MODE
   ========================================= */
.comparison-view {
  animation: fadeIn 0.4s ease-out;
}

/* Side-by-side hero cards */
.comparison-heroes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

/* "vs" badge between hero cards */
.comparison-heroes::after {
  content: "vs";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-primary, #FDFBF9);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--bdl-font-serif);
  border: 1px solid var(--border, rgba(42, 51, 66, 0.12));
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.comparison-heroes .hero-health-card {
  padding: 1.5rem;
}

.comparison-heroes .hero-content {
  flex-direction: column;
  gap: 1rem;
}

.comparison-heroes .hero-health {
  align-items: flex-start;
}

.comparison-heroes .health-summary-line {
  text-align: left;
}

/* --- Comparison Table --- */
.comparison-table-wrapper {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border: 1px solid var(--border, rgba(42, 51, 66, 0.12));
  background: var(--bg-primary, #FDFBF9);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.comparison-table thead {
  position: sticky;
  top: var(--sticky-offset, 0px);
  z-index: 100;
}

.comparison-table thead th {
  background: var(--bg-secondary, #F5F1EE);
  padding: 1rem 1.5rem;
  font-family: var(--bdl-font-serif);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border, rgba(42, 51, 66, 0.12));
  text-align: center;
  white-space: nowrap;
}

.comparison-table thead th:first-child {
  text-align: left;
  width: 38%;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.comparison-table thead th a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.comparison-table thead th a:hover {
  color: var(--primary);
}

.comparison-table tbody td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border, rgba(42, 51, 66, 0.08));
  text-align: center;
  vertical-align: middle;
  transition: background 0.15s ease;
}

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

.comparison-table tbody tr:hover td {
  background: rgba(232, 145, 107, 0.03);
}

/* Metric name cell */
.metric-name-cell {
  text-align: left !important;
}

.metric-name-cell .ct-metric-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  display: block;
}

.metric-name-cell .ct-metric-hint {
  font-size: 0.72rem;
  color: var(--text-secondary, #9ca3af);
  display: block;
  margin-top: 2px;
}

/* Value cells */
.metric-value-cell .ct-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.metric-value-cell .ct-subtitle {
  font-size: 0.7rem;
  color: var(--text-secondary, #9ca3af);
  margin-top: 4px;
}

.metric-value-cell .qualitative-label {
  margin-top: 4px;
}

/* Winner highlight */
.winner-cell {
  background: rgba(16, 185, 129, 0.06) !important;
  position: relative;
}

.winner-cell::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 10px;
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 800;
}

/* Section header rows in comparison table */
.section-header-row td {
  background: var(--bg-secondary, #F5F1EE) !important;
  font-family: var(--bdl-font-serif);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  padding: 0.75rem 1.5rem !important;
  text-align: left !important;
  border-bottom: 2px solid var(--border, rgba(42, 51, 66, 0.12)) !important;
}

/* Deep diagnostics toggle row in comparison table */
.section-toggle-row td {
  background: var(--bg-secondary, #F5F1EE) !important;
  font-family: var(--bdl-font-serif);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  padding: 0.75rem 1.5rem !important;
  text-align: left !important;
  border-bottom: 2px solid var(--border, rgba(42, 51, 66, 0.12)) !important;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.section-toggle-row:hover td {
  background: rgba(232, 145, 107, 0.08) !important;
}

.section-toggle-row .toggle-icon {
  transition: transform 0.3s ease;
  display: inline-block;
  margin-left: 8px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.section-toggle-row.is-expanded .toggle-icon {
  transform: rotate(180deg);
}

.deep-diagnostics-row {
  display: none;
}

.deep-diagnostics-row.is-visible {
  display: table-row;
}

/* Token prompt row in comparison table */
.token-prompt-row td {
  text-align: center !important;
  padding: 1.5rem !important;
  background: rgba(232, 145, 107, 0.03);
}

.token-prompt-row .token-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.token-prompt-row .btn-primary {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* =========================================
   MODAL
   ========================================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--surface, #ffffff);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--text-primary, #374151);
}

.form-group input {
  padding: 0.75rem;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 2.5rem;
}

.toggle-password-btn {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password-btn:hover {
  color: var(--text-primary, #111827);
}

.help-text {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color, #e5e7eb);
  display: flex;
  justify-content: flex-end;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  #container {
    padding: 1rem;
  }

  .hero-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-health {
    align-items: flex-start;
  }
  
  .health-summary-line {
    text-align: left;
  }
  
  .comparison-heroes {
    grid-template-columns: 1fr;
  }

  .comparison-heroes::after {
    display: none;
  }
  
  .comparison-table thead th,
  .comparison-table tbody td {
    padding: 0.75rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .metric-value-cell .ct-value {
    font-size: 1.2rem;
  }

  .search-form {
    flex-direction: column;
  }
}
