@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

html, body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #212121;
    background-color: #fafafa;
}

a, .btn-link {
    color: #1565C0;
}

.btn-primary {
    color: #fff;
    background-color: #1565C0;
    border-color: #1565C0;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #42a5f5;
}

/* ── Page content area ───────────────────────────────────────── */
.content {
    padding: 2rem;
}

/* ── Suppress the oversized default h1 ──────────────────────── */
/*    Pages should use .page-header instead of bare <h1>         */
h1 {
    font-size: 1.5rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em;
    margin-bottom: 1rem;
    color: #212121;
}

h1:focus {
    outline: none;
}

/* ── Material-style tables ───────────────────────────────────── */
.table {
    font-size: 0.875rem;
    border-collapse: collapse;
    border: none;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #757575;
    border-top: none;
    border-bottom: 2px solid #e0e0e0;
    padding: 12px 16px;
}

.table tbody td {
    padding: 12px 16px;
    border-top: none;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-bordered,
.table-bordered thead th,
.table-bordered tbody td {
    border: none;
    border-bottom: 1px solid #e0e0e0;
}

/* ── Radzen buttons: Material border-radius + primary blue ───── */
.rz-button {
    border-radius: 4px !important;
}

.rz-button.rz-primary {
    background-color: #1565C0 !important;
    border-color: #1565C0 !important;
    color: #fff !important;
}

.rz-button.rz-primary:hover {
    background-color: #0d47a1 !important;
    border-color: #0d47a1 !important;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e51420;
}

.validation-message {
    color: #e51420;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ── Heartbeat pulse animation for Fresh indicators ────────── */
@keyframes pulse {
    0%   { opacity: 1; transform: scale(1); }
    50%  { opacity: 0.5; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

/* ── Edit Tenant dialog title styling ───────────────────────── */
.tenant-edit-dialog .rz-dialog-titlebar {
    background: linear-gradient(90deg, #0d6efd, #0a58ca);
    color: #ffffff;
    border-bottom: 1px solid #0a4fb8;
    padding: 0.55rem 0.85rem;
    min-height: 2.2rem;
    display: flex;
    align-items: center;
}

.tenant-edit-dialog .rz-dialog-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}

.tenant-edit-dialog .rz-dialog-titlebar .rz-dialog-titlebar-close {
    color: #ffffff;
    align-self: center;
    margin-top: 0;
}

/* ── Compact form: smaller font for all Radzen inputs & dropdowns ── */
/*    Apply class="tandem-compact-form" to any container.            */
/*    --rz-body-font-size is the root from which every Radzen        */
/*    component derives its font: inputs, dropdowns, datepickers,    */
/*    textareas, datagrid cells, and popup list items all chain back  */
/*    to it via --rz-input-font-size: var(--rz-body-font-size).      */
.tandem-compact-form {
    --rz-body-font-size: 0.82rem;
}

/* ── Radzen badges: consistent size & padding in compact grids ── */
/*    Prevents badge text from being clipped when parent font is    */
/*    scaled down via --rz-body-font-size.                          */
.rz-badge {
    font-size: 0.7rem !important;
    padding: 0.2em 0.55em !important;
    line-height: 1.4 !important;
    border-radius: 4px !important;
    white-space: nowrap;
    display: inline-block;
}

/* ── Page header block ───────────────────────────────────────────── */
/*    Usage:                                                          */
/*    <div class="page-header">                                       */
/*        <div class="page-header-title">                             */
/*            <span class="material-symbols-outlined">dashboard</span>*/
/*            Global Management                                       */
/*        </div>                                                      */
/*        <p class="page-header-subtitle">Optional subtitle text</p> */
/*    </div>                                                          */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.875rem;
    border-bottom: 2px solid #e0e0e0;
}

.page-header-title {
    display: flex !important;
    align-items: center !important;
    gap: 0.6rem;
    font-family: 'Roboto', sans-serif !important;
    font-size: 1.35rem !important;
    font-weight: 500 !important;
    color: #212121 !important;
    letter-spacing: 0.01em;
    line-height: 1.3;
    margin: 0 !important;
}

.page-header-title .material-symbols-outlined,
.page-header-title .material-icons {
    font-size: 1.5rem;
    color: #1565C0;
    flex-shrink: 0;
    vertical-align: middle;
}

.page-header-subtitle {
    font-size: 0.82rem !important;
    color: #757575 !important;
    margin: 0 !important;
    padding-left: 2.1rem;
    font-weight: 400;
}

.components-reconnect-hide {
    display: none;
}

.components-reconnect-show,
.components-reconnect-failed,
.components-reconnect-rejected {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.45);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.components-reconnect-card {
    width: min(520px, 100%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    border-top: 4px solid #b71c1c;
    padding: 1rem 1.25rem;
    color: #212121;
}

.components-reconnect-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.components-reconnect-message,
.components-reconnect-attempt {
    font-size: 0.85rem;
    color: #424242;
}

.components-reconnect-attempt {
    margin-top: 0.35rem;
}

.components-reconnect-actions {
    margin-top: 0.9rem;
}

.components-reconnect-actions .reload {
    color: #1565C0;
}

/* ── Manage Profiles Page ───────────────────────────────────────── */

/* Two-column flex layout */
.mp-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.mp-sidebar-col {
    width: 210px;
    flex-shrink: 0;
}

.mp-detail-col {
    flex: 1;
    min-width: 0;
}

/* Shared panel container */
.mp-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Panel header row */
.mp-panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    background: #f5f7fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #616161;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Icon-only button (e.g. the + in the sidebar header) */
.mp-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0.15rem;
    cursor: pointer;
    border-radius: 4px;
    color: #757575;
    line-height: 1;
    transition: background 0.12s, color 0.12s;
}
.mp-icon-btn:hover {
    background: #e3f2fd;
    color: #1565C0;
}

/* Active state for toggled icon buttons (e.g. view switchers) */
.mp-icon-btn-active {
    background: #e8f0fe !important;
    color: #1565C0 !important;
}

.mp-icon-btn .material-symbols-outlined {
    font-size: 1.1rem;
}

/* Profile list */
.mp-profile-list {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
    max-height: 62vh;
    overflow-y: auto;
}
.mp-profile-item {
    padding: 0.52rem 1rem;
    font-size: 0.82rem;
    color: #424242;
    cursor: pointer;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    user-select: none;
}
.mp-profile-item:hover {
    background: #f0f4ff;
    color: #1565C0;
}
.mp-profile-item.active {
    background: #e8f0fe;
    border-left-color: #1565C0;
    font-weight: 600;
    color: #1565C0;
}

/* Empty states */
.mp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 2rem 1rem;
    color: #9e9e9e;
    font-size: 0.82rem;
}
.mp-empty-icon {
    font-size: 2rem;
    color: #e0e0e0;
}
.mp-empty-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 200px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}
.mp-empty-panel-icon {
    font-size: 2.5rem;
    color: #e0e0e0;
}
.mp-empty-panel-text {
    font-size: 0.85rem;
    color: #9e9e9e;
    margin: 0;
}

/* Assigned Nodes table */
.mp-nodes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.mp-nodes-table thead th {
    padding: 0.5rem 1rem;
    background: #f5f7fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.72rem;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    white-space: nowrap;
}
.mp-nodes-table thead th:last-child {
    text-align: center;
}
.mp-nodes-table tbody tr {
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
}
.mp-nodes-table tbody tr:last-child {
    border-bottom: none;
}
.mp-nodes-table tbody tr:hover {
    background: #fafcff;
}
.mp-nodes-table tbody td {
    padding: 0.48rem 1rem;
    color: #424242;
    vertical-align: middle;
}
.mp-nodes-table tbody td:last-child {
    text-align: center;
}
.mp-table-empty {
    text-align: center !important;
    color: #9e9e9e;
    font-style: italic;
    padding: 1.5rem !important;
}

/* Alignment / status dots */
.mp-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mp-dot-green {
    background: #43a047;
    box-shadow: 0 0 5px rgba(67,160,71,0.45);
}
.mp-dot-red {
    background: #e53935;
    box-shadow: 0 0 5px rgba(229,57,53,0.45);
}
.mp-dot-yellow {
    background: #fb8c00;
    box-shadow: 0 0 5px rgba(251,140,0,0.45);
}

/* Last-seen text colours */
.mp-lastseen-warn {
    color: #fb8c00;
    font-weight: 500;
}
.mp-lastseen-stale {
    color: #bdbdbd;
}

/* Component versions area (below the table) */
.mp-components-area {
    padding: 1rem;
    border-top: 1px solid #e8e8e8;
}

.mp-component-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mp-component-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    min-width: 155px;
}

