/* =====================================================================
   Membership platform — site.css
   Palette: deep navy + muted brass accent, on a cool neutral surface.
   Typography kept small and restrained: this page carries a lot of
   information, so labels and controls stay compact and quiet.
   ===================================================================== */

:root {
    --mp-navy-900: #16233D;
    --mp-navy-700: #24345A;
    --mp-navy-050: #EEF1F6;
    --mp-brass-500: #A9824C;
    --mp-brass-050: #F6EFE3;
    --mp-bg: #F3F4F7;
    --mp-surface: #FFFFFF;
    --mp-border: #E1E4EA;
    --mp-text: #1F2532;
    --mp-text-muted: #6B7280;
    --mp-text-faint: #97A0AD;
    --mp-success: #2F7D5B;
    --mp-success-bg: #E7F3ED;
    --mp-danger: #B3452C;
    --mp-danger-bg: #FBEAE5;
    --mp-sidebar-hover: #7FA6E8;
    --mp-radius-sm: 4px;
    --mp-radius-md: 6px;
    --mp-shadow-modal: 0 12px 32px rgba(22, 35, 61, 0.18);
    --mp-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body {
    overflow-x: hidden;
    height: 100%;
}

/* Layout column: sidebar-offset wrapper around header / main / footer.
   The ng-controller div and the page container inside it both grow to
   fill any leftover vertical space, so the footer always sits at the
   bottom of the viewport (or below the content on long pages). */
.mp-content-offset {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

    .mp-content-offset > div[ng-controller] {
        flex: 1 0 auto;
        display: flex;
        flex-direction: column;
    }

    .mp-content-offset > footer {
        flex-shrink: 0;
    }

/* ---------------------------------------------------------------------
   Base overrides — quieter defaults than the framework's own styles
   --------------------------------------------------------------------- */
body {
    background: var(--mp-bg);
    color: var(--mp-text);
    font-family: var(--mp-font);
    font-size: 13px;
    line-height: 1.5;
}

h1, h2, h3, h4 {
    font-family: var(--mp-font);
    color: var(--mp-navy-900);
    font-weight: 600;
    margin: 0;
}

a {
    color: var(--mp-navy-700);
}

/* Override the framework's default .btn: smaller, flatter, less shouty */
.btn {
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--mp-radius-sm);
    line-height: 1.4;
    box-shadow: none;
    text-transform: none;
}

/* Override the framework's default .form-control */
.form-control {
    font-size: 13px;
    padding: 7px 10px;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-sm);
    color: var(--mp-text);
    box-shadow: none;
}

    .form-control:focus {
        border-color: var(--mp-navy-700);
        box-shadow: 0 0 0 3px rgba(36, 52, 90, 0.12);
        outline: none;
    }

/* Override default .nav-tabs, in case it's used elsewhere on the layout */
.nav-tabs {
    border-bottom: 1px solid var(--mp-border);
}

    .nav-tabs > li > a {
        font-size: 13px;
        color: var(--mp-text-muted);
        border: none;
        padding: 8px 4px;
    }

/* =====================================================================
   Page container — replaces Bootstrap's .container in _Layout.cshtml.
   Full width (sidebar to right edge), rounded surface panel, grows to
   fill the flex column above so the footer sits flush at the bottom.
   ===================================================================== */
.mp-page-container {
    flex: 1 1 auto;
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    margin: 0 16px 16px 0;
}

/* =====================================================================
   Member profile page
   ===================================================================== */

.mp-wrap {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--mp-font);
    color: var(--mp-text);
    font-size: 13px;
    box-sizing: border-box;
}

/* ---------------------------------------------------------------------
   Header: avatar, name, membership badge
   --------------------------------------------------------------------- */
.mp-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    padding: 20px 22px;
    margin-bottom: 18px;
}

.mp-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 64px;
    border: 1px solid var(--mp-border);
    background: var(--mp-navy-050);
}

    .mp-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.mp-header-info {
    min-width: 0;
}

.mp-name {
    font-size: 19px;
    font-weight: 600;
    color: var(--mp-navy-900);
    margin-bottom: 6px;
}

.mp-header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--mp-text-muted);
}

.mp-dot {
    color: var(--mp-text-faint);
}

.mp-member-nr {
    color: var(--mp-text-muted);
}

.mp-status {
    color: var(--mp-text-muted);
}

    .mp-status.is-active {
        color: var(--mp-success);
        font-weight: 500;
    }

/* Membership tier badge */
.mp-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.mp-badge-standard {
    background: var(--mp-navy-050);
    color: var(--mp-navy-700);
}

.mp-badge-silver {
    background: #EEF0F2;
    color: #4B5563;
}

.mp-badge-gold {
    background: var(--mp-brass-050);
    color: var(--mp-brass-500);
}

.mp-badge-platinum {
    background: var(--mp-navy-900);
    color: #F3F4F7;
}

/* ---------------------------------------------------------------------
   Tabs
   --------------------------------------------------------------------- */
.mp-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--mp-border);
    margin-bottom: 0;
}

.mp-tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 9px 14px;
    font-family: var(--mp-font);
    font-size: 13px;
    font-weight: 500;
    color: var(--mp-text-muted);
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

    .mp-tab:hover {
        color: var(--mp-navy-700);
    }

    .mp-tab.is-active {
        color: var(--mp-navy-900);
        border-bottom-color: var(--mp-brass-500);
    }

    .mp-tab:focus-visible {
        outline: 2px solid var(--mp-navy-700);
        outline-offset: 2px;
    }

/* ---------------------------------------------------------------------
   Panel + field list
   --------------------------------------------------------------------- */
.mp-panel {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-top: none;
    border-radius: 0 0 var(--mp-radius-md) var(--mp-radius-md);
    padding: 20px 22px 24px;
}

.mp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.mp-group {
    margin-bottom: 22px;
}

    .mp-group:last-child {
        margin-bottom: 0;
    }

.mp-group-divider {
    padding-top: 20px;
    border-top: 1px solid var(--mp-border);
}

.mp-section-head h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-navy-900);
}

.mp-field-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
    margin: 0;
}

.mp-field dt {
    font-size: 11.5px;
    color: var(--mp-text-muted);
    font-weight: 500;
    margin-bottom: 2px;
}

.mp-field dd {
    font-size: 13.5px;
    color: var(--mp-text);
    margin: 0;
}

/* ---------------------------------------------------------------------
   Buttons (page-local, used alongside the .btn overrides above)
   --------------------------------------------------------------------- */
.mp-btn {
    font-family: var(--mp-font);
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--mp-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mp-btn-primary {
    background: var(--mp-navy-900);
    color: #FFFFFF;
}

    .mp-btn-primary:hover {
        background: var(--mp-navy-700);
    }

.mp-btn-outline {
    background: var(--mp-surface);
    color: var(--mp-navy-700);
    border-color: var(--mp-border);
}

    .mp-btn-outline:hover {
        border-color: var(--mp-navy-700);
    }

.mp-btn-ghost {
    background: transparent;
    color: var(--mp-text-muted);
}

    .mp-btn-ghost:hover {
        color: var(--mp-text);
    }

/* ---------------------------------------------------------------------
   Modal
   --------------------------------------------------------------------- */
.mp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(22, 35, 61, 0.45);
    z-index: 1040;
}

.mp-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--mp-surface);
    border-radius: var(--mp-radius-md);
    box-shadow: var(--mp-shadow-modal);
    z-index: 1050;
}

.mp-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--mp-border);
}

    .mp-modal-head h3 {
        font-size: 14.5px;
        font-weight: 600;
        color: var(--mp-navy-900);
    }

.mp-modal-close {
    appearance: none;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: var(--mp-text-muted);
    cursor: pointer;
    padding: 2px 4px;
}

    .mp-modal-close:hover {
        color: var(--mp-text);
    }

.mp-modal-body {
    padding: 18px 20px 6px;
}

.mp-modal-error {
    margin: 0 20px 12px;
    padding: 8px 10px;
    background: var(--mp-danger-bg);
    color: var(--mp-danger);
    border-radius: var(--mp-radius-sm);
    font-size: 12px;
}

.mp-form-row {
    margin-bottom: 14px;
}

    .mp-form-row label {
        display: block;
        font-size: 11.5px;
        font-weight: 500;
        color: var(--mp-text-muted);
        margin-bottom: 4px;
    }

.mp-form-row-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mp-input {
    width: 100%;
    font-family: var(--mp-font);
    font-size: 13px;
    padding: 7px 10px;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-sm);
    color: var(--mp-text);
    background: var(--mp-surface);
    box-sizing: border-box;
}

    .mp-input:focus {
        border-color: var(--mp-navy-700);
        box-shadow: 0 0 0 3px rgba(36, 52, 90, 0.12);
        outline: none;
    }

    /* Disabled textboxes (e.g. fields the user can't edit) */
    .mp-input:disabled,
    .mp-input[disabled] {
        background: #ECEEF2;
        color: var(--mp-text-muted);
        border-color: var(--mp-border);
        cursor: not-allowed;
        box-shadow: none;
    }

.mp-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--mp-border);
}

/* =====================================================================
   Members index / search page
   ===================================================================== */

/* Title on the left, search + Add member grouped together on the right */
.mp-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.mp-list-head-title {
    flex: 0 0 auto;
}

.mp-list-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.mp-page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--mp-navy-900);
    margin-bottom: 4px;
}

.mp-page-subtitle {
    font-size: 12.5px;
    color: var(--mp-text-muted);
    margin: 0;
}

/* ---------------------------------------------------------------------
   Search bar
   --------------------------------------------------------------------- */
