/* Application layer on top of the Vuexy theme.
   Only app-specific pieces live here; everything else comes from the theme. */

/* --- Layout integrity --------------------------------------------------- */

/* The navbar above is deliberately full-bleed (100vw), which is wider than the
   content box by the scrollbar gutter. Clip it so no page scrolls sideways. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* --- Global type and primary palette ----------------------------------- */

:root {
    --bs-font-sans-serif: 'Roboto', sans-serif;
    --bs-body-font-family: 'Roboto', sans-serif;
    --bs-indigo: #5b6168;
    --bs-purple: #5b6168;
    --bs-primary: #5b6168;
    --bs-primary-rgb: 91, 97, 104;
    --bs-link-color: #5b6168;
    --bs-link-color-rgb: 91, 97, 104;
    --bs-link-hover-color: #454b50;
    --bs-link-hover-color-rgb: 69, 75, 80;
    --pm-primary: #5b6168;
    --pm-primary-hover: #454b50;
    --pm-primary-soft: #e9eaeb;
    --pm-primary-rgb: 91, 97, 104;
    --pm-primary-hover-rgb: 69, 75, 80;
    /* An environment the project is deployed in. Kept apart from --pm-primary so
       a filled marker reads as "live here" instead of "this is a button". */
    --pm-live: #16a34a;
    --pm-live-rgb: 22, 163, 74;
}

* {
    font-family: 'Roboto', sans-serif;
}

