:root {
  --bg: #0f1419;
  --bg2: #1a222c;
  --text: #e8eef4;
  --muted: #9aabbc;
  --accent: #5ad1e0;
  --accent2: #ff8a5c;
  --ok: #3ecf8e;
  --danger: #ff6b6b;
  --line: rgba(255,255,255,.08);
  --radius: 14px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #1e3a4a 0%, transparent 55%),
              radial-gradient(900px 500px at 100% 0%, #3a2430 0%, transparent 50%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}
a { color: var(--accent); text-decoration: none; }
.muted, .hint, .meta { color: var(--muted); font-size: .9rem; }

.monograma {
  width: 56px; height: 56px; margin: 0 auto 1rem;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 1.35rem; letter-spacing: .08em;
  color: var(--accent);
}
.monograma.sm { width: 36px; height: 36px; font-size: .95rem; margin: 0; display: inline-grid; vertical-align: middle; }

.login-page {
  display: grid; place-items: center; padding: 1.5rem;
}
.login-card {
  width: min(100%, 380px);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
}
.login-card h1 { font-family: var(--display); font-weight: 600; margin: 0 0 .4rem; font-size: 2rem; }
.login-card form { text-align: left; margin-top: 1.25rem; }
label { display: block; margin: .8rem 0 .35rem; font-size: .85rem; color: var(--muted); }
input[type=text], input[type=tel], input[type=password], input[type=number] {
  width: 100%;
  padding: .75rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0c1015;
  color: var(--text);
  font: inherit;
}
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  margin-top: 1rem;
  padding: .7rem 1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #3bb8c9);
  color: #062028;
  font: inherit; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn.ghost, button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.sm { margin-top: 0; padding: .45rem .8rem; font-size: .85rem; }
.btn.wa { background: linear-gradient(135deg, #25d366, #1da851); color: #06280f; }
.btn.danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: rgba(15,20,25,.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.topbar nav { display: flex; gap: .5rem; }
.topbar .back { color: var(--muted); margin-right: .6rem; }
.wrap { padding: 1.15rem; max-width: 820px; margin: 0 auto; }
.wrap.narrow { max-width: 480px; }

.alert {
  padding: .75rem 1rem;
  border-radius: 10px;
  background: rgba(255,107,107,.12);
  border: 1px solid rgba(255,107,107,.35);
  color: #ffc9c9;
}
.alert.ok {
  background: rgba(62,207,142,.12);
  border-color: rgba(62,207,142,.35);
  color: #b8f5d5;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.stat {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}
.stat .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.stat strong { display: block; font-size: 1.8rem; margin: .2rem 0; font-family: var(--display); }
.stat .hint { font-size: .8rem; }

.filtros { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filtros a {
  padding: .4rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.filtros a.activo { background: var(--accent); color: #062028; border-color: transparent; font-weight: 600; }

.lista-invitados { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.card-inv {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.card-top { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.card-inv h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.badge {
  font-size: .75rem;
  padding: .25rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.ok { background: rgba(62,207,142,.15); color: var(--ok); }
.badge.pend { background: rgba(255,216,77,.12); color: #ffd84d; }
.codigo { font-size: .85rem; }
.codigo code { background: #0c1015; padding: .15rem .4rem; border-radius: 6px; }
.acciones { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; }
.empty { color: var(--muted); text-align: center; padding: 2rem 1rem; }

.form fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 1rem 0;
  padding: .9rem 1rem;
}
.check { display: flex; align-items: center; gap: .55rem; color: var(--text); margin: 0; cursor: pointer; }
.check input { width: auto; }
.form button { width: 100%; margin-top: 1.25rem; }
.form textarea, .form select {
  width: 100%;
  padding: .75rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0c1015;
  color: var(--text);
  font: inherit;
}
.form textarea { resize: vertical; min-height: 88px; }

.admin-block {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-bottom: 1.25rem;
}
.admin-block h2 {
  margin: 0 0 .5rem;
  font-family: var(--display);
  font-size: 1.45rem;
}
.form-foto { margin: 1rem 0 1.25rem; }
.foto-grid {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
}
.foto-grid li {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0c1015;
}
.foto-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}
.foto-grid .badge {
  position: absolute;
  top: .4rem; left: .4rem;
  background: rgba(0,0,0,.65);
  color: #fff;
}
.foto-grid form { padding: .45rem; }
.foto-grid button { width: 100%; margin: 0; }

.hint-list {
  margin: .5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}
.hint-list li { margin-bottom: .35rem; }
.hint-list strong { color: var(--text); }

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .topbar nav { flex-wrap: wrap; justify-content: flex-end; }
}