.mp-search {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.mp-search-input {
    flex: 1 1 auto;
}

.mp-search-btn {
    flex: 0 0 auto;
}

/* Search bar as used inline inside .mp-list-head-actions, next to
   Add member — overrides the standalone spacing/width above. */
.mp-list-head-search {
    flex: 0 0 auto;
    max-width: none;
    margin: 0;
}

    .mp-list-head-search .mp-search-input {
        width: 220px;
    }

/* ---------------------------------------------------------------------
   List panel + meta
   --------------------------------------------------------------------- */
.mp-list-panel {
    padding: 18px 22px 8px;
}

.mp-list-meta {
    font-size: 12px;
    color: var(--mp-text-muted);
    margin-bottom: 10px;
}

.mp-loading,
.mp-empty {
    padding: 28px 0;
    text-align: center;
    color: var(--mp-text-muted);
    font-size: 13px;
}

/* ---------------------------------------------------------------------
   Members table
   --------------------------------------------------------------------- */
.mp-table {
    width: 100%;
    border-collapse: collapse;
}

    .mp-table th {
        text-align: left;
        font-size: 11.5px;
        font-weight: 500;
        color: var(--mp-text-muted);
        padding: 8px 10px;
        border-bottom: 1px solid var(--mp-border);
    }

    .mp-table td {
        padding: 10px;
        border-bottom: 1px solid var(--mp-border);
        font-size: 13px;
        vertical-align: middle;
    }

    .mp-table tbody tr:last-child td {
        border-bottom: none;
    }

    .mp-table tbody tr:hover {
        background: var(--mp-navy-050);
    }

.mp-th-member {
    width: 46%;
}

.mp-th-action {
    text-align: right;
    width: 1%;
    white-space: nowrap;
}

.mp-row-member {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mp-row-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 32px;
    border: 1px solid var(--mp-border);
    background: var(--mp-navy-050);
}

    .mp-row-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.mp-row-name-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mp-row-name {
    font-weight: 500;
    color: var(--mp-text);
}

.mp-row-email {
    font-size: 11.5px;
    color: var(--mp-text-muted);
}

/* =====================================================================
   Alerts (Users / admin page)
   ===================================================================== */
.mp-alert {
    padding: 10px 14px;
    border-radius: var(--mp-radius-sm);
    font-size: 12.5px;
    margin-bottom: 18px;
}

.mp-alert-success {
    background: var(--mp-success-bg);
    color: var(--mp-success);
}

.mp-alert-danger {
    background: var(--mp-danger-bg);
    color: var(--mp-danger);
}

/* Role chips inside the Users table */
.mp-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--mp-navy-050);
    color: var(--mp-navy-700);
    font-size: 11.5px;
    font-weight: 500;
    padding: 2px 6px 2px 9px;
    border-radius: 999px;
    margin: 2px 4px 2px 0;
}

.mp-role-chip-remove {
    appearance: none;
    background: none;
    border: none;
    font-size: 13px;
    line-height: 1;
    color: var(--mp-text-faint);
    cursor: pointer;
    padding: 0 2px;
}

    .mp-role-chip-remove:hover {
        color: var(--mp-danger);
    }

.mp-role-select {
    display: inline-block;
    width: auto;
    margin-right: 6px;
}

.mp-text-faint {
    color: var(--mp-text-faint);
}

/* =====================================================================
   Left fixed nav
   ===================================================================== */

.mp-hamburger-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1060;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-sm);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(22, 35, 61, 0.10);
    transition: border-color 0.15s ease, background 0.15s ease;
}

    .mp-hamburger-btn:hover {
        border-color: var(--mp-navy-700);
    }

    .mp-hamburger-btn:focus-visible {
        outline: 2px solid var(--mp-navy-700);
        outline-offset: 2px;
    }

    .mp-hamburger-btn .mp-hamburger-icon,
    .mp-hamburger-btn .mp-hamburger-icon::before,
    .mp-hamburger-btn .mp-hamburger-icon::after {
        display: block;
        width: 18px;
        height: 2px;
        background: var(--mp-navy-900);
        border-radius: 2px;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .mp-hamburger-btn .mp-hamburger-icon {
        position: relative;
    }

        .mp-hamburger-btn .mp-hamburger-icon::before,
        .mp-hamburger-btn .mp-hamburger-icon::after {
            content: "";
            position: absolute;
            left: 0;
        }

        .mp-hamburger-btn .mp-hamburger-icon::before {
            top: -6px;
        }

        .mp-hamburger-btn .mp-hamburger-icon::after {
            top: 6px;
        }

body.mp-nav-open .mp-hamburger-btn .mp-hamburger-icon {
    background: transparent;
}

    body.mp-nav-open .mp-hamburger-btn .mp-hamburger-icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    body.mp-nav-open .mp-hamburger-btn .mp-hamburger-icon::after {
        top: 0;
        transform: rotate(-45deg);
    }

/* Backdrop — mobile only, since desktop sidebar no longer overlays */
.mp-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(22, 35, 61, 0.45);
    z-index: 1045;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

body.mp-nav-open .mp-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* Sidebar: fixed full-height strip on the left */
.mp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    background: var(--mp-navy-900);
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--mp-shadow-modal);
}

body.mp-nav-open .mp-sidebar {
    transform: translateX(0);
}

.mp-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.mp-sidebar-brand {
    font-family: var(--mp-font);
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 0.01em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 10px;
    gap: 2px;
}

/* Text: white by default, blue on hover / active */
.mp-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--mp-radius-sm);
    font-family: var(--mp-font);
    font-size: 13px;
    font-weight: 500;
    color: #FFFFFF;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

    .mp-sidebar-link:hover {
        background: rgba(255, 255, 255, 0.06);
        color: var(--mp-sidebar-hover);
        text-decoration: none;
    }

    .mp-sidebar-link.is-active {
        background: rgba(255, 255, 255, 0.08);
        color: var(--mp-sidebar-hover);
        border-left-color: var(--mp-brass-500);
    }

.mp-sidebar-link-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

/* Desktop: sidebar is permanently fixed and part of the layout;
   hamburger + backdrop are no longer needed */
@media (min-width: 992px) {
    .mp-hamburger-btn,
    .mp-nav-backdrop {
        display: none;
    }

    .mp-sidebar {
        transform: translateX(0);
        box-shadow: none;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mp-content-offset {
        margin-left: 240px;
        width: calc(100% - 240px);
    }
}

.edit-icon {
    font-size: 0.8em;
    margin-left: 6px;
    cursor: pointer;
    color: #888;
}

.mp-roles-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/*GearIcon*/
.mp-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto; /* pushes the cog to the far right */
    border-radius: 50%;
    color: #6b7280;
    font-size: 18px;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}

    .mp-settings:hover {
        background-color: rgba(0, 0, 0, .06);
        color: #111827;
    }


/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 560px) {
    .mp-field-list {
        grid-template-columns: 1fr;
    }

    .mp-form-row-group {
        grid-template-columns: 1fr;
    }

    .mp-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mp-search {
        flex-wrap: wrap;
    }

    .mp-list-head {
        flex-direction: column;
        align-items: stretch;
    }

    .mp-list-head-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .mp-list-head-search {
        width: 100%;
        margin: 12px 0;
    }

        .mp-list-head-search .mp-search-input {
            width: 100%;
        }

    .mp-table thead {
        display: none;
    }

    .mp-table, .mp-table tbody, .mp-table tr, .mp-table td {
        display: block;
        width: 100%;
    }

        .mp-table tr {
            padding: 10px 0;
            border-bottom: 1px solid var(--mp-border);
        }

        .mp-table td {
            border-bottom: none;
            padding: 4px 0;
        }

    .mp-th-action {
        text-align: left;
        margin-top: 6px;
    }

    .mp-sidebar {
        width: 82vw;
        max-width: 280px;
    }
}


/* Component access configuration: role checkboxes in the control modal */
.mp-role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 8px 10px;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-sm);
    background: var(--mp-surface);
    max-height: 160px;
    overflow-y: auto;
}

    .mp-form-row .mp-role-list .mp-role-option {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin: 0;
        font-size: 13px;
        font-weight: 400;
        color: var(--mp-text);
        cursor: pointer;
    }

    .mp-role-option input[type="checkbox"] {
        margin: 0;
        accent-color: var(--mp-navy-700);
    }

.mp-role-empty {
    font-size: 12px;
    color: var(--mp-text-faint);
}

.mp-role-hint {
    margin: 6px 0 0;
    font-size: 11.5px;
    color: var(--mp-text-muted);
}

/* Field data types in the edit modal */
.mp-textarea {
    min-height: 72px;
    resize: vertical;
    line-height: 1.4;
}

.mp-check {
    display: flex;
    align-items: center;
    min-height: 32px;
}

    .mp-check input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: var(--mp-navy-700);
    }

        .mp-check input[type="checkbox"]:disabled {
            cursor: not-allowed;
            opacity: 0.6;
        }

/* Config modal: dropdown options table */
.mp-options-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-sm);
    background: var(--mp-surface);
}

    .mp-options-table th {
        font-size: 11.5px;
        font-weight: 500;
        color: var(--mp-text-muted);
        text-align: left;
        padding: 6px 8px;
        background: var(--mp-bg);
        border-bottom: 1px solid var(--mp-border);
    }

    .mp-options-table td {
        padding: 4px 8px;
        border-bottom: 1px solid var(--mp-border);
        vertical-align: middle;
    }

    .mp-options-table tr:last-child td {
        border-bottom: none;
    }

    .mp-options-table .mp-input {
        padding: 5px 8px;
    }

.mp-opt-nr {
    width: 28px;
    color: var(--mp-text-faint);
}

.mp-opt-actions {
    width: 96px;
    text-align: right;
    white-space: nowrap;
}

.mp-opt-empty {
    color: var(--mp-text-faint);
    font-size: 12px;
    text-align: center;
    padding: 10px 8px !important;
}

.mp-opt-add {
    margin-top: 8px;
}

.mp-icon-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: var(--mp-radius-sm);
    background: transparent;
    color: var(--mp-text-muted);
    cursor: pointer;
}

    .mp-icon-btn:hover:not(:disabled) {
        background: var(--mp-navy-050);
        color: var(--mp-navy-700);
    }

    .mp-icon-btn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