.mp-component-card-title {
    padding: 0.35rem 0.85rem;
    background: #f5f7fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.72rem;
    font-weight: 600;
    color: #424242;
    text-align: center;
    letter-spacing: 0.03em;
}

/* Radio-button version rows */
.mp-version-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.38rem 0.85rem;
    font-size: 0.8rem;
    color: #212121;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    margin: 0;
    font-weight: 400;
    transition: background 0.1s;
}
.mp-version-option:last-child {
    border-bottom: none;
}
.mp-version-option:not(.mp-version-disabled):hover {
    background: #f0f4ff;
}
.mp-version-option input[type="radio"] {
    cursor: pointer;
    accent-color: #1565C0;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin: 0;
}
.mp-version-option input[type="radio"]:disabled {
    cursor: default;
}
.mp-version-disabled {
    color: #bdbdbd;
    cursor: default;
    pointer-events: none;
}

/* Legacy node chips (kept for backward compatibility) */
.mp-nodes-empty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
}

.mp-node-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.mp-node-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25em 0.65em;
    background: #1565C0;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    white-space: nowrap;
    font-family: 'Roboto Mono', monospace, sans-serif;
    letter-spacing: 0.01em;
}

.components-reconnect-actions .reload:hover {
    text-decoration: underline;
}

/* ── Manage Profiles: Tab navigation ────────────────────────────── */
.mp-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    gap: 0;
    margin-bottom: 0;
}

