/* ==========================================================================
   Admin area B2 — website content (CMS), email log, audit log, settings
   Prefix: .b2-*   (reuses .adm-form-grid, .adm-actionbar, .adm-actions, .adm-serp, .adm-chip from admin-a.css)
   ========================================================================== */

/* ---------- shared bits ---------- */
.tabs a{display:inline-flex;align-items:center;gap:7px}
.tabs .b2-count{display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 6px;border-radius:99px;background:var(--line-2);color:var(--muted);font-size:.72rem;font-weight:700}
.tabs a.active .b2-count{background:var(--brand-100);color:var(--brand-ink)}
.b2-title{display:block;font-weight:600;color:var(--ink);overflow-wrap:break-word}
a.b2-title:hover{color:var(--brand-ink)}
.b2-sub{display:block;margin-top:1px;font-size:.78rem;font-weight:400;color:var(--muted);overflow-wrap:break-word}
.b2-flush.table-wrap{border:0;border-radius:0}
.b2-help-row{display:flex;justify-content:space-between;gap:12px}
.b2-help-row .mono{flex-shrink:0;color:var(--muted)}
.b2-help-row .is-over{color:var(--red);font-weight:700}
.b2-h{font-size:1.05rem;margin:0 0 12px}
.b2-col{min-width:0}
.b2-col .panel:last-child{margin-bottom:0}
.b2-suggest{display:flex;flex-wrap:wrap;gap:6px;margin:-6px 0 16px}
.b2-suggest .chip{padding:3px 11px;font-size:.78rem}
.b2-serp-url{color:#188038}
.b2-date{display:inline-flex;align-items:center;gap:8px}
.b2-date .input{width:158px;min-width:0}
@media (max-width:680px){.b2-date{flex:1 1 100%}.b2-date .input{flex:1;width:auto}}

/* ---------- CMS ---------- */
.b2-editor{margin-bottom:28px;scroll-margin-top:84px}
.b2-editor-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.b2-editor-head h2,.b2-editor .panel-head h2{margin:0;font-size:1.25rem}
.panel-head h2{margin:0;font-size:1.1rem}
.b2-slug{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.b2-slug>span{font-size:.82rem;overflow-wrap:anywhere}
.b2-slug .input{flex:1 1 200px;min-width:0}
.b2-md-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}
.b2-seg{display:inline-flex;border:1.5px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}
.b2-seg button{padding:6px 16px;border:0;background:none;font:inherit;font-size:.86rem;font-weight:600;color:var(--muted);cursor:pointer}
.b2-seg button+button{border-left:1.5px solid var(--line)}
.b2-seg button.active{background:var(--brand);color:#fff}
.b2-md-input{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9rem;line-height:1.6;min-height:360px}
.b2-md-preview{min-height:360px;max-height:640px;overflow:auto;padding:18px 22px;border:1.5px solid var(--line);border-radius:12px;background:#fff}
.b2-prose{color:var(--text);line-height:1.7;overflow-wrap:anywhere}
.b2-prose>*:first-child{margin-top:0}
.b2-prose h1,.b2-prose h2,.b2-prose h3,.b2-prose h4{margin:1.4em 0 .5em}
.b2-prose h1{font-size:1.6rem}.b2-prose h2{font-size:1.35rem}.b2-prose h3{font-size:1.12rem}.b2-prose h4,.b2-prose h5,.b2-prose h6{font-size:1rem}
.b2-prose ul,.b2-prose ol{margin:0 0 1em}
.b2-prose blockquote{margin:0 0 1em;padding:2px 0 2px 16px;border-left:4px solid var(--brand-100);color:var(--muted)}
.b2-prose code{padding:1px 6px;border-radius:6px;background:var(--line-2);font-size:.88em}
.b2-prose pre{margin:0 0 1em;padding:14px 16px;border-radius:12px;background:#0b1b33;color:#d5e3f7;overflow:auto;font-size:.84rem}
.b2-prose pre code{padding:0;background:none;color:inherit}
.b2-prose hr{margin:1.4em 0}
.b2-prose-empty{color:var(--muted);font-style:italic}
.b2-cover{aspect-ratio:1200/630;margin-bottom:12px;border:1px solid var(--line-2);border-radius:12px;background:var(--surface-2);overflow:hidden}
.b2-cover img{display:block;width:100%;height:100%;object-fit:cover}
.b2-cover.is-empty{display:none}
.b2-cover-sm{aspect-ratio:4/3;max-width:340px}
.b2-cms td:first-child{min-width:250px}
.b2-quote{min-width:220px;max-width:340px;font-size:.88rem;color:var(--text)}
.b2-faq-q{max-width:560px}
.b2-gal-form{display:grid;grid-template-columns:minmax(0,340px) minmax(0,1fr);gap:0 32px;align-items:start}
.b2-gal{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px;padding:22px}
.b2-gal-item{margin:0;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff;min-width:0}
.b2-gal-item img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:var(--surface-2)}
.b2-gal-item.is-off img{opacity:.5}
.b2-gal-item figcaption{padding:12px 14px 14px}
.b2-gal-actions{display:flex;justify-content:space-between;width:100%;margin-top:10px}
@media (max-width:860px){.b2-gal-form{grid-template-columns:1fr}.b2-cover-sm{max-width:none}}

/* ---------- email log ---------- */
.b2-mail-top{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:20px;align-items:stretch;margin-bottom:24px}
.b2-mail-top .callout{margin:0;align-items:flex-start}
.b2-mail-top .callout code{background:rgba(7,17,31,.07);padding:1px 6px;border-radius:6px;font-size:.86em}
.b2-test{margin:0}
@media (max-width:1080px){.b2-mail-top{grid-template-columns:1fr}}
.b2-clip{display:block;max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.b2-clip-2{max-width:260px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.b2-err{font-size:.84rem;color:#a4123a}
.b2-subject{max-width:360px}
.b2-modal{max-width:680px;max-height:90vh;overflow:auto;padding:26px}
.b2-modal:focus{outline:0}
.b2-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}
.b2-modal-head h2{margin:0 0 2px;font-size:1.2rem;overflow-wrap:anywhere}
.b2-modal .callout{margin-bottom:6px}
.b2-errtext{margin-top:4px;font-size:.86rem;font-weight:500;overflow-wrap:anywhere}
.b2-kv{grid-template-columns:110px 1fr;margin:16px 0 18px}
.b2-json{margin:6px 0 12px;padding:14px 16px;max-height:280px;overflow:auto;border-radius:12px;background:#0b1b33;color:#d5e3f7;font:.78rem/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
.b2-modal-foot{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:10px;margin-top:10px}
.b2-modal-foot form{margin:0}
@media (max-width:680px){.b2-modal{padding:20px}.b2-kv{grid-template-columns:1fr}}

/* ---------- audit log ---------- */
.b2-details{min-width:190px;max-width:440px}
.b2-json-box summary{cursor:pointer;color:var(--brand-ink);font-size:.86rem;font-weight:600}
.b2-json-box[open] summary{margin-bottom:6px}
.b2-audit-table .pill.mono{font-size:.72rem;letter-spacing:0}

/* ---------- settings ---------- */
.b2-set{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start}
.b2-set-main{min-width:0}
.b2-set-main .panel{scroll-margin-top:84px}
.b2-set-side{position:sticky;top:84px;min-width:0}
.b2-jump{display:flex;flex-direction:column;padding:8px}
.b2-jump a{display:flex;align-items:center;gap:10px;padding:9px 14px;border-radius:10px;color:var(--text);font-weight:500;font-size:.92rem}
.b2-jump a:hover{background:var(--brand-50);color:var(--brand-ink);text-decoration:none}
.b2-sys{grid-template-columns:130px minmax(0,1fr);gap:8px 12px;margin:0;padding:16px 22px 8px;font-size:.86rem}
.b2-logo{display:flex;align-items:center;gap:22px;margin-bottom:22px;padding-bottom:22px;border-bottom:1px solid var(--line-2)}
.b2-logo-preview{display:grid;place-items:center;width:120px;height:120px;flex-shrink:0;border:1.5px dashed var(--line);border-radius:16px;background:var(--surface-2);overflow:hidden}
.b2-logo-preview img{max-width:100%;max-height:100%;object-fit:contain;padding:10px}
.b2-logo-empty{display:grid;place-items:center;gap:4px;color:var(--muted);text-align:center}
.b2-logo-empty svg{color:#b8c8dd}
@media (max-width:1080px){.b2-set{grid-template-columns:1fr}.b2-set-side{position:static}.b2-jump-panel{display:none}}
@media (max-width:680px){.b2-logo{flex-direction:column;align-items:stretch}.b2-sys{grid-template-columns:1fr;gap:2px}.b2-sys dd{margin-bottom:8px}}
.b2-errlog{list-style:none;margin:0;padding:0 22px 12px;max-height:420px;overflow:auto}
.b2-errlog li{display:flex;flex-direction:column;padding:10px 0;border-bottom:1px solid var(--line-2)}
.b2-errlog li:last-child{border-bottom:0}
.b2-errlog .b2-errtext{color:var(--red);font-size:.8rem;font-family:var(--mono,ui-monospace,monospace)}
.b2-logo-dark .b2-logo-empty{color:#a9bad0}
