/* components.css — Page-specific component styles */

/* ─── Command Center (Dashboard) ─── */
.cc-section { margin: 26px 0 18px; }
.cc-section h2 {
  font-size: 16px;
  margin: 0 0 16px;
  letter-spacing: .08em;
  
  color: var(--cyan);
  font-weight: 700;
}
.cc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.cc-panel {
  background: linear-gradient(145deg, rgba(11,20,40,.85) 0%, rgba(16,27,51,.5) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(10px);
  transition: border-color .3s;
}
.cc-panel:hover { border-color: var(--line2); }
.cc-panel h3 {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .1em;
  
  color: #fff;
  font-weight: 700;
}
.cc-panel ul { list-style: none; margin: 0; padding: 0; }
.cc-panel li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(28,43,72,.4);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  transition: background .15s;
}
.cc-panel li:last-child { border-bottom: none; }
.cc-panel li:hover { background: rgba(75,231,242,.02); }
.cc-panel li a { color: var(--cyan); font-weight: 600; flex: 1; font-size: 13px; }
.cc-panel li .status { flex-shrink: 0; }
.cc-rec {
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  border-bottom: 1px solid rgba(28,43,72,.3);
}
.cc-rec:last-child { border-bottom: none; }
.cc-rec-label { color: var(--muted); font-size: 13px; }
.cc-rec-value { color: #fff; font-weight: 650; font-size: 13px; }
.cc-log {
  padding: 7px 0;
  color: var(--soft);
  font-size: 13px;
  border-bottom: 1px solid rgba(28,43,72,.3);
  line-height: 1.5;
}
.cc-log:last-child { border-bottom: none; }
.cc-log strong { color: var(--cyan); font-weight: 700; margin-right: 6px; font-size: 12px; }
.cc-decision {
  padding: 9px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  border-bottom: 1px solid rgba(28,43,72,.4);
}
.cc-decision:last-child { border-bottom: none; }
.cc-decision span { flex: 1; color: var(--soft); font-size: 13px; }

/* ─── Filter bar + buttons ─── */
.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.filter-btn, .cat-btn {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .02em;
}
.filter-btn:hover, .cat-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(75,231,242,.04);
}
.filter-btn.active, .cat-btn.active {
  background: rgba(75,231,242,.1);
  border-color: rgba(75,231,242,.35);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(75,231,242,.1);
}

/* ─── Search input ─── */
.search-input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(75,231,242,.1);
}
.search-input::placeholder { color: var(--muted); }

/* Search wrapper with icon */
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-wrap::before {
  content: '⌕';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}
.search-wrap .search-input {
  padding-left: 38px;
}

/* ─── Sort select ─── */
.sort-select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 32px 11px 16px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238ea2c4'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color .2s, box-shadow .2s;
}
.sort-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(75,231,242,.1);
}
.sort-select option { background: var(--panel2); color: var(--text); }

/* ─── Toolbar ─── */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.toolbar .search-input { flex: 1; min-width: 200px; }

/* ─── Muted text ─── */
.muted { color: var(--muted); }

/* ─── Comparison cards ─── */
#cmpResult > div:first-child > div {
  backdrop-filter: blur(10px);
  transition: all .25s;
}
#cmpResult > div:first-child > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}

/* ─── Stagger animation for CC panels ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.cc-panel {
  animation: fadeInUp .4s ease both;
}
.cc-panel:nth-child(1) { animation-delay: .05s; }
.cc-panel:nth-child(2) { animation-delay: .1s; }
.cc-panel:nth-child(3) { animation-delay: .15s; }
.cc-panel:nth-child(4) { animation-delay: .2s; }

/* ─── Code / pre styling ─── */
code {
  background: rgba(75,231,242,.08);
  border: 1px solid rgba(75,231,242,.12);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: .9em;
  color: var(--cyan);
}
pre {
  background: rgba(5,8,20,.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--soft);
}
pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ─── Summary pills (UX Review) ─── */
.cl-summary-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cl-summary-pill {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
}
.cl-summary-pass { background: rgba(37,212,130,.1); border: 1px solid rgba(37,212,130,.25); color: var(--green); }
.cl-summary-fail { background: rgba(255,107,136,.1); border: 1px solid rgba(255,107,136,.25); color: var(--red); }
.cl-summary-warn { background: rgba(255,224,112,.08); border: 1px solid rgba(255,224,112,.2); color: var(--yellow); }
.cl-summary-na { background: rgba(142,162,196,.06); border: 1px solid rgba(142,162,196,.15); color: var(--muted); }

/* ─── Info page styles ─── */
.info-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}
.info-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #fff;
  font-weight: 700;
}
.info-card p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
}

/* ─── Sitemap ─── */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.sitemap-section h3 {
  font-size: 13px;
  color: var(--cyan);
  margin: 0 0 10px;
  
  letter-spacing: .08em;
  font-weight: 700;
}
.sitemap-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sitemap-section li {
  padding: 5px 0;
}
.sitemap-section a {
  color: var(--soft);
  font-size: 13px;
  transition: color .15s;
}
.sitemap-section a:hover { color: var(--cyan); }

/* ─── History page ─── */
.history-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(28,43,72,.4);
  align-items: flex-start;
}
.history-item:last-child { border-bottom: none; }
.history-date {
  color: var(--cyan);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  min-width: 100px;
}
.history-text {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.5;
}

/* ─── Responsive for components ─── */
@media(max-width:840px) {
  .cc-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; }
  .toolbar .search-input { min-width: 100%; }
  .sitemap-grid { grid-template-columns: 1fr; }
}
