:root {
  --bg-primary: #0a0e17;
  --bg-secondary: rgba(16, 22, 35, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-glow: rgba(0, 242, 254, 0.03);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  
  --color-cyan: #00f2fe;
  --color-blue: #4facfe;
  --color-green: #00f5a0;
  --color-orange: #f5af19;
  --color-red: #ff5e62;
  --color-purple: #b06ab3;
  
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding: 24px;
}

/* Background blur circles */
.bg-blur {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.15;
}

.blur-1 {
  width: 400px;
  height: 400px;
  background: var(--color-cyan);
  top: -100px;
  right: -50px;
}

.blur-2 {
  width: 450px;
  height: 450px;
  background: var(--color-purple);
  bottom: -150px;
  left: -100px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  font-size: 32px;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.4));
}

.app-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.submission-badge {
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.2);
  color: var(--color-green);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
}

/* Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 360px 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Cards styling */
.grid-card {
  background: var(--bg-secondary);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  box-shadow: inset 0 0 20px var(--card-glow), var(--shadow-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-card:hover {
  border-color: rgba(0, 242, 254, 0.2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Badges */
.badge {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.expo-badge {
  background: rgba(79, 172, 254, 0.1);
  color: var(--color-blue);
  border: 1px solid rgba(79, 172, 254, 0.2);
}

.neo4j-badge {
  background: rgba(245, 175, 25, 0.1);
  color: var(--color-orange);
  border: 1px solid rgba(245, 175, 25, 0.2);
}

.sarvam-badge {
  background: rgba(176, 106, 179, 0.1);
  color: var(--color-purple);
  border: 1px solid rgba(176, 106, 179, 0.2);
}

.render-badge {
  background: rgba(0, 245, 160, 0.1);
  color: var(--color-green);
  border: 1px solid rgba(0, 245, 160, 0.2);
}

.base44-badge {
  background: rgba(255, 94, 98, 0.1);
  color: var(--color-red);
  border: 1px solid rgba(255, 94, 98, 0.2);
}

/* Expo Phone Simulator */
.expo-simulator-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-frame {
  width: 100%;
  max-width: 320px;
  height: 580px;
  border: 10px solid #222530;
  border-radius: 36px;
  position: relative;
  background: #0d111d;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.phone-notch {
  width: 130px;
  height: 18px;
  background: #222530;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 10;
}

.phone-screen {
  width: 100%;
  height: 100%;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
}

.mobile-app-header {
  height: 38px;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.connection-dot {
  width: 6px;
  height: 6px;
  background: var(--color-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-green);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.mobile-app-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-app-body::-webkit-scrollbar {
  width: 4px;
}
.mobile-app-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.mobile-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 12px;
}

.mobile-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.mobile-select {
  width: 100%;
  background: #151b26;
  border: 1px solid var(--card-border);
  color: #fff;
  border-radius: 8px;
  padding: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.mobile-input {
  width: 100%;
  background: #151b26;
  border: 1px solid var(--card-border);
  color: #fff;
  border-radius: 8px;
  padding: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
}

.mobile-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  color: #000;
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  margin-top: 10px;
  transition: opacity 0.2s;
}

.mobile-btn:hover {
  opacity: 0.9;
}

.mobile-list {
  list-style: none;
  margin-top: 6px;
}

.mobile-list li {
  font-size: 12px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--color-cyan);
  margin-bottom: 4px;
  border-radius: 0 4px 4px 0;
  display: flex;
  justify-content: space-between;
}

.mobile-list li.symptom-item {
  border-left-color: var(--color-red);
}

.remove-btn {
  background: transparent;
  border: none;
  color: var(--color-red);
  cursor: pointer;
  font-weight: bold;
  font-size: 10px;
}

/* Health summary styling */
.health-summary-panel h4 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
  letter-spacing: 0.5px;
}

/* Sarvam AI Panel */
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.section-title-row h4 {
  font-size: 13px;
  color: #fff;
}

.section-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.voice-presets {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.preset-btn {
  background: rgba(176, 106, 179, 0.15);
  border: 1px solid rgba(176, 106, 179, 0.25);
  color: #d8a0dd;
  font-family: var(--font-sans);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.preset-btn:hover {
  background: rgba(176, 106, 179, 0.25);
}

.voice-input-wrapper {
  display: flex;
  gap: 8px;
}

.mic-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1b1e2a;
  border: 1px solid rgba(176, 106, 179, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
}

.mic-btn.recording {
  background: var(--color-red);
  box-shadow: 0 0 12px var(--color-red);
  animation: pulse-mic 1s infinite alternate;
}

@keyframes pulse-mic {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.mic-icon {
  font-size: 14px;
}

.translation-output {
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 8px;
  font-size: 11px;
  border-left: 2px solid var(--color-purple);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hidden {
  display: none !important;
}

.entities-badge-row {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.entity-badge {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}

.form-row {
  display: flex;
  gap: 8px;
}

.half {
  width: 50% !important;
}

/* Neo4j Graph Visualizer */
.graph-viewer-container {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

#graphSvg {
  background: transparent;
}

.node {
  cursor: pointer;
  transition: filter 0.15s ease;
}

.node:hover {
  filter: brightness(1.2) drop-shadow(0 0 6px rgba(0, 242, 254, 0.6));
}

.node circle {
  stroke-width: 2px;
}

.node text {
  fill: #fff;
  font-size: 11px;
  font-family: var(--font-sans);
  pointer-events: none;
}

.link {
  stroke: rgba(255, 255, 255, 0.15);
  stroke-dasharray: 4, 4;
}

.link.FAMILY {
  stroke: rgba(0, 242, 254, 0.3);
  stroke-dasharray: none;
}

.link.DRUG {
  stroke: rgba(245, 175, 25, 0.3);
}

.link.SYMPTOM {
  stroke: rgba(255, 94, 98, 0.3);
}

.graph-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 12px;
  background: rgba(10, 14, 23, 0.8);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
}

.legend-item {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.patient-dot { background: var(--color-cyan); }
.drug-dot { background: var(--color-orange); }
.symptom-dot { background: var(--color-red); }

/* Cypher Console */
.console-box {
  background: #090c15;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-mono);
}

.console-header {
  background: rgba(255,255,255,0.02);
  padding: 10px 14px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.console-status {
  color: var(--color-green);
  font-weight: bold;
}

.console-body {
  padding: 14px;
  height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.console-line {
  font-size: 11px;
  line-height: 1.4;
  word-break: break-all;
}

.text-cyan { color: var(--color-cyan); }
.font-mono { font-family: var(--font-mono); }

/* Render Workflows styling */
.workflow-control {
  margin-bottom: 16px;
}

.action-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  color: #000;
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.1s;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.15);
}

.action-btn:active {
  transform: scale(0.99);
}

.workflow-status-container {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.status-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 12px;
}

.status-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.running {
  background: rgba(245, 175, 25, 0.2);
  color: var(--color-orange);
}

.status-badge.completed {
  background: rgba(0, 245, 160, 0.2);
  color: var(--color-green);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--color-blue), var(--color-green));
  transition: width 0.3s ease;
}

.progress-percent-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.workflow-log-box h5 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.workflow-logs-body {
  background: #090c15;
  border: 1px solid var(--card-border);
  padding: 10px;
  border-radius: 8px;
  height: 100px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.workflow-logs-body div {
  color: #fff;
  border-left: 2px solid var(--color-green);
  padding-left: 6px;
}

/* Base44 Config */
.base44-details {
  border-top: 1px dashed var(--card-border);
  padding-top: 16px;
  margin-top: 16px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}

.base44-details p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.config-snippet {
  background: #090c15;
  border: 1px solid var(--card-border);
  padding: 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-cyan);
}

/* Alert Notification Banner */
.alert-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1f1315;
  border: 1px solid var(--color-red);
  box-shadow: 0 10px 40px rgba(255, 94, 98, 0.2);
  border-radius: 12px;
  padding: 16px;
  z-index: 100;
  max-width: 400px;
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-icon {
  font-size: 20px;
}

.alert-text {
  font-size: 13px;
  font-weight: 500;
  color: #ffd8d8;
  flex: 1;
}

.alert-close {
  background: transparent;
  border: none;
  color: var(--color-red);
  font-size: 20px;
  cursor: pointer;
}

/* Footer styling */
.app-footer {
  margin-top: 48px;
  border-top: 1px solid var(--card-border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.footer-btn {
  text-decoration: none;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  transition: background 0.2s;
}

.footer-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}

.app-footer p {
  color: var(--text-muted);
  font-size: 12px;
}

@media (max-width: 768px) {
  .app-footer {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
}