.feather,
[class^="icon-"],
[class*=" icon-"] {
    font-family: 'feather', sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-text,
.pm-page-title,
.btn {
    font-family: 'Oswald', sans-serif;
}

.btn-primary,
.btn-flat-primary,
.btn-relief-primary,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary,
.show > .btn-primary.dropdown-toggle {
    color: #fff;
    background-color: var(--pm-primary) !important;
    border-color: var(--pm-primary) !important;
}

.btn-primary:hover:not(:disabled):not(.disabled),
.btn-primary:focus-visible,
.btn-check:focus + .btn-primary {
    color: #fff;
    background-color: var(--pm-primary-hover) !important;
    border-color: var(--pm-primary-hover) !important;
}

.btn-primary:focus,
.btn-primary:active:focus,
.btn-check:focus + .btn-primary {
    box-shadow: 0 0 0 .2rem rgba(91, 97, 104, .24) !important;
}

.btn-outline-primary {
    color: var(--pm-primary) !important;
    border-color: var(--pm-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: #fff !important;
    background-color: var(--pm-primary) !important;
    border-color: var(--pm-primary) !important;
}

.btn-flat-primary,
.btn-flat-primary:hover,
.btn-flat-primary:focus,
.btn-flat-primary:active,
.btn-relief-primary,
.btn-relief-primary:hover,
.btn-relief-primary:focus,
.btn-relief-primary:active {
    color: #fff !important;
    background: var(--pm-primary) !important;
    border-color: var(--pm-primary) !important;
    box-shadow: none !important;
}

a {
    color: var(--pm-primary);
}

a:hover,
a:focus-visible,
.btn-link:hover,
.btn-link:focus-visible {
    color: var(--pm-primary-hover);
}

.btn-link {
    color: var(--pm-primary);
}

.text-primary {
    color: var(--pm-primary) !important;
}

.bg-primary {
    background-color: var(--pm-primary) !important;
}

.border-primary {
    border-color: var(--pm-primary) !important;
}

.bg-light-primary,
.badge.badge-light-primary {
    color: var(--pm-primary) !important;
    background: var(--pm-primary-soft) !important;
    border-color: #d0d2d4 !important;
}

.horizontal-menu .header-navbar .navbar-brand .brand-text {
    color: var(--pm-primary) !important;
}

.horizontal-menu-wrapper .header-navbar[data-menu="menu-wrapper"] {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    min-height: 4.45rem;
    margin: 0;
    border-bottom: 1px solid #dedede;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.horizontal-layout.navbar-static .horizontal-menu-wrapper {
    position: relative;
    top: 0;
    z-index: 20;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
}

.horizontal-menu-wrapper .header-navbar[data-menu="menu-wrapper"] > .navbar-container {
    width: 100%;
    min-height: 4rem;
    padding: .35rem max(1rem, calc((100vw - 1320px) / 2));
    gap: 1.5rem;
}

.horizontal-menu-wrapper .navbar-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .65rem;
    margin: 0;
    padding: 0;
}

.horizontal-menu-wrapper .navbar-brand .brand-logo {
    display: inline-flex;
    align-items: center;
    color: var(--pm-primary);
}

.horizontal-menu-wrapper .navbar-brand .brand-logo svg {
    width: 1.5rem;
    height: 1.5rem;
}

.horizontal-menu-wrapper .navbar-brand .brand-text {
    padding: 0;
    font-size: 1.2rem;
    line-height: 1.2;
}

.horizontal-menu-wrapper .main-menu-content {
    flex: 1 1 auto;
    justify-content: flex-end;
    overflow: visible;
}

/* Keep the account identity on separate lines inside the Vuexy dropdown. */
.dropdown-user .dropdown-menu {
    min-width: 16rem;
    max-width: min(22rem, calc(100vw - 2rem));
}

.dropdown-user .dropdown-menu .dropdown-user-identity {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
}

.dropdown-user .dropdown-user-name,
.dropdown-user .dropdown-user-email {
    display: block;
    line-height: 1.4;
}

.dropdown-user .dropdown-user-email {
    margin-top: .2rem;
}

.horizontal-layout.navbar-static .app-content {
    padding: 1rem 2rem 0 !important;
}

@media (max-width: 767.98px) {
    .horizontal-layout.navbar-static .app-content {
        padding: 1.2rem 1.2rem 0 !important;
    }

    .horizontal-menu-wrapper .navbar-brand .brand-text {
        font-size: 1.05rem;
    }

    .horizontal-menu-wrapper .navbar-container {
        flex-wrap: wrap;
    }

    .horizontal-menu-wrapper .main-menu-content {
        flex-basis: 100%;
    }
}

.alert-primary {
    color: #292d32 !important;
    background: var(--pm-primary-soft) !important;
    border-color: #c8cbd0 !important;
}

.alert-primary .alert-link,
.alert-primary .btn-close {
    color: var(--pm-primary) !important;
}

.form-check-input:checked,
.form-switch .form-check-input:checked,
.form-range::-webkit-slider-thumb,
.form-range::-moz-range-thumb,
.nav-pills .nav-link.active,
.page-item.active .page-link,
.list-group-item.active {
    background-color: var(--pm-primary) !important;
    border-color: var(--pm-primary) !important;
}

.nav-pills .nav-link.active,
.page-item.active .page-link,
.list-group-item.active {
    color: #fff !important;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #8b9096 !important;
    box-shadow: 0 0 0 .2rem rgba(91, 97, 104, .18) !important;
}

.content-body .badge {
    border: 1px solid transparent;
    border-radius: .25rem;
    font-weight: 600;
    line-height: 1.25;
    vertical-align: middle;
}

.content-body .badge.text-bg-light,
.content-body .badge.bg-light {
    color: #292929 !important;
    background-color: #ededed !important;
    border-color: #c5c5c5 !important;
}

.content-body .badge.text-bg-secondary,
.content-body .badge.text-bg-warning,
.content-body .badge.bg-warning {
    color: #242424 !important;
    background-color: #d4d4d4 !important;
    border-color: #a8a8a8 !important;
}

.content-body .badge.text-bg-success,
.content-body .badge.text-bg-primary,
.content-body .badge.text-bg-info {
    color: #fff !important;
    background-color: #555b61 !important;
    border-color: #555b61 !important;
}

.content-body .badge.text-bg-danger,
.content-body .badge.text-bg-dark {
    color: #fff !important;
    background-color: #34383d !important;
    border-color: #34383d !important;
}

/* --- Page scaffolding --------------------------------------------------- */

/* Overview hero band. Bootstrap 5 dropped `.jumbotron` and Vuexy does not ship
   one either, so the band is built here from the same tokens as the rest of the
   interface rather than introducing a second palette. */
.pm-jumbotron {
    background: var(--pm-primary-soft);
    border-radius: .5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.pm-jumbotron .pm-page-header {
    margin-bottom: 1.25rem;
}

.pm-jumbotron .pm-page-header h1 {
    font-size: 1.75rem;
}

.pm-jumbotron-description {
    border-top: 1px solid rgba(var(--pm-primary-rgb), .18);
    padding-top: 1rem;
}

.pm-page-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.content-wrapper {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
}

.content-body {
    min-width: 0;
    font-size: 15px;
    line-height: 1.55;
}

.content-body .row > *,
.content-body .card,
.content-body .card-body,
.content-body .card-header {
    min-width: 0;
}

.content-body .card-title,
.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body .badge {
    overflow-wrap: anywhere;
}

.content-body .table td,
.content-body .table th {
    overflow-wrap: anywhere;
}

.content-body .table .text-nowrap {
    overflow-wrap: normal;
}

.pm-page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: .15rem;
}

/* Parent link shown as a badge under the page title. The whole badge is the
   anchor, so it carries its own background and text colour rather than
   inheriting the muted caption. */
.pm-parent-badge {
    display: inline-flex;
    align-items: center;
    font-size: .6875rem;
    font-weight: 500;
    line-height: 1.3;
    padding: .25em .5em;
    vertical-align: baseline;
    color: #fff;
    background-color: var(--pm-primary);
    border: 0;
    border-radius: .25rem;
    text-decoration: none;
    transition: background-color .15s ease-in-out;
}

.pm-parent-badge:hover,
.pm-parent-badge:focus-visible {
    color: #fff;
    background-color: var(--pm-primary-hover);
    text-decoration: none;
}

.pm-page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.pm-card-gap {
    margin-bottom: 1.5rem;
}

.pm-project-list-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pm-project-list-title {
    flex: 0 0 auto;
}

.pm-project-list-title h1 {
    margin-bottom: .15rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.pm-project-list-title p {
    font-size: .875rem;
}

.pm-project-list-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: .5rem;
}

.pm-project-list-actions .btn {
    min-height: 2.85rem;
}

.pm-project-search {
    flex: 0 1 26rem;
    min-width: 12rem;
    max-width: none;
}

.pm-project-search .input-group {
    flex-wrap: nowrap;
}

.pm-project-search .pm-search-submit,
.pm-project-search .pm-search-clear {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding-inline: .85rem;
}

.pm-project-create {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .pm-project-list-toolbar {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        align-items: center;
        gap: .75rem;
    }

    .pm-project-list-title {
        flex: 1 1 auto;
    }

    .pm-project-list-actions {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }

    .pm-project-search {
        max-width: none;
        flex: 1 1 100%;
    }
}

.pm-project-card {
    min-width: 0;
}

.pm-project-card .card-body {
    padding: .5rem .75rem;
}

.pm-project-card-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* The title row carries the project name and the open button, and the presence
   row follows it directly, so the row needs its own bottom margin: without one
   the name sits flush against the environment labels. */
.pm-project-card-title {
    margin-bottom: .5rem;
}

.pm-project-card-meta {
    display: flex;
    flex-wrap: wrap;
    /* align under the project name, past the folder icon and its gap */
    margin: .125rem 0 0 1.5rem;
    column-gap: 1rem;
    line-height: 1.4;
}

.pm-project-card-meta [data-feather],
.pm-project-card-meta svg.feather {
    width: 13px;
    height: 13px;
    margin-right: .2rem;
}

/* Wrapping row of small tags: flex gap gives the vertical rhythm, the
   margin separates the row from the label above and the content below. */
.pm-flash {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .875rem 1.125rem;
    font-size: .9375rem;
    line-height: 1.5;
    border-width: 0;
    border-radius: .5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.pm-flash-body {
    flex: 1 1 auto;
    min-width: 0;
}

.pm-flash .btn-close {
    flex: 0 0 auto;
    margin: .125rem 0 0;
    padding: .5rem;
    font-size: .875rem;
}

.pm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .375rem;
    margin: .25rem 0;
}

.pm-tags .badge {
    /* no badge-sm utility in the bundled build, so shrink it here */
    font-size: .6875rem;
    font-weight: 400;
    line-height: 1.3;
    padding: .2em .45em;
    border-radius: .25rem;
}

.pm-project-card-tags {
    /* align under the project name, past the folder icon and its gap */
    margin: .25rem 0 0 1.5rem;
}

.pm-project-card-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* square-ish hit area, icon only */
    width: 2rem;
    padding: 0;
}

