/*
 * CivicMind - Community Decision Intelligence Platform
 * Style Sheet - Modern Glassmorphic Slate Theme
 */

/* Root Design Tokens */
:root {
  --bg-app: #090d16;
  --bg-glass: rgba(17, 24, 39, 0.45);
  --bg-glass-active: rgba(31, 41, 55, 0.65);
  --bg-card: rgba(15, 23, 42, 0.5);
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  
  /* Text colors */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  
  /* Accent colors */
  --color-primary: #3b82f6;      /* Blue */
  --color-secondary: #06b6d4;    /* Teal */
  --color-accent: #8b5cf6;       /* Purple */
  --color-success: #10b981;      /* Green */
  --color-warning: #f59e0b;      /* Amber */
  --color-danger: #ef4444;       /* Red */
  
  /* Accent glows */
  --glow-primary: rgba(59, 130, 246, 0.25);
  --glow-accent: rgba(139, 92, 246, 0.25);
  --glow-success: rgba(16, 185, 129, 0.2);
  --glow-danger: rgba(239, 68, 68, 0.25);
  
  /* Fonts */
  --font-header: 'Sora', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-app);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.007) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.007) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Layout Elements */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Navigation */
.sidebar-aside {
  width: 260px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 100;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 24px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.brand-info h2 {
  font-family: var(--font-header);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.brand-info p {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
}

.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.nav-btn i {
  font-size: 16px;
  transition: var(--transition);
}

.nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: var(--text-main);
  background: var(--bg-glass-active);
  border-color: var(--border-glass-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-btn.active i {
  color: var(--color-primary);
  text-shadow: 0 0 8px var(--glow-primary);
}

/* Sidebar Credit */
.sidebar-credit {
  margin-top: auto;
}

.credit-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 12px;
  transition: var(--transition);
}

.credit-card:hover {
  border-color: var(--border-glass-hover);
  background: rgba(255, 255, 255, 0.04);
}

.avatar-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  overflow: hidden;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.credit-details {
  display: flex;
  flex-direction: column;
}

.developer-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.developer-name {
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.developer-name:hover {
  color: var(--color-primary);
}

.developer-title {
  font-size: 11px;
  color: var(--text-dark);
}

/* Main Content Section */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 24px 32px;
  min-height: 100vh;
}

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

.header-left h1 {
  font-family: var(--font-header);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header-left p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Custom Dropdown select */
.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.glass-select {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 8px 36px 8px 16px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: var(--transition);
}

.glass-select:hover {
  border-color: var(--border-glass-hover);
}

.glass-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--glow-primary);
}

.select-arrow {
  position: absolute;
  right: 12px;
  pointer-events: none;
  font-size: 11px;
  color: var(--text-muted);
}

/* Status Alert Ribbon */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #fca5a5;
}

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

.pulse-dot.red {
  background-color: var(--color-danger);
  box-shadow: 0 0 8px var(--color-danger);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; transform: scale(1.15); }
}

.header-clock {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 8px 12px;
  border-radius: 10px;
}

