﻿/* Move down content because we have a fixed navbar that is 50px tall */
body {
    margin: 0;
    min-height: 100vh;
    background: #f6f8fb;
    color: #263442;
}

.site-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
    padding-block: clamp(1.5rem, 3vw, 3rem);
}

@media (min-width: 1400px) {
    .site-shell > nav .container-xl,
    .site-main > .container-xl,
    .site-footer .container-xl {
        width: 100%;
        max-width: min(1600px, calc(100% - 3rem));
    }
}

.site-footer {
    flex-shrink: 0;
    padding-block: 1rem;
    background: #fff;
    color: #64717e;
    font-size: .875rem;
}

.debug-role {
    display: block;
    margin-top: .2rem;
    color: #7b8792;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .76rem;
}

.admin-breadcrumb-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1rem;
    padding: .55rem .7rem;
    border: 1px solid #dbe4ec;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 .2rem .65rem rgba(28, 48, 67, .04);
}

.admin-breadcrumb {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-breadcrumb-item {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: .3rem;
    color: #718293;
    font-size: .84rem;
    font-weight: 600;
}

.admin-breadcrumb-item + .admin-breadcrumb-item::before {
    color: #a5b2be;
    content: "\f054";
    font-family: "Font Awesome 5 Free";
    font-size: .58rem;
    font-weight: 900;
}

.admin-breadcrumb-item a {
    padding: .3rem .4rem;
    border-radius: .45rem;
    color: #47769f;
    text-decoration: none;
}

.admin-breadcrumb-item a:hover,
.admin-breadcrumb-item a:focus {
    background: #edf5fb;
    color: #245f91;
}

.admin-breadcrumb-item.is-current span {
    overflow: hidden;
    padding: .3rem .4rem;
    color: #334b60;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-breadcrumb-back {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .45rem;
    padding: .42rem .7rem;
    border: 1px solid #cbdbe8;
    border-radius: .55rem;
    background: #f5f9fc;
    color: #376b98;
    font-size: .8rem;
    font-weight: 650;
    text-decoration: none;
}

.admin-breadcrumb-back:hover,
.admin-breadcrumb-back:focus {
    border-color: #7fa9ca;
    background: #e9f3fa;
    color: #225d8e;
}

.navbar-brand {
    color: #1f3347;
    font-weight: 700;
    letter-spacing: .02em;
}

.navbar .nav-link {
    border-radius: .375rem;
    font-weight: 500;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus-visible {
    background: rgba(11, 95, 165, .08);
    color: #084a81;
}

/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content { width: 100%; }

.page-header {
    margin-bottom: 1.75rem;
}

.page-title {
    margin-bottom: .5rem;
    color: #1f3347;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -.025em;
}

.page-subtitle {
    max-width: 52rem;
    margin-bottom: 0;
    color: #64717e;
    font-size: 1.075rem;
}

.text-center .page-subtitle { margin-inline: auto; }

.content-card,
.admin-form-card {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid #dfe5ec;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 .25rem 1rem rgba(26, 43, 60, .05);
}

.admin-table {
    width: 100%;
    max-width: 100%;
    box-shadow: 0 .25rem 1rem rgba(26, 43, 60, .04);
}

.admin-table .table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
}

.admin-table .table > :not(caption) > * > * {
    padding: .8rem 1rem;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
}

.admin-table thead th {
    background: #eef3f7;
    color: #35495c;
    font-size: .8rem;
    letter-spacing: .025em;
    text-transform: uppercase;
    vertical-align: middle;
}

.admin-sort-button {
    display: flex;
    width: fit-content;
    min-height: 1.5rem;
    align-items: center;
    gap: .5rem;
    padding: .2rem 0;
    border: 0;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-decoration: none;
    text-transform: inherit;
}

/*
 * Alignement commun de tous les tableaux de gestion. Les tableaux WebForms
 * sont construits sur plusieurs pages, mais leurs en-têtes, badges et boutons
 * doivent tous rester centrés dans la hauteur de leur ligne.
 */
.admin-table tbody th,
.admin-table tbody td,
.quota-quick-edit-table thead th,
.quota-quick-edit-table tbody th,
.quota-quick-edit-table tbody td {
    vertical-align: middle;
}

.admin-table-actions {
    vertical-align: middle !important;
}

.admin-sort-button .fas {
    min-width: .8rem;
    color: #7d91a5;
    font-size: .78rem;
    transition: color .16s ease, transform .16s ease;
}

.admin-sort-button:hover,
.admin-sort-button:focus-visible {
    color: #2364a7;
    text-decoration: none;
}

.admin-sort-button:hover .fas,
.admin-sort-button:focus-visible .fas {
    color: #2364a7;
    transform: translateY(-1px);
}

.client-owner-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .38rem .65rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 750;
    white-space: nowrap;
}
.client-owner-badge.is-own { border-color: #b9dfcf; background: #eaf7f1; color: #267255; }
.client-owner-badge.is-colleague { border-color: #d5dfeb; background: #f2f6fa; color: #526b82; }

.admin-table-actions {
    min-width: 7.5rem;
    white-space: normal !important;
}

.admin-table-actions .btn {
    margin-top: .15rem;
    margin-bottom: .15rem;
}

/* A locked destructive action must still receive pointer/focus events so its
   audit explanation remains available through the styled tooltip. */
.admin-table-actions .btn.is-audit-locked {
    color: #9aa6b2;
    background: #f5f7f9;
    border-color: #dce3e9;
    cursor: not-allowed;
    opacity: .8;
}

.admin-companies-actions {
    min-width: 18rem;
    white-space: nowrap !important;
}

.client-folders-button {
    position: relative;
}

.company-users-button {
    position: relative;
}

.client-folders-count {
    position: absolute;
    top: -.55rem;
    right: -.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding-inline: .28rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #2f6fb2;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 .18rem .45rem rgba(34, 61, 91, .2);
}

.client-folders-count.is-unavailable {
    background: #7b8794;
}

.company-users-count {
    position: absolute;
    top: -.55rem;
    right: -.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding-inline: .28rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #2f6fb2;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 .18rem .45rem rgba(34, 61, 91, .2);
}

.company-users-count.is-unavailable {
    background: #7b8794;
}

.is-action-disabled {
    opacity: .58;
    cursor: not-allowed;
}

.ui-confirm-dialog {
    width: min(36rem, calc(100% - 2rem));
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 1rem;
    background: #fff;
    color: #22364e;
    box-shadow: 0 1.5rem 4rem rgba(24, 43, 66, .28);
}

.ui-confirm-dialog::backdrop {
    background: rgba(25, 45, 70, .68);
    backdrop-filter: blur(2px);
}

.ui-confirm-dialog-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.2rem;
    padding: 2rem;
}

.ui-confirm-dialog-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: #fde9ea;
    color: #af2d32;
    font-size: 1.25rem;
}

.ui-confirm-dialog h2 {
    margin: 0 0 .8rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid #dbe3eb;
    font-size: 1.35rem;
    font-weight: 750;
}

.ui-confirm-dialog p {
    margin-bottom: .55rem;
}

.ui-confirm-dialog .ui-confirm-dialog-warning {
    margin-bottom: 0;
    color: #a7282d;
    font-weight: 700;
}

.ui-editor-dialog-icon {
    background: #e9f3fc;
    color: #2f6fb2;
}
.ui-readonly-dialog-icon { background: #e8f2fb; color: #3477b4; }
.ui-confirm-dialog .ui-readonly-dialog-note { margin-bottom: 0; color: #385c7c; font-weight: 700; }

.client-edit-dialog { width: min(50rem, calc(100% - 2rem)); }
.client-edit-dialog-main { min-width: 0; }
.client-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.15rem; }
.client-edit-field { min-width: 0; }
.client-edit-field.is-wide { grid-column: 1 / -1; }

@media (max-width: 575.98px) {
    .client-edit-grid { grid-template-columns: 1fr; }
    .client-edit-field.is-wide { grid-column: auto; }
}

.company-quota-used {
    margin-block: 1rem;
    padding: .65rem .8rem;
    border: 1px solid #d7e4ef;
    border-radius: .65rem;
    background: #f4f8fb;
    color: #496177;
}

.quota-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.quota-kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 7.2rem;
    padding: 1.2rem;
    border: 1px solid #dce5ed;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .45rem 1.3rem rgba(38, 62, 86, .06);
}

.quota-kpi-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: .9rem;
    font-size: 1.15rem;
}

