* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0d1117; color: #c9d1d9; min-height: 100vh; }
header { background: #161b22; border-bottom: 1px solid #30363d; padding: 20px 32px; }
header h1 { font-size: 1.5rem; color: #58a6ff; }
.subtitle { color: #8b949e; font-size: 0.85rem; margin-top: 4px; }
main { max-width: 1100px; margin: 24px auto; padding: 0 16px; }

/* Log card */
.log-card { background: #161b22; border: 1px solid #30363d; border-radius: 8px; margin-bottom: 16px; overflow: hidden; cursor: pointer; transition: border-color .2s; }
.log-card:hover { border-color: #58a6ff; }
.log-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; gap: 12px; flex-wrap: wrap; }
.log-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.badge-chat { background: #1f6feb33; color: #58a6ff; }
.badge-multimodal { background: #8957e533; color: #bc8cff; }
.badge-status { background: #23882333; color: #3fb950; }
.badge-status.error { background: #88232333; color: #f85149; }
.badge-token { background: #30363d; color: #8b949e; }
.timestamp { color: #8b949e; font-size: 0.8rem; }
.latency { color: #8b949e; font-size: 0.75rem; }

/* AI content preview */
.ai-preview { padding: 0 18px 14px; }
.ai-section { margin-bottom: 10px; }
.ai-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; color: #8b949e; margin-bottom: 4px; font-weight: 600; }
.ai-text { font-size: 0.85rem; color: #c9d1d9; background: #0d1117; padding: 10px 12px; border-radius: 6px; white-space: pre-wrap; word-break: break-word; max-height: 120px; overflow: hidden; position: relative; line-height: 1.5; }
.ai-text.fade::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40px; background: linear-gradient(transparent, #0d1117); }

/* Usage stats */
.usage-bar { display: flex; gap: 16px; padding: 8px 18px 14px; font-size: 0.75rem; color: #8b949e; }

/* Pagination */
#pagination { display: flex; justify-content: center; gap: 8px; padding: 24px 0; }
#pagination button { background: #21262d; color: #c9d1d9; border: 1px solid #30363d; padding: 8px 16px; border-radius: 6px; cursor: pointer; }
#pagination button:hover { border-color: #58a6ff; }
#pagination button.active { background: #1f6feb; border-color: #1f6feb; color: #fff; }
#pagination button:disabled { opacity: 0.4; cursor: default; }

/* Modal */
#modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 100; }
#modal-overlay.hidden { display: none; }
#modal { background: #161b22; border: 1px solid #30363d; border-radius: 12px; max-width: 900px; width: 95%; max-height: 85vh; overflow-y: auto; padding: 24px; position: relative; }
#modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: #8b949e; font-size: 1.5rem; cursor: pointer; }
#modal-close:hover { color: #f85149; }
.modal-section { margin-bottom: 20px; }
.modal-section h3 { font-size: 0.85rem; color: #58a6ff; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.modal-json { background: #0d1117; padding: 14px; border-radius: 8px; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.8rem; white-space: pre-wrap; word-break: break-word; line-height: 1.6; color: #c9d1d9; max-height: 300px; overflow-y: auto; }
.modal-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.modal-meta span { font-size: 0.8rem; color: #8b949e; }
.modal-meta strong { color: #c9d1d9; }