/* Feather icons rendered inline next to text should sit on the baseline */
[data-feather],
svg.feather {
    vertical-align: -0.15em;
}

.badge [data-feather],
.badge svg.feather,
.btn [data-feather],
.btn svg.feather {
    vertical-align: -0.18em;
}

/* --- Key / value grid --------------------------------------------------- */

.pm-kv {
    display: grid;
    grid-template-columns: minmax(120px, 170px) 1fr;
    gap: .5rem .75rem;
    margin: 0;
    font-size: .9375rem;
}

.pm-kv dt {
    color: #737373;
    font-weight: 500;
}

.pm-kv dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.pm-kv dd:empty {
    color: #999;
}

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

    .pm-kv dt {
        margin-top: .4rem;
    }
}

/* --- Project tree ------------------------------------------------------- */

.pm-tree,
.pm-tree ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.pm-tree ul {
    padding-left: 1.25rem;
    margin-left: .65rem;
    border-left: 1px dashed #dedede;
}

.pm-tree > li + li {
    margin-top: .15rem;
}

.pm-tree a {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    padding: .45rem .6rem;
    border-radius: .375rem;
    color: #333;
    text-decoration: none;
    transition: background-color .15s ease;
}

.pm-tree a:hover {
    background-color: #f4f4f4;
}

