/* Shared look for every page. Colours come from /theme.css (set on the Admin page).
   The values below are only fallbacks. */
:root {
  --brand: #c8102e; --brand-contrast: #ffffff; --accent: #f5a300; --bg: #fffaf3; --surface: #ffffff;
  --text: #231f20; --muted: #6b6460; --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ok: #1b7f3b; --warn: #b45309; --bad: #b00020; --line: color-mix(in srgb, var(--text) 14%, transparent);
  --brand-dark: color-mix(in srgb, var(--brand) 82%, black);
  --radius: 14px; --shadow: 0 2px 10px rgba(0, 0, 0, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site-header { background: var(--brand); color: var(--brand-contrast); }
.site-header .wrap { display: flex; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.site-header a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.logo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #fff; }
.site-header h1 { font-size: 1.25rem; margin: 0; }
.site-header .tag { font-size: .85rem; opacity: .9; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--brand); background: var(--brand); color: var(--brand-contrast); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.secondary { background: transparent; color: var(--brand-dark); }
.btn.secondary:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 12px 0; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="time"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
textarea { min-height: 80px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; }

.banner { padding: 12px 16px; border-radius: 10px; margin: 12px 0; font-weight: 600; }
.banner.info { background: color-mix(in srgb, var(--accent) 25%, white); }
.banner.warn { background: #fde8c8; color: #6b3a00; }
.banner.bad { background: #fde0e4; color: var(--bad); }
.banner.ok { background: #dff5e6; color: #11502a; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 800; background: var(--accent); color: #231f20; }
.badge.bad { background: var(--bad); color: #fff; }
.badge.ok { background: var(--ok); color: #fff; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #231f20; color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 50; max-width: 90vw; }
dialog { border: none; border-radius: 18px; padding: 0; max-width: 560px; width: calc(100% - 24px); max-height: 90vh; color: var(--text); background: var(--surface); }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
.dialog-body { padding: 18px; overflow: auto; max-height: calc(90vh - 80px); }
.dialog-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.site-footer { margin: 32px 0 24px; font-size: .9rem; color: var(--muted); text-align: center; }
.site-footer a { margin: 0 8px; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.stack > * + * { margin-top: 8px; }
