
:root {
  --bg-dark: #07090e;
  --bg-card: rgba(16, 20, 31, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-card-hover: rgba(25, 31, 48, 0.85);
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);
  --accent-purple: #a855f7;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}
.ambient-glow {
  position: absolute; border-radius: 50%;
  filter: blur(120px); pointer-events: none; z-index: 0;
}
.glow-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18), transparent 70%);
  top: -100px; left: 10%;
}
.glow-2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.14), transparent 70%);
  bottom: 0px; right: 5%;
}
.top-nav {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 4%; background: rgba(7, 9, 14, 0.8);
  backdrop-filter: blur(16px); border-bottom: 1px solid var(--bg-card-border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  display: flex; align-items: center; gap: 8px;
  background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; color: var(--primary-light);
}
.pulse-dot {
  width: 7px; height: 7px; background: var(--primary);
  border-radius: 50%; box-shadow: 0 0 10px var(--primary);
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}
.brand-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-main); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-link { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-link:hover { color: var(--text-main); }
.btn-github {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--bg-card-border);
  color: var(--text-main); padding: 6px 14px; border-radius: 8px;
  text-decoration: none; font-size: 0.85rem; font-weight: 600; transition: all 0.2s;
}
.btn-github:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }

.app-layout {
  position: relative; z-index: 5; flex: 1;
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px;
  max-width: 1400px; width: 100%; margin: 0 auto; padding: 32px 4%;
}
@media (max-width: 960px) { .app-layout { grid-template-columns: 1fr; } }

.assistant-card {
  background: var(--bg-card); backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border); border-radius: var(--radius-lg);
  padding: 36px 30px; display: flex; flex-direction: column;
  align-items: center; text-align: center; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.assistant-status {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--bg-card-border);
  padding: 5px 14px; border-radius: 20px; font-size: 0.8rem;
  color: var(--text-muted); margin-bottom: 24px;
}
.status-indicator {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 8px var(--success);
}
.status-indicator.listening {
  background: var(--accent-cyan); box-shadow: 0 0 12px var(--accent-cyan);
  animation: pulse-ring 1s infinite;
}
.status-indicator.speaking {
  background: var(--primary); box-shadow: 0 0 12px var(--primary);
  animation: pulse-ring 0.8s infinite;
}

.orb-container {
  position: relative; width: 160px; height: 160px;
  margin: 10px auto 26px auto; display: flex;
  align-items: center; justify-content: center;
}
.orb-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(99, 102, 241, 0.2); transition: all 0.4s ease; }
.ring-1 { width: 140px; height: 140px; }
.ring-2 { width: 160px; height: 160px; border-color: rgba(6, 182, 212, 0.15); }
.ring-3 { width: 180px; height: 180px; border-color: rgba(168, 85, 247, 0.1); }
.core-orb {
  position: relative; width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #818cf8, #4f46e5 60%, #312e81);
  box-shadow: 0 0 35px var(--primary-glow); display: flex;
  align-items: center; justify-content: center; color: #fff;
  cursor: pointer; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.core-orb:hover { transform: scale(1.06); box-shadow: 0 0 50px rgba(99, 102, 241, 0.6); }
.core-orb.listening {
  background: radial-gradient(circle at 35% 35%, #38bdf8, #0284c7 60%, #0369a1);
  box-shadow: 0 0 55px var(--accent-cyan-glow); transform: scale(1.12);
  animation: orb-breathe 1.8s infinite ease-in-out;
}
.core-orb.speaking {
  background: radial-gradient(circle at 35% 35%, #c084fc, #9333ea 60%, #581c87);
  box-shadow: 0 0 55px rgba(168, 85, 247, 0.5); animation: orb-speak 1.2s infinite ease-in-out;
}
@keyframes orb-breathe {
  0% { transform: scale(1.08); box-shadow: 0 0 35px var(--accent-cyan-glow); }
  50% { transform: scale(1.18); box-shadow: 0 0 65px var(--accent-cyan-glow); }
  100% { transform: scale(1.08); box-shadow: 0 0 35px var(--accent-cyan-glow); }
}
@keyframes orb-speak {
  0% { transform: scale(1.05); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1.05); }
}
.mic-icon { width: 36px; height: 36px; max-width: 36px; max-height: 36px; }

.voice-title { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.voice-subtitle { font-size: 0.95rem; color: var(--text-muted); max-width: 380px; margin-bottom: 24px; }

.controls-row {
  display: flex; gap: 12px; width: 100%; max-width: 360px; margin-bottom: 22px;
}
.btn-voice {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: white; border: none; border-radius: var(--radius-md);
  padding: 14px 24px; font-size: 1rem; font-weight: 700;
  cursor: pointer; box-shadow: 0 10px 25px var(--primary-glow); transition: all 0.25s;
}
.btn-voice:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(99, 102, 241, 0.5); }
.btn-voice.active {
  background: linear-gradient(135deg, var(--danger), #b91c1c);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
}
.voice-btn-svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-sound {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--bg-card-border);
  color: var(--text-main); border-radius: var(--radius-md);
  padding: 0 16px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.btn-sound:hover { background: rgba(255, 255, 255, 0.1); }
.btn-sound svg { width: 20px; height: 20px; stroke: #c7d2fe; }

.quick-prompts { width: 100%; margin-bottom: 22px; }
.prompts-label {
  display: block; font-size: 0.75rem; color: var(--text-dim);
  text-transform: uppercase; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 8px;
}
.prompt-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--bg-card-border);
  color: var(--text-muted); font-size: 0.78rem; padding: 6px 12px;
  border-radius: 16px; cursor: pointer; transition: all 0.2s;
}
.chip:hover {
  background: rgba(99, 102, 241, 0.15); border-color: rgba(99, 102, 241, 0.3);
  color: var(--primary-light);
}

.dialogue-box {
  width: 100%; background: rgba(10, 14, 23, 0.8); border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md); padding: 16px; text-align: left; margin-bottom: 18px;
  min-height: 120px; display: flex; flex-direction: column; gap: 12px;
}
.dialogue-line { display: flex; gap: 8px; font-size: 0.88rem; line-height: 1.5; }
.speaker-tag {
  font-weight: 700; font-family: var(--font-mono); font-size: 0.8rem;
  padding: 2px 6px; border-radius: 4px; height: fit-content;
}
.user-line .speaker-tag { color: var(--accent-cyan); background: rgba(6, 182, 212, 0.12); }
.luna-line .speaker-tag { color: var(--primary-light); background: rgba(99, 102, 241, 0.12); }
.dialogue-content { color: var(--text-main); flex: 1; }

.text-input-form { display: flex; width: 100%; gap: 8px; }
.text-input-form input {
  flex: 1; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--bg-card-border);
  color: var(--text-main); border-radius: var(--radius-md); padding: 12px 16px; font-size: 0.9rem;
  outline: none; transition: border-color 0.2s;
}
.text-input-form input:focus { border-color: var(--primary); }
.btn-send {
  background: var(--primary); border: none; color: white;
  border-radius: var(--radius-md); width: 48px; display: flex;
  align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s;
}
.btn-send:hover { background: var(--primary-light); }

