/* ODIN · plataforma. Ajustes sobre los estilos de la maqueta aprobada (reference.css y studio.css, sin cambios). */

/* Los botones de la maqueta aquí son enlaces o formularios reales. */
a.primary, a.ghost, a.smallbtn, a.pill, button.primary, button.ghost, button.smallbtn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
a.card.metric { display: block; }
a.textbutton { display: inline; }
a.profile { text-decoration: none; }
a.avatar { text-decoration: none; }
.btnrow form, form.enlinea, .hstack form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.nav form { margin: 0; }
button:disabled { opacity: .5; cursor: not-allowed; }
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Un error se tiene que ver: grande, rojo y junto a lo que lo causó. */
.alerta-roja, .chat-error:not(:empty), .loginbox .formerror:not(:empty) {
  background: #fdecea; border: 2px solid #c62828; border-radius: 10px; color: #b71c1c;
  font-size: 15px; font-weight: 700; line-height: 1.4; margin: 10px 0 14px; padding: 12px 14px;
}
body.dark .alerta-roja, body.dark .chat-error:not(:empty), body.dark .loginbox .formerror:not(:empty) { background: #3b1213; color: #ffb4ab; border-color: #ef5350; }
.chat-nuevo { background: #fff4e5; border: 2px solid #ef6c00; border-radius: 10px; color: #8a3b00; font-size: 14px; font-weight: 700; margin: 0 0 10px; padding: 10px 12px; }
.chat-nuevo .textbutton { color: inherit; text-decoration: underline; font-size: inherit; }
.chat-error:empty, .formerror:empty { display: none; }

/* Formularios en página. */
.formulario { max-width: 760px; }
.derecha { justify-content: flex-end; margin-top: 18px; }
.casilla { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.casilla input { width: auto; }
.espacio { margin-top: 12px; }
.centro { text-align: center; }
.mini { font-weight: 400; font-size: 11px; }
.rango { font-size: 12px; }
textarea.form-input { resize: vertical; min-height: 84px; font: inherit; }
.toolbar input, .toolbar select, .persona select { padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--input); color: var(--text); font-size: 12px; }
.etapa-form { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 6px; }
.compose.nota { padding: 0 0 14px; border-top: 0; }
.compose input { flex: 1; min-width: 0; padding: 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--input); color: var(--text); }

/* Tareas: marcar como hecha sin casillas con script. */
.marcar { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); color: var(--brand); font-size: 13px; line-height: 1; display: grid; place-items: center; cursor: pointer; padding: 0; }
.marcar.hecha { background: var(--brand); border-color: var(--brand); color: #fff; }
.calentry.done { opacity: .55; text-decoration: line-through; }

/* Chat. */
.chatpanel { display: flex; flex-direction: column; min-height: 0; }
.chatspace { overflow-y: auto; max-height: calc(100vh - 480px); min-height: 240px; }
.msgmeta { white-space: nowrap; }
.pulsado { color: var(--muted); }
.msgtext { white-space: normal; }
.chat-controls .btnrow { flex-wrap: wrap; }
.thread time { font-size: 10px; color: var(--muted); white-space: nowrap; }
.solo-lectura { margin: 0 0 10px; font-size: 13px; line-height: 1.45; }
.thread-bottom .tag + .tag { margin-left: 4px; }
.enlace-unico code { word-break: break-all; user-select: all; }

/* Fichas y administrador. */
.ficha .card h2 { margin: 13px 0 6px; }
.circle.grande { width: 50px; height: 50px; font-size: 17px; }
.persona { border-top: 1px solid var(--border); padding: 10px 0 12px; }
.persona:first-of-type { border-top: 0; }
.persona .btnrow { margin-top: 8px; flex-wrap: wrap; }
.tag.quitar { border: 0; cursor: pointer; font: inherit; font-size: 10px; }
.enlace-unico { border: 2px solid var(--brand); margin-bottom: 16px; }
.admin-grid .minor { display: block; font-weight: 400; margin-top: 4px; }
.admin-grid .btnrow { flex-wrap: wrap; }
.loginbox h1 { margin: 6px 0 8px; }
.loginbox .notebox { margin: 12px 0; }
.loginbox .primary { width: 100%; justify-content: center; margin-top: 6px; }
.topbar .smallbtn .icon { width: 15px; height: 15px; }

@media (max-width: 600px) {
  .topbar a.avatar { display: none; }
  .topbar .search { min-width: 0; flex: 1; }
}
/* Probador del agente (0.5.21) */
.probador .chatspace { max-height: 68vh; min-height: 380px; overflow: auto; }
.probador-foto { display: block; max-width: 220px; width: 100%; border-radius: 10px; margin-bottom: 8px; }
.probador .choice { cursor: pointer; font: inherit; }
.probador .choice-list { margin-top: 8px; }
.probador-lista { margin-top: 8px; }
.probador-lista summary { display: inline-block; list-style: none; cursor: pointer; }
.probador-lista summary::-webkit-details-marker { display: none; }
.probador-fila { display: flex; flex-direction: column; gap: 2px; margin: 6px 0; }
.probador-nota { border-color: var(--brand); }
/* Ficha del agente (0.5.19) */
.ficha-avance .bar { margin: 10px 0; }
.ficha-seccion { border-top: 1px solid var(--border); }
.ficha-seccion:first-of-type { border-top: 0; }
.ficha-seccion .field small, .faq .field small { font-weight: 400; }
.propuesta { background: var(--soft); border: 1px dashed var(--brand); border-radius: 10px; padding: 10px 12px; margin: -4px 0 14px; font-size: 12px; }
.propuesta-texto { margin: 6px 0 8px; }
.revisar { display: block; margin-top: 4px; color: #9a5b00; font-weight: 600; }
.propuesta ul { margin: 6px 0; padding-left: 18px; }
.faq { border-top: 1px solid var(--border); }
.faq:first-of-type { border-top: 0; }
.ficha-guardar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.propuesta-aviso details { margin: 6px 0; }
@media (max-width: 850px) {
  .chatspace { max-height: none; min-height: 50vh; }
  .compose { flex-wrap: wrap; }
  .compose .primary { width: 100%; justify-content: center; }
}

/* 0.6.0 · avisos en el dispositivo (Mi cuenta) */
#avisos-dispositivo [hidden]{display:none!important}
.botones-avisos{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}

/* 0.7.0 · verificación en dos pasos */
.qr-dos{background:#fff;border:1px solid #ddd;border-radius:8px;padding:8px;width:max-content;max-width:100%;margin:12px 0}
.qr-dos svg{display:block;width:232px;max-width:100%;height:auto}
.clave-dos,.codigo-dos,.codigos-respaldo{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.08em}
.codigo-dos{font-size:1.3em}
.codigos-respaldo{display:grid;grid-template-columns:repeat(2,max-content);gap:6px 24px;list-style:none;padding:0;margin:12px 0;font-size:1.05em}
