:root {
    --brand-dark: #2b2b33;
    --brand-pink: #c2185b;
    --page-bg: #f4f5f7;
    --card-border: #e9eaee;
    --statusbar-bg: #1f2129;
    /* Surfaces and text, also used by the module stylesheets. */
    --mp-surface: #fff;
    --mp-surface-2: #fafafb;
    --mp-surface-3: #f1f2f4;
    --mp-text: #2b2b33;
    --mp-muted: #6c7280;
    --mp-faint: #b8bcc6;
}

/* Dark theme (user menu → "Dunkles Design"); Bootstrap 5.3 switches its own
   components with the same attribute on <html>. */
[data-bs-theme="dark"] {
    --brand-dark: #e3e4e8;
    --page-bg: #15161b;
    --card-border: #2f313a;
    --statusbar-bg: #0f1014;
    --mp-surface: #1f2027;
    --mp-surface-2: #25262e;
    --mp-surface-3: #2c2d36;
    --mp-text: #e3e4e8;
    --mp-muted: #a2a7b3;
    --mp-faint: #6f7480;
    --bs-body-bg: var(--page-bg);
    --bs-body-color: var(--mp-text);
    --bs-border-color: var(--card-border);
}

[data-bs-theme="dark"] .text-bg-light {
    color: var(--mp-text) !important;
    background-color: var(--mp-surface-3) !important;
}