/* Panels active/inactive states */
.content-panel {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.content-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Layout Utilities */
.grid-layout {
  display: grid;
  gap: 20px;
}

.grid-layout.cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid-layout.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-layout.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-layout.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.col-span-12 { grid-column: span 12 / span 12; }
.col-span-11 { grid-column: span 11 / span 11; }
.col-span-10 { grid-column: span 10 / span 10; }
.col-span-9 { grid-column: span 9 / span 9; }
.col-span-8 { grid-column: span 8 / span 8; }
.col-span-7 { grid-column: span 7 / span 7; }
.col-span-6 { grid-column: span 6 / span 6; }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-1 { grid-column: span 1 / span 1; }


.mb-6 { margin-bottom: 24px; }
.my-4 { margin-top: 16px; margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-auto { margin-top: auto; }
.p-0 { padding: 0 !important; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }

.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-column { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-6 > * + * { margin-top: 24px; }
.gap-2 { gap: 8px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }
.ml-6 { margin-left: 24px; }
.ml-auto { margin-left: auto; }

.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.font-11 { font-size: 11px; }
.font-12 { font-size: 12px; }
.font-13 { font-size: 13px; }
.font-14 { font-size: 14px; }

.text-green { color: var(--color-success); }
.text-orange { color: var(--color-warning); }
.text-red { color: var(--color-danger); }
.text-yellow { color: #facc15; }
.hide { display: none !important; }

/* Glass Cards CSS */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
  transition: var(--transition);
  overflow: hidden;
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.35);
}

.card-label {
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-header {
  display: flex;
  align-items: center;
  width: 100%;
}

.card-hint {
  font-size: 11px;
  color: var(--text-dark);
}

/* Radial Progress (City Score) */
.radial-progress-container {
  position: relative;
  width: 140px;
  height: 140px;
}

.radial-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.radial-svg .progress {
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.radial-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: baseline;
}

.radial-value span:first-child {
  font-family: var(--font-header);
  font-size: 36px;
  font-weight: 800;
  color: var(--text-main);
  text-shadow: 0 0 15px var(--glow-primary);
}

.radial-value .pct-sign {
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 2px;
}

.score-trend-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.score-trend-indicator.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.score-trend-indicator.red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
}

/* Chart Wrapper */
.chart-wrapper {
  position: relative;
  width: 100%;
}

.chart-wrapper.h-200 { height: 180px; }
.chart-wrapper.h-250 { height: 230px; }
.chart-wrapper.h-300 { height: 280px; }

/* Sentiment Meter */
.sentiment-meter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
}

.sentiment-emoji-display {
  font-size: 24px;
  margin-bottom: 2px;
}

.sentiment-percentage {
  font-family: var(--font-header);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.sentiment-tag {
  font-size: 9px;
  color: var(--color-success);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.sentiment-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-lbl {
  font-size: 11px;
  color: var(--text-muted);
  width: 50px;
  text-align: right;
}

.bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.bar-fill.green { background-color: var(--color-success); }
.bar-fill.yellow { background-color: var(--color-warning); }
.bar-fill.red { background-color: var(--color-danger); }

.bar-val {
  font-size: 11px;
  color: var(--text-main);
  font-weight: 500;
  width: 30px;
}

/* Alert Info Box */
.alert-box {
  display: flex;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.4;
}

.alert-box.purple {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #d8b4fe;
}

.alert-box.purple i {
  color: var(--color-accent);
}

/* Metric Cards styling */
.metric-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.metric-card.active {
  border-color: var(--color-primary);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 0 20px var(--glow-primary);
}

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

.metric-icon {
  font-size: 18px;
  color: var(--text-muted);
}

.metric-card.active .metric-icon {
  color: var(--color-primary);
}

.metric-trend {
  font-size: 11px;
  font-weight: 600;
}

.metric-body {
  flex: 1;
}

.metric-value {
  font-family: var(--font-header);
  font-size: 26px;
  font-weight: 700;
}

.metric-unit {
  font-size: 11px;
  color: var(--text-dark);
  margin-top: 2px;
  display: block;
}

.metric-footer {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

/* 2. Decision Center Elements */
.agent-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: rgba(255, 255, 255, 0.015);
}

.agent-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  margin-bottom: 12px;
}

.agent-avatar.env {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.agent-avatar.mob {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}

.agent-avatar.cit {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25);
}

.agent-avatar.rec {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.25);
}

.agent-info h4 {
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 600;
}

.agent-info .role {
  font-size: 11px;
  color: var(--text-dark);
  margin-top: 1px;
  margin-bottom: 6px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.green {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge.purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.badge.red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge.orange {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.agent-brief {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 10px;
  margin-bottom: 14px;
  flex: 1;
}

.agent-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-glass);
}

.agent-metric span {
  color: var(--text-dark);
}

.agent-metric strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Recommendations Action lists */
.action-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.action-row {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  transition: var(--transition);
}

.action-row:hover {
  border-color: var(--border-glass-hover);
  background: rgba(255, 255, 255, 0.03);
}

.action-row-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.action-ward {
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.action-conf {
  font-size: 11px;
  color: var(--text-dark);
}

.action-problem {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.recommendations-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.step-item {
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  gap: 8px;
}

.step-arrow {
  color: var(--color-primary);
}

.action-impact-footer {
  display: flex;
  font-size: 11px;
}

.impact-label {
  color: var(--color-success);
  font-weight: 600;
  margin-right: 6px;
}

.impact-desc {
  color: var(--text-muted);
}

/* Small Button Styling */
.small-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.small-btn:hover {
  color: var(--text-main);
  border-color: var(--border-glass-hover);
}

.small-btn.active {
  color: var(--text-main);
  background: var(--bg-glass-active);
  border-color: var(--color-primary);
}

.small-btn.text {
  border: none;
  background: transparent;
  text-decoration: underline;
  padding: 0;
}

.small-btn.text:hover {
  color: var(--color-primary);
}

/* Risk Alerts List in DC */
.risk-queue-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.risk-alert-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-glass);
  transition: var(--transition);
}

.risk-alert-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.risk-alert-emoji {
  font-size: 18px;
  margin-right: 12px;
}

.risk-alert-details {
  flex: 1;
}

.risk-alert-details h5 {
  font-size: 13px;
  font-weight: 600;
}

.risk-alert-details p {
  font-size: 11px;
  color: var(--text-dark);
  margin-top: 1px;
}

/* 3. AI Chat Interface */
.h-calc-header {
  height: calc(100vh - 120px);
}

.chat-pane-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.007);
}

.avatar-ring.small {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
}

.chat-header-details h4 {
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 600;
}