.mp-icon-btn-danger:hover:not(:disabled) {
    background: var(--mp-danger-bg);
    color: var(--mp-danger);
}

/* Config modal: field index (shared / local) */
.mp-scope-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

    .mp-scope-badge.is-shared {
        background: var(--mp-navy-050);
        color: var(--mp-navy-700);
    }

    .mp-scope-badge.is-local {
        background: var(--mp-bg);
        color: var(--mp-text-muted);
    }

.mp-shared-note {
    margin: -4px 0 14px;
    padding: 8px 10px;
    border-radius: var(--mp-radius-sm);
    background: var(--mp-brass-050);
    color: var(--mp-text);
    font-size: 12px;
    line-height: 1.45;
}

    .mp-shared-note i {
        color: var(--mp-brass-500);
        margin-right: 4px;
    }

/* ---------------------------------------------------------------
   Data entities: tables and record pop-ups
   --------------------------------------------------------------- */
.mp-field-wide {
    grid-column: 1 / -1;
}

.mp-dt {
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    background: var(--mp-surface);
    margin: 4px 0;
}

.mp-dt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--mp-border);
    background: var(--mp-bg);
    border-radius: var(--mp-radius-md) var(--mp-radius-md) 0 0;
}

.mp-dt-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mp-navy-900);
}

.mp-dt-tools {
    display: flex;
    gap: 6px;
}

.mp-dt-scroll {
    overflow-x: auto;
}

.mp-dt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .mp-dt-table th {
        text-align: left;
        font-size: 11.5px;
        font-weight: 500;
        color: var(--mp-text-muted);
        padding: 7px 12px;
        border-bottom: 1px solid var(--mp-border);
        white-space: nowrap;
    }

    .mp-dt-table td {
        padding: 7px 12px;
        border-bottom: 1px solid var(--mp-border);
        color: var(--mp-text);
        vertical-align: middle;
    }

    .mp-dt-table tbody tr:last-child td {
        border-bottom: none;
    }

    .mp-dt-table tbody tr:hover td {
        background: var(--mp-navy-050);
    }

.mp-dt-actions {
    width: 72px;
    text-align: right;
    white-space: nowrap;
}

.mp-dt-empty {
    text-align: center;
    color: var(--mp-text-faint);
    font-size: 12px;
    padding: 14px 12px !important;
}

.mp-dt-msg {
    padding: 10px 12px;
    font-size: 12.5px;
    color: var(--mp-text-muted);
}

    .mp-dt-msg.is-error {
        color: var(--mp-danger);
    }

.mp-modal-record {
    width: 640px;
}

.mp-record-head-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mp-record-gear {
    color: var(--mp-text-muted);
    cursor: pointer;
    font-size: 14px;
}

    .mp-record-gear.is-on,
    .mp-record-gear:hover {
        color: var(--mp-navy-700);
    }

.mp-record-sub {
    font-weight: 400;
    color: var(--mp-text-muted);
    font-size: 13px;
}

.mp-record-group {
    margin-bottom: 14px;
}

.mp-record-group-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mp-navy-900);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--mp-border);
}

/* Field group without a Display: no underline (only shown in layout mode, for its edit icon) */
.mp-record-group-title.mp-record-group-untitled {
    padding-bottom: 0;
    border-bottom: 0;
}

.mp-record-table {
    margin-bottom: 14px;
}

.mp-record-add {
    margin: -4px 0 12px;
}

.mp-record-add-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--mp-text-faint);
    margin-left: 4px;
}

.mp-modal-ok {
    margin: 0 20px 12px;
    padding: 8px 10px;
    background: var(--mp-success-bg);
    color: var(--mp-success);
    border-radius: var(--mp-radius-sm);
    font-size: 12px;
}

.mp-inline-error {
    margin: 0 0 12px;
}

/* Field modal: "Show in table" + column position */
.mp-form-row .mp-check-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    color: var(--mp-text);
    cursor: pointer;
}

    .mp-check-row input[type="checkbox"] {
        margin: 0;
        accent-color: var(--mp-navy-700);
    }

.mp-column-position {
    margin-top: 8px;
}

/* Config modal opened from a record pop-up sits above it */
.mp-over-record-backdrop {
    z-index: 1249;
}

.mp-over-record {
    z-index: 1250;
}

/* ---------------------------------------------------------------
   Data collection forms (profile: forms modal)
   --------------------------------------------------------------- */
.mp-settings + .mp-settings {
    margin-left: 2px;
}

.mp-modal-forms {
    width: 820px;
}

.mp-forms-table td {
    vertical-align: middle;
}

.mp-forms-actions {
    text-align: right;
    white-space: nowrap;
}

    .mp-forms-actions .mp-btn,
    .mp-forms-actions .mp-icon-btn {
        margin-left: 4px;
    }

    .mp-forms-actions a.mp-btn {
        display: inline-block;
        text-decoration: none;
    }

.mp-forms-new td {
    background: var(--mp-bg);
}

.mp-input-days {
    width: 80px;
}

.mp-forms-subtitle {
    margin-top: 22px;
}

.mp-sent-box {
    margin: 14px 0 4px;
    padding: 12px;
    border: 1px solid var(--mp-success);
    border-radius: var(--mp-radius-md);
    background: var(--mp-success-bg);
}

.mp-sent-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--mp-success);
    margin-bottom: 8px;
}

.mp-sent-link {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.mp-status-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    background: var(--mp-bg);
    color: var(--mp-text-muted);
}

    .mp-status-pill.is-pending {
        background: var(--mp-brass-050);
        color: var(--mp-brass-500);
    }

    .mp-status-pill.is-completed {
        background: var(--mp-success-bg);
        color: var(--mp-success);
    }

    .mp-status-pill.is-expired {
        background: var(--mp-danger-bg);
        color: var(--mp-danger);
    }

/* Config modal: position / move buttons */
.mp-position {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.mp-position-text {
    min-width: 56px;
    font-size: 13px;
    color: var(--mp-text);
}

.mp-btn-compact {
    padding: 4px 10px;
    font-size: 12px;
}

    .mp-btn-compact:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

/* Danger button (delete) */
.mp-btn-danger {
    background: var(--mp-danger);
    color: #FFFFFF;
    border-color: var(--mp-danger);
}

    .mp-btn-danger:hover:not(:disabled) {
        background: #9A3A25;
        border-color: #9A3A25;
    }

    .mp-btn-danger:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* Push a footer button (e.g. Delete) to the left of the modal footer */
.mp-modal-foot .mp-foot-left {
    margin-right: auto;
}

/* Confirmation modal stacked on top of another modal */
.mp-modal-backdrop-top {
    z-index: 1290;
}

.mp-modal-top {
    z-index: 1300;
}

.mp-modal-sm {
    width: 380px;
}

.mp-confirm-text {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--mp-text);
}

.mp-confirm-note {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--mp-text-muted);
}

/* Config mode: marks components the signed-in user can't view */
.mp-restricted-icon {
    margin-left: 4px;
    font-size: 0.8em;
    color: var(--mp-text-faint);
}


/* ---------------------------------------------------------------
   Excel import (members page)
   --------------------------------------------------------------- */
.mp-modal-import {
    width: 860px;
}

.mp-imp-kinds {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.mp-form-row .mp-imp-kinds .mp-imp-kind {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--mp-text);
    cursor: pointer;
}

    .mp-imp-kind input {
        margin: 0;
        accent-color: var(--mp-navy-700);
    }

    .mp-imp-kind i {
        color: var(--mp-navy-700);
    }

    .mp-form-row .mp-imp-kinds .mp-imp-kind.is-on {
        border-color: var(--mp-navy-700);
        background: var(--mp-navy-050);
    }

.mp-imp-file {
    margin-top: 14px;
}

.mp-imp-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12.5px;
    color: var(--mp-text-muted);
    margin-bottom: 12px;
}

    .mp-imp-summary i {
        color: var(--mp-success);
    }

.mp-imp-sheet {
    max-width: 280px;
}

.mp-imp-map td {
    vertical-align: middle;
}

.mp-imp-map tr.is-unmapped td {
    color: var(--mp-text-muted);
}

.mp-imp-sample {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--mp-text-muted);
}

.mp-imp-empty-col {
    width: 110px;
    text-align: center;
    white-space: nowrap;
}

    .mp-imp-empty-col input {
        accent-color: var(--mp-navy-700);
    }

.mp-imp-save {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--mp-border);
}

    .mp-imp-save .mp-input {
        flex: 1;
        min-width: 220px;
    }

.mp-imp-saved {
    font-size: 12px;
    color: var(--mp-success);
}

.mp-imp-mapping-pick {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .mp-imp-mapping-pick select {
        flex: 1 1 auto;
        min-width: 0;
    }

.mp-imp-confirm {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: var(--mp-radius-sm);
    background: var(--mp-danger-bg);
    font-size: 12.5px;
}

    .mp-imp-confirm span {
        flex: 1 1 200px;
    }

.mp-imp-deleted {
    margin: -4px 0 12px;
}

.mp-imp-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.mp-imp-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    border-radius: var(--mp-radius-md);
    background: var(--mp-bg);
}

    .mp-imp-stat strong {
        font-size: 22px;
        font-weight: 600;
    }

    .mp-imp-stat span {
        font-size: 12px;
        color: var(--mp-text-muted);
    }

    .mp-imp-stat small {
        font-size: 11px;
        color: var(--mp-text-faint);
    }

    .mp-imp-stat.is-ok {
        background: var(--mp-success-bg);
    }

        .mp-imp-stat.is-ok strong {
            color: var(--mp-success);
        }

    .mp-imp-stat.is-empty {
        background: var(--mp-brass-050);
    }

        .mp-imp-stat.is-empty strong {
            color: var(--mp-brass-500);
        }

    .mp-imp-stat.is-fail {
        background: var(--mp-danger-bg);
    }

        .mp-imp-stat.is-fail strong {
            color: var(--mp-danger);
        }

