/* === Authority Card List === */
.auth-list { }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow var(--duration) var(--ease);
  margin-bottom: 2px;
}
.auth-card:hover { box-shadow: var(--shadow-card); }
.auth-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}
.auth-card-header:hover { background: var(--primary-50); }
.auth-card-info { flex: 1; min-width: 0; }
.auth-card-info strong { font-size: 0.85rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-eik { font-size: 0.7rem; color: var(--text-muted); }
.auth-card-meta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.auth-muni { font-size: 0.75rem; color: var(--text-secondary); max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-card-detail { border-top: 1px solid var(--border-light); background: var(--bg-elevated); }

/* Authority price index card (В1) */
.auth-prices-section { margin-bottom: 1rem; }
.auth-price-index {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.2rem; border-radius: 0.75rem;
    border: 1.5px solid var(--border-light);
    background: var(--surface);
}
.auth-price-index.auth-idx-high { border-color: #fca5a5; background: #fef2f2; }
.auth-price-index.auth-idx-low { border-color: #86efac; background: #f0fdf4; }
.auth-price-index.auth-idx-avg { border-color: #93c5fd; background: #eff6ff; }
.auth-idx-icon { font-size: 1.6rem; flex-shrink: 0; }
.auth-idx-body { flex: 1; min-width: 0; }
.auth-idx-value {
    font-size: 1.3rem; font-weight: 800; line-height: 1.2;
    color: var(--text-primary);
}
.auth-idx-high .auth-idx-value { color: #dc2626; }
.auth-idx-low .auth-idx-value { color: #16a34a; }
.auth-idx-avg .auth-idx-value { color: #2563eb; }
.auth-idx-label {
    font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
    margin-left: 0.3rem;
}
.auth-idx-meta {
    font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem;
}
.auth-idx-meta strong { color: var(--text-secondary); }

/* Deviation index card (shared by contractor & authority profiles) */
.cp-dev-section { margin-top: 0.75rem; margin-bottom: 0.5rem; }
.dev-index-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.2rem; border-radius: 0.75rem;
    border: 1.5px solid var(--border-light);
    background: var(--surface);
}
.dev-index-card.dev-idx-high { border-color: #fca5a5; background: #fef2f2; }
.dev-index-card.dev-idx-low { border-color: #86efac; background: #f0fdf4; }
.dev-index-card.dev-idx-avg { border-color: #93c5fd; background: #eff6ff; }
.dev-idx-icon { font-size: 1.6rem; flex-shrink: 0; }
.dev-idx-body { flex: 1; min-width: 0; }
.dev-idx-value {
    font-size: 1.3rem; font-weight: 800; line-height: 1.2;
    color: var(--text-primary);
}
.dev-idx-high .dev-idx-value { color: #dc2626; }
.dev-idx-low .dev-idx-value { color: #16a34a; }
.dev-idx-avg .dev-idx-value { color: #2563eb; }
.dev-idx-label {
    font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
    margin-left: 0.3rem;
}
.dev-idx-meta {
    font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem;
}
.dev-idx-meta strong { color: var(--text-secondary); }

/* Authority contractors ranking (В2) */
.auth-contractors-section { margin-bottom: 1rem; }
.auth-contractors-list { display: flex; flex-direction: column; gap: 0.35rem; }
.auth-contractor-row {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 0.5rem; border-radius: 0.4rem;
    transition: background 0.15s;
}
.auth-contractor-row:hover { background: var(--primary-50); }
.auth-contractor-rank {
    width: 1.6rem; text-align: center; font-size: 0.8rem;
    font-weight: 700; color: var(--text-secondary); flex-shrink: 0;
}
.auth-contractor-info { flex: 1; min-width: 0; }
.auth-contractor-name {
    display: block; font-size: 0.8rem; font-weight: 500;
    color: var(--text-primary); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.auth-contractor-bar-wrap {
    height: 4px; background: #eef2ff; border-radius: 2px;
    margin-top: 0.2rem; overflow: hidden;
}
.auth-contractor-bar {
    height: 100%; background: var(--primary); border-radius: 2px;
    transition: width 0.4s ease;
}
.auth-contractor-count {
    font-size: 0.78rem; font-weight: 600; color: var(--text-secondary);
    white-space: nowrap; flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes detailSlideIn { from { opacity: 0; transform: translateY(-8px); max-height: 0; } to { opacity: 1; transform: translateY(0); max-height: 2000px; } }
.detail-stats { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.detail-stat {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-card);
  text-align: center;
  min-width: 80px;
  border: 1px solid var(--border);
  flex: 1;
  transition: all var(--duration) var(--ease);
}
.detail-stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.detail-stat .ds-value {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
.detail-stat .ds-label { font-size: 0.6875rem; color: var(--text-secondary); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.03em; }

/* === Histogram === */
.histogram-section { margin-bottom: 1rem; }
.histogram-title { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.histogram { display: flex; align-items: flex-end; gap: 2px; height: 60px; margin: 0.5rem 0; padding: 0 4px; }
.histogram-bar {
  flex: 1;
  background: var(--gradient-brand);
  border-radius: 3px 3px 0 0;
  min-width: 8px;
  position: relative;
  opacity: 0.55;
  transition: all var(--duration) var(--ease);
}
.histogram-bar:hover { opacity: 1; transform: scaleY(1.05); transform-origin: bottom; }
.histogram-bar .hb-tooltip {
  display: none;
  position: absolute;
  bottom: 100%; left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--text-inverse);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  white-space: nowrap;
  z-index: 10;
}
.histogram-bar:hover .hb-tooltip { display: block; }
.histogram-labels { display: flex; justify-content: space-between; font-size: 0.65rem; color: var(--text-secondary); margin-bottom: 0.5rem; }

/* === Trend Chart === */
.trend-section { margin-bottom: 1.25rem; }
.trend-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.25rem; }
.trend-title { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.trend-change { font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; gap: 0.35rem; }
.trend-period { font-size: 0.65rem; font-weight: 400; color: var(--text-secondary); }
.trend-legend { display: flex; gap: 1rem; margin-bottom: 0.5rem; font-size: 0.65rem; color: var(--text-secondary); }
.trend-leg-item { display: flex; align-items: center; gap: 4px; }
.trend-leg-line { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.trend-leg-median { background: var(--accent); }
.trend-leg-avg { background: var(--text-secondary); opacity: 0.5; }
.trend-chart-wrap { display: flex; gap: 0; position: relative; }
.trend-y-axis { width: 42px; position: relative; flex-shrink: 0; }
.trend-y-label { position: absolute; right: 4px; font-size: 0.6rem; color: var(--text-secondary); transform: translateY(50%); white-space: nowrap; }
.trend-chart { position: relative; flex: 1; height: 140px; border-left: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); margin-bottom: 22px; }
.trend-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.trend-line-median { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.trend-line-avg { fill: none; stroke: var(--text-secondary); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: 0.4; }
.trend-dots { position: absolute; inset: 0; }
.trend-dot {
    position: absolute; width: 10px; height: 10px;
    background: var(--accent); border: 2px solid var(--surface);
    border-radius: 50%; transform: translate(-50%, -50%);
    cursor: pointer; z-index: 2;
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.trend-dot:hover { transform: translate(-50%, -50%) scale(1.4); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); }
.trend-tooltip {
    display: none; position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%); background: var(--text); color: var(--text-inverse);
    padding: 4px 10px; border-radius: 6px; font-size: 0.7rem;
    white-space: nowrap; z-index: 10; line-height: 1.4; text-align: center;
}
.trend-dot:hover .trend-tooltip { display: block; }
.trend-x-labels { position: absolute; bottom: -20px; left: 0; right: 0; display: flex; justify-content: space-between; pointer-events: none; }
.trend-x-labels span { position: absolute; transform: translateX(-50%); font-size: 0.6rem; color: var(--text-secondary); }

/* === Region Comparison === */
.region-section { margin-bottom: 1.25rem; }
.region-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.25rem; }
.region-title { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.region-count { font-size: 0.65rem; color: var(--text-secondary); }
.region-median-line { font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.region-median-line strong { color: var(--text); }
.region-bars { display: flex; flex-direction: column; gap: 3px; }
.region-row { display: grid; grid-template-columns: 130px 1fr 36px; gap: 6px; align-items: center; padding: 3px 0; border-radius: 4px; transition: background var(--duration) var(--ease); }
.region-row:hover { background: var(--bg-hover, #f8fafc); }
.region-selected { background: #eff6ff !important; border-left: 3px solid var(--primary); padding-left: 6px; }
.region-name { font-size: 0.7rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-bar-wrap { display: flex; align-items: center; gap: 6px; height: 18px; }
.region-bar { height: 100%; border-radius: 3px; min-width: 4px; transition: width 0.4s var(--ease); }
.region-bar-high { background: linear-gradient(90deg, #3b82f6, #2563eb); opacity: 0.7; }
.region-bar-low { background: linear-gradient(90deg, #93c5fd, #60a5fa); opacity: 0.6; }
.region-val { font-size: 0.68rem; color: var(--text); white-space: nowrap; font-weight: 500; }
.region-cnt { font-size: 0.6rem; color: var(--text-secondary); text-align: right; }
.region-more { font-size: 0.65rem; color: var(--text-secondary); padding: 4px 0; font-style: italic; }

/* === Detail Items Grid === */
.detail-items { display: flex; flex-direction: column; gap: 0; }
.detail-item {
  display: grid;
  grid-template-columns: 7rem 5rem 5.5rem 1fr;
  gap: 0 0.75rem;
  align-items: start;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--duration) var(--ease);
  font-size: 0.82rem;
}
.detail-item:hover { background: var(--primary-50); }
.detail-item:last-child { border-bottom: none; }
.detail-item:nth-child(even) { background: var(--bg-elevated); }
.detail-item:nth-child(even):hover { background: var(--primary-50); }

/* Price column */
.di-price {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: -0.01em;
  padding-top: 1px;
}
.di-price .currency { font-weight: 400; color: var(--text-muted); font-size: 0.75rem; margin-left: 2px; }

/* Qty + Total numeric columns */
.di-nums {
  display: flex;
  flex-direction: column;
  gap: 1px;
  grid-column: 2 / 4;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  padding-top: 2px;
}
.di-qty, .di-total {
  white-space: nowrap;
  color: var(--text-secondary);
}
.di-qty::before { content: 'К: '; font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.di-total::before { content: 'Σ '; font-size: 0.72rem; color: var(--text-muted); }

/* Partial data tag (unit price only, no qty/total) */
.di-tag-partial {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0;
  font-family: inherit;
  letter-spacing: 0.01em;
}
.di-partial { opacity: 0.88; }
.di-partial:hover { opacity: 1; }

/* Info column */
.di-info { min-width: 0; }
.di-company {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
.di-company .company-link {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}
.di-company .company-link:hover {
  text-decoration: underline;
  color: var(--primary-dark, #1e40af);
}
.di-object {
  color: var(--text-secondary);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
  margin-top: 1px;
  font-style: italic;
}
.di-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}
.di-meta .di-muni {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.di-meta .di-sep { color: var(--border); }
.di-proc-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--primary) !important;
  opacity: 0.65;
  white-space: nowrap;
  transition: opacity var(--duration) var(--ease);
}
.di-proc-link:hover { opacity: 1; }

/* Sort controls row */
.detail-sort-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 2px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sort-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-size: 0.68rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all var(--duration) var(--ease);
}
.sort-btn:hover { background: var(--surface); border-color: var(--border); color: var(--primary); }
.sort-btn.active {
  background: var(--primary-50);
  border-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(37,99,235,0.12);
}

/* Items container */
.detail-items-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* Column header row for context */
.detail-col-headers {
  display: grid;
  grid-template-columns: 7rem 10.5rem 1fr;
  gap: 0 0.75rem;
  padding: 0 1rem;
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  line-height: 2rem;
}


/* === Detail Pagination === */
.detail-pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; font-size: 0.8rem; color: var(--text-secondary); padding: 0.5rem 0; }
.detail-pagination button {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all var(--duration) var(--ease);
}
.detail-pagination button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); box-shadow: 0 2px 6px rgba(37,99,235,0.15); }
.detail-pagination button:disabled { opacity: 0.4; cursor: default; box-shadow: none; }

/* === Similar Items === */
.similar-section { margin-top: 1rem; }
.similar-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; margin-bottom: 0.4rem; }
.similar-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.similar-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 5px 12px; border-radius: 6px;
    background: #f1f5f9; border: 1px solid transparent;
    font-size: 0.75rem; color: var(--text-primary);
    cursor: pointer; transition: all var(--duration) var(--ease);
    white-space: nowrap; font-family: inherit;
}
.similar-chip:hover { background: #dbeafe; color: var(--primary); }
.sc-desc { font-weight: 500; }
.sc-price { color: var(--text-muted); font-size: 0.7rem; }

/* === Year Slider === */
.year-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  padding: 0.625rem 1rem;
  background: var(--primary-50);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
  border: 1px solid var(--primary-light);
}
.year-filter label { font-weight: 600; white-space: nowrap; color: var(--text); }
.year-range-track { position: relative; flex: 1; height: 6px; background: #cbd5e1; border-radius: 3px; min-width: 120px; }
.year-range-fill { position: absolute; height: 100%; background: var(--primary); border-radius: 3px; }
.year-filter input[type=range] { position: absolute; top: -6px; width: 100%; height: 18px; -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none; margin: 0; }
.year-filter input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 2px solid var(--text-inverse); box-shadow: 0 1px 4px rgba(0,0,0,0.3); cursor: pointer; pointer-events: auto; }
.year-filter input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 2px solid var(--text-inverse); box-shadow: 0 1px 4px rgba(0,0,0,0.3); cursor: pointer; pointer-events: auto; }
.year-val { font-weight: 700; color: var(--primary); min-width: 32px; text-align: center; }
.year-reset { font-size: 0.7rem; padding: 2px 8px; border: 1px solid var(--text-muted); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; transition: all var(--duration) var(--ease); }
.year-reset:hover { border-color: var(--danger); color: var(--danger); }

/* === Price Range Bar === */
.price-range { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; min-width: 160px; }
.price-range-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; position: relative; min-width: 50px; overflow: hidden; }
.price-range-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--success), #3b82f6, var(--orange)); }
.price-range .min { color: var(--success); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-range .max { color: var(--orange); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* === Count Badge === */
.count-badge {
  background: var(--primary);
  color: var(--text-inverse);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* === Table Wrapper === */
.table-wrapper { overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); box-shadow: var(--shadow-card); }

/* === Generic Data Table === */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); }
.data-table th {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, #eef2f7 100%);
  padding: 0.8rem 0.75rem;
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--duration) var(--ease);
  letter-spacing: 0.01em;
}
.data-table th:hover { color: var(--primary); }
.data-table th.sorted { color: var(--primary); }
.data-table th .arrow { font-size: 0.7rem; margin-left: 3px; }
.data-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border-light); font-size: 0.85rem; transition: background var(--duration) var(--ease); }
.data-table tr:hover td { background: var(--primary-50); }
.data-table tr.group-row:hover td { background: var(--primary-50); }

/* === Municipality Tags === */
.muni-tags { display: flex; flex-wrap: wrap; gap: 3px; max-width: 320px; }
.muni-tag { background: var(--bg-elevated); color: var(--text-secondary); padding: 2px 7px; border-radius: var(--radius-sm); font-size: 0.72rem; white-space: normal; word-break: break-word; border: 1px solid var(--border); line-height: 1.3; max-width: 300px; }
.muni-tag.more { background: var(--primary-50); color: var(--primary-dark); border-color: var(--primary-light); cursor: default; white-space: nowrap; }

/* === Contract Type Tags === */
.type-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.type-tag { padding: 1px 6px; border-radius: var(--radius-sm); font-size: 0.7rem; white-space: nowrap; }

/* === Entity Detail Panel === */
.entity-detail { padding: 1rem 1.25rem; }
.entity-detail .card-list { max-height: 500px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.entity-detail .card-list::-webkit-scrollbar { width: 6px; }
.entity-detail .card-list::-webkit-scrollbar-track { background: transparent; }
.entity-detail .card-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.entity-detail .card-list::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.entity-detail .card { padding: 0.75rem 1rem; margin-bottom: 0.5rem; }
.load-more-btn { display: block; width: 100%; margin: 0.75rem 0 0.25rem; padding: 0.6rem 1rem; background: linear-gradient(135deg, #1e293b, #334155); color: #e2e8f0; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.85rem; font-weight: 500; transition: all 0.2s ease; }
.load-more-btn:hover { background: linear-gradient(135deg, #334155, #475569); border-color: var(--brand); color: #fff; }

/* === Footer === */
.footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--text-muted);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.8125rem;
  margin-top: auto;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-brand);
}
.footer-brand { font-size: 1.25rem; color: rgba(255,255,255,0.9); margin-bottom: 0.75rem; letter-spacing: -0.01em; }
.footer-brand strong { font-weight: 800; color: #93c5fd; }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 1rem; flex-wrap: wrap; }
.footer-links a {
  color: rgba(255,255,255,0.45);
  font-size: 0.8125rem;
  transition: all var(--duration) var(--ease);
  position: relative;
}
.footer-links a:hover { color: rgba(255,255,255,0.9); text-decoration: none; }
.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: #93c5fd;
  transform: scaleX(0);
  transition: transform var(--duration) var(--ease);
}
.footer-links a:hover::after { transform: scaleX(1); }
.footer a { color: var(--primary-light); }
.footer a:hover { color: var(--text-inverse); text-decoration: underline; }
.footer-copy { margin-top: 0.375rem; color: rgba(255,255,255,0.3); font-size: 0.75rem; }

/* === Section Header with Link === */
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-header h2 { margin-bottom: 0; }
.section-link { font-size: 0.875rem; font-weight: 600; color: var(--primary); white-space: nowrap; }
.section-link:hover { color: var(--primary-dark); text-decoration: underline; }

