/* Portal for clubs and breeders: clean, institutional, muted (CLAUDE.md, "Design direction").
   Standalone page — no theme, no WordPress admin CSS. The club/breeder pages reuse a few
   WordPress class names (button, widefat, notice …), which are styled here. */
:root {
	/* Pepi.dog club mode: white, ink text, forest actions, 1px line borders, no shadows. */
	--p-bg: #FFFFFF; --p-panel: #FFFFFF; --p-ink: #1F2A37; --p-muted: #636873; --p-line: #E4DDD2;
	--p-accent: #2F5D50; --p-accent-dark: #23473D; --p-ok: #2E7D4F; --p-ok-bg: #E3ECE8; --p-err: #B3261E; --p-err-bg: #FBEAE8; --p-info-bg: #E3ECE8;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.bh-portal {
	background: var(--p-bg); color: var(--p-ink);
	font: 15px/1.5 "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
	min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--p-accent); }
a:hover { color: var(--p-accent-dark); }

/* ── Top bar ── */
.bh-portal-bar { background: #fff; color: var(--p-ink); border-bottom: 1px solid var(--p-line); }
.bh-portal-inner { max-width: 1180px; margin: 0 auto; padding: 0.75rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; }
.bh-portal-brand { display: flex; align-items: center; gap: 0.6rem; color: var(--p-muted); text-decoration: none; font-size: 0.85rem; }
.bh-portal-brand img { height: 28px; width: auto; min-width: 80px; display: block; }
.bh-portal-brand span { padding-left: 0.6rem; border-left: 1px solid var(--p-line); }
.bh-portal-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; flex: 1; }
.bh-portal-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem; }
.bh-portal-group-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--p-muted); margin-right: 0.4rem; }
.bh-portal-nav a { color: var(--p-ink); text-decoration: none; padding: 0.35rem 0.6rem; border-radius: 6px; font-size: 0.92rem; }
.bh-portal-nav a:hover { background: #F7F1E8; }
.bh-portal-nav a[aria-current="page"] { background: var(--p-ok-bg); color: var(--p-accent-dark); font-weight: 600; }
.bh-portal-user { display: flex; gap: 1rem; align-items: center; font-size: 0.88rem; color: var(--p-muted); }
.bh-portal-user a { color: var(--p-accent); }

.bh-portal-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.bh-portal-foot { text-align: center; padding: 1.25rem; font-size: 0.85rem; color: var(--p-muted); }

/* ── Page chrome from the area pages ── */
.bh-portal .wrap { margin: 0; }
.bh-portal .bh-admin { max-width: none; }
.bh-portal .bh-admin-head { margin-top: 0; }
.bh-portal h1 { font-size: 1.6rem; line-height: 1.2; font-weight: 650; margin: 0; }
.bh-portal h2 { font-size: 1.05rem; font-weight: 650; margin: 0 0 0.75rem; }
.bh-portal .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bh-portal .bh-static { margin: 0.2rem 0; font-weight: 600; }

/* Buttons */
.bh-portal .button { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.5rem 0.95rem; border: 1px solid var(--p-line); border-radius: 10px; background: #fff; color: var(--p-ink); font: inherit; font-size: 0.92rem; line-height: 1.2; text-decoration: none; cursor: pointer; }
.bh-portal .button:hover { border-color: var(--p-accent); color: var(--p-accent); }
.bh-portal .button-primary { background: var(--p-accent); border-color: var(--p-accent); color: #fff; }
.bh-portal .button-primary:hover { background: var(--p-accent-dark); border-color: var(--p-accent-dark); color: #fff; }
.bh-portal .button-large { padding: 0.65rem 1.25rem; font-size: 1rem; }

/* Form controls */
.bh-portal input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .bh-portal select, .bh-portal textarea {
	font: inherit; color: var(--p-ink); background: #fff; border: 1px solid #c3c9ce; border-radius: 5px; padding: 0.5rem 0.6rem; min-height: 2.4rem;
}
.bh-portal input:focus, .bh-portal select:focus, .bh-portal textarea:focus { outline: 2px solid var(--p-accent); outline-offset: 0; border-color: var(--p-accent); }
.bh-portal input[type=checkbox], .bh-portal input[type=radio] { accent-color: var(--p-accent); }
.bh-portal .regular-text { width: 100%; max-width: 22rem; }
.bh-portal .small-text { width: 6rem; }
.bh-portal .bh-form select, .bh-portal .bh-form input:not([type=checkbox]):not([type=radio]) { width: 100%; }
.bh-portal .bh-field { display: flex; flex-direction: column; }

/* Tables */
.bh-portal .widefat { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--p-line); border-radius: 6px; overflow: hidden; }
.bh-portal .widefat th { text-align: left; font-size: 0.82rem; font-weight: 600; color: var(--p-muted); background: #f8f9fa; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--p-line); }
.bh-portal .widefat td { padding: 0.7rem 0.75rem; border-bottom: 1px solid #eceff1; vertical-align: middle; }
.bh-portal .widefat tbody tr:last-child td { border-bottom: 0; }
.bh-portal .bh-table tbody tr:nth-child(odd) { background: #fff; }
.bh-portal .bh-table tbody tr:hover { background: #fafbfc; }
@media (max-width: 760px) {
	.bh-portal .widefat, .bh-portal .widefat tbody, .bh-portal .widefat tr, .bh-portal .widefat td { display: block; width: 100%; }
	.bh-portal .widefat thead { display: none; }
	.bh-portal .widefat tr { border-bottom: 1px solid var(--p-line); padding: 0.4rem 0; }
	.bh-portal .widefat td { border: 0; padding: 0.3rem 0.75rem; }
	.bh-portal .bh-actions-col { text-align: left; }
}

/* Notices */
.bh-portal .notice { position: relative; margin: 0 0 1rem; padding: 0.7rem 1rem; border-radius: 6px; border: 1px solid var(--p-line); background: #fff; border-left-width: 4px; }
.bh-portal .notice p, .bh-portal .notice ul { margin: 0; }
.bh-portal .notice-success { border-left-color: var(--p-ok); background: var(--p-ok-bg); }
.bh-portal .notice-error { border-left-color: var(--p-err); background: var(--p-err-bg); }
.bh-portal .notice-info { border-left-color: var(--p-accent); background: var(--p-info-bg); }
.bh-portal .notice-dismiss { display: none; }

/* Panels */
.bh-portal .bh-box { border-radius: 6px; }
.bh-portal .bh-stat { border-radius: 6px; }

/* ── Login ── */
.bh-login { max-width: 26rem; margin: 2rem auto; background: #fff; border: 1px solid var(--p-line); border-radius: 10px; padding: 1.75rem; }
.bh-login h1 { margin-bottom: 0.4rem; }
.bh-login-form { display: flex; flex-direction: column; gap: 0.85rem; margin: 1rem 0; }
.bh-login-form label:not(.bh-check) { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; font-weight: 600; }
.bh-login-form input:not([type=checkbox]) { width: 100%; }
.bh-login-form .bh-check { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.bh-login-form .button { justify-content: center; }

/* Breed-question prompt */
.bh-nav-badge { display: inline-flex; min-width: 1.35rem; height: 1.35rem; align-items: center; justify-content: center; margin-left: 0.35rem; padding: 0 0.35rem; border-radius: 999px; background: #D9774B; color: #1F2A37; font-size: 0.75rem; font-weight: 700; }
.bh-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin: 0 0 1.25rem; padding: 1.4rem 1.5rem; border-radius: 8px; background: var(--p-accent); color: #fff; }
.bh-ask-text { flex: 1 1 26rem; }
.bh-ask h2 { color: #fff; font-size: 1.25rem; margin: 0.15rem 0 0.4rem; }
.bh-ask p { margin: 0; color: #F7F1E8; max-width: 44rem; }
.bh-ask .bh-ask-kicker { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #F6E2D6; }
.bh-portal .bh-ask .button-primary { background: #F7F1E8; border-color: #F7F1E8; color: var(--p-accent-dark); font-weight: 600; }
.bh-portal .bh-ask .button-primary:hover { background: #fff; border-color: #fff; color: var(--p-accent-dark); }

/* Photos */
.bh-photos h2 { margin-bottom: 0.75rem; }
.bh-photo-grid { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.bh-photo-grid li { position: relative; display: flex; flex-direction: column; gap: 0.35rem; }
.bh-photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--p-line); }
.bh-photo-grid .button { justify-content: center; padding: 0.3rem 0.5rem; font-size: 0.8rem; }
.bh-photo-tag { position: absolute; top: 0.4rem; left: 0.4rem; background: var(--p-accent); color: #fff; font-size: 0.72rem; padding: 0.1rem 0.45rem; border-radius: 3px; }
.bh-upload { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Voluntary support (Revenue::support_box / portal_header_link): warm, clearly visible, but a
   box at the end of the page — never a pop-up. Terracotta fill with ink text (brand rule). */
.bh-portal-support { display: inline-flex; align-items: center; gap: 0.35rem; background: #F6E2D6; color: #1F2A37 !important; border: 1px solid #D9774B; border-radius: 999px; padding: 0.3rem 0.8rem; font-weight: 600; text-decoration: none; }
.bh-portal-support:hover { background: #D9774B; }
.bh-portal-support .bh-heart, .bh-support-button .bh-heart { color: #A9502A; flex: none; }
.bh-portal-support:hover .bh-heart { color: #1F2A37; }
.bh-support { display: flex; gap: 1.25rem; align-items: flex-start; background: #F6E2D6; border: 1px solid #D9774B; border-left: 6px solid #D9774B; border-radius: 10px; padding: 1.4rem 1.5rem; margin: 1.5rem 0 1rem; }
.bh-support-mark { flex: none; width: 56px; height: 56px; border-radius: 12px; background: #fff; padding: 6px; }
.bh-support h2 { margin: 0 0 0.4rem; font-size: 1.25rem; }
.bh-support p { margin: 0 0 0.75rem; max-width: 62ch; }
.bh-support .bh-quiet { margin: 0; font-size: 0.85rem; }
.bh-support-button { display: inline-flex; align-items: center; gap: 0.45rem; background: #D9774B; color: #1F2A37 !important; border-radius: 8px; padding: 0.7rem 1.3rem; font-weight: 700; font-size: 1rem; text-decoration: none; }
.bh-support-button:hover { background: #A9502A; color: #fff !important; }
.bh-support-button:hover .bh-heart { color: #fff; }
@media (max-width: 600px) { .bh-support { flex-direction: column; } }