.pm-tree a.active {
    background-color: var(--pm-primary);
    color: #fff;
}

.pm-tree a.active .pm-tree-meta,
.pm-tree a.active .text-muted {
    color: rgba(255, 255, 255, .8);
}

.pm-tree-meta {
    font-size: .8125rem;
    color: #737373;
}

.pm-tree-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* --- Notes -------------------------------------------------------------- */

.pm-note-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: .9375rem;
}

.pm-note + .pm-note {
    border-top: 1px solid #e5e5e5;
    margin-top: 1.15rem;
    padding-top: 1.15rem;
}

.pm-note-form textarea {
    min-height: 62px;
    width: 100%;
    resize: vertical;
}

.pm-rich-note {
    border: 1px solid #d8d6de;
    border-radius: .375rem;
    overflow: hidden;
    background: #fff;
}

.pm-rich-note:focus-within {
    border-color: var(--pm-primary);
    box-shadow: 0 0 0 .15rem rgba(91, 97, 104, .16);
}

.pm-rich-note .pm-rich-note-toolbar.ql-toolbar.ql-snow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .15rem;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    padding: .55rem .65rem;
    background: #fafafa;
}

.pm-rich-note .ql-toolbar.ql-snow .ql-formats {
    margin-right: .35rem;
}

.pm-rich-note .ql-toolbar.ql-snow button,
.pm-rich-note .ql-toolbar.ql-snow .ql-picker-label {
    border-radius: .25rem;
}

