/* Admin surfaces — same paper/ink language as the public site, built for a phone first. */

:root {
  --paper: #FAF5EC; --ink: #1A1712; --muted: #6E6353; --line: #E3D8C6;
  --card: #FFFDF8; --accent: #C0442A; --ok: #3C6E47; --bad: #A8321C;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45; }
a { color: inherit; }
h1 { font-size: 22px; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 10px; letter-spacing: .01em; }
.dim { color: var(--muted); font-weight: 500; }
.small { font-size: 12.5px; }

.abar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 5; }
.abrand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.01em; }
.mark { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.anav { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 700; }
.anav a { text-decoration: none; }
.inline { display: inline; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.linkbtn.danger { color: var(--bad); }

.awrap { max-width: 1020px; margin: 0 auto; padding: 18px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card.auth { max-width: 420px; margin: 8vh auto 0; }
.cols { display: grid; gap: 14px; }
@media (min-width: 880px) { .cols { grid-template-columns: 1.5fr 1fr; align-items: start; } }

.msg { padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; font-weight: 700; font-size: 13.5px; }
.msg.ok { background: rgba(60,110,71,.12); color: var(--ok); }
.msg.bad { background: rgba(168,50,28,.12); color: var(--bad); }

label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
input, select, button { font-family: inherit; font-size: 15px; }
label input, label select { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
label input:focus, label select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.stack { display: grid; gap: 12px; margin: 0; }
.stack.sm { gap: 10px; }
.grid2 { display: grid; gap: 12px; }
@media (min-width: 720px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid2 .full { grid-column: 1 / -1; }
fieldset { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; }
legend { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }
.right { text-align: right; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); font-weight: 800; cursor: pointer; }
.btn.tiny { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn:hover { opacity: .9; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 8px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl a { text-decoration: none; font-weight: 700; }
.count { font-size: 13px; color: var(--muted); font-weight: 700; margin-left: 6px; }

.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; background: rgba(26,23,18,.06); font-size: 11.5px; font-weight: 800; }
.pill.live { background: rgba(60,110,71,.14); color: var(--ok); }
.chip { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  font-size: 11.5px; font-weight: 800; cursor: pointer; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip.danger { border-color: rgba(168,50,28,.35); color: var(--bad); }

.picklist { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 700; background: #fff; min-height: 44px; display: inline-flex; align-items: center; }

.themes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.theme { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12.5px; font-weight: 800; text-transform: none; letter-spacing: 0; cursor: pointer; background: #fff; min-height: 44px; }
.theme.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.theme input { position: absolute; opacity: 0; pointer-events: none; }
.theme i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; }

.cathead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.itemform { display: flex; gap: 10px; flex: 1 1 auto; min-width: 0; }
.ithumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: rgba(26,23,18,.05); }
.ithumb.empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 18px; }
.ifields { flex: 1 1 auto; min-width: 0; display: grid; gap: 6px; }
.ifields input { width: 100%; padding: 9px 10px; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.irow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.irow input[name="price"] { width: 96px; flex: 0 0 auto; }
.irow input[type="file"] { font-size: 12px; max-width: 190px; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--muted); }
.switch input { width: auto; min-height: 0; margin: 0; }
.additem { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.additem input { flex: 1 1 140px; min-height: 40px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; }
.lbl { display: block; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* premium extras */
label textarea { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; resize: vertical; }
.hero-prev { display: block; width: 100%; max-width: 320px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; margin: 8px 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.gallery-grid figure { margin: 0; position: relative; }
.gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }
.gallery-grid form { position: absolute; top: 6px; right: 6px; }
.gallery-grid .chip { background: rgba(255,255,255,.92); min-height: 26px; padding: 0 8px; font-size: 10.5px; }
