/* ==========================================================================
   AszT · Painel administrativo
   ========================================================================== */
:root {
  --wine-950: #140a12;
  --wine-900: #1a0e17;
  --panel: #221320;
  --panel-2: #2b1929;
  --magenta: #b13b7e;
  --magenta-bright: #e05a9c;
  --magenta-600: #922f66;
  --cream: #fdeef5;
  --muted: #c9a9bb;
  --border: rgba(255, 255, 255, 0.12);
  --danger: #e5484d;
  --ok: #30a46c;
  --radius: 14px;
  --font-display: "Cormorant Garamond", "Georgia", serif;
  --font-script: "Parisienne", cursive;
  --font-body: "Inter", system-ui, "Segoe UI", sans-serif;
  --blue-600: #4c6ef5;
  --periwinkle: #a9b6f0;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--cream);
  background:
    radial-gradient(90% 60% at 20% -10%, #35182b 0%, transparent 55%),
    linear-gradient(160deg, var(--wine-900), var(--wine-950));
  min-height: 100vh;
}
a { color: var(--magenta-bright); }

/* ---------- Login / setup ---------- */
.auth-body { display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card {
  width: min(94vw, 400px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2.4rem 2rem;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  text-align: center;
}
.auth-logo {
  font-family: var(--font-display);
  font-size: 2.6rem;
  margin: 0;
  background: linear-gradient(115deg, #fff, var(--magenta-bright) 55%, var(--periwinkle));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-sub { color: var(--muted); margin: 0.3rem 0 1.6rem; font-size: 0.9rem; }
.auth-back { display: inline-block; margin-top: 1.2rem; color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.auth-back:hover { color: var(--cream); }

/* ---------- Top bar ---------- */
.admin-top {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.9rem clamp(1rem, 4vw, 2rem);
  background: rgba(20, 10, 18, 0.8);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
  flex-wrap: wrap;
}
.admin-brand {
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem;
  color: var(--cream); text-decoration: none;
}
.admin-brand span { color: var(--muted); font-size: 0.8rem; font-family: "Inter", sans-serif; }
.admin-nav { display: flex; gap: 0.4rem; margin-left: auto; flex-wrap: wrap; }
.admin-nav a {
  color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500;
  padding: 0.45rem 0.9rem; border-radius: 999px; transition: all 0.25s var(--ease);
}
.admin-nav a:hover { color: var(--cream); background: rgba(255,255,255,0.06); }
.admin-nav a.is-active { color: #fff; background: var(--magenta-600); }
.admin-user { display: flex; align-items: center; gap: 0.7rem; font-size: 0.9rem; color: var(--muted); }

.admin-main { max-width: 1100px; margin: 0 auto; padding: 1.8rem clamp(1rem, 4vw, 2rem) 3rem; }
.admin-foot { text-align: center; padding: 2rem; }
.admin-foot a { color: var(--muted); text-decoration: none; }

/* ---------- Cabeçalho de página ---------- */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-size: 1.9rem; margin: 0; }
.page-sub { color: var(--muted); margin: 0.2rem 0 0; font-size: 0.9rem; }
.section-title { font-family: var(--font-display); font-size: 1.3rem; margin: 2rem 0 1rem; }

/* ---------- Botões ---------- */
.btn {
  font: inherit; font-weight: 600; font-size: 0.9rem;
  border: none; border-radius: 999px; padding: 0.6rem 1.2rem;
  cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
  text-decoration: none; transition: transform 0.15s var(--ease), background 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn--sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn--block { width: 100%; justify-content: center; }
.btn--primary { color: #fff; background: linear-gradient(120deg, var(--magenta-bright), #8b56d6 55%, var(--blue-600)); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { color: var(--cream); background: rgba(255,255,255,0.06); border: 1px solid var(--border); }
.btn--ghost:hover { background: rgba(255,255,255,0.12); }
.btn--danger { color: #fff; background: rgba(229,72,77,0.85); }
.btn--danger:hover { background: var(--danger); }

/* ---------- Alertas ---------- */
.alert { padding: 0.8rem 1.1rem; border-radius: 12px; margin-bottom: 1rem; font-size: 0.9rem; border: 1px solid; }
.alert--error { background: rgba(229,72,77,0.12); border-color: rgba(229,72,77,0.5); color: #ffb4b4; }
.alert--success { background: rgba(48,163,108,0.12); border-color: rgba(48,163,108,0.5); color: #9be6c1; }
.alert--info { background: rgba(224,90,156,0.12); border-color: rgba(224,90,156,0.5); color: #f0b9d4; }

/* ---------- Formulários ---------- */
.form { display: flex; flex-direction: column; gap: 1rem; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field > span { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.field > span small { font-weight: 400; opacity: 0.8; }
.field input[type=text], .field input[type=email], .field input[type=password],
.field input[type=date], .field select, .field textarea, .inline-form input {
  font: inherit; color: var(--cream);
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 0.65rem 0.8rem;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus, .inline-form input:focus {
  outline: none; border-color: var(--magenta-bright);
}
.field textarea { resize: vertical; }
.field--check { flex-direction: row; align-items: center; gap: 0.6rem; }
.field--check input { width: 18px; height: 18px; accent-color: var(--magenta); }
.field--check span { color: var(--cream); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hint { color: var(--muted); font-size: 0.75rem; }

.form--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.form__col { display: flex; flex-direction: column; gap: 1rem; }
.form__full { grid-column: 1 / -1; }

.inline-form { flex-direction: row; flex-wrap: wrap; align-items: center; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.inp-emoji { width: 70px; text-align: center; }
.inp-grow { flex: 1; min-width: 160px; }

/* ---------- Mapa seletor ---------- */
.pick-map { height: 300px; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }

/* ---------- Cards de memórias ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card__thumb { position: relative; height: 150px; background: #180d15; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__noimg { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 0.85rem; }
.badge { position: absolute; top: 0.6rem; left: 0.6rem; font-size: 0.68rem; padding: 0.2rem 0.55rem; border-radius: 999px; }
.badge--draft { background: rgba(0,0,0,0.7); color: #ffd27a; border: 1px solid #ffd27a55; }
.card__body { padding: 0.9rem; flex: 1; }
.card__tag { display: inline-block; font-size: 0.68rem; color: #fff; padding: 0.15rem 0.55rem; border-radius: 999px; margin-bottom: 0.4rem; }
.card__title { font-size: 1.02rem; margin: 0.1rem 0 0.3rem; }
.card__meta { font-size: 0.8rem; color: var(--muted); margin: 0.15rem 0; }
.card__meta--soft { opacity: 0.7; }
.card__actions { display: flex; gap: 0.5rem; padding: 0.8rem 0.9rem; border-top: 1px solid var(--border); align-items: center; }
.card__actions form { margin-left: auto; }

/* ---------- Fotos (edição) ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.8rem; }
.photo-item { position: relative; margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.photo-item img { width: 100%; height: 110px; object-fit: cover; display: block; }
.photo-del {
  position: absolute; top: 4px; right: 4px;
  width: 26px; height: 26px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 1.1rem; line-height: 1;
  background: rgba(0,0,0,0.65); color: #fff;
}
.photo-del:hover { background: var(--danger); }

/* ---------- Lista de desejos ---------- */
.wish-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-direction: column; gap: 0.6rem; }
.wish { display: flex; align-items: center; gap: 0.9rem; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem 1rem; }
.wish.is-off { opacity: 0.5; }
.wish__emoji { font-size: 1.4rem; }
.wish__text { display: flex; flex-direction: column; }
.wish__text small { color: var(--muted); }
.wish__actions { margin-left: auto; display: flex; gap: 0.4rem; }

.empty-state { background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius); padding: 2.5rem; text-align: center; color: var(--muted); }

@media (max-width: 720px) {
  .form--grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .admin-nav { order: 3; width: 100%; margin-left: 0; }
}
