:root {
    --antarionix-night: #0D1B2A;
    --antarionix-blue: #1477FF;
    --antarionix-cyan: #38D5FF;
    --antarionix-orange: #FF8A00;
    --antarionix-steel: #6B7280;
    --antarionix-light: #E5E7EB;
    --antarionix-white: #FFFFFF;
    --antarionix-panel: rgba(255, 255, 255, 0.88);
    --antarionix-panel-soft: rgba(248, 250, 252, 0.92);
    --antarionix-border: rgba(13, 27, 42, 0.12);
    --antarionix-grid: rgba(20, 119, 255, 0.08);
    --antarionix-glow: 0 0 0 1px rgba(20, 119, 255, 0.14), 0 18px 44px rgba(13, 27, 42, 0.08);
    --accent: var(--antarionix-blue);
    --accent-strong: #0B63E5;
    --accent-soft: rgba(20, 119, 255, 0.12);
    --success: #16A34A;
    --warning: var(--antarionix-orange);
    --danger: #DC2626;
    --page-bg: var(--antarionix-light);
    --page-text: #172033;
    --heading-text: var(--antarionix-night);
    --muted-text: var(--antarionix-steel);
    --surface-bg: var(--antarionix-panel);
    --surface-bg-soft: var(--antarionix-panel-soft);
    --surface-border: var(--antarionix-border);
    --input-bg: rgba(255, 255, 255, 0.94);
    --input-border: rgba(13, 27, 42, 0.16);
    --table-head-bg: rgba(229, 231, 235, 0.96);
    --sidebar-bg: rgba(255, 255, 255, 0.76);
    --sidebar-panel: rgba(255, 255, 255, 0.66);
    --sidebar-panel-hover: rgba(20, 119, 255, 0.1);
    --sidebar-border: rgba(13, 27, 42, 0.14);
    --sidebar-text: var(--antarionix-night);
    --sidebar-muted: var(--antarionix-steel);
    --sidebar-active: var(--antarionix-blue);
    --shadow-soft: var(--antarionix-glow);
    --shadow-hover: 0 0 0 1px rgba(56, 213, 255, 0.2), 0 24px 70px rgba(13, 27, 42, 0.14);
    --focus-ring: 0 0 0 4px rgba(20, 119, 255, 0.2);
    --bs-primary: var(--antarionix-blue);
    --bs-primary-rgb: 20, 119, 255;
    --bs-warning: var(--antarionix-orange);
    --bs-warning-rgb: 255, 138, 0;
}

.document-selection-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
}

.document-select-column {
    width: 3.25rem;
    text-align: center;
}

.document-select-column .form-check-input {
    float: none;
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
}

.document-select-column .form-check-input:focus-visible {
    outline: .2rem solid rgba(13, 110, 253, .35);
    outline-offset: .15rem;
}

.document-confirm-list {
    max-height: 20rem;
    overflow: auto;
    padding: 1rem 1.25rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background: var(--bs-tertiary-bg);
}

.document-delete-report-table td:last-child {
    min-width: 13rem;
}

@media (max-width: 575.98px) {
    .document-selection-toolbar {
        width: 100%;
        justify-content: stretch;
    }

    .document-selection-toolbar > * {
        width: 100%;
    }

    .document-select-column {
        width: auto;
        text-align: left;
    }
}

[data-bs-theme="dark"] {
    --antarionix-panel: rgba(15, 30, 46, 0.88);
    --antarionix-panel-soft: rgba(18, 38, 58, 0.78);
    --antarionix-border: rgba(56, 213, 255, 0.16);
    --antarionix-grid: rgba(56, 213, 255, 0.08);
    --antarionix-glow: 0 0 0 1px rgba(56, 213, 255, 0.14), 0 18px 58px rgba(0, 0, 0, 0.38);
    --accent: var(--antarionix-cyan);
    --accent-strong: #7CE7FF;
    --accent-soft: rgba(56, 213, 255, 0.15);
    --success: #22C55E;
    --warning: var(--antarionix-orange);
    --danger: #F87171;
    --page-bg: #07111F;
    --page-text: #E5EEF8;
    --heading-text: var(--antarionix-white);
    --muted-text: #A8B3C4;
    --surface-bg: var(--antarionix-panel);
    --surface-bg-soft: var(--antarionix-panel-soft);
    --surface-border: var(--antarionix-border);
    --input-bg: rgba(11, 24, 39, 0.95);
    --input-border: rgba(56, 213, 255, 0.18);
    --table-head-bg: rgba(13, 27, 42, 0.95);
    --sidebar-bg: rgba(7, 17, 31, 0.82);
    --sidebar-panel: rgba(15, 30, 46, 0.72);
    --sidebar-panel-hover: rgba(56, 213, 255, 0.14);
    --sidebar-border: rgba(56, 213, 255, 0.14);
    --sidebar-text: #E5EEF8;
    --sidebar-muted: #A8B3C4;
    --sidebar-active: var(--antarionix-cyan);
    --shadow-soft: var(--antarionix-glow);
    --shadow-hover: 0 0 0 1px rgba(56, 213, 255, 0.22), 0 26px 78px rgba(0, 0, 0, 0.5);
    --focus-ring: 0 0 0 4px rgba(56, 213, 255, 0.24);
    --bs-primary: var(--antarionix-blue);
    --bs-primary-rgb: 20, 119, 255;
}

html,
body {
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at 12% 0%, rgba(20, 119, 255, 0.16), transparent 28rem),
        radial-gradient(circle at 86% 10%, rgba(56, 213, 255, 0.12), transparent 30rem),
        linear-gradient(180deg, var(--page-bg), color-mix(in srgb, var(--page-bg) 92%, var(--antarionix-night) 8%));
}

[data-bs-theme="dark"] body {
    background:
        radial-gradient(circle at 18% 0%, rgba(20, 119, 255, 0.28), transparent 30rem),
        radial-gradient(circle at 88% 10%, rgba(56, 213, 255, 0.16), transparent 34rem),
        linear-gradient(180deg, #07111F, #0D1B2A 58%, #07111F);
}

.antarionix-mark {
    align-items: center;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.98) 0 16%, transparent 17%),
        radial-gradient(circle at center, transparent 0 33%, rgba(56, 213, 255, 0.95) 34% 36%, transparent 37%),
        radial-gradient(circle at center, transparent 0 56%, rgba(20, 119, 255, 0.88) 57% 59%, transparent 60%),
        conic-gradient(from 0deg, transparent 0 10%, rgba(56, 213, 255, 0.85) 10% 11%, transparent 11% 25%, rgba(20, 119, 255, 0.9) 25% 26%, transparent 26% 50%, rgba(56, 213, 255, 0.85) 50% 51%, transparent 51% 75%, rgba(20, 119, 255, 0.9) 75% 76%, transparent 76%);
    border: 1px solid rgba(56, 213, 255, 0.35);
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(20, 119, 255, 0.22), 0 0 24px rgba(20, 119, 255, 0.22);
    display: inline-flex;
    flex: 0 0 auto;
    height: 42px;
    justify-content: center;
    position: relative;
    width: 42px;
}

.antarionix-mark::before,
.antarionix-mark::after {
    background: linear-gradient(90deg, transparent, rgba(56, 213, 255, 0.95), transparent);
    content: "";
    height: 1px;
    inset: 50% 9%;
    position: absolute;
}

.antarionix-mark::after {
    transform: rotate(90deg);
}

