/* Balance with Paula admin — sage brand, phone-first */
:root {
  --bg: #FAF8F4; --card: #fff; --primary: #A6AA88; --primary-soft: #EDEFE2;
  --rose: #D98A9E; --rose-soft: #F6E3E8; --text: #3F413A; --muted: #8F9188;
  --border: #E9E9E0; --danger: #C96F6F;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
h1 { font-size: 24px; margin: 8px 0 4px; } h2 { font-size: 19px; }
a { color: var(--text); }
.muted { color: var(--muted); } .error { color: var(--danger); font-weight: 600; }
.flash { background: var(--primary-soft); padding: 10px 16px; text-align: center; }

.topbar { display: flex; align-items: center; gap: 16px; padding: 10px 16px;
  background: var(--card); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { font-weight: 800; text-decoration: none; letter-spacing: .3px; }
.brand span { color: var(--primary); }
.topbar nav { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; font-weight: 600; font-size: 15px; }
.logout button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; }

.card { background: var(--card); border-radius: 16px; padding: 20px;
  box-shadow: 0 4px 12px rgba(62,46,49,.08); margin-top: 12px; }
.card.narrow { max-width: 400px; margin: 48px auto; }

label { display: block; margin: 14px 0 0; font-weight: 600; font-size: 15px; }
input:not([type=checkbox]):not([type=file]), select, textarea { display: block; width: 100%;
  margin-top: 6px; padding: 12px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; background: #fff; color: var(--text); }
textarea { resize: vertical; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-top: 16px; }
label.check input { width: 22px; height: 22px; accent-color: var(--primary); }
small.muted { display: block; font-weight: 400; margin-top: 4px; }

button, .button { display: inline-block; border: none; border-radius: 999px; padding: 12px 22px;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--primary-soft); color: var(--text); }
button.primary, .button.primary { background: var(--primary); color: #fff; }
button.pub-btn { background: var(--rose); color: #fff; }
button.danger { background: none; color: var(--danger); font-weight: 600; margin-top: 20px; padding: 6px 0; }
.actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tile { background: var(--card); border-radius: 16px; padding: 20px; text-decoration: none;
  font-weight: 700; box-shadow: 0 4px 12px rgba(62,46,49,.08); }
.tile-n { display: block; font-size: 30px; color: var(--primary); }

.listhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.rows { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.rows a { display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: 14px; padding: 10px; text-decoration: none; box-shadow: 0 2px 8px rgba(62,46,49,.06); }
.rows img, .noimg { width: 64px; height: 48px; object-fit: cover; border-radius: 8px;
  background: var(--primary-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.rowmain { flex: 1; min-width: 0; }
.rowmain strong { display: block; font-size: 15px; }
.rowmain small { color: var(--muted); }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge.pub { background: var(--primary-soft); color: #5d6247; }
.badge.draft { background: var(--rose-soft); color: #a15b6d; }

img.preview { display: block; max-width: 220px; border-radius: 10px; margin: 8px 0; }
.md-preview { border: 1px dashed var(--border); border-radius: 10px; padding: 4px 16px; margin-top: 8px; }
details summary { cursor: pointer; font-weight: 600; margin-top: 12px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px; }
code { background: var(--primary-soft); border-radius: 4px; padding: 1px 5px; }
