/* ═══════════════════════════════════════════════════════════════
   Graphify — Knowledge Graph Builder Dashboard Styles
   ═══════════════════════════════════════════════════════════════ */

#page-graphify .graphify-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 16px;
}
#page-graphify .status-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
#page-graphify .state-idle    { background: #2a2a2a; color: #aaa; }
#page-graphify .state-running { background: #2c3a55; color: #9bd; animation: graphify-pulse 1.5s ease-in-out infinite; }
#page-graphify .state-ok      { background: #1f3a26; color: #6c6; }
#page-graphify .state-error   { background: #4a1f1f; color: #f88; }

@keyframes graphify-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

#page-graphify .graphify-meta {
  font-size: 12px;
  color: #888;
}

#page-graphify .graphify-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  height: calc(100vh - 220px);
}
#page-graphify .graphify-graph {
  position: relative;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
}
#page-graphify #graphify-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
#page-graphify .empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #888;
  font-size: 14px;
}
#page-graphify .empty-state code {
  background: rgba(168,85,247,0.15);
  color: #c4a5f7;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}
#page-graphify .graphify-report {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
}
#page-graphify .graphify-report h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#page-graphify #graphify-report-content {
  font-size: 13px;
  line-height: 1.6;
  color: #ddd;
}
#page-graphify #graphify-report-content h1,
#page-graphify #graphify-report-content h2,
#page-graphify #graphify-report-content h3 {
  color: #c4a5f7;
  margin-top: 16px;
  margin-bottom: 8px;
}
#page-graphify #graphify-report-content p {
  margin: 8px 0;
}
#page-graphify #graphify-report-content code {
  background: rgba(168,85,247,0.1);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12px;
}
#page-graphify .graphify-log {
  margin-top: 12px;
  background: #0c0c0c;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: #888;
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
}

/* Rebuild button styling */
#page-graphify #graphify-rebuild {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
#page-graphify #graphify-rebuild:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(168,85,247,0.35);
}
#page-graphify #graphify-rebuild:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 900px) {
  #page-graphify .graphify-body { grid-template-columns: 1fr; height: auto; }
  #page-graphify #graphify-iframe { height: 60vh; }
}
