:root {
  --bg: #14110f; --panel: #1f1b18; --line: #3a332d; --text: #ece5db; --muted: #a39a8d;
  --accent: #c9a25e; --accent-text: #1a1408; --err: #e58a7a; --ok: #9cc48a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
header { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 0; }
header h1 { margin: 0 0 8px; font: 600 20px Georgia, "Times New Roman", serif; letter-spacing: .02em; }
nav { display: flex; gap: 4px; overflow-x: auto; }
nav a { padding: 8px 12px; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
nav a.on { color: var(--text); border-color: var(--accent); }
nav b { background: var(--line); color: var(--text); border-radius: 10px; padding: 1px 7px; font-size: 13px; }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
h2 { margin: 0 0 8px; font: 600 17px Georgia, "Times New Roman", serif; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.item.hecho img { opacity: .45; }
.item .ph { aspect-ratio: 1; display: grid; place-items: center; color: var(--muted); background: #191614; }
.body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row button { flex: 1; }
.regen { display: flex; flex-direction: column; gap: 8px; }
.regen[hidden] { display: none; }
textarea, input[type=text], input[type=password], input[type=number], select {
  width: 100%; background: #14110f; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit;
}
textarea { resize: vertical; }
input[type=number] { width: 90px; }
button, .btn {
  background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px;
  font: inherit; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
}
button:hover, .btn:hover { border-color: var(--muted); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.acciones form { display: flex; gap: 8px; align-items: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.card form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.card form label { width: 100%; }
label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 14px; }
label small { color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 16px; width: auto; }
.dias { display: flex; gap: 14px; flex-wrap: wrap; }
code { background: #14110f; padding: 1px 5px; border-radius: 4px; }
.flash, .err, .warn, .estado { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; border: 1px solid var(--line); background: var(--panel); }
.err { color: var(--err); border-color: #6b3a32; }
.warn { color: var(--accent); }
.small { font-size: 13px; margin: 0; }
.err.small { padding: 6px 8px; }
.nota, .vacio { color: var(--muted); }
.texto { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.okmsg { color: var(--ok); margin: 0; font-weight: 600; }
.estado { display: flex; align-items: center; gap: 10px; }
.estado[hidden] { display: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulso 1.2s infinite ease-in-out; }
@keyframes pulso { 50% { opacity: .25; } }
body.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
body.login .card { width: 100%; max-width: 340px; }
body.login h1 { margin: 0; font: 600 22px Georgia, serif; }
details.small { color: var(--muted); }
details.small summary { cursor: pointer; }
details.small p { margin: 6px 0 0; overflow-wrap: anywhere; }
img.ref { width: 220px; max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
a.btn { text-decoration: none; align-self: flex-start; }