.mp-imp-list {
    margin-bottom: 14px;
}

.mp-imp-list table {
    table-layout: fixed;
}

.mp-imp-list th:nth-child(2) {
    width: 30%;
}

.mp-imp-row {
    width: 60px;
}

@media (max-width: 720px) {
    .mp-imp-kinds,
    .mp-imp-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------------------------------------------------------------
   Setup page
   --------------------------------------------------------------- */
.mp-setup-card {
    margin-bottom: 18px;
}

.mp-setup-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.mp-setup-subhead {
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-navy-900);
    margin: 4px 0 4px;
}

.mp-setup-intro {
    margin: 0 0 12px;
}

.mp-setup-types td {
    vertical-align: middle;
}

.mp-setup-unconfigured td {
    background: var(--mp-brass-050);
}

.mp-colour-pick {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .mp-colour-pick input[type="color"] {
        width: 34px;
        height: 30px;
        padding: 2px;
        border: 1px solid var(--mp-border);
        border-radius: var(--mp-radius-sm);
        background: var(--mp-surface);
        cursor: pointer;
    }

.mp-colour-hex {
    width: 96px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-transform: uppercase;
}

/* ---------------------------------------------------------------
   Notifications bell (top right, all pages)
   --------------------------------------------------------------- */
.mp-notify {
    position: relative;
    margin-right: 10px;
}

.mp-notify-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    font-size: 17px;
    cursor: pointer;
}

    .mp-notify-btn:hover,
    .mp-notify-btn[aria-expanded="true"] {
        background: rgba(0, 0, 0, .06);
        color: #111827;
    }

.mp-notify-count {
    position: absolute;
    top: 3px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--mp-danger);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
}

.mp-notify-panel {
    position: absolute;
    top: 42px;
    right: 0;
    width: 340px;
    max-width: calc(100vw - 24px);
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    box-shadow: var(--mp-shadow-modal);
    z-index: 1400;
    overflow: hidden;
}

.mp-notify-head {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mp-navy-900);
    border-bottom: 1px solid var(--mp-border);
}

.mp-notify-list {
    max-height: 380px;
    overflow-y: auto;
}

.mp-notify-item {
    position: relative;
    display: flex;
    border-bottom: 1px solid var(--mp-border);
    font-size: 12.5px;
}

    .mp-notify-item:last-child {
        border-bottom: none;
    }

    .mp-notify-item:hover {
        background: var(--mp-navy-050);
    }

.mp-notify-main {
    flex: 1;
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 10px 34px 10px 14px;
    color: var(--mp-text);
    text-decoration: none;
}

    a.mp-notify-main:hover {
        color: var(--mp-text);
    }

.mp-notify-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--mp-text-faint);
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
}

    .mp-notify-item:hover .mp-notify-delete,
    .mp-notify-delete:focus {
        opacity: 1;
    }

    .mp-notify-delete:hover {
        background: var(--mp-danger-bg);
        color: var(--mp-danger);
    }

@media (hover: none) {
    .mp-notify-delete {
        opacity: 1;
    }
}

    .mp-notify-item.is-unread {
        background: var(--mp-brass-050);
    }

    .mp-notify-item.is-done .mp-notify-main {
        color: var(--mp-text-muted);
    }

.mp-notify-icon {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mp-navy-050);
    color: var(--mp-navy-700);
}

.mp-notify-item.is-done .mp-notify-icon {
    background: var(--mp-success-bg);
    color: var(--mp-success);
}

.mp-notify-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

    .mp-notify-text strong {
        font-weight: 600;
        color: var(--mp-navy-900);
    }

.mp-notify-meta {
    font-size: 11px;
    color: var(--mp-text-faint);
}

.mp-notify-empty {
    padding: 18px 14px;
    font-size: 12.5px;
    color: var(--mp-text-faint);
    text-align: center;
}

/* ---------------------------------------------------------------
   Data collection form page (/Forms/Complete, /Forms/Snapshot)
   --------------------------------------------------------------- */
.fp-page {
    background: var(--mp-bg);
    font-family: var(--mp-font);
    color: var(--mp-text);
    margin: 0;
    min-height: 100vh;
}

.fp-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 16px 48px;
}

.fp-card {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    padding: 18px 20px;
    margin-bottom: 14px;
}

.fp-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fp-head-icon {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mp-navy-050);
    color: var(--mp-navy-700);
    font-size: 18px;
}

.fp-head-status {
    margin-left: auto;
}

.fp-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--mp-navy-900);
    margin: 0 0 3px;
}

.fp-sub {
    font-size: 12.5px;
    color: var(--mp-text-muted);
}

.fp-msg {
    font-size: 13.5px;
    color: var(--mp-text-muted);
}

    .fp-msg i {
        color: var(--mp-navy-700);
        margin-right: 6px;
    }

.fp-done {
    text-align: center;
    padding: 36px 20px;
}

    .fp-done i {
        font-size: 36px;
        color: var(--mp-success);
    }

    .fp-done h2 {
        font-size: 18px;
        font-weight: 600;
        color: var(--mp-navy-900);
        margin: 12px 0 6px;
    }

    .fp-done p {
        font-size: 13.5px;
        color: var(--mp-text-muted);
        margin: 0;
    }

.fp-group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-navy-900);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--mp-border);
}

.fp-row {
    margin-bottom: 14px;
}

.fp-value {
    font-size: 13.5px;
    color: var(--mp-text);
    padding: 4px 0;
}

.fp-table {
    margin: 4px 0 14px;
}

.fp-error {
    margin: 0 0 12px;
}

.fp-actions {
    display: flex;
    justify-content: flex-end;
}

.fp-submit {
    padding: 9px 22px;
    font-size: 13.5px;
}

/* ---------------------------------------------------------------------
   Dashboard
   --------------------------------------------------------------------- */
.mp-dash [ng-cloak] {
    display: none;
}

.mp-dash-loading,
.mp-dash-muted {
    color: var(--mp-text-muted);
}

.mp-dash-loading {
    padding: 24px 0;
}

.mp-dash-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.mp-dash-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    padding: 16px 18px;
    min-width: 0;
}

.mp-dash-tile-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--mp-text-muted);
}

.mp-dash-tile-value {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--mp-navy-900);
    font-variant-numeric: tabular-nums;
}

.mp-dash-tile-note {
    font-size: 12px;
    color: var(--mp-text-muted);
}

    .mp-dash-tile-note.is-up {
        color: var(--mp-success);
    }

    .mp-dash-tile-note.is-down {
        color: var(--mp-danger);
    }

    .mp-dash-tile-note i {
        font-size: 10px;
        margin-right: 2px;
    }

/* Dashboard cards are standalone panels (the base panel sits under tabs). */
.mp-dash .mp-panel {
    border-top: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
}

.mp-dash-card {
    margin-bottom: 16px;
    min-width: 0;
}

.mp-dash-empty {
    margin-bottom: 16px;
    color: var(--mp-text-muted);
}

    .mp-dash-empty p {
        margin: 0;
    }

.mp-dash-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

    .mp-dash-card-head h2 {
        font-size: 15px;
        font-weight: 600;
        margin: 0;
        color: var(--mp-navy-900);
    }

.mp-dash-card-sub {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--mp-text-muted);
}

.mp-dash-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

    .mp-dash-pair > .mp-dash-card {
        margin-bottom: 16px;
    }

.mp-dash-figure {
    margin: 0;
    min-width: 0;
}

    .mp-dash-figure figcaption {
        font-size: 12px;
        font-weight: 500;
        color: var(--mp-text);
        margin-bottom: 6px;
    }

.mp-dash-canvas {
    position: relative;
    height: 240px;
    width: 100%;
}

.mp-segmented {
    display: inline-flex;
    flex: 0 0 auto;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    padding: 2px;
    background: var(--mp-bg);
}

    .mp-segmented button {
        border: none;
        background: transparent;
        color: var(--mp-text-muted);
        font: inherit;
        font-size: 12px;
        padding: 4px 10px;
        border-radius: var(--mp-radius-sm);
        cursor: pointer;
        white-space: nowrap;
    }

        .mp-segmented button:hover {
            color: var(--mp-text);
        }

        .mp-segmented button.is-on {
            background: var(--mp-surface);
            color: var(--mp-navy-900);
            font-weight: 500;
            box-shadow: 0 1px 2px rgba(22, 35, 61, 0.12);
        }

.mp-dash-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
}

.mp-dash-table th.is-num,
.mp-dash-table td.is-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mp-dash-table tfoot td {
    font-weight: 600;
    border-top: 1px solid var(--mp-border);
    border-bottom: none;
}

.mp-dash-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