.antarionix-mark span {
    background:
        radial-gradient(circle at center, var(--antarionix-night) 0 38%, transparent 39%),
        conic-gradient(from 0deg, #ffffff 0 10%, transparent 10% 18%, #ffffff 18% 28%, transparent 28% 43%, #ffffff 43% 55%, transparent 55% 68%, #ffffff 68% 80%, transparent 80% 100%);
    border-radius: 50%;
    height: 38%;
    position: relative;
    width: 38%;
    z-index: 1;
}

.antarionix-mark span::after {
    background: var(--antarionix-orange);
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(255, 138, 0, 0.7);
    content: "";
    height: 7px;
    position: absolute;
    right: -16px;
    top: -10px;
    width: 7px;
}

.antarionix-mark-sm {
    height: 32px;
    width: 32px;
}

.antarionix-mark-lg {
    height: 76px;
    width: 76px;
}

.antarionix-logo-wrap {
    aspect-ratio: 1;
    display: inline-grid;
    flex: 0 0 auto;
    line-height: 0;
    overflow: visible;
    place-items: center;
    position: relative;
}

.antarionix-logo-wrap-sm {
    height: 32px;
    width: 32px;
}

.antarionix-logo-wrap-md {
    height: 42px;
    width: 42px;
}

.antarionix-logo-wrap-lg {
    height: 76px;
    width: 76px;
}

.antarionix-logo-img {
    display: block;
    grid-area: 1 / 1;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.18s ease;
    width: 100%;
}

.antarionix-logo-img-dark {
    opacity: 0;
}

[data-bs-theme="dark"] .antarionix-logo-img-light {
    opacity: 0;
}

[data-bs-theme="dark"] .antarionix-logo-img-dark {
    opacity: 1;
}

.sidebar-logo,
.login-logo,
.mobile-brand-logo {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.login-logo {
    align-items: center;
    display: inline-flex;
    height: 92px;
    justify-content: center;
    overflow: visible;
    padding: 0;
    width: 92px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    flex: 0 0 var(--sidebar-width);
    min-height: 100vh;
    position: sticky;
    top: 0;
    width: var(--sidebar-width);
    z-index: 20;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* V1.8.1 - contexte d'actif des interventions */
.asset-context-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.asset-context-option {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    min-height: 7rem;
    padding: 1rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: .75rem;
    background: var(--bs-body-bg, #fff);
    cursor: pointer;
}

.asset-context-option:has(input:checked) {
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .12);
}

.asset-context-option input {
    flex: 0 0 auto;
    margin-top: .2rem;
}

.asset-context-option span,
.asset-context-option small {
    display: block;
}

.asset-context-option small {
    margin-top: .35rem;
    color: var(--bs-secondary-color, #6c757d);
    line-height: 1.35;
}

[data-asset-context-panel] + [data-asset-context-panel] {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
}

.js-enabled [data-asset-context-panel][hidden] {
    display: none !important;
}

.intervention-original-declaration .info-value,
.intervention-asset-context-card .info-value {
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .asset-context-options {
        grid-template-columns: 1fr;
    }

    .asset-context-option {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .asset-context-option {
        transition: none !important;
    }
}

/* V1.8.3 — éditeur centralisé des rôles et permissions */
.permission-editor {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
    min-width: 0;
}

.permission-editor-toolbar {
    align-items: center;
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(16rem, 1fr) auto auto;
    padding: 0.85rem;
}

.permission-search {
    align-items: center;
    display: flex;
    min-width: 0;
    position: relative;
}

.permission-search > i {
    color: var(--muted-text);
    left: 0.85rem;
    pointer-events: none;
    position: absolute;
}

.permission-search .form-control {
    padding-left: 2.4rem;
}

.permission-editor-toolbar-actions,
.permission-live-counters,
.permission-item-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.permission-result-count {
    color: var(--muted-text);
    margin: 0;
    white-space: nowrap;
}

.permission-live-counters span {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    color: var(--muted-text);
    font-size: 0.86rem;
    padding: 0.38rem 0.7rem;
}

.permission-live-counters strong {
    color: var(--heading-text);
}

.permission-category-list {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.permission-category {
    background: var(--page-surface, #fff);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    min-width: 0;
    overflow: clip;
}

.permission-category > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    list-style: none;
    min-height: 54px;
    padding: 0.8rem 1rem;
}

.permission-category > summary::-webkit-details-marker {
    display: none;
}

.permission-category > summary:focus-visible,
.permission-item-choice:has(input:focus-visible),
.permission-category-actions .form-check:has(input:focus-visible) {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.28);
    outline: 2px solid transparent;
}

.permission-category > summary span:first-child,
.permission-category > summary strong,
.permission-category > summary small {
    display: block;
    min-width: 0;
}

.permission-category > summary strong {
    color: var(--heading-text);
}

.permission-category > summary small {
    color: var(--muted-text);
    font-size: 0.82rem;
    margin-top: 0.16rem;
}

.permission-category-count {
    background: var(--accent-soft);
    border-radius: 999px;
    color: var(--heading-text);
    flex: 0 0 auto;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.permission-category-body {
    border-top: 1px solid var(--surface-border);
    padding: 0.85rem;
}

.permission-category-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.permission-category-actions .form-check {
    margin: 0;
}

.permission-items {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.permission-item {
    background: var(--page-surface, #fff);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 0.8rem;
}

.permission-item.is-sensitive {
    border-color: rgba(220, 53, 69, 0.42);
}

.permission-item.is-implicit {
    background: rgba(13, 110, 253, 0.06);
    border-style: dashed;
}

.permission-item.is-ungrantable {
    opacity: 0.72;
}

.permission-item-choice {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: 0.65rem;
    margin: -0.15rem;
    padding: 0.15rem;
}

.permission-item-choice input {
    flex: 0 0 auto;
    margin-top: 0.22rem;
}

.permission-item-title,
.permission-item-key {
    display: block;
}

.permission-item-title {
    color: var(--heading-text);
    font-weight: 750;
    line-height: 1.25;
}

.permission-item-key {
    color: var(--muted-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
    margin-top: 0.18rem;
}

.permission-item-description {
    color: var(--muted-text);
    font-size: 0.85rem;
    line-height: 1.45;
    margin: 0.55rem 0 0;
}

.permission-item-meta {
    color: var(--muted-text);
    font-size: 0.75rem;
    margin-top: 0.55rem;
}

.permission-item-meta > span,
.permission-scope-badge,
.permission-sensitive-badge {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    padding: 0.22rem 0.48rem;
}

.permission-sensitive-badge {
    background: rgba(220, 53, 69, 0.1) !important;
    border-color: rgba(220, 53, 69, 0.28) !important;
    color: #b02a37;
}

.permission-implicit-origin,
.permission-grant-limit,
.permission-warning {
    border-radius: 10px;
    font-size: 0.78rem;
    margin: 0.6rem 0 0;
    padding: 0.48rem 0.58rem;
}

.permission-implicit-origin {
    background: rgba(13, 110, 253, 0.1);
    color: #084298;
}

.permission-grant-limit {
    background: var(--surface-bg-soft);
    color: var(--muted-text);
}

.permission-warning {
    background: rgba(255, 193, 7, 0.16);
    color: #7a5200;
}

.effective-permissions-summary,
.permission-diff-summary,
.permission-sensitive-confirmation {
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 1rem;
}

.effective-permissions-summary {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), var(--page-surface, #fff));
    display: grid;
    gap: 0.9rem;
}

.effective-summary-kicker {
    color: var(--antarionix-blue, #0d6efd);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.effective-permissions-summary h4,
.permission-diff-summary h4 {
    color: var(--heading-text);
    font-size: 1rem;
    margin: 0.2rem 0 0;
}

.effective-permissions-summary > div > p,
.permission-sensitive-confirmation p {
    color: var(--muted-text);
    font-size: 0.84rem;
    margin: 0.25rem 0 0;
}

.effective-summary-grid,
.permission-diff-grid {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.effective-summary-grid > div {
    background: var(--page-surface, #fff);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 0.65rem;
}

.effective-summary-grid dt {
    color: var(--muted-text);
    font-size: 0.75rem;
}

.effective-summary-grid dd {
    color: var(--heading-text);
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0.1rem 0 0;
}

.effective-summary-details,
.permission-diff-grid {
    color: var(--muted-text);
    font-size: 0.82rem;
}

.effective-summary-details p,
.permission-diff-grid p {
    margin: 0.2rem 0;
    overflow-wrap: anywhere;
}

.permission-diff-summary {
    background: var(--surface-bg-soft);
}

.permission-diff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.55rem;
}

.permission-sensitive-confirmation {
    background: rgba(220, 53, 69, 0.08);
    border-color: rgba(220, 53, 69, 0.38);
    display: grid;
    gap: 0.75rem;
}

.permission-sensitive-confirmation > div > strong {
    color: #b02a37;
}

[data-bs-theme="dark"] .permission-item,
[data-bs-theme="dark"] .permission-category,
[data-bs-theme="dark"] .effective-summary-grid > div {
    background: var(--page-surface, #1f2937);
}

[data-bs-theme="dark"] .permission-item.is-implicit,
[data-bs-theme="dark"] .permission-implicit-origin {
    background: rgba(56, 189, 248, 0.12);
    color: #bae6fd;
}

[data-bs-theme="dark"] .permission-sensitive-badge,
[data-bs-theme="dark"] .permission-sensitive-confirmation > div > strong {
    color: #fda4af;
}

[data-bs-theme="dark"] .permission-warning {
    color: #fde68a;
}

@media (max-width: 991.98px) {
    .permission-editor-toolbar {
        grid-template-columns: 1fr;
    }

    .permission-result-count {
        white-space: normal;
    }

    .permission-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .permission-editor-toolbar-actions,
    .permission-category-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .permission-editor-toolbar-actions .btn,
    .permission-category-actions .btn {
        min-height: 44px;
        width: 100%;
    }

    .permission-category > summary,
    .permission-category-body,
    .permission-item,
    .effective-permissions-summary,
    .permission-diff-summary,
    .permission-sensitive-confirmation {
        padding: 0.75rem;
    }

    .effective-summary-grid,
    .permission-diff-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 380px) {
    .effective-summary-grid,
    .permission-diff-grid {
        grid-template-columns: 1fr;
    }
}

.sidebar-top {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.sidebar-brand {
    align-items: center;
    color: inherit;
    display: flex;
    gap: 0.75rem;
    min-width: 0;
    text-decoration: none;
}

.sidebar-logo {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    height: 46px;
    justify-content: center;
    overflow: visible;
    padding: 0;
    width: 46px;
}

.sidebar-logo .antarionix-logo-wrap,
.login-logo .antarionix-logo-wrap,
.dashboard-radar-node .antarionix-logo-wrap {
    height: 100%;
    width: 100%;
}

.sidebar-logo img,
.login-logo img {
    display: block;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-title-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
}

.sidebar-subtitle {
    font-size: 0.78rem;
    margin-top: 0.1rem;
}

.sidebar-section {
    font-size: 0.72rem;
    font-weight: 800;
    margin: 1rem 0 0.55rem;
    text-transform: uppercase;
}

.sidebar .nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.admin-sidebar-nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    width: 100%;
}

.admin-sidebar-nav > .sidebar-link,
.admin-sidebar-nav > .admin-sidebar-category {
    flex: 0 0 auto;
}

.admin-sidebar-category {
    color: var(--muted-text, #6e6e73);
    font-size: 0.68rem;
    font-weight: 800;
    margin: 0.75rem 0 0.18rem;
    padding-inline: 0.7rem;
}

.admin-return-link {
    border-bottom: 1px solid var(--surface-border, rgba(60, 60, 67, 0.16));
    margin-bottom: 0.15rem;
    padding-bottom: 0.55rem;
}

.sidebar-link {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
}

.sidebar-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.05rem;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
}

.sidebar-user {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 0.9rem;
    text-align: center;
}

.sidebar-user-photo {
    align-items: center;
    background: rgba(0, 122, 255, 0.12);
    border: 1px solid rgba(0, 122, 255, 0.24);
    border-radius: 999px;
    color: var(--accent, #007aff);
    display: flex;
    flex: 0 0 auto;
    font-size: 1.35rem;
    height: 44px;
    justify-content: center;
    margin: 0 auto 0.6rem;
    overflow: hidden;
    width: 44px;
}

.sidebar-user-photo:hover,
.sidebar-user-photo:focus-visible {
    background: rgba(0, 122, 255, 0.18);
    color: var(--accent-strong, #0a84ff);
}

.sidebar-user-photo img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.sidebar-user-name {
    font-weight: 750;
    margin-bottom: 0.35rem;
}

.document-thumb-link {
    display: inline-flex;
}

.document-thumb,
.document-file-icon {
    align-items: center;
    background: var(--surface-bg-soft, #f5f5f7);
    border: 1px solid var(--surface-border, rgba(60, 60, 67, 0.16));
    border-radius: 10px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 48px;
    justify-content: center;
    width: 64px;
}

.document-thumb {
    object-fit: cover;
}

.document-file-icon {
    color: var(--accent-strong, #0a84ff);
    font-size: 1.45rem;
}

.intervention-photo-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.intervention-photo-card {
    background: var(--surface-bg-soft, #f5f5f7);
    border: 1px solid var(--surface-border, rgba(60, 60, 67, 0.16));
    border-radius: 14px;
    overflow: hidden;
}

.intervention-photo-preview {
    background: rgba(118, 118, 128, 0.12);
    border: 0;
    color: inherit;
    cursor: zoom-in;
    display: block;
    height: 150px;
    overflow: hidden;
    padding: 0;
    text-align: inherit;
    width: 100%;
}

.intervention-photo-preview img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.intervention-photo-meta {
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem;
}

.intervention-file-preview {
    align-items: center;
    background: rgba(118, 118, 128, 0.12);
    color: var(--page-text, #1d1d1f);
    display: flex;
    gap: 0.75rem;
    min-height: 150px;
    padding: 1rem;
}

.intervention-file-preview i {
    color: #0d6efd;
    font-size: 2rem;
}

.intervention-file-preview span {
    font-weight: 650;
    min-width: 0;
    overflow-wrap: anywhere;
}

.photo-lightbox[hidden] {
    display: none;
}

.photo-lightbox {
    inset: 0;
    position: fixed;
    z-index: 3000;
}

.photo-lightbox-backdrop {
    background: rgba(0, 0, 0, 0.86);
    inset: 0;
    position: absolute;
}

.photo-lightbox-panel {
    display: grid;
    gap: 0.9rem;
    inset: 16px;
    position: absolute;
}

.photo-lightbox-header {
    align-items: center;
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-width: 0;
}

.photo-lightbox-title {
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-lightbox img {
    align-self: center;
    justify-self: center;
    max-height: calc(100vh - 96px);
    max-width: 100%;
    object-fit: contain;
}

.lightbox-open {
    overflow: hidden;
}

.content-area {
    flex: 1 1 auto;
    min-height: 100vh;
    min-width: 0;
    overflow-x: hidden;
}

.content-container {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: var(--content-max-width);
    min-height: calc(100vh - 4rem);
    width: 100%;
}

.page-content {
    flex: 1 1 auto;
}

.app-footer {
    padding: 1.25rem 0 0;
}

.guest-shell {
    min-height: 100vh;
    padding: 1rem;
}

.mobile-app-header,
.mobile-sidebar-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .app-shell {
        display: block;
    }

    body {
        padding-top: 64px;
    }

    body.mobile-nav-open {
        overflow: hidden;
    }

    .mobile-app-header {
        align-items: center;
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        background: rgba(255, 255, 255, 0.82);
        border-bottom: 1px solid rgba(60, 60, 67, 0.14);
        display: flex;
        gap: 0.75rem;
        height: 64px;
        justify-content: space-between;
        left: 0;
        padding: 0.65rem 0.85rem;
        position: fixed;
        right: 0;
        top: 0;
        transform: translateY(0);
        transition: transform 0.2s ease, background-color 0.2s ease;
        z-index: 120;
    }

    body.mobile-header-hidden:not(.mobile-nav-open) .mobile-app-header {
        transform: translateY(-100%);
    }

    .mobile-menu-button {
        align-items: center;
        background: var(--surface-bg-soft, #f6f6f8);
        border: 1px solid var(--surface-border, rgba(60, 60, 67, 0.16));
        border-radius: 999px;
        color: var(--heading-text, #111114);
        display: inline-flex;
        flex: 0 0 auto;
        font-size: 1.25rem;
        height: 42px;
        justify-content: center;
        padding: 0;
        width: 42px;
    }

    .mobile-header-brand {
        align-items: center;
        color: var(--heading-text, #111114);
        display: inline-flex;
        font-weight: 800;
        gap: 0.55rem;
        min-width: 0;
        text-decoration: none;
    }

    .mobile-header-brand img {
        display: block;
        max-height: 32px;
        max-width: 88px;
        object-fit: contain;
    }

    .mobile-sidebar-backdrop {
        background: rgba(0, 0, 0, 0.34);
        bottom: 0;
        display: block;
        left: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: 0;
        transition: opacity 0.18s ease;
        z-index: 100;
    }

    body.mobile-nav-open .mobile-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        bottom: 0;
        box-shadow: 18px 0 50px rgba(0, 0, 0, 0.18);
        max-width: min(86vw, 340px);
        min-height: 100vh;
        overflow-y: auto;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        width: min(86vw, 340px);
        z-index: 130;
    }

    body.mobile-nav-open .sidebar {
        transform: translateX(0);
    }

    .content-area {
        min-height: calc(100vh - 64px);
    }
}

/* Final UI polish: Antarionix control-center surfaces. */
body {
    background:
        radial-gradient(circle at 12% 0%, rgba(20, 119, 255, 0.16), transparent 28rem),
        radial-gradient(circle at 86% 10%, rgba(56, 213, 255, 0.12), transparent 30rem),
        linear-gradient(180deg, var(--page-bg), color-mix(in srgb, var(--page-bg) 92%, var(--antarionix-night) 8%)) !important;
    color: var(--page-text);
}

h1,
h2,
h3,
h4,
h5,
h6,
.sidebar-title,
.metric-value,
.app-page-header h1 {
    letter-spacing: 0 !important;
}

.content-container {
    max-width: min(1680px, 100%);
}

.app-page-header {
    align-items: center;
    background: var(--surface-bg) !important;
    border: 1px solid var(--surface-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.app-page-header h1 {
    font-size: clamp(1.55rem, 2vw, 2.1rem) !important;
}

.card,
.app-card,
.detail-card,
.form-card,
.stat-card,
.dashboard-card,
.login-card,
.machine-card,
.user-card,
.summary-card {
    background: var(--surface-bg) !important;
    border-color: var(--surface-border) !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow-soft) !important;
}

.card-header {
    background: var(--surface-bg-soft) !important;
    border-color: var(--surface-border) !important;
}

.table {
    font-size: 0.94rem;
}

.table thead th {
    background: var(--table-head-bg);
    border-bottom-width: 1px;
    color: var(--muted-text);
    white-space: nowrap;
}

.table td,
.table th {
    vertical-align: middle;
}

.table-hover > tbody > tr:hover > * {
    background-color: var(--accent-soft) !important;
}

.clickable-row,
.clickable-card {
    cursor: pointer;
}

.clickable-card {
    border-radius: 12px;
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.clickable-card:hover {
    background: var(--accent-soft);
}

.clickable-row:focus-visible,
.clickable-card:focus-visible {
    outline: 3px solid rgba(20, 119, 255, 0.32);
    outline-offset: -3px;
}

.clickable-row:active > *,
.clickable-card:active {
    background-color: rgba(20, 119, 255, 0.14) !important;
}

.dashboard-live-item.clickable-card {
    margin-inline: 0;
    touch-action: pan-y;
}

.dashboard-live-item.clickable-card:hover {
    background: color-mix(in srgb, var(--accent-soft) 74%, var(--surface-bg) 26%);
    border-color: color-mix(in srgb, var(--accent) 36%, var(--surface-border));
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.dashboard-level {
    display: block;
}

.dashboard-level-header {
    align-items: flex-end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dashboard-kicker {
    color: var(--muted-text, #6e6e73);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-level-title {
    color: var(--heading-text, #1d1d1f);
    font-size: clamp(1.2rem, 1.4vw, 1.55rem);
    font-weight: 700;
    margin: 0;
}

.dashboard-kpi-card .card-body,
.dashboard-stat-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-height: 164px;
}

.dashboard-kpi-icon {
    align-items: center;
    background: var(--accent-soft);
    border: 1px solid rgba(20, 119, 255, 0.18);
    border-radius: 14px;
    color: var(--accent);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    margin-bottom: 0.45rem;
    width: 42px;
}

.dashboard-kpi-icon-muted {
    background: rgba(118, 118, 128, 0.11);
    border-color: rgba(118, 118, 128, 0.16);
    color: var(--muted-text, #6e6e73);
}

.dashboard-work-item {
    align-items: center;
    border-bottom: 1px solid rgba(60, 60, 67, 0.12);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 74px;
    padding-block: 0.85rem;
}

.dashboard-work-item:last-child {
    border-bottom: 0;
}

.dashboard-work-item-compact {
    min-height: 64px;
}

.dashboard-work-main {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.dashboard-work-side {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: right;
    white-space: nowrap;
}

.dashboard-empty {
    align-items: center;
    color: var(--muted-text, #6e6e73);
    display: flex;
    justify-content: center;
    min-height: 128px;
    padding: 1rem;
    text-align: center;
}

.dashboard-chart-row {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.dashboard-chart-row:last-child {
    margin-bottom: 0;
}

.dashboard-chart-label {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-width: 0;
}

.dashboard-chart-label span,
.dashboard-chart-label a {
    min-width: 0;
}

.dashboard-chart-label strong {
    color: var(--heading-text, #1d1d1f);
    font-variant-numeric: tabular-nums;
}

.dashboard-chart-track {
    background: rgba(118, 118, 128, 0.16);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.dashboard-chart-bar {
    background: linear-gradient(90deg, var(--antarionix-blue), var(--antarionix-cyan));
    border-radius: inherit;
    display: block;
    height: 100%;
    min-width: 8px;
    width: var(--chart-value, 0%);
}

.dashboard-chart-bar-warning {
    background: linear-gradient(90deg, var(--antarionix-orange), #FFD166);
}

.dashboard-chart-bar-success {
    background: linear-gradient(90deg, #34c759, #30d158);
}

.mobile-only-action {
    display: none;
}

.quick-intervention-page {
    margin-inline: auto;
    max-width: 980px;
}

.quick-mode-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-mode-card {
    background: var(--surface-bg, #ffffff);
    border: 1px solid var(--surface-border, rgba(60, 60, 67, 0.16));
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(20, 31, 45, 0.08);
    color: inherit;
    cursor: pointer;
    display: grid;
    gap: 0.45rem;
    min-height: 150px;
    padding: 1rem;
    text-decoration: none;
}

.quick-mode-card input,
.quick-duration-pill input {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.quick-mode-card.active {
    border-color: rgba(0, 122, 255, 0.42);
    box-shadow: 0 16px 38px rgba(0, 122, 255, 0.16);
}

.quick-mode-card:hover {
    border-color: color-mix(in srgb, var(--accent, #007aff) 45%, var(--surface-border));
    color: inherit;
}

.quick-mode-card:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent, #007aff) 48%, transparent);
    outline-offset: 3px;
}

.quick-mode-icon {
    align-items: center;
    background: rgba(52, 199, 89, 0.14);
    border-radius: 14px;
    color: #198754;
    display: inline-flex;
    font-size: 1.5rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.quick-mode-icon-warning {
    background: rgba(255, 149, 0, 0.16);
    color: #b45309;
}

.quick-mode-card strong {
    color: var(--heading-text, #111114);
    font-size: 1.05rem;
}

.quick-mode-card small {
    color: var(--muted-text, #6e6e73);
    line-height: 1.35;
}

.quick-mode-choice-state {
    color: var(--muted-text, #6e6e73);
    font-size: 0.875rem;
    font-weight: 700;
}

.quick-mode-card.active .quick-mode-choice-state {
    color: var(--accent-strong, #0057b8);
}

.quick-intervention-form-panel {
    scroll-margin-top: calc(5rem + env(safe-area-inset-top, 0px));
}

.quick-form-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.quick-change-mode {
    flex: 0 0 auto;
}

.quick-choice-step h2:focus-visible,
.quick-form-heading h2:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent, #007aff) 48%, transparent);
    outline-offset: 3px;
}

.quick-duration-grid {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-duration-pill span {
    align-items: center;
    background: rgba(118, 118, 128, 0.1);
    border: 1px solid rgba(60, 60, 67, 0.14);
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    font-weight: 700;
    justify-content: center;
    min-height: 48px;
    padding: 0.65rem;
}

.quick-duration-pill input:checked + span {
    background: rgba(0, 122, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.38);
    color: #0057b8;
}

.quick-submit-bar {
    background: linear-gradient(180deg, rgba(245, 245, 247, 0), var(--page-bg, #f5f5f7) 28%);
    bottom: 0;
    padding: 1rem 0 env(safe-area-inset-bottom);
    position: sticky;
    z-index: 5;
}

.devblog-timeline {
    display: grid;
    gap: 1.1rem;
    position: relative;
}

.devblog-entry {
    position: relative;
}

.devblog-date {
    color: var(--muted-text, #6e6e73);
    font-size: 0.82rem;
    font-weight: 750;
    margin-bottom: 0.2rem;
}

.devblog-title {
    color: var(--heading-text, #1d1d1f);
    font-size: clamp(1.08rem, 1.4vw, 1.35rem);
    font-weight: 780;
}

.devblog-details {
    color: var(--page-text, #1d1d1f);
    display: grid;
    gap: 0.35rem;
    padding-left: 1.15rem;
}

.devblog-summary {
    color: var(--page-text, #1d1d1f);
    font-weight: 650;
}

.devblog-section-heading {
    align-items: flex-start;
    background:
        radial-gradient(circle at 8% 0%, rgba(56, 213, 255, 0.1), transparent 14rem),
        var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: clamp(1rem, 2.5vw, 1.35rem);
}

.roadmap-section {
    overflow: hidden;
}

.roadmap-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.roadmap-kicker {
    color: var(--accent-color, #007aff);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.roadmap-title {
    color: var(--heading-text, #1d1d1f);
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    font-weight: 820;
    margin: 0;
}

.roadmap-version-badge {
    align-items: center;
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.22);
    border-radius: 999px;
    color: #0057b8;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 800;
    min-height: 34px;
    padding: 0.35rem 0.8rem;
}

.roadmap-note {
    align-items: flex-start;
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    color: var(--page-text, #1d1d1f);
    display: flex;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
}

.roadmap-note > i {
    color: var(--accent);
    flex: 0 0 auto;
    font-size: 1.1rem;
    margin-top: 0.08rem;
}

.roadmap-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roadmap-card {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(60, 60, 67, 0.12);
    border-radius: 18px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.06);
    min-width: 0;
    padding: 1rem;
    position: relative;
}

.roadmap-card::before {
    border-radius: 999px;
    content: "";
    height: 4px;
    left: 1rem;
    position: absolute;
    right: 1rem;
    top: 0.7rem;
}

.roadmap-card-termine::before {
    background: #34c759;
}

.roadmap-card-en-cours::before {
    background: var(--antarionix-blue);
}

.roadmap-card-prevu::before {
    background: var(--antarionix-orange);
}

.roadmap-card-prochaine-etape::before {
    background: #5856d6;
}

.roadmap-card-planifie::before {
    background: var(--antarionix-orange);
}

.roadmap-card-plus-tard::before {
    background: #8e8e93;
}

.roadmap-card-backlog::before {
    background: #af52de;
}

.roadmap-card-top {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
    padding-top: 0.35rem;
}

.roadmap-icon {
    align-items: center;
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid rgba(0, 122, 255, 0.16);
    border-radius: 14px;
    color: var(--accent-color, #007aff);
    display: inline-flex;
    flex: 0 0 auto;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.roadmap-card-termine .roadmap-icon {
    background: rgba(52, 199, 89, 0.12);
    border-color: rgba(52, 199, 89, 0.22);
    color: #248a3d;
}

.roadmap-card-en-cours .roadmap-icon {
    background: rgba(0, 122, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.22);
    color: #0057b8;
}

.roadmap-card-prevu .roadmap-icon {
    background: rgba(255, 159, 10, 0.13);
    border-color: rgba(255, 159, 10, 0.24);
    color: #b86e00;
}

.roadmap-card-prochaine-etape .roadmap-icon {
    background: rgba(88, 86, 214, 0.13);
    border-color: rgba(88, 86, 214, 0.24);
    color: #3634a3;
}

.roadmap-card-planifie .roadmap-icon {
    background: rgba(255, 159, 10, 0.13);
    border-color: rgba(255, 159, 10, 0.24);
    color: #b86e00;
}

.roadmap-card-plus-tard .roadmap-icon {
    background: rgba(142, 142, 147, 0.14);
    border-color: rgba(142, 142, 147, 0.24);
    color: #636366;
}

.roadmap-card-backlog .roadmap-icon {
    background: rgba(175, 82, 222, 0.13);
    border-color: rgba(175, 82, 222, 0.24);
    color: #8944ab;
}

.roadmap-status {
    color: var(--heading-text, #1d1d1f);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
}

.roadmap-list {
    color: var(--page-text, #1d1d1f);
    display: grid;
    gap: 0.45rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.roadmap-list li {
    align-items: flex-start;
    display: flex;
    gap: 0.45rem;
    line-height: 1.32;
}

.roadmap-list li::before {
    background: rgba(0, 122, 255, 0.3);
    border-radius: 999px;
    content: "";
    flex: 0 0 auto;
    height: 7px;
    margin-top: 0.42rem;
    width: 7px;
}

@media (max-width: 1199.98px) {
    .roadmap-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .devblog-section-heading,
    .roadmap-header {
        display: grid;
    }

    .devblog-section-heading .roadmap-version-badge,
    .roadmap-version-badge {
        justify-self: start;
    }

    .roadmap-grid {
        grid-template-columns: 1fr;
    }

    .roadmap-card {
        border-radius: 16px;
        padding: 0.95rem;
    }
}

.btn {
    box-shadow: none !important;
    -webkit-tap-highlight-color: rgba(20, 119, 255, 0.18);
    touch-action: manipulation;
    transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
    white-space: nowrap;
}

button {
    -webkit-tap-highlight-color: rgba(20, 119, 255, 0.18);
    touch-action: manipulation;
    transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}

.btn:active:not(:disabled):not(.disabled),
button:active:not(:disabled):not([aria-disabled="true"]) {
    filter: brightness(0.96) saturate(0.96);
    transform: translateY(1px) scale(0.985);
}

form.is-submitting {
    cursor: progress;
}

.btn.is-submitting,
button.is-submitting,
input[type="submit"].is-submitting {
    cursor: wait;
    opacity: 0.88;
    pointer-events: none;
}

.form-submit-spinner {
    animation: form-submit-spin 0.65s linear infinite;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
    height: 1rem;
    width: 1rem;
}

@keyframes form-submit-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    button {
        transition: none;
    }

    .btn:active:not(:disabled):not(.disabled),
    button:active:not(:disabled):not([aria-disabled="true"]) {
        transform: none;
    }

    .form-submit-spinner {
        animation: none;
        border-right-color: currentColor;
        opacity: 0.65;
    }
}

.action-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.action-toolbar.justify-content-end {
    justify-content: flex-end;
}

.btn-compact {
    min-height: 32px;
    padding-inline: 0.6rem;
}

.action-panel {
    background: rgba(246, 246, 248, 0.92);
    border: 1px solid rgba(60, 60, 67, 0.14);
    border-radius: 14px;
    margin-top: 0.7rem;
    padding: 0.7rem;
}

.action-panel-inline {
    min-width: min(18rem, 100%);
}

.action-panel-grid {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.action-panel-grid > .btn,
.action-panel-grid > form,
.action-panel-grid > form > .btn {
    flex: 0 1 auto;
}

.action-panel form {
    margin: 0;
}

.table-action-cell {
    min-width: 10.5rem;
}

.btn-danger {
    --bs-btn-bg: #ff3b30;
    --bs-btn-border-color: #ff3b30;
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #e92c23;
    --bs-btn-hover-border-color: #e92c23;
    --bs-btn-hover-color: #fff;
}

.btn-outline-danger {
    --bs-btn-color: #ff3b30;
    --bs-btn-border-color: rgba(255, 59, 48, 0.35);
    --bs-btn-hover-bg: #ff3b30;
    --bs-btn-hover-border-color: #ff3b30;
    --bs-btn-hover-color: #fff;
}

.form-control,
.form-select {
    box-shadow: none !important;
}

textarea.form-control {
    line-height: 1.45;
}

.form-check-input {
    cursor: pointer;
}

.form-switch .form-check-input {
    height: 1.25rem;
    width: 2.35rem;
}

.mobile-photo-actions {
    display: none;
    gap: 0.65rem;
    grid-template-columns: 1fr;
}

.mobile-photo-action {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
    justify-content: center;
    min-height: 46px;
    position: relative;
    width: 100%;
}

.mobile-photo-input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.photo-preview-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fill, minmax(78px, 96px));
    justify-content: start;
}

.photo-preview-item {
    background: rgba(246, 246, 248, 0.92);
    border: 1px solid rgba(60, 60, 67, 0.14);
    border-radius: 12px;
    max-width: 96px;
    overflow: hidden;
}

.photo-preview-item img {
    aspect-ratio: 1;
    display: block;
    max-width: 100%;
    object-fit: cover;
    width: 100%;
}

.photo-preview-item small {
    color: var(--muted-text, #6e6e73);
    display: block;
    font-size: 0.72rem;
    overflow: hidden;
    padding: 0.35rem 0.45rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-picker-selected {
    background: rgba(0, 122, 255, 0.08);
    border: 1px solid rgba(0, 122, 255, 0.16);
    border-radius: 12px;
    color: var(--heading-text, #111114);
    font-size: 0.9rem;
    font-weight: 650;
    padding: 0.65rem 0.8rem;
}

.asset-picker-selected strong,
.asset-picker-selected small {
    display: block;
    overflow-wrap: anywhere;
}

.asset-picker-selected small {
    color: var(--muted-text, #6e6e73);
    font-weight: 500;
    margin-top: 0.2rem;
}

.machine-picker-search-row {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) 2.75rem;
}

.machine-picker-clear {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0;
}

.asset-picker-selected.is-empty {
    background: rgba(142, 142, 147, 0.08);
    border-color: rgba(142, 142, 147, 0.18);
    color: var(--muted-text, #6e6e73);
}

.asset-picker-list {
    border: 1px solid rgba(60, 60, 67, 0.14);
    border-radius: 14px;
    display: grid;
    gap: 0.45rem;
    max-height: 320px;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-x: contain;
    padding: 0.45rem;
    touch-action: pan-y;
}

.asset-picker-list.asset-picker-error {
    border-color: rgba(255, 59, 48, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.12);
}

.asset-picker-item {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(60, 60, 67, 0.13);
    border-radius: 12px;
    color: var(--page-text, #1d1d1f);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-height: 52px;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    touch-action: pan-y;
    text-align: left;
    width: 100%;
}

.asset-picker-item:hover,
.asset-picker-item:focus-visible,
.asset-picker-item.active {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.28);
    outline: none;
}

.asset-picker-item:not(.machine-picker-result) strong,
.asset-picker-item:not(.machine-picker-result) small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.machine-picker-result {
    min-height: 72px;
}

.machine-picker-result strong,
.machine-picker-result span,
.machine-picker-result small {
    overflow-wrap: anywhere;
    white-space: normal;
}

.machine-picker-result-name {
    font-size: 0.92rem;
    font-weight: 600;
}

.asset-picker-item small,
.asset-picker-empty,
.compact-meta {
    color: var(--muted-text, #6e6e73);
    font-size: 0.8rem;
}

.asset-picker-empty {
    padding: 0.55rem 0.65rem;
}

.min-width-0 {
    min-width: 0;
}

.equipment-group-title {
    align-items: center;
    display: flex;
    gap: 0.45rem;
    min-width: 0;
}

.equipment-group-title .text-clamp-1 {
    min-width: 0;
}

.equipment-group-toggle {
    flex: 0 0 auto;
}

.equipment-table td {
    max-width: 18rem;
}

.role-admin-card {
    background: rgba(255, 255, 255, 0.72);
}

.users-filter {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: min(280px, 100%);
}

.users-list {
    display: grid;
    gap: 0.8rem;
}

.user-admin-card {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
}

.user-admin-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.user-avatar {
    display: inline-grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 113, 227, 0.08);
    color: #0071e3;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-admin-meta {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.user-admin-meta span {
    display: block;
    color: var(--muted-text, #6e6e73);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.user-admin-meta a,
.user-admin-meta strong {
    overflow-wrap: anywhere;
}

.user-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.user-action-details,
.role-manage-details {
    position: relative;
}

.user-action-details summary,
.role-manage-details summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 0.28rem 0.65rem;
    border: 1px solid rgba(108, 117, 125, 0.28);
    border-radius: 999px;
    color: var(--muted-text, #6e6e73);
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 700;
    list-style: none;
}

.user-action-details summary::-webkit-details-marker,
.role-manage-details summary::-webkit-details-marker {
    display: none;
}

.user-action-panel,
.role-manage-panel {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.65rem;
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
}

.user-danger-zone,
.role-danger-zone {
    border-top: 1px solid rgba(220, 38, 38, 0.18);
    margin-top: 0.25rem;
    padding-top: 0.7rem;
}

.role-danger-zone {
    background: rgba(220, 38, 38, 0.04);
    border-radius: 12px;
    padding: 0.75rem;
}

.notification-sound-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(13, 110, 253, 0.18);
    border-radius: 0.5rem;
    background: rgba(13, 110, 253, 0.05);
}

.notification-sound-summary > div:first-child {
    display: grid;
    gap: 0.2rem;
}

.notification-sound-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.notification-sound-choice {
    height: 100%;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.76);
}

.notification-sound-choice .form-check-label {
    display: grid;
    gap: 0.2rem;
}

.notification-sound-danger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 0.5rem;
    background: rgba(220, 53, 69, 0.04);
}

.pwa-push-panel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pwa-push-status {
    color: var(--muted-text, #6c757d);
    font-size: 0.85rem;
}

.pwa-push-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(13, 110, 253, 0.24);
    border-radius: 0.5rem;
    background: rgba(13, 110, 253, 0.08);
    color: #0d6efd;
    font-size: 0.85rem;
    font-weight: 600;
}

.pwa-push-button:hover,
.pwa-push-button:focus {
    border-color: rgba(13, 110, 253, 0.45);
    background: rgba(13, 110, 253, 0.14);
}

.pwa-push-admin-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-width: 0;
}

.pwa-push-admin-status {
    display: grid;
    align-content: start;
    gap: 0.35rem;
    min-height: 100%;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.78);
}

.pwa-push-admin-status span {
    color: var(--muted-text, #6c757d);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.pwa-push-admin-status strong {
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.pwa-push-admin-status p {
    margin: 0;
    color: var(--muted-text, #6c757d);
    font-size: 0.88rem;
}

@media (max-width: 767.98px) {
    .notification-sound-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .notification-sound-actions {
        justify-content: flex-start;
    }

    .notification-sound-actions .btn {
        width: 100%;
    }

    .pwa-push-panel {
        justify-content: flex-start;
        width: 100%;
    }

    .pwa-push-button {
        flex: 1 1 8rem;
        justify-content: center;
    }
}

@media (max-width: 1199.98px) {
    .pwa-push-admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .pwa-push-admin-grid {
        grid-template-columns: 1fr;
    }
}

.role-create-card,
.role-summary-card,
.permission-group-card,
.admin-alert-card {
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
}

.role-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.9rem;
}

.role-summary-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    align-content: start;
}

.role-color-dot {
    display: inline-block;
    width: 0.72rem;
    height: 0.72rem;
    margin-right: 0.35rem;
    border-radius: 50%;
}

.profile-avatar-image,
.profile-avatar-placeholder {
    height: 112px;
    width: 112px;
}

.profile-avatar-image {
    object-fit: cover;
}

.profile-avatar-placeholder {
    font-size: 3rem;
}

.branding-logo-preview-img {
    max-height: 92px;
    max-width: 100%;
    object-fit: contain;
}

.diagnostic-log-table-wrap {
    max-height: 380px;
    overflow: auto;
}

.diagnostic-sticky-head {
    position: sticky;
    top: 0;
    z-index: 1;
}

.sensitive-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.sensitive-list span,
.permission-check.is-sensitive span::after {
    color: #b02a37;
}

.sensitive-list span {
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(220, 53, 69, 0.1);
    font-size: 0.75rem;
    font-weight: 700;
}

.permission-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
}

.permission-group-card {
    padding: 0.85rem;
}

.permission-group-card h6 {
    margin-bottom: 0.65rem;
    color: var(--heading-text, #1d1d1f);
    font-weight: 800;
}

.permission-check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.42rem 0;
    cursor: pointer;
    font-size: 0.9rem;
}

.permission-check input {
    margin-top: 0.18rem;
}

.permission-check.is-sensitive span::after {
    content: " sensible";
    margin-left: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.role-permission-item {
    border-color: rgba(0, 0, 0, 0.08);
}

.admin-alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.8rem;
}

.admin-alert-card {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem;
}

.admin-alert-card span {
    color: var(--muted-text, #6e6e73);
    font-size: 0.9rem;
}

.admin-alert-card-danger {
    border-color: rgba(220, 53, 69, 0.22);
    background: rgba(220, 53, 69, 0.08);
}

.admin-alert-card-warning {
    border-color: rgba(255, 193, 7, 0.28);
    background: rgba(255, 193, 7, 0.11);
}

.admin-alert-card-info {
    border-color: rgba(13, 110, 253, 0.18);
    background: rgba(13, 110, 253, 0.08);
}

.role-name-input {
    min-width: min(260px, 100%);
}

.role-replacement-select {
    min-width: min(240px, 100%);
}

.text-clamp-1,
.text-clamp-2 {
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
}

.text-clamp-1 {
    -webkit-line-clamp: 1;
}

.text-clamp-2 {
    -webkit-line-clamp: 2;
}

@media (max-width: 767.98px) {
    .user-admin-card {
        grid-template-columns: 1fr;
    }

    .user-admin-actions {
        justify-content: flex-start;
    }

    .desktop-photo-input {
        display: none;
    }

    .mobile-photo-actions {
        display: grid;
    }

    .clickable-row td,
    .clickable-row th {
        padding-bottom: 0.95rem;
        padding-top: 0.95rem;
    }

    .asset-picker-list {
        max-height: 48vh;
    }

    .machine-picker-result {
        min-height: 82px;
        padding: 0.8rem;
    }

    .photo-preview-grid {
        gap: 0.5rem;
        grid-template-columns: repeat(auto-fill, minmax(68px, 82px));
    }

    .photo-preview-item {
        border-radius: 10px;
        max-width: 82px;
    }

    .photo-preview-item img {
        max-height: 82px;
    }

    .photo-preview-item small {
        font-size: 0.66rem;
        padding: 0.25rem 0.35rem;
    }

    .equipment-table-wrap {
        overflow: visible;
    }

    .equipment-table thead {
        display: none;
    }

    .equipment-table,
    .equipment-table tbody,
    .equipment-table tr,
    .equipment-table td {
        display: block;
        width: 100%;
    }

    .equipment-table tr {
        border-bottom: 1px solid var(--surface-border, rgba(60, 60, 67, 0.14));
        padding: 0.75rem;
    }

    .equipment-table td {
        border: 0;
        max-width: none;
        padding: 0.2rem 0;
    }

    .equipment-table td.text-end {
        text-align: left !important;
    }

    .equipment-table .action-toolbar {
        justify-content: flex-start !important;
        margin-top: 0.35rem;
    }
}

.notification-settings-panel,
.description-box,
.preview-box,
.upload-zone,
.breadcrumb-box {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 0.9rem;
}

.badge {
    line-height: 1.1;
}

.badge.bg-danger,
.badge.text-bg-danger {
    background-color: var(--danger) !important;
}

.badge.bg-warning,
.badge.text-bg-warning {
    background-color: var(--antarionix-orange) !important;
    color: #111827 !important;
}

.badge.bg-success,
.badge.text-bg-success {
    background-color: var(--success) !important;
}

.alert {
    background: var(--surface-bg);
    border-color: var(--surface-border);
    color: var(--page-text);
}

.timeline .card {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05) !important;
}

.document-thumb,
.document-file-icon,
.intervention-photo-card {
    border-color: var(--surface-border);
}

.sidebar {
    background: var(--sidebar-bg) !important;
}

.sidebar-link {
    min-width: 0;
}

.sidebar-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-card {
    margin-inline: auto;
}

.login-wrapper {
    min-height: min(720px, calc(100vh - 2rem));
    padding-top: 1rem;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
}

.btn-group form {
    display: inline-flex;
}

@media (max-width: 991.98px) {
    .app-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .app-page-header > .d-flex {
        justify-content: flex-start;
    }

    .sidebar-inner {
        gap: 0.75rem;
        min-height: 100%;
    }

    #sidebarToggle {
        display: none;
    }

    .sidebar .nav {
        display: flex;
        flex-direction: column;
    }

    .sidebar-footer {
        padding-top: 0;
    }

    .sidebar-user {
        align-items: center;
        text-align: center;
    }

    .dashboard-level-header {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-level-header .btn {
        align-self: flex-start;
    }
}

@media (max-width: 767.98px) {
    .mobile-only-action {
        display: inline-flex;
    }
}

@media (max-width: 575.98px) {
    .quick-mode-grid {
        grid-template-columns: 1fr;
    }

    .quick-mode-card {
        min-height: 132px;
    }

    .quick-duration-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-area {
        padding: 0.75rem !important;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        border-radius: 14px;
    }

    .btn,
    .input-group .btn,
    .btn-group .btn {
        width: 100%;
    }

    .btn-group {
        display: grid;
        gap: 0.45rem;
        width: 100%;
    }

    .btn-group form,
    .btn-group form .btn {
        width: 100%;
    }

    .action-toolbar {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .action-toolbar > .btn,
    .action-toolbar > button {
        width: 100%;
    }

    .action-panel-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .action-panel-grid > .btn,
    .action-panel-grid > form,
    .action-panel-grid > form > .btn {
        width: 100%;
    }

    .input-group {
        gap: 0.45rem;
    }

    .input-group > .form-control,
    .input-group > .form-select,
    .input-group > .btn {
        border-radius: var(--control-radius) !important;
        flex: 1 0 100%;
        width: 100%;
    }

    .intervention-photo-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero .card-body {
        padding: 1.15rem !important;
    }

    .dashboard-kpi-card .card-body,
    .dashboard-stat-card .card-body {
        min-height: 132px;
    }

    .dashboard-work-item {
        align-items: stretch;
        flex-direction: column;
        gap: 0.6rem;
        min-height: 0;
    }

    .dashboard-work-side {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        text-align: left;
        white-space: normal;
    }

}

.sidebar-controls {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.4rem;
}

.sidebar-control-button,
.guest-theme-toggle,
.back-to-top {
    align-items: center;
    background: var(--surface-bg-soft, #f6f6f8);
    border: 1px solid var(--surface-border, rgba(60, 60, 67, 0.16));
    border-radius: 999px;
    color: var(--heading-text, #111114);
    display: inline-flex;
    height: 40px;
    justify-content: center;
    padding: 0;
    transition: background-color 0.16s ease, color 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
    width: 40px;
}

.sidebar-control-button:hover,
.guest-theme-toggle:hover,
.back-to-top:hover {
    background: var(--accent-soft, rgba(0, 122, 255, 0.13));
    color: var(--accent-strong, #0a84ff);
}

.guest-theme-toggle {
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 50;
}

.back-to-top {
    bottom: 1.25rem;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 1.25rem;
    transform: translateY(0.5rem);
    z-index: 80;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.app-footer {
    color: var(--page-text, #1d1d1f);
    padding-bottom: 1.25rem;
}

.app-footer-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.app-footer-links a,
.pwa-install-button {
    background: transparent;
    border: 1px solid var(--surface-border, rgba(60, 60, 67, 0.16));
    border-radius: 999px;
    color: var(--muted-text, #6e6e73);
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.38rem 0.68rem;
    text-decoration: none;
}

.app-footer-links a:hover,
.pwa-install-button:hover {
    background: var(--accent-soft, rgba(0, 122, 255, 0.13));
    color: var(--accent-strong, #0a84ff);
}

.pwa-install-button {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
}

.pwa-install-button[hidden] {
    display: none;
}

.pwa-install-help {
    margin-top: 0.15rem;
    max-width: 32rem;
}

.sidebar-user {
    color: var(--page-text, #1d1d1f);
}

.sidebar-user-name {
    color: var(--heading-text, #111114) !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user .btn-outline-light {
    --bs-btn-color: var(--heading-text, #111114);
    --bs-btn-border-color: var(--surface-border, rgba(60, 60, 67, 0.16));
    --bs-btn-hover-bg: var(--accent-soft, rgba(0, 122, 255, 0.13));
    --bs-btn-hover-border-color: var(--surface-border, rgba(60, 60, 67, 0.16));
    --bs-btn-hover-color: var(--heading-text, #111114);
}

.btn-primary {
    --bs-btn-bg: var(--antarionix-blue);
    --bs-btn-border-color: var(--antarionix-blue);
    --bs-btn-hover-bg: #0B63E5;
    --bs-btn-hover-border-color: #0B63E5;
    --bs-btn-active-bg: #084FBA;
    --bs-btn-active-border-color: #084FBA;
    box-shadow: 0 10px 22px rgba(20, 119, 255, 0.22);
}

.btn-outline-primary {
    --bs-btn-color: var(--accent);
    --bs-btn-border-color: rgba(20, 119, 255, 0.42);
    --bs-btn-hover-bg: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
}

.btn-outline-secondary {
    --bs-btn-color: var(--muted-text);
    --bs-btn-border-color: var(--surface-border);
    --bs-btn-hover-bg: var(--accent-soft);
    --bs-btn-hover-border-color: rgba(20, 119, 255, 0.34);
    --bs-btn-hover-color: var(--heading-text);
}

.btn-danger,
.btn-outline-danger:hover {
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.16);
}

.form-control,
.form-select,
.input-group-text {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--page-text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

.form-label {
    color: var(--heading-text);
    font-weight: 700;
}

/* Antarionix V1.4 phase 2: login and dashboard control-center layer. */
.antarionix-login {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(1rem, 3vw, 2.5rem);
    position: relative;
}

.antarionix-login::before,
.antarionix-login::after {
    border-radius: 999px;
    content: "";
    filter: blur(4px);
    opacity: 0.62;
    pointer-events: none;
    position: absolute;
}

.antarionix-login::before {
    background: radial-gradient(circle, rgba(20, 119, 255, 0.18), transparent 68%);
    height: 44rem;
    left: -20rem;
    top: -18rem;
    width: 44rem;
}

.antarionix-login::after {
    background: radial-gradient(circle, rgba(255, 138, 0, 0.12), transparent 64%);
    bottom: -20rem;
    height: 34rem;
    right: -16rem;
    width: 34rem;
}

.login-shell {
    display: grid;
    gap: clamp(1rem, 3vw, 1.5rem);
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
    max-width: 1120px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.login-orbit-panel,
.login-command-card,
.dashboard-command-hero,
.dashboard-panel,
.dashboard-command-card {
    backdrop-filter: blur(22px);
}

.login-orbit-panel {
    background:
        radial-gradient(circle at 30% 28%, rgba(56, 213, 255, 0.22), transparent 15rem),
        radial-gradient(circle at 76% 70%, rgba(20, 119, 255, 0.22), transparent 18rem),
        linear-gradient(145deg, rgba(13, 27, 42, 0.96), rgba(7, 17, 31, 0.92));
    border: 1px solid rgba(56, 213, 255, 0.22);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(13, 27, 42, 0.22);
    color: #F8FAFC;
    min-height: 560px;
    overflow: hidden;
    padding: clamp(1.4rem, 4vw, 3rem);
    position: relative;
}

.login-orbit-panel::before {
    background:
        linear-gradient(rgba(56, 213, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 213, 255, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    content: "";
    inset: 0;
    mask-image: linear-gradient(135deg, black, transparent 78%);
    opacity: 0.68;
    position: absolute;
}

.login-orbit-grid {
    aspect-ratio: 1;
    border: 1px solid rgba(56, 213, 255, 0.18);
    border-radius: 50%;
    bottom: -12rem;
    position: absolute;
    right: -10rem;
    width: min(42rem, 78vw);
}

.login-orbit-grid span {
    border: 1px solid rgba(56, 213, 255, 0.16);
    border-radius: 50%;
    inset: 14%;
    position: absolute;
}

.login-orbit-grid span:nth-child(2) {
    inset: 28%;
}

.login-orbit-grid span:nth-child(3) {
    border-color: rgba(255, 138, 0, 0.35);
    inset: 46%;
}

.login-orbit-content {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    height: 100%;
    justify-content: space-between;
    max-width: 34rem;
    position: relative;
    z-index: 1;
}

.login-logo-command {
    height: 108px;
    width: 108px;
}

.login-kicker,
.login-form-eyebrow {
    color: var(--antarionix-cyan);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 0.55rem;
    text-transform: uppercase;
}

.login-orbit-content h1 {
    color: #FFFFFF;
    font-size: clamp(2.8rem, 7vw, 5.6rem);
    font-weight: 800;
    line-height: 0.95;
    margin: 0;
}

.login-lead {
    color: rgba(229, 238, 248, 0.78);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    margin: 0.8rem 0 0;
}

.login-signal-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.login-signal-grid div {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(56, 213, 255, 0.18);
    border-radius: 18px;
    display: grid;
    gap: 0.45rem;
    min-height: 104px;
    padding: 1rem;
}

.login-signal-grid i {
    color: var(--antarionix-cyan);
    font-size: 1.35rem;
}

.login-signal-grid span {
    color: rgba(248, 250, 252, 0.88);
    font-size: 0.86rem;
    font-weight: 800;
}

.login-command-card {
    align-self: center;
    border-radius: 26px !important;
}

.login-form-heading {
    margin-bottom: 1.6rem;
}

.login-form-heading h2 {
    color: var(--heading-text);
    font-size: clamp(1.8rem, 4vw, 2.35rem);
    font-weight: 800;
    margin: 0 0 0.45rem;
}

.dashboard-control {
    display: grid;
    gap: 1.35rem;
}

.dashboard-command-hero {
    background:
        radial-gradient(circle at 12% 18%, rgba(56, 213, 255, 0.18), transparent 17rem),
        radial-gradient(circle at 86% 16%, rgba(20, 119, 255, 0.2), transparent 18rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.76));
    border: 1px solid var(--surface-border);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    padding: clamp(1.2rem, 3vw, 2rem);
    position: relative;
}

.dashboard-command-grid {
    background:
        linear-gradient(var(--antarionix-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--antarionix-grid) 1px, transparent 1px);
    background-size: 36px 36px;
    inset: 0;
    mask-image: radial-gradient(circle at 24% 22%, black, transparent 72%);
    pointer-events: none;
    position: absolute;
}

.dashboard-command-main {
    align-items: center;
    display: flex;
    gap: clamp(1rem, 3vw, 1.5rem);
    min-width: 0;
    position: relative;
    z-index: 1;
}

.dashboard-radar-node {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: inline-flex;
    flex: 0 0 auto;
    height: 112px;
    justify-content: center;
    overflow: visible;
    padding: 0;
    width: 112px;
}

.dashboard-command-copy {
    min-width: 0;
}

.dashboard-command-copy h1 {
    color: var(--heading-text);
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 850;
    line-height: 1;
    margin: 0;
}

.dashboard-command-lead {
    color: var(--muted-text);
    font-size: 1.02rem;
    margin: 0.85rem 0 0;
    max-width: 46rem;
}

.dashboard-command-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.dashboard-command-meta span {
    align-items: center;
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    color: var(--muted-text);
    display: inline-flex;
    font-size: 0.88rem;
    gap: 0.35rem;
    padding: 0.42rem 0.72rem;
}

.dashboard-command-meta strong {
    color: var(--heading-text);
}

.dashboard-command-actions {
    align-content: start;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

.dashboard-status-pill {
    align-items: center;
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    gap: 0.45rem;
    padding: 0.42rem 0.78rem;
}

.dashboard-status-success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803D;
}

.dashboard-status-warning {
    background: rgba(255, 138, 0, 0.16);
    color: #9A4B00;
}

.dashboard-status-danger {
    background: rgba(220, 38, 38, 0.13);
    color: #B91C1C;
}

.pwa-install-dialog {
    background: var(--page-surface, #fff);
    border: 1px solid rgba(60, 60, 67, 0.18);
    border-radius: 8px;
    color: var(--page-text, #1d1d1f);
    inline-size: min(92vw, 31rem);
    padding: 1.25rem;
}

.pwa-install-dialog::backdrop {
    background: rgba(16, 24, 40, 0.58);
}

.pwa-install-dialog-header,
.pwa-install-dialog-header > div,
.pwa-install-dialog-actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.pwa-install-dialog-header {
    justify-content: space-between;
    margin-bottom: 1rem;
}

.pwa-install-dialog h2 {
    font-size: 1.25rem;
    margin: 0;
}

.pwa-install-dialog-icon {
    align-items: center;
    background: rgba(13, 110, 253, 0.12);
    border-radius: 8px;
    color: #0d6efd;
    display: inline-flex;
    font-size: 1.2rem;
    inline-size: 2.5rem;
    justify-content: center;
    min-block-size: 2.5rem;
}

.pwa-install-never {
    margin: 1rem 0;
}

.pwa-install-dialog-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 575.98px) {
    .pwa-install-dialog-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pwa-install-dialog-actions .btn {
        min-block-size: 46px;
        width: 100%;
    }
}

[data-bs-theme="dark"] .pwa-install-dialog {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.16);
    color: #f8fafc;
}

.dashboard-status-neutral {
    background: var(--surface-bg-soft);
    color: var(--heading-text);
}

.dashboard-command-card {
    overflow: hidden;
    position: relative;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-command-card::after {
    background: linear-gradient(180deg, rgba(56, 213, 255, 0.4), transparent);
    content: "";
    inset: 0 auto 0 0;
    opacity: 0.68;
    position: absolute;
    width: 4px;
}

.dashboard-link {
    color: inherit;
    display: block;
    height: 100%;
    text-decoration: none;
}

.dashboard-link:hover .dashboard-command-card {
    border-color: rgba(20, 119, 255, 0.28) !important;
    box-shadow: var(--shadow-hover) !important;
    transform: translateY(-2px);
}

.metric-card-accent-warning::after {
    background: linear-gradient(180deg, var(--antarionix-orange), transparent);
}

.metric-card-accent-danger::after {
    background: linear-gradient(180deg, #DC2626, transparent);
}

.metric-card-accent-success::after {
    background: linear-gradient(180deg, #16A34A, transparent);
}

.dashboard-panel .card-header {
    align-items: center;
    min-height: 64px;
}

.dashboard-section-title {
    color: var(--heading-text);
    font-weight: 800;
}

.dashboard-work-item {
    border-color: var(--surface-border);
    border-radius: 16px;
    margin-block: 0.15rem;
    padding: 0.85rem;
}

.dashboard-work-item:hover {
    background: var(--accent-soft);
}

.dashboard-empty {
    background: var(--surface-bg-soft);
    border: 1px dashed var(--surface-border);
    border-radius: 18px;
}

@media (max-width: 991.98px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 640px;
    }

    .login-orbit-panel {
        min-height: 360px;
    }

    .dashboard-command-hero {
        grid-template-columns: 1fr;
    }

    .dashboard-command-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .antarionix-login {
        align-items: stretch;
        min-height: 100svh;
        padding: 0.85rem;
    }

    .login-orbit-panel {
        border-radius: 24px;
        min-height: 300px;
        padding: 1.1rem;
    }

    .login-orbit-content {
        gap: 1rem;
    }

    .login-logo-command {
        height: 82px;
        width: 82px;
    }

    .login-orbit-content h1 {
        font-size: clamp(2.45rem, 13vw, 3.4rem);
    }

    .login-signal-grid {
        grid-template-columns: 1fr;
    }

    .login-signal-grid div {
        align-items: center;
        display: flex;
        min-height: 0;
        padding: 0.78rem;
    }

    .login-command-card {
        border-radius: 24px !important;
    }

    .dashboard-command-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-radar-node {
        height: 96px;
        width: 96px;
    }

    .dashboard-command-copy h1 {
        font-size: clamp(2rem, 12vw, 2.6rem);
    }

    .dashboard-command-actions .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .login-form-heading h2 {
        font-size: 1.75rem;
    }

    .dashboard-command-hero {
        border-radius: 22px;
        padding: 1rem;
    }

    .dashboard-command-meta {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    .sidebar,
    .content-area,
    .sidebar-title-wrap,
    .sidebar-text,
    .sidebar-section,
    .sidebar-user-label,
    .sidebar-user-name {
        transition: all 0.18s ease;
    }

    body.sidebar-collapsed .sidebar,
    html.sidebar-collapsed-init .sidebar {
        flex-basis: var(--sidebar-width-collapsed, 84px);
        width: var(--sidebar-width-collapsed, 84px);
    }

    body.sidebar-collapsed .sidebar,
    html.sidebar-collapsed-init .sidebar {
        padding-inline: 0.7rem;
    }

    body.sidebar-collapsed .sidebar-top,
    html.sidebar-collapsed-init .sidebar-top {
        flex-direction: column;
        justify-content: center;
    }

    body.sidebar-collapsed .sidebar-brand,
    html.sidebar-collapsed-init .sidebar-brand {
        justify-content: center;
    }

    body.sidebar-collapsed .sidebar-logo,
    html.sidebar-collapsed-init .sidebar-logo {
        height: 42px;
        width: 48px;
    }

    body.sidebar-collapsed .sidebar-title-wrap,
    html.sidebar-collapsed-init .sidebar-title-wrap,
    body.sidebar-collapsed .sidebar-section,
    html.sidebar-collapsed-init .sidebar-section,
    body.sidebar-collapsed .sidebar-text,
    html.sidebar-collapsed-init .sidebar-text,
    body.sidebar-collapsed .sidebar-user-name,
    html.sidebar-collapsed-init .sidebar-user-name,
    body.sidebar-collapsed .sidebar-user-label,
    html.sidebar-collapsed-init .sidebar-user-label,
    body.sidebar-collapsed .sidebar-user form span,
    html.sidebar-collapsed-init .sidebar-user form span {
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        position: absolute;
        width: 0;
    }

    body.sidebar-collapsed .sidebar-controls,
    html.sidebar-collapsed-init .sidebar-controls {
        flex-direction: column;
    }

    body.sidebar-collapsed .sidebar-link,
    html.sidebar-collapsed-init .sidebar-link {
        justify-content: center;
        padding-inline: 0.35rem;
    }

    body.sidebar-collapsed .sidebar-icon,
    html.sidebar-collapsed-init .sidebar-icon {
        height: 42px;
        width: 42px;
    }

    body.sidebar-collapsed .sidebar-user,
    html.sidebar-collapsed-init .sidebar-user {
        padding: 0.7rem 0.35rem;
    }

    body.sidebar-collapsed .sidebar-user-photo,
    html.sidebar-collapsed-init .sidebar-user-photo {
        margin-bottom: 0.65rem;
    }

    body.sidebar-collapsed .sidebar-user .btn,
    html.sidebar-collapsed-init .sidebar-user .btn {
        min-width: 42px;
        padding-inline: 0;
    }
}

.admin-hub {
    display: grid;
    gap: 1rem;
}

.admin-alert-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
}

.admin-status-banner {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(25, 135, 84, 0.16);
    border-radius: 18px;
    background: rgba(25, 135, 84, 0.08);
    color: #146c43;
}

.admin-status-banner i {
    font-size: 1.35rem;
}

.admin-status-banner strong,
.admin-status-banner span {
    display: block;
}

.admin-status-banner span {
    color: var(--muted-text, #6e6e73);
    font-size: 0.9rem;
}

.admin-hub-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.06);
}

.admin-hub-kicker {
    display: inline-flex;
    margin-bottom: 0.35rem;
    color: #0071e3;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.admin-hub-title {
    margin: 0 0 0.35rem;
    color: var(--heading-text, #1d1d1f);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0;
}

.admin-hub-version {
    min-width: 150px;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(0, 113, 227, 0.16);
    border-radius: 16px;
    background: rgba(0, 113, 227, 0.08);
    color: #0a58ca;
    text-align: right;
}

.admin-hub-version span {
    display: block;
    color: var(--muted-text, #6e6e73);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-hub-version strong {
    display: block;
    font-size: 1rem;
}

.admin-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.9rem;
}

.admin-module-card {
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.055);
}

.admin-module-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.admin-module-icon {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
    font-size: 1.25rem;
}

.admin-module-card h3 {
    margin: 0 0 0.45rem;
    color: var(--heading-text, #1d1d1f);
    font-size: 1.02rem;
    font-weight: 800;
}

.admin-module-card p {
    flex: 1;
    margin: 0 0 0.7rem;
    color: var(--muted-text, #6e6e73);
    font-size: 0.92rem;
    line-height: 1.45;
}

.admin-module-value {
    margin-bottom: 0.45rem;
    color: var(--heading-text, #1d1d1f);
    font-size: 1.12rem;
    font-weight: 800;
}

.admin-detail-link {
    align-self: flex-start;
    color: #0066cc;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.admin-detail-link:hover {
    text-decoration: underline;
}

.admin-module-badge {
    white-space: normal;
    text-align: right;
}

.admin-module-badge-success {
    color: #146c43;
    background: rgba(25, 135, 84, 0.12);
}

.admin-module-badge-warning {
    color: #997404;
    background: rgba(255, 193, 7, 0.18);
}

.admin-module-badge-danger {
    color: #b02a37;
    background: rgba(220, 53, 69, 0.13);
}

.admin-module-badge-primary {
    color: #084298;
    background: rgba(13, 110, 253, 0.12);
}

.admin-module-badge-secondary {
    color: #41464b;
    background: rgba(108, 117, 125, 0.12);
}

.admin-summary-strip,
.admin-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.admin-summary-strip {
    margin-bottom: 1rem;
}

.admin-summary-strip > div,
.admin-health-grid > div {
    padding: 0.9rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.045);
}

.admin-summary-strip span,
.admin-health-grid span {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--muted-text, #6e6e73);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-summary-strip strong,
.admin-health-grid strong {
    display: block;
    color: var(--heading-text, #1d1d1f);
    font-size: 1rem;
}

.admin-clean-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-clean-list li {
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(255, 193, 7, 0.24);
    border-radius: 14px;
    background: rgba(255, 193, 7, 0.1);
}

@media (max-width: 767.98px) {
    .admin-hub-hero {
        display: grid;
        padding: 1rem;
    }

    .admin-hub-version {
        min-width: 0;
        text-align: left;
    }

    .admin-module-card {
        min-height: 0;
    }
}

[data-bs-theme="dark"] body {
    background: #101014 !important;
    color: var(--page-text, #f5f5f7);
}

[data-bs-theme="dark"] .sidebar {
    background: rgba(28, 28, 30, 0.82) !important;
    border-color: rgba(255, 255, 255, 0.14);
}

[data-bs-theme="dark"] .mobile-app-header {
    background: rgba(28, 28, 30, 0.84);
    border-color: rgba(255, 255, 255, 0.14);
}

[data-bs-theme="dark"] .mobile-menu-button {
    background: var(--surface-bg);
    border-color: var(--surface-border);
    color: var(--page-text, #f5f5f7);
}

[data-bs-theme="dark"] .mobile-header-brand {
    color: var(--heading-text, #ffffff);
}

[data-bs-theme="dark"] .app-page-header,
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .app-card,
[data-bs-theme="dark"] .detail-card,
[data-bs-theme="dark"] .form-card,
[data-bs-theme="dark"] .stat-card,
[data-bs-theme="dark"] .dashboard-card,
[data-bs-theme="dark"] .login-card,
[data-bs-theme="dark"] .machine-card,
[data-bs-theme="dark"] .user-card,
[data-bs-theme="dark"] .summary-card,
[data-bs-theme="dark"] .modal-content {
    background: var(--surface-bg) !important;
    border-color: var(--surface-border) !important;
    box-shadow: var(--shadow-soft) !important;
    color: var(--page-text, #f5f5f7);
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .table thead th {
    background: var(--table-head-bg) !important;
    color: var(--muted-text, #a1a1a6);
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--page-text, #f5f5f7);
    --bs-table-border-color: var(--surface-border);
    --bs-table-striped-bg: rgba(56, 213, 255, 0.05);
    --bs-table-striped-color: var(--page-text, #f5f5f7);
    --bs-table-hover-bg: var(--accent-soft);
    --bs-table-hover-color: var(--page-text, #f5f5f7);
}

[data-bs-theme="dark"] .dashboard-level-title,
[data-bs-theme="dark"] .dashboard-chart-label strong,
[data-bs-theme="dark"] .devblog-title,
[data-bs-theme="dark"] .roadmap-title,
[data-bs-theme="dark"] .roadmap-status {
    color: var(--heading-text, #ffffff);
}

[data-bs-theme="dark"] .roadmap-card {
    background: rgba(28, 28, 30, 0.82);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

[data-bs-theme="dark"] .devblog-section-heading,
[data-bs-theme="dark"] .roadmap-note {
    background: var(--surface-bg) !important;
    border-color: var(--surface-border) !important;
}

[data-bs-theme="dark"] .roadmap-version-badge {
    background: rgba(10, 132, 255, 0.18);
    border-color: rgba(10, 132, 255, 0.3);
    color: #64d2ff;
}

[data-bs-theme="dark"] .roadmap-card-termine .roadmap-icon {
    color: #30d158;
}

[data-bs-theme="dark"] .roadmap-card-en-cours .roadmap-icon {
    color: #64d2ff;
}

[data-bs-theme="dark"] .roadmap-card-prevu .roadmap-icon {
    color: #ffd60a;
}

[data-bs-theme="dark"] .roadmap-card-prochaine-etape .roadmap-icon {
    color: #bfbcff;
}

[data-bs-theme="dark"] .roadmap-card-planifie .roadmap-icon {
    color: #ffd60a;
}

[data-bs-theme="dark"] .roadmap-card-plus-tard .roadmap-icon {
    color: #c7c7cc;
}

[data-bs-theme="dark"] .roadmap-card-backlog .roadmap-icon {
    color: #f0b3ff;
}

[data-bs-theme="dark"] .dashboard-kpi-icon {
    background: rgba(10, 132, 255, 0.18);
    border-color: rgba(10, 132, 255, 0.28);
    color: #64d2ff;
}

[data-bs-theme="dark"] .login-command-card,
[data-bs-theme="dark"] .dashboard-command-hero,
[data-bs-theme="dark"] .dashboard-panel,
[data-bs-theme="dark"] .dashboard-command-card {
    background: var(--surface-bg) !important;
    border-color: var(--surface-border) !important;
}

[data-bs-theme="dark"] .dashboard-command-hero {
    background:
        radial-gradient(circle at 12% 18%, rgba(56, 213, 255, 0.16), transparent 17rem),
        radial-gradient(circle at 86% 16%, rgba(20, 119, 255, 0.2), transparent 18rem),
        linear-gradient(135deg, rgba(15, 30, 46, 0.92), rgba(7, 17, 31, 0.86)) !important;
}

[data-bs-theme="dark"] .login-orbit-panel {
    background:
        radial-gradient(circle at 30% 28%, rgba(56, 213, 255, 0.22), transparent 15rem),
        radial-gradient(circle at 76% 70%, rgba(20, 119, 255, 0.24), transparent 18rem),
        linear-gradient(145deg, rgba(7, 17, 31, 0.98), rgba(13, 27, 42, 0.94));
}

[data-bs-theme="dark"] .login-form-heading h2,
[data-bs-theme="dark"] .dashboard-command-copy h1,
[data-bs-theme="dark"] .dashboard-command-meta strong,
[data-bs-theme="dark"] .dashboard-section-title {
    color: var(--heading-text);
}

[data-bs-theme="dark"] .dashboard-command-meta span,
[data-bs-theme="dark"] .dashboard-empty {
    background: var(--surface-bg-soft);
    border-color: var(--surface-border);
}

[data-bs-theme="dark"] .dashboard-status-success {
    color: #4ADE80;
}

[data-bs-theme="dark"] .dashboard-status-warning {
    color: #FDBA74;
}

[data-bs-theme="dark"] .dashboard-status-danger {
    color: #FCA5A5;
}

[data-bs-theme="dark"] .dashboard-kpi-icon-muted,
[data-bs-theme="dark"] .dashboard-chart-track {
    background: rgba(56, 213, 255, 0.08);
    border-color: var(--surface-border);
}

[data-bs-theme="dark"] .dashboard-work-item {
    border-color: var(--surface-border);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--page-text, #f5f5f7);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: rgba(245, 245, 247, 0.48);
}

[data-bs-theme="dark"] .notification-settings-panel,
[data-bs-theme="dark"] .description-box,
[data-bs-theme="dark"] .preview-box,
[data-bs-theme="dark"] .upload-zone,
[data-bs-theme="dark"] .breadcrumb-box,
[data-bs-theme="dark"] .action-panel,
[data-bs-theme="dark"] .document-thumb,
[data-bs-theme="dark"] .document-file-icon,
[data-bs-theme="dark"] .intervention-photo-card,
[data-bs-theme="dark"] .intervention-file-preview,
[data-bs-theme="dark"] .sidebar-control-button,
[data-bs-theme="dark"] .guest-theme-toggle,
[data-bs-theme="dark"] .back-to-top {
    background: var(--surface-bg-soft);
    border-color: var(--surface-border);
    color: var(--page-text, #f5f5f7);
}

[data-bs-theme="dark"] .alert {
    background: var(--surface-bg);
    border-color: var(--surface-border);
    color: var(--page-text, #f5f5f7);
}

[data-bs-theme="dark"] .asset-picker-selected {
    background: var(--accent-soft);
    border-color: rgba(56, 213, 255, 0.28);
    color: var(--heading-text, #ffffff);
}

[data-bs-theme="dark"] .asset-picker-selected.is-empty {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--muted-text, #a1a1a6);
}

[data-bs-theme="dark"] .asset-picker-list,
[data-bs-theme="dark"] .asset-picker-item,
[data-bs-theme="dark"] .photo-preview-item {
    background: var(--surface-bg-soft);
    border-color: var(--surface-border);
}

[data-bs-theme="dark"] .asset-picker-item:hover,
[data-bs-theme="dark"] .asset-picker-item:focus-visible,
[data-bs-theme="dark"] .asset-picker-item.active {
    background: rgba(10, 132, 255, 0.18);
    border-color: rgba(10, 132, 255, 0.34);
}

[data-bs-theme="dark"] .quick-mode-card,
[data-bs-theme="dark"] .quick-duration-pill span {
    background: rgba(36, 36, 38, 0.88);
    border-color: rgba(255, 255, 255, 0.13);
}

[data-bs-theme="dark"] .quick-mode-card.active,
[data-bs-theme="dark"] .quick-duration-pill input:checked + span {
    background: rgba(10, 132, 255, 0.18);
    border-color: rgba(10, 132, 255, 0.34);
    color: var(--heading-text, #ffffff);
}

[data-bs-theme="dark"] .quick-submit-bar {
    background: linear-gradient(180deg, rgba(16, 16, 20, 0), var(--page-bg, #101014) 28%);
}

[data-bs-theme="dark"] .admin-hub-hero,
[data-bs-theme="dark"] .admin-module-card,
[data-bs-theme="dark"] .admin-summary-strip > div,
[data-bs-theme="dark"] .admin-health-grid > div {
    background: rgba(28, 28, 30, 0.88);
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .admin-hub-title,
[data-bs-theme="dark"] .admin-module-card h3,
[data-bs-theme="dark"] .admin-module-value,
[data-bs-theme="dark"] .admin-summary-strip strong,
[data-bs-theme="dark"] .admin-health-grid strong {
    color: var(--heading-text, #ffffff);
}

[data-bs-theme="dark"] .admin-status-banner {
    background: rgba(48, 209, 88, 0.1);
    border-color: rgba(48, 209, 88, 0.18);
    color: #30d158;
}

[data-bs-theme="dark"] .admin-detail-link {
    color: #64d2ff;
}

[data-bs-theme="dark"] .admin-hub-version,
[data-bs-theme="dark"] .admin-module-icon {
    background: rgba(10, 132, 255, 0.16);
    border-color: rgba(10, 132, 255, 0.28);
    color: #64d2ff;
}

[data-bs-theme="dark"] .admin-hub-kicker {
    color: #64d2ff;
}

[data-bs-theme="dark"] .admin-module-badge-success {
    color: #30d158;
    background: rgba(48, 209, 88, 0.14);
}

[data-bs-theme="dark"] .admin-module-badge-warning {
    color: #ffd60a;
    background: rgba(255, 214, 10, 0.14);
}

[data-bs-theme="dark"] .admin-module-badge-danger {
    color: #ff6961;
    background: rgba(255, 105, 97, 0.14);
}

[data-bs-theme="dark"] .admin-module-badge-primary {
    color: #64d2ff;
    background: rgba(10, 132, 255, 0.16);
}

[data-bs-theme="dark"] .admin-module-badge-secondary {
    color: #c7c7cc;
    background: rgba(199, 199, 204, 0.12);
}

[data-bs-theme="dark"] .admin-clean-list li {
    border-color: rgba(255, 214, 10, 0.2);
    background: rgba(255, 214, 10, 0.1);
}

[data-bs-theme="dark"] .user-admin-card,
[data-bs-theme="dark"] .user-action-panel,
[data-bs-theme="dark"] .role-manage-panel,
[data-bs-theme="dark"] .notification-sound-choice,
[data-bs-theme="dark"] .role-create-card,
[data-bs-theme="dark"] .role-summary-card,
[data-bs-theme="dark"] .permission-group-card,
[data-bs-theme="dark"] .admin-alert-card {
    background: rgba(28, 28, 30, 0.88);
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

[data-bs-theme="dark"] .user-avatar {
    background: rgba(10, 132, 255, 0.16);
    color: #64d2ff;
}

[data-bs-theme="dark"] .user-action-details summary,
[data-bs-theme="dark"] .role-manage-details summary {
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--page-text, #f5f5f7);
}

[data-bs-theme="dark"] .permission-group-card h6 {
    color: var(--heading-text, #ffffff);
}

[data-bs-theme="dark"] .sensitive-list span {
    background: rgba(255, 105, 97, 0.14);
    color: #ff6961;
}

[data-bs-theme="dark"] .permission-check.is-sensitive span::after {
    color: #ff6961;
}

[data-bs-theme="dark"] .admin-alert-card-danger {
    border-color: rgba(255, 105, 97, 0.22);
    background: rgba(255, 105, 97, 0.1);
}

[data-bs-theme="dark"] .admin-alert-card-warning {
    border-color: rgba(255, 214, 10, 0.2);
    background: rgba(255, 214, 10, 0.1);
}

[data-bs-theme="dark"] .admin-alert-card-info {
    border-color: rgba(10, 132, 255, 0.22);
    background: rgba(10, 132, 255, 0.1);
}

[data-bs-theme="dark"] .sidebar-user {
    background: rgba(255, 255, 255, 0.08);
    color: var(--page-text, #f5f5f7);
}

[data-bs-theme="dark"] .sidebar-user-name {
    color: var(--heading-text, #ffffff) !important;
}

[data-bs-theme="dark"] .sidebar-user .btn-outline-light {
    --bs-btn-color: var(--page-text, #f5f5f7);
    --bs-btn-border-color: rgba(255, 255, 255, 0.18);
    --bs-btn-hover-bg: rgba(255, 255, 255, 0.1);
    --bs-btn-hover-color: var(--page-text, #f5f5f7);
}

[data-bs-theme="dark"] .app-footer,
[data-bs-theme="dark"] .app-footer-title {
    color: var(--page-text, #f5f5f7);
}

[data-bs-theme="dark"] .app-footer-links a,
[data-bs-theme="dark"] .pwa-install-button {
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--muted-text, #a1a1a6);
}

[data-bs-theme="dark"] code {
    color: #9ad1ff;
}

@media (max-width: 991.98px) {
    .sidebar-controls {
        margin-left: auto;
    }

    .app-footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .app-footer-links {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .app-footer-links a,
    .pwa-install-button {
        text-align: center;
        width: 100%;
    }

    .back-to-top {
        bottom: 0.85rem;
        right: 0.85rem;
    }
}

/* Antarionix V1.4 phase 3: interventions and mobile field workflow. */
.intervention-page {
    display: grid;
    gap: 1.25rem;
}

.intervention-command-hero,
.intervention-detail-hero,
.quick-command-hero {
    align-items: center;
    background:
        radial-gradient(circle at 12% 20%, rgba(56, 213, 255, 0.16), transparent 16rem),
        radial-gradient(circle at 88% 14%, rgba(20, 119, 255, 0.17), transparent 18rem),
        linear-gradient(135deg, var(--surface-bg), var(--surface-bg-soft));
    border: 1px solid var(--surface-border);
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(1.1rem, 3vw, 1.8rem);
    position: relative;
}

.intervention-command-hero::before,
.intervention-detail-hero::before,
.quick-command-hero::before {
    background:
        linear-gradient(var(--antarionix-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--antarionix-grid) 1px, transparent 1px);
    background-size: 34px 34px;
    content: "";
    inset: 0;
    mask-image: radial-gradient(circle at 18% 30%, black, transparent 72%);
    pointer-events: none;
    position: absolute;
}

.intervention-command-copy,
.intervention-detail-copy,
.quick-command-hero > div,
.intervention-command-actions,
.intervention-detail-actions,
.quick-command-hero > a {
    position: relative;
    z-index: 1;
}

.intervention-command-copy h1,
.intervention-detail-copy h1,
.quick-command-hero h1 {
    color: var(--heading-text);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 850;
    line-height: 1;
    margin: 0;
}

.intervention-command-actions,
.intervention-detail-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.intervention-metric-card {
    overflow: hidden;
    position: relative;
}

.intervention-metric-card::after {
    background: linear-gradient(180deg, var(--antarionix-cyan), transparent);
    content: "";
    inset: 0 auto 0 0;
    opacity: 0.72;
    position: absolute;
    width: 4px;
}

.intervention-filter-card .card-header,
.intervention-list-panel .card-header,
.intervention-info-card .card-header,
.intervention-history-card .card-header,
.intervention-files-card .card-header,
.intervention-side-card .card-header,
.intervention-form-card .card-header,
.quick-field-card .card-header {
    min-height: 60px;
}

.intervention-filter-card .form-label {
    color: var(--muted-text);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.intervention-list-panel {
    overflow: hidden;
}

.intervention-table {
    --bs-table-hover-bg: var(--accent-soft);
}

.intervention-table thead th {
    color: var(--muted-text);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.intervention-table td {
    border-color: var(--surface-border);
}

.intervention-number {
    color: var(--accent);
    text-decoration: none;
}

.intervention-number:hover {
    color: var(--accent-strong);
}

.intervention-target-ref,
.intervention-section-title {
    color: var(--heading-text);
}

.intervention-row-actions {
    justify-content: flex-end;
}

.intervention-detail-hero {
    align-items: flex-start;
}

.intervention-detail-copy h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

.intervention-alert {
    border-radius: 18px;
}

.intervention-info-grid .info-label,
.info-label {
    color: var(--muted-text);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.intervention-info-grid .info-value,
.info-value {
    color: var(--page-text);
    font-weight: 650;
}

.intervention-timeline-card {
    background:
        linear-gradient(135deg, var(--surface-bg), var(--surface-bg-soft)) !important;
    border: 1px solid var(--surface-border) !important;
}

.timeline-item {
    position: relative;
}

.timeline-item + .timeline-item {
    margin-top: 0.9rem;
}

.timeline-comment {
    color: var(--page-text);
    line-height: 1.55;
}

.intervention-side-card {
    position: relative;
}

#intervention-action-form,
#intervention-closure {
    scroll-margin-top: calc(5rem + env(safe-area-inset-top, 0px));
}

.intervention-side-card::before {
    background: linear-gradient(90deg, var(--antarionix-blue), var(--antarionix-cyan));
    border-radius: 999px;
    content: "";
    height: 3px;
    left: 1rem;
    position: absolute;
    right: 1rem;
    top: 0.65rem;
}

.intervention-form-card,
.quick-field-card {
    border-radius: 22px !important;
}

.quick-mode-grid-command {
    margin-top: 0.25rem;
}

.quick-mode-card {
    border-radius: 24px;
    min-height: 176px;
    overflow: hidden;
    position: relative;
}

.quick-mode-card::after {
    background: linear-gradient(180deg, var(--antarionix-cyan), transparent);
    content: "";
    inset: 0 auto 0 0;
    opacity: 0.55;
    position: absolute;
    width: 4px;
}

.quick-mode-card.active {
    box-shadow: var(--shadow-hover);
}

.quick-mode-card strong {
    font-size: 1.12rem;
}

.quick-mode-card small {
    line-height: 1.45;
}

.quick-duration-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-duration-pill span {
    align-items: center;
    display: inline-flex;
    font-size: 1rem;
    justify-content: center;
    min-height: 52px;
    width: 100%;
}

.quick-submit-bar {
    border-radius: 22px 22px 0 0;
}

.mobile-photo-action {
    min-height: 48px;
}

@media (max-width: 991.98px) {
    .intervention-command-hero,
    .intervention-detail-hero,
    .quick-command-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .intervention-command-actions,
    .intervention-detail-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .intervention-detail-page {
        min-height: 100%;
        overflow: visible;
        padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    }

    .intervention-side-card {
        scroll-margin-top: calc(5rem + env(safe-area-inset-top, 0px));
    }

    .intervention-command-hero,
    .intervention-detail-hero,
    .quick-command-hero {
        border-radius: 22px;
        padding: 1rem;
    }

    .intervention-command-copy h1,
    .intervention-detail-copy h1,
    .quick-command-hero h1 {
        font-size: clamp(1.9rem, 11vw, 2.65rem);
    }

    .intervention-list-panel .table-responsive {
        overflow: visible;
    }

    .intervention-table,
    .intervention-table tbody,
    .intervention-table tr,
    .intervention-table td {
        display: block;
        width: 100%;
    }

    .intervention-table thead {
        display: none;
    }

    .intervention-table tr {
        background: var(--surface-bg);
        border: 1px solid var(--surface-border);
        border-radius: 18px;
        box-shadow: 0 12px 28px rgba(13, 27, 42, 0.07);
        margin: 0.75rem;
        padding: 0.75rem;
    }

    .intervention-table td {
        align-items: flex-start;
        border: 0;
        display: flex;
        gap: 1rem;
        justify-content: space-between;
        padding: 0.45rem 0;
        text-align: right;
    }

    .intervention-table td::before {
        color: var(--muted-text);
        content: attr(data-label);
        flex: 0 0 7.5rem;
        font-size: 0.74rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-align: left;
        text-transform: uppercase;
    }

    .intervention-table td[data-label="Numero"],
    .intervention-table td[data-label="Actions"] {
        display: block;
        text-align: left;
    }

    .intervention-table td[data-label="Numero"]::before,
    .intervention-table td[data-label="Actions"]::before {
        display: none;
    }

    .intervention-row-actions,
    .intervention-row-actions .btn,
    .intervention-row-actions form,
    .intervention-row-actions form .btn {
        width: 100%;
    }

    .intervention-row-actions {
        display: grid;
        gap: 0.45rem;
    }

    .quick-mode-grid {
        grid-template-columns: 1fr;
    }

    .quick-form-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .quick-change-mode {
        width: 100%;
    }

    .quick-duration-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

[data-bs-theme="dark"] .intervention-command-hero,
[data-bs-theme="dark"] .intervention-detail-hero,
[data-bs-theme="dark"] .quick-command-hero,
[data-bs-theme="dark"] .intervention-timeline-card {
    background:
        radial-gradient(circle at 12% 20%, rgba(56, 213, 255, 0.14), transparent 16rem),
        radial-gradient(circle at 88% 14%, rgba(20, 119, 255, 0.18), transparent 18rem),
        linear-gradient(135deg, rgba(15, 30, 46, 0.92), rgba(7, 17, 31, 0.86)) !important;
    border-color: var(--surface-border) !important;
}

[data-bs-theme="dark"] .intervention-table tr {
    background: var(--surface-bg);
}

[data-bs-theme="dark"] .quick-field-card,
[data-bs-theme="dark"] .intervention-form-card {
    background: var(--surface-bg) !important;
    border-color: var(--surface-border) !important;
}

/* Antarionix V1.4 phase 4: parc technique, equipments and preventive plans. */
.asset-command-page {
    display: grid;
    gap: 1.25rem;
}

.asset-command-hero {
    align-items: center;
    background:
        radial-gradient(circle at 12% 18%, rgba(56, 213, 255, 0.15), transparent 16rem),
        radial-gradient(circle at 88% 14%, rgba(20, 119, 255, 0.16), transparent 18rem),
        linear-gradient(135deg, var(--surface-bg), var(--surface-bg-soft));
    border: 1px solid var(--surface-border);
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(1.1rem, 3vw, 1.8rem);
    position: relative;
}

.asset-command-hero::before {
    background:
        linear-gradient(var(--antarionix-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--antarionix-grid) 1px, transparent 1px);
    background-size: 34px 34px;
    content: "";
    inset: 0;
    mask-image: radial-gradient(circle at 18% 30%, black, transparent 72%);
    pointer-events: none;
    position: absolute;
}

.asset-command-copy,
.asset-command-actions {
    position: relative;
    z-index: 1;
}

.asset-command-copy h1 {
    color: var(--heading-text);
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 850;
    line-height: 1;
    margin: 0;
}

.asset-command-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.asset-metric-card {
    overflow: hidden;
    position: relative;
}

.asset-metric-card::after {
    background: linear-gradient(180deg, var(--antarionix-cyan), transparent);
    content: "";
    inset: 0 auto 0 0;
    opacity: 0.7;
    position: absolute;
    width: 4px;
}

.metric-card-accent-primary::after {
    background: linear-gradient(180deg, var(--antarionix-blue), transparent);
}

.metric-card-accent-warning::after {
    background: linear-gradient(180deg, var(--antarionix-orange), transparent);
}

.metric-card-accent-danger::after {
    background: linear-gradient(180deg, #ff4d4f, transparent);
}

.metric-card-accent-success::after {
    background: linear-gradient(180deg, #30d158, transparent);
}

.metric-card-accent-muted::after {
    background: linear-gradient(180deg, var(--antarionix-steel), transparent);
}

.asset-filter-card,
.asset-list-panel,
.asset-detail-card,
.asset-document-card,
.asset-form-card,
.equipment-group-card,
.preventive-state-card {
    border-color: var(--surface-border) !important;
    border-radius: 22px !important;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.asset-filter-card .card-header,
.asset-list-panel .card-header,
.asset-detail-card .card-header,
.asset-document-card .card-header,
.asset-form-card .card-header,
.equipment-group-card .card-header,
.preventive-state-card .card-header {
    min-height: 58px;
}

.asset-filter-card .form-label,
.asset-form-card .form-label {
    color: var(--muted-text);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.asset-table {
    --bs-table-hover-bg: var(--accent-soft);
}

.asset-table thead th {
    color: var(--muted-text);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.asset-table td {
    border-color: var(--surface-border);
    vertical-align: middle;
}

.asset-table .action-toolbar {
    flex-wrap: wrap;
}

.asset-reference,
.asset-name,
.equipment-group-title,
.preventive-due-date {
    color: var(--heading-text);
}

.equipment-group-card {
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.equipment-group-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.equipment-group-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.equipment-table-wrap {
    border-top: 1px solid var(--surface-border);
}

.preventive-frequency-badge {
    background: var(--surface-bg-soft) !important;
    color: var(--page-text) !important;
}

.preventive-status-alert {
    border-radius: 20px;
}

.preventive-view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preventive-domain-badge {
    border: 1px solid transparent;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
}

.preventive-domain-general {
    background: #eef2f7;
    border-color: #cbd5e1;
    color: #334155;
}

.preventive-domain-electrical {
    background: #fff7cc;
    border-color: #f4cf4f;
    color: #6f5100;
}

.preventive-domain-mechanical {
    background: #e8eef5;
    border-color: #9eafc2;
    color: #27394d;
}

.preventive-domain-automation {
    background: #e8e5ff;
    border-color: #aaa1ee;
    color: #42378c;
}

.preventive-domain-pneumatic {
    background: #e2f7ff;
    border-color: #84cbe5;
    color: #155c76;
}

.preventive-domain-hydraulic {
    background: #e5efff;
    border-color: #8bb3ef;
    color: #174f9e;
}

.preventive-domain-building {
    background: #f5ebe0;
    border-color: #d8b894;
    color: #704821;
}

.preventive-domain-safety {
    background: #ffe8e8;
    border-color: #e99b9b;
    color: #8c2525;
}

.preventive-outcome-options {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preventive-outcome-option {
    align-items: flex-start;
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
}

.preventive-outcome-option:has(input:checked) {
    border-color: var(--antarionix-blue);
    box-shadow: 0 0 0 3px rgba(20, 103, 255, 0.12);
}

.preventive-outcome-option input {
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

.preventive-outcome-option span,
.preventive-outcome-option small {
    display: block;
}

.preventive-outcome-option small {
    color: var(--muted-text);
    margin-top: 0.25rem;
}

.preventive-blocked-fields,
.preventive-blocked-reason {
    border-color: rgba(220, 53, 69, 0.38) !important;
}

.preventive-blocked-reason {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid;
    border-radius: 14px;
    padding: 1rem;
}

.preventive-follow-up-option {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 0.9rem 0.9rem 0.9rem 2.5rem;
}

.preventive-selected-files {
    display: grid;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.preventive-selected-files li {
    align-items: center;
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-width: 0;
    padding: 0.7rem 0.85rem;
}

.preventive-selected-files strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.preventive-selected-files span {
    color: var(--muted-text);
    flex: 0 0 auto;
    font-size: 0.82rem;
}

.preventive-history-list {
    display: grid;
    gap: 1rem;
}

.preventive-history-entry {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-left: 5px solid #198754;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(13, 27, 42, 0.06);
    padding: 1rem;
}

.preventive-history-entry.preventive-outcome-blocked {
    border-left-color: #dc3545;
}

.preventive-history-entry-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding-bottom: 0.85rem;
}

.preventive-history-entry-body {
    display: grid;
    gap: 1rem;
    padding-top: 1rem;
}

.preventive-outcome-badge.preventive-outcome-completed {
    background: #d1e7dd;
    color: #0f5132;
}

.preventive-outcome-badge.preventive-outcome-blocked {
    background: #f8d7da;
    color: #842029;
}

.preventive-linked-intervention,
.preventive-origin-card {
    background: rgba(13, 110, 253, 0.06);
    border: 1px solid rgba(13, 110, 253, 0.2);
    border-radius: 14px;
    padding: 1rem;
}

.preventive-attachment-list {
    display: grid;
    gap: 0.65rem;
}

.preventive-attachment-item {
    align-items: center;
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.75rem;
}

.preventive-attachment-icon {
    align-items: center;
    background: var(--accent-soft);
    border-radius: 10px;
    color: var(--antarionix-blue);
    display: flex;
    font-size: 1.25rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.preventive-attachment-meta,
.preventive-attachment-name {
    min-width: 0;
}

.preventive-attachment-name {
    display: block;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.preventive-attachment-meta small {
    color: var(--muted-text);
    display: block;
    margin-top: 0.2rem;
}

.preventive-attachment-actions {
    display: flex;
    gap: 0.4rem;
}

.dashboard-chart-bar-danger {
    background: linear-gradient(90deg, #ff7b86, #dc3545);
}

.document-table .document-thumb {
    border: 1px solid var(--surface-border);
    box-shadow: 0 10px 24px rgba(13, 27, 42, 0.08);
}

.asset-document-card .list-group-item {
    border-color: var(--surface-border);
}

@media (max-width: 991.98px) {
    .asset-command-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .asset-command-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .asset-command-hero {
        border-radius: 22px;
        padding: 1rem;
    }

    .asset-command-copy h1 {
        font-size: clamp(1.9rem, 10vw, 2.65rem);
    }

    .asset-list-panel .table-responsive {
        overflow: visible;
    }

    .asset-responsive-table,
    .asset-responsive-table tbody,
    .asset-responsive-table tr,
    .asset-responsive-table td {
        display: block;
        width: 100%;
    }

    .asset-responsive-table thead {
        display: none;
    }

    .asset-responsive-table tr {
        background: var(--surface-bg);
        border: 1px solid var(--surface-border);
        border-radius: 18px;
        box-shadow: 0 12px 28px rgba(13, 27, 42, 0.07);
        margin: 0.75rem;
        padding: 0.75rem;
    }

    .asset-responsive-table td {
        align-items: flex-start;
        border: 0;
        display: flex;
        gap: 1rem;
        justify-content: space-between;
        padding: 0.45rem 0;
        text-align: right;
    }

    .asset-responsive-table td::before {
        color: var(--muted-text);
        content: attr(data-label);
        flex: 0 0 7.5rem;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-align: left;
        text-transform: uppercase;
    }

    .asset-responsive-table td[data-label="Actions"],
    .asset-responsive-table td[data-label="Action"] {
        display: block;
        text-align: left;
    }

    .asset-responsive-table td[data-label="Actions"]::before,
    .asset-responsive-table td[data-label="Action"]::before {
        display: none;
    }

    .asset-responsive-table .action-toolbar,
    .asset-responsive-table .action-toolbar .btn,
    .asset-responsive-table .action-toolbar form,
    .asset-responsive-table .action-toolbar form .btn {
        width: 100%;
    }

    .asset-responsive-table .action-toolbar {
        display: grid;
        gap: 0.45rem;
    }

    .preventive-outcome-options {
        grid-template-columns: 1fr;
    }

    .preventive-history-entry-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .preventive-attachment-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .preventive-attachment-actions {
        grid-column: 1 / -1;
    }

    .preventive-attachment-actions,
    .preventive-attachment-actions .btn,
    .preventive-attachment-actions form {
        width: 100%;
    }

    .preventive-selected-files li {
        align-items: flex-start;
        flex-direction: column;
    }
}

[data-bs-theme="dark"] .asset-command-hero {
    background:
        radial-gradient(circle at 12% 18%, rgba(56, 213, 255, 0.14), transparent 16rem),
        radial-gradient(circle at 88% 14%, rgba(20, 119, 255, 0.18), transparent 18rem),
        linear-gradient(135deg, rgba(15, 30, 46, 0.92), rgba(7, 17, 31, 0.86)) !important;
    border-color: var(--surface-border) !important;
}

[data-bs-theme="dark"] .asset-filter-card,
[data-bs-theme="dark"] .asset-list-panel,
[data-bs-theme="dark"] .asset-detail-card,
[data-bs-theme="dark"] .asset-document-card,
[data-bs-theme="dark"] .asset-form-card,
[data-bs-theme="dark"] .equipment-group-card,
[data-bs-theme="dark"] .preventive-state-card {
    background: var(--surface-bg) !important;
    border-color: var(--surface-border) !important;
}

[data-bs-theme="dark"] .asset-responsive-table tr {
    background: var(--surface-bg);
}

[data-bs-theme="dark"] .preventive-frequency-badge {
    background: rgba(56, 213, 255, 0.08) !important;
    border-color: var(--surface-border) !important;
    color: var(--page-text) !important;
}

/* Antarionix V1.4 phase 5: administration, users, devblog and roadmap. */
.admin-control-page,
.users-control-page,
.devblog-control-page {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
}

[data-bs-theme="dark"] .preventive-outcome-option,
[data-bs-theme="dark"] .preventive-follow-up-option,
[data-bs-theme="dark"] .preventive-selected-files li,
[data-bs-theme="dark"] .preventive-history-entry,
[data-bs-theme="dark"] .preventive-attachment-item {
    background: var(--surface-bg-soft);
    border-color: var(--surface-border);
}

[data-bs-theme="dark"] .preventive-domain-badge {
    background: rgba(56, 213, 255, 0.1);
    border-color: rgba(148, 193, 231, 0.42);
    color: #edf7ff;
}

[data-bs-theme="dark"] .preventive-outcome-badge.preventive-outcome-completed {
    background: rgba(25, 135, 84, 0.28);
    color: #a8e4c3;
}

[data-bs-theme="dark"] .preventive-outcome-badge.preventive-outcome-blocked {
    background: rgba(220, 53, 69, 0.28);
    color: #ffb3bb;
}

[data-bs-theme="dark"] .preventive-blocked-reason {
    background: rgba(220, 53, 69, 0.12);
}

[data-bs-theme="dark"] .preventive-linked-intervention,
[data-bs-theme="dark"] .preventive-origin-card {
    background: rgba(13, 110, 253, 0.12);
    border-color: rgba(90, 154, 255, 0.3);
}

.admin-control-page > *,
.users-control-page > *,
.devblog-control-page > * {
    max-width: 100%;
    min-width: 0;
}

.admin-control-hero {
    align-items: center;
    background:
        radial-gradient(circle at 12% 18%, rgba(56, 213, 255, 0.15), transparent 16rem),
        radial-gradient(circle at 88% 14%, rgba(20, 119, 255, 0.16), transparent 18rem),
        linear-gradient(135deg, var(--surface-bg), var(--surface-bg-soft));
    border: 1px solid var(--surface-border);
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(1.1rem, 3vw, 1.8rem);
    position: relative;
}

.admin-control-hero::before {
    background:
        linear-gradient(var(--antarionix-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--antarionix-grid) 1px, transparent 1px);
    background-size: 34px 34px;
    content: "";
    inset: 0;
    mask-image: radial-gradient(circle at 18% 30%, black, transparent 72%);
    pointer-events: none;
    position: absolute;
}

.admin-control-copy,
.admin-control-actions,
.admin-control-hero > a {
    max-width: 100%;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.admin-control-copy {
    overflow-wrap: anywhere;
}

.admin-control-copy h1 {
    color: var(--heading-text);
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 850;
    line-height: 1;
    margin: 0;
}

.admin-control-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.admin-control-page .app-card,
.users-control-page .app-card,
.devblog-control-page .app-card,
.user-form-card {
    border-color: var(--surface-border) !important;
    border-radius: 22px !important;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.admin-control-page .card-header,
.users-control-page .card-header,
.devblog-control-page .card-header {
    min-height: 58px;
}

.admin-hub-hero,
.admin-module-card,
.admin-summary-strip > div,
.admin-health-grid > div,
.user-admin-card,
.role-summary-card,
.permission-group-card,
.admin-alert-card,
.role-create-card {
    border-color: var(--surface-border) !important;
    box-shadow: 0 12px 30px rgba(13, 27, 42, 0.06);
}

.admin-hub-hero {
    background:
        radial-gradient(circle at 12% 20%, rgba(56, 213, 255, 0.13), transparent 16rem),
        linear-gradient(135deg, var(--surface-bg), var(--surface-bg-soft));
}

.admin-module-card {
    position: relative;
}

.admin-module-card::after {
    background: linear-gradient(180deg, var(--antarionix-cyan), transparent);
    content: "";
    inset: 0 auto 0 0;
    opacity: 0.68;
    position: absolute;
    width: 4px;
}

.admin-module-card-warning::after {
    background: linear-gradient(180deg, var(--antarionix-orange), transparent);
}

.admin-module-card-danger::after {
    background: linear-gradient(180deg, #ff4d4f, transparent);
}

.admin-status-banner {
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.admin-health-grid > div,
.admin-summary-strip > div {
    background: linear-gradient(135deg, var(--surface-bg), var(--surface-bg-soft));
}

.comment-highlight .intervention-timeline-card {
    border: 2px solid rgba(25, 135, 84, 0.55) !important;
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.12) !important;
}

.admin-health-overview {
    display: grid;
}

.admin-zone-list {
    display: grid;
    gap: 1rem;
}

.admin-zone-section {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(13, 27, 42, 0.05);
    display: grid;
    gap: 0.9rem;
    padding: clamp(0.85rem, 2vw, 1rem);
}

.admin-zone-header {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.admin-zone-kicker {
    color: var(--accent);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 850;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.admin-zone-header h2 {
    color: var(--heading-text);
    font-size: 1.05rem;
    font-weight: 850;
    margin: 0;
}

.admin-zone-header p {
    color: var(--muted-text);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0.25rem 0 0;
}

.admin-zone-alert {
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.28rem 0.58rem;
}

.admin-zone-alert-warning {
    background: rgba(255, 193, 7, 0.18);
    color: #997404;
}

.admin-zone-alert-danger {
    background: rgba(220, 53, 69, 0.13);
    color: #b02a37;
}

.admin-module-badges {
    align-items: flex-end;
    display: grid;
    gap: 0.25rem;
    justify-items: end;
}

.admin-module-level {
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
    padding: 0.22rem 0.45rem;
}

.admin-module-level-current {
    background: rgba(25, 135, 84, 0.1);
    color: #146c43;
}

.admin-module-level-advanced {
    background: rgba(108, 117, 125, 0.14);
    color: #41464b;
}

.admin-module-card-advanced {
    background:
        linear-gradient(135deg, rgba(108, 117, 125, 0.05), rgba(255, 255, 255, 0.9)),
        var(--surface-bg);
}

.advanced-page-summary {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.advanced-summary-card {
    background: linear-gradient(135deg, var(--surface-bg), var(--surface-bg-soft));
    border: 1px solid var(--surface-border);
    border-left: 4px solid var(--accent);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(13, 27, 42, 0.05);
    padding: 0.9rem 1rem;
}

.advanced-summary-card span {
    color: var(--muted-text);
    display: block;
    font-size: 0.72rem;
    font-weight: 850;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.advanced-summary-card strong {
    color: var(--heading-text);
    display: block;
    font-size: 1.05rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.advanced-summary-card p {
    color: var(--muted-text);
    font-size: 0.88rem;
    line-height: 1.4;
    margin: 0.35rem 0 0;
}

.advanced-summary-card-success {
    border-left-color: #198754;
}

.advanced-summary-card-warning {
    border-left-color: #ffc107;
}

.advanced-summary-card-danger {
    border-left-color: #dc3545;
}

.advanced-summary-card-info,
.advanced-summary-card-primary {
    border-left-color: var(--accent);
}

.advanced-alert-panel,
.advanced-process-card {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(13, 27, 42, 0.05);
    display: grid;
    gap: 0.9rem;
    min-width: 0;
    padding: 1rem;
}

.advanced-alert-panel > *,
.advanced-process-card > * {
    max-width: 100%;
    min-width: 0;
}

.advanced-section-heading span {
    color: var(--accent);
    display: block;
    font-size: 0.72rem;
    font-weight: 850;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.advanced-section-heading h2 {
    color: var(--heading-text);
    font-size: 1.08rem;
    font-weight: 850;
    margin: 0;
}

.advanced-section-heading p {
    color: var(--muted-text);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.advanced-alert-list {
    display: grid;
    gap: 0.6rem;
}

.advanced-alert-item {
    border: 1px solid rgba(255, 193, 7, 0.25);
    border-left: 4px solid #ffc107;
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
}

.advanced-alert-item-critical {
    border-color: rgba(220, 53, 69, 0.25);
    border-left-color: #dc3545;
}

.advanced-alert-item strong,
.advanced-alert-item span {
    display: block;
}

.advanced-alert-item strong {
    color: var(--heading-text);
    font-size: 0.95rem;
}

.advanced-alert-item span {
    color: var(--muted-text);
    font-size: 0.78rem;
    font-weight: 750;
    margin-top: 0.15rem;
    text-transform: uppercase;
}

.advanced-alert-item p {
    color: var(--page-text);
    font-size: 0.9rem;
    margin: 0.35rem 0 0;
}

.advanced-step-list {
    counter-reset: advanced-step;
    display: grid;
    gap: 0.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.advanced-step-list li {
    align-items: flex-start;
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    display: grid;
    gap: 0.15rem;
    grid-template-columns: auto 1fr;
    padding: 0.72rem 0.85rem;
}

.advanced-step-list li::before {
    align-items: center;
    background: var(--accent-soft);
    border-radius: 999px;
    color: var(--accent);
    content: counter(advanced-step);
    counter-increment: advanced-step;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 850;
    height: 1.55rem;
    justify-content: center;
    margin-right: 0.55rem;
    width: 1.55rem;
}

.advanced-step-list strong {
    color: var(--heading-text);
    font-size: 0.93rem;
}

.advanced-step-list span {
    color: var(--muted-text);
    font-size: 0.86rem;
    grid-column: 2;
}

.advanced-info-columns {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.advanced-info-columns > div {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 0.85rem;
}

.advanced-info-columns h3 {
    color: var(--heading-text);
    font-size: 0.95rem;
    font-weight: 850;
    margin: 0 0 0.45rem;
}

.advanced-info-columns ul {
    margin: 0;
    padding-left: 1.1rem;
}

.advanced-info-columns li {
    color: var(--muted-text);
    font-size: 0.9rem;
    margin: 0.2rem 0;
}

.advanced-detail-card {
    opacity: 0.98;
}

.advanced-action-card {
    border-color: rgba(20, 119, 255, 0.22) !important;
}

.advanced-technical-block {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 0.85rem;
}

.admin-clean-list li,
.admin-alert-card,
.notification-settings-panel {
    border-radius: 16px;
}

.users-list {
    gap: 0.9rem;
}

.user-admin-card {
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 213, 255, 0.08), transparent 13rem),
        var(--surface-bg);
    border-radius: 20px;
}

.user-avatar {
    box-shadow: inset 0 0 0 1px rgba(56, 213, 255, 0.18);
}

.role-card-grid {
    gap: 1rem;
}

.role-summary-card,
.permission-group-card,
.role-create-card,
.user-action-panel,
.role-manage-panel {
    background: var(--surface-bg-soft);
}

.permission-group-grid {
    gap: 0.9rem;
}

.permission-check span {
    line-height: 1.35;
}

.permission-check.is-sensitive span::after {
    color: var(--danger);
}

.user-form-card .form-label,
.admin-control-page .form-label,
.users-control-page .form-label {
    color: var(--muted-text);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.devblog-roadmap-card,
.devblog-filter-card,
.devblog-entry-card {
    background:
        radial-gradient(circle at 8% 0%, rgba(56, 213, 255, 0.08), transparent 15rem),
        var(--surface-bg) !important;
}

.roadmap-grid {
    gap: 1rem;
}

.roadmap-card {
    border-color: var(--surface-border);
    box-shadow: 0 12px 30px rgba(13, 27, 42, 0.06);
}

.roadmap-list {
    display: grid;
    gap: 0.55rem;
}

.roadmap-list li {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 0.55rem 0.65rem;
}

.devblog-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.devblog-entry-card {
    border-left: 4px solid var(--accent);
}

.devblog-details li {
    line-height: 1.5;
}

.admin-responsive-table {
    --bs-table-hover-bg: var(--accent-soft);
}

.admin-responsive-table thead th {
    color: var(--muted-text);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 991.98px) {
    .admin-control-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-control-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .admin-control-hero {
        border-radius: 22px;
        padding: 1rem;
    }

    .admin-pwa-page .advanced-page-summary,
    .admin-pwa-page .admin-health-grid {
        grid-template-columns: 1fr;
    }

    .admin-control-copy h1 {
        font-size: clamp(1.9rem, 10vw, 2.65rem);
    }

    .admin-responsive-table,
    .admin-responsive-table tbody,
    .admin-responsive-table tr,
    .admin-responsive-table td {
        display: block;
        width: 100%;
    }

    .admin-responsive-table thead {
        display: none;
    }

    .admin-responsive-table tr {
        background: var(--surface-bg);
        border: 1px solid var(--surface-border);
        border-radius: 18px;
        margin: 0.75rem;
        padding: 0.75rem;
    }

    .admin-responsive-table td {
        align-items: flex-start;
        border: 0;
        display: flex;
        gap: 1rem;
        justify-content: space-between;
        padding: 0.45rem 0;
        text-align: right;
    }

    .admin-responsive-table td::before {
        color: var(--muted-text);
        content: attr(data-label);
        flex: 0 0 7.5rem;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-align: left;
        text-transform: uppercase;
    }

    .admin-responsive-table td[data-label="Actions"] {
        display: block;
        text-align: left;
    }

    .admin-responsive-table td[data-label="Actions"]::before {
        display: none;
    }

    .admin-responsive-table .btn-group,
    .admin-responsive-table .btn-group .btn,
    .admin-responsive-table .btn-group form,
    .admin-responsive-table .btn-group form .btn {
        width: 100%;
    }

    .admin-responsive-table .btn-group {
        display: grid;
        gap: 0.45rem;
    }

    .admin-zone-header {
        display: grid;
    }

    .admin-zone-alert {
        justify-self: start;
        white-space: normal;
    }

    .advanced-alert-panel,
    .advanced-process-card {
        padding: 0.85rem;
    }

    .advanced-step-list li {
        grid-template-columns: 1fr;
    }

    .advanced-step-list li::before {
        margin-bottom: 0.2rem;
        margin-right: 0;
    }

    .advanced-step-list span {
        grid-column: 1;
    }
}

[data-bs-theme="dark"] .admin-control-hero {
    background:
        radial-gradient(circle at 12% 18%, rgba(56, 213, 255, 0.14), transparent 16rem),
        radial-gradient(circle at 88% 14%, rgba(20, 119, 255, 0.18), transparent 18rem),
        linear-gradient(135deg, rgba(15, 30, 46, 0.92), rgba(7, 17, 31, 0.86)) !important;
    border-color: var(--surface-border) !important;
}

[data-bs-theme="dark"] .admin-control-page .app-card,
[data-bs-theme="dark"] .users-control-page .app-card,
[data-bs-theme="dark"] .devblog-control-page .app-card,
[data-bs-theme="dark"] .user-form-card,
[data-bs-theme="dark"] .admin-hub-hero,
[data-bs-theme="dark"] .admin-module-card,
[data-bs-theme="dark"] .admin-zone-section,
[data-bs-theme="dark"] .advanced-summary-card,
[data-bs-theme="dark"] .advanced-alert-panel,
[data-bs-theme="dark"] .advanced-process-card,
[data-bs-theme="dark"] .advanced-step-list li,
[data-bs-theme="dark"] .advanced-info-columns > div,
[data-bs-theme="dark"] .advanced-technical-block,
[data-bs-theme="dark"] .admin-summary-strip > div,
[data-bs-theme="dark"] .admin-health-grid > div,
[data-bs-theme="dark"] .user-admin-card,
[data-bs-theme="dark"] .role-summary-card,
[data-bs-theme="dark"] .permission-group-card,
[data-bs-theme="dark"] .admin-alert-card,
[data-bs-theme="dark"] .role-create-card,
[data-bs-theme="dark"] .user-action-panel,
[data-bs-theme="dark"] .role-manage-panel,
[data-bs-theme="dark"] .role-danger-zone,
[data-bs-theme="dark"] .notification-sound-summary,
[data-bs-theme="dark"] .notification-sound-choice,
[data-bs-theme="dark"] .notification-sound-danger,
[data-bs-theme="dark"] .pwa-push-admin-status,
[data-bs-theme="dark"] .roadmap-card,
[data-bs-theme="dark"] .roadmap-list li {
    background: var(--surface-bg) !important;
    border-color: var(--surface-border) !important;
}

[data-bs-theme="dark"] .admin-module-card-advanced {
    background: var(--surface-bg) !important;
}

[data-bs-theme="dark"] .admin-module-level-advanced {
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted-text);
}

[data-bs-theme="dark"] .admin-module-level-current {
    background: rgba(50, 215, 75, 0.1);
    color: #7ee787;
}

[data-bs-theme="dark"] .admin-responsive-table tr {
    background: var(--surface-bg);
}

/* Antarionix V1.4 phase 6: final consistency, readability and accessibility. */
.btn,
.form-control,
.form-select {
    min-height: 2.5rem;
}

.btn {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
    justify-content: center;
}

.btn-sm {
    min-height: 2.1rem;
}

.btn-lg {
    min-height: 2.9rem;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.sidebar-link:focus-visible,
.mobile-menu-toggle:focus-visible,
.theme-toggle:focus-visible,
.sidebar-collapse-toggle:focus-visible,
.install-pwa-button:focus-visible,
.back-to-top:focus-visible,
.devblog-filter-card .btn:focus-visible {
    outline: 0;
    box-shadow: var(--focus-ring);
}

.clickable-row:focus-visible,
.clickable-card:focus-visible,
.roadmap-card:focus-within,
.devblog-entry-card:focus-within {
    outline: 3px solid color-mix(in srgb, var(--accent) 54%, transparent);
    outline-offset: 3px;
}

.badge {
    align-items: center;
    display: inline-flex;
    gap: 0.25rem;
    letter-spacing: 0.01em;
    min-height: 1.55rem;
}

.alert {
    border-color: color-mix(in srgb, currentColor 12%, var(--surface-border));
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(13, 27, 42, 0.06);
}

.table {
    --bs-table-border-color: var(--surface-border);
    color: var(--page-text);
}

.table thead th {
    background: var(--table-head-bg);
    color: var(--muted-text);
}

.dashboard-empty,
.asset-picker-empty,
.empty-state,
.machine-no-result {
    background: var(--surface-bg-soft);
    border: 1px dashed var(--surface-border);
    border-radius: 16px;
    color: var(--muted-text);
}

.action-toolbar {
    align-items: center;
    gap: 0.45rem;
}

.action-panel,
.row-action-panel,
.asset-row-actions {
    border-radius: 16px;
}

@media (max-width: 767.98px) {
    .btn,
    .form-control,
    .form-select {
        min-height: 2.75rem;
    }

    .btn-sm {
        min-height: 2.35rem;
    }

    .action-toolbar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .action-toolbar .btn,
    .action-toolbar form,
    .action-toolbar form .btn {
        min-width: 0;
    }

    .table-responsive {
        border-radius: 18px;
    }
}

[data-bs-theme="dark"] .alert {
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

/* V1.4 terrain fixes: mobile actions, compact tables and badge rhythm. */
.btn.mobile-only-action,
a.mobile-only-action,
button.mobile-only-action {
    display: none;
}

.badge,
.dashboard-status-pill {
    border-radius: 999px;
    line-height: 1.15;
    padding-block: 0.35rem;
    vertical-align: middle;
    white-space: nowrap;
}

.badge.bg-danger,
.badge.text-bg-danger {
    background-color: var(--danger) !important;
}

.badge.bg-warning,
.badge.text-bg-warning {
    background-color: var(--warning) !important;
    color: #111827 !important;
}

.badge.bg-success,
.badge.text-bg-success {
    background-color: var(--success) !important;
}

.badge.bg-primary,
.badge.text-bg-primary {
    background-color: var(--antarionix-blue) !important;
}

.badge.bg-secondary,
.badge.text-bg-secondary {
    background-color: var(--antarionix-steel) !important;
}

@media (max-width: 767.98px) {
    .btn.mobile-only-action,
    a.mobile-only-action,
    button.mobile-only-action {
        display: inline-flex;
    }

    .table-responsive {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }

    .asset-list-panel .table-responsive,
    .intervention-list-panel .table-responsive,
    .equipment-table-wrap {
        overflow: visible;
    }

    .asset-responsive-table tr,
    .intervention-table tr,
    .admin-responsive-table tr {
        max-width: calc(100vw - 1.5rem);
    }

    .asset-responsive-table td,
    .intervention-table td,
    .admin-responsive-table td {
        display: block !important;
        min-width: 0;
        overflow-wrap: anywhere;
        text-align: left !important;
        white-space: normal;
        word-break: normal;
    }

    .asset-responsive-table td::before,
    .intervention-table td::before,
    .admin-responsive-table td::before {
        display: block;
        flex: none !important;
        margin-bottom: 0.18rem;
        width: auto;
    }

    .asset-responsive-table td > *,
    .intervention-table td > *,
    .admin-responsive-table td > * {
        max-width: 100%;
        min-width: 0;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .asset-responsive-table .badge,
    .intervention-table .badge,
    .dashboard-work-side .badge {
        white-space: normal;
    }

    .intervention-row-actions,
    .asset-responsive-table .action-toolbar,
    .admin-responsive-table .btn-group {
        max-width: 100%;
    }
}

/* V1.4 mobile table/card containment: prevent right clipping after responsive transforms. */
@media (max-width: 767.98px) {
    .content-area {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    .table-responsive,
    .asset-list-panel,
    .intervention-list-panel,
    .equipment-group-card,
    .section-card,
    .app-card,
    .detail-card {
        box-sizing: border-box;
        max-width: 100%;
        min-width: 0;
    }

    .table-responsive > .table,
    .asset-responsive-table,
    .intervention-table,
    .equipment-table,
    .admin-responsive-table {
        box-sizing: border-box;
        display: block;
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .asset-responsive-table tbody,
    .intervention-table tbody,
    .equipment-table tbody,
    .admin-responsive-table tbody {
        box-sizing: border-box;
        display: grid;
        gap: 0.5rem;
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }

    .asset-responsive-table tr,
    .intervention-table tr,
    .equipment-table tr,
    .admin-responsive-table tr {
        box-sizing: border-box;
        margin: 0;
        max-width: 100%;
        min-width: 0 !important;
        padding: 0.58rem;
        width: 100%;
    }

    .asset-responsive-table td,
    .intervention-table td,
    .equipment-table td,
    .admin-responsive-table td {
        box-sizing: border-box;
        max-width: 100%;
        min-width: 0 !important;
        padding: 0.28rem 0;
    }

    .asset-responsive-table td::before,
    .intervention-table td::before,
    .admin-responsive-table td::before {
        font-size: 0.66rem;
        line-height: 1.15;
        margin-bottom: 0.12rem;
    }

    .asset-responsive-table td,
    .intervention-table td,
    .equipment-table td {
        font-size: 0.92rem;
        line-height: 1.32;
    }

    .asset-responsive-table small,
    .intervention-table small,
    .equipment-table small,
    .dashboard-work-item small {
        line-height: 1.25;
    }

    .asset-responsive-table .action-toolbar,
    .intervention-row-actions,
    .equipment-table .action-toolbar {
        display: grid !important;
        gap: 0.35rem;
        grid-template-columns: 1fr;
        justify-items: stretch;
        width: 100%;
    }

    .asset-responsive-table .action-toolbar .btn,
    .asset-responsive-table .action-toolbar button,
    .asset-responsive-table .action-toolbar form,
    .asset-responsive-table .action-toolbar form .btn,
    .intervention-row-actions .btn,
    .intervention-row-actions form,
    .intervention-row-actions form .btn,
    .equipment-table .action-toolbar .btn,
    .equipment-table .action-toolbar form,
    .equipment-table .action-toolbar form .btn {
        box-sizing: border-box;
        min-height: 2.15rem;
        width: 100%;
    }

    .dashboard-work-item,
    .equipment-group-card,
    .preventive-state-card {
        box-sizing: border-box;
        max-width: 100%;
    }

    .dashboard-work-item {
        gap: 0.55rem;
        padding: 0.62rem;
    }

    .dashboard-work-side {
        align-items: flex-start;
        gap: 0.35rem;
    }

    .back-to-top {
        bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
        height: 34px;
        right: 0.7rem;
        width: 34px;
        z-index: 55;
    }

    .app-footer {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
    }
}

/* Mobile field fix: keep the session block reachable above iOS browser chrome. */
@media (max-width: 991.98px) {
    body.mobile-nav-open {
        overscroll-behavior: contain;
    }

    .sidebar {
        box-sizing: border-box;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-inner {
        box-sizing: border-box;
        min-height: 100%;
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    }

    .sidebar-footer {
        margin-top: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }

    .sidebar-user {
        flex-shrink: 0;
    }

    .sidebar-user form,
    .sidebar-user .btn {
        width: 100%;
    }

    .sidebar-user .btn {
        min-height: 2.6rem;
    }
}

/* V1.5.0+ dashboard live and global notifications. */
.dashboard-live {
    padding: 0;
}

.dashboard-live-header {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dashboard-live-header > div {
    min-width: min(100%, 32rem);
}

.dashboard-live-subtitle {
    color: var(--muted-text);
    font-size: 0.92rem;
    max-width: 42rem;
}

.dashboard-live-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    line-height: 1.35;
    width: fit-content;
}

.dashboard-live-header .btn {
    box-shadow: none;
    flex: 0 0 auto;
}

.live-updates-dot {
    animation: liveUpdatesPulse 1.8s ease-in-out infinite;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 42%, transparent);
    display: inline-block;
    height: 0.68rem;
    width: 0.68rem;
}

.live-updates-dot-muted {
    animation: none;
    background: var(--warning);
}

.dashboard-live-kpis {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-live-kpi,
.dashboard-live-card {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    box-shadow: none;
}

.dashboard-live-kpi {
    border-radius: 8px;
    display: grid;
    gap: 0.38rem;
    min-width: 0;
    padding: 0.88rem;
}

.dashboard-live-kpi::after {
    content: none;
}

.dashboard-live-kpi .metric-label {
    color: var(--muted-text);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-live-kpi strong {
    color: var(--heading-text);
    font-size: 2.1rem;
    font-weight: 850;
    line-height: 1;
}

.dashboard-live-kpi-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    height: 2.1rem;
    justify-content: center;
    width: 2.1rem;
}

.dashboard-live-kpi-icon-primary {
    background: var(--accent-soft);
    color: var(--accent);
}

.dashboard-live-kpi-icon-info {
    background: rgba(56, 213, 255, 0.16);
    color: var(--accent-strong);
}

.dashboard-live-kpi-icon-danger {
    background: color-mix(in srgb, var(--danger) 14%, transparent);
    color: var(--danger);
}

.dashboard-live-kpi-icon-warning {
    background: color-mix(in srgb, var(--warning) 16%, transparent);
    color: var(--warning);
}

.dashboard-live-kpi-icon-success {
    background: color-mix(in srgb, var(--success) 16%, transparent);
    color: var(--success);
}

.dashboard-live-card {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.dashboard-live-card-primary {
    border-left: 3px solid var(--accent);
}

.dashboard-live-card .card-header {
    background: var(--surface-bg-soft);
    min-height: 3.3rem;
}

.dashboard-live-card .card-header .text-muted {
    line-height: 1.25;
}

.dashboard-live-card .card-body {
    background: transparent;
}

.dashboard-live-list {
    display: grid;
    gap: 0.62rem;
}

.dashboard-live-item {
    align-items: flex-start;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--surface-border);
    border-radius: 0;
    display: flex;
    gap: 0.85rem;
    justify-content: space-between;
    min-width: 0;
    padding: 0.78rem 0;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-live-item-compact {
    padding: 0.68rem 0;
}

.dashboard-live-item:last-child {
    border-bottom: 0;
}

.dashboard-live-item-main {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.dashboard-live-item-main strong,
.dashboard-live-item-main small,
.dashboard-live-item-main a {
    overflow-wrap: anywhere;
}

.dashboard-live-item-main > a.fw-semibold {
    align-items: center;
    color: var(--accent-strong);
    display: inline-flex;
    font-weight: 800 !important;
    gap: 0.28rem;
    width: fit-content;
}

.dashboard-live-item-main > strong {
    color: var(--heading-text);
    line-height: 1.25;
}

.dashboard-live-item-main small {
    line-height: 1.35;
}

.dashboard-live-item-description {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    overflow: hidden;
}

.dashboard-live-item-side {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 0.34rem;
    text-align: right;
}

.live-updates-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.33rem 0.52rem;
    white-space: nowrap;
}

.live-updates-badge-danger {
    background: color-mix(in srgb, var(--danger) 16%, transparent);
    color: var(--danger);
}

.live-updates-badge-warning {
    background: color-mix(in srgb, var(--warning) 18%, transparent);
    color: var(--warning);
}

.live-updates-badge-success {
    background: color-mix(in srgb, var(--success) 16%, transparent);
    color: var(--success);
}

.live-updates-badge-neutral {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.dashboard-action,
.live-updates-action-link {
    align-items: center;
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 6px;
    color: var(--accent-strong);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    gap: 0.2rem;
    justify-content: center;
    line-height: 1.1;
    min-height: 2.2rem;
    min-width: 6.5rem;
    padding: 0.4rem 0.68rem;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-action {
    align-self: center;
    flex: 0 0 auto;
}

.dashboard-live-item-side .dashboard-action {
    align-self: flex-end;
}

.dashboard-live-item-compact > .dashboard-action {
    flex: 0 0 10rem;
    inline-size: 10rem;
    min-inline-size: 10rem;
    max-inline-size: 10rem;
}

.dashboard-action:hover,
.dashboard-action:focus-visible,
.live-updates-action-link:hover,
.live-updates-action-link:focus-visible {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-strong);
}

.dashboard-action:focus-visible,
.live-updates-action-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.dashboard-chart-bar[data-dashboard-chart-value] {
    width: var(--dashboard-chart-value, 0%);
}

.dashboard-chart-bar-primary {
    background: linear-gradient(90deg, var(--antarionix-blue), var(--antarionix-cyan));
}

.dashboard-trends {
    border-top: 1px solid var(--surface-border);
    padding-top: 1.5rem;
}

.dashboard-trends-header {
    margin-bottom: 1rem;
}

.dashboard-trends-subtitle {
    color: var(--muted-text);
    font-size: 0.92rem;
    max-width: 48rem;
}

.dashboard-trends-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-trend-card {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    min-width: 0;
    overflow: hidden;
}

.dashboard-trend-card summary {
    align-items: flex-start;
    cursor: default;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    list-style: none;
    padding: 0.9rem 0.95rem;
}

.dashboard-trend-card summary::-webkit-details-marker {
    display: none;
}

.dashboard-trend-title {
    align-items: flex-start;
    color: var(--heading-text);
    display: flex;
    font-size: 0.9rem;
    gap: 0.55rem;
    line-height: 1.25;
    min-width: 0;
}

.dashboard-trend-title > i {
    color: var(--accent);
    font-size: 1.05rem;
    margin-top: 0.05rem;
}

.dashboard-trend-title > span {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
}

.dashboard-trend-title small,
.dashboard-trend-summary {
    color: var(--muted-text);
    font-size: 0.76rem;
}

.dashboard-trend-summary {
    align-items: flex-end;
    display: grid;
    gap: 0.12rem;
    text-align: right;
    white-space: nowrap;
}

.dashboard-trend-toggle {
    display: none;
}

.dashboard-trend-content {
    border-top: 1px solid var(--surface-border);
    padding: 0.9rem 0.95rem;
}

.dashboard-trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.dashboard-trend-legend span {
    align-items: center;
    color: var(--muted-text);
    display: inline-flex;
    font-size: 0.76rem;
    gap: 0.32rem;
}

.dashboard-trend-key {
    border-radius: 2px;
    display: inline-block;
    height: 0.55rem;
    width: 0.55rem;
}

.dashboard-trend-key-created,
.dashboard-trend-bar-created {
    background: var(--accent);
}

.dashboard-trend-key-closed,
.dashboard-trend-bar-closed {
    background: var(--success);
}

.dashboard-trend-bars {
    align-items: end;
    display: grid;
    gap: 0.18rem;
    grid-template-columns: repeat(30, minmax(0, 1fr));
    height: 8.5rem;
}

.dashboard-trend-day {
    align-items: end;
    display: flex;
    gap: 1px;
    height: 100%;
    min-width: 0;
}

.dashboard-trend-bar {
    border-radius: 2px 2px 0 0;
    display: block;
    height: var(--dashboard-chart-value, 0%);
    min-height: 0;
    transition: height 0.16s ease;
    width: 50%;
}

.dashboard-trend-axis {
    color: var(--muted-text);
    display: flex;
    font-size: 0.74rem;
    justify-content: space-between;
    margin-top: 0.42rem;
}

.live-updates-toast-region {
    bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    display: grid;
    gap: 0.65rem;
    max-width: min(430px, calc(100vw - 2rem));
    pointer-events: none;
    position: fixed;
    right: 1rem;
    width: 100%;
    z-index: 80;
}

.live-updates-toast {
    animation: liveUpdatesToastIn 0.22s ease-out both;
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-left: 0.35rem solid var(--accent);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    color: var(--page-text);
    display: grid;
    gap: 0.48rem;
    min-width: 0;
    padding: 0.82rem 0.9rem 0.78rem;
    pointer-events: auto;
    text-decoration: none;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
    width: 100%;
}

.live-updates-toast.clickable-card {
    cursor: pointer;
}

.live-updates-toast:hover,
.live-updates-toast:focus-visible {
    background: color-mix(in srgb, var(--surface-bg) 94%, var(--accent-soft) 6%);
    color: var(--page-text);
}

.live-updates-toast:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 34%, transparent);
    outline-offset: 2px;
}

.live-updates-toast-header,
.live-updates-toast-context,
.live-updates-toast-footer {
    align-items: center;
    display: flex;
}

.live-updates-toast-header {
    gap: 0.7rem;
    justify-content: space-between;
}

.live-updates-toast-context {
    flex-wrap: wrap;
    gap: 0.42rem;
    min-width: 0;
}

.live-updates-toast-category {
    background: color-mix(in srgb, var(--accent-soft) 76%, var(--surface-bg) 24%);
    border: 1px solid color-mix(in srgb, var(--surface-border) 70%, var(--accent) 30%);
    border-radius: 999px;
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1;
    padding: 0.32rem 0.5rem;
}

.live-updates-toast-reference {
    color: var(--muted-text);
    font-size: 0.76rem;
    font-weight: 700;
}

.live-updates-toast-close {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted-text);
    display: inline-flex;
    flex: 0 0 2rem;
    font-size: 1.35rem;
    font-weight: 500;
    height: 2rem;
    justify-content: center;
    padding: 0;
    width: 2rem;
}

.live-updates-toast-close:hover,
.live-updates-toast-close:focus-visible {
    background: var(--accent-soft);
    border-color: var(--surface-border);
    color: var(--page-text);
    outline: none;
}

.live-updates-toast-title {
    font-size: 0.98rem;
    line-height: 1.25;
}

.live-updates-toast-asset {
    color: var(--page-text);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
}

.live-updates-toast-description {
    color: var(--muted-text);
    font-size: 0.82rem;
    line-height: 1.42;
    margin: 0;
}

.live-updates-toast strong,
.live-updates-toast span,
.live-updates-toast p {
    overflow-wrap: anywhere;
}

.live-updates-toast-footer {
    gap: 0.75rem;
    justify-content: space-between;
    min-height: 1.15rem;
}

.live-updates-toast-time {
    color: var(--muted-text);
    font-size: 0.74rem;
}

.live-updates-toast-action {
    align-items: center;
    color: var(--accent-strong);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 700;
    gap: 0.1rem;
    min-height: 2rem;
    text-decoration: none;
}

.live-updates-toast-action:hover,
.live-updates-toast-action:focus-visible {
    color: var(--accent-strong);
    text-decoration: underline;
}

.live-updates-toast-danger {
    border-left-color: var(--danger);
}

.live-updates-toast-warning {
    border-left-color: var(--warning);
}

.live-updates-toast-success {
    border-left-color: var(--success);
}

.live-updates-toast-danger .live-updates-toast-category {
    background: color-mix(in srgb, var(--danger) 13%, var(--surface-bg));
    border-color: color-mix(in srgb, var(--danger) 28%, var(--surface-border));
    color: var(--danger);
}

.live-updates-toast-warning .live-updates-toast-category {
    background: color-mix(in srgb, var(--warning) 15%, var(--surface-bg));
    border-color: color-mix(in srgb, var(--warning) 32%, var(--surface-border));
    color: color-mix(in srgb, var(--warning) 72%, var(--page-text));
}

.live-updates-toast-leaving {
    opacity: 0;
    transform: translateY(0.5rem);
}

@keyframes liveUpdatesToastIn {
    from {
        opacity: 0;
        transform: translateY(0.65rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes liveUpdatesPulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 42%, transparent);
    }

    70% {
        box-shadow: 0 0 0 0.55rem transparent;
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

@media (max-width: 1199.98px) {
    .dashboard-live-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-trends-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .dashboard-live-header {
        align-items: stretch;
        gap: 0.8rem;
    }

    .dashboard-live-meta {
        width: 100%;
    }

    .dashboard-live-item {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-live-kpis {
        gap: 0.6rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-live-kpi {
        padding: 0.72rem;
    }

    .dashboard-live-kpi-icon {
        height: 1.95rem;
        width: 1.95rem;
    }

    .dashboard-live-kpi strong {
        font-size: 1.75rem;
    }

    .dashboard-live-card .card-header {
        align-items: flex-start !important;
        flex-direction: column;
        min-height: 0;
    }

    .dashboard-live-item-side {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        text-align: left;
    }

    .dashboard-live-item-side .dashboard-action,
    .dashboard-live-item-side .live-updates-action-link,
    .dashboard-live-item > .dashboard-action {
        justify-content: center;
        margin-top: 0.1rem;
        min-height: 2.1rem;
        width: 100%;
    }

    .dashboard-live-item-compact > .dashboard-action {
        flex-basis: auto;
        inline-size: 100%;
        min-inline-size: 0;
        max-inline-size: none;
    }

    .dashboard-trends {
        margin-top: 0.25rem;
        padding-top: 1.15rem;
    }

    .dashboard-trends-grid {
        gap: 0.65rem;
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-trend-card summary {
        cursor: pointer;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .dashboard-trend-summary {
        display: none;
    }

    .dashboard-trend-toggle {
        align-self: center;
        display: block;
        transition: transform 0.16s ease;
    }

    .dashboard-trend-card[open] .dashboard-trend-toggle {
        transform: rotate(180deg);
    }

    .dashboard-trend-bars {
        height: 7.25rem;
    }

    .live-updates-toast-region {
        bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
        left: 0.75rem;
        max-width: none;
        right: 0.75rem;
        width: auto;
    }

    .live-updates-toast {
        gap: 0.4rem;
        padding: 0.75rem 0.78rem 0.7rem;
    }

    .live-updates-toast-title {
        font-size: 0.93rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .dashboard-action,
    .dashboard-live-item,
    .dashboard-trend-bar,
    .dashboard-trend-toggle {
        transition: none;
    }

    .live-updates-dot {
        animation: none;
    }
}

.dashboard-user-intervention {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.dashboard-user-intervention-main {
    min-width: 0;
}

.dashboard-user-intervention-main .intervention-description-summary {
    margin-top: 0.25rem;
}

.dashboard-user-intervention-state {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

@media (max-width: 575.98px) {
    .dashboard-user-intervention {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-user-intervention-state {
        justify-content: flex-start;
    }
}

.diagnostic-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1.25rem;
}

.diagnostic-summary-item {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-left-width: 4px;
    border-radius: 8px;
    min-height: 8.5rem;
    padding: 1rem;
}

.diagnostic-summary-item > span,
.diagnostic-section-heading > div > span {
    color: var(--bs-secondary-color);
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.diagnostic-summary-item strong {
    display: block;
    font-size: 1.05rem;
    margin-top: 0.45rem;
}

.diagnostic-summary-item p {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
    margin: 0.5rem 0 0;
}

.diagnostic-summary-ok {
    border-left-color: var(--bs-success);
}

.diagnostic-summary-warning {
    border-left-color: var(--bs-warning);
}

.diagnostic-summary-critical {
    border-left-color: var(--bs-danger);
}

.diagnostic-summary-info,
.diagnostic-summary-neutral {
    border-left-color: var(--bs-info);
}

.diagnostic-section {
    border-top: 1px solid var(--bs-border-color);
    padding: 1.35rem 0;
}

.diagnostic-section-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.diagnostic-section-heading h2 {
    font-size: 1.2rem;
    margin: 0.2rem 0 0;
}

.diagnostic-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.diagnostic-table-shell {
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    overflow-x: auto;
}

.diagnostic-check-table,
.diagnostic-facts-table {
    table-layout: fixed;
    width: 100%;
}

.diagnostic-check-table th,
.diagnostic-check-table td,
.diagnostic-facts-table th,
.diagnostic-facts-table td {
    padding: 0.72rem 0.8rem;
    vertical-align: top;
}

.diagnostic-check-table thead th,
.diagnostic-facts-table thead th {
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.diagnostic-col-control {
    width: 22%;
}

.diagnostic-col-state {
    width: 14%;
}

.diagnostic-col-message {
    width: 44%;
}

.diagnostic-col-value {
    width: 20%;
}

.diagnostic-facts-table th:first-child {
    width: 22%;
}

.diagnostic-facts-table td:nth-child(2) {
    width: 28%;
}

.diagnostic-group + .diagnostic-group {
    margin-top: 1.15rem;
}

.diagnostic-group h3 {
    font-size: 0.98rem;
    margin-bottom: 0.55rem;
}

.diagnostic-alert-list {
    display: grid;
    gap: 0.65rem;
}

.diagnostic-alert-item,
.diagnostic-empty-state {
    align-items: center;
    border: 1px solid var(--bs-border-color);
    border-left-width: 4px;
    border-radius: 8px;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.85rem 1rem;
}

.diagnostic-alert-item > i,
.diagnostic-empty-state > i {
    font-size: 1.2rem;
}

.diagnostic-alert-item span {
    color: var(--bs-secondary-color);
    display: block;
    font-size: 0.78rem;
}

.diagnostic-alert-item p,
.diagnostic-empty-state p {
    color: var(--bs-secondary-color);
    font-size: 0.86rem;
    margin: 0.25rem 0 0;
}

.diagnostic-alert-warning {
    border-left-color: var(--bs-warning);
}

.diagnostic-alert-critical {
    border-left-color: var(--bs-danger);
}

.diagnostic-empty-state {
    border-left-color: var(--bs-success);
    grid-template-columns: auto minmax(0, 1fr);
}

.diagnostic-inline-link {
    display: inline-block;
    font-size: 0.82rem;
    margin-left: 0.35rem;
    white-space: nowrap;
}

.diagnostic-note {
    background: var(--bs-tertiary-bg);
    border-radius: 8px;
    margin-top: 1.25rem;
    padding: 0.8rem 1rem;
}

@media (max-width: 991.98px) {
    .diagnostic-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .diagnostic-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .diagnostic-summary-item {
        min-height: 0;
    }

    .diagnostic-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .diagnostic-counts {
        justify-content: flex-start;
    }

    .diagnostic-table-shell {
        border: 0;
        border-radius: 0;
        overflow: visible;
    }

    .diagnostic-check-table,
    .diagnostic-facts-table,
    .diagnostic-check-table tbody,
    .diagnostic-facts-table tbody,
    .diagnostic-check-table tr,
    .diagnostic-facts-table tr {
        display: block;
        width: 100%;
    }

    .diagnostic-check-table colgroup,
    .diagnostic-check-table thead,
    .diagnostic-facts-table thead {
        display: none;
    }

    .diagnostic-check-table tr,
    .diagnostic-facts-table tr {
        border: 1px solid var(--bs-border-color);
        border-radius: 8px;
        margin-bottom: 0.65rem;
        overflow: hidden;
    }

    .diagnostic-check-table th,
    .diagnostic-check-table td,
    .diagnostic-facts-table th,
    .diagnostic-facts-table td {
        align-items: start;
        border-bottom: 1px solid var(--bs-border-color);
        display: grid;
        gap: 0.65rem;
        grid-template-columns: minmax(6.5rem, 34%) minmax(0, 1fr);
        padding: 0.65rem 0.75rem;
        width: 100% !important;
    }

    .diagnostic-check-table td:last-child,
    .diagnostic-facts-table td:last-child {
        border-bottom: 0;
    }

    .diagnostic-check-table th::before,
    .diagnostic-check-table td::before,
    .diagnostic-facts-table th::before,
    .diagnostic-facts-table td::before {
        color: var(--bs-secondary-color);
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
    }

    .diagnostic-alert-item {
        align-items: start;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .diagnostic-alert-item .btn {
        grid-column: 2;
        justify-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .live-updates-toast,
    .live-updates-toast-leaving {
        animation: none;
        transition: none;
    }
}

/* V1.6.27: administration pilotage, comptes, roles et securite. */
.admin-pilot-activity,
.security-summary {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-pilot-stat,
.security-summary > div {
    align-items: flex-start;
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    display: flex;
    gap: 0.7rem;
    min-height: 6.8rem;
    padding: 0.85rem;
}

.admin-pilot-stat > i {
    color: var(--accent);
    font-size: 1.2rem;
    margin-top: 0.15rem;
}

.admin-pilot-stat span,
.security-summary span,
.admin-pilot-heading > div > span,
.role-editor-heading > div > span {
    color: var(--muted-text);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-pilot-stat strong,
.security-summary strong {
    color: var(--heading-text);
    display: block;
    font-size: 1.35rem;
    line-height: 1.1;
    margin-top: 0.25rem;
}

.admin-pilot-stat small,
.security-summary small {
    color: var(--muted-text);
    display: block;
    font-size: 0.78rem;
    margin-top: 0.3rem;
}

.admin-pilot-section {
    border-top: 1px solid var(--surface-border);
    padding-top: 1.25rem;
}

.admin-pilot-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.admin-pilot-heading h2,
.role-editor-heading h3 {
    color: var(--heading-text);
    font-size: 1.08rem;
    margin: 0.16rem 0 0;
}

.admin-pilot-heading p,
.role-editor-heading p {
    color: var(--muted-text);
    font-size: 0.88rem;
    margin: 0.3rem 0 0;
}

.admin-pilot-counts,
.role-editor-status,
.user-admin-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.admin-pilot-counts,
.role-editor-status {
    justify-content: flex-end;
}

.admin-pilot-alert-list,
.role-editor-list {
    display: grid;
    gap: 0.65rem;
}

.admin-pilot-alert,
.admin-pilot-empty {
    align-items: center;
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-left-width: 4px;
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.8rem 0.9rem;
}

.admin-pilot-alert > i,
.admin-pilot-empty > i {
    font-size: 1.15rem;
}

.admin-pilot-alert span {
    color: var(--muted-text);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-pilot-alert strong {
    color: var(--heading-text);
    display: block;
    margin-top: 0.12rem;
}

.admin-pilot-alert p,
.admin-pilot-empty p {
    color: var(--muted-text);
    font-size: 0.86rem;
    margin: 0.22rem 0 0;
}

.admin-pilot-alert-danger {
    border-left-color: var(--danger);
}

.admin-pilot-alert-warning {
    border-left-color: var(--warning);
}

.admin-pilot-alert-info,
.admin-pilot-empty {
    border-left-color: var(--accent);
}

.admin-pilot-empty {
    border-left-color: var(--success);
    grid-template-columns: auto minmax(0, 1fr);
}

.user-admin-card {
    grid-template-columns: minmax(190px, 1.1fr) minmax(150px, auto) minmax(200px, 0.9fr) auto;
}

.user-admin-name,
.user-admin-login {
    display: block;
}

.user-admin-name {
    color: var(--heading-text);
}

.user-admin-login {
    color: var(--muted-text);
    font-size: 0.84rem;
    margin-top: 0.14rem;
    overflow-wrap: anywhere;
}

.user-admin-badges {
    align-content: center;
    min-width: 0;
}

.user-state-badge,
.user-role-badge {
    justify-content: center;
    min-height: 1.7rem;
}

.user-role-badge {
    max-width: 13rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-editor-card {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    padding: 1rem;
}

.role-editor-details {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    overflow: clip;
    scroll-margin-top: 1rem;
}

.role-editor-details > summary {
    align-items: center;
    border-bottom: 0;
    cursor: pointer;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto auto;
    list-style: none;
    margin: 0;
    padding: 0.9rem 1rem;
}

.role-editor-details > summary::-webkit-details-marker {
    display: none;
}

.role-editor-details > summary:hover {
    background: var(--surface-bg-soft);
}

.role-editor-details > summary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent);
    outline-offset: -3px;
}

.role-editor-details[open] > summary {
    border-bottom: 1px solid var(--surface-border);
}

.role-editor-details > .role-editor-card {
    border: 0;
    border-radius: 0;
}

.role-editor-chevron {
    color: var(--muted-text);
    transition: transform 160ms ease;
}

.role-editor-details[open] .role-editor-chevron {
    transform: rotate(180deg);
}

.role-editor-heading,
.role-editor-title {
    align-items: flex-start;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
}

.role-editor-heading {
    border-bottom: 1px solid var(--surface-border);
    margin-bottom: 0.9rem;
    padding-bottom: 0.8rem;
}

.role-editor-title {
    justify-content: flex-start;
    min-width: 0;
}

.role-editor-title h3 {
    font-size: 1rem;
}

.role-order-badge {
    align-items: center;
    background: var(--accent-soft);
    border-radius: 8px;
    color: var(--accent);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 800;
    height: 1.8rem;
    justify-content: center;
    width: 2.6rem;
}

.role-editor-card .permission-group-card {
    border-radius: 8px;
}

.permission-group-card h4,
.permission-group-card legend {
    color: var(--heading-text);
    font-size: 0.88rem;
    font-weight: 800;
    margin: 0 0 0.55rem;
}

.permission-group-card legend {
    float: none;
    width: auto;
}

.role-editor-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.9rem;
}

.role-sensitive-note {
    color: var(--danger);
    font-size: 0.84rem;
    margin: 0.8rem 0 0;
}

.role-delete-details {
    border-top: 1px solid var(--surface-border);
    margin-top: 0.9rem;
    padding-top: 0.8rem;
}

.security-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.security-detail-section {
    border-top: 1px solid var(--surface-border);
    padding-top: 1rem;
}

.security-table {
    border: 1px solid var(--surface-border);
}

.security-empty {
    background: var(--surface-bg-soft);
    border: 1px dashed var(--surface-border);
    border-radius: 8px;
    color: var(--muted-text);
    padding: 0.85rem;
}

@media (max-width: 1199.98px) {
    .admin-pilot-activity {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .user-admin-card {
        grid-template-columns: minmax(210px, 1fr) minmax(180px, 0.8fr) auto;
    }

    .user-admin-badges {
        grid-column: 2;
        grid-row: 1;
    }

    .user-admin-meta {
        grid-column: 1 / span 2;
    }
}

@media (max-width: 767.98px) {
    .admin-pilot-activity,
    .security-summary,
    .security-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-pilot-stat,
    .security-summary > div {
        min-height: 0;
    }

    .admin-pilot-heading,
    .role-editor-heading {
        flex-direction: column;
    }

    .role-editor-details > summary {
        align-items: start;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .role-editor-details > summary .role-editor-status {
        grid-column: 1;
    }

    .role-editor-details > summary .role-editor-chevron {
        grid-column: 2;
        grid-row: 1;
    }

    .admin-pilot-counts,
    .role-editor-status {
        justify-content: flex-start;
    }

    .admin-pilot-alert {
        align-items: flex-start;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .admin-pilot-alert .btn {
        grid-column: 2;
        justify-self: start;
    }

    .user-admin-card {
        align-items: start;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .user-admin-badges,
    .user-admin-meta,
    .user-admin-actions {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .user-admin-actions,
    .role-editor-actions {
        justify-content: stretch;
    }

    .user-admin-actions > .btn,
    .user-admin-actions > details,
    .role-editor-actions > .btn,
    .user-action-details summary,
    .role-manage-details summary {
        width: 100%;
    }
}

/* V1.6.29: shared administration finishing details. */
.admin-card-kicker {
    color: var(--accent);
    display: block;
    font-size: 0.7rem;
    font-weight: 850;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.settings-summary-grid,
.smtp-summary-grid,
.branding-summary-grid,
.devblog-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.settings-notification-summary {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.admin-settings-page .card-header,
.admin-branding-page .card-header,
.admin-smtp-page .card-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.branding-info-panel {
    gap: 0.3rem;
}

.branding-info-panel strong,
.branding-info-panel span {
    color: var(--page-text);
    display: block;
}

.branding-info-panel span {
    color: var(--muted-text);
    font-size: 0.9rem;
}

.branding-preview-list {
    display: grid;
    gap: 0.8rem;
    margin: 0 0 1rem;
}

.branding-preview-list div {
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 0.65rem;
}

.branding-preview-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.branding-preview-list dt {
    color: var(--muted-text);
    font-size: 0.7rem;
    font-weight: 850;
    margin-bottom: 0.15rem;
    text-transform: uppercase;
}

.branding-preview-list dd {
    color: var(--heading-text);
    font-size: 0.96rem;
    font-weight: 750;
    margin: 0;
    overflow-wrap: anywhere;
}

.branding-logo-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.branding-logo-card {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    display: grid;
    gap: 0.85rem;
    padding: 0.9rem;
}

.branding-logo-card h3 {
    color: var(--heading-text);
    font-size: 1rem;
    font-weight: 850;
    margin: 0 0 0.2rem;
}

.branding-logo-card p {
    color: var(--muted-text);
    font-size: 0.88rem;
    margin: 0;
}

.branding-logo-preview {
    align-items: center;
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: 112px;
    padding: 0.8rem;
}

.smtp-notification-panel {
    display: grid;
    gap: 0.9rem;
}

.smtp-role-row {
    align-items: center;
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.7rem 0;
}

.smtp-role-row:first-child {
    padding-top: 0;
}

.smtp-role-row:last-of-type {
    border-bottom: 0;
}

.devblog-search-form {
    margin: 1rem 0 0.75rem;
    max-width: 680px;
}

.devblog-more-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.roadmap-card-termine-recemment::before {
    background: linear-gradient(180deg, #198754, transparent);
}

.roadmap-card-termine-recemment .roadmap-icon {
    background: rgba(25, 135, 84, 0.12);
    color: #146c43;
}

@media (max-width: 767.98px) {
    .settings-summary-grid,
    .smtp-summary-grid,
    .branding-summary-grid,
    .devblog-summary-grid,
    .settings-notification-summary,
    .branding-logo-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-settings-page .card-header,
    .admin-branding-page .card-header,
    .admin-smtp-page .card-header {
        align-items: flex-start;
    }

    .smtp-role-row {
        align-items: flex-start;
    }

    .devblog-search-form .input-group {
        display: grid;
        gap: 0.5rem;
    }

    .devblog-search-form .input-group > .form-control,
    .devblog-search-form .input-group > .btn {
        border-radius: 0.375rem;
        width: 100%;
    }
}

[data-bs-theme="dark"] .branding-logo-card,
[data-bs-theme="dark"] .branding-logo-preview {
    background: var(--surface-bg);
    border-color: var(--surface-border);
}

.intervention-scope-tabs {
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.intervention-scope-tabs a {
    align-items: center;
    border-bottom: 3px solid transparent;
    color: var(--bs-secondary-color);
    display: inline-flex;
    gap: 0.45rem;
    padding: 0.65rem 0.8rem;
    text-decoration: none;
}

.intervention-scope-tabs a:hover,
.intervention-scope-tabs a:focus-visible,
.intervention-scope-tabs a.active {
    color: var(--bs-primary);
}

.intervention-scope-tabs a.active {
    border-bottom-color: var(--bs-primary);
    font-weight: 600;
}

.intervention-scope-tabs span {
    background: var(--surface-soft);
    border-radius: 999px;
    font-size: 0.78rem;
    min-width: 1.65rem;
    padding: 0.1rem 0.4rem;
    text-align: center;
}

.intervention-row-highlight {
    box-shadow: inset 4px 0 0 var(--bs-primary);
}

.intervention-row-highlight > * {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.asset-pagination {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.asset-breadcrumb {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-width: 0;
}

.asset-breadcrumb a,
.table-sort-link {
    color: inherit;
    text-decoration: none;
}

.asset-breadcrumb a:hover,
.table-sort-link:hover {
    text-decoration: underline;
}

.asset-row-highlight {
    box-shadow: inset 4px 0 0 var(--bs-primary);
}

.asset-row-highlight > * {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

@media (prefers-reduced-motion: no-preference) {
    .intervention-row-highlight > * {
        animation: intervention-return-highlight 3.2s ease-out;
    }

    .asset-row-highlight > * {
        animation: intervention-return-highlight 3.2s ease-out;
    }
}

@keyframes intervention-return-highlight {
    0%, 45% {
        background-color: rgba(13, 110, 253, 0.2);
    }

    100% {
        background-color: transparent;
    }
}

@media (max-width: 575.98px) {
    .intervention-scope-tabs a {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* Signalements logiciels: user reporting and administrative follow-up. */
.issue-page {
    min-width: 0;
}

.issue-hero {
    align-items: center;
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: 0.5rem;
    color: var(--page-text);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.5rem;
}

.issue-hero h1 {
    color: var(--heading-text);
    font-size: 2rem;
    margin: 0;
}

.issue-hero p:not(.dashboard-kicker) {
    color: var(--muted-text);
}

.issue-section-heading {
    align-items: center;
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    justify-content: space-between;
    padding-bottom: 1rem;
}

.issue-section-heading h2 {
    color: var(--heading-text);
    font-size: 1.5rem;
    margin: 0;
}

.issue-section-heading p {
    color: var(--muted-text);
    margin-top: 0.35rem;
}

.issue-filter-card .form-label,
.issue-form-card .form-label {
    color: var(--muted-text);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.issue-metric-card .card-body {
    display: grid;
    gap: 0.25rem;
    min-height: 5.5rem;
}

.issue-metric-card span {
    color: var(--muted-text);
    font-size: 0.78rem;
}

.issue-metric-card strong {
    color: var(--heading-text);
    font-size: 1.55rem;
    line-height: 1.1;
}

.issue-table td,
.issue-table th {
    vertical-align: middle;
}

.issue-content-card,
.issue-side-card,
.issue-filter-card,
.issue-list-card,
.issue-form-card,
.issue-unavailable-card {
    border-radius: 0.5rem;
}

.issue-rich-text {
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.issue-comment {
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 1rem;
}

.issue-comment:last-child {
    border-bottom: 0;
    margin-bottom: 0 !important;
    padding-bottom: 0;
}

.issue-comment-internal {
    background: rgba(255, 193, 7, 0.1);
    border-inline-start: 4px solid #d89b00;
    padding: 0.9rem;
}

.issue-attachment-row {
    align-items: flex-start;
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.issue-attachment-row:first-child {
    padding-top: 0;
}

.issue-attachment-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.issue-history-list {
    display: grid;
    gap: 0.7rem;
    list-style: none;
    padding: 0;
}

.issue-history-list li {
    align-items: flex-start;
    border-inline-start: 3px solid var(--bs-primary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    justify-content: space-between;
    padding-inline-start: 0.75rem;
}

.issue-history-list small {
    color: var(--muted-text);
    white-space: nowrap;
}

.issue-context-disclosure {
    border: 1px solid var(--surface-border);
    border-radius: 0.5rem;
    color: var(--muted-text);
    padding: 0.8rem 1rem;
}

.issue-context-disclosure summary {
    color: var(--page-text);
    cursor: pointer;
    font-weight: 600;
}

.issue-context-disclosure p {
    margin: 0.8rem 0 0;
}

.issue-context-list {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(6.5rem, 0.8fr) minmax(0, 1.2fr);
}

.issue-context-list dt {
    color: var(--muted-text);
    font-weight: 600;
}

.issue-context-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

[data-bs-theme="dark"] .issue-comment-internal {
    background: rgba(255, 193, 7, 0.14);
    border-inline-start-color: #ffbf3f;
}

.email-template-intro,
.email-template-editor-header {
    align-items: center;
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    margin: 1.25rem 0;
    padding: 1.25rem;
}

.email-template-intro h2,
.email-template-editor-header h2 {
    font-size: 1.25rem;
    margin: 0.2rem 0 0.4rem;
}

.email-template-intro p,
.email-template-editor-header p {
    margin: 0;
    max-width: 52rem;
}

.email-template-intro-note {
    color: var(--muted-text);
    flex: 0 1 20rem;
    font-size: 0.9rem;
}

.email-template-catalogue {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.email-template-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-inline-start: 4px solid #6c757d;
    display: flex;
    flex-direction: column;
    min-block-size: 12.5rem;
    padding: 1rem;
}

.email-template-card-custom {
    border-inline-start-color: #0d6efd;
}

.email-template-card-heading,
.email-template-card-footer,
.email-template-actions,
.email-template-switches {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    justify-content: space-between;
}

.email-template-category,
.email-template-back {
    color: var(--muted-text);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.email-template-card h2 {
    font-size: 1.05rem;
    margin: 0.85rem 0 0.45rem;
}

.email-template-card p {
    color: var(--muted-text);
    flex: 1;
    margin: 0;
}

.email-template-card-footer {
    border-top: 1px solid var(--surface-border);
    margin-top: 1rem;
    padding-top: 0.8rem;
}

.email-template-card-footer small {
    color: var(--muted-text);
    max-inline-size: 12rem;
}

.email-template-back {
    display: inline-flex;
    gap: 0.3rem;
    margin-bottom: 0.7rem;
    text-decoration: none;
}

.email-template-workspace {
    align-items: start;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.75fr);
}

.email-template-form-card .card-body,
.email-template-support {
    display: grid;
    gap: 1rem;
}

.email-template-enabled {
    border-bottom: 1px solid var(--surface-border);
    margin-bottom: 1rem;
    padding: 0 0 1rem 2.5rem;
}

.email-template-switches {
    align-items: start;
    border: 0;
    border-top: 1px solid var(--surface-border);
    flex-wrap: wrap;
    margin: 1.25rem 0;
    padding: 1rem 0 0;
}

.email-template-switches legend {
    float: none;
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    width: auto;
}

.email-template-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.email-template-variable-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.email-template-variable-list .btn {
    font-family: var(--bs-font-monospace);
    font-size: 0.72rem;
    overflow-wrap: anywhere;
    text-align: start;
}

.email-template-preview-section {
    margin-top: 1.5rem;
}

.email-template-section-heading h3 {
    font-size: 1.1rem;
    margin: 0.2rem 0;
}

.email-template-section-heading p {
    color: var(--muted-text);
    margin: 0 0 0.8rem;
}

.email-template-preview-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(15rem, 0.75fr) minmax(15rem, 0.75fr);
}

.email-template-preview-grid article {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    min-inline-size: 0;
    padding: 0.8rem;
}

.email-template-preview-grid h4 {
    font-size: 0.88rem;
    margin: 0 0 0.65rem;
}

.email-template-preview-frame {
    background: #f4f6f8;
    block-size: 33rem;
    border: 0;
    display: block;
    inline-size: 100%;
}

.email-template-preview-mobile {
    margin-inline: auto;
    max-inline-size: 23rem;
    inline-size: 100%;
}

.email-template-preview-mobile .email-template-preview-frame {
    block-size: 39rem;
}

.email-template-plain-preview {
    background: var(--surface-subtle);
    border: 1px solid var(--surface-border);
    color: var(--page-text);
    font: 0.8rem/1.55 var(--bs-font-monospace);
    margin: 0;
    min-block-size: 20rem;
    overflow: auto;
    padding: 0.8rem;
    white-space: pre-wrap;
}

.email-template-history {
    margin-top: 1.5rem;
}

[data-bs-theme="dark"] .email-template-intro,
[data-bs-theme="dark"] .email-template-editor-header,
[data-bs-theme="dark"] .email-template-card,
[data-bs-theme="dark"] .email-template-preview-grid article {
    background: var(--surface-card);
}

@media (max-width: 767.98px) {
    .issue-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 1.15rem;
    }

    .issue-hero h1 {
        font-size: 1.65rem;
    }

    .issue-hero .btn {
        align-self: stretch;
    }

    .issue-table thead {
        display: none;
    }

    .issue-table,
    .issue-table tbody,
    .issue-table tr,
    .issue-table td {
        display: block;
        width: 100%;
    }

    .issue-table tr {
        border-bottom: 1px solid var(--surface-border);
        padding: 0.9rem;
    }

    .issue-table td {
        border: 0;
        min-height: 1.65rem;
        padding: 0.25rem 0;
        text-align: start !important;
    }

    .issue-table td::before {
        color: var(--muted-text);
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        font-weight: 600;
        margin-bottom: 0.08rem;
    }

    .issue-table td[data-label="Action"]::before,
    .issue-table td[data-label="Ouvrir"]::before {
        display: none;
    }

    .issue-context-list {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .issue-context-list dd {
        margin-bottom: 0.55rem;
    }

    .email-template-intro,
    .email-template-editor-header,
    .email-template-workspace,
    .email-template-preview-grid {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }

    .email-template-card-footer,
    .email-template-actions,
    .email-template-switches {
        align-items: stretch;
        flex-direction: column;
    }

    .email-template-card-footer small {
        max-inline-size: none;
    }

    .email-template-card-footer .btn,
    .email-template-actions .btn {
        inline-size: 100%;
    }

    .email-template-preview-frame,
    .email-template-preview-mobile .email-template-preview-frame {
        block-size: 28rem;
    }
}

/* Antarionix V1.8.0: en-tetes sobres, apercus d'intervention et contraste des roles. */
.app-page-header {
    align-items: center;
    background: var(--surface-bg) !important;
    border: 1px solid var(--surface-border);
    border-radius: 18px !important;
    box-shadow: var(--shadow-soft);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    min-width: 0;
    overflow: visible !important;
    padding: clamp(1rem, 2.4vw, 1.5rem) !important;
}

.app-page-header.admin-control-hero,
.app-page-header.intervention-command-hero,
.app-page-header.issue-hero,
.app-page-header.asset-command-hero,
.app-page-header.quick-command-hero {
    background: var(--surface-bg) !important;
}

.app-page-header.admin-control-hero::before,
.app-page-header.intervention-command-hero::before,
.app-page-header.asset-command-hero::before,
.app-page-header.quick-command-hero::before {
    display: none;
}

.app-page-header-copy {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.app-page-header h1,
.app-page-header.intervention-command-hero h1,
.app-page-header.issue-hero h1 {
    color: var(--heading-text);
    font-size: clamp(1.55rem, 3vw, 2.15rem) !important;
    font-weight: 800;
    line-height: 1.12;
    margin: 0 !important;
    overflow-wrap: anywhere;
}

.app-page-header-context {
    color: var(--muted-text);
    margin: 0.35rem 0 0;
    max-width: 72ch;
    overflow-wrap: anywhere;
}

.app-page-header-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

.issue-form-guidance {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    color: var(--muted-text);
    margin: -0.5rem 0 1rem;
    padding: 0.75rem 1rem;
}

.issue-header-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: -0.75rem 0 1.5rem;
}

.role-color-badge,
.role-color-preview,
.role-color-dot {
    border-style: solid !important;
    border-width: 1px !important;
}

.role-color-preview-wrap {
    align-items: center;
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem;
}

.role-color-preview-wrap > span:first-child {
    color: var(--muted-text);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.role-color-preview {
    font-size: 0.85rem;
    padding: 0.55rem 0.75rem;
}

.intervention-summary-cell {
    min-width: 20rem;
    width: 34%;
}

.intervention-summary-heading {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.intervention-description-summary {
    color: var(--page-text);
    display: -webkit-box;
    line-height: 1.4;
    margin: 0.4rem 0 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.intervention-description-summary.is-empty {
    color: var(--muted-text);
    font-style: italic;
}

.intervention-table td[data-label="État"] .badge {
    display: table;
    margin: 0 0 0.35rem;
}

.intervention-preview-trigger {
    align-items: center;
    display: none;
    gap: 0.3rem;
    margin-top: 0.25rem;
    padding: 0 !important;
    text-decoration: none;
}

.js-enabled .intervention-preview-trigger {
    display: inline-flex;
}

.intervention-preview-trigger:focus-visible,
.intervention-inline-preview summary:focus-visible {
    border-radius: 4px;
    outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: 3px;
}

.intervention-inline-preview {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    margin-top: 0.6rem;
    padding: 0.6rem 0.75rem;
}

.intervention-inline-preview summary {
    color: var(--accent);
    cursor: pointer;
    font-weight: 700;
}

.intervention-preview-content {
    color: var(--page-text);
    margin-top: 0.75rem;
}

.intervention-preview-title {
    color: var(--heading-text);
    display: block;
    font-size: 1rem;
    margin-bottom: 0.65rem;
}

.intervention-preview-content dl {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

.intervention-preview-content dl > div {
    display: grid;
    gap: 0.1rem;
}

.intervention-preview-content dt {
    color: var(--muted-text);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.intervention-preview-content dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.intervention-preview-description dd {
    line-height: 1.45;
    white-space: normal;
}

.intervention-preview-tooltip {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    box-shadow: 0 22px 55px rgba(4, 16, 31, 0.24);
    color: var(--page-text);
    max-height: calc(100vh - 24px);
    max-width: calc(100vw - 24px);
    overflow: auto;
    padding: 1rem;
    position: fixed;
    width: clamp(360px, 34vw, 480px);
    z-index: 1085;
}

.intervention-preview-tooltip[hidden] {
    display: none !important;
}

.intervention-preview-tooltip .intervention-preview-content {
    margin-top: 0;
}

@media (min-width: 768px) {
    .js-enabled .intervention-inline-preview {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .app-page-header {
        align-items: stretch;
        flex-direction: column;
        margin-bottom: 1rem;
    }

    .app-page-header-actions {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
        width: 100%;
    }

    .app-page-header-actions .btn {
        justify-content: center;
        width: 100%;
    }

    .intervention-summary-cell {
        display: block;
        min-width: 0;
        text-align: left;
        width: 100%;
    }

    .intervention-summary-cell::before {
        display: none;
    }

    .intervention-description-summary {
        -webkit-line-clamp: 3;
    }

    .js-enabled .intervention-preview-trigger,
    .intervention-preview-tooltip {
        display: none !important;
    }

    .intervention-table td[data-label="État"] .badge {
        display: inline-flex;
        margin: 0 0 0.3rem 0.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .intervention-preview-tooltip,
    .intervention-row-highlight > * {
        animation: none !important;
        transition: none !important;
    }
}
\n+.admin-filter-grid {
    align-items: end;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-admin-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    min-width: 0;
    padding: 1rem;
}

.service-admin-card.is-inactive {
    border-style: dashed;
    opacity: 0.88;
}

.service-admin-heading,
.detail-status-row,
.service-counter-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.service-admin-heading h3,
.service-admin-heading p {
    margin: 0;
}

.service-counter-row > div {
    background: var(--bs-tertiary-bg);
    border-radius: 0.75rem;
    flex: 1 1 6rem;
    padding: 0.65rem;
}

.service-counter-row span,
.detail-grid span,
.detail-grid dt {
    color: var(--bs-secondary-color);
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid > div {
    min-width: 0;
}

.detail-grid dd {
    margin: 0;
}

.permission-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.confirmation-card {
    margin-inline: auto;
    max-width: 58rem;
}

[data-bs-theme="dark"] .service-admin-card {
    background: var(--bs-dark-bg-subtle);
}

@media (max-width: 991.98px) {
    .admin-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .admin-filter-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-filter-actions .btn,
    .confirmation-card .btn {
        width: 100%;
    }

.service-admin-card {
        padding: 0.85rem;
    }
}

.park-view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.park-view-tab {
    align-items: center;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    color: var(--bs-body-color);
    display: inline-flex;
    font-weight: 600;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    text-decoration: none;
}

.park-view-tab:hover,
.park-view-tab.is-active,
.park-view-tab.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.park-family-counters .is-current {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.18rem rgba(var(--bs-primary-rgb), 0.12);
}

.park-category-counters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.park-category-counter {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.65rem;
    color: var(--bs-body-color);
    padding: 0.4rem 0.65rem;
    text-decoration: none;
}

.park-category-counter:hover,
.park-category-counter.is-active,
.park-category-counter.active {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.asset-picker-group-label {
    background: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    padding: 0.4rem 0.7rem;
    text-transform: uppercase;
}

.icon-picker-enhancement {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    padding: 0.75rem;
}

.icon-picker-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    max-height: 22rem;
    overflow: auto;
}

.icon-picker-option {
    align-items: center;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.6rem;
    color: var(--bs-body-color);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 5.5rem;
    overflow-wrap: anywhere;
    padding: 0.65rem 0.4rem;
    text-align: center;
}

.icon-picker-option i {
    font-size: 1.45rem;
}

.icon-picker-option span {
    font-size: 0.72rem;
    line-height: 1.2;
}

.icon-picker-option:hover,
.icon-picker-option[aria-selected="true"] {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.icon-picker-option:focus-visible {
    box-shadow: 0 0 0 0.22rem rgba(var(--bs-primary-rgb), 0.25);
    outline: 2px solid transparent;
}

@media (max-width: 575.98px) {
    .icon-picker-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: 19rem;
    }
}
.parc-types-table {
    table-layout: fixed;
    width: 100%;
}

.parc-types-table .parc-type-col-type { width: 17%; }
.parc-types-table .parc-type-col-code { width: 18%; }
.parc-types-table .parc-type-col-status { width: 10%; }
.parc-types-table .parc-type-col-origin { width: 10%; }
.parc-types-table .parc-type-col-order { width: 7%; }
.parc-types-table .parc-type-col-usage { width: 11%; }
.parc-types-table .parc-type-col-rules { width: 17%; }
.parc-types-table .parc-type-col-actions { width: 10%; }
.parc-types-table td,
.parc-types-table th {
    overflow-wrap: anywhere;
}

.entity-type-color {
    border: 1px solid transparent;
}

.entity-type-color--gray { background-color: #6c757d; color: #fff; border-color: #51585e; }
.entity-type-color--blue { background-color: #0d6efd; color: #fff; border-color: #0a53be; }
.entity-type-color--cyan { background-color: #0dcaf0; color: #000; border-color: #0aa2c0; }
.entity-type-color--green { background-color: #198754; color: #fff; border-color: #146c43; }
.entity-type-color--light_green { background-color: #d1e7dd; color: #0f5132; border-color: #a3cfbb; }
.entity-type-color--orange { background-color: #fd7e14; color: #000; border-color: #ca6510; }
.entity-type-color--red { background-color: #dc3545; color: #fff; border-color: #b02a37; }

[data-bs-theme="dark"] .entity-type-color--gray { background-color: #84909c; color: #000; border-color: #a0a9b2; }
[data-bs-theme="dark"] .entity-type-color--blue { background-color: #6ea8fe; color: #000; border-color: #9ec5fe; }
[data-bs-theme="dark"] .entity-type-color--cyan { background-color: #3dd5f3; color: #000; border-color: #6edff6; }
[data-bs-theme="dark"] .entity-type-color--green { background-color: #75b798; color: #000; border-color: #a3cfbb; }
[data-bs-theme="dark"] .entity-type-color--light_green { background-color: #234b39; color: #fff; border-color: #47735f; }
[data-bs-theme="dark"] .entity-type-color--orange { background-color: #ffb066; color: #000; border-color: #ffc48c; }
[data-bs-theme="dark"] .entity-type-color--red { background-color: #ea868f; color: #000; border-color: #f1aeb5; }

@media (max-width: 767.98px) {
    .parc-type-family-tabs {
        display: grid;
        grid-template-columns: 1fr;
        gap: .35rem;
    }
}