.pm-rich-note .ql-toolbar.ql-snow button:hover,
.pm-rich-note .ql-toolbar.ql-snow button.ql-active,
.pm-rich-note .ql-toolbar.ql-snow .ql-picker-label:hover,
.pm-rich-note .ql-toolbar.ql-snow .ql-picker-label.ql-active {
    color: var(--pm-primary-hover);
    background: var(--pm-primary-soft);
}

.pm-rich-note .ql-toolbar.ql-snow button:hover .ql-stroke,
.pm-rich-note .ql-toolbar.ql-snow button.ql-active .ql-stroke {
    stroke: var(--pm-primary-hover);
}

.pm-rich-note .ql-toolbar.ql-snow button:hover .ql-fill,
.pm-rich-note .ql-toolbar.ql-snow button.ql-active .ql-fill {
    fill: var(--pm-primary-hover);
}

.pm-rich-note-surface.ql-container.ql-snow {
    border: 0;
    font-family: inherit;
    font-size: .9375rem;
}

.pm-rich-note-surface .ql-editor {
    min-height: 176px;
    max-height: 360px;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    line-height: 1.65;
}

.pm-rich-note-surface .ql-editor.ql-blank::before {
    left: 1.1rem;
    right: 1.1rem;
    color: #737373;
    font-style: normal;
}

.pm-rich-note--ready .pm-note-input {
    display: none;
}

.pm-note-editor > .form-label {
    margin-bottom: .5rem;
    font-weight: 600;
}

.pm-note-composer-meta {
    display: grid;
    grid-template-columns: minmax(150px, .75fr) minmax(200px, 1.25fr);
    gap: 1rem;
    align-items: end;
    margin-top: 1rem;
}

.pm-note-composer-meta .form-label {
    margin-bottom: .35rem;
    font-size: .8125rem;
    font-weight: 600;
}

/* Project form fields sit much closer together than the default: the row
   spacing comes from ProjectFormType's mb-1 row_attr, since this build's
   .mb-3 is 3rem (Vuexy rem scale, not Bootstrap's 1rem). Only the control
   sizing is handled here. */
.pm-project-form .form-label {
    margin-bottom: .25rem;
}

.pm-project-form .form-control {
    padding: .45rem .75rem;
}

/* Form actions (Enregistrer / Annuler / Créer …) share one row pinned to the
   trailing edge, so primary and secondary actions sit in the same place on
   every form. */
.pm-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.25rem;
}

.pm-form-actions .btn {
    min-width: 132px;
}