@media (max-width: 1100px) {
    .mp-dash-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mp-dash-pair {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .mp-dash-pair .mp-dash-figure + .mp-dash-figure {
        margin-top: 18px;
    }
}

@media (max-width: 560px) {
    .mp-dash-tiles {
        gap: 10px;
    }

    .mp-dash-tile {
        padding: 12px 14px;
    }

    .mp-dash-tile-value {
        font-size: 22px;
    }

    .mp-dash-card-head {
        flex-direction: column;
    }

    .mp-dash-canvas {
        height: 200px;
    }
}

/* ---------------------------------------------------------------------
   Member sign-up forms
   --------------------------------------------------------------------- */
.mp-btn-square {
    padding-left: 10px;
    padding-right: 10px;
}

.mp-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mp-icon-btn.mp-row-forms {
    width: 32px;
    height: 32px;
}

.mp-form-type {
    font-size: 12px;
    color: var(--mp-text-muted);
    white-space: nowrap;
}

    .mp-form-type.is-signup {
        color: var(--mp-navy-700);
        font-weight: 500;
    }

.mp-forms-type-cell select + select {
    margin-top: 6px;
}

.mp-signup-fixed {
    border: 1px dashed var(--mp-border);
    border-radius: var(--mp-radius-md);
    padding: 12px 14px 4px;
    margin-bottom: 14px;
    background: var(--mp-bg);
}

    .mp-signup-fixed .mp-record-group-title {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .mp-signup-fixed .mp-scope-badge {
        background: var(--mp-surface);
    }

.mp-modal-signup .mp-form-row-group {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 12px;
}

.mp-su-forms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.mp-form-row .mp-su-forms .mp-su-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    cursor: pointer;
}

    .mp-form-row .mp-su-forms .mp-su-form.is-on {
        border-color: var(--mp-navy-700);
        background: var(--mp-navy-050);
    }

.mp-su-form-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .mp-su-form-text strong {
        font-size: 13px;
        font-weight: 500;
        color: var(--mp-text);
    }

    .mp-su-form-text small {
        font-size: 11.5px;
        color: var(--mp-text-muted);
    }

.mp-su-user {
    margin: 2px 0 12px;
}

    .mp-su-user small {
        margin-left: 2px;
    }

.mp-su-create {
    display: flex;
    justify-content: flex-end;
}

.mp-su-user-icon {
    margin-left: 6px;
    font-size: 11px;
    color: var(--mp-text-faint);
}

    .mp-su-user-icon.is-error {
        color: var(--mp-danger);
    }

/* Sign-up form page */
.fp-row-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

.fp-required {
    color: var(--mp-danger);
}

.fp-hint {
    margin: -6px 0 12px;
    font-size: 12px;
    color: var(--mp-text-muted);
}

@media (max-width: 560px) {
    .mp-modal-signup .mp-form-row-group,
    .fp-row-pair {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Setup: membership statuses */
.mp-setup-subhead-next {
    margin-top: 26px;
}

.mp-setup-order {
    width: 76px;
    white-space: nowrap;
}

.mp-setup-statuses .mp-status {
    font-size: 12.5px;
}

/* ---------------------------------------------------------------------
   Setup: modules
   --------------------------------------------------------------------- */
.mp-modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mp-module {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    cursor: pointer;
    font-weight: 400;
}

    .mp-module.is-on {
        border-color: var(--mp-navy-700);
        background: var(--mp-navy-050);
    }

.mp-module-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

    .mp-module-text strong {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
        font-size: 13px;
        font-weight: 600;
        color: var(--mp-navy-900);
    }

        .mp-module-text strong i {
            color: var(--mp-navy-700);
        }

    .mp-module-text small {
        font-size: 12px;
        color: var(--mp-text-muted);
    }

.mp-module-warn {
    color: var(--mp-danger) !important;
}

.mp-switch {
    position: relative;
    flex: 0 0 34px;
    width: 34px;
    height: 20px;
    margin-top: 1px;
}

    .mp-switch input {
        position: absolute;
        inset: 0;
        opacity: 0;
        margin: 0;
        cursor: pointer;
        z-index: 1;
    }

.mp-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--mp-border);
    transition: background 0.15s ease;
}

    .mp-switch-track::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #FFFFFF;
        box-shadow: 0 1px 2px rgba(22, 35, 61, 0.25);
        transition: transform 0.15s ease;
    }

.mp-switch input:checked + .mp-switch-track {
    background: var(--mp-navy-700);
}

    .mp-switch input:checked + .mp-switch-track::after {
        transform: translateX(14px);
    }

.mp-switch input:focus-visible + .mp-switch-track {
    outline: 2px solid var(--mp-sidebar-hover);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   Media and Documents: Image and Document fields
   --------------------------------------------------------------------- */
.mp-media {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

    .mp-media.is-compact {
        gap: 0;
    }

.mp-media-empty {
    color: var(--mp-text-faint);
}

.mp-media-thumb {
    display: block;
    padding: 0;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    background: var(--mp-bg);
    overflow: hidden;
    cursor: zoom-in;
    line-height: 0;
    max-width: 100%;
}

    .mp-media-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mp-media-thumb.is-small { width: 72px; height: 72px; }
    .mp-media-thumb.is-medium { width: 140px; height: 140px; }
    .mp-media-thumb.is-large { width: 260px; height: 200px; }
    .mp-media-thumb.is-compact { width: 36px; height: 36px; border-radius: var(--mp-radius-sm); }

    .mp-media-thumb.is-full {
        width: 100%;
        height: auto;
    }

        .mp-media-thumb.is-full img {
            height: auto;
            max-height: 480px;
            object-fit: contain;
        }

    .mp-media-thumb:hover,
    .mp-media-doc:hover {
        border-color: var(--mp-navy-700);
    }

.mp-media-missing {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    color: var(--mp-text-faint);
    line-height: 1;
}

.mp-media-doc {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    background: var(--mp-surface);
    color: var(--mp-text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}

    .mp-media-doc > i {
        font-size: 16px;
        color: var(--mp-navy-700);
    }

    .is-compact .mp-media-doc {
        padding: 2px 8px;
        font-size: 12.5px;
    }

.mp-media-doc-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-media-doc-type {
    flex: 0 0 auto;
    padding: 1px 6px;
    border-radius: var(--mp-radius-sm);
    background: var(--mp-navy-050);
    color: var(--mp-navy-700);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.mp-media-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.mp-media-upload {
    position: relative;
    overflow: hidden;
    margin: 0;
    cursor: pointer;
}

    .mp-media-upload.is-busy {
        opacity: 0.7;
        cursor: progress;
    }

.mp-media-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.mp-media-hint {
    font-size: 11.5px;
    color: var(--mp-text-muted);
}

.mp-media-error {
    margin: 0;
    font-size: 12px;
    color: var(--mp-danger);
}

/* File viewer pop-up (above every other modal) */
.mp-viewer {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.mp-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 35, 61, 0.72);
}

.mp-viewer-box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1000px, 100%);
    max-height: 100%;
    background: var(--mp-surface);
    border-radius: var(--mp-radius-md);
    box-shadow: var(--mp-shadow-modal);
    overflow: hidden;
}

.mp-viewer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--mp-border);
}

.mp-viewer-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-weight: 600;
    color: var(--mp-navy-900);
}

    .mp-viewer-title > i {
        color: var(--mp-navy-700);
    }

.mp-viewer-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-viewer-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

    .mp-viewer-tools a.mp-btn {
        text-decoration: none;
    }

.mp-viewer-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: var(--mp-bg);
    overflow: auto;
}

.mp-viewer-img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
}

.mp-viewer-frame {
    display: block;
    width: 100%;
    height: calc(100vh - 140px);
    border: 0;
    background: #FFFFFF;
}

.mp-viewer-file,
.mp-viewer-msg {
    padding: 40px 24px;
    text-align: center;
    color: var(--mp-text-muted);
}

    .mp-viewer-file > i {
        font-size: 40px;
        color: var(--mp-navy-700);
    }

    .mp-viewer-file a.mp-btn {
        display: inline-block;
        text-decoration: none;
    }

@media (max-width: 720px) {
    .mp-modules {
        grid-template-columns: minmax(0, 1fr);
    }

    .mp-viewer {
        padding: 0;
    }

    .mp-viewer-box {
        height: 100%;
        border-radius: 0;
    }

    .mp-viewer-body {
        flex: 1 1 auto;
    }

    .mp-media-thumb.is-large {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
    }
}

/* ---------------------------------------------------------------------
   Profile picture: camera button and menu
   --------------------------------------------------------------------- */
.mp-avatar-wrap {
    position: relative;
    flex: 0 0 64px;
}

button.mp-avatar {
    position: relative;
    display: block;
    padding: 0;
    cursor: default;
}

    button.mp-avatar.has-photo {
        cursor: zoom-in;
    }

    button.mp-avatar:disabled {
        opacity: 1;
    }

.mp-avatar-busy {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 35, 61, 0.45);
    color: #FFFFFF;
}

.mp-avatar-edit {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid var(--mp-surface);
    border-radius: 50%;
    background: var(--mp-navy-700);
    color: #FFFFFF;
    font-size: 11px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(22, 35, 61, 0.25);
}

    .mp-avatar-edit:hover:not(:disabled) {
        background: var(--mp-navy-900);
    }

    .mp-avatar-edit:focus-visible {
        outline: 2px solid var(--mp-sidebar-hover);
        outline-offset: 2px;
    }

.mp-avatar-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    padding: 6px;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    box-shadow: var(--mp-shadow-modal);
}

.mp-avatar-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 8px 10px;
    border: none;
    border-radius: var(--mp-radius-sm);
    background: transparent;
    color: var(--mp-text);
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
}

    .mp-avatar-menu-item:hover {
        background: var(--mp-navy-050);
    }

    .mp-avatar-menu-item i {
        width: 14px;
        color: var(--mp-navy-700);
    }

    .mp-avatar-menu-item.is-danger,
    .mp-avatar-menu-item.is-danger i {
        color: var(--mp-danger);
    }

.mp-avatar-menu-hint {
    padding: 4px 10px 2px;
    font-size: 11px;
    color: var(--mp-text-muted);
}

.mp-avatar-error {
    margin: 0 0 4px;
}

/* ---------------------------------------------------------------------
   Events module
   --------------------------------------------------------------------- */
.mp-ev-gear {
    margin-left: 0;
    cursor: pointer;
}

    .mp-ev-gear.is-on {
        background: var(--mp-navy-050);
        color: var(--mp-navy-700);
    }

.mp-ev-tabs {
    margin-bottom: 16px;
}

.mp-ev-tab-count {
    display: inline-block;
    min-width: 18px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--mp-navy-050);
    color: var(--mp-navy-700);
    font-size: 11px;
    line-height: 17px;
    text-align: center;
}

.mp-ev-empty {
    border-top: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    padding: 36px 20px;
    text-align: center;
    color: var(--mp-text-muted);
}

    .mp-ev-empty > i {
        font-size: 28px;
        color: var(--mp-text-faint);
    }

