:root {
  --maroon: #7a1f3d;
  --maroon-dark: #5c1830;
  --gold: #b88a2e;
  --ivory: #fffaf3;
  --ink: #2b2226;
  --muted: #6b5f64;
  --line: #eadfd2;
  --card: #ffffff;
  --ok: #1d6b3a;
  --warn: #8a5a00;
  --bad: #a11d33;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.55;
}
a { color: var(--maroon); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.3rem; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 20px; padding-bottom: 40px; min-height: 60vh; }
.small { font-size: .88rem; color: var(--muted); }
.muted { color: var(--muted); }

/* Header */
#site-header { background: var(--maroon); color: #fff; border-bottom: 3px solid var(--gold); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.nav a { color: #fff; text-decoration: none; font-size: .95rem; }
.nav a:hover { text-decoration: underline; }
.who { font-size: .9rem; margin-right: 8px; }
#auth-box { display: inline-flex; align-items: center; }

/* Buttons and forms */
.btn {
  display: inline-block; cursor: pointer; border: 1px solid var(--gold);
  background: var(--gold); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 1rem; text-decoration: none; font-weight: 600;
}
.btn:hover { filter: brightness(.95); }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
#site-header .btn.ghost { color: #fff; }
.btn.maroon { background: var(--maroon); border-color: var(--maroon); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.ok { background: var(--ok); border-color: var(--ok); }
.btn.outline { background: #fff; color: var(--maroon); border-color: var(--maroon); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
label { display: block; font-weight: 600; margin: 14px 0 4px; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=search], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: 10px 12px; font-size: 1rem; border: 1px solid #cdbfae;
  border-radius: 8px; background: #fff; color: var(--ink); font-family: inherit;
}
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 18px; }
.check input { margin-top: 5px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Notices */
.notice { padding: 12px 14px; border-radius: 8px; margin: 12px 0; border: 1px solid var(--line); background: #fff; }
.notice.warn { border-color: #e6c27a; background: #fff6df; color: var(--warn); }
.notice.ok { border-color: #a9d8b8; background: #eaf8ef; color: var(--ok); }
.notice.bad { border-color: #e7a9b3; background: #fdecef; color: var(--bad); }

/* Home */
.hero { padding: 10px 0 6px; }
.hero p { margin: 0; color: var(--muted); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 16px 0 6px; }
.filters label { margin: 0 0 3px; font-size: .85rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
}
.card-img { width: 100%; height: 170px; object-fit: cover; display: block; background: #f1e8dc; }
.placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .9rem; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { font-size: 1.1rem; margin: 0; }
.tag { display: inline-block; background: #f6ecda; color: #6a4b05; border-radius: 999px; padding: 2px 10px; font-size: .8rem; margin-right: 6px; }
.card-body .btn { margin-top: auto; text-align: center; }

/* Provider page */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 14px 0; }
.gallery img { width: 100%; height: 190px; object-fit: cover; border-radius: 10px; background: #f1e8dc; }
.desc { white-space: pre-wrap; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 14px 0; }

/* Admin */
.tabs { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.row { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; display: grid; gap: 6px; }
.row .thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.row .thumbs img { width: 90px; height: 70px; object-fit: cover; border-radius: 6px; background: #f1e8dc; }

/* Footer and toast */
#site-footer { border-top: 1px solid var(--line); padding: 16px 0 28px; background: #fff; }
#toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(30px);
  background: #2b2226; color: #fff; padding: 12px 16px; border-radius: 10px; max-width: 90vw;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 50;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.legal h2 { margin-top: 24px; }
.legal li { margin: 4px 0; }
[hidden] { display: none !important; }