.dashboard-panel { display: flex; flex-direction: column; gap: 20px; }
.summary-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.summary-card {
  background: var(--bg-card); backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border); border-radius: var(--radius-md);
  padding: 20px; display: flex; flex-direction: column; gap: 6px;
}
.card-caption {
  font-size: 0.78rem; text-transform: uppercase; color: var(--text-dim);
  font-weight: 700; letter-spacing: 0.05em;
}
.card-metric {
  font-size: 2rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.02em;
}
.card-sub { font-size: 0.8rem; color: var(--text-muted); }

/* Redesigned Architecture Card */
.status-card { display: flex; flex-direction: column; justify-content: space-between; }
.arch-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 700; color: #34d399;
  background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px; border-radius: 12px;
}
.live-dot {
  width: 6px; height: 6px; background: #10b981; border-radius: 50%;
  box-shadow: 0 0 8px #10b981; animation: pulse-ring 2s infinite;
}
.arch-title-wrap { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 6px 0; }
.arch-title-main { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; color: #ffffff; }
.arch-plus { font-size: 1.1rem; color: #818cf8; font-weight: 700; }
.arch-title-mcp {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent-cyan), #38bdf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.arch-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.arch-chip {
  font-size: 0.7rem; font-family: var(--font-mono); color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 7px; border-radius: 4px;
}

.table-card {
  background: var(--bg-card); backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border); border-radius: var(--radius-lg);
  padding: 24px; flex: 1; display: flex; flex-direction: column;
}
.table-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.table-header h2 { font-size: 1.2rem; font-weight: 700; }
.btn-refresh {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--bg-card-border);
  color: var(--text-muted); border-radius: 8px; padding: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.btn-refresh:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.1); }
.expenses-table-wrapper { overflow-x: auto; flex: 1; }
.expenses-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.88rem; }
.expenses-table th {
  color: var(--text-dim); font-weight: 600; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 10px 14px; border-bottom: 1px solid var(--bg-card-border);
}
.expenses-table td { padding: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); vertical-align: middle; }
.category-tag {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.cat-meals { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.cat-travel { background: rgba(6, 182, 212, 0.15); color: #38bdf8; }
.cat-lodging { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.cat-entertainment { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.cat-training { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.cat-education { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; }
.cat-office_supplies { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.cat-gifts { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.cat-other { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.expense-amount { font-family: var(--font-mono); font-weight: 700; color: var(--text-main); }
.btn-del { background: transparent; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; transition: color 0.2s; }
.btn-del:hover { color: var(--danger); }
.app-footer {
  text-align: center; padding: 20px; font-size: 0.8rem;
  color: var(--text-dim); border-top: 1px solid var(--bg-card-border);
  background: rgba(7, 9, 14, 0.8); position: relative; z-index: 5;
}
.app-footer a { color: var(--primary-light); text-decoration: none; }
.app-footer a:hover { text-decoration: underline; }
