:root {
  --g900: #17131c; --g800: #2c2136; --gold: #c9a227; --orchid: #a94bbf; --cream: #faf1f8;
  --ink: #201a26; --muted: #7b7285; --line: rgba(23,19,28,.12);
  --font-head: "Playfair Display", Georgia, serif; --font-body: "Poppins", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body.admin { font-family: var(--font-body); background: var(--cream); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
a { text-decoration: none; color: inherit; }
h1, h2, h3 { font-family: var(--font-head); color: var(--g900); }

.adm-top { background: var(--g900); color: #fff; }
.adm-top-in { max-width: 1200px; margin: 0 auto; padding: 12px 18px; display: flex; align-items: center; gap: 16px; }
.adm-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; }
.logo-img-adm { height: 44px; width: auto; border-radius: 10px; }
.login-logo { height: 88px; width: auto; border-radius: 16px; margin: 0 auto 16px; display: block; }
.adm-brand .mark { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--g800), var(--gold)); display: grid; place-items: center; }
.adm-brand small { display: block; font-family: var(--font-body); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.adm-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.adm-nav a { color: rgba(255,255,255,.85); font-size: .9rem; }
.adm-nav a:hover { color: var(--gold); }
.adm-nav .badge-novos { background: #e0492f; color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.adm-sair { border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 6px 14px; }

.adm-main { flex: 1; max-width: 1200px; margin: 0 auto; width: 100%; padding: 26px 18px 60px; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.adm-sub { color: var(--muted); font-size: .88rem; }

.btn-adm { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, var(--g800), var(--g900)); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; font-weight: 600; cursor: pointer; font-family: var(--font-body); }
.btn-adm:hover { filter: brightness(1.08); }
.btn-lite { background: #fff; color: var(--g900); border: 1px solid var(--line); }
.btn-danger { background: #fff; color: #b52a1a; border: 1px solid rgba(181,42,26,.4); }
.btn-mini { padding: 7px 13px; font-size: .8rem; border-radius: 10px; }

.card-adm { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card-adm .pad { padding: 18px; }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.filtros input, .filtros select, .campo input, .campo select, .campo textarea {
  padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 10px; font-family: var(--font-body); font-size: .9rem; width: 100%; background: #fff;
}
.filtros input { max-width: 300px; }
.filtros select { max-width: 220px; }
.campo { margin-bottom: 14px; }
.campo label { display: block; font-size: .82rem; font-weight: 600; color: var(--g800); margin-bottom: 6px; }
.campo .dica { font-size: .76rem; color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.check input { width: auto; }

.tab { width: 100%; border-collapse: collapse; }
.tab th, .tab td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: .88rem; vertical-align: middle; }
.tab th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #f5efe3; }
.thumb { width: 70px; height: 54px; object-fit: cover; border-radius: 9px; }
.slug { display: block; font-size: .72rem; color: var(--muted); }
.preco { font-weight: 700; color: var(--gold); white-space: nowrap; }
.acoes { display: flex; gap: 8px; justify-content: flex-end; align-items: flex-start; }
.cel { display: block; min-width: 0; }
.cel.btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.status { display: inline-block; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.st-novo { background: #ffe9e2; color: #b52a1a; }
.st-em_preparo { background: #fff3d6; color: #8a6a12; }
.st-saiu_entrega { background: #e3ecff; color: #2b4a9b; }
.st-concluido { background: #e2f5e7; color: #1f6b3a; }
.st-cancelado { background: #eee; color: #666; }
.linha-nova { background: #fffaf2; }

.foto-preview { border: 1.5px dashed var(--line); border-radius: 12px; min-height: 180px; display: grid; place-items: center; overflow: hidden; background: var(--cream); color: var(--muted); text-align: center; font-size: .82rem; }
.foto-preview img { width: 100%; height: 100%; object-fit: cover; }

.ped-detalhe { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.ped-info { display: grid; gap: 8px; font-size: .9rem; }
.ped-info strong { color: var(--g900); }
.ped-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; font-family: var(--font-head); font-size: 1.3rem; }

.adm-login { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(120% 90% at 80% 0%, rgba(169,75,191,.22), transparent 55%), linear-gradient(180deg, #17131c, #0a0810); padding: 24px; }
.adm-login form { background: #fff; border-radius: 20px; padding: 38px 32px; width: min(400px, 92vw); text-align: center; box-shadow: 0 30px 70px rgba(0,0,0,.4); }
.adm-login h1 { font-size: 1.5rem; margin-bottom: 6px; }
.adm-login .sub { color: var(--muted); font-size: .9rem; margin-bottom: 22px; }
.adm-login .mark { width: 68px; height: 68px; border-radius: 18px; background: linear-gradient(135deg, var(--g800), var(--gold)); display: grid; place-items: center; margin: 0 auto 16px; }
.voltar { display: inline-block; margin-top: 16px; font-size: .84rem; color: var(--muted); }

.alerta { border-radius: 10px; padding: 11px 15px; font-size: .88rem; margin-bottom: 16px; }
.alerta-ok { background: #e2f5e7; border: 1px solid #b6e2c2; }
.alerta-erro { background: #ffe9e2; border: 1px solid #f2b8ab; }
.adm-footer { text-align: center; padding: 16px; font-size: .76rem; color: var(--muted); border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .ped-detalhe { grid-template-columns: 1fr; }
  .adm-top-in { flex-wrap: wrap; }
  .adm-nav { margin-left: 0; width: 100%; gap: 16px; flex-wrap: wrap; padding: 6px 0 2px; }
  .adm-nav a { font-size: .85rem; }
}

/* ---- Mobile: formularios e tabelas viram "cartoes" ---- */
@media (max-width: 720px) {
  .adm-main { padding: 18px 12px 48px; }
  .adm-head { flex-direction: column; align-items: stretch; }
  .adm-head .btn-adm { width: 100%; }
  .filtros { flex-direction: column; }
  .filtros input, .filtros select { max-width: none; }
  .filtros .btn-adm { width: 100%; }

  .card-adm { border: 0; background: transparent; overflow: visible; }
  .card-adm .pad { padding: 0; }

  .tab thead { display: none; }
  .tab, .tab tbody, .tab tr, .tab td { display: block; width: 100%; }
  .tab tr { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; padding: 4px 14px; }
  .tab td { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px dashed var(--line); padding: 11px 0; }
  .tab td:last-child { border-bottom: 0; }
  .tab td::before { content: attr(data-label); flex: none; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .tab td[colspan]::before { content: none; }
  .tab td[colspan] { justify-content: center; }
  .tab td .cel { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
  .tab td .cel.btns { flex-direction: row; align-items: center; }
  .tab .thumb { width: 60px; height: 46px; }
  .tab .oculta-vazia { display: none; }
}
