:root { --navy: #03071E; --red: #FF3435; --cream: #FCFDF2; --grey: #646464; --sand: #F6E4AC; --line: #e4e5d6; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; background: var(--cream); color: var(--navy); font: 18px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'DejaVu Sans', 'Liberation Sans', Arial, sans-serif; }
[hidden] { display: none !important; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--navy); color: var(--cream); }
.top h1 { margin: 0; font-size: 1.15rem; } .top h1 span { color: var(--sand); font-weight: 400; margin-left: 6px; }
button { font: inherit; cursor: pointer; border-radius: 12px; border: 2px solid transparent; min-height: 52px; padding: 0 22px; }
button:disabled { opacity: .5; cursor: default; }
.cta { background: var(--red); color: #fff; font-weight: 600; }
.ghost { background: transparent; color: var(--cream); border-color: var(--cream); }
.login { margin: auto; width: min(420px, 92vw); }
.login form { display: flex; flex-direction: column; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.login h2, .empty h2 { margin: 0; }
input, textarea { font: inherit; color: var(--navy); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
input:focus, textarea:focus { outline: none; border-color: var(--navy); }
.muted { color: var(--grey); margin: 0; }
.error { color: #b00020; margin: 0; }
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; width: min(900px, 100%); margin: 0 auto; }
.messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.empty { margin: auto 0; display: flex; flex-direction: column; gap: 16px; }
.suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.suggestion { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; min-height: 96px; background: #fff; border-color: var(--line); color: var(--navy); }
.suggestion span { color: var(--grey); font-size: .9rem; }
.suggestion:hover { border-color: var(--navy); }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 16px; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--navy); color: var(--cream); white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); }
.msg.assistant > :first-child { margin-top: 0; } .msg.assistant > :last-child { margin-bottom: 0; }
.msg p, .msg ul, .msg ol { margin: .5em 0; }
.msg .tablewrap { overflow-x: auto; margin: .6em 0; }
.msg table { border-collapse: collapse; min-width: 100%; }
.msg th, .msg td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.msg th { background: var(--cream); }
.msg code { background: var(--cream); border-radius: 4px; padding: 1px 5px; font-size: .9em; }
.msg pre { background: var(--cream); padding: 10px; border-radius: 8px; overflow-x: auto; } .msg pre code { padding: 0; }
.msg img.thumb { display: block; max-width: 160px; max-height: 160px; border-radius: 8px; margin-bottom: 8px; }
.msg .file { display: inline-block; background: rgba(255,255,255,.15); border-radius: 8px; padding: 2px 8px; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; background: var(--sand); border-radius: 999px; padding: 4px 12px; }
.chip.done { background: #e6eed2; } .chip.fail { background: #f5c9c9; }
.chip .spin { width: 10px; height: 10px; border: 2px solid var(--navy); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
/* ✓ y ✗ dibujados con CSS: no dependen de que la fuente tenga el glifo */
.chip .tick { width: 5px; height: 10px; border: solid var(--navy); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.chip .cross { width: 10px; height: 10px; background: linear-gradient(45deg, transparent 43%, #b00020 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, #b00020 43% 57%, transparent 57%); }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { margin: 0 20px 8px; padding: 10px 14px; background: var(--sand); border-radius: 12px; }
.composer { padding: 12px 20px 20px; border-top: 1px solid var(--line); background: var(--cream); }
.composer .row { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; max-height: 160px; min-height: 52px; }
.icon { background: #fff; border-color: var(--line); padding: 0 16px; font-size: 1.3rem; }
.preview { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.preview img { height: 56px; border-radius: 6px; }
.preview button { min-height: 36px; padding: 0 12px; background: transparent; border-color: var(--line); }
@media (max-width: 600px) { body { font-size: 17px; } .msg { max-width: 96%; } }
.msg td:first-child { min-width: 7em; }
