/* ============================================================
   TERRA VIVA — admin (usa os tokens de styles.css)
   ============================================================ */
body.admin { min-height: 100vh; }
[hidden] { display: none !important; }

.adm-top { display: flex; align-items: center; gap: 14px; padding: 18px 24px;
  border-bottom: 1px solid rgba(122,95,75,.18); }
.adm-brand img { height: 40px; width: auto; }
.adm-badge { font-family: var(--font-hand); font-size: 24px; color: var(--accent); }
.adm-logout { margin-left: auto; padding: 9px 18px; }

/* login */
.adm-login { max-width: 400px; margin: 10vh auto 0; padding: 34px 30px; }
.adm-login h1 { font-size: 34px; margin-bottom: 6px; }
.adm-login p { color: var(--clay-brown); margin: 0 0 22px; }
.adm-login form { display: flex; flex-direction: column; gap: 14px; }
.adm-login .btn { justify-content: center; margin-top: 6px; }

/* campos */
.admin label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--clay-brown); }
.admin input[type=email], .admin input[type=password], .admin input:not([type]), .admin input[type=number] {
  font: inherit; font-size: 16px; color: var(--near-black); padding: 12px 14px;
  border: 1.5px solid rgba(122,95,75,.28); border-radius: 12px; background: var(--cream-soft); }
.admin input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(144,160,124,.25); }
.adm-error { color: var(--terracotta-deep); font-size: 14px; min-height: 1em; }

/* painel */
.adm-main { max-width: 920px; margin: 0 auto; padding: 36px 20px 80px; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.adm-head h1 { font-size: 38px; margin-top: 6px; }
.adm-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.adm-back { margin: -12px 0 22px !important; font-size: 14px; }
.adm-back a { color: var(--sage-deep); }
.adm-hint { color: var(--clay-brown); font-size: 14px; margin: 12px 0 26px; }

.adm-list { display: flex; flex-direction: column; gap: 12px; }
.adm-item { display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; }
.adm-item.off { opacity: .55; }
.adm-item .thumb { width: 64px; height: 76px; border-radius: 12px; overflow: hidden; flex: none; background: var(--cream-deep); }
.adm-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-item .info { flex: 1; min-width: 0; }
.adm-item h3 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-item .meta { font-size: 13px; color: var(--clay-brown); margin-top: 2px; }
.adm-item .price { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--accent-deep); white-space: nowrap; }
.adm-item .edit { padding: 9px 16px; }
.adm-pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: rgba(122,95,75,.14); margin-left: 6px; }
.adm-empty { text-align: center; color: var(--clay-brown); padding: 50px 0; font-family: var(--font-hand); font-size: 26px; }

/* formulário */
.adm-drawer { width: min(460px, 100vw); }
.adm-form { flex: 1; overflow-y: auto; padding: 8px 26px 26px; display: flex; flex-direction: column; gap: 14px; }
.adm-row { display: grid; grid-template-columns: 1fr 110px; gap: 12px; }
.adm-check { flex-direction: row !important; align-items: center; gap: 10px !important; font-size: 15px !important; color: var(--near-black) !important; }
.adm-check input { width: 20px; height: 20px; accent-color: var(--sage-deep); }
.adm-photo { position: relative; aspect-ratio: 4/5; max-height: 300px; border-radius: 16px; overflow: hidden; cursor: pointer;
  border: 2px dashed rgba(122,95,75,.35); background: var(--cream-soft); align-items: center; justify-content: center; text-align: center; }
.adm-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.adm-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.adm-photo small { color: var(--clay-light); }
.adm-form-foot { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.adm-form-foot .btn { justify-content: center; }
.adm-delete { color: var(--terracotta-deep); }
.btn[disabled] { opacity: .55; pointer-events: none; }

@media (max-width: 600px) {
  .adm-item { flex-wrap: wrap; }
  .adm-item .info { flex-basis: calc(100% - 80px); }
  .adm-item .price { margin-left: 80px; }
  .adm-item .edit { margin-left: auto; }
  .adm-head h1 { font-size: 30px; }
}
