/* ============================================
   admin.css — painel administrativo
   Estética mais "ferramenta", mas mantém a paleta.
   ============================================ */

:root {
  --bg:        #FAF6F2;
  --bg-2:      #F2EDE8;
  --panel:     #FFFFFF;
  --rose:      #E8A5B8;
  --rose-deep: #D4849A;
  --ink:       #2B2422;
  --ink-soft:  #4A3F3B;
  --muted:     #8C7E78;
  --line:      rgba(43, 36, 34, 0.1);
  --danger:    #C9596B;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --radius:    12px;
  --shadow:    0 20px 50px -30px rgba(43, 36, 34, 0.25);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------- LOGIN ---------- */
.login {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(232, 165, 184, 0.25), transparent 50%),
    var(--bg);
  padding: 20px;
}
.login__card {
  background: var(--panel);
  padding: 3rem 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; gap: 1.2rem;
}
.login__card h1 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 1.8rem; margin: 0; letter-spacing: -0.01em;
}
.login__card h1 span { color: var(--rose-deep); }
.login__hint { color: var(--muted); margin: 0; font-size: 0.92rem; }
.login__error { color: var(--danger); font-size: 0.85rem; margin: 0; }

/* ---------- FIELDS ---------- */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field span {
  font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
}
.field input,
.field textarea,
.field select {
  font-family: inherit; font-size: 0.95rem; color: var(--ink);
  padding: 0.75rem 0.95rem; border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  resize: vertical;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--rose-deep);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(232, 165, 184, 0.18);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5em; padding: 0.8em 1.4em;
  border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.02em; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.btn--primary { background: var(--rose); color: #fff; }
.btn--primary:hover { background: var(--rose-deep); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--danger { background: transparent; color: var(--danger); border-color: rgba(201, 89, 107, 0.3); }
.btn--danger:hover { background: var(--danger); color: #fff; }
.btn--sm { padding: 0.55em 1em; font-size: 0.82rem; }
.btn--icon { padding: 0.4em 0.7em; font-size: 0.85rem; }

/* ---------- APP LAYOUT ---------- */
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
}

.sidebar {
  background: var(--panel);
  padding: 2rem 1.4rem;
  display: flex; flex-direction: column; gap: 1.5rem;
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh;
}
@media (max-width: 900px) {
  .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
}
.sidebar__brand {
  font-family: var(--font-serif); font-weight: 500;
  font-size: 1.3rem; margin: 0; letter-spacing: -0.01em;
}
.sidebar__brand span { color: var(--rose-deep); }
.sidebar__nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.sidebar__link {
  text-align: left;
  background: transparent; border: 0;
  font-family: inherit; font-size: 0.93rem; color: var(--ink-soft);
  padding: 0.7em 0.9em; border-radius: 8px;
  cursor: pointer; transition: background 0.2s ease, color 0.2s ease;
}
.sidebar__link:hover { background: var(--bg-2); color: var(--ink); }
.sidebar__link.is-active {
  background: var(--rose); color: #fff; font-weight: 500;
}
.sidebar__foot { display: flex; flex-direction: column; gap: 0.5rem; }

/* ---------- CONTENT ---------- */
.content {
  padding: 2rem clamp(1.2rem, 3vw, 2.5rem);
  max-width: 980px; width: 100%;
}
.content__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap;
}
.content__breadcrumb {
  font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 0.3rem;
}
.content__title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 2rem; margin: 0; letter-spacing: -0.02em;
}
.content__head-right { display: flex; gap: 0.8rem; align-items: center; }
.content__saved {
  color: var(--rose-deep); font-size: 0.85rem; font-weight: 500;
  animation: fade 0.3s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- PANELS ---------- */
.panels { position: relative; }
.panel { display: none; flex-direction: column; gap: 1.4rem; }
.panel.is-active { display: flex; animation: panelIn 0.3s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.panel__row { display: contents; }
.panel__h3 {
  font-family: var(--font-serif); font-weight: 400; font-size: 1.15rem;
  margin: 1rem 0 0; padding-top: 1.2rem;
  border-top: 1px solid var(--line); letter-spacing: -0.01em;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.hint {
  font-size: 0.85rem; color: var(--muted); margin: 0;
  background: var(--bg-2); padding: 0.8rem 1rem; border-radius: 8px;
  line-height: 1.5;
}
.hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--panel); padding: 0.1em 0.4em; border-radius: 4px;
  font-size: 0.85em;
}

/* ---------- LISTS ---------- */
.list { display: flex; flex-direction: column; gap: 0.6rem; }
.list__item {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 0.6rem; align-items: center;
  background: var(--panel);
  padding: 0.7rem; border-radius: 10px;
  border: 1px solid var(--line);
}
.list__item input {
  padding: 0.6rem 0.8rem; border-radius: 6px;
  border: 1px solid var(--line); font-family: inherit; font-size: 0.92rem;
  background: var(--bg);
}
.list__item input:focus { border-color: var(--rose-deep); outline: none; }

.list--cards { gap: 1rem; }
.list__card {
  background: var(--panel);
  padding: 1.2rem 1.3rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.9rem;
}
.list__card-actions { display: flex; justify-content: flex-end; padding-top: 0.4rem; }

.actions-row { display: flex; gap: 0.7rem; flex-wrap: wrap; }