.mp-ev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.mp-ev-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    overflow: hidden;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

    .mp-ev-card:hover {
        box-shadow: 0 6px 18px rgba(22, 35, 61, 0.10);
    }

    .mp-ev-card.is-past .mp-ev-card-media img {
        filter: grayscale(0.6);
    }

    .mp-ev-card.is-draft {
        border-style: dashed;
    }

.mp-ev-card-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: none;
    background: linear-gradient(135deg, var(--mp-navy-700), var(--mp-navy-900));
    cursor: pointer;
    overflow: hidden;
}

    .mp-ev-card-media img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.mp-ev-card-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 34px;
}

.mp-ev-date {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 46px;
    padding: 4px 6px;
    border-radius: var(--mp-radius-md);
    background: var(--mp-surface);
    box-shadow: 0 1px 4px rgba(22, 35, 61, 0.2);
    line-height: 1.1;
}

.mp-ev-date-day {
    font-size: 18px;
    font-weight: 700;
    color: var(--mp-navy-900);
}

.mp-ev-date-month {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--mp-brass-500);
}

.mp-ev-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--mp-brass-500);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
}

    .mp-ev-flag.is-inline {
        position: static;
        display: inline-block;
        margin-right: 6px;
    }

.mp-ev-card-body {
    flex: 1 1 auto;
    padding: 12px 14px 6px;
    min-width: 0;
}

.mp-ev-card-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

    .mp-ev-card-title a {
        color: var(--mp-navy-900);
        text-decoration: none;
    }

        .mp-ev-card-title a:hover {
            text-decoration: underline;
        }

.mp-ev-when,
.mp-ev-where {
    margin: 0 0 3px;
    font-size: 12.5px;
    color: var(--mp-text-muted);
}

    .mp-ev-when i,
    .mp-ev-where i {
        width: 14px;
        margin-right: 4px;
        color: var(--mp-navy-700);
    }

.mp-ev-summary {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--mp-text);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mp-ev-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 48px;
    padding: 8px 14px 12px;
}

.mp-ev-count {
    font-size: 12.5px;
    color: var(--mp-text-muted);
}

    .mp-ev-count i {
        margin-right: 3px;
        color: var(--mp-navy-700);
    }

    .mp-ev-count strong {
        color: var(--mp-navy-900);
    }

.mp-ev-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.mp-btn-attending {
    background: var(--mp-success-bg);
    border: 1px solid var(--mp-success);
    color: var(--mp-success);
}

    .mp-btn-attending:hover:not(:disabled) {
        background: var(--mp-success);
        color: #FFFFFF;
    }

/* ---- detail pop-up (layouts: banner, split, gallery, simple) ---- */
.mp-ev-detail {
    width: 760px;
    padding: 0;
}

.mp-ev-detail-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(22, 35, 61, 0.25);
}

.mp-ev-detail-body {
    padding-bottom: 20px;
}

.mp-ev-hero {
    width: 100%;
    max-height: 340px;
    overflow: hidden;
    background: var(--mp-navy-900);
}

    .mp-ev-hero img {
        display: block;
        width: 100%;
        max-height: 340px;
        object-fit: cover;
        cursor: zoom-in;
    }

.mp-ev-detail-main {
    display: flex;
    gap: 20px;
    padding: 18px 22px 0;
}

.mp-ev-info {
    flex: 1 1 auto;
    min-width: 0;
}

.mp-ev-detail-title {
    margin: 4px 0 8px;
    font-size: 21px;
    font-weight: 600;
    color: var(--mp-navy-900);
    line-height: 1.25;
}

.mp-ev-attend-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.mp-ev-detail-summary {
    margin: 14px 22px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--mp-text);
}

.mp-ev-detail-text {
    margin: 10px 22px 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--mp-text);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.mp-ev-gallery,
.mp-ev-attendees {
    margin: 20px 22px 0;
}

.mp-ev-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.mp-ev-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    background: var(--mp-bg);
    overflow: hidden;
    cursor: zoom-in;
}

    .mp-ev-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.mp-ev-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 35, 61, 0.55);
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
}

.mp-ev-attendees ul {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
}

.mp-ev-attendees li {
    break-inside: avoid;
    padding: 4px 0;
    font-size: 13px;
}

    .mp-ev-attendees li small {
        display: block;
        color: var(--mp-text-muted);
        font-size: 11.5px;
    }

/* Side by side: the image sits next to the details */
.mp-ev-split-image {
    flex: 0 0 44%;
    border-radius: var(--mp-radius-md);
    overflow: hidden;
    align-self: flex-start;
}

    .mp-ev-split-image img {
        display: block;
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        cursor: zoom-in;
    }

/* Gallery first: a large first picture with a strip of the next ones */
.mp-ev-detail-gallery-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 6px;
    padding: 6px;
    background: var(--mp-navy-900);
}

.mp-ev-feature {
    display: block;
    padding: 0;
    border: none;
    border-radius: var(--mp-radius-sm);
    overflow: hidden;
    cursor: zoom-in;
}

    .mp-ev-feature img {
        display: block;
        width: 100%;
        height: 100%;
        min-height: 260px;
        max-height: 360px;
        object-fit: cover;
    }

.mp-ev-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    align-content: start;
}

    .mp-ev-strip .mp-ev-thumb {
        border: none;
        border-radius: var(--mp-radius-sm);
    }

.mp-ev-detail.is-gallery .mp-ev-detail-gallery-top:only-child,
.mp-ev-detail.is-gallery .mp-ev-detail-gallery-top:not(:has(.mp-ev-strip)) {
    grid-template-columns: 1fr;
}

/* Simple: a header band instead of an image */
.mp-ev-detail.is-simple .mp-ev-detail-main {
    padding-top: 24px;
    border-bottom: 1px solid var(--mp-border);
    padding-bottom: 14px;
}

/* ---- editor ---- */
.mp-ev-editor {
    width: 720px;
}

.mp-ev-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mp-ev-bg {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.mp-ev-bg-preview {
    width: 200px;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    overflow: hidden;
    background: var(--mp-bg);
}

    .mp-ev-bg-preview img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mp-ev-bg-preview.is-empty {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--mp-text-faint);
        font-size: 12px;
    }

.mp-ev-bg .mp-media-actions {
    flex: 1 1 200px;
}

.mp-ev-pics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

.mp-ev-pic {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    overflow: hidden;
    background: var(--mp-bg);
}

    .mp-ev-pic img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.mp-ev-pic-tools {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 4px;
    display: flex;
    justify-content: space-between;
    gap: 2px;
}

    .mp-ev-pic-tools button {
        width: 24px;
        height: 24px;
        padding: 0;
        border: none;
        border-radius: var(--mp-radius-sm);
        background: rgba(255, 255, 255, 0.92);
        color: var(--mp-navy-900);
        font-size: 11px;
        cursor: pointer;
    }

        .mp-ev-pic-tools button:disabled {
            opacity: 0.4;
            cursor: default;
        }

        .mp-ev-pic-tools button.is-danger {
            color: var(--mp-danger);
        }

.mp-ev-pic-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    border-style: dashed;
    color: var(--mp-navy-700);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}

    .mp-ev-pic-add:hover {
        background: var(--mp-navy-050);
    }

    .mp-ev-pic-add.is-busy {
        cursor: progress;
    }

.mp-ev-layouts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.mp-form-row .mp-ev-layouts .mp-ev-layout {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    cursor: pointer;
    font-weight: 400;
}

    .mp-form-row .mp-ev-layouts .mp-ev-layout.is-on {
        border-color: var(--mp-navy-700);
        background: var(--mp-navy-050);
    }

.mp-ev-layout input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mp-ev-layout strong {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mp-navy-900);
}

.mp-ev-layout small {
    font-size: 11px;
    color: var(--mp-text-muted);
    line-height: 1.3;
}

/* Little sketches of each layout: four blocks placed per layout */
.mp-ev-layout-pic {
    position: relative;
    display: block;
    height: 54px;
    border-radius: var(--mp-radius-sm);
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    overflow: hidden;
}

    .mp-ev-layout-pic i {
        position: absolute;
        border-radius: 2px;
        background: var(--mp-border);
    }

    .mp-ev-layout-pic.is-banner i:nth-child(1) { left: 0; top: 0; right: 0; height: 24px; background: var(--mp-navy-700); border-radius: 0; }
    .mp-ev-layout-pic.is-banner i:nth-child(2) { left: 6px; top: 30px; width: 55%; height: 5px; background: var(--mp-navy-900); }
    .mp-ev-layout-pic.is-banner i:nth-child(3) { left: 6px; top: 39px; width: 75%; height: 3px; }
    .mp-ev-layout-pic.is-banner i:nth-child(4) { left: 6px; top: 46px; width: 60%; height: 3px; }

    .mp-ev-layout-pic.is-split i:nth-child(1) { right: 6px; top: 6px; width: 40%; bottom: 6px; background: var(--mp-navy-700); }
    .mp-ev-layout-pic.is-split i:nth-child(2) { left: 6px; top: 8px; width: 40%; height: 5px; background: var(--mp-navy-900); }
    .mp-ev-layout-pic.is-split i:nth-child(3) { left: 6px; top: 18px; width: 45%; height: 3px; }
    .mp-ev-layout-pic.is-split i:nth-child(4) { left: 6px; top: 25px; width: 35%; height: 3px; }

    .mp-ev-layout-pic.is-gallery i:nth-child(1) { left: 4px; top: 4px; width: 58%; height: 30px; background: var(--mp-navy-700); }
    .mp-ev-layout-pic.is-gallery i:nth-child(2) { right: 4px; top: 4px; width: 32%; height: 13px; background: var(--mp-navy-050); border: 1px solid var(--mp-navy-700); }
    .mp-ev-layout-pic.is-gallery i:nth-child(3) { right: 4px; top: 21px; width: 32%; height: 13px; background: var(--mp-navy-050); border: 1px solid var(--mp-navy-700); }
    .mp-ev-layout-pic.is-gallery i:nth-child(4) { left: 6px; top: 40px; width: 55%; height: 5px; background: var(--mp-navy-900); }

    .mp-ev-layout-pic.is-simple i:nth-child(1) { left: 6px; top: 8px; width: 55%; height: 5px; background: var(--mp-navy-900); }
    .mp-ev-layout-pic.is-simple i:nth-child(2) { left: 6px; top: 18px; width: 80%; height: 3px; }
    .mp-ev-layout-pic.is-simple i:nth-child(3) { left: 6px; top: 25px; width: 70%; height: 3px; }
    .mp-ev-layout-pic.is-simple i:nth-child(4) { left: 6px; top: 36px; width: 22%; height: 13px; background: var(--mp-navy-050); border: 1px solid var(--mp-navy-700); box-shadow: 26px 0 0 -1px var(--mp-navy-050), 52px 0 0 -1px var(--mp-navy-050); }