.mp-tab {
    padding: 0.55rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #757575;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.mp-tab:hover {
    color: #1565C0;
}
.mp-tab.active {
    color: #1565C0;
    border-bottom-color: #1565C0;
    font-weight: 600;
}

.mp-tab-content {
    padding-top: 1rem;
}

/* ── Profile detail header ──────────────────────────────────────── */
.mp-detail-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #e8e8e8;
    min-height: 50px;
    background: #fff;
}

.mp-profile-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.mp-profile-label-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #212121;
}

/* Inline name edit row */
.mp-name-edit-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.mp-name-input {
    font-size: 0.88rem;
    font-weight: 600;
    color: #212121;
    border: 1.5px solid #1565C0;
    border-radius: 4px;
    padding: 0.18rem 0.5rem;
    outline: none;
    width: 220px;
    background: #fff;
}
.mp-name-input:focus {
    box-shadow: 0 0 0 3px rgba(21,101,192,0.15);
}

/* Confirm icon button variant */
.mp-icon-btn-confirm {
    color: #43a047;
}
.mp-icon-btn-confirm:hover {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Right-side actions area */
.mp-detail-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* "Select Component Versions" button */
.mp-select-versions-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.8rem;
    font-size: 0.79rem;
    font-weight: 500;
    color: #1565C0;
    background: #e8f0fe;
    border: 1px solid #c5d8f8;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s;
    line-height: 1.5;
}
.mp-select-versions-btn:hover {
    background: #d2e4fc;
    border-color: #1565C0;
}
.mp-select-versions-btn .material-symbols-outlined {
    font-size: 1rem;
}

/* Cancel text link */
.mp-cancel-link {
    font-size: 0.8rem;
    color: #757575;
    background: none;
    border: none;
    padding: 0.2rem 0.35rem;
    cursor: pointer;
    border-radius: 3px;
    line-height: 1.5;
    transition: color 0.12s;
}
.mp-cancel-link:hover:not(:disabled) {
    color: #212121;
    text-decoration: underline;
}

/* Small pill badge (panel header counts) */
.mp-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e3f2fd;
    color: #1565C0;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1em 0.6em;
    border-radius: 10px;
    white-space: nowrap;
    line-height: 1.5;
}

.mp-pill-green {
    background: #e8f5e9;
    color: #2e7d32;
}

.mp-pill-warn {
    background: #fff8e1;
    color: #f57f17;
}

/* ── Component Versions tab – toolbar ──────────────────────────────── */
.mp-cv-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #e8e8e8;
    background: #fafafa;
    flex-wrap: wrap;
}
.mp-cv-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.mp-filter-select {
    font-size: 0.8rem;
    color: #424242;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 0.28rem 2rem 0.28rem 0.65rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23757575'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    cursor: pointer;
    outline: none;
    min-width: 160px;
    transition: border-color 0.12s;
}
.mp-filter-select:hover, .mp-filter-select:focus {
    border-color: #1565C0;
}
.mp-cv-toolbar-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.mp-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.75rem;
    font-size: 0.79rem;
    font-weight: 500;
    color: #424242;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    line-height: 1.5;
}
.mp-toolbar-btn .material-symbols-outlined {
    font-size: 0.95rem;
}
.mp-toolbar-btn:hover:not(:disabled) {
    background: #f0f4ff;
    border-color: #1565C0;
    color: #1565C0;
}
.mp-toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.mp-toolbar-btn-primary {
    color: #1565C0;
    border-color: #c5d8f8;
    background: #e8f0fe;
}
.mp-toolbar-btn-primary:hover:not(:disabled) {
    background: #d2e4fc;
    border-color: #1565C0;
    color: #0d47a1;
}
.mp-toolbar-btn-danger {
    color: #c62828;
    border-color: #ffcdd2;
    background: #fff5f5;
}
.mp-toolbar-btn-danger:hover:not(:disabled) {
    background: #ffebee;
    border-color: #e53935;
    color: #b71c1c;
}

