/* Raven AI — sistema visual (del logo: negro profundo, cian neón, blanco) */
:root {
  --bg: #050b0d; --bg-2: #08131a; --panel: #0b1a21; --panel-2: #0f222b; --line: #16323c; --line-2: #1f4652;
  --text: #eaf4f4; --muted: #8aa6ad; --dim: #5c7a82;
  --cyan: #19e3e3; --teal: #12b8b0; --cyan-soft: rgba(25, 227, 227, .12); --glow: 0 0 24px rgba(25, 227, 227, .35);
  --danger: #ff6b7a; --warn: #ffc857; --ok: #3ee8a3;
  --radius: 12px; --radius-sm: 8px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Michroma', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(25, 227, 227, .3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg); }

.wordmark { font-family: var(--display); letter-spacing: .08em; font-size: 17px; color: #fff; white-space: nowrap; }
.wordmark b { color: var(--cyan); font-weight: 400; text-shadow: var(--glow); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 50%; background: url(/assets/raven-mark.png) center/cover; box-shadow: var(--glow); flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:hover { border-color: var(--teal); background: var(--panel-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--cyan), var(--teal)); color: #021214; border: 0; font-weight: 600; box-shadow: 0 0 0 0 rgba(25,227,227,.4); }
.btn.primary:hover { box-shadow: var(--glow); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.icon { padding: 7px; width: 34px; height: 34px; }

.input, textarea.input, select.input { width: 100%; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none; }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--cyan-soft); }
label.field { display: block; margin: 0 0 14px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: var(--cyan-soft); color: var(--cyan); border: 1px solid rgba(25,227,227,.25); }
.badge.warn { background: rgba(255,200,87,.1); color: var(--warn); border-color: rgba(255,200,87,.3); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line-2);
  padding: 10px 16px; border-radius: var(--radius-sm); z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: calc(100% - 32px); }
.toast.error { border-color: var(--danger); }

/* Markdown */
.md { overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3 { line-height: 1.3; margin: 1.2em 0 .5em; }
.md h1 { font-size: 1.4em; } .md h2 { font-size: 1.2em; } .md h3 { font-size: 1.05em; }
.md p { margin: .6em 0; }
.md ul, .md ol { padding-left: 1.4em; margin: .5em 0; }
.md code { font-family: var(--mono); font-size: .88em; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.md pre { position: relative; background: #03080a; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; overflow: auto; margin: .8em 0; }
.md pre code { background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.55; }
.md pre .lang { position: absolute; top: 6px; right: 10px; font-size: 11px; color: var(--dim); font-family: var(--mono); }
.md pre .copy { position: absolute; top: 4px; right: 60px; font-size: 11px; padding: 2px 8px; }
.md table { border-collapse: collapse; margin: .8em 0; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.md th { background: var(--panel-2); }
.md blockquote { border-left: 3px solid var(--teal); margin: .6em 0; padding: .1em 1em; color: var(--muted); }
.md a { text-decoration: underline; }
.tok-k { color: #ff8fd0; } .tok-s { color: #a6f08a; } .tok-c { color: #5c7a82; font-style: italic; } .tok-n { color: #ffc857; }
