body.admin {
  min-height: 100vh;
  background: var(--bg);
}

.book-nav .nav-here {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.panel {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 40px) 12vh;
}

.panel h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  margin: 0;
  letter-spacing: 0.01em;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hint {
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0.5rem 0 0;
}

.error {
  font-size: 0.9rem;
  color: #8c2f1d;
  background: rgba(140, 47, 29, 0.08);
  border: 1px solid rgba(140, 47, 29, 0.2);
  padding: 10px 14px;
  margin: 1rem 0 0;
}

/* ---------------- Formularios ---------------- */
.stack {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 2rem;
  max-width: 420px;
}

label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

input[type="text"],
input[type="password"],
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.6rem;
  padding: 11px 13px;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--linea);
  border-radius: 0;
}

textarea {
  resize: vertical;
  line-height: 1.7;
  min-height: 120px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
}

label .hint {
  margin-top: 0.45rem;
  text-transform: none;
  letter-spacing: normal;
}

.opt { text-transform: none; letter-spacing: normal; opacity: 0.7; }

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 10px;
  align-items: center;
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--ink);
}

.check .hint { grid-column: 2; margin-top: 0.3rem; }

.slug-row {
  display: flex;
  align-items: stretch;
  margin-top: 0.6rem;
}

.slug-prefix {
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 0.9rem;
  font-weight: 300;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink-soft);
  background: rgba(33, 29, 25, 0.06);
  border: 1px solid var(--linea);
  border-right: none;
  white-space: nowrap;
}

.slug-row input { margin-top: 0; }

/* ---------------- Botones ---------------- */
.btn {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 11px 22px;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn:hover { opacity: 0.82; }

.btn.ghost {
  background: none;
  color: var(--ink);
}

.btn.small {
  padding: 7px 14px;
  font-size: 11px;
}

.btn.danger {
  background: none;
  color: #8c2f1d;
  border-color: rgba(140, 47, 29, 0.4);
}

/* ---------------- Lista de books ---------------- */
.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.book-card {
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--linea);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.book-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 0.3rem;
}

.book-meta {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.7;
}

.book-meta a { color: var(--ink); }

.book-excerpt {
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
  font-style: italic;
}

.tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--linea);
  color: var(--ink-soft);
  margin-left: 8px;
  vertical-align: 2px;
}

.book-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------------- Modal ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 12, 9, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 20px;
  overflow-y: auto;
}

.modal[hidden] { display: none; }

.modal-box {
  width: 100%;
  max-width: 560px;
  background: var(--bg);
  border: 1px solid var(--linea);
  padding: clamp(24px, 4vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.modal-box h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.8rem;
  margin: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 0.4rem;
}

@media (max-width: 560px) {
  .book-card { flex-direction: column; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}