.pm-note-composer-footer {
    display: flex;
    align-items: center;
    /* only the action buttons remain, so keep them on the trailing edge */
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.pm-note-composer-footer .btn {
    min-width: 132px;
}

/* The inline quick-add composer sits directly under its editor, so it needs
   less breathing room than the full-page composer. */
.pm-note-form .pm-note-composer-footer {
    margin-top: .5rem;
}

.pm-note-rich-content > :first-child {
    margin-top: 0;
}

.pm-note-rich-content > :last-child {
    margin-bottom: 0;
}

.pm-note-rich-content blockquote {
    border-left: 3px solid var(--pm-primary);
    margin: .75rem 0;
    padding-left: .85rem;
    color: #555;
}

.pm-note-rich-content code {
    background: var(--pm-primary-soft);
    border-radius: .25rem;
    padding: .1rem .3rem;
    font-size: .875em;
}

.pm-note-rich-content h2,
.pm-note-rich-content h3 {
    margin: .75rem 0 .35rem;
    font-size: 1.05rem;
}

.pm-note-form .form-label {
    display: block;
    margin-bottom: .35rem;
    font-size: .875rem;
    font-weight: 600;
    color: #333;
}

.pm-note-controls {
    display: grid;
    grid-template-columns: minmax(130px, .8fr) minmax(170px, 1.2fr) auto auto;
    gap: .75rem;
    align-items: end;
    margin-top: .75rem;
}

.pm-note-control {
    min-width: 0;
}

.pm-note-control .form-select {
    width: 100%;
}

.pm-note-pin-field,
.pm-note-submit {
    display: flex;
    min-height: 38px;
    align-items: center;
}

.pm-note-pin-field {
    gap: .5rem;
    flex-wrap: wrap;
}

.pm-note-submit {
    justify-content: flex-end;
}

.pm-note-submit .btn {
    white-space: nowrap;
}

.pm-page-header .btn {
    white-space: normal;
}

.pm-kv,
.pm-note-body {
    overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
    .pm-note-controls {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .pm-note-submit {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .pm-note-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .pm-note-composer-meta {
        grid-template-columns: minmax(0, 1fr);
        gap: .75rem;
    }

    .pm-note-composer-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .pm-note-composer-footer .btn {
        width: 100%;
    }
}

/* --- Misc --------------------------------------------------------------- */

.pm-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #737373;
}

.pm-empty .ficon {
    width: 2.25rem;
    height: 2.25rem;
    color: #dedede;
}

.pm-danger-zone {
    border: 1px solid #f1c1c1;
    background-color: #fffafa;
}

/* Full-bleed like the navbar, and the same 1320px centred measure, so the
   footer copy lines up exactly with the header. */
.pm-footer {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-top: 2.5rem;
    padding: 1rem max(1rem, calc((100vw - 1320px) / 2));
    border-top: 1px solid #eaeaea;
    background-color: #fafafa;
}

.pm-footer-copy {
    margin: 0;
    font-size: .8125rem;
    color: #737373;
}

/* ---------------- Subtree overview (project show) ---------------- */
.pm-subtree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pm-subtree-nested {
    margin: .75rem 0 0 1.5rem;
    padding-left: .875rem;
    border-left: 2px solid var(--bs-border-color);
}

.pm-subtree-node + .pm-subtree-node {
    margin-top: .75rem;
}

.pm-subtree-card {
    padding: .75rem .875rem;
    background: var(--bs-tertiary-bg, rgba(0, 0, 0, .02));
    border: 1px solid var(--bs-border-color);
    border-radius: .375rem;
}

.pm-subtree-head {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.pm-subtree-name {
    font-weight: 600;
    text-decoration: none;
}

.pm-subtree-name:hover {
    text-decoration: underline;
}

.pm-subtree-desc {
    margin: .5rem 0 0;
    color: var(--bs-secondary-color);
    font-size: .875rem;
}

.pm-subtree-meta {
    display: flex;
    align-items: center;
    gap: .375rem;
    flex-wrap: wrap;
    margin-top: .5rem;
}

.pm-subtree-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .125rem .5rem;
    font-size: .75rem;
    color: var(--bs-secondary-color);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    text-decoration: none;
}

.pm-note-list {
    display: flex;
    flex-direction: column;
    gap: .625rem;
    max-height: 32rem;
    overflow-y: auto;
}

/* --- Overview page: notes grouped by owning project ---------------------- */

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


/* --- Environments: vertical rail + panel ------------------------------- */

.pm-environments-layout {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 0;
}

.pm-environment-rail {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding-right: 1rem;
    margin-right: 1.25rem;
    border-right: 1px solid var(--bs-border-color);
}

/* The read-only rail is a <ul> where the project page uses a <nav>. It keeps .nav
   because Bootstrap's Tab needs that ancestor, and .nav brings a wrapping flex that
   would break the vertical stack, so the rail's own column direction is restated. */
ul.pm-environment-rail {
    flex-wrap: nowrap;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
}

.pm-environment-item {
    position: relative;
    display: grid;
    grid-template-columns: 3px minmax(0, 1fr) 8px;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: .6rem;
    padding: .55rem .65rem;
    border-radius: .375rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
    /* Read-only mode renders a tab as a <button>, which brings UA styling an <a>
       never had. Resetting it keeps both modes looking the same. */
    width: 100%;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-align: left;
    cursor: pointer;
}

.pm-environment-item-bar {
    grid-row: 1 / span 2;
    align-self: stretch;
    border-radius: 2px;
    background: transparent;
}

.pm-environment-item-label {
    grid-column: 2;
    grid-row: 1;
    font-size: .9375rem;
    line-height: 1.25;
}

.pm-environment-item-meta {
    grid-column: 2;
    grid-row: 2;
    font-size: .75rem;
    line-height: 1.3;
    color: var(--bs-secondary-color);
}

.pm-environment-item .pm-environment-dot {
    grid-column: 3;
    grid-row: 1 / span 2;
}

.pm-environment-item:hover {
    background: var(--pm-primary-soft);
    color: var(--pm-primary);
}

/* The highlight keys off .active, the class Bootstrap moves when a tab is clicked.
   A Twig-only modifier could never follow the click, which is what made the
   selected tab look stuck on the first environment. */
.pm-environment-item.active {
    background: var(--pm-primary-soft);
    color: var(--pm-primary);
}

.pm-environment-item.active .pm-environment-item-bar {
    background: var(--pm-primary);
}

.pm-environment-item.active .pm-environment-item-label {
    font-weight: 600;
}

.pm-environment-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    justify-self: center;
}

/* The rail's marker says "this environment is documented", which is not the
   same statement as "the project is deployed there", so it stays neutral. */
.pm-environment-dot--filled {
    background: var(--pm-primary);
}

.pm-environment-dot--empty {
    border: 1px solid var(--bs-border-color);
    background: transparent;
}

.pm-env-presence {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .75rem;
    margin-bottom: .5rem;
}

/* On a project card the presence row sits above the meta line, so it takes the
   same left offset to stay aligned with the counts and the tags below it. */
.pm-project-card .pm-env-presence {
    margin-left: 1.5rem;
}

.pm-env-presence-item {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .7rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    /* This theme does not define --bs-secondary-color, so the muted tone is
       spelled out here rather than inherited from a variable that is absent. */
    color: #a3a0ad;
}

.pm-env-presence-item--on {
    color: #4a4757;
    font-weight: 600;
}

/* A deployed environment: the filled marker turns green so it is readable at a
   glance, and the label darkens with it. */
.pm-env-presence-item--on .pm-environment-dot {
    background: var(--pm-live);
    box-shadow: 0 0 0 2px rgba(var(--pm-live-rgb), .18);
}

.pm-environment-dot--live {
    background: var(--pm-live);
    box-shadow: 0 0 0 2px rgba(var(--pm-live-rgb), .18);
}

.pm-environment-summary-item--live .pm-environment-summary-item-label {
    color: #4a4757;
    font-weight: 600;
}

.pm-env-checkboxes .form-check {
    margin-bottom: .25rem;
}

.pm-env-checkboxes .form-check-label {
    font-size: .875rem;
}

.pm-environment-panel {
    min-width: 0;
}

.pm-environment-panel-head {
    padding-bottom: .85rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

/* --- Environments: read-only summary ----------------------------------- */

.pm-environment-summary {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.pm-environment-summary-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .2rem .35rem;
    margin-left: -.35rem;
    border-radius: .25rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.pm-environment-summary-item:hover {
    background: var(--pm-primary-soft);
    color: var(--pm-primary);
}

.pm-environment-summary-item--active {
    color: var(--pm-primary);
    font-weight: 600;
}

.pm-environment-summary-item-label {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 767.98px) {
    .pm-environments-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .pm-environment-rail {
        flex-direction: row;
        flex-wrap: wrap;
        padding-right: 0;
        padding-bottom: .85rem;
        margin-right: 0;
        margin-bottom: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--bs-border-color);
    }

    .pm-environment-item {
        grid-template-columns: 3px auto 8px;
    }
}

/* ---------------- Dashboard ---------------- */

.pm-kpi {
    border-left: 3px solid var(--bs-border-color);
}

.pm-kpi--live {
    border-left-color: var(--pm-live);
}

.pm-kpi-label {
    margin: 0;
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #a3a0ad;
}

.pm-kpi-value {
    margin: .15rem 0 0;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
}

.pm-kpi-of {
    font-size: .875rem;
    font-weight: 400;
    color: #a3a0ad;
}

.pm-kpi-note {
    margin: .25rem 0 0;
    font-size: .75rem;
    color: var(--bs-secondary-color, #a3a0ad);
    display: flex;
    align-items: center;
    gap: .25rem;
}

.pm-kpi--slim .pm-kpi-value {
    font-size: 1.375rem;
}

.pm-kpi-bar-row + .pm-kpi-bar-row {
    margin-top: .875rem;
}

.pm-kpi-bar-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .3rem;
    font-size: .875rem;
}

.pm-dashboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pm-dashboard-list li {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    padding: .4rem 0;
}

.pm-dashboard-list li + li {
    border-top: 1px solid var(--bs-border-color);
}

.pm-dashboard-list a {
    font-weight: 500;
    text-decoration: none;
}

.pm-dashboard-list .pm-env-presence {
    margin: 0;
    margin-left: auto;
}

/* The two top-level links occupy the space between the brand and the user menu,
   and disappear below the breakpoint where Vuexy collapses the navbar into the
   hamburger (the toggle carries the whole menu on its own there). */
.pm-main-links {
    flex: 1 1 auto;
    justify-content: center;
    gap: .25rem;
}

@media (max-width: 1199.98px) {
    .pm-main-links {
        display: none;
    }
}

/* On desktop the links have to be the element that grows, or nothing is centred.
   The theme gives the menu wrapper flex-grow: 1 as well, and the wrapper wins, so
   the links end up squeezed against the brand. Sizing the wrapper to its content
   hands the free space to the links instead; nothing else needs an auto margin,
   because an auto margin is settled before flex-grow and would swallow the same
   space again. */
@media (min-width: 1200px) {
    .navbar-container > .main-menu-content {
        flex: 0 0 auto;
        margin-left: 0;
    }
}

/* The theme offsets the user list with a margin, and that margin sits inside the
   wrapper the links have to be centred in: the free space is 1rem wider on the
   right, so the links land half a rem left of the middle. Clearing it gives the
   extra space back to the links, and the avatar keeps its breathing room from the
   padding on its own link. */
.pm-user-menu {
    margin-left: 0;
}

/* Active page. Vuexy's default for a horizontal menu is a filled pill, which on
   a light navbar turns into a grey block; the project name in the brand is
   already the strongest element on the left, so the current page is marked with
   weight and a soft background plus an underline bar, and the label keeps the
   theme colour rather than going to white. */
.header-navbar .navbar-container .pm-main-links > .nav-item > .nav-link {
    position: relative;
    border-radius: .375rem;
    padding: .5rem .875rem;
    font-weight: 500;
    color: #6e6b7b;
    transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

.header-navbar .navbar-container .pm-main-links > .nav-item > .nav-link:hover {
    background: var(--pm-primary-soft);
    color: var(--bs-body-color);
}

.header-navbar .navbar-container .pm-main-links > .nav-item > .nav-link.active {
    background: var(--pm-primary-soft);
    color: var(--pm-primary);
    font-weight: 600;
}

.header-navbar .navbar-container .pm-main-links > .nav-item > .nav-link.active::after {
    content: "";
    position: absolute;
    left: .875rem;
    right: .875rem;
    bottom: -.25rem;
    height: 2px;
    border-radius: 2px;
    background: var(--pm-primary);
}

@media (prefers-reduced-motion: reduce) {
    .header-navbar .navbar-container .pm-main-links > .nav-item > .nav-link {
        transition: none;
    }
}