body {
    background-color: var(--page-bg);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--mp-text, #2b2b33);
    padding-bottom: 48px; /* leave room for fixed status bar */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Stretches to fill the space between the top bar and the status bar, so
   content that ends with a "mt-auto" element (e.g. pagination) always sits
   at the bottom of the page instead of right after a short card grid. */
main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* ---------- Top navbar ---------- */
/* No bottom padding: the module tabs stand on the bottom border. */
.topbar {
    background: var(--mp-surface, #fff);
    border-bottom: 1px solid var(--card-border);
    padding: 0.6rem 1.5rem 0;
}

/* Same side spacing as the page content (main: px-4), so the first tab starts
   flush with the header band below; Bootstrap's container padding would add 0.75rem. */
.topbar > .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

/* 3-column grid (tabs / logo / user menu) instead of flex + space-between:
   this keeps the logo truly centered no matter how many tabs are open
   or how wide the user-menu/clock area is. */
.topbar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}

.topbar-left {
    justify-self: start;
}

.topbar-center {
    justify-self: center;
    margin-bottom: 0.6rem;
}

.topbar-right {
    justify-self: end;
    margin-bottom: 0.6rem;
}

.brand-logo-img {
    height: 42px;
    width: auto;
    flex-shrink: 0;
}

/* Default logo: white lettering in the dark design. */
.brand-logo-dark,
[data-bs-theme="dark"] .brand-logo-light {
    display: none;
}

[data-bs-theme="dark"] .brand-logo-dark {
    display: inline-block;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-pink);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.user-menu-btn {
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mp-text, #2b2b33);
    font-weight: 600;
}

.topbar-divider {
    width: 1px;
    height: 28px;
    background: var(--card-border);
}

.clock-display {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--mp-text, #2b2b33);
    font-weight: 600;
}

/* ---------- Opened module tabs (MP_Tabs) as folder tabs ----------
 * In the top bar, left of the logo, standing on its bottom edge. Inactive
 * tabs are grey, the icon keeps the module color. The active tab is filled
 * like the header band below it (module color, --module-bg / --module-ink
 * from MP_Modules::style_vars(); dashboard: magenta) and covers the bottom
 * border of the top bar, so tab and header form one index card. */
.mp-tabs {
    --mp-tab-height: 36px;
    align-self: end;
    justify-self: stretch;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 4px;
    min-width: 0;
    margin-bottom: -1px;
}

/* One row of tabs: module tabs shrink (title with "…", full name as tooltip)
   down to a minimum width; what still does not fit goes into the "more"
   menu at the end (portal.js), the active tab always stays in the row. */
.mp-tabs > .mp-tab:not(.mp-tab-home) {
    flex: 0 1 auto;
    min-width: 7.5rem;
}

.mp-tabs > .mp-tab.is-overflow {
    display: none;
}

.mp-tab-more-wrap {
    flex: 0 0 auto;
}

.mp-tab-more-wrap[hidden] {
    display: none;
}

.mp-tab-more {
    gap: 0.35rem;
    padding: 0 0.75rem;
    border: 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.mp-tab-more-menu {
    min-width: 16rem;
}

.mp-tab-more-menu li {
    display: flex;
    align-items: center;
}

.mp-tab-more-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.mp-tab-more-menu .dropdown-item .bi {
    color: var(--module-color);
}

.mp-tab-more-menu .mp-tab-close {
    padding: 0.35rem 0.75rem;
    color: var(--mp-muted, #6c7280);
}

/* Defaults = dashboard tab (light grey); module tabs bring their own colors. */
.mp-tab {
    --module-color: var(--brand-dark);
    --module-bg: var(--mp-surface-3, #f1f2f4);
    --module-ink: var(--mp-text, #2b2b33);
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 220px;
    /* All tabs as high as the active one. */
    height: calc(var(--mp-tab-height) + 6px);
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: var(--module-bg);
    color: var(--module-ink);
    transition: filter 0.15s ease;
}

.mp-tab:hover {
    filter: brightness(0.95);
}

.mp-tab-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    height: 100%;
    padding: 0 0.2rem 0 0.85rem;
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Dashboard tab: icon only, dark filled while inactive. */
.mp-tab-home {
    justify-content: center;
    padding: 0 1rem;
    text-decoration: none;
    font-size: 1rem;
}

.mp-tab-home:hover {
    color: var(--module-ink);
}

.mp-tab-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-tab-close {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 0.65rem 0 0.3rem;
    color: inherit;
    opacity: 0.75;
    font-size: 0.7rem;
    text-decoration: none;
}

.mp-tab-close:hover {
    color: inherit;
    opacity: 1;
}

.mp-tab:not(.is-active) {
    background: var(--mp-surface-3, #f1f2f4);
    color: var(--mp-text, #2b2b33);
    /* Stripe in the module color on top (like the cards of the e-mail confirmation pages). */
    border-top: 4px solid var(--module-color);
}

/* Dashboard tab: magenta like its header band; "more" menu: neutral. */
.mp-tab-home {
    --module-color: var(--mp-magenta, #c80180);
}

.mp-tab.mp-tab-more {
    border-top-color: var(--mp-faint, #b8bcc6);
}

.mp-tab:not(.is-active) .mp-tab-link .bi {
    color: var(--module-color);
}

.mp-tab-home.is-active,
.mp-tab-account.is-active {
    --module-bg: var(--mp-magenta, #c80180);
    --module-ink: #fff;
}

/* "Mein Konto": icon in magenta while inactive, like the header of the page. */
.mp-tab-account {
    --module-color: var(--mp-magenta, #c80180);
}

.mp-tab.is-active {
    z-index: 1;
    background: var(--module-bg);
    color: var(--module-ink);
    border-color: transparent;
    filter: none;
}

.mp-tab.is-active .mp-tab-link {
    font-weight: 700;
}

.mp-tab.is-active .mp-tab-close {
    color: inherit;
}

/* Phones: logo and user menu in the first row, tabs full width below. */
@media (max-width: 767.98px) {
    .topbar-row {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "logo right"
            "tabs tabs";
        row-gap: 0.6rem;
    }

    .topbar-center {
        grid-area: logo;
        justify-self: start;
    }

    .topbar-right {
        grid-area: right;
    }

    .mp-tabs {
        grid-area: tabs;
    }
}

/* ---------- Header band (layout D) ----------
 * Dashboard: MVP magenta with greeting and search. Module pages: the module
 * color (--module-bg / --module-ink, readable text) with the sections of the
 * module as buttons (mp_module_nav()). */
.mp-hero {
    --hero-bg: var(--mp-magenta, #c80180);
    --hero-ink: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 2rem 2.25rem;
    border-radius: 18px;
    background: var(--hero-bg);
    color: var(--hero-ink);
}

/* Two soft circles as decoration. */
.mp-hero::before,
.mp-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.16;
    pointer-events: none;
}

.mp-hero::before {
    width: 280px;
    height: 280px;
    right: -60px;
    top: -90px;
}

.mp-hero::after {
    width: 220px;
    height: 220px;
    right: 160px;
    bottom: -130px;
}

.mp-hero > * {
    position: relative;
}

.mp-hero-text h1 {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: inherit;
}

.mp-hero-text p {
    opacity: 0.92;
}

.mp-hero-search {
    position: relative;
    width: 340px;
    max-width: 100%;
}

.mp-hero-search > .bi {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mp-muted, #6c7280);
}

.mp-hero-search .form-control {
    height: 46px;
    padding-left: 2.6rem;
    border: 0;
    border-radius: 12px;
}

.mp-module-hero {
    --hero-bg: var(--module-bg, var(--mp-magenta, #c80180));
    --hero-ink: var(--module-ink, #fff);
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
    padding: 1.5rem 1.75rem 1.1rem;
    /* Every header band (modules, Mein Konto, …) has the same height: title row
       (icon 52px) + gap + row of section buttons (36px), also without buttons. */
    min-height: calc(1.5rem + 52px + 1.1rem + 36px + 1.1rem);
    align-content: start;
}

/* Facts in the header (Mein Konto): look like section buttons, not clickable. */
.mp-hero-fact,
.mp-hero-fact:hover {
    cursor: default;
    font-weight: 500;
    background: color-mix(in srgb, var(--hero-ink) 12%, transparent);
}

/* Module page: title and section buttons on the left, the search field on the
   right, vertically centred over the whole header like on the dashboard. */
.mp-module-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1.5rem;
    row-gap: 1.1rem;
    align-items: center;
}

.mp-module-hero-top {
    display: contents;
}

.mp-module-hero-grid .mp-module-search {
    grid-column: 2;
    grid-row: 1;
}

.mp-module-hero-grid .mp-module-nav {
    grid-column: 1;
}

/* With section buttons the field spans both rows (title and buttons). */
.mp-module-hero-grid:has(.mp-module-nav) .mp-module-search {
    grid-row: 1 / span 2;
}

@media (max-width: 767.98px) {
    .mp-module-hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mp-module-hero-grid .mp-module-search,
    .mp-module-hero-grid:has(.mp-module-nav) .mp-module-search {
        grid-column: 1;
        grid-row: auto;
    }
}

.mp-hero-search .form-control {
    padding-right: 2.4rem;
}

.mp-hero-search-clear {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mp-muted, #6c7280);
}

.mp-hero-search-clear:hover {
    color: var(--mp-text, #2b2b33);
}

/* The header band starts right below the top bar, attached to the active tab. */
main > .mp-hero:first-child {
    margin-top: -1.5rem;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.mp-module-hero .mp-hero-text h1 {
    font-size: 1.6rem;
}

.mp-hero-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: color-mix(in srgb, var(--hero-ink) 14%, transparent);
}

.mp-module-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mp-module-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 36px;
    padding: 0 0.9rem;
    border-radius: 999px;
    /* Tones of the text color: work on dark and on light (pastel) module colors. */
    background: color-mix(in srgb, var(--hero-ink) 12%, transparent);
    color: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.mp-module-nav-link:hover {
    background: color-mix(in srgb, var(--hero-ink) 22%, transparent);
    color: inherit;
}

.mp-module-nav-link.is-active {
    background: var(--hero-ink);
    color: var(--hero-bg);
    font-weight: 700;
}

.mp-module-nav-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--mp-magenta, #c80180);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Dashboard: module tiles ---------- */
.mp-dash-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
}

.module-card {
    position: relative;
    background: var(--mp-surface, #fff);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.1rem 1.1rem 1.1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--mp-text, #2b2b33);
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    height: 100%;
}

a.module-card:hover {
    color: var(--mp-text, #2b2b33);
    box-shadow: 0 10px 24px rgba(20, 20, 30, 0.1);
    transform: translateY(-2px);
}

/* Modules in maintenance: tile dimmed, the module page only shows the notice. */
.module-card.is-maintenance {
    opacity: 0.75;
}

/* Maintenance notice on the module page, centered like in the MVP. */
.mp-maintenance {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.mp-maintenance-icon {
    font-size: 3rem;
    color: #f0a500;
    margin-bottom: 1rem;
}

.module-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--module-ink, #fff);
    background-color: var(--module-bg, var(--brand-pink));
    flex-shrink: 0;
}

.module-card.is-maintenance .module-icon {
    opacity: 0.55;
}

.module-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.module-title {
    font-weight: 650;
    font-size: 1rem;
}

.module-desc {
    color: var(--mp-muted, #6c7280);
    font-size: 0.82rem;
    line-height: 1.4;
}

.module-side {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.4rem;
    flex-shrink: 0;
}

.module-chevron {
    color: var(--mp-faint, #b8bcc6);
    font-size: 0.95rem;
}

.module-count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--mp-magenta, #c80180);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.module-info {
    margin-top: auto;
    font-size: 0.95rem;
    color: var(--mp-faint, #b8bcc6);
    cursor: help;
}

.module-info:hover,
.module-info:focus {
    color: var(--module-color, var(--brand-dark));
}

/* Side column: open tasks and upcoming dates of the modules. */
.mp-side-card {
    background: var(--mp-surface, #fff);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.2rem 1.25rem 0.8rem;
}

.mp-side-card .mp-dash-title {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.mp-task,
.mp-event {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0 -0.6rem;
    padding: 0.6rem;
    border-radius: 10px;
    color: var(--mp-text, #2b2b33);
    text-decoration: none;
}

.mp-task:hover,
.mp-event:hover {
    color: var(--mp-text, #2b2b33);
    background: var(--mp-surface-3, #f1f2f4);
}

.mp-task-dot {
    width: 10px;
    height: 10px;
    margin-top: 0.4rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--module-color);
}

.mp-task-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.mp-task-module {
    display: block;
    font-size: 0.8rem;
    color: var(--mp-muted, #6c7280);
}

.mp-event {
    align-items: center;
}

.mp-event-date {
    width: 50px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.3rem 0;
    border: 1px solid var(--card-border);
    border-radius: 10px;
}

.mp-event-month {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--mp-magenta, #c80180);
}

.mp-event-day {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.1;
}

/* Overdue dates (event "alert"). */
.mp-event-date.is-alert {
    border-color: #f1aeb5;
    background: #fdf2f3;
}

.mp-event-date.is-alert .mp-event-month,
.mp-event-date.is-alert .mp-event-day {
    color: #b02a37;
}

/* Module widgets on the dashboard: one card per module. The module's icon
   (filled in its color) and name sit small above the heading, plus a stripe
   in the module color, so every entry is clearly assigned to its module. */
.mp-widget {
    border-left: 4px solid var(--module-bg, var(--module-color));
}

.mp-widget-module {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: var(--mp-muted, #6c7280);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mp-widget-module:hover {
    color: var(--mp-text, #2b2b33);
}

.mp-widget-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 6px;
    background: var(--module-bg, var(--module-color));
    color: var(--module-ink, #fff);
    font-size: 0.75rem;
    letter-spacing: 0;
}

.mp-widget-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-widget-arrow {
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.mp-widget-module:hover .mp-widget-arrow,
.mp-widget-module:focus .mp-widget-arrow {
    opacity: 1;
}

.mp-side-card .mp-widget-subtitle {
    font-size: 0.9rem;
    margin-top: 0.6rem;
}

.mp-widget-empty {
    margin: 0.2rem 0 0.5rem;
    font-size: 0.88rem;
    color: var(--mp-muted, #6c7280);
}

.mp-widget-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0.3rem 0 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--mp-muted, #6c7280);
    text-decoration: none;
}

.mp-widget-more:hover {
    color: var(--mp-text, #2b2b33);
}

/* ---------- List filter (MP_Filter) ---------- */
.mp-filter-row {
    display: grid;
    grid-template-columns: 110px minmax(140px, 1.2fr) minmax(150px, 1fr) minmax(160px, 1.6fr) auto;
    gap: 0.5rem;
    align-items: start;
    margin-bottom: 0.5rem;
}

.mp-filter-row .mp-filter-where {
    display: none;
    align-self: center;
    padding-left: 0.25rem;
}

.mp-filter-row.is-first .mp-filter-join {
    display: none;
}

.mp-filter-row.is-first .mp-filter-where {
    display: block;
}

@media (max-width: 767.98px) {
    .mp-filter-row {
        grid-template-columns: 1fr auto;
    }

    .mp-filter-row > :not(.mp-filter-remove) {
        grid-column: 1;
    }

    .mp-filter-row .mp-filter-remove {
        grid-column: 2;
        grid-row: 1;
    }
}

.mp-filter-summary {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.mp-filter-chip {
    background: var(--mp-surface, #fff);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 0.1rem 0.6rem;
}

.mp-filter-join {
    font-weight: 700;
    color: var(--brand-pink);
    padding: 0 0.15rem;
}

/* ---------- Sortable list headers (MP_List) ---------- */
.mp-sort {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.mp-sort i {
    font-size: 0.75rem;
    color: var(--mp-faint, #b8bcc6);
}

.mp-sort.is-active i,
.mp-sort:hover i {
    color: var(--brand-pink);
}

/* ---------- Pagination ---------- */
.dashboard-pagination .page-link {
    border-radius: 0.4rem !important;
    margin: 0 0.2rem;
    color: var(--mp-text, #2b2b33);
    border-color: var(--card-border);
    min-width: 40px;
    text-align: center;
    cursor: pointer;
}

.dashboard-pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.dashboard-pagination .page-item.disabled .page-link {
    cursor: default;
}

/* ---------- Module detail pages ---------- */
.content-panel {
    background: var(--mp-surface, #fff);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.5rem;
}

/* Detail view: "Zurück" + path "List › Entry" (MP_List::detail_nav) */
.mp-detail-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.mp-detail-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    font-size: 0.95rem;
}

.mp-detail-path a {
    color: var(--mp-muted, #6c7280);
    text-decoration: none;
}

.mp-detail-path a:hover {
    color: var(--brand-pink);
}

.mp-detail-path .bi {
    font-size: 0.75rem;
    color: var(--mp-muted, #6c7280);
}

.mp-detail-path span {
    font-weight: 600;
}

.mp-detail-nav-extra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.table-empty-state {
    text-align: center;
    color: var(--mp-muted, #6c7280);
    padding: 2.5rem 1rem;
}

/* ---------- Bottom status bar ---------- */
.status-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--statusbar-bg);
    color: #c7c9d1;
    font-size: 0.78rem;
    padding: 0.4rem 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    z-index: 1030;
}

.status-bar .status-left,
.status-bar .status-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.status-bar .status-left {
    justify-self: start;
}

.status-bar .status-right {
    justify-self: end;
}

.status-bar .badge-count {
    background: #0d6efd;
    color: #fff;
    border-radius: 0.85rem;
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
}

.status-bar .status-right i,
.status-bar .status-right a {
    color: #c7c9d1;
    text-decoration: none;
}

.status-bar .status-right i:hover,
.status-bar .status-right a:hover {
    color: #fff;
}

.rights-list li {
    padding: 0.2rem 0;
}

/* ---------- Login pages (1:1 nach der MVP-Loginmaske, apps.phuisen.de) ----------
 * Colors from the MVP's Dependencies/Overrides.css (live version); the
 * MVP otherwise uses stock Bootstrap 5.3.3, same as this plugin. */
.mp-page-login {
    --mp-magenta: #c80180;             /* --PupMagenta */
    --mp-light-grey: #c6c6c6;          /* --PupLightGrey */
    --mp-dark-grey: #84929b;           /* --PupDarkGrey */
    --mp-dark-grey-transparent: #84929b25;
}

body.mp-page-login {
    background-color: #fff;
    padding-bottom: 3vh;
}

.mp-page-login .login-container {
    max-height: 95vh;
    max-width: 25rem;
    margin: 9.375rem auto; /* sits lower on the page, like in the MVP */
}

.mp-page-login .logo {
    display: block;
    margin: 0 auto 2.5rem;
    max-width: 100%;
}

.mp-page-login .form-control,
.mp-page-login .btn {
    height: 3.625rem;
}

.mp-page-login .form-control:focus {
    border-color: var(--mp-dark-grey);
    box-shadow: 0 0 0 0.25rem var(--mp-dark-grey-transparent);
}

/* Keep the browser's autofill background off the fields (MVP behaviour). */
.mp-page-login input:-webkit-autofill,
.mp-page-login input:-webkit-autofill:focus {
    transition: background-color 60000s 0s, color 600000s 0s;
}

/* MVP: .btn-primary is capped at 38px, which wins over the 3.625rem height above. */
.mp-page-login .btn-primary {
    background-color: var(--mp-magenta);
    border-color: var(--mp-magenta);
    color: #fff;
    max-height: 38px;
}

.mp-page-login .btn-primary:hover,
.mp-page-login .btn-primary:focus-visible,
.mp-page-login .btn-primary:active {
    background-color: var(--mp-dark-grey);
    border-color: var(--mp-dark-grey);
    color: #fff;
}

.mp-page-login .btn-primary:focus-visible {
    box-shadow: 0 0 0 0.25rem var(--mp-dark-grey-transparent);
}

.mp-page-login .btn-primary:disabled {
    background-color: var(--mp-light-grey);
    border-color: var(--mp-light-grey);
}

/* Maintenance of the whole portal: notice in place of the login mask. */
.mp-site-maintenance {
    text-align: center;
    padding: 1rem 0 1.5rem;
}

.mp-site-maintenance-until {
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

/* Reminder bar for administrators while the portal is in maintenance. */
.mp-site-maintenance-bar {
    background: #C80180;
    color: #fff;
    text-align: center;
    font-size: 0.875rem;
    padding: 0.35rem 1rem;
}

.mp-site-maintenance-bar a {
    color: #fff;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* MVP shows messages as plain text below the button. */
.mp-page-login .login-message {
    color: var(--bs-body-color);
}

.mp-page-login .login-intro {
    color: var(--bs-body-color);
    font-size: 0.9rem;
}

.mp-page-login .login-links {
    text-align: center;
    font-size: 0.875rem;
}

.mp-page-login .login-links a {
    color: var(--mp-light-grey);
    text-decoration: none;
}

.mp-page-login .login-links a:hover,
.mp-page-login .login-links a:focus-visible {
    color: var(--mp-dark-grey);
    text-decoration: underline;
}

/* ---------- Impressum / Datenschutz (MP_Legal) ----------
 * Links below the login mask; the pages themselves in the look of the login. */
.mp-page-login .legal-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 2.5rem;
    font-size: 0.8rem;
}

.mp-page-login .legal-links a,
.mp-page-legal .legal-back a {
    color: var(--mp-dark-grey);
    text-decoration: none;
}

.mp-page-login .legal-links a:hover,
.mp-page-login .legal-links a:focus-visible,
.mp-page-legal .legal-back a:hover {
    color: var(--mp-magenta);
    text-decoration: underline;
}

.mp-page-legal .legal-container {
    max-width: 46rem;
    margin: 4rem auto 2rem;
}

.mp-page-legal .legal-logo .logo {
    max-height: 9rem;
    width: auto;
    margin-bottom: 2rem;
}

.mp-page-legal .legal-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--mp-magenta);
}

.mp-legal h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1.75rem 0 0.6rem;
}

.mp-legal h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.4rem;
}

.mp-legal p,
.mp-legal li {
    line-height: 1.6;
}

.mp-legal .mp-legal-updated {
    margin-top: 2rem;
    color: var(--mp-dark-grey);
    font-size: 0.875rem;
}

.mp-page-legal .legal-back {
    margin-top: 2.5rem;
}

.status-bar .status-legal {
    font-size: 0.8rem;
    margin-right: 0.25rem;
}

/* ---------- Page options (gear in the status bar, MP_View_Options) ---------- */
.status-bar .status-gear {
    border: 0;
    background: transparent;
    color: #c7c9d1;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

.status-bar .status-gear:hover {
    color: #fff;
}

/* Font sizes chosen per user and page (MP_View_Options::table_style()). */
table.mp-list-table {
    font-size: var(--mp-list-font, 0.875rem);
}

table.mp-list-table thead th {
    font-size: var(--mp-list-head-font, inherit);
}

/* ---------- Buttons in MVP magenta (like the login), for every module ----------
 * Bootstrap 5.3 reads button colors from these variables, so every
 * .btn-primary in the portal – now and in future modules – is magenta. */
.mp-portal {
    --mp-magenta: #c80180;
    --mp-dark-grey: #84929b;
    --mp-light-grey: #c6c6c6;
}

.mp-portal .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--mp-magenta);
    --bs-btn-border-color: var(--mp-magenta);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--mp-dark-grey);
    --bs-btn-hover-border-color: var(--mp-dark-grey);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--mp-dark-grey);
    --bs-btn-active-border-color: var(--mp-dark-grey);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--mp-light-grey);
    --bs-btn-disabled-border-color: var(--mp-light-grey);
    --bs-btn-focus-shadow-rgb: 132, 146, 155;
}

.mp-portal .dashboard-pagination .page-item.active .page-link {
    background-color: var(--mp-magenta);
    border-color: var(--mp-magenta);
}

/* ---------- Mein Konto ---------- */
.mp-theme-switch {
    padding-left: 3.25rem;
    margin: 0.25rem 0;
    white-space: nowrap;
}

/* ---------- Freely arranged dashboard (MP_Dashboard_Layout, mp-dashboard.js) ----------
 * 18 x 8 grid. The row height (--mp-row-h) is set by the script so that the
 * whole grid fits into the window. Items scale their content with container
 * queries: small tiles only show icon + title. */
.mp-hero-tools {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
}

.mp-board-gear {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--hero-ink, #fff);
    font-size: 1.2rem;
    transition: background-color 0.15s ease, transform 0.3s ease;
}

.mp-board-gear:hover,
.mp-board-gear:focus-visible {
    background: rgba(255, 255, 255, 0.3);
}

.mp-board-gear.is-active {
    background: #fff;
    color: var(--mp-magenta, #c80180);
    transform: rotate(60deg);
}

.mp-board-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(18, minmax(0, 1fr));
    grid-template-rows: repeat(8, var(--mp-row-h, 88px));
    gap: 0.75rem;
}

.mp-board-cell {
    display: none;
    border: 1px dashed var(--card-border, #e9eaee);
    border-radius: 8px;
    pointer-events: none;
}

.mp-board-item {
    position: relative;
    min-width: 0;
    min-height: 0;
    container-type: size;
}

/* Normal or extended content of a button (extended: is-extended, from 3 x 2 cells). */
.mp-board-normal,
.mp-board-extended {
    height: 100%;
}

.mp-board-extended,
.mp-board-item.is-extended > .mp-board-normal {
    display: none;
}

.mp-board-item.is-extended > .mp-board-extended {
    display: block;
}

.mp-board-normal > .module-card,
.mp-board-extended > .mp-side-card {
    height: 100%;
}

.mp-board-normal > .module-card {
    padding: 0.75rem 0.9rem;
}

.mp-board-extended > .mp-side-card {
    overflow: auto;
    scrollbar-width: thin;
}

.mp-widget-module .module-count,
.mp-widget-module .badge {
    flex-shrink: 0;
}

/* Small tiles: only icon and title. */
@container (max-height: 95px) {
    .module-desc {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@container (max-height: 70px) {
    .module-desc,
    .module-info {
        display: none;
    }

    .module-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

@container (max-width: 190px) {
    .module-desc,
    .module-info {
        display: none;
    }

    .module-card {
        gap: 0.6rem;
    }
}

@container (max-width: 120px) {
    .module-body {
        display: none;
    }
}

/* Buttons without space in the grid (below it) and hidden buttons (shelf in the edit bar). */
.mp-board-tray {
    margin-top: 1rem;
}

.mp-board-tray.is-empty {
    display: none;
}

.mp-board-tray-title,
.mp-board-shelf-title {
    font-size: 0.85rem;
    color: var(--mp-muted, #6c7280);
    margin-bottom: 0.5rem;
}

.mp-board-tray-items,
.mp-board-shelf-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mp-board-tray .mp-board-item {
    width: 270px;
    height: 88px;
}

.mp-board-shelf {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--card-border, #e9eaee);
}

.mp-board-shelf .mp-board-item {
    width: 240px;
    height: 64px;
    opacity: 0.75;
}

.mp-board-shelf .mp-board-item:hover {
    opacity: 1;
}

.mp-board-shelf-empty,
.mp-board-shelf.is-empty .mp-board-shelf-items {
    display: none;
}

.mp-board-shelf.is-empty .mp-board-shelf-title {
    margin-bottom: 0;
}

.mp-board-shelf.is-empty .mp-board-shelf-empty {
    display: inline;
    font-style: italic;
}

/* Edit mode -------------------------------------------------------- */
.mp-board-bar {
    margin-bottom: 0.9rem;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    background: var(--mp-surface, #fff);
    border: 1px solid var(--card-border, #e9eaee);
    font-size: 0.85rem;
}

.mp-board-bar[hidden] {
    display: none;
}

.mp-board-bar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
}

.mp-board-bar-text {
    flex: 1 1 320px;
    color: var(--mp-muted, #6c7280);
}

.mp-board-bar-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.mp-board.is-editing .mp-board-cell {
    display: block;
}

.mp-board.is-editing .mp-board-item {
    cursor: grab;
    touch-action: none;
    user-select: none;
    outline: 2px dashed transparent;
    outline-offset: 2px;
    border-radius: 14px;
}

.mp-board.is-editing .mp-board-item:hover,
.mp-board.is-editing .mp-board-item:focus-visible {
    outline-color: var(--mp-magenta, #c80180);
}

.mp-board.is-editing .mp-board-item > * {
    pointer-events: none;
}

.mp-board.is-editing .mp-board-item > .mp-board-control,
.mp-board.is-editing .mp-board-item > .mp-board-resize {
    pointer-events: auto;
}

.mp-board-item.is-dragging {
    cursor: grabbing;
    z-index: 5;
    opacity: 1;
    box-shadow: 0 12px 30px rgba(20, 20, 30, 0.18);
}

.mp-board-item.is-invalid {
    outline: 2px solid #dc3545 !important;
}

.mp-board-item.is-invalid > * {
    opacity: 0.6;
}

/* Controls: grid buttons get hide, normal/extended and resize; buttons outside get "+". */
.mp-board-control {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: var(--mp-surface-3, #f1f2f4);
    color: var(--mp-text, #2b2b33);
    font-size: 0.85rem;
}

.mp-board-control:hover,
.mp-board-control:focus-visible {
    background: var(--mp-magenta, #c80180);
    color: #fff;
}

.mp-board-toggle {
    right: 38px;
}

.mp-board-item.is-extended > .mp-board-toggle {
    background: var(--mp-magenta, #c80180);
    color: #fff;
}

.mp-board-resize {
    display: none;
    position: absolute;
    right: 2px;
    bottom: 2px;
    z-index: 2;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    border-right: 3px solid var(--mp-magenta, #c80180);
    border-bottom: 3px solid var(--mp-magenta, #c80180);
    border-radius: 0 0 10px 0;
}

.mp-board.is-editing .mp-board-grid .mp-board-hide,
.mp-board.is-editing .mp-board-grid .mp-board-toggle,
.mp-board.is-editing .mp-board-grid .mp-board-resize,
.mp-board.is-editing .mp-board-shelf .mp-board-show,
.mp-board.is-editing .mp-board-tray .mp-board-show {
    display: block;
}

.mp-board-shelf .mp-board-show {
    top: 50%;
    transform: translateY(-50%);
}

/* Pages: side by side in a track, the script shows one (carousel). The gap
   keeps the neighbour page out of view; the padding leaves room for the
   outlines of the edit mode. */
.mp-board {
    --mp-page-gap: 2rem;
}

.mp-board-viewport {
    overflow: hidden;
    padding: 4px;
    margin: -4px;
}

.mp-board-track {
    display: flex;
    gap: var(--mp-page-gap);
    transition: transform 0.35s ease;
}

.mp-board-track.no-animation {
    transition: none;
}

.mp-board-page {
    flex: 0 0 100%;
    min-width: 0;
}

/* Page names only where pages are stacked (phones). */
.mp-board-page-title {
    display: none;
}

/* Page switcher below the pages: arrows, one dot per page, name and "2 / 3". */
.mp-board-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.mp-board-pager[hidden] {
    display: none;
}

.mp-board-pager-arrow {
    width: 30px;
    height: 30px;
    border: 1px solid var(--card-border, #e9eaee);
    border-radius: 50%;
    background: var(--mp-surface, #fff);
    color: inherit;
    line-height: 1;
}

.mp-board-pager-arrow:hover:not(:disabled) {
    border-color: var(--mp-magenta, #c80180);
    color: var(--mp-magenta, #c80180);
}

.mp-board-pager-arrow:disabled {
    opacity: 0.35;
}

.mp-board-pager-dots {
    display: flex;
    gap: 0.4rem;
}

.mp-board-pager-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--mp-faint, #b8bcc6);
    transition: width 0.2s ease, background-color 0.2s ease;
}

.mp-board-pager-dot.is-active {
    width: 26px;
    background: var(--mp-magenta, #c80180);
}

/* Edit mode: bigger dots as drop targets for moving a button to another page. */
.mp-board.is-editing .mp-board-pager-dot {
    width: 16px;
    height: 16px;
}

.mp-board.is-editing .mp-board-pager-dot.is-active {
    width: 34px;
}

.mp-board.is-dragging-item .mp-board-pager-dot {
    width: 26px;
    height: 26px;
    outline: 2px dashed var(--mp-magenta, #c80180);
    outline-offset: 2px;
}

.mp-board-pager-dot.is-drop {
    background: var(--mp-magenta, #c80180);
    transform: scale(1.25);
}

.mp-board-pager-dot.is-received {
    animation: mp-dot-received 0.9s ease;
}

@keyframes mp-dot-received {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 1, 128, 0); }
    40% { box-shadow: 0 0 0 8px rgba(200, 1, 128, 0.35); }
}

.mp-board-pager-label {
    min-width: 8rem;
    font-size: 0.8rem;
    color: var(--mp-muted, #6c7280);
}

/* Edit bar: pages. */
.mp-board-pages-edit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--card-border, #e9eaee);
}

.mp-board-pagechips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.mp-board-pagename {
    width: 14rem;
}

/* Phones: one column in reading order, all pages stacked, no editing. */
@media (max-width: 767.98px) {
    .mp-board-viewport {
        overflow: visible;
    }

    .mp-board-track {
        display: block;
        transform: none !important;
    }

    .mp-board-page + .mp-board-page {
        margin-top: 1.25rem;
    }

    .mp-board-page-title {
        display: block;
        font-size: 0.95rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .mp-board-pager {
        display: none;
    }

    .mp-board-grid {
        display: flex;
        flex-direction: column;
    }

    .mp-board-cell {
        display: none !important;
    }

    .mp-board-item {
        container-type: inline-size;
    }

    .mp-board-grid .mp-board-item:not(.is-extended) {
        height: 76px;
    }

    .mp-board-gear {
        display: none;
    }
}

/* ---------- Global search (MP_Search, mp-search.js) ----------
 * One block per module, headed by the module icon in the module color. */
.mp-search-modal .mp-hero-search {
    width: auto;
}

.mp-search-modal .mp-hero-search .form-control {
    border: 1px solid var(--card-border, #e9eaee);
    background: var(--mp-surface-2, #fafafb);
}

.mp-search-modal .modal-body.is-loading {
    opacity: 0.55;
    transition: opacity 0.15s ease;
}

.mp-search-message {
    margin: 1rem 0;
    text-align: center;
    color: var(--mp-muted, #6c7280);
}

.mp-search-group + .mp-search-group {
    margin-top: 1.5rem;
}

.mp-search-group-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.mp-search-group-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--module-bg, var(--mp-surface-3, #f1f2f4));
    color: var(--module-ink, var(--mp-text, #2b2b33));
}

.mp-search-group-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.mp-search-group-count {
    font-size: 0.8rem;
    color: var(--mp-muted, #6c7280);
}

.mp-search-more {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--mp-magenta, #c80180);
    text-decoration: none;
}

.mp-search-more:hover {
    text-decoration: underline;
}

.mp-search-table {
    font-size: 0.875rem;
}

.mp-search-table th {
    font-weight: 600;
    background: var(--mp-surface-2, #fafafb);
    white-space: nowrap;
}

.mp-search-table tr.is-link {
    cursor: pointer;
}

.mp-search-link {
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}

.mp-search-link:hover {
    color: var(--mp-magenta, #c80180);
}

/* ---------- Form actions (save buttons) ----------
 * Always at the bottom right of their card, same distance to the bottom and
 * right edge; cards side by side therefore have their buttons on one line.
 * The main action (btn-primary) is the rightmost, secondary actions (cancel)
 * left of it; an element with .me-auto stays on the left (e.g. a PDF link).
 *
 *   <form class="content-panel">… <div class="mp-form-actions">
 *       <button class="btn btn-primary">Speichern</button> <a class="btn btn-outline-secondary">Abbrechen</a>
 *   </div></form>
 */
.mp-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1.25rem;
}

.mp-form-actions > .btn-primary {
    order: 99;
}

/* Cards and forms holding the actions become columns, so the actions sit at the bottom. */
:is(.content-panel, form, fieldset):has(.mp-form-actions) {
    display: flex;
    flex-direction: column;
}

:is(form, fieldset):has(.mp-form-actions) {
    flex: 1 1 auto;
}

/* ---------- Hideable table columns (MP_Columns, portal.js) ---------- */
.mp-col-hidden {
    display: none !important;
}

table[data-mp-columns] thead th[data-col] {
    position: relative;
    padding-right: 1.6rem;
}

.mp-col-hide {
    position: absolute;
    top: 50%;
    right: 0.25rem;
    transform: translateY(-50%);
    padding: 0 0.2rem;
    border: 0;
    background: transparent;
    color: var(--mp-faint, #b8bcc6);
    font-size: 0.8rem;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s ease;
}

table[data-mp-columns] thead th:hover .mp-col-hide,
.mp-col-hide:focus-visible {
    opacity: 1;
}

.mp-col-hide:hover {
    color: var(--mp-magenta, #c80180);
}

.mp-columns-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.mp-columns-bar[hidden] {
    display: none;
}

.mp-columns-bar-title {
    color: var(--mp-muted, #6c7280);
}

.mp-columns-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.6rem;
    border: 1px dashed var(--mp-faint, #b8bcc6);
    border-radius: 999px;
    background: transparent;
    color: inherit;
}

.mp-columns-chip:hover {
    border-color: var(--mp-magenta, #c80180);
    color: var(--mp-magenta, #c80180);
}

/* ---------- Two-factor login (MP_Two_Factor) ---------- */
.mp-2fa-code {
    font-size: 1.4rem;
    letter-spacing: 0.3em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.mp-page-login .mp-2fa-cancel {
    color: var(--mp-light-grey);
    font-size: 0.875rem;
    text-decoration: none;
}

.mp-page-login .mp-2fa-cancel:hover,
.mp-page-login .mp-2fa-cancel:focus-visible {
    color: var(--mp-dark-grey);
    text-decoration: underline;
}

/* QR code always on white, also in the dark design (apps need the contrast). */
.mp-2fa-qr {
    width: 200px;
    max-width: 100%;
    aspect-ratio: 1;
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.25rem;
    margin: 0 auto;
}

.mp-2fa-qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

.mp-2fa-steps {
    padding-left: 1.2rem;
}

.mp-2fa-codes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.5rem;
}

.mp-2fa-codes code {
    display: block;
    text-align: center;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    padding: 0.5rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: 0.375rem;
    color: var(--bs-body-color);
}

.mp-2fa-secret {
    letter-spacing: 0.08em;
    word-break: break-all;
}

/* Reminder: same bar as the maintenance bar, in the warning colour. */
.mp-2fa-bar {
    background: #f6c344;
    color: #3a2a00;
}

.mp-2fa-bar a {
    color: #3a2a00;
}