.mp-ev-flags {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mp-ev-delete {
    color: var(--mp-danger);
}

@media (max-width: 720px) {
    .mp-ev-detail-main {
        flex-direction: column;
    }

    .mp-ev-split-image {
        flex-basis: auto;
    }

    .mp-ev-detail-gallery-top {
        grid-template-columns: 1fr;
    }

    .mp-ev-layouts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mp-ev-dates {
        grid-template-columns: 1fr;
    }

    .mp-ev-attendees ul {
        columns: 1;
    }
}

/* Events: which membership types can see an event */
.mp-ev-audience {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mp-ev-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 22px;
}

.mp-ev-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px 8px;
    border: 1px solid var(--mp-border);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 400;
}

    .mp-ev-type.is-on {
        border-color: var(--mp-navy-700);
        background: var(--mp-navy-050);
    }

    .mp-ev-type input {
        margin: 0;
        accent-color: var(--mp-navy-700);
    }

.mp-ev-audience-tag {
    position: absolute;
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(22, 35, 61, 0.78);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------------------------------------------------------------------
   Sign-in and organisation registration (_AuthLayout)
   --------------------------------------------------------------------- */
.mp-auth-body {
    margin: 0;
    background: var(--mp-bg);
}

.mp-auth {
    display: grid;
    grid-template-columns: minmax(300px, 420px) 1fr;
    min-height: 100vh;
}

.mp-auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 40px 44px;
    background: var(--mp-navy-900);
    color: #FFFFFF;
    overflow: hidden;
}

    .mp-auth-brand::after {
        content: "";
        position: absolute;
        right: -120px;
        bottom: -120px;
        width: 320px;
        height: 320px;
        border: 1px solid rgba(169, 130, 76, 0.35);
        border-radius: 50%;
        box-shadow: 0 0 0 40px rgba(169, 130, 76, 0.06), 0 0 0 80px rgba(169, 130, 76, 0.04);
        pointer-events: none;
    }

.mp-auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #FFFFFF;
    text-decoration: none;
}

    .mp-auth-logo:hover {
        color: #FFFFFF;
    }

.mp-auth-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--mp-radius-md);
    background: var(--mp-brass-500);
    color: var(--mp-navy-900);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.mp-auth-wordmark {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.mp-auth-pitch-title {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 600;
    color: #FFFFFF;
}

.mp-auth-pitch-text {
    margin: 0;
    max-width: 300px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.72);
}

.mp-auth-brand-foot {
    margin: 0;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.5);
}

.mp-auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.mp-auth-card {
    width: 100%;
    max-width: 380px;
}

.mp-auth-card-wide {
    max-width: 520px;
}

.mp-auth-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    color: var(--mp-navy-900);
}

.mp-auth-sub {
    margin: 0 0 22px;
    font-size: 13px;
    color: var(--mp-text-muted);
}

.mp-auth-section {
    margin: 22px 0 10px;
    padding-top: 16px;
    border-top: 1px solid var(--mp-border);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mp-text-muted);
}

    .mp-auth-section:first-of-type {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }

.mp-auth-field {
    margin-bottom: 14px;
}

    .mp-auth-field label {
        display: block;
        margin-bottom: 5px;
        font-size: 12px;
        font-weight: 500;
        color: var(--mp-text);
    }

.mp-auth-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    box-sizing: border-box;
    font-family: var(--mp-font);
    font-size: 14px;
    color: var(--mp-text);
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
}

    .mp-auth-input:focus {
        border-color: var(--mp-navy-700);
        box-shadow: 0 0 0 3px rgba(36, 52, 90, 0.12);
        outline: none;
    }

    .mp-auth-input.input-validation-error {
        border-color: var(--mp-danger);
    }

.mp-auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

.mp-auth-password {
    position: relative;
}

    .mp-auth-password .mp-auth-input {
        padding-right: 42px;
    }

.mp-auth-reveal {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--mp-text-muted);
    cursor: pointer;
}

    .mp-auth-reveal:hover {
        color: var(--mp-navy-900);
    }

.mp-auth-hint {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--mp-text-faint);
}

.mp-auth-hint-block {
    margin: -4px 0 14px;
}

.mp-auth-field-error {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--mp-danger);
}

    .mp-auth-field-error:empty {
        display: none;
    }

.mp-auth-error {
    margin: 0 0 14px;
    padding: 9px 12px;
    background: var(--mp-danger-bg);
    color: var(--mp-danger);
    border-radius: var(--mp-radius-sm);
    font-size: 12.5px;
}

.mp-auth-note {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin: 0 0 18px;
    padding: 10px 12px;
    background: var(--mp-brass-050);
    color: var(--mp-text);
    border-radius: var(--mp-radius-sm);
    font-size: 12.5px;
}

    .mp-auth-note i {
        color: var(--mp-brass-500);
    }

.mp-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    font-size: 13.5px;
    text-decoration: none;
}

    .mp-auth-submit:disabled {
        opacity: 0.55;
        cursor: default;
    }

.mp-auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 16px;
    font-size: 12.5px;
    color: var(--mp-text);
    cursor: pointer;
}

.mp-auth-alt {
    margin: 22px 0 0;
    font-size: 12.5px;
    color: var(--mp-text-muted);
    text-align: center;
}

    .mp-auth-alt a {
        font-weight: 500;
    }

.mp-auth-who {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -8px 0 18px;
    padding: 8px 12px;
    background: var(--mp-navy-050);
    border-radius: var(--mp-radius-md);
    font-size: 12.5px;
}

    .mp-auth-who i {
        color: var(--mp-text-muted);
    }

.mp-auth-who-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--mp-navy-900);
    font-weight: 500;
}

.mp-auth-who a {
    font-size: 12px;
}

.mp-auth-orgs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

.mp-auth-org {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .mp-auth-org:hover {
        border-color: var(--mp-navy-700);
    }

    .mp-auth-org input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .mp-auth-org:has(input:checked) {
        border-color: var(--mp-navy-900);
        box-shadow: 0 0 0 1px var(--mp-navy-900);
    }

    .mp-auth-org:has(input:focus-visible) {
        box-shadow: 0 0 0 3px rgba(36, 52, 90, 0.2);
    }

.mp-auth-org-mark {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--mp-radius-md);
    background: var(--mp-navy-050);
    color: var(--mp-navy-900);
    font-size: 12px;
    font-weight: 600;
}

.mp-auth-org-name {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--mp-navy-900);
}

.mp-auth-org-tick {
    color: var(--mp-navy-900);
    visibility: hidden;
}

.mp-auth-org:has(input:checked) .mp-auth-org-tick {
    visibility: visible;
}

.mp-auth-steps {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

    .mp-auth-steps li {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 0;
        font-size: 13px;
        color: var(--mp-text-faint);
    }

        .mp-auth-steps li + li {
            border-top: 1px solid var(--mp-border);
        }

.mp-auth-step-icon {
    position: relative;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--mp-border);
    border-radius: 50%;
    box-sizing: border-box;
}

.mp-auth-steps li.is-active {
    color: var(--mp-navy-900);
    font-weight: 500;
}

    .mp-auth-steps li.is-active .mp-auth-step-icon {
        border-color: var(--mp-navy-050);
        border-top-color: var(--mp-navy-900);
        animation: mp-auth-spin 0.8s linear infinite;
    }

.mp-auth-steps li.is-done {
    color: var(--mp-text);
}

    .mp-auth-steps li.is-done .mp-auth-step-icon {
        border-color: var(--mp-success);
        background: var(--mp-success);
    }

        .mp-auth-steps li.is-done .mp-auth-step-icon::after {
            content: "";
            position: absolute;
            left: 5px;
            top: 2px;
            width: 5px;
            height: 9px;
            border: solid #FFFFFF;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

.mp-auth-steps li.is-failed {
    color: var(--mp-danger);
    font-weight: 500;
}

    .mp-auth-steps li.is-failed .mp-auth-step-icon {
        border-color: var(--mp-danger);
    }

@keyframes mp-auth-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mp-auth-steps li.is-active .mp-auth-step-icon {
        animation: none;
        border-color: var(--mp-navy-900);
    }
}

.mp-auth-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 860px) {
    .mp-auth {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .mp-auth-brand {
        padding: 18px 20px;
        gap: 0;
    }

        .mp-auth-brand::after,
        .mp-auth-pitch,
        .mp-auth-brand-foot {
            display: none;
        }

    .mp-auth-main {
        align-items: flex-start;
        padding: 32px 16px;
    }
}

@media (max-width: 480px) {
    .mp-auth-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------------
   User registration and activation
   --------------------------------------------------------------------- */
.mp-auth-alt-tight {
    margin-top: 8px;
}

.mp-auth-joining {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    padding: 12px 14px;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-md);
}

.mp-auth-joining-text {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
}

    .mp-auth-joining-text small {
        font-size: 11px;
        color: var(--mp-text-muted);
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }

    .mp-auth-joining-text strong {
        font-size: 14px;
        font-weight: 600;
        color: var(--mp-navy-900);
    }

.mp-auth-joining a {
    flex-shrink: 0;
    font-size: 12px;
}

.mp-auth-done {
    text-align: center;
}

.mp-auth-done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--mp-success-bg);
    color: var(--mp-success);
    font-size: 22px;
}

