.country-panel {
  position: fixed;
  top: 0; right: 0;
  width: 480px; max-width: 100vw; height: 100vh;
  background: #0f172a; color: #e2e8f0;
  box-shadow: -4px 0 24px rgba(0,0,0,.5);
  z-index: 9000;
  display: flex; flex-direction: column;
  font-family: system-ui, -apple-system, sans-serif;
  transform: translateX(100%);
  transition: transform .2s ease-out;
}
.country-panel:not(.hidden) { transform: translateX(0); }
.country-panel.hidden { pointer-events: none; }

.cp-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid #1e293b;
}
.cp-header h2 { margin: 0; font-size: 18px; font-weight: 600; }
#cp-close {
  background: none; border: none; color: #94a3b8; font-size: 24px;
  cursor: pointer; padding: 0 8px;
}
#cp-close:hover { color: #f1f5f9; }

.cp-tabs { display: flex; border-bottom: 1px solid #1e293b; }
.cp-tab {
  flex: 1; background: none; border: none; color: #94a3b8;
  padding: 10px 6px; cursor: pointer; font-size: 12px;
  border-bottom: 2px solid transparent;
}
.cp-tab.active { color: #f1f5f9; border-bottom-color: #38bdf8; }
.cp-tab:hover { color: #cbd5e1; }

.cp-pane { display: none; flex: 1; overflow-y: auto; padding: 16px; }
.cp-pane.active { display: block; }

.cp-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #64748b; margin-bottom: 12px;
}
#cp-regenerate {
  background: #1e293b; border: 1px solid #334155; color: #e2e8f0;
  padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 12px;
}
#cp-regenerate:hover { background: #334155; }
#cp-regenerate:disabled { opacity: .4; cursor: not-allowed; }

.cp-markdown { font-size: 14px; line-height: 1.6; }
.cp-markdown h1 { font-size: 18px; margin: 0 0 12px; }
.cp-markdown h2 { font-size: 15px; margin: 16px 0 8px; color: #38bdf8; }
.cp-markdown h3 { font-size: 13px; margin: 12px 0 6px; }
.cp-markdown ul { padding-left: 20px; }
.cp-markdown a { color: #38bdf8; }

.cp-summary {
  background: #1e293b; padding: 10px; border-radius: 6px; margin-bottom: 12px;
  font-size: 13px;
}
.cp-events { list-style: none; padding: 0; margin: 0; }
.cp-events li {
  padding: 8px 0; border-bottom: 1px solid #1e293b; font-size: 13px;
}
.cp-events .cp-ev-source { color: #64748b; font-size: 11px; }

.cp-chat-history {
  flex: 1; overflow-y: auto; min-height: 200px; max-height: 60vh;
  margin-bottom: 12px; font-size: 13px; line-height: 1.5;
}
.cp-chat-msg { padding: 8px 10px; border-radius: 6px; margin-bottom: 8px; }
.cp-chat-msg.user { background: #1e293b; }
.cp-chat-msg.assistant { background: #0c1322; border-left: 3px solid #38bdf8; }
.cp-chat-form { display: flex; gap: 8px; }
.cp-chat-form textarea {
  flex: 1; background: #1e293b; border: 1px solid #334155; color: #e2e8f0;
  padding: 6px 10px; border-radius: 4px; font-family: inherit; resize: vertical;
}
.cp-chat-form button {
  background: #38bdf8; color: #0f172a; border: none;
  padding: 6px 14px; border-radius: 4px; cursor: pointer; font-weight: 600;
}
.cp-chat-form button:disabled { opacity: .5; }

.cp-ind {
  padding: 10px 0;
  border-bottom: 1px solid #1e293b;
}
.cp-ind-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.cp-ind-value {
  font-size: 16px;
  color: #f1f5f9;
  font-weight: 600;
}
.cp-ind-unit {
  font-size: 11px;
  color: #64748b;
  font-weight: normal;
  margin-left: 4px;
}
.cp-ind-period {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
