/* Panel del sitio · Jeannette Tovar Curto
   Mismo lenguaje que el portafolio: tinta, dorado y crema; serif para títulos, sans para todo lo demás. */
:root {
  --ink: #0e1930;
  --ink-soft: #3b4660;
  --gold: #d3ae63;
  --gold-soft: #f1e2bd;
  --gold-deep: #8a6418;
  --cream: #fcf8ee;
  --sand: #f4ead2;
  --paper: #fffdf8;
  --line: rgba(14, 25, 48, 0.12);
  --line-strong: rgba(14, 25, 48, 0.28);
  --ok: #2f6b3a;
  --ok-bg: #e3f1e6;
  --bad: #9c3a28;
  --bad-bg: #f8e4de;
  --warn: #8a5a0a;
  --radius: 18px;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Outfit', system-ui, sans-serif;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 22px 40px -32px rgba(90, 58, 12, 0.55);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  min-height: 100%;
  background: var(--cream);
  scroll-padding-top: 130px;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 500px at 50% -120px, #fff6dc 0%, rgba(255, 246, 220, 0) 70%), var(--cream);
  color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 96px max(16px, env(safe-area-inset-left, 0px));
}
a {
  color: var(--gold-deep);
  font-weight: 600;
}

/* ---------- Cabecera ---------- */
.top,
main,
.tabs {
  max-width: 1100px;
  margin-inline: auto;
}
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 28px 0 20px;
}
.eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
h1 {
  margin: 0;
  font: 500 clamp(1.7rem, 4.6vw, 2.5rem) / 1.05 var(--serif);
  letter-spacing: -0.02em;
}
h1 em {
  color: var(--gold-deep);
}
.who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.who .fine {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.role {
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Pestañas ---------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 4px;
  padding: 10px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px 12px 0 0;
  background: transparent;
  color: var(--ink-soft);
}
.tabs button:hover:not(:disabled) {
  background: rgba(211, 174, 99, 0.16);
  color: var(--ink);
  transform: none;
  box-shadow: none;
}
.tabs button[aria-selected='true'] {
  color: var(--ink);
}
.tabs button[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--gold);
}
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
}

main {
  padding-top: 22px;
}
.lead {
  margin: 0 0 6px;
  max-width: 46rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.lead a {
  margin-left: 6px;
}
.fine {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-soft);
}
.help {
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

/* ---------- Botones (un solo sistema) ---------- */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--ink);
  color: #fffaf0;
  font: 600 0.95rem/1 var(--sans);
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
button:hover:not(:disabled),
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px -12px rgba(14, 25, 48, 0.7);
}
button:active:not(:disabled),
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}
button.gold {
  background: var(--gold);
  color: var(--ink);
}
button.gold:hover:not(:disabled) {
  background: #dcb86f;
}
button.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
button.ghost:hover:not(:disabled) {
  border-color: var(--ink);
  background: rgba(14, 25, 48, 0.04);
  box-shadow: none;
}
button.danger {
  color: var(--bad);
  border-color: rgba(156, 58, 40, 0.4);
}
button.danger:hover:not(:disabled) {
  background: var(--bad-bg);
  border-color: var(--bad);
}
button.small {
  min-height: 36px;
  padding: 0 16px;
  font-size: 0.85rem;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.busy {
  position: relative;
  color: transparent;
  cursor: progress;
}
button.busy::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 250, 240, 0.3);
  border-top-color: #fffaf0;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
button.gold.busy::after,
button.ghost.busy::after {
  border-color: rgba(14, 25, 48, 0.25);
  border-top-color: var(--ink);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 3px;
}

/* ---------- Avisos (flotan abajo para que se vean aunque estés más abajo) ---------- */
.notice {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  width: min(560px, calc(100vw - 32px));
  margin: 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: #fffaf0;
  font-weight: 600;
  box-shadow: 0 24px 50px -20px rgba(14, 25, 48, 0.6);
  transform: translateX(-50%);
  animation: rise 0.25s ease;
}
.notice.ok {
  background: var(--ok);
}
.notice.bad {
  background: var(--bad);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
}

/* ---------- Fotos ---------- */
.grid {
  display: grid;
  gap: 20px;
  margin-top: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}
