@import "@picocss/pico";

/* Force dark theme */
:root {
  color-scheme: dark;
  --pico-primary: #667eea;
  --pico-primary-hover: #7b8ff0;
  --pico-primary-focus: rgba(102, 126, 234, 0.25);
  --pico-primary-inverse: #fff;
}

/* Gradient header */
.gradient-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1.25rem 1.5rem;
}
.gradient-header h1 {
  color: #fff;
  margin: 0;
  font-size: 1.5rem;
}
.gradient-header p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* Make article cards clickable-looking */
article.card {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
article.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
article.card.selected {
  border-color: var(--pico-primary);
  box-shadow: 0 0 0 3px var(--pico-primary-focus);
}

/* Badge */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}
.badge-primary {
  background: rgba(102, 126, 234, 0.15);
  color: var(--pico-primary);
}
.badge-success {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
}
.badge-error {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
}
.badge-warning {
  background: rgba(210, 153, 34, 0.15);
  color: #d29922;
}

/* Status dots */
.status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}
.status-dot.success { background: #3fb950; }
.status-dot.error { background: #f85149; }
.status-dot.warning { background: #d29922; }

/* Slide panel */
.slide-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 40;
}

.slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  background: var(--pico-card-background-color);
  border-left: 1px solid var(--pico-muted-border-color);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  z-index: 50;
  display: flex;
  flex-direction: column;
  animation: slide-in 0.2s ease-out;
}
.slide-panel.width-md { width: 400px; }
.slide-panel.width-lg { width: 500px; }
.slide-panel.width-xl { width: 600px; }

.slide-panel-header {
  flex-shrink: 0;
  padding: 1.25rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.slide-panel-header h2 { margin: 0; font-size: 1.125rem; }
.slide-panel-header p { margin: 0.25rem 0 0; font-size: 0.875rem; opacity: 0.7; }

.slide-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

/* Nav tabs - horizontal list styled as tabs */
nav.tabs {
  border-bottom: 2px solid var(--pico-muted-border-color);
  padding: 0 1rem;
}
nav.tabs ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
nav.tabs li {
  margin: 0;
  padding: 0;
}
nav.tabs button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  color: var(--pico-muted-color);
  cursor: pointer;
}
nav.tabs button:hover {
  color: var(--pico-color);
}
nav.tabs button.active {
  color: var(--pico-primary);
  border-bottom-color: var(--pico-primary);
}

/* Inner tabs (inside slide panel) */
.inner-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
  margin-bottom: 1.5rem;
}
.inner-tabs button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pico-muted-color);
  cursor: pointer;
}
.inner-tabs button.active {
  color: var(--pico-primary);
  border-bottom-color: var(--pico-primary);
}

/* Section divider with label */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-divider h2 {
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
}
.section-divider .line {
  flex: 1;
  height: 1px;
  background: var(--pico-muted-border-color);
}

/* Metrics grid (artifacts) */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.metrics-grid .metric {
  text-align: center;
  padding: 0.75rem;
  border-radius: var(--pico-border-radius);
  border: 1px solid var(--pico-muted-border-color);
}
.metrics-grid .metric .value {
  font-size: 1.25rem;
  font-weight: 700;
}
.metrics-grid .metric .label {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: 0.25rem;
}

/* Agent number circle */
.agent-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.2);
  color: var(--pico-primary);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Utility: muted label */
.muted-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

/* Utility: spaced list */
.spaced > * + * {
  margin-top: 1rem;
}
.spaced-sm > * + * {
  margin-top: 0.5rem;
}

/* Page header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.page-header h1 { margin: 0; }
.page-header p { margin: 0.25rem 0 0; font-size: 0.875rem; opacity: 0.7; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 0;
  opacity: 0.7;
}

/* Keyframes */
@keyframes slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
