:root {
  --bg-primary: #0a0a0a;
  --bg-elevated: #1a1a1a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --accent-teal: #14B8A6;
  --accent-pink: #EC4899;
  --success: #10B981;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  -webkit-font-smoothing: antialiased;
}

@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.4); } 50% { box-shadow: 0 0 0 15px rgba(20, 184, 166, 0); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flowParticle { 0% { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }

.node-active { animation: pulse 2s infinite; border-color: var(--accent-teal) !important; box-shadow: 0 0 20px rgba(20, 184, 166, 0.5); }
.node-processing .spinner { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 24px; height: 24px; border: 3px solid rgba(255, 255, 255, 0.1); border-top-color: var(--accent-teal); border-radius: 50%; animation: spin 1s linear infinite; }
.node-complete { border-color: var(--success) !important; box-shadow: 0 0 15px rgba(16, 185, 129, 0.3); }
.node-inactive { opacity: 0.4; border-color: rgba(255, 255, 255, 0.1) !important; }

.connection-line { stroke: var(--border-color); stroke-width: 2; fill: none; transition: stroke 0.3s ease; }
.connection-line.active { stroke: var(--accent-teal); stroke-width: 3; filter: drop-shadow(0 0 8px rgba(20, 184, 166, 0.3)); }
.particle { r: 4; fill: var(--accent-teal); filter: drop-shadow(0 0 4px var(--accent-teal)); animation: flowParticle 2s ease-in-out infinite; }

.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; transition: all 0.3s ease; }
.btn { padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 500; transition: all 0.2s ease; cursor: pointer; border: none; }
.btn-primary { background: var(--accent-teal); color: white; }
.btn-primary:hover { background: #0D9488; transform: translateY(-1px); }

.metric-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; }
.metric-value { font-size: 1.75rem; font-weight: 700; color: var(--accent-teal); }
.metric-label { font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem; }

.doc-preview { background: var(--bg-elevated); border: 2px dashed var(--border-color); border-radius: 8px; padding: 2rem; min-height: 200px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); }
.doc-preview.active { border-color: var(--accent-teal); background: rgba(20, 184, 166, 0.05); }

.extracted-data { background: var(--bg-elevated); border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; font-family: 'Courier New', monospace; font-size: 0.875rem; }

.text-gradient { background: linear-gradient(135deg, var(--accent-teal), var(--accent-pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.fade-in { animation: fadeIn 0.5s ease; }

@media (max-width: 767px) {
  .node { min-width: 70px; min-height: 70px; }
  .metric-value { font-size: 1.5rem; }
}
