:root { --bg: #0f111a; --surface: #1e2130; --primary: #3b82f6; --success: #10b981; --danger: #ef4444; --text: #f8fafc; --muted: #94a3b8; --border: #334155; }
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: var(--bg); color: var(--text); overflow-y: auto; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.wrapper { display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; padding: 20px; }
.container { width: 100%; max-width: 450px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 30px; display: flex; flex-direction: column; gap: 16px; margin: auto; }
.admin-container { max-width: 1100px; margin: 20px auto; padding: 30px; }
.chat-container { max-width: 1200px; height: 92vh; margin: auto; }
h2 { text-align: center; color: #fff; font-weight: 600; font-size: 20px; }
input { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 12px 14px; border-radius: 8px; margin-bottom: 8px; outline: none; font-size: 14px; }
button { width: 100%; background: var(--primary); color: #fff; border: none; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 14px; }
button.danger { background: var(--danger); }
button.success { background: var(--success); }
.model-selector-bar { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.selector-row { display: flex; justify-content: space-between; align-items: center; }
.web-toggle-checkbox { display: none; }
.web-toggle-btn { background: var(--surface); border: 1px solid var(--border); color: var(--muted); padding: 4px 10px; border-radius: 6px; font-size: 11px; cursor: pointer; }
#webSearchToggle:checked + .web-toggle-btn { background: #0284c7; border-color: #38bdf8; color: #fff; }
#agenticToggle:checked + .web-toggle-btn { background: #6d28d9; border-color: #a78bfa; color: #fff; }
.pills-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.model-pill-checkbox { display: none; }
.model-pill-label { background: var(--surface); border: 1px solid var(--border); color: var(--muted); padding: 6px 12px; border-radius: 20px; font-size: 12px; cursor: pointer; }
.model-pill-checkbox:checked + .model-pill-label { background: rgba(59, 130, 246, 0.15); border-color: var(--primary); color: #fff; }
.chat-box { flex: 1; overflow-y: auto; background: var(--bg); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--border); min-height: 200px; }
.input-row { display: flex; gap: 10px; align-items: center; }
.input-row input[type=text] { margin: 0; flex: 1; }
.input-row button { margin: 0; width: 90px; }
.file-preview-area { display: flex; gap: 8px; flex-wrap: wrap; }
.file-badge { font-size: 11px; background: var(--surface); border: 1px solid var(--primary); padding: 4px 8px; border-radius: 4px; display: flex; gap: 6px; align-items: center; }
.file-remove { cursor: pointer; color: var(--danger); font-weight: bold; }
.prompt-bubble-row { display: flex; justify-content: flex-end; width: 100%; }
.user-prompt-bubble { background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 16px; border-bottom-right-radius: 4px; max-width: 80%; font-size: 14px; white-space: pre-wrap; }
.arena-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; width: 100%; }
.arena-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.arena-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.arena-model-name { font-weight: 700; font-size: 13px; color: #fff; }
.arena-latency { font-size: 11px; color: var(--muted); }
.arena-content { font-size: 14px; line-height: 1.5; color: var(--text); flex: 1; white-space: pre-wrap; word-break: break-word; }
.arena-footer { display: flex; justify-content: space-between; align-items: center; font-size: 11px; background: var(--bg); padding: 8px 10px; border-radius: 6px; }

.pdf-action-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pdf-btn { color: #fff; padding: 6px 10px; border-radius: 6px; cursor: pointer; border: none; font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 4px; transition: 0.2s; }
.pdf-btn:hover { opacity: 0.8; }
.pdf-btn.download { background: #059669; }
.pdf-btn.preview { background: #0284c7; }
.pdf-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg); border: 1px solid var(--border); padding: 18px; border-radius: 8px; }
.table-wrapper { overflow-x: auto; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; min-width: 800px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.link { color: var(--primary); cursor: pointer; font-weight: 500; }
.info-bar { display: flex; justify-content: space-between; font-size: 13px; background: var(--bg); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); }
.toast { position: fixed; top: 20px; right: 20px; background: var(--surface); color: #fff; border-left: 4px solid var(--primary); padding: 14px 18px; border-radius: 8px; z-index: 1000; }