/* Título de cada sección del sitio: ocupa todo el ancho y separa los grupos de tarjetas. */
.grid .section-title {
  grid-column: 1 / -1;
  margin: 14px 0 -6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font: 600 1.35rem/1.2 var(--serif);
  color: var(--ink);
}
.grid .section-title:first-child {
  margin-top: 0;
}
.card {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}
.card h3 {
  margin: 0;
  font: 500 1.4rem/1.15 var(--serif);
}
.status {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status.wait {
  background: var(--gold-soft);
  color: var(--warn);
}
.pair {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}
figure {
  margin: 0;
}
.frame {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 14px;
  background: var(--sand);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.frame.empty {
  border: 1.5px dashed var(--line-strong);
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-align: center;
  padding: 12px;
}
.card.drag .pair figure:last-child .frame {
  border: 2px dashed var(--gold-deep);
  background: var(--gold-soft);
}
figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
figcaption .tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  letter-spacing: 0.06em;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.actions > * {
  flex: 1 1 150px;
}
input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Textos ---------- */
.group {
  margin-top: 16px;
  padding: 0 22px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.group summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  font: 500 1.35rem/1.2 var(--serif);
  cursor: pointer;
  list-style: none;
}
.group summary::-webkit-details-marker {
  display: none;
}
.group summary::after {
  content: '';
  width: 10px;
  height: 10px;
  margin-left: auto;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.group[open] summary::after {
  transform: rotate(-135deg);
}
.group[open] > summary {
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.pill-n {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--gold);
  font: 700 0.75rem var(--sans);
}
.field {
  display: grid;
  gap: 6px;
  margin: 18px 0;
}
.field label {
  font-weight: 600;
}
input[type='text'],
input[type='email'],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type='text']:hover,
input[type='email']:hover,
textarea:hover {
  border-color: var(--ink-soft);
}
input[type='text']:focus,
input[type='email']:focus,
textarea:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 4px rgba(211, 174, 99, 0.25);
  outline: none;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.count {
  justify-self: end;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.count.near {
  color: var(--warn);
  font-weight: 700;
}
.tcard {
  margin: 16px 0;
  padding: 4px 20px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(244, 234, 210, 0.35);
}
.tcard h3 {
  margin: 14px 0 0;
  font: 500 1.15rem var(--serif);
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0 14px;
  font-weight: 600;
}
.check input {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  accent-color: var(--ink);
}
#add-t {
  margin: 8px 0 18px;
}
.savebar {
  position: sticky;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 0;
  padding: 12px 14px 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 44px -22px rgba(14, 25, 48, 0.55);
}
.savebar #savebar-msg::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--gold-deep);
}
.versions {
  margin-top: 22px;
  padding: 0 22px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.versions summary {
  padding: 16px 0;
  font-weight: 700;
  cursor: pointer;
}
.versions ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.versions li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.versions button {
  min-height: 38px;
  font-size: 0.85rem;
}

/* ---------- Personas ---------- */
.people {
  margin: 18px 0;
  padding: 4px 20px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.people li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 14px 0;
}
.people li + li {
  border-top: 1px solid var(--line);
}
.people .mail {
  flex: 1 1 220px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.people .tag {
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
}
.addp {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.addp label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}
.addp .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.addp input {
  flex: 1 1 240px;
  width: auto;
}
.addp select {
  width: auto;
  min-height: 46px;
  padding: 0 40px 0 14px;
}

/* Selector propio: sin el degradado gris ni las flechas dobles del navegador, con el mismo aspecto que los campos de texto. */
select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230e1930' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}
select:hover {
  border-color: var(--ink-soft);
}
select:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 4px rgba(211, 174, 99, 0.25);
  outline: none;
}

/* ---------- Entrada ---------- */
.login {
  max-width: 480px;
  margin: 40px auto 0;
  padding: 28px;
}
.login .field {
  margin: 8px 0 0;
}
.login form {
  margin: 0;
}
.login .actions {
  margin-top: 14px;
}

@media (max-width: 560px) {
  .card,
  .group,
  .versions {
    padding-inline: 16px;
  }
  .who {
    width: 100%;
    border-radius: 18px;
    justify-content: space-between;
  }
  .who .fine {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
  }
  .savebar {
    border-radius: 18px;
  }
  .savebar button {
    flex: 1 1 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Medidas recomendadas ---------- */
.spec {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--gold-soft);
  font-size: 0.9rem;
}
.spec p {
  margin: 0;
}
.spec summary {
  margin-top: 6px;
  color: var(--gold-deep);
  font-weight: 600;
  cursor: pointer;
}
.spec ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
}
.spec li + li {
  margin-top: 4px;
}