.mp-auth-done-text {
    margin: 0 0 10px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--mp-text);
}

.mp-auth-done .mp-auth-sub {
    margin-bottom: 24px;
}

.mp-activation-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 10px 14px;
    background: var(--mp-brass-050);
    border: 1px solid rgba(169, 130, 76, 0.35);
    border-radius: var(--mp-radius-md);
    font-size: 12.5px;
    color: var(--mp-text);
}

    .mp-activation-banner > i {
        color: var(--mp-brass-500);
        font-size: 15px;
    }

    .mp-activation-banner > span {
        flex: 1;
    }

.mp-activation-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

    .mp-activation-badge.is-active {
        background: var(--mp-success-bg);
        color: var(--mp-success);
    }

    .mp-activation-badge.is-pending {
        background: var(--mp-brass-050);
        color: #7A5A2C;
    }

    .mp-activation-badge.is-off {
        background: var(--mp-danger-bg);
        color: var(--mp-danger);
    }

.mp-activation-actions {
    margin-top: 6px;
}

.mp-user-name {
    font-weight: 500;
    color: var(--mp-navy-900);
}

.mp-user-sub {
    font-size: 11.5px;
    color: var(--mp-text-faint);
}

.mp-user-status {
    min-width: 150px;
}

.mp-table tr.mp-user-pending > td {
    background: #FFFBF4;
}

.mp-registration {
    max-width: 640px;
}

.mp-registration-code {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .mp-registration-code code {
        padding: 5px 10px;
        background: var(--mp-navy-050);
        border-radius: var(--mp-radius-sm);
        color: var(--mp-navy-900);
        font-size: 13px;
    }

.mp-role-default {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--mp-navy-050);
    color: var(--mp-text-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    vertical-align: 1px;
}

/* ---------------------------------------------------------------------
   Users page: roles bar, compact user rows, Add member
   --------------------------------------------------------------------- */
.mp-roles-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.mp-roles-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-navy-900);
}

.mp-role-pills {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.mp-role-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--mp-navy-900);
}

    .mp-role-pill.is-default {
        background: var(--mp-navy-050);
        border-color: transparent;
    }

    .mp-role-pill .fa-lock {
        font-size: 9px;
        color: var(--mp-text-faint);
    }

.mp-role-pill-remove {
    appearance: none;
    padding: 0 0 0 2px;
    background: none;
    border: none;
    font-size: 14px;
    line-height: 1;
    color: var(--mp-text-faint);
    cursor: pointer;
}

    .mp-role-pill-remove:hover {
        color: var(--mp-danger);
    }

.mp-role-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.mp-role-add-input.mp-input {
    width: 140px;
    padding: 4px 9px;
    font-size: 12px;
}

.mp-roles-hint {
    margin: 10px 0 0;
}

    .mp-roles-hint .fa-lock {
        margin-right: 3px;
        font-size: 9.5px;
        color: var(--mp-text-faint);
    }

.mp-users-table td {
    vertical-align: top;
}

.mp-user-cell {
    min-width: 190px;
}

.mp-user-confirmed {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 6px 0 0;
    font-size: 11.5px;
    font-weight: 400;
    color: var(--mp-text-muted);
    cursor: pointer;
}

    .mp-user-confirmed.is-off {
        color: var(--mp-text-faint);
    }

    .mp-user-confirmed input {
        margin: 0;
    }

.mp-user-member {
    white-space: nowrap;
}

.mp-member-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

    .mp-member-link i {
        font-size: 10px;
        color: var(--mp-text-faint);
    }

    .mp-member-link:hover i {
        color: var(--mp-navy-900);
    }

.mp-user-roles {
    min-width: 210px;
}

.mp-role-chip.is-admin {
    background: var(--mp-brass-050);
    color: #7A5A2C;
}

.mp-user-noroles {
    margin-right: 6px;
    font-size: 12px;
}

.mp-role-add-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 2px 0;
    padding: 2px 9px;
    background: transparent;
    border: 1px dashed var(--mp-border);
    border-radius: 999px;
    font-family: var(--mp-font);
    font-size: 11.5px;
    color: var(--mp-text-muted);
    cursor: pointer;
}

    .mp-role-add-btn i {
        font-size: 9px;
    }

    .mp-role-add-btn:hover {
        border-color: var(--mp-navy-700);
        color: var(--mp-navy-900);
    }

.mp-role-picker {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 2px 0;
}

.mp-role-picker-select.mp-input {
    width: auto;
    padding: 2px 6px;
    font-size: 12px;
}

.mp-am-intro {
    margin: 0 0 14px;
    font-size: 12.5px;
    color: var(--mp-text-muted);
}

    .mp-am-intro strong {
        color: var(--mp-navy-900);
    }

.mp-am-optional {
    font-weight: 400;
    color: var(--mp-text-faint);
}

.mp-am-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--mp-text);
    cursor: pointer;
}

    .mp-am-check input {
        margin-top: 2px;
    }

.mp-users-table .mp-activation-actions .mp-btn-ghost {
    padding-left: 0;
}

/* Users table: compact rows */
.mp-users-table td {
    padding: 6px 10px;
    vertical-align: middle;
}

.mp-users-table .mp-user-name {
    line-height: 1.3;
}

.mp-users-table .mp-user-sub {
    line-height: 1.3;
}

.mp-users-table .mp-role-chip {
    margin: 1px 4px 1px 0;
}

.mp-users-table .mp-btn-compact {
    padding: 2px 9px;
    font-size: 11.5px;
}

.mp-status-line {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.mp-email-flag {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: var(--mp-radius-sm);
    font-size: 13px;
    color: var(--mp-text-faint);
    cursor: pointer;
}

    .mp-email-flag.is-on {
        color: var(--mp-success);
    }

    .mp-email-flag:hover:not(:disabled) {
        background: var(--mp-navy-050);
    }

    .mp-email-flag:disabled {
        cursor: default;
        opacity: 0.7;
    }

.mp-link-btn {
    appearance: none;
    padding: 0;
    background: none;
    border: 0;
    font-family: var(--mp-font);
    font-size: 11.5px;
    color: var(--mp-text-muted);
    cursor: pointer;
}

    .mp-link-btn:hover:not(:disabled) {
        color: var(--mp-danger);
        text-decoration: underline;
    }

/* Required fields: marker in the group edit modal, and a missing value */
.mp-required {
    color: var(--mp-danger);
    font-weight: 600;
}

.mp-field-missing > label {
    color: var(--mp-danger);
}

.mp-field-missing .mp-input {
    border-color: var(--mp-danger);
}

/* Profile header in config mode: shows the membership type being configured */
.mp-config-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--mp-navy-700);
    background: var(--mp-surface);
    border: 1px dashed var(--mp-navy-700);
}

.mp-header.is-config .mp-avatar {
    cursor: default;
}

/* Table field: Data entity dropdown with a delete button */
.mp-entity-pick {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .mp-entity-pick .mp-input {
        flex: 1;
        min-width: 0;
    }

.mp-btn-danger-outline {
    color: var(--mp-danger);
    border-color: var(--mp-danger);
}

    .mp-btn-danger-outline:hover:not(:disabled) {
        background: var(--mp-danger-bg);
    }

/* Generic confirmation: list of items (e.g. where a data entity is still used) */
.mp-confirm-list {
    margin: 0 0 12px;
    padding-left: 18px;
    font-size: 13px;
    color: var(--mp-text);
}

/* =====================================================================
   Tasks and Approvals
   ===================================================================== */

/* Sidebar: number of open tasks assigned to the signed-in user */
.mp-sidebar-count {
    margin-left: auto;
    min-width: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--mp-brass-500);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

/* Tasks page: filters and table */
.mp-task-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.mp-task-type {
    width: auto;
    min-width: 200px;
    max-width: 320px;
}

.mp-task-type-cell {
    white-space: nowrap;
    color: var(--mp-navy-900);
    font-weight: 500;
}

    .mp-task-type-cell i {
        color: var(--mp-text-muted);
        margin-right: 4px;
    }

.mp-task-title {
    color: var(--mp-text);
}

.mp-task-sub {
    font-size: 11.5px;
    color: var(--mp-text-muted);
}

.mp-task-date {
    white-space: nowrap;
}

.mp-table tr.mp-task-done > td {
    color: var(--mp-text-muted);
}

/* Users and roles picked as task assignees / form approvers */
.mp-assignee-add {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

    .mp-assignee-add .mp-input {
        flex: 1 1 220px;
        max-width: 360px;
    }

.mp-assignees {
    margin-top: 10px;
}

    .mp-assignees.is-off {
        opacity: 0.6;
    }

.mp-task-toggle {
    margin-bottom: 4px;
}

.mp-form-approvers {
    margin-top: 18px;
}

.mp-inline-ok {
    margin: 8px 0 0;
}

/* Form review page (Tasks): back link and the approval section */
.fp-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--mp-navy-700);
    text-decoration: none;
}

    .fp-back:hover {
        text-decoration: underline;
    }

.fp-approval-table {
    margin-bottom: 10px;
}

    .fp-approval-table tr.fp-approval-me > td {
        background: var(--mp-navy-050);
    }

.fp-approval-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.fp-approval-result {
    margin-top: 12px;
}

/* Tasks: Reassign next to Review / View; an administrator deciding for someone else */
.mp-task-actions {
    white-space: nowrap;
}

    .mp-task-actions .mp-btn + .mp-btn {
        margin-left: 6px;
    }

/* Data collection forms: Copy / Notify / Email next to a new link stay on one line */
.mp-sent-link .mp-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Data collection forms: the one-time link was emailed */
.mp-emailed-hint {
    margin: 2px 0 0;
    white-space: nowrap;
}

.fp-on-behalf {
    margin: 0 0 10px;
    color: var(--mp-navy-700);
}