/* ── Component Versions tab – inline edit form ───────────────────── */
.mp-cv-form {
    padding: 1rem 1.25rem;
    background: #f8faff;
    border-bottom: 1px solid #dce8fb;
    border-top: 1px solid #dce8fb;
}
.mp-cv-form-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1565C0;
    margin-bottom: 0.85rem;
}
.mp-cv-form-title .material-symbols-outlined {
    font-size: 1rem;
}
.mp-cv-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.65rem 1rem;
    align-items: end;
}
.mp-cv-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.mp-cv-form-field-wide {
    grid-column: span 2;
}
.mp-cv-form-field label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.mp-cv-input {
    font-size: 0.82rem;
    color: #212121;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    outline: none;
    width: 100%;
    transition: border-color 0.12s, box-shadow 0.12s;
    font-family: inherit;
}
.mp-cv-input:focus {
    border-color: #1565C0;
    box-shadow: 0 0 0 3px rgba(21,101,192,0.12);
}
.mp-cv-form-footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

/* ── Component Versions tab – table row states ───────────────────── */
.mp-cv-row {
    cursor: pointer;
}
.mp-cv-row:hover td {
    background: #fafcff;
}
.mp-row-selected td {
    background: #e8f0fe !important;
}
.mp-row-selected:hover td {
    background: #dce8fb !important;
}
.mp-cell-muted {
    color: #757575;
    font-size: 0.79rem;
}
.mp-cell-mono {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.77rem;
    color: #546e7a;
}
.mp-cell-truncate {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Inline form error message ───────────────────────────────────── */
.mp-form-error {
    font-size: 0.78rem;
    color: #c62828;
    background: #fce4e4;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    padding: 0.3rem 0.7rem;
    margin-top: 0.4rem;
}

/* ── Inline form success message ─────────────────────────────────── */
.mp-form-success {
    font-size: 0.78rem;
    color: #2e7d32;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    padding: 0.3rem 0.7rem;
    margin-top: 0.4rem;
}

/* ── Add New Popover ─────────────────────────────────────────────── */
.mp-popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(1px);
}
.mp-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1401;
    width: 520px;
    max-width: calc(100vw - 2rem);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
    overflow: hidden;
    animation: mp-popover-in 0.15s ease;
}
@keyframes mp-popover-in {
    from { opacity: 0; transform: translate(-50%, -48%) scale(0.97); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.mp-popover-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #1565C0 0%, #1976D2 100%);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
}
.mp-popover-header .material-symbols-outlined {
    font-size: 1.1rem;
    opacity: 0.9;
}
.mp-popover-header .mp-icon-btn {
    color: rgba(255,255,255,0.8);
}
.mp-popover-header .mp-icon-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.mp-popover-body {
    padding: 1.1rem 1.25rem 1rem;
}
.mp-popover-footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid #eee;
}

.mp-popover-dialog-host {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.mp-popover-dialog-host .rz-dialog-content {
    padding: 0 !important;
    background: transparent !important;
}

/* ── Is Active badge ─────────────────────────────────────────────── */
.mp-active-badge {    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.1em 0.65em;
    line-height: 1.5;
    white-space: nowrap;
}
.mp-active-yes {
    background: #e8f5e9;
    color: #2e7d32;
}
.mp-active-no {
    background: #fce4e4;
    color: #c62828;
}

/* ── Inactive tenant card tint ───────────────────────────────────── */
.mp-tenant-card-inactive {
    background-color: #fdecea !important;
    border-color: #f5c2c7 !important;
}

/* ── Retained utility badges ─────────────────────────────────────── */
.mp-mono-badge {
    display: inline-block;
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 0.78rem;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 0.05em 0.45em;
    color: #37474f;
}
.mp-usage-pill {
    display: inline-block;
    font-size: 0.72rem;
    background: #e3f2fd;
    color: #1565C0;
    border-radius: 10px;
    padding: 0.1em 0.6em;
    font-weight: 500;
}
.mp-unused {
    color: #bdbdbd;
    font-size: 0.82rem;
}

#global-client-error-ui {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 3500;
    background: #b71c1c;
    color: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    padding: 0.75rem 2.5rem 0.75rem 0.9rem;
    font-size: 0.85rem;
}

.global-client-error-hide {
    display: none;
}

.global-client-error-show {
    display: block;
}

#global-client-error-ui .reload {
    color: #fff;
    font-weight: 500;
    text-decoration: underline;
    margin-left: 0.75rem;
}

#global-client-error-ui .dismiss {
    color: #fff;
    text-decoration: none;
    position: absolute;
    right: 0.7rem;
    top: 0.45rem;
    font-size: 0.95rem;
    line-height: 1;
}
