/* Portal additions on top of site.css */
.portal .page { padding-top: 24px; }
.role-badge { background: #000; color: #fff; font: 700 .75rem var(--font-head); letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; margin-right: auto; margin-left: 4px; }
.inline-form { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 20px 0 17px; font: 600 .8125rem var(--font-head); text-transform: uppercase; letter-spacing: .06em; color: #000; cursor: pointer; }
td .link-button { padding: 0; text-transform: none; letter-spacing: 0; font: inherit; color: var(--blue-btn); text-decoration: underline; }
.link-button.danger, .btn.danger { color: var(--error); }
.btn.btn-outline.danger { border-color: var(--error); }
.btn.btn-outline.danger:hover { background: var(--error); color: #fff; }
.narrow { max-width: 560px; }
.panel { border: 1px solid var(--line); padding: 20px; margin: 20px 0; }
.panel h2 { margin-top: 0; }
.stat-row { list-style: none; padding: 0; margin: 16px 0 24px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.stat-row li { border: 1px solid var(--line); border-top: 4px solid var(--blue); padding: 14px 16px; }
.stat-row strong { display: block; font: 800 1.75rem var(--font-head); font-variant-numeric: tabular-nums; }
.stat-row a { color: inherit; text-decoration: none; display: block; }
.stat-row a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; margin: 12px 0 20px; }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 12px 10px 0; vertical-align: top; }
th { font: 700 .75rem var(--font-head); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 2px solid #000; }
.pill { display: inline-block; font: 700 .75rem var(--font-head); padding: 2px 8px; border-radius: 999px; background: var(--band); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
.pill-active, .pill-published, .pill-completed, .pill-sent { background: #e7f4ec; border-color: #9cc9ab; color: #13532b; }
.pill-pending, .pill-pendingapproval, .pill-queued, .pill-processing, .pill-uploaded { background: #fff4e0; border-color: #f0c47a; color: #6b4300; }
.pill-inactive, .pill-archived, .pill-failed, .pill-suppressed { background: #fbe9eb; border-color: #e4a4ad; color: #8a1023; }
.pill-draft { background: var(--tint); border-color: #a9c9e6; color: var(--blue-dark); }
.status-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tabs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 0; margin: 8px 0 16px; border-bottom: 1px solid var(--line); }
.tabs a { display: block; padding: 8px 0; font: 600 .875rem var(--font-head); text-decoration: none; color: #000; border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { color: var(--blue-btn); border-bottom-color: var(--blue); }
.inline-search { max-width: 420px; }
.preview { border: 1px solid var(--line); padding: 12px 16px; max-height: 520px; overflow: auto; font-size: .9375rem; }
.sms-bubble { background: #e9e9eb; border-radius: 16px; padding: 10px 14px; font-size: .9375rem; max-width: 280px; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
.steps { padding-left: 20px; }
.message { border-bottom: 1px solid var(--line); padding: 8px 0; }
.message p { margin: 0 0 4px; overflow-wrap: anywhere; }
fieldset[disabled] { opacity: .75; }
details summary { cursor: pointer; font-weight: 700; margin: 8px 0; }
/* Rich text editor (Quill) */
.rich-editor { border: 1px solid var(--field-line); border-radius: 3px; background: #fff; }
.rich-modes { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px; border-bottom: 1px solid var(--line); background: var(--band); }
.rich-editor .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rich-editor .ql-container.ql-snow { border: 0; font: inherit; font-size: 1rem; }
.rich-editor .ql-editor { min-height: 320px; line-height: 1.6; }
.rich-editor .ql-editor:focus { outline: 3px solid var(--focus); outline-offset: -3px; }
.rich-editor .ql-editor hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.rich-editor textarea.rich-source { border: 0; border-radius: 0; min-height: 360px; font: .875rem/1.5 ui-monospace, Menlo, Consolas, monospace; }
.rich-editor .ql-snow .ql-toolbar button:focus-visible, .rich-editor .ql-snow .ql-picker-label:focus-visible { outline: 3px solid var(--focus); }

/* Home page editor */
.item-row { border: 1px solid var(--line); padding: 12px 16px; margin: 12px 0; background: #fff; }
.item-row h3 { margin-top: 0; }
.image-field { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: start; margin: 8px 0 12px; }
.image-preview { border: 1px solid var(--line); background: var(--band); min-height: 100px; display: grid; place-items: center; }
.image-preview img { max-width: 100%; max-height: 160px; display: block; }
@media (max-width: 600px) { .image-field { grid-template-columns: 1fr; } }
.sticky-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 0; margin-top: 24px; }
