/* COBALTO - Estilos de los paneles / Sitio: cobalto.media */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #1d2330; --muted: #5d6577; --border: #dde1e8;
  --accent: #1f5fd6; --accent-text: #ffffff; --danger: #b42318; --danger-bg: #fdecea; --ok: #157347; --ok-bg: #e7f5ee;
  --admin: #6b2fb3; --warn: #8a4b00; --warn-bg: #fff4e0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --surface: #1b1f27; --text: #e7e9ee; --muted: #a0a7b5; --border: #2d3340;
    --accent: #6c9cff; --accent-text: #0d1117; --danger: #ff8a80; --danger-bg: #3a1d1b; --ok: #6fd39b; --ok-bg: #16301f;
    --admin: #b48cff; --warn: #ffc77a; --warn-bg: #3a2a12;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.top { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.realm-admin .top { border-bottom: 3px solid var(--admin); }
.brand { font-weight: 600; flex: 1; }
.who { color: var(--muted); font-size: 14px; }
.logout { margin: 0; }
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 50px); }
/* min-width: 0 evita que el menú (nowrap) ensanche la columna y el contenido se salga en celular */
.shell > * { min-width: 0; }
.shell.solo { grid-template-columns: 1fr; }
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 16px 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a, .side .soon { display: block; padding: 8px 20px; color: var(--text); text-decoration: none; }
.side a[aria-current="page"] { background: var(--bg); font-weight: 600; border-left: 3px solid var(--accent); }
.side .soon { color: var(--muted); cursor: default; }
main { padding: 24px 20px; max-width: 960px; width: 100%; }
.solo main { margin: 48px auto; max-width: 420px; }
h1 { font-size: 22px; margin: 0 0 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
label { display: block; font-weight: 500; margin: 12px 0 4px; }
input[type=email], input[type=password], input[type=text] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { margin-top: 16px; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; }
button.link { margin: 0; padding: 0; background: none; color: var(--accent); font-weight: 500; }
.alert { padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; }
.alert.error { background: var(--danger-bg); color: var(--danger); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.muted { color: var(--muted); font-size: 14px; }
/* Enlaces legibles en modo claro y oscuro (antes usaban el azul por defecto del navegador) */
a { color: var(--accent); }
/* Preguntas sin respuesta */
.tabs { display: flex; gap: 4px; margin: 16px 0 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.tabs .count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 12px; text-align: center; }
.tabs + .card { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
.items { list-style: none; margin: 0; padding: 0; }
.item + .item { border-top: 1px solid var(--border); }
.item-link { display: grid; gap: 4px; padding: 12px 4px; color: var(--text); text-decoration: none; }
.item-link:hover .q { text-decoration: underline; }
.q { font-weight: 500; }
.q-big { font-size: 17px; font-weight: 500; margin: 0 0 8px; white-space: pre-wrap; }
.meta { color: var(--muted); font-size: 13px; margin: 0; }
.answer-preview { color: var(--muted); font-size: 14px; border-left: 3px solid var(--border); padding-left: 8px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; margin-right: 6px; }
.badge-pending { background: var(--warn-bg); color: var(--warn); }
.badge-answered { background: var(--ok-bg); color: var(--ok); }
.badge-dismissed { background: var(--bg); color: var(--muted); }
textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; resize: vertical; }
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.warn ul { margin: 6px 0; padding-left: 20px; }
.alert.warn p { margin: 6px 0 0; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); margin-top: 0; }
.actions form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
.pager { display: flex; justify-content: space-between; margin-top: 12px; }
code.secret { display: block; padding: 10px; background: var(--bg); border-radius: 8px; font-size: 16px; letter-spacing: 1px; word-break: break-all; }
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--border); padding: 4px 0; }
  .side ul { display: flex; overflow-x: auto; }
  .side a, .side .soon { white-space: nowrap; padding: 8px 12px; }
  main { padding: 16px; }
}