.chat-header-details p {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-messages-box {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  display: flex;
  max-width: 75%;
}

.message.incoming {
  align-self: flex-start;
}

.message.outgoing {
  align-self: flex-end;
}

.message-bubble {
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
}

.incoming .message-bubble {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.outgoing .message-bubble {
  background: linear-gradient(135deg, var(--color-primary), rgba(59, 130, 246, 0.7));
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

/* Markdown structures in chat bubble */
.message-bubble strong {
  font-weight: 600;
}

.message-bubble ul {
  margin-top: 8px;
  margin-bottom: 8px;
  padding-left: 20px;
}

.message-bubble li {
  margin-bottom: 4px;
}

/* Typing indicator */
.typing-indicator-wrapper {
  position: absolute;
  bottom: 74px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  animation: fadeIn 0.3s ease;
}

.typing-text {
  font-size: 11px;
  color: var(--text-muted);
}

.typing-dots {
  display: flex;
  gap: 3px;
}

.typing-dots .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--text-muted);
  animation: typing-dot 1.4s infinite ease-in-out;
}

.typing-dots .dot:nth-child(1) { animation-delay: 0s; }
.typing-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1.15); opacity: 1; }
}

/* Chat Input Bar */
.chat-input-form {
  display: flex;
  padding: 14px 20px;
  border-top: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.15);
  gap: 12px;
}

.chat-input-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  outline: none;
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  transition: var(--transition);
}

.chat-input-form input:focus {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.chat-send-btn {
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px var(--glow-primary);
}

.chat-send-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

/* Suggested prompt items */
.suggested-prompts-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.suggestion-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-glass-hover);
  transform: translateX(2px);
}

.sources-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sources-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.sources-list i {
  color: var(--color-primary);
}

/* 4. What-If Simulator Styling */
.slider-control {
  display: flex;
  flex-direction: column;
}

.slider-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.slider-lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.slider-val {
  font-size: 13px;
  color: var(--color-primary);
  font-family: var(--font-mono);
}

.glass-slider {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.glass-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--glow-primary);
  cursor: pointer;
  transition: var(--transition);
}

.glass-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #2563eb;
}

.slider-hint {
  font-size: 11px;
  color: var(--text-dark);
  margin-top: 6px;
  line-height: 1.3;
}

.primary-btn {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.bg-slate-800-glass {
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid var(--border-glass);
}

.sim-score-ring {
  font-family: var(--font-header);
  font-size: 40px;
  font-weight: 800;
  color: var(--text-main);
  text-shadow: 0 0 15px var(--glow-primary);
  margin-top: 4px;
}

.sim-score-ring .sub {
  font-size: 16px;
}

/* Simulated outcome values indicators */
.sim-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.01);
  border-radius: 8px;
  border: 1px solid var(--border-glass);
}

.sim-m-label {
  font-size: 12px;
  font-weight: 500;
}

.sim-m-compare {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100px;
}

.sim-m-compare .old {
  color: var(--text-dark);
  text-decoration: line-through;
}

.sim-m-compare .arrow {
  color: var(--text-muted);
}

.sim-m-compare .new {
  font-weight: 600;
}

/* 5. Predictive Analytics */
.info-block label {
  font-size: 11px;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.progress-bar-wrapper {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  height: 20px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 10px;
  color: white;
  font-weight: 600;
  border-radius: 6px;
}

.bullet-list {
  padding-left: 18px;
  list-style: disc;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.bullet-list li {
  margin-bottom: 4px;
}

.factor-card {
  transition: var(--transition);
}

.factor-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
}

.factor-val {
  font-family: var(--font-header);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.factor-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.factor-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Animations pulse */
.animate-pulse-glow {
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.8; box-shadow: 0 0 10px rgba(59, 130, 246, 0.2); }
  50% { opacity: 1; box-shadow: 0 0 20px rgba(59, 130, 246, 0.6); }
}

/* Citizen Portal Forms & UI */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.glass-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  outline: none;
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.glass-input:focus {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.glass-textarea {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  resize: none;
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.glass-textarea:focus {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid var(--border-glass);
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  flex: 1;
  transition: var(--transition);
}

.radio-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--text-dark);
  border-radius: 50%;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
}

.radio-label input[type="radio"]:checked {
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: 0 0 6px var(--glow-primary);
}

.radio-label:hover {
  border-color: var(--border-glass-hover);
  color: var(--text-main);
}

.radio-label.selected {
  border-color: var(--color-primary);
  color: var(--text-main);
  background: rgba(59, 130, 246, 0.05);
}

.w-full {
  width: 100% !important;
}

.complaints-scroll-box {
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 6px;
}

.complaints-scroll-box::-webkit-scrollbar {
  width: 4px;
}

.complaints-scroll-box::-webkit-scrollbar-track {
  background: transparent;
}

.complaints-scroll-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.complaints-scroll-box::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.complaint-log-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px 16px 16px 20px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.complaint-log-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-color, var(--color-primary));
  box-shadow: 0 0 8px var(--accent-color, var(--color-primary));
  opacity: 0.8;
}

.complaint-log-item:hover {
  border-color: var(--border-glass-hover);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}


.comp-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comp-log-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-dark);
}

.comp-log-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 4px;
}

.comp-log-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.comp-log-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  margin-top: 4px;
}

.comp-log-dept {
  color: var(--text-dark);
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-success);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 15px rgba(16,185,129,0.2);
  color: var(--text-main);
  padding: 14px 20px;
  border-radius: 12px;
  z-index: 1000;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInToast {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