.quota-kpi-card.is-assigned .quota-kpi-icon { background: #e9f3fc; color: #2f6fb2; }
.quota-kpi-card.is-used .quota-kpi-icon { background: #fcebef; color: #c34562; }
.quota-kpi-card.is-available .quota-kpi-icon { background: #e9f6f0; color: #2f8060; }
.quota-kpi-card.is-companies .quota-kpi-icon { background: #f2edfb; color: #7757b4; }
.quota-kpi-card.is-clients .quota-kpi-icon { background: #e9f3fc; color: #2f6fb2; }
.quota-kpi-card.is-age .quota-kpi-icon { background: #fff3df; color: #c67b24; }

.quota-kpi-card > div {
    display: grid;
    gap: .25rem;
}

.quota-kpi-label {
    color: #697b8c;
    font-size: .82rem;
    font-weight: 700;
}

.quota-kpi-card strong {
    color: #20364d;
    font-size: clamp(1.55rem, 2.2vw, 2.15rem);
    line-height: 1;
}

.quota-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(19rem, .8fr) minmax(28rem, 1.35fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.quota-dashboard-card {
    padding: 1.4rem;
    border: 1px solid #dce5ed;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .45rem 1.3rem rgba(38, 62, 86, .06);
}

.quota-dashboard-card header {
    margin-bottom: 1.15rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid #e2e9ef;
}

.quota-card-eyebrow {
    color: #557c9f;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.quota-dashboard-card h2 {
    margin: .2rem 0 0;
    color: #243a50;
    font-size: 1.15rem;
    font-weight: 750;
}

.quota-donut-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1.5rem, 4vw, 3rem);
    min-height: 16rem;
}

.quota-donut {
    display: grid;
    width: 12.5rem;
    height: 12.5rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(#3f7fbd 0 var(--quota-used-percent), #dce9e3 var(--quota-used-percent) 100%);
    box-shadow: inset 0 0 0 1px rgba(49, 85, 116, .08), 0 .7rem 1.6rem rgba(42, 70, 97, .1);
}

.quota-donut::before {
    grid-area: 1 / 1;
    width: 8.5rem;
    height: 8.5rem;
    border-radius: 50%;
    background: #fff;
    content: "";
    box-shadow: 0 0 0 1px #edf2f6;
}

.quota-donut > div {
    z-index: 1;
    display: grid;
    grid-area: 1 / 1;
    gap: .2rem;
    text-align: center;
}

.quota-donut strong { color: #20364d; font-size: 1.75rem; }
.quota-donut span { color: #718292; font-size: .78rem; font-weight: 700; }

.quota-chart-legend {
    display: grid;
    gap: .85rem;
    min-width: 11rem;
}

.quota-chart-legend > div {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .55rem;
    color: #52687c;
    font-size: .82rem;
}

.quota-chart-legend strong { color: #263d53; font-size: 1rem; }
.quota-legend-dot { width: .7rem; height: .7rem; border-radius: 50%; }
.quota-legend-dot.is-used { background: #3f7fbd; }
.quota-legend-dot.is-available { background: #b9d6c7; }

.quota-ranking-list { display: grid; gap: .75rem; }

.quota-ranking-item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) 3.8rem;
    align-items: center;
    gap: .85rem;
    padding: .75rem;
    border: 1px solid #e0e8ef;
    border-radius: .75rem;
    background: #f9fbfc;
}

.quota-ranking-position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: .6rem;
    background: #e8f1f9;
    color: #326fa9;
    font-size: .78rem;
    font-weight: 800;
}

.quota-ranking-content { min-width: 0; }
.quota-ranking-heading { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .45rem; }
.quota-ranking-heading strong { overflow: hidden; color: #2b4055; text-overflow: ellipsis; white-space: nowrap; }
.quota-ranking-heading span { flex: 0 0 auto; color: #728292; font-size: .76rem; }
.quota-progress { height: .45rem; overflow: hidden; border-radius: 999px; background: #e3eaf0; }
.quota-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4a8ac5, #755fb5); }
.quota-ranking-percent { color: #375b7a; font-size: .88rem; text-align: right; }

.quota-quick-edit-card {
    margin-bottom: 1.35rem;
    padding-bottom: 0;
    overflow: hidden;
}

.quota-quick-edit-card header p {
    margin: .35rem 0 0;
    color: #718292;
}

.quota-quick-edit-scroll {
    max-height: 21rem;
    overflow-y: auto;
    border-top: 1px solid #e0e8ef;
}

.quota-quick-edit-table {
    --bs-table-bg: transparent;
    vertical-align: middle;
}

.quota-quick-edit-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: .8rem 1.15rem;
    border-bottom-color: #dbe5ed;
    background: #edf3f7;
    color: #30475e;
    font-size: .78rem;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.quota-quick-edit-table tbody th,
.quota-quick-edit-table tbody td {
    padding: .7rem 1.15rem;
    border-color: #e5ebf0;
}

.quota-quick-edit-table tbody th { color: #263d53; }
.quota-quick-edit-table tbody tr:last-child > * { border-bottom: 0; }

.quota-value {
    display: inline-flex;
    min-width: 3.25rem;
    justify-content: center;
    padding: .25rem .65rem;
    border: 1px solid #d6e2ec;
    border-radius: 999px;
    background: #f5f8fb;
    color: #27435d;
    font-weight: 700;
}

.quota-value.is-used {
    border-color: #f0d7de;
    background: #fdf2f5;
    color: #ad3e59;
}

.quota-combined-value {
    display: inline-grid;
    grid-template-columns: minmax(2.5rem, auto) auto minmax(2.5rem, auto);
    align-items: center;
    overflow: hidden;
    border: 1px solid #d6e2ec;
    border-radius: 999px;
    background: #f5f8fb;
    color: #27435d;
    font-weight: 700;
}

.quota-combined-value > span { padding: .27rem .65rem; }
.quota-combined-value .is-used { background: #fdf2f5; color: #ad3e59; }
.quota-combined-value .is-assigned { color: #27435d; }
.quota-combined-value .quota-separator {
    padding-inline: .1rem;
    color: #8395a6;
    font-weight: 500;
}

.quota-quick-edit-button {
    width: 2.55rem;
    height: 2.35rem;
    padding: 0;
}

.client-statistics-grid {
    grid-template-columns: minmax(18rem, .75fr) repeat(2, minmax(25rem, 1fr));
}

.client-statistics-grid .quota-donut-layout {
    flex-direction: column;
    gap: 1.35rem;
    min-height: 19rem;
    padding: .75rem 1rem .25rem;
}

.client-statistics-grid .quota-donut {
    width: 10.75rem;
    height: 10.75rem;
}

.client-statistics-grid .quota-donut::before {
    width: 7.25rem;
    height: 7.25rem;
}

.client-statistics-grid .quota-chart-legend {
    width: 100%;
    min-width: 0;
    padding-inline: .5rem;
}

.client-statistics-grid .quota-chart-legend > div {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.client-demographics-section + .client-demographics-section {
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid #e4ebf1;
}

.client-demographics-section h3 {
    margin: 0 0 .85rem;
    color: #50677c;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.client-sex-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.client-sex-grid > div {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .7rem;
    padding: .8rem;
    border: 1px solid #e0e8ef;
    border-radius: .8rem;
    background: #f9fbfc;
    color: #52687c;
}

.client-sex-grid strong { color: #263d53; font-size: .9rem; }

.client-sex-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: .65rem;
}

.client-sex-icon.is-male { background: #e7f1fb; color: #3276b8; }
.client-sex-icon.is-female { background: #faeaf0; color: #c24f77; }

.client-sex-cell,
.client-centered-column {
    text-align: center;
    vertical-align: middle;
}

.client-table-sex-icon {
    width: 2.55rem;
    height: 2.55rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-family: "Segoe UI Symbol", "Segoe UI", sans-serif;
    font-size: 1.65rem;
    font-weight: 400;
    line-height: 1;
}

.client-table-sex-icon.is-male { border-color: #b9d5ec; }
.client-table-sex-icon.is-female { border-color: #e7bdd0; }
.client-age-list { display: grid; gap: .75rem; }

.client-age-row {
    display: grid;
    grid-template-columns: 6.2rem minmax(7rem, 1fr) 6rem;
    align-items: center;
    gap: .8rem;
    color: #52687c;
    font-size: .84rem;
}

.client-age-row > strong { color: #375b7a; font-size: .82rem; text-align: right; }
.client-age-progress { height: .55rem; overflow: hidden; border-radius: 999px; background: #e3eaf0; }
.client-age-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3f7fbd, #7e67b8); }
.client-age-progress.is-personal > span { background: linear-gradient(90deg, #2e8b68, #4c82b5); }
.personal-statistics-card { border-top: .22rem solid #3c8a6c; }

.super-statistics-selector {
    display: grid;
    grid-template-columns: auto minmax(16rem, 1fr) minmax(16rem, 28rem);
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid #dce5ed;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .45rem 1.3rem rgba(38, 62, 86, .06);
}
.super-statistics-selector-icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: .85rem; background: #fff0df; color: #c77b24; }
.super-statistics-selector h2 { margin: 0; color: #243a50; font-size: 1.05rem; font-weight: 750; }
.super-statistics-selector p { margin: .2rem 0 0; color: #6a7b8c; font-size: .85rem; }
.super-statistics-prompt { min-height: 17rem; }
.ui-notice-overlay { position: fixed; z-index: 1090; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(22, 39, 57, .62); backdrop-filter: blur(3px); }
.ui-notice-dialog { display: grid; grid-template-columns: auto 1fr; gap: 1rem; width: min(34rem, 100%); padding: 1.5rem; border-radius: 1rem; background: #fff; box-shadow: 0 1.5rem 4rem rgba(13, 30, 47, .3); }
.ui-notice-icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: #e8f2fb; color: #3477b4; }
.ui-notice-dialog h2 { margin: .15rem 0 .55rem; color: #20364d; font-size: 1.25rem; }
.ui-notice-dialog p { margin: 0; color: #5e7183; line-height: 1.55; }
.ui-notice-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 1rem; border-top: 1px solid #e1e8ee; }

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

@media (max-width: 575.98px) {
    .quota-kpi-grid { grid-template-columns: 1fr; }
    .quota-donut-layout { flex-direction: column; }
    .quota-ranking-heading { display: grid; gap: .15rem; }
    .quota-ranking-heading span { white-space: normal; }
    .client-sex-grid { grid-template-columns: 1fr; }
    .client-age-row { grid-template-columns: 5.2rem minmax(5rem, 1fr); }
    .client-age-row > strong { grid-column: 2; }
    .super-statistics-selector { grid-template-columns: auto 1fr; }
    .super-statistics-selector .form-select { grid-column: 1 / -1; }
}

.ui-confirm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    padding: 1rem 2rem;
    border-top: 1px solid #dbe3eb;
    background: #f3f6f9;
}

.ui-info-tooltip {
    position: absolute;
    z-index: 1090;
    max-width: min(20rem, calc(100vw - 1rem));
    padding: .48rem .7rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: .55rem;
    background: #24384f;
    color: #fff;
    font-size: .78rem;
    font-weight: 650;
    line-height: 1.3;
    text-align: center;
    pointer-events: none;
    white-space: pre-line;
    box-shadow: 0 .45rem 1.2rem rgba(20, 38, 58, .24);
}

.admin-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    font-size: 0.85rem;
}

.admin-status-icon.is-positive {
    color: #287a5b;
    background: #e9f6f0;
    border: 1px solid #b9dfcf;
}

.admin-status-icon.is-negative {
    color: #7b8794;
    background: #f2f5f8;
    border: 1px solid #d8e0e8;
}

.admin-users-table {
    min-width: 1380px;
}

.admin-table .admin-users-table > :not(caption) > * > * {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.admin-table .admin-users-table th {
    vertical-align: middle;
}

.admin-users-cell-center {
    text-align: center;
    vertical-align: middle;
}

.admin-users-cell-nowrap {
    white-space: nowrap;
}

.admin-user-id-audit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    border: 1px solid transparent;
    border-radius: .55rem;
    color: #2f6fb2;
    font-weight: 700;
    cursor: help;
    transition: background-color .16s ease, border-color .16s ease;
}

.admin-user-id-audit:hover,
.admin-user-id-audit:focus-visible {
    border-color: #bfd6ed;
    background: #eaf3fc;
}

.admin-doctor-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.8rem;
    font-size: 1.05rem;
}

.admin-doctor-status.is-doctor {
    color: #2f6fb2;
    background: #eaf3fc;
    border: 1px solid #bfd6ed;
}

.admin-doctor-status.is-not-doctor {
    color: #9aa6b2;
    background: #f5f7f9;
    border: 1px solid #dce3e9;
}

.admin-doctor-status.is-not-doctor::after {
    position: absolute;
    width: 1.55rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    transform: rotate(-42deg);
}

.admin-super-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.8rem;
    font-size: 1.05rem;
}

.admin-super-status.is-super-admin {
    color: #c58a16;
    background: #fff7df;
    border: 1px solid #efd695;
}

.admin-super-status.is-not-super-admin {
    color: #9aa6b2;
    background: #f5f7f9;
    border: 1px solid #dce3e9;
}

.admin-super-status.is-not-super-admin::after {
    position: absolute;
    width: 1.55rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    transform: rotate(-42deg);
}

.admin-broker-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.8rem;
    font-size: 1.05rem;
}

.admin-broker-status.is-broker {
    color: #7a5bae;
    background: #f2edfa;
    border: 1px solid #d8c9ee;
}

.admin-broker-status.is-not-broker {
    color: #9aa6b2;
    background: #f5f7f9;
    border: 1px solid #dce3e9;
}

.admin-broker-status.is-not-broker::after {
    position: absolute;
    width: 1.55rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    transform: rotate(-42deg);
}

.admin-manager-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.8rem;
    font-size: 1.05rem;
}

.admin-manager-status.is-manager {
    color: #2f6fb2;
    background: #eaf3fc;
    border: 1px solid #bfd6ed;
}

.admin-manager-status.is-not-manager {
    color: #9aa6b2;
    background: #f5f7f9;
    border: 1px solid #dce3e9;
}

.admin-manager-status.is-not-manager::after {
    position: absolute;
    width: 1.55rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    transform: rotate(-42deg);
}

.admin-users-table .admin-table-actions {
    min-width: 13.5rem;
    white-space: nowrap !important;
}

.jcode-access-locked {
    color: #9aa6b2;
    background: #f5f7f9;
    border: 1px solid #dce3e9;
    cursor: not-allowed;
}

.admin-table-folders th:nth-child(n+2):nth-child(-n+5),
.admin-table-folders td:nth-child(n+2):nth-child(-n+5) {
    text-align: center;
    vertical-align: middle;
}

/* La vue globale comporte beaucoup de colonnes. Elle conserve des libellés
   lisibles et bascule vers un défilement interne uniquement sur petit écran. */
.admin-folders-overview-table {
    table-layout: auto !important;
}

.admin-table .admin-folders-overview-table thead th,
.admin-folders-overview-table td:nth-child(1),
.admin-folders-overview-table td:nth-child(3),
.admin-folders-overview-table td:nth-child(n+4):nth-child(-n+12) {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
}

.admin-folders-overview-table .admin-sort-button {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.admin-folders-overview-table th:nth-child(n+4):nth-child(-n+7),
.admin-folders-overview-table td:nth-child(n+4):nth-child(-n+7),
.admin-folders-overview-table th:nth-child(10),
.admin-folders-overview-table td:nth-child(10) {
    text-align: center;
}

.admin-folders-overview-table .admin-table-actions {
    min-width: 8.5rem;
    white-space: nowrap !important;
}

.folder-id-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .38rem .55rem;
    border: 1px solid #d5dfeb;
    border-radius: .65rem;
    color: #526b82;
    background: #f2f6fa;
    font-size: .78rem;
    font-weight: 750;
    white-space: nowrap;
}

.folder-id-badge .fas {
    color: #8066b2;
}

.folder-date-badge {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    padding: .38rem .55rem;
    border: 1px solid #d5dfeb;
    border-radius: .65rem;
    color: #425d75;
    background: #f7f9fb;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.folder-date-badge .far {
    color: #6c8196;
}

.jcode-copy {
    position: relative;
    display: inline-flex !important;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid #b9cde0;
    border-radius: .65rem;
    background: #edf5fc;
    color: #246da9;
    line-height: 1;
    vertical-align: middle;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.jcode-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    white-space: nowrap;
}

.jcode-qr-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    color: #397cae;
    background: #eef7fd;
    border: 1px solid #b9d9ef;
    border-radius: .7rem;
}

.jcode-qr-trigger:hover,
.jcode-qr-trigger:focus-visible {
    color: #fff;
    background: #55a9df;
    border-color: #55a9df;
}

.jcode-open {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 1px solid #acd8c8;
    border-radius: .7rem;
    background: #edf8f4;
    color: #258064;
    line-height: 1;
    text-decoration: none;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.jcode-open:hover,
.jcode-open:focus-visible {
    border-color: #369475;
    background: #369475;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.jcode-qr-dialog { width: min(44rem, calc(100% - 2rem)); }
.jcode-qr-dialog-content { padding: 1.5rem; }
.jcode-qr-dialog-heading { display: flex; align-items: flex-start; gap: 1rem; }
.jcode-qr-dialog-heading h2 { margin-bottom: .35rem; }
.jcode-qr-dialog-heading p { color: #62758a; }
.jcode-qr-dialog-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: .9rem;
    color: #397cae;
    background: #eaf5fc;
    font-size: 1.35rem;
}
.jcode-qr-canvas {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20rem;
    margin: 1.1rem 0;
    padding: 1rem;
    border: 1px solid #dce7f0;
    border-radius: 1rem;
    background: #fff;
}
.jcode-qr-canvas canvas { width: min(20rem, 100%); height: auto; image-rendering: pixelated; }
.jcode-qr-url { font-size: .82rem; color: #52677c; }
.jcode-qr-dialog [data-jcode-qr-copy].is-copied {
    color: #26765b;
    background: #e3f5ed;
    border-color: #62a88b;
}
.jcode-qr-dialog .ui-confirm-dialog-actions {
    flex-wrap: nowrap;
    align-items: center;
}

.jcode-qr-dialog .ui-confirm-dialog-actions .btn {
    white-space: nowrap;
}

@media (max-width: 720px) {
    .jcode-qr-dialog .ui-confirm-dialog-actions { flex-wrap: wrap; }
}

@media (max-width: 420px) {
    .jcode-qr-dialog-content { padding: 1rem; }
    .jcode-qr-canvas { min-height: auto; padding: .6rem; }
}

.jcode-copy > .fas {
    display: block;
    width: 1em;
    margin: 0 !important;
    line-height: 1;
    text-align: center;
}

.jcode-copy:hover,
.jcode-copy:focus-visible {
    border-color: #6fa4d1;
    background: #dceefc;
    color: #155b94;
    transform: translateY(-1px);
}

.jcode-copy.is-copied {
    border-color: #62a88b;
    background: #e3f5ed;
    color: #26765b;
}

@media (max-width: 1399.98px) {
    .admin-table-folders .table {
        table-layout: fixed;
        font-size: .88rem;
    }

    .admin-table-folders .table > :not(caption) > * > * {
        padding: .65rem .55rem;
    }

    .admin-table-folders th:nth-child(1),
    .admin-table-folders td:nth-child(1),
    .admin-table-folders th:nth-child(9),
    .admin-table-folders td:nth-child(9) {
        width: 4rem;
    }

    .admin-table-folders th:nth-child(6),
    .admin-table-folders td:nth-child(6),
    .admin-table-folders th:nth-child(7),
    .admin-table-folders td:nth-child(7),
    .admin-table-folders th:nth-child(8),
    .admin-table-folders td:nth-child(8) {
        width: 6rem;
    }

    .admin-table-folders th:nth-child(10),
    .admin-table-folders td:nth-child(10) {
        width: 8rem;
    }
}

@media (max-width: 1199.98px) {
    .admin-folders-overview-table {
        min-width: 73rem;
    }
}

.admin-form-card .form-control,
.admin-form-card .form-select { max-width: none; }

.admin-form-card .form-group {
    margin-bottom: .75rem;
}

.admin-form-card .form-check {
    padding-block: .25rem;
}

.folder-create-card {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.folder-create-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: .3rem;
    background: #3979b7;
    content: "";
}

.folder-create-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #dfe7ee;
    background: linear-gradient(100deg, #edf5fc, #fff 55%);
}

.folder-create-header p {
    color: #657587;
    font-size: .94rem;
}

.folder-create-header-icon {
    display: grid;
    width: 3.15rem;
    height: 3.15rem;
    flex: 0 0 3.15rem;
    place-items: center;
    border-radius: .85rem;
    background: #fff;
    color: #3979b7;
    box-shadow: 0 .2rem .7rem rgba(31, 51, 71, .1);
    font-size: 1.35rem;
}

.folder-create-amount {
    max-width: 34rem;
    padding: 1.4rem 1.5rem 1.15rem;
}

.folder-create-amount .input-group-text {
    min-width: 3rem;
    justify-content: center;
    background: #edf3f8;
    color: #3979b7;
}

.folder-guarantees {
    min-width: 0;
    margin: 0;
    padding: 0 1.5rem 1.35rem;
    border: 0;
}

.folder-guarantees legend {
    width: auto;
    margin-bottom: .75rem;
    color: #34495d;
    font-size: .86rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.folder-guarantees-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.guarantee-option {
    position: relative;
    display: flex;
    min-height: 3.25rem;
    align-items: center;
    gap: .7rem;
    padding: .75rem .9rem;
    border: 1px solid #dce5ed;
    border-radius: .7rem;
    background: #f9fbfd;
    color: #34495d;
    transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.guarantee-option:hover {
    border-color: #9bbbd6;
    background: #f1f7fc;
}

.guarantee-option:has(input:checked) {
    border-color: #6d9fc9;
    background: #e9f3fb;
    box-shadow: inset .22rem 0 #3979b7;
    color: #244f73;
}

.guarantee-option input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 1.05rem;
    margin: 0;
    accent-color: #3979b7;
}

.guarantee-option label {
    flex: 1;
    margin: 0;
    cursor: pointer;
    line-height: 1.3;
}

.folder-create-actions {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid #e4ebf1;
    background: #fbfcfe;
}

.admin-editor-card {
    --editor-accent: #3979b7;
    --editor-soft: #edf5fc;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.admin-editor-companies {
    --editor-accent: #31866f;
    --editor-soft: #e8f5f0;
}

.admin-editor-users {
    --editor-accent: #3979b7;
    --editor-soft: #eaf3fb;
}

.admin-editor-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: .3rem;
    background: var(--editor-accent);
    content: "";
}

.admin-editor-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #dfe7ee;
    background: linear-gradient(100deg, var(--editor-soft), #fff 55%);
}

.admin-editor-header p {
    color: #657587;
    font-size: .94rem;
}

.admin-editor-header-icon {
    display: grid;
    width: 3.15rem;
    height: 3.15rem;
    flex: 0 0 3.15rem;
    place-items: center;
    border-radius: .85rem;
    background: #fff;
    color: var(--editor-accent);
    box-shadow: 0 .2rem .7rem rgba(31, 51, 71, .1);
    font-size: 1.35rem;
}

.admin-editor-body {
    margin: 0;
    padding: 1.4rem 1.5rem;
}

.admin-editor-body .form-label {
    margin-bottom: .4rem;
    color: #34495d;
    font-size: .9rem;
    font-weight: 600;
}

.admin-editor-body .form-control,
.admin-editor-body .form-select,
.admin-editor-body .input-group-text {
    min-height: 2.85rem;
}

.admin-editor-body .input-group-text {
    min-width: 3rem;
    justify-content: center;
    background: var(--editor-soft);
    color: var(--editor-accent);
}

.admin-editor-actions {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid #e4ebf1;
    background: #fbfcfe;
}

@media (max-width: 767.98px) {
    .folder-guarantees-grid {
        grid-template-columns: 1fr;
    }

    .folder-create-header,
    .folder-create-amount,
    .folder-guarantees,
    .folder-create-actions,
    .admin-editor-header,
    .admin-editor-body,
    .admin-editor-actions {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .folder-create-actions .btn,
    .admin-editor-actions .btn {
        width: 100%;
    }
}

.empty-state {
    padding: clamp(2rem, 6vw, 4rem);
    border: 1px dashed #bdc9d4;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .7);
    text-align: center;
}

.empty-state > .fas {
    margin-bottom: 1rem;
    color: #7d91a5;
    font-size: 2rem;
}

.empty-state p {
    color: #64717e;
}

/* Les formulaires simples restent compacts ; les questionnaires utilisent la largeur disponible. */
.form-signin input,
.form-signin select,
.form-signin textarea { max-width: 330px; }

.form-control:focus,
.form-select:focus {
    border-color: #75aeda;
    box-shadow: 0 0 0 .25rem rgba(11, 95, 165, .16);
}

.joss-suggestions {
    position: absolute;
    z-index: 1080;
    overflow: hidden;
    padding: .4rem;
    border: 1px solid #cbd9e6;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 .85rem 2rem rgba(31, 51, 71, .16), 0 .15rem .45rem rgba(31, 51, 71, .08);
    color: #263442;
    backdrop-filter: blur(8px);
}

.joss-suggestions[hidden] { display: none; }

.joss-suggestions-list {
    max-height: min(18rem, 45vh);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #b9cadd transparent;
}

.joss-suggestion {
    display: flex;
    width: 100%;
    align-items: center;
    gap: .7rem;
    padding: .72rem .8rem;
    border: 0;
    border-radius: .55rem;
    background: transparent;
    color: #263442;
    font: inherit;
    line-height: 1.35;
    text-align: left;
    transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.joss-suggestion:hover,
.joss-suggestion.is-active {
    background: #eaf4fc;
    color: #084f87;
}

.joss-suggestion.is-active { transform: translateX(.12rem); }

.joss-suggestion-icon {
    display: inline-grid;
    width: 1.65rem;
    height: 1.65rem;
    flex: 0 0 1.65rem;
    place-items: center;
    border-radius: 50%;
    background: #edf5fb;
    color: #3879a9;
    font-size: .72rem;
    font-weight: 700;
}

.joss-suggestion.is-active .joss-suggestion-icon {
    background: #0b5fa5;
    color: #fff;
}

.joss-suggestion-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.joss-suggestion mark {
    padding: 0;
    border-radius: .15rem;
    background: #d3eafd;
    color: #063f6c;
    font-weight: 700;
}

.joss-suggestions-footer {
    margin: .35rem .35rem 0;
    padding: .55rem .45rem .25rem;
    border-top: 1px solid #e5edf4;
    color: #6c7d8d;
    font-size: .78rem;
}

.joss-suggestions-loading,
.joss-suggestions-empty {
    display: flex;
    min-height: 3.25rem;
    align-items: center;
    gap: .65rem;
    padding: .75rem .8rem;
    color: #6c7d8d;
    font-size: .9rem;
}

.joss-suggestions-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #c9dceb;
    border-top-color: #0b5fa5;
    border-radius: 50%;
    animation: joss-suggestions-spin .7s linear infinite;
}

@keyframes joss-suggestions-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .joss-suggestion { transition: none; }
    .joss-suggestions-spinner { animation-duration: 1.4s; }
}


/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
    .jumbotron {
        margin-top: 20px;
    }

    .body-content {
        padding: 0;
    }
}

.form-signin {
    width: 100%;
    max-width: 330px;
    padding: 15px;
    margin: clamp(1rem, 5vh, 4rem) auto;
    border: 1px solid #dfe5ec;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 .5rem 1.5rem rgba(26, 43, 60, .08);
}

.form-button {
    max-width: 330px;
}

.form-signin .form-button { width: 100%; }

.form-signin .form-group { margin-bottom: 1rem; }

.form-signin .form-control {
    position: relative;
    box-sizing: border-box;
    height: auto;
    padding: 10px;
    font-size: 16px;
}

.form-signin .form-control:focus {
    z-index: 2;
}

.access-portal {
    --portal-accent: #3979b7;
    --portal-soft: #eaf3fb;
    width: min(100%, 32rem);
    margin: clamp(1rem, 5vh, 3.5rem) auto;
    overflow: hidden;
    border: 1px solid #dce5ed;
    border-top: .28rem solid var(--portal-accent);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .8rem 2.2rem rgba(31, 51, 71, .1);
    text-align: center;
}

.access-portal-jcode {
    --portal-accent: #3979b7;
    --portal-soft: #eaf3fb;
}

.access-portal-jcode .access-portal-hero {
    padding-bottom: 1.55rem;
    background: linear-gradient(135deg, #316da9, #4385c2);
}

.access-portal-jcode .access-portal-brand img {
    padding: .35rem .75rem;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .94);
}

.access-portal-jcode .access-portal-icon {
    background: #eaf3fb;
    color: #3979b7;
    box-shadow: 0 .3rem .9rem rgba(19, 51, 82, .18);
}

.access-portal-jcode .access-portal-title {
    color: #fff;
}

.access-portal-jcode .access-portal-subtitle {
    color: rgba(255, 255, 255, .86);
}

.access-portal-jcode .access-portal-form {
    margin-top: 0;
}

.access-portal-brand {
    padding: 1.35rem 1.5rem .65rem;
}

.access-portal-brand img {
    width: 9.5rem;
    max-width: 100%;
    height: auto;
}

.access-portal-icon {
    display: grid;
    width: 4.75rem;
    height: 4.75rem;
    margin: .25rem auto 1rem;
    place-items: center;
    border-radius: 1.25rem;
    background: var(--portal-soft);
    color: var(--portal-accent);
    font-size: 2rem;
    transform: rotate(-3deg);
}

.access-portal-icon > i {
    transform: rotate(3deg);
}

.access-portal-title {
    margin: 0;
    padding-inline: 1.5rem;
    color: #1f3347;
    font-size: clamp(1.35rem, 3vw, 1.7rem);
    font-weight: 700;
}

.access-portal-subtitle {
    max-width: 25rem;
    margin: .55rem auto 0;
    padding-inline: 1.25rem;
    color: #68798a;
    font-size: .95rem;
    line-height: 1.45;
}

.access-portal-form {
    margin-top: 1.35rem;
    padding: 1.25rem 1.5rem 1.5rem;
    border-top: 1px solid #e5ebf1;
    background: #fbfcfe;
    text-align: left;
}

.access-portal-form .form-label {
    margin-bottom: .4rem;
    color: #34495d;
    font-size: .9rem;
    font-weight: 600;
}

.access-portal-form .form-control,
.access-portal-form .input-group-text {
    min-height: 3rem;
}

.access-portal-form .input-group-text {
    min-width: 3.1rem;
    justify-content: center;
    background: var(--portal-soft);
    color: var(--portal-accent);
}

.access-portal-action {
    margin-top: .65rem;
    border-radius: .65rem;
    font-size: 1rem;
    font-weight: 600;
}

.access-portal-validation {
    display: block;
    margin-top: .35rem;
    color: #b4233b;
    font-size: .85rem;
}

@media (max-width: 575.98px) {
    .access-portal {
        margin-block: .5rem 1.5rem;
        border-radius: .85rem;
    }

    .access-portal-form {
        padding: 1.1rem 1rem 1.2rem;
    }
}

.card-deck .card {
    min-width: 220px;
}

.card-head {
    min-height: 75px;
}
.card-header:first-child {
    border-radius: calc(.25rem - 1px) calc(.25rem - 1px) 0 0;
}

.card-header {
    padding: .75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0,0,0,.03);
    border-bottom: 1px solid rgba(0,0,0,.125);
}

.bd-callout {
    padding: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid #eee;
    border-left-width: .25rem;
    border-radius: .25rem;
}

.checkboxlistformat label {
    margin-left: 5px;
}

.questionnaire-shell,
.results-shell {
    width: 100%;
    max-width: 62rem;
    margin-inline: auto;
}

.questionnaire-header {
    --choice-accent: #0b5fa5;
    --choice-soft: #eaf4fc;
    position: relative;
    display: flex;
    overflow: hidden;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1.25rem;
    padding: clamp(.9rem, 1.8vw, 1.15rem) clamp(1.25rem, 3vw, 1.75rem);
    border: 1px solid #dce5ed;
    border-top: .25rem solid var(--choice-accent);
    border-radius: .75rem;
    background: linear-gradient(105deg, #fff 0%, #fff 72%, var(--choice-soft) 145%);
    box-shadow: 0 .35rem 1rem rgba(31, 51, 71, .08);
    color: #263442;
}

.questionnaire-header::after {
    position: absolute;
    top: 50%;
    right: -2rem;
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    background: var(--choice-soft);
    content: "";
    opacity: .55;
    transform: translateY(-50%);
}

.questionnaire-header .alert-heading,
.questionnaire-header h6 {
    margin-bottom: 0;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 650;
    letter-spacing: .015em;
}

.questionnaire-header-icon {
    position: relative;
    z-index: 1;
    display: inline-grid;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--choice-accent) 16%, transparent);
    border-radius: .65rem;
    background: var(--choice-soft);
    color: var(--choice-accent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
    font-size: 1rem;
}

.questionnaire-header h6 {
    position: relative;
    z-index: 1;
}

.questionnaire-choice-heading {
    max-width: 58rem;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.questionnaire-choice-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .65rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    background: #e9f3fb;
    color: #0b5fa5;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.questionnaire-choice-grid {
    display: block;
    width: 100%;
}

.admin-module-heading {
    max-width: 58rem;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.admin-module-grid {
    display: block;
    width: 100%;
}

.questionnaire-choice-card {
    --choice-accent: #0b5fa5;
    --choice-soft: #eaf4fc;
    height: 100%;
    overflow: hidden;
    border: 1px solid #dce5ed;
    border-top: .25rem solid var(--choice-accent);
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 .35rem 1.1rem rgba(31, 51, 71, .07);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.questionnaire-choice-card:hover {
    border-color: #c3d2df;
    border-top-color: var(--choice-accent);
    box-shadow: 0 .8rem 1.8rem rgba(31, 51, 71, .12);
    transform: translateY(-.2rem);
}

.questionnaire-choice-medic {
    --choice-accent: #d65067;
    --choice-soft: #fcecf0;
}

.questionnaire-choice-sport {
    --choice-accent: #31866f;
    --choice-soft: #e8f5f0;
}

.questionnaire-choice-rs {
    --choice-accent: #3979b7;
    --choice-soft: #eaf3fb;
}

.questionnaire-choice-pro {
    --choice-accent: #7b68ad;
    --choice-soft: #f0edf8;
}

.questionnaire-choice-card .card-header {
    padding: 1rem 1.15rem .75rem;
    border: 0;
    background: transparent;
    color: #263442;
}

.questionnaire-choice-card .card-header h6 {
    font-size: .88rem;
    font-weight: 700 !important;
    letter-spacing: .045em;
}

.questionnaire-choice-card .card-body {
    display: flex;
    min-height: 10.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .5rem 1.25rem 1.25rem;
}

.questionnaire-choice-icon-wrap {
    display: grid;
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 0 1.1rem;
    padding: 0;
    place-items: center;
    border-radius: 1.15rem;
    background: var(--choice-soft);
    color: var(--choice-accent);
    transform: rotate(-3deg);
}

.questionnaire-choice-icon {
    font-size: 2rem;
    transform: rotate(3deg);
}

.questionnaire-choice-action {
    min-width: 7.5rem;
    border-radius: .55rem;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .questionnaire-choice-card { transition: none; }
}

.admin-module-card,
.admin-module-header {
    --admin-accent: #316fa9;
    --admin-soft: #eaf3fb;
}

.admin-module-clients,
.admin-module-users {
    --admin-accent: #3979b7;
    --admin-soft: #eaf3fb;
}

.admin-module-folders,
.admin-module-quotas {
    --admin-accent: #7b68ad;
    --admin-soft: #f0edf8;
}

.admin-module-resources,
.admin-module-companies {
    --admin-accent: #31866f;
    --admin-soft: #e8f5f0;
}

.admin-module-statistics {
    --admin-accent: #d18a35;
    --admin-soft: #fff3e3;
}

.admin-module-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid #dce5ed;
    border-top: .25rem solid var(--admin-accent);
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 .35rem 1.1rem rgba(31, 51, 71, .07);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.admin-module-card:hover {
    border-color: #c3d2df;
    border-top-color: var(--admin-accent);
    box-shadow: 0 .8rem 1.8rem rgba(31, 51, 71, .12);
    transform: translateY(-.2rem);
}

.admin-module-card .card-header {
    min-height: 4rem;
    display: grid;
    padding: 1rem 1.15rem .75rem;
    place-items: center;
    border: 0;
    background: transparent;
    color: #263442;
    text-align: center;
}

.admin-module-card .card-header h6 {
    margin: 0;
    font-size: .94rem;
    font-weight: 700 !important;
}

.admin-module-card .card-body {
    display: flex;
    min-height: 10.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .25rem 1.25rem 1.35rem;
}

.admin-module-icon-wrap {
    display: grid;
    width: 4.25rem;
    height: 4.25rem;
    margin: 0 0 1.1rem;
    padding: 0;
    place-items: center;
    border-radius: 1.05rem;
    background: var(--admin-soft);
    color: var(--admin-accent);
    transform: rotate(-3deg);
}

.admin-module-icon {
    font-size: 1.9rem;
    transform: rotate(3deg);
}

.admin-module-action {
    min-width: 7.25rem;
    border-radius: .55rem;
    font-weight: 600;
}

.admin-module-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #dce5ed;
    border-left: .3rem solid var(--admin-accent);
    border-radius: .8rem;
    background: linear-gradient(100deg, var(--admin-soft), #fff 48%);
    box-shadow: 0 .3rem 1rem rgba(31, 51, 71, .06);
}

.admin-module-header-icon {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    flex: 0 0 3.25rem;
    place-items: center;
    border-radius: .85rem;
    background: #fff;
    color: var(--admin-accent);
    box-shadow: 0 .2rem .7rem rgba(31, 51, 71, .1);
    font-size: 1.45rem;
}

.admin-module-header .page-title {
    margin: 0 0 .15rem;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.admin-module-header .page-subtitle {
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .admin-module-card { transition: none; }
}

@media (max-width: 575.98px) {
    .admin-module-header {
        align-items: flex-start;
        padding: .9rem;
    }
}

.question-card {
    margin-left: min(var(--question-indent, 0px), 4.5rem);
    padding: clamp(1rem, 2.5vw, 1.5rem);
    border: 1px solid #dfe5ec;
    border-left: .3rem solid #7aaed5;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 .2rem .8rem rgba(26, 43, 60, .045);
}

.question-card:hover {
    border-color: #bfd0de;
    border-left-color: #0b5fa5;
}

.next-question-card {
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid #d8e3ec;
    border-top: .28rem solid #3979b7;
    border-radius: .9rem;
    background: #fff;
    box-shadow: 0 .65rem 1.8rem rgba(31, 51, 71, .09);
}

.next-question-kicker {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: 0;
    padding: .9rem 1.25rem;
    border-bottom: 1px solid #dfe8f0;
    background: linear-gradient(100deg, #eaf3fb, #f8fbfe 58%);
    color: #285f91;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.next-question-kicker::before {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    place-items: center;
    border-radius: .6rem;
    background: #fff;
    box-shadow: 0 .15rem .5rem rgba(31, 70, 105, .1);
    content: "\f059";
    font-family: "Font Awesome 5 Free";
    font-size: .9rem;
    font-weight: 900;
}

.next-question-text {
    margin: 0;
    padding: 1.25rem 1.25rem 1.1rem;
    color: #203449;
    font-size: clamp(1.05rem, 2vw, 1.22rem);
    font-weight: 500;
    line-height: 1.55;
}

.next-question-divider {
    margin: 0 1.25rem;
    border-color: #dce5ed;
    opacity: 1;
}

.next-question-response {
    margin: 1rem 1.25rem 1.25rem;
    padding: 1rem;
    border: 1px solid #d7e5f1;
    border-radius: .75rem;
    background: #f4f8fc;
}

.next-question-response > :last-child { margin-bottom: 0 !important; }

.next-question-response .btn-group { gap: .55rem; }

.next-question-response .btn-group > .btn {
    min-width: 5rem;
    border-radius: .55rem !important;
}

.next-question-response .form-control,
.next-question-response .form-select,
.next-question-response .input-group-text,
.next-question-response .btn { min-height: 2.8rem; }

.next-question-response .questionnaire-select {
    display: inline-block;
    width: min(100%, 42rem);
    margin-right: .5rem;
    vertical-align: middle;
}

.next-question-extension-divider {
    margin: 0 1.25rem;
    border: 0;
    border-top: 1px dashed #cbd8e3;
    opacity: 1;
}

.next-question-additional {
    min-height: 1.2rem;
    padding: 1rem 1.25rem 1.2rem;
}

.next-question-additional:empty { padding-block: .7rem; }
.next-question-additional > * + * { margin-top: .75rem; }
.next-question-additional .alert { margin-bottom: 0; }

.questionnaire-complement {
    width: min(100%, 46rem);
    padding: 1rem;
    border: 1px solid #d7e3ed;
    border-radius: .85rem;
    background: linear-gradient(135deg, #f8fbfe 0%, #f1f6fa 100%);
    box-shadow: 0 .3rem .8rem rgba(32, 59, 84, .05);
}

.questionnaire-complement-header {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .75rem;
}

.questionnaire-complement-icon {
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    place-items: center;
    border-radius: .6rem;
    background: #e5f0f9;
    color: #286da3;
}

.questionnaire-complement-icon::before {
    content: "\f067";
    font-family: "Font Awesome 5 Free";
    font-size: .8rem;
    font-weight: 900;
}

.questionnaire-complement-label {
    margin: 0;
    color: #314a61;
    font-size: .98rem;
    font-weight: 650;
}

.questionnaire-complement-input {
    max-width: 40rem;
    padding-left: 2.65rem;
}

.questionnaire-complement-input::before {
    position: absolute;
    z-index: 4;
    left: .95rem;
    top: 50%;
    color: #6f8da7;
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-size: .85rem;
    font-weight: 900;
    transform: translateY(-50%);
}

.questionnaire-complement-input .form-control {
    padding-left: .75rem;
}

.questionnaire-context {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .2rem .8rem;
    margin: .85rem 0;
    padding: .8rem 1rem .8rem 3.6rem;
    overflow: hidden;
    border: 1px solid #cbddeb;
    border-left: .25rem solid #4b82b8;
    border-radius: .8rem;
    background: linear-gradient(90deg, #f2f7fb 0%, #f8fbfd 100%);
    color: #294157;
    box-shadow: 0 .25rem .7rem rgba(31, 56, 80, .05);
}

.questionnaire-context::before {
    position: absolute;
    left: 1rem;
    display: inline-grid;
    width: 1.85rem;
    height: 1.85rem;
    place-items: center;
    border-radius: .55rem;
    background: #dcecf8;
    color: #2d70a8;
    content: "\f3c5";
    font-family: "Font Awesome 5 Free";
    font-size: .8rem;
    font-weight: 900;
}

.questionnaire-context-label {
    margin: 0;
    color: #61778b;
    font-size: .75rem;
    font-weight: 750;
    letter-spacing: .06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.questionnaire-context-value {
    grid-column: 2;
    margin: 0;
    color: #20394f;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.4;
}

.questionnaire-context-editable {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-right: .7rem;
}

.questionnaire-context-editable .questionnaire-context-value {
    display: flex;
    grid-column: 2 / 4;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.questionnaire-context-delete {
    display: inline-grid;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    place-items: center;
    padding: 0;
    border: 1px solid #efb8bd;
    border-radius: .6rem;
    background: #fff;
    color: #c93645;
}

.questionnaire-context-delete:hover,
.questionnaire-context-delete:focus {
    border-color: #c93645;
    background: #c93645;
    color: #fff;
}

.question-card .form-control,
.question-card .form-select,
.questionnaire-shell > .alert .form-control,
.questionnaire-shell > .alert .form-select {
    max-width: 100%;
}

.question-card .input-group,
.questionnaire-shell .input-group {
    max-width: 42rem;
}

.question-card .badge {
    white-space: normal;
    line-height: 1.35;
    text-align: left;
}

.questionnaire-shell .alert:not(.questionnaire-header),
.results-shell .alert,
.results-shell .bd-callout {
    border-radius: .75rem;
    box-shadow: 0 .2rem .8rem rgba(26, 43, 60, .04);
}

.next-question-target {
    scroll-margin-top: 5.5rem;
}

.questionnaire-shell .btn,
.results-shell .btn {
    min-height: 2.5rem;
}

.questionnaire-shell .btn-group {
    flex-wrap: wrap;
    gap: .35rem;
}

.questionnaire-shell .btn-group > .btn {
    border-radius: .4rem !important;
}

.questionnaire-select {
    min-width: 0;
    max-width: 42rem !important;
    border-color: #9eb6cc;
    background-color: #fff;
    color: #263442;
    font-weight: 500;
    text-align: left;
}

.questionnaire-select:hover {
    border-color: #6f94b4;
}

.questionnaire-complete {
    padding: clamp(1.25rem, 3vw, 2rem) !important;
    overflow: hidden;
    border: 1px solid #efd47c !important;
    background: #fff8dc !important;
    color: #574400 !important;
}

.questionnaire-complete .alert-heading {
    margin-bottom: .75rem;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.questionnaire-complete p {
    max-width: 50rem;
    line-height: 1.6;
}

.questionnaire-state {
    --state-accent: #56677a;
    --state-accent-dark: #3d4c5d;
    --state-soft: #f3f6f9;
    --state-border: #d7e0e8;
    --state-text: #26384a;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(1.4rem, 3vw, 2rem);
    border: 1px solid var(--state-border);
    border-top: .3rem solid var(--state-accent);
    border-radius: 1rem;
    background: linear-gradient(135deg, #fff 0%, var(--state-soft) 100%);
    color: var(--state-text);
    box-shadow: 0 .75rem 2rem rgba(27, 48, 70, .08);
}

.questionnaire-state::after {
    position: absolute;
    z-index: -1;
    top: -3.5rem;
    right: -3rem;
    width: 11rem;
    height: 11rem;
    border-radius: 50%;
    background: var(--state-accent);
    content: "";
    opacity: .07;
}

.questionnaire-state-pending {
    --state-accent: #b7790f;
    --state-accent-dark: #8a5907;
    --state-soft: #fff8dc;
    --state-border: #efd47c;
    --state-text: #574400;
}

.questionnaire-state-validated {
    --state-accent: #2f8b62;
    --state-accent-dark: #226a49;
    --state-soft: #edf8f2;
    --state-border: #addcc6;
    --state-text: #174c35;
}

.questionnaire-state-sub-complete {
    --state-accent: #6675b8;
    --state-accent-dark: #4d5c9e;
    --state-soft: #f1f3fc;
    --state-border: #c8ceeb;
    --state-text: #354170;
}

.questionnaire-state-journey-complete {
    --state-accent: #2678a9;
    --state-accent-dark: #1b5c84;
    --state-soft: #edf7fc;
    --state-border: #afd5e9;
    --state-text: #173f59;
}

.questionnaire-state-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 .65rem;
    color: var(--state-text);
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
}

.questionnaire-state-title::before {
    display: inline-grid;
    flex: 0 0 2.4rem;
    width: 2.4rem;
    height: 2.4rem;
    place-items: center;
    border-radius: .75rem;
    background: color-mix(in srgb, var(--state-accent) 13%, white);
    color: var(--state-accent);
    content: "\f058";
    font-family: "Font Awesome 5 Free";
    font-size: 1.05rem;
    font-weight: 900;
}

.questionnaire-state-pending .questionnaire-state-title::before { content: "\f46c"; }
.questionnaire-state-journey-complete .questionnaire-state-title::before { content: "\f11e"; }

.questionnaire-state-message {
    max-width: 66rem;
    margin: 0;
    color: inherit;
    font-size: 1.05rem;
    line-height: 1.65;
}

.questionnaire-state-divider {
    margin: 1.15rem 0;
    border: 0;
    border-top: 1px solid var(--state-border);
    opacity: 1;
}

.questionnaire-state-primary,
.questionnaire-state-secondary {
    border-color: var(--state-accent) !important;
    font-weight: 600;
}

.questionnaire-state-primary {
    background: var(--state-accent) !important;
    color: #fff !important;
}

.questionnaire-state-primary:hover,
.questionnaire-state-primary:focus {
    border-color: var(--state-accent-dark) !important;
    background: var(--state-accent-dark) !important;
    color: #fff !important;
}

.questionnaire-state-secondary {
    background: transparent !important;
    color: var(--state-accent-dark) !important;
}

.questionnaire-state-secondary:hover,
.questionnaire-state-secondary:focus {
    background: var(--state-accent) !important;
    color: #fff !important;
}

.questionnaire-state-icon-button {
    display: inline-flex;
    gap: .55rem;
    min-width: auto !important;
    height: 3rem;
    align-items: center;
    justify-content: center;
}

.questionnaire-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    padding-top: .25rem;
}

.questionnaire-actions .btn {
    min-width: min(100%, 13rem);
}

.view-toggle {
    position: relative;
    padding-left: 2.35rem;
}

.view-toggle::before {
    position: absolute;
    left: .85rem;
    content: "\f06e";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.checkboxlistformat {
    display: grid;
    gap: .5rem;
    margin-bottom: 1rem;
}

.checkboxlistformat label {
    margin-left: .45rem;
    cursor: pointer;
}

.questionnaire-shell input[type="checkbox"],
.questionnaire-shell input[type="radio"] {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #0b5fa5;
}

.badge-success { background-color: var(--bs-success); }
.badge-warning { background-color: var(--bs-warning); color: #212529; }
.badge-pill { border-radius: 50rem; }

.results-shell .result-pill {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: .4rem 0 0 !important;
    padding: .55rem .7rem;
    border-radius: .45rem;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
    text-align: left;
}

.results-shell {
    display: grid;
    gap: 1rem;
}

.results-overview {
    position: relative;
    overflow: hidden;
    padding: 1.25rem 1.4rem;
    border: 1px solid #bfd5e9;
    border-top: .3rem solid #397bb5;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f7fbfe 0%, #edf5fb 100%);
    box-shadow: 0 .65rem 1.5rem rgba(30, 58, 84, .07);
}

.results-overview::after {
    position: absolute;
    top: -3rem;
    right: -2rem;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background: #397bb5;
    content: "";
    opacity: .07;
}

.results-overview-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0;
    color: #214f78;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 750;
}

.results-overview-title::before {
    display: inline-grid;
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 2.4rem;
    place-items: center;
    border-radius: .7rem;
    background: #dcecf8;
    color: #2c70aa;
    content: "\f201";
    font-family: "Font Awesome 5 Free";
    font-size: 1rem;
    font-weight: 900;
}

.results-meta {
    position: relative;
    padding: 1rem 1.1rem 1rem 3.8rem;
    border: 1px solid #d8e2eb;
    border-left: .25rem solid #6f9dca;
    border-radius: .8rem;
    background: #fff;
    box-shadow: 0 .25rem .8rem rgba(26, 43, 60, .04);
}

.results-meta::before {
    position: absolute;
    left: 1rem;
    top: 50%;
    display: inline-grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border-radius: .6rem;
    background: #edf5fb;
    color: #3d78ac;
    content: "\f0e0";
    font-family: "Font Awesome 5 Free";
    font-size: .85rem;
    font-weight: 900;
    transform: translateY(-50%);
}

.results-meta-smoker {
    border-left-color: #7b8894;
}

.results-meta-smoker::before {
    background: #f0f2f4;
    color: #65727e;
    content: "\f54d";
}

.results-meta-title {
    margin: 0;
    color: #30465a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
}

.results-section-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .95rem 1.15rem;
    border: 1px solid #b9d9ca;
    border-left: .3rem solid #398561;
    border-radius: .8rem;
    background: linear-gradient(90deg, #edf7f2 0%, #f8fbf9 100%);
    cursor: pointer;
    list-style: none;
}

.results-section-heading::-webkit-details-marker { display: none; }

.results-section-heading::after {
    display: inline-block;
    flex: 0 0 auto;
    color: #398561;
    content: "\f102";
    font-family: "Font Awesome 5 Free";
    font-size: 1.05rem;
    font-weight: 900;
}

.results-collapsible-section:not([open]) > .results-section-heading::after {
    content: "\f103";
}

.results-section-heading:hover {
    border-color: #8fc5aa;
    background: linear-gradient(90deg, #e5f4ec 0%, #f5faf7 100%);
}

.results-section-heading:focus-visible {
    outline: .2rem solid #f0a43c;
    outline-offset: .15rem;
}

.results-collapsible-section {
    display: grid;
    gap: 1rem;
}

.results-collapsible-section:not([open]) {
    gap: 0;
}

.results-section-heading-title,
.results-section-title {
    margin: 0;
    color: #235d43;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.results-section {
    padding: clamp(1.15rem, 2.5vw, 1.5rem);
    border: 1px solid #b9d9ca;
    border-top: .3rem solid #398561;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f4faf7 0%, #eaf5ef 100%);
    color: #244c39;
    box-shadow: 0 .55rem 1.3rem rgba(33, 81, 57, .06);
}

.results-section > p,
.results-decision-card > p {
    margin: .7rem 0 0;
    line-height: 1.55;
}

.results-section-title + p,
.results-decision-title + p {
    font-weight: 650;
}

.results-decision-card {
    padding: 1.15rem;
    border: 1px solid #ecd991;
    border-left: .3rem solid #c98a19;
    border-radius: .85rem;
    background: linear-gradient(135deg, #fffdf5 0%, #fff8de 100%);
    color: #594817;
    box-shadow: 0 .35rem .9rem rgba(81, 64, 20, .05);
}

.results-decision-title {
    margin: 0;
    color: #624d10;
    font-size: 1.15rem;
    font-weight: 750;
}

.results-questionnaire-card {
    padding: 1.2rem;
    border: 1px solid #ccd9e5;
    border-top: .25rem solid #527fa8;
    border-radius: .9rem;
    background: #fff;
    box-shadow: 0 .4rem 1rem rgba(30, 54, 77, .05);
}

.results-questionnaire-title {
    margin: 0 0 1rem;
    color: #284e70;
    font-size: 1.25rem;
    font-weight: 750;
}

.results-questionnaire-card > h6 {
    margin: .25rem 0 .75rem;
    color: #617689;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.results-decision-card-nested {
    margin-top: .8rem;
}

.results-shell .bd-callout {
    margin: .75rem 0 0;
    padding: .85rem 1rem;
    border-width: 1px 1px 1px .25rem;
    border-color: #dbe4eb;
    border-radius: .7rem;
    background: rgba(255, 255, 255, .62);
    box-shadow: none;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.results-shell .bd-callout .alert-heading {
    margin: 0;
    color: inherit;
    font-size: .95rem;
    font-weight: 550;
}

.results-shell .result-pill {
    border-left: .25rem solid #d58c0b;
    background: #fff6d8 !important;
    color: #5b470a !important;
    font-weight: 600;
}

.client-result-message {
    position: relative;
    padding: 1.15rem 1.25rem 1.15rem 4.15rem;
    overflow: hidden;
    border: 1px solid #c9ddeb;
    border-left: .3rem solid #4c82b7;
    border-radius: .9rem;
    background: linear-gradient(135deg, #fff 0%, #f4f8fb 100%);
    box-shadow: 0 .4rem 1rem rgba(31, 55, 78, .05);
}

.client-result-message::before {
    position: absolute;
    left: 1.15rem;
    top: 1.15rem;
    display: inline-grid;
    width: 2.2rem;
    height: 2.2rem;
    place-items: center;
    border-radius: .65rem;
    background: #e4f0f9;
    color: #3475ab;
    content: "\f075";
    font-family: "Font Awesome 5 Free";
    font-size: .95rem;
    font-weight: 900;
}

.client-result-message-title {
    margin: 0 0 .4rem;
    color: #294b68;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .045em;
    line-height: 1.4;
    text-transform: uppercase;
}

.client-result-message-content {
    margin: 0;
    color: #435b70;
    font-size: 1rem;
    line-height: 1.6;
}

.company-view-card {
    position: relative;
    padding: clamp(1.2rem, 2.8vw, 1.55rem);
    overflow: hidden;
    border: 1px solid #bfd5e8;
    border-top: .3rem solid #397bb5;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f7fbfe 0%, #edf5fb 100%);
    color: #264b69;
    box-shadow: 0 .55rem 1.3rem rgba(30, 58, 84, .07);
}

.company-view-card::after {
    position: absolute;
    z-index: 0;
    top: -3rem;
    right: -2.5rem;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background: #397bb5;
    content: "";
    opacity: .06;
}

.company-view-title,
.company-view-content,
.company-view-divider,
.company-view-button {
    position: relative;
    z-index: 1;
}

.company-view-title {
    margin: 0 0 .4rem;
    color: #214f78;
    font-size: clamp(1.25rem, 2.3vw, 1.55rem);
    font-weight: 750;
}

.company-view-content {
    margin: 0;
    color: #4b667d;
    line-height: 1.55;
}

.company-view-divider {
    margin: 1rem 0;
    border: 0;
    border-top: 1px solid #c5d9e8;
    opacity: 1;
}

.company-view-button {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    border-color: #397bb5 !important;
    background: #397bb5 !important;
    color: #fff !important;
    font-weight: 650;
}

.company-view-button:hover,
.company-view-button:focus {
    border-color: #285f8f !important;
    background: #285f8f !important;
    color: #fff !important;
}

.admin-pagination {
    display: flex;
    min-height: 3.5rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem .8rem;
    border: 1px solid #d9e2ea;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 .2rem .65rem rgba(29, 49, 68, .04);
}

.admin-pagination-summary {
    color: #66788a;
    font-size: .85rem;
    font-weight: 550;
}

.admin-pagination .pagination {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .25rem;
}

.admin-pagination .page-link {
    display: inline-grid;
    min-width: 2.2rem;
    min-height: 2.2rem;
    place-items: center;
    padding: .35rem .6rem;
    border: 1px solid #d4dfe8;
    border-radius: .55rem !important;
    background: #f8fafc;
    color: #376b9b;
    font-weight: 650;
    box-shadow: none;
}

.admin-pagination .page-link:hover,
.admin-pagination .page-link:focus {
    border-color: #7ca9d0;
    background: #eaf3fa;
    color: #1f5d92;
}

.admin-pagination .page-item.active .page-link {
    border-color: #3f78ae;
    background: #3f78ae;
    color: #fff;
}

.admin-pagination .page-item.disabled .page-link {
    border-color: transparent;
    background: transparent;
    color: #9aa8b5;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: .2rem solid #f0a43c;
    outline-offset: .15rem;
}

/* Compatibilité temporaire pour les groupes générés par les anciens code-behind. */
.input-group-append,
.input-group-prepend { display: flex; }

@media (max-width: 991.98px) {
    .navbar-collapse { padding-top: .75rem; }
}

@media (max-width: 767.98px) {
    .site-main { padding-block: 1rem 2rem; }
    .admin-breadcrumb-shell { align-items: stretch; flex-direction: column; }
    .admin-breadcrumb-back { align-self: flex-start; }
    .admin-pagination {
        align-items: stretch;
        flex-direction: column;
    }
    .admin-pagination .pagination { justify-content: flex-start; }
    .results-meta { padding-left: 3.45rem; }
    .results-questionnaire-card { padding: 1rem; }
    .results-decision-card { padding: 1rem; }
    .question-card { margin-left: 0; }
    .questionnaire-shell .input-group { align-items: stretch; }
    .questionnaire-shell .input-group > .form-control { min-width: 0; }
    .questionnaire-shell .alert .btn { margin: .2rem 0; }
    .questionnaire-actions { flex-direction: column; }
    .questionnaire-actions .btn { width: 100%; }
    .next-question-kicker,
    .next-question-text {
        padding-right: 1rem;
        padding-left: 1rem;
    }
    .next-question-divider,
    .next-question-extension-divider {
        margin-right: 1rem;
        margin-left: 1rem;
    }
    .next-question-response {
        margin-right: 1rem;
        margin-left: 1rem;
        padding: .8rem;
    }
    .next-question-additional {
        padding-right: 1rem;
        padding-left: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
/* Compact folder status: the full technical value remains available in the tooltip. */
.folder-status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid #d8e1eb;
    border-radius: .7rem;
    background: #f8fafc;
    font-size: 1rem;
    cursor: help;
}

.questionnaire-summary-action {
    position: relative;
    min-width: 2.9rem;
}

.questionnaire-summary-count {
    position: absolute;
    top: -.55rem;
    right: -.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 .25rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #347fbd;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(31, 59, 91, .2);
}

.folder-engine-parameters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
}

.folder-details-dialog {
    width: min(52rem, calc(100vw - 2rem));
    max-height: min(48rem, calc(100vh - 2rem));
    padding: 0;
    overflow: auto;
}

.folder-details-content { padding: 1.5rem 2rem; }
.folder-details-heading { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.25rem; border-bottom: 1px solid #dbe3eb; }
.folder-details-heading h2 { margin: 0 0 .2rem; color: #19324d; font-size: 1.45rem; }
.folder-details-heading p { margin: 0; color: #687b8e; }
.folder-details-heading-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 3rem; height: 3rem; border-radius: .85rem; background: #eaf4fd; color: #347fbd; font-size: 1.15rem; }
.folder-details-section { padding-top: 1.25rem; }
.folder-details-section + .folder-details-section { margin-top: 1.25rem; border-top: 1px solid #dbe3eb; }
.folder-details-section h3 { margin: 0 0 .85rem; color: #304a64; font-size: .82rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.folder-details-questionnaires { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.folder-details-questionnaires li { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .75rem; border: 1px solid #cfe0ef; border-radius: .7rem; background: #f4f9fd; color: #285d8d; font-weight: 700; }
.folder-details-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 0; }
.folder-details-values > div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; border: 1px solid #e0e7ee; border-radius: .65rem; background: #f8fafc; }
.folder-details-values dt { color: #586d82; font-weight: 600; }
.folder-details-values dd { margin: 0; color: #19324d; font-weight: 750; text-align: right; }
.folder-details-boolean { display: inline-flex; align-items: center; justify-content: center; width: 1.55rem; height: 1.55rem; border-radius: 999px; font-size: .82rem; }
.folder-details-boolean.is-yes { border: 1px solid #a9d9c4; background: #e8f6ef; color: #198754; }
.folder-details-boolean.is-no { border: 1px solid #efb8bd; background: #fceced; color: #dc3545; }
.folder-details-empty { margin: 0; color: #687b8e; font-style: italic; }

@media (max-width: 640px) {
    .folder-details-content { padding: 1.25rem; }
    .folder-details-values { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .folder-engine-parameters {
        grid-template-columns: 1fr;
    }
}
.client-result-pdf-button {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-top: 1rem;
}

.client-renewed-access {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 17rem);
    gap: .7rem 1.5rem;
    align-items: center;
    margin-top: 1.25rem;
    padding: 1.15rem;
    border: 1px solid #b9d7c9;
    border-radius: .9rem;
    background: linear-gradient(135deg, #f4fbf7, #edf7f3);
}

.client-renewed-access h5,
.client-renewed-access p,
.client-renewed-access-label,
.client-renewed-access-code { grid-column: 1; }
.client-renewed-access h5 { margin: 0; color: #216d55; font-weight: 800; }
.client-renewed-access p { margin: 0; color: #48675d; }
.client-renewed-access-label { margin-top: .35rem; color: #48675d; font-size: .82rem; font-weight: 750; text-transform: uppercase; }
.client-renewed-access-code {
    display: block;
    width: fit-content;
    max-width: 100%;
    padding: .7rem 1rem;
    overflow-wrap: anywhere;
    border: 1px solid #9bcbb7;
    border-radius: .65rem;
    background: #fff;
    color: #173b63;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 800;
    letter-spacing: .04em;
}
.client-renewed-access-qr {
    grid-column: 2;
    grid-row: 1 / span 5;
    display: grid;
    place-items: center;
    padding: .65rem;
    border: 1px solid #d6e6de;
    border-radius: .8rem;
    background: #fff;
}
.client-renewed-access-qr canvas { display: block; width: min(100%, 15rem); height: auto; image-rendering: pixelated; }
.client-renewed-access-pdf-note { margin-top: .25rem !important; font-size: .9rem; font-weight: 650; }

@media (max-width: 720px) {
    .client-result-message { padding: 4rem 1rem 1rem; }
    .client-renewed-access { grid-template-columns: 1fr; }
    .client-renewed-access-qr { grid-column: 1; grid-row: auto; }
}
