/* bttest web — dark theme */
:root {
    --bg: #0e0e14;
    --bg-sidebar: #13131d;
    --bg-card: #1a1a28;
    --bg-input: #14141f;
    --border: #2a2a3a;
    --text: #d4d4dc;
    --text-muted: #777790;
    --accent: #7c83ff;
    --accent-hover: #9a9fff;
    --danger: #ff5c5c;
    --success: #4caf50;
    --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Layout */
.layout { display: flex; height: 100vh; }
.sidebar { width: 280px; background: var(--bg-sidebar); border-right: 1px solid var(--border); padding: 16px 0; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-logo { font-size: 16px; font-weight: 700; color: var(--accent); padding: 0 16px 16px; }
.nav-link { display: block; padding: 8px 16px; color: var(--text-muted); font-size: 14px; }
.nav-link:hover { color: var(--text); background: rgba(124, 131, 255, 0.08); }
.nav-link.active { color: var(--accent); background: rgba(124, 131, 255, 0.12); }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 8px 20px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.content { flex: 1; overflow-y: auto; padding: 20px; }

/* Auth pages */
.auth-page { display: flex; align-items: center; justify-content: center; height: 100vh; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; width: 360px; text-align: center; }
.auth-card h1 { color: var(--accent); margin-bottom: 8px; }
.auth-card .subtitle { color: var(--text-muted); margin-bottom: 20px; font-size: 14px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }

/* Forms */
input[type="text"], input[type="password"], input[type="number"], input[type="file"],
textarea, select {
    background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 10px 14px; color: var(--text); font-size: 14px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; font-family: inherit; }

.btn { background: var(--accent); color: #fff; border: none; border-radius: var(--radius); padding: 10px 20px; font-size: 14px; cursor: pointer; }
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-danger { background: var(--danger); }
.btn-link { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; }
.btn-link:hover { color: var(--text); }
.inline { display: inline; }

/* Flash messages */
.flash { background: #332200; border: 1px solid #664400; color: #ffcc00; padding: 10px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }

/* Chat */
.chat-container { display: flex; flex-direction: column; height: 100%; }
.chat-header { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
.bubble { max-width: 75%; padding: 10px 16px; border-radius: 12px; font-size: 14px; line-height: 1.6; word-wrap: break-word; }
.bubble-user { background: var(--bg-card); align-self: flex-start; }
.bubble-assistant { background: #1a2e1a; align-self: flex-end; }
.bubble-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.chat-input-row { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.chat-input-row input { flex: 1; }
.typing-indicator { color: var(--text-muted); font-size: 13px; font-style: italic; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--border); color: var(--accent); font-weight: 600; }
td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
tr:hover { background: rgba(124, 131, 255, 0.04); }

/* Cards and results */
.result-area { margin-top: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-muted); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.page-title { font-size: 20px; font-weight: 600; margin-bottom: 16px; }

/* Media results */
.result-image img { max-width: 100%; border-radius: var(--radius); margin-top: 12px; }
.result-video video { max-width: 100%; border-radius: var(--radius); margin-top: 12px; }
.result-audio audio { width: 100%; margin-top: 12px; }
.result-meta { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* Scan results */
.vuln { padding: 12px; margin-bottom: 8px; background: var(--bg-card); border-radius: var(--radius); border-left: 3px solid var(--border); }
.vuln-critical { border-left-color: #ff2222; }
.vuln-high { border-left-color: #ff5c5c; }
.vuln-medium { border-left-color: #ffcc00; }
.vuln-low { border-left-color: #4488ff; }
.vuln-title { font-weight: 600; margin-bottom: 4px; }
.vuln-severity { font-size: 11px; text-transform: uppercase; font-weight: 700; }

/* Ridges split pane */
.ridges-layout { display: flex; gap: 16px; height: calc(100vh - 120px); }
.ridges-editor { flex: 2; display: flex; flex-direction: column; }
.ridges-status { flex: 1; overflow-y: auto; }

/* Loading */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-block; }
.spinner { color: var(--text-muted); font-size: 14px; padding: 20px; }

/* Config display */
.config-line { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; padding: 2px 0; }
.config-key { color: var(--accent); }
.config-val { color: var(--text); }

/* Reconnect banner */
.reconnect-banner { background: #442200; border: 1px solid #664400; color: #ffaa00; padding: 8px 16px; border-radius: var(--radius); text-align: center; margin-bottom: 12px; display: none; }
