/* ====================================================
   Painel administrativo — Ateliê Carol Carvalho
   ==================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --orange: #ee4023; --blue: #1b6fc0; --magenta: #b83a8c;
  --brand: linear-gradient(120deg, #ee4023 0%, #b83a8c 52%, #1b6fc0 100%);
  --ink: #16223a; --body: #51596b; --muted: #9aa0b2; --line: #e6e8f0;
  --bg: #f4f6fb; --card: #fff; --radius: 14px;
  --font-head: "Poppins", sans-serif; --font-body: "Inter", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--bg); color: var(--body); line-height: 1.5; }
h1, h2 { font-family: var(--font-head); color: var(--ink); }
img { display: block; max-width: 100%; }

/* ---------- Login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: var(--bg); }
.login-card { background: var(--card); width: 100%; max-width: 380px; padding: 38px 32px; border-radius: 18px; box-shadow: 0 18px 50px rgba(22,34,58,.1); display: flex; flex-direction: column; gap: 14px; }
.login-logo { height: 60px; width: auto; margin: 0 auto 6px; }
.login-card h1 { font-size: 1.4rem; text-align: center; }
.login-sub { text-align: center; color: var(--muted); font-size: .92rem; margin-bottom: 6px; }

/* ---------- Topo ---------- */
.admin-top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.admin-top__in { max-width: 1000px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.admin-logo { height: 46px; width: auto; }
.admin-top__actions { display: flex; gap: 10px; }

/* ---------- Layout ---------- */
.admin-wrap { max-width: 1000px; margin: 0 auto; padding: 28px 24px 80px; }

/* ---------- Alertas ---------- */
.alert { padding: 13px 18px; border-radius: 10px; margin-bottom: 20px; font-size: .94rem; font-weight: 500; }
.alert--ok { background: #e7f7ee; color: #137a45; border: 1px solid #b6e6cb; }
.alert--erro { background: #fde9e7; color: #c0341d; border: 1px solid #f6c5bd; }

/* ---------- Abas ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.tab { font-family: var(--font-head); font-weight: 600; font-size: .95rem; padding: 11px 22px; border: 1px solid var(--line); background: var(--card); color: var(--body); border-radius: 999px; cursor: pointer; transition: .2s; }
.tab.is-active { background: var(--brand); color: #fff; border-color: transparent; }
.panel { display: none; }
.panel.is-active { display: block; }

/* ---------- Cards / formulário ---------- */
.card-admin { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 26px; }
.card-admin h2 { font-size: 1.2rem; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label, .form-inline label { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-head); font-weight: 600; font-size: .88rem; color: var(--ink); }
input[type="text"], input[type="password"], select, textarea, input[type="file"] {
  font-family: var(--font-body); font-size: .95rem; color: var(--ink);
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
textarea { resize: vertical; font-weight: 400; }
.checks { grid-column: 1 / -1; display: flex; gap: 24px; flex-wrap: wrap; }
.check { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.check input { width: auto; }
.hint { font-weight: 400; font-size: .82rem; color: var(--muted); }
.form-actions { display: flex; gap: 10px; }

/* ---------- Botões ---------- */
.btn-admin { font-family: var(--font-head); font-weight: 600; font-size: .9rem; padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: .2s; }
.btn-admin:hover { border-color: var(--blue); color: var(--blue); }
.btn-admin--primary { background: var(--brand); color: #fff; border-color: transparent; }
.btn-admin--primary:hover { color: #fff; opacity: .92; }
.btn-admin--ghost { background: transparent; }
.btn-admin--sm { padding: 8px 14px; font-size: .82rem; }
.btn-admin--danger { color: var(--orange); border-color: #f3c9c1; }
.btn-admin--danger:hover { background: var(--orange); color: #fff; border-color: transparent; }

/* ---------- Lista de produtos ---------- */
.list { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.row__thumb { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: #eef0f7; display: grid; place-items: center; }
.row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.row__thumb span { font-size: .68rem; color: var(--muted); }
.row__info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.row__info strong { font-family: var(--font-head); color: var(--ink); }
.row__meta { font-size: .84rem; color: var(--muted); }
.row__actions { display: flex; gap: 8px; align-items: center; }
.row__actions form { margin: 0; }

/* ---------- Galeria ---------- */
.form-inline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-inline input[type="file"] { width: auto; flex: 1; min-width: 220px; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.gal-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; border: 1px solid var(--line); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }
.gal-item form { position: absolute; top: 8px; right: 8px; margin: 0; }
.gal-del { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.gal-del:hover { background: var(--orange); }

.empty { color: var(--muted); padding: 30px; text-align: center; }

@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; }
}
