/* PRMS form controls (replacing Radzen inputs). Colours from the brand tokens in prms-ui.css, so they follow both the
   production (navy) and local (Logus) looks. */

/* ---------- Section and field ---------- */
.pf-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.pf-section__legend { display: flex; align-items: center; gap: .6rem; width: 100%; margin: 0 0 .9rem; padding: 0 0 .55rem; color: var(--prms-ink); border-bottom: 1px solid var(--prms-border); font-size: .9rem; font-weight: 700; }
.pf-section__badge { display: inline-flex; padding: .1rem .55rem; color: #17664c; background: #e8f6ef; border: 1px solid #c9ebd9; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.pf-section__body { display: grid; gap: .85rem; }
.pf-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
@media (max-width: 520px) { .pf-grid-2 { grid-template-columns: minmax(0, 1fr); } }

.pf-field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.pf-field__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 22px; }
.pf-label { margin: 0; color: var(--prms-ink-soft); font-size: .78rem; font-weight: 650; }
.pf-required { margin-left: .15rem; color: var(--prms-danger, #b63544); }
.pf-field__tools { display: inline-flex; align-items: center; gap: .3rem; }
.pf-hint { color: var(--prms-muted); font-size: .74rem; }
.pf-error { color: var(--prms-danger, #b63544); font-size: .74rem; font-weight: 600; }

/* ---------- Inputs ---------- */
.pf-input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: .45rem .7rem;
    color: var(--prms-ink);
    background: var(--prms-surface);
    border: 1px solid var(--prms-border-strong, #c3d0dc);
    border-radius: var(--prms-radius-sm, 8px);
    font: inherit;
    font-size: .875rem;
    line-height: 1.4;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.pf-input::placeholder { color: var(--prms-muted); opacity: .8; }
.pf-input:hover:not(:disabled) { border-color: var(--prms-muted); }
.pf-input:focus { border-color: var(--prms-brand); outline: none; box-shadow: var(--prms-focus-ring); }
.pf-input:disabled, .pf-input[readonly] { color: var(--prms-ink-soft); background: var(--prms-surface-alt); cursor: not-allowed; }
.pf-input[aria-invalid="true"], .has-error .pf-input { border-color: var(--prms-danger, #b63544); }
.pf-textarea { min-height: calc(3 * 1.4em + 1rem); max-height: calc(var(--pf-max-rows, 12) * 1.4em + 1rem); resize: vertical; field-sizing: content; }

/* Number with steppers */
.pf-number { display: flex; align-items: stretch; }
.pf-number__input { border-radius: 0; text-align: center; -moz-appearance: textfield; }
.pf-number__input::-webkit-outer-spin-button, .pf-number__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pf-number__step { flex: 0 0 38px; color: var(--prms-ink-soft); background: var(--prms-surface-alt); border: 1px solid var(--prms-border-strong, #c3d0dc); cursor: pointer; }
.pf-number__step:first-child { border-right: 0; border-radius: var(--prms-radius-sm, 8px) 0 0 var(--prms-radius-sm, 8px); }
.pf-number__step:last-child { border-left: 0; border-radius: 0 var(--prms-radius-sm, 8px) var(--prms-radius-sm, 8px) 0; }
.pf-number__step:hover:not(:disabled) { color: var(--prms-brand); background: var(--prms-hover); }
.pf-number__step:disabled { cursor: not-allowed; opacity: .5; }

/* Date */
.pf-date { position: relative; }
.pf-date .pf-input { padding-right: 2.2rem; }
.pf-date__clear { position: absolute; top: 50%; right: 2.1rem; display: grid; place-items: center; width: 24px; height: 24px; color: var(--prms-muted); background: transparent; border: 0; border-radius: 50%; transform: translateY(-50%); cursor: pointer; }
.pf-date__clear:hover { color: var(--prms-danger, #b63544); background: var(--prms-hover); }

/* ---------- Select ---------- */
.pf-select { position: relative; }
.pf-select__trigger { display: flex; align-items: center; gap: .5rem; padding-right: 2.2rem; text-align: left; cursor: pointer; }
.pf-select__value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-select__value.is-placeholder { color: var(--prms-muted); }
.pf-select__chevron { position: absolute; right: .75rem; color: var(--prms-muted); font-size: .72rem; transition: transform .15s ease; }
.pf-select.is-open .pf-select__chevron { transform: rotate(180deg); }
.pf-select.is-open .pf-select__trigger { border-color: var(--prms-brand); box-shadow: var(--prms-focus-ring); }
.pf-select__clear { position: absolute; top: 50%; right: 2rem; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; color: var(--prms-muted); background: transparent; border: 0; border-radius: 50%; transform: translateY(-50%); cursor: pointer; }
.pf-select__clear:hover { color: var(--prms-danger, #b63544); background: var(--prms-hover); }
.pf-select__backdrop { position: fixed; inset: 0; z-index: 30; }
.pf-select__popup { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 31; overflow: hidden; background: var(--prms-surface); border: 1px solid var(--prms-border); border-radius: 10px; box-shadow: var(--prms-shadow-float); animation: pf-drop .12s ease-out; }
.pf-select__search { display: flex; align-items: center; gap: .45rem; padding: .45rem .6rem; color: var(--prms-muted); border-bottom: 1px solid var(--prms-border); }
.pf-select__search input { flex: 1 1 auto; min-width: 0; color: var(--prms-ink); background: transparent; border: 0; outline: 0; font-size: .85rem; }
.pf-select__list { max-height: 260px; margin: 0; padding: .3rem; overflow: auto; list-style: none; scrollbar-width: thin; }
.pf-select__option { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; color: var(--prms-ink); border-radius: 6px; font-size: .85rem; cursor: pointer; }
.pf-select__option.is-active { background: var(--prms-hover); }
.pf-select__option.is-selected { color: var(--prms-brand); font-weight: 650; }
.pf-select__check { margin-left: auto; font-size: .75rem; }
.pf-select__empty { padding: .6rem; color: var(--prms-muted); font-size: .82rem; text-align: center; }
@keyframes pf-drop { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Speech ---------- */
.pf-speech { display: inline-flex; align-items: center; gap: .35rem; height: 26px; padding: 0 .55rem; color: var(--prms-muted); background: transparent; border: 1px solid var(--prms-border); border-radius: 999px; font-size: .72rem; font-weight: 650; cursor: pointer; }
.pf-speech:hover:not(:disabled) { color: var(--prms-brand); background: var(--prms-hover); border-color: var(--prms-brand); }
.pf-speech.is-listening { color: #fff; background: var(--prms-danger, #b63544); border-color: var(--prms-danger, #b63544); animation: pf-pulse 1.4s ease-in-out infinite; }
@keyframes pf-pulse { 50% { box-shadow: 0 0 0 4px rgba(182, 53, 68, .2); } }

/* ---------- Form layout helpers ---------- */
.pf-form { display: grid; gap: 1.1rem; }
.pf-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; padding-top: .9rem; border-top: 1px solid var(--prms-border); }
.pf-id-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; color: #17664c; background: #e8f6ef; border: 1px solid #c9ebd9; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.pf-loading { display: grid; place-items: center; gap: .5rem; padding: 3rem 1rem; color: var(--prms-muted); }

@media (prefers-reduced-motion: reduce) { .pf-select__popup, .pf-speech.is-listening { animation: none; } }

/* ---------- Standard dialog shell (PrmsDialogHeader + pf-dialog body + pf-actions footer) ----------
   Production: navy gradient like the Reporting Center hero. Local (Logus) brand: light grey, red eyebrow, red mark. */
.pd-head { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.35rem; overflow: hidden; color: #fff; background: radial-gradient(circle at 84% 18%, rgba(75, 145, 204, .32), transparent 32%), linear-gradient(115deg, var(--prms-brand-deep, #102c48), var(--prms-brand, #183c5f) 58%, #24557d); border-bottom: 1px solid rgba(0, 0, 0, .08); }
.pd-head::after { content: ""; position: absolute; top: -170px; right: 6%; width: 250px; height: 250px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%; box-shadow: 0 0 0 26px rgba(255, 255, 255, .025), 0 0 0 54px rgba(255, 255, 255, .025); pointer-events: none; }
.pd-head__copy { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; }
.pd-eyebrow { display: flex; align-items: center; gap: .45rem; margin-bottom: .2rem; color: #b8d5ee; font-size: .66rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.pd-title { margin: 0; overflow: hidden; color: #fff; font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 800; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.pd-subtitle { margin: .3rem 0 0; color: rgba(255, 255, 255, .78); font-size: .82rem; line-height: 1.45; }
.pd-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.pd-tags > * { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; color: #e5f1fa; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; font-size: .72rem; font-weight: 600; }
.pd-mark { position: relative; z-index: 1; display: flex; flex: 0 0 auto; align-items: center; gap: 5px; height: 44px; }
.pd-mark i { display: block; width: 11px; border-radius: 4px; background: linear-gradient(180deg, #d8efff, #5e9bc9); transform: skewY(-14deg); }
.pd-mark i:nth-child(1) { height: 24px; } .pd-mark i:nth-child(2) { height: 40px; } .pd-mark i:nth-child(3) { height: 31px; }
.pd-close { position: relative; z-index: 1; display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; color: #fff; background: rgba(255, 255, 255, .12); border: 0; border-radius: 10px; cursor: pointer; }
.pd-close:hover { background: rgba(255, 255, 255, .24); }
.pd-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

html[data-brand="local"] .pd-head { color: #333; background: linear-gradient(115deg, #f7f7f7, #e9e9e9); border-bottom: 1px solid #dddddd; }
html[data-brand="local"] .pd-head::after { border-color: rgba(0, 0, 0, .06); box-shadow: 0 0 0 26px rgba(0, 0, 0, .015), 0 0 0 54px rgba(0, 0, 0, .015); }
html[data-brand="local"] .pd-eyebrow { color: #be1919; }
html[data-brand="local"] .pd-title { color: #444; font-weight: 400; letter-spacing: 0; }
html[data-brand="local"] .pd-subtitle { color: #555; }
html[data-brand="local"] .pd-tags > * { color: #555; background: #fff; border-color: #cccccc; }
html[data-brand="local"] .pd-mark i { background: linear-gradient(180deg, #d23a3a, #be1919); }
html[data-brand="local"] .pd-close { color: #555; background: rgba(0, 0, 0, .05); }
html[data-brand="local"] .pd-close:hover { color: #be1919; background: rgba(0, 0, 0, .09); }
html[data-brand="local"] .pd-close:focus-visible { outline-color: #be1919; }

/* Dialog layout: header, scrolling body, footer pinned at the bottom. */
.pf-dialog { display: flex; flex-direction: column; min-height: 100%; background: var(--prms-surface, #fff); }
.pf-dialog__body { flex: 1 1 auto; padding: 1.15rem 1.35rem; }
.pf-dialog > .pf-actions, .pf-dialog .pf-dialog__foot { position: sticky; bottom: 0; z-index: 2; margin: 0; padding: .85rem 1.35rem; background: var(--prms-surface, #fff); box-shadow: 0 -6px 16px rgba(16, 32, 52, .06); }
.pf-dialog-host .rz-dialog-content { padding: 0 !important; }

@media (max-width: 575.98px) {
    .pd-head { padding: .95rem 1rem; }
    .pd-mark { display: none; }
    .pf-dialog__body { padding: 1rem; }
    .pf-dialog > .pf-actions { padding: .75rem 1rem; }
}

/* On/off switch */
.pf-toggle { display: flex; align-items: flex-start; gap: .7rem; margin: 0; padding: .65rem .8rem; background: var(--prms-surface, #fff); border: 1px solid var(--prms-border, #dfe5ec); border-radius: var(--prms-radius-sm, 8px); cursor: pointer; }
.pf-toggle:hover { border-color: var(--prms-muted, #9aa8b6); }
.pf-toggle.is-on { background: var(--prms-brand-tint, #eef4fa); border-color: var(--prms-brand, #183c5f); }
.pf-toggle.is-disabled { cursor: not-allowed; opacity: .65; }
.pf-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pf-toggle__track { position: relative; flex: 0 0 auto; width: 38px; height: 22px; margin-top: 1px; background: #c3ccd6; border-radius: 999px; transition: background .15s ease; }
.pf-toggle__thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.pf-toggle.is-on .pf-toggle__track { background: var(--prms-brand, #183c5f); }
.pf-toggle.is-on .pf-toggle__thumb { transform: translateX(16px); }
.pf-toggle input:focus-visible + .pf-toggle__track { box-shadow: var(--prms-focus-ring); }
.pf-toggle__text { display: grid; gap: 1px; min-width: 0; }
.pf-toggle__label { color: var(--prms-ink, #1d2b38); font-size: .84rem; font-weight: 650; }
.pf-toggle__hint { color: var(--prms-muted, #7b8794); font-size: .74rem; line-height: 1.35; }

/* "Can't find them?" helper card */
.pf-help { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .8rem .9rem; background: var(--prms-surface-alt, #f7f9fb); border: 1px dashed var(--prms-border-strong, #c3d0dc); border-radius: var(--prms-radius-sm, 8px); }
.pf-help__text { flex: 1 1 220px; min-width: 0; color: var(--prms-ink-soft, #40566a); font-size: .8rem; line-height: 1.45; }
.pf-help__text b { color: var(--prms-ink, #1d2b38); }
.pf-help__actions { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- Every Radzen dialog / side panel title bar gets the branded header (dialogs that render their own
   PrmsDialogHeader open with ShowTitle = false). ---------- */
.rz-dialog-titlebar, .rz-dialog-side-titlebar {
    position: relative; overflow: hidden; min-height: 64px; padding: 1rem 1.25rem !important; color: #fff;
    background: radial-gradient(circle at 84% 18%, rgba(75, 145, 204, .32), transparent 32%), linear-gradient(115deg, var(--prms-brand-deep, #102c48), var(--prms-brand, #183c5f) 58%, #24557d) !important;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.rz-dialog-titlebar::after, .rz-dialog-side-titlebar::after { content: ""; position: absolute; top: -150px; right: 8%; width: 220px; height: 220px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255, 255, 255, .025), 0 0 0 50px rgba(255, 255, 255, .025); pointer-events: none; }
.rz-dialog-title, .rz-dialog-side-title { position: relative; z-index: 1; color: #fff !important; font-size: 1.1rem !important; font-weight: 800 !important; letter-spacing: -.01em; }
.rz-dialog-title::before, .rz-dialog-side-title::before { content: "PRMS WORKSPACE"; display: block; margin-bottom: .15rem; color: #b8d5ee; font-size: .62rem; font-weight: 850; letter-spacing: .14em; }
.rz-dialog-titlebar-close, .rz-dialog-side-titlebar-close { position: relative; z-index: 1; width: 34px !important; height: 34px !important; color: #fff !important; background: rgba(255, 255, 255, .12) !important; border-radius: 10px !important; }
.rz-dialog-titlebar-close:hover, .rz-dialog-side-titlebar-close:hover { background: rgba(255, 255, 255, .24) !important; }

html[data-brand="local"] .rz-dialog-titlebar, html[data-brand="local"] .rz-dialog-side-titlebar { color: #333; background: linear-gradient(115deg, #f7f7f7, #e9e9e9) !important; border-bottom: 1px solid #dddddd; }
html[data-brand="local"] .rz-dialog-titlebar::after, html[data-brand="local"] .rz-dialog-side-titlebar::after { border-color: rgba(0, 0, 0, .06); box-shadow: 0 0 0 24px rgba(0, 0, 0, .015), 0 0 0 50px rgba(0, 0, 0, .015); }
html[data-brand="local"] .rz-dialog-title, html[data-brand="local"] .rz-dialog-side-title { color: #444 !important; font-weight: 500 !important; }
html[data-brand="local"] .rz-dialog-title::before, html[data-brand="local"] .rz-dialog-side-title::before { color: #be1919; }
html[data-brand="local"] .rz-dialog-titlebar-close, html[data-brand="local"] .rz-dialog-side-titlebar-close { color: #555 !important; background: rgba(0, 0, 0, .05) !important; }
html[data-brand="local"] .rz-dialog-titlebar-close:hover, html[data-brand="local"] .rz-dialog-side-titlebar-close:hover { color: #be1919 !important; background: rgba(0, 0, 0, .09) !important; }

/* Collapsible optional block (rich-text notes) inside a dialog body */
.pf-more { margin-top: 1rem; border: 1px solid var(--prms-border, #dfe5ec); border-radius: var(--prms-radius-sm, 8px); }
.pf-more > summary { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; color: var(--prms-ink, #1d2b38); font-size: .85rem; font-weight: 700; cursor: pointer; list-style: none; }
.pf-more > summary::-webkit-details-marker { display: none; }
.pf-more > summary small { margin-left: auto; color: var(--prms-muted, #7b8794); font-size: .72rem; font-weight: 600; }
.pf-more[open] > summary { border-bottom: 1px solid var(--prms-border, #dfe5ec); }
.pf-more .rz-html-editor { border: 0; border-radius: 0 0 8px 8px; }

/* ---------- Meeting dashboard summary (branded like the Reporting Center hero) ---------- */
.md-hero { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 2rem; margin-bottom: 1.1rem; padding: clamp(1.1rem, 2.4vw, 1.8rem); overflow: hidden; color: #fff; background: radial-gradient(circle at 84% 18%, rgba(75, 145, 204, .32), transparent 30%), linear-gradient(115deg, var(--prms-brand-deep, #102c48), var(--prms-brand, #183c5f) 58%, #24557d); border-radius: 20px; box-shadow: 0 14px 36px rgba(16, 44, 72, .14); }
.md-hero::after { content: ""; position: absolute; top: -230px; right: 7%; width: 340px; height: 340px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%; box-shadow: 0 0 0 32px rgba(255, 255, 255, .025), 0 0 0 68px rgba(255, 255, 255, .025); pointer-events: none; }
.md-hero__copy, .md-hero__actions { position: relative; z-index: 1; }
.md-hero__copy { flex: 1 1 460px; min-width: 0; }
.md-hero__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; color: #b8d5ee; font-size: .68rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.md-hero__eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.md-hero__titlerow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin: .35rem 0 .8rem; }
.md-hero__titlerow h1 { margin: 0; color: #fff; font-size: clamp(1.45rem, 3vw, 2.15rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; overflow-wrap: anywhere; }
.md-hero__status { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.md-hero__status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.md-hero__status--open { color: #bff0d4; background: rgba(46, 157, 91, .22); border: 1px solid rgba(191, 240, 212, .35); }
.md-hero__status--closed { color: #e5f1fa; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }
.md-hero__facts { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.md-hero__facts > div { min-width: 150px; padding: .55rem .8rem; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; }
.md-hero__facts dt { color: #b8d5ee; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.md-hero__facts dd { margin: .1rem 0 0; color: #fff; font-size: .9rem; font-weight: 650; }
.md-hero__objective { max-width: 860px; margin: .85rem 0 0; color: rgba(255, 255, 255, .85); font-size: .88rem; line-height: 1.55; }
.md-hero__objective b { margin-right: .4rem; color: #b8d5ee; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.md-hero__actions { display: grid; justify-items: end; gap: .7rem; }
.md-hero__primary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.md-hero__secondary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .15rem .9rem; }
.md-btn { display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 1rem; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); border-radius: 10px; font-size: .86rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.md-btn:hover { background: rgba(255, 255, 255, .2); }
.md-btn--primary { color: var(--prms-brand, #183c5f); background: #fff; border-color: #fff; }
.md-btn--primary:hover { background: #eef4fa; }
.md-btn--danger { color: #fff; background: #c62828; border-color: #c62828; }
.md-btn--danger:hover { background: #ad2020; }
.md-btn:disabled { opacity: .6; cursor: default; }
.md-link { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem 0; color: rgba(255, 255, 255, .82); background: none; border: 0; font-size: .8rem; font-weight: 650; text-decoration: none; cursor: pointer; }
.md-link:hover { color: #fff; text-decoration: underline; }
.md-link--danger:hover { color: #ffb4b4; }

html[data-brand="local"] .md-hero { color: #333; background: linear-gradient(115deg, #f7f7f7, #e9e9e9); border: 1px solid #dddddd; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
html[data-brand="local"] .md-hero::after { border-color: rgba(0, 0, 0, .06); box-shadow: 0 0 0 32px rgba(0, 0, 0, .015), 0 0 0 68px rgba(0, 0, 0, .015); }
html[data-brand="local"] .md-hero__eyebrow { color: #be1919; }
html[data-brand="local"] .md-hero__titlerow h1 { color: #444; font-weight: 400; letter-spacing: -.01em; }
html[data-brand="local"] .md-hero__status--open { color: #17664c; background: #e8f6ef; border-color: #c9ebd9; }
html[data-brand="local"] .md-hero__status--closed { color: #555; background: #fff; border-color: #cccccc; }
html[data-brand="local"] .md-hero__facts > div { background: #fff; border-color: #dddddd; }
html[data-brand="local"] .md-hero__facts dt { color: #be1919; }
html[data-brand="local"] .md-hero__facts dd { color: #333; }
html[data-brand="local"] .md-hero__objective { color: #555; }
html[data-brand="local"] .md-hero__objective b { color: #be1919; }
html[data-brand="local"] .md-btn { color: #444; background: #fff; border-color: #cccccc; }
html[data-brand="local"] .md-btn:hover { border-color: #be1919; color: #be1919; background: #fff; }
html[data-brand="local"] .md-btn--primary { color: #fff; background: #be1919; border-color: #be1919; }
html[data-brand="local"] .md-btn--primary:hover { color: #fff; background: #a51515; }
html[data-brand="local"] .md-btn--danger { color: #be1919; background: #fff; border-color: #be1919; }
html[data-brand="local"] .md-btn--danger:hover { color: #fff; background: #be1919; }
html[data-brand="local"] .md-link { color: #555; }
html[data-brand="local"] .md-link:hover { color: #be1919; }

@media (max-width: 767.98px) {
    .md-hero { border-radius: 14px; }
    .md-hero__actions { justify-items: stretch; width: 100%; }
    .md-hero__primary, .md-hero__secondary { justify-content: flex-start; }
    .md-hero__facts > div { flex: 1 1 140px; }
}

/* ---------- Meeting dashboard: KPI strip and workspace tabs ---------- */
.md-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.md-kpi { position: relative; display: flex; align-items: center; gap: .9rem; min-width: 0; padding: 1rem 1.1rem 1.15rem; overflow: hidden; color: inherit; text-align: left; background: var(--prms-surface, #fff); border: 1px solid #e1e8f0; border-radius: 16px; box-shadow: 0 6px 20px rgba(20, 43, 67, .035); font: inherit; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.md-kpi:hover { border-color: var(--prms-brand, #183c5f); box-shadow: 0 10px 26px rgba(20, 43, 67, .08); transform: translateY(-1px); }
.md-kpi:focus-visible { outline: none; box-shadow: var(--prms-focus-ring); }
.md-kpi.is-on { border-color: var(--prms-brand, #183c5f); box-shadow: inset 0 0 0 1px var(--prms-brand, #183c5f), 0 10px 26px rgba(20, 43, 67, .08); }
.md-kpi.is-alert .md-kpi__body span { color: #c62828; font-weight: 700; }
.md-kpi__icon { display: grid; flex: 0 0 46px; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 1.05rem; }
.md-kpi__icon--people { color: #245d91; background: #e8f1fb; }
.md-kpi__icon--agenda { color: #176b49; background: #e1f6eb; }
.md-kpi__icon--tasks { color: #8a5a00; background: #fdf0d5; }
.md-kpi__icon--summary { color: #6a3fa0; background: #f0e8fb; }
.md-kpi__body { display: grid; min-width: 0; }
.md-kpi__body small { color: #7a8a99; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.md-kpi__body strong { margin: .1rem 0; color: #20394e; font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.md-kpi__body span { overflow: hidden; color: #7a8a99; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.md-kpi__bar { position: absolute; right: 0; bottom: 0; left: 0; height: 4px; background: #eef2f6; }
.md-kpi__bar i { display: block; height: 100%; background: var(--prms-brand, #183c5f); border-radius: 0 4px 4px 0; }

.md-tabs { position: sticky; top: 64px; z-index: 5; display: flex; gap: .25rem; margin-bottom: 1rem; padding: .35rem; overflow-x: auto; background: var(--prms-surface, #fff); border: 1px solid #e1e8f0; border-radius: 14px; box-shadow: 0 6px 20px rgba(20, 43, 67, .05); scrollbar-width: none; }
.md-tab { display: inline-flex; flex: 1 0 auto; align-items: center; justify-content: center; gap: .5rem; height: 42px; padding: 0 1rem; color: #5b6b7b; background: transparent; border: 0; border-radius: 10px; font-size: .88rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.md-tab:hover { color: var(--prms-brand, #183c5f); background: var(--prms-hover, #f4f7fa); }
.md-tab b { min-width: 22px; padding: 1px 7px; color: #5b6b7b; background: #eef2f6; border-radius: 999px; font-size: .72rem; }
.md-tab.is-on { color: #fff; background: var(--prms-brand, #183c5f); box-shadow: 0 4px 12px rgba(16, 44, 72, .18); }
.md-tab.is-on b { color: #fff; background: rgba(255, 255, 255, .22); }
.md-pane { min-width: 0; }

html[data-brand="local"] .md-kpi__bar i { background: #be1919; }
html[data-brand="local"] .md-kpi:hover, html[data-brand="local"] .md-kpi.is-on { border-color: #be1919; }
html[data-brand="local"] .md-kpi.is-on { box-shadow: inset 0 0 0 1px #be1919, 0 10px 26px rgba(0, 0, 0, .06); }
html[data-brand="local"] .md-tab.is-on { background: #be1919; box-shadow: 0 4px 12px rgba(190, 25, 25, .2); }
html[data-brand="local"] .md-tab:hover:not(.is-on) { color: #be1919; }

@media (max-width: 1100px) { .md-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
    .md-kpis { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
    .md-tabs { top: 56px; }
    .md-tab { flex: 0 0 auto; padding: 0 .8rem; }
}

/* ---------- Dialog fit: header pinned at the top, actions pinned at the bottom, body scrolls between ----------
   (A dialog body that scrolled as one block let the browser scroll the header out of view when a field took focus.) */
.rz-dialog-content:has(> :is(.pf-dialog, .ag, .lp, form.pf-dialog)),
.rz-dialog-side-content:has(> :is(.pf-dialog, .ag, .lp, form.pf-dialog)) { display: flex; flex-direction: column; padding: 0 !important; overflow: hidden !important; }
.rz-dialog-side-content:has(> :is(.pf-dialog, .ag, .lp)) { height: 100%; }
.rz-dialog-content > :is(.pf-dialog, .ag, .lp), .rz-dialog-side-content > :is(.pf-dialog, .ag, .lp) { flex: 1 1 auto; min-height: 0; height: 100%; display: flex; flex-direction: column; }
.pf-dialog > .pd-head, .ag > .pd-head, .lp > .pd-head { flex: 0 0 auto; }
.pf-dialog > .pf-dialog__body, .ag > .ag-body, .lp > .lp-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.pf-dialog > .pf-actions, .ag > .ag-foot, .lp > .lp-foot { flex: 0 0 auto; position: static; padding-bottom: calc(.85rem + env(safe-area-inset-bottom)); }
.rz-dialog-side { max-width: 100vw !important; }
.rz-dialog-side:has(.pf-dialog, .ag, .lp) { height: 100dvh !important; }

/* Phones: every dialog and side panel is a full-screen sheet; buttons share the width. */
@media (max-width: 767.98px) {
    .rz-dialog-wrapper .rz-dialog, .rz-dialog-side {
        top: 0 !important; left: 0 !important; right: 0 !important; width: 100vw !important; max-width: 100vw !important;
        height: 100dvh !important; max-height: 100dvh !important; border-radius: 0 !important; transform: none !important;
    }
    .rz-dialog-content, .rz-dialog-side-content { max-height: none !important; }
    .pd-head { padding: .85rem 1rem; padding-top: calc(.85rem + env(safe-area-inset-top)); }
    .pd-subtitle { display: none; }
    .pf-dialog__body, .ag > .ag-body { padding: 1rem; }
    .pf-dialog > .pf-actions, .ag > .ag-foot, .lp > .lp-foot { padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); }
    .pf-dialog > .pf-actions > *, .ag > .ag-foot > .ag-btn { flex: 1 1 0; justify-content: center; }
    .ag > .ag-foot > .ag-foot__hint { flex-basis: 100%; order: 5; }
    .pf-toggle { padding: .6rem .7rem; }
}
/* Same fit when the dialog form sits inside a wrapper (prms-container, EditForm around .ag). */
.rz-dialog-content:has(.pf-dialog, .ag, .lp), .rz-dialog-side-content:has(.pf-dialog, .ag, .lp) { display: flex; flex-direction: column; padding: 0 !important; overflow: hidden !important; }
.rz-dialog-side-content:has(.pf-dialog, .ag, .lp) { height: 100%; }
:is(.rz-dialog-content, .rz-dialog-side-content):has(.pf-dialog, .ag, .lp) > :not(.pf-dialog):not(.ag):not(.lp):has(.pf-dialog, .ag, .lp),
:is(.rz-dialog-content, .rz-dialog-side-content) form:has(> .ag) { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; height: 100%; max-width: none; margin: 0; padding: 0; }
:is(.rz-dialog-content, .rz-dialog-side-content) :is(.pf-dialog, .ag, .lp) { flex: 1 1 auto; min-height: 0; height: 100%; display: flex; flex-direction: column; }

/* Dialogs sit above the app bar, sidebar and floating buttons; the floating buttons hide while a dialog is open. */
.rz-dialog-wrapper, .rz-dialog-side, .rz-dialog-mask, .rz-dialog-side-overlay { z-index: 1070 !important; }
.rz-dialog-wrapper .rz-dialog, .rz-dialog-side { z-index: 1071 !important; }
body:has(.rz-dialog-wrapper .rz-dialog, .rz-dialog-side) :is(.cc-launcher, .prms-scroll-top) { display: none !important; }

/* Two-way segmented choice (e.g. Team member / External guest) */
.pf-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--prms-surface-alt, #f4f6f9); border: 1px solid var(--prms-border, #dfe5ec); border-radius: 10px; }
.pf-seg button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 38px; color: var(--prms-ink-soft, #40566a); background: transparent; border: 0; border-radius: 7px; font-size: .84rem; font-weight: 700; cursor: pointer; }
.pf-seg button.is-on { color: var(--prms-brand, #183c5f); background: var(--prms-surface, #fff); box-shadow: 0 1px 3px rgba(16, 32, 52, .14); }
.pf-hint i { margin-right: .3rem; }
.att-guest { display: inline-flex; align-items: center; gap: .35rem; color: #6a3fa0; font-weight: 650; }
.att-guest small { padding: 0 .4rem; color: #6a3fa0; background: #f0e8fb; border-radius: 999px; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.att-name { font-weight: 600; }

/* Portfolio colours: a project-ID cell with the portfolio bar in front (ProjectHierarchy, UserProjects) */
.pf-idcell { display: inline-flex; align-items: center; gap: .4rem; }
.task-row .gantt-portfolio { margin-right: .35rem; }
