/*
 * Portail syndical CGT — feuille commune.
 * Organisation par composant ; adaptations responsive à proximité du composant.
 * Les priorités !important conservées protègent les variantes et les états existants.
 */

:root {
    --cgt-yellow: #ffcd00;
    --cgt: #e30613;
    --cgt-dark: #ad0712;
    --ink: #1f2937;
    --muted: #64748b;
    --paper: #fff;
    --bg: #f4f6f8;
    --line: #e5e7eb;
    --success: #15803d;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(15,23,42,.08);
}

/* 01. Socle : couleurs, typographie et mise en page
   -------------------------------------------------------------------- */

html body>main:not(.page) {
    width: min(1240px,calc(100% - 2rem));
    padding: 2rem 2.5rem;
}

html body>main:not(.page) form {
    max-width: none;
}

html body>main:not(.page) fieldset>label {
    grid-template-columns: minmax(190px,24%) 1fr;
    align-items: center;
}

html body>main:not(.page) fieldset>label:has(textarea) {
    align-items: start;
}

@media (max-width: 760px) {
    html body>main:not(.page) {
        padding: 1rem;
    }

    html body>main:not(.page) fieldset>label {
        grid-template-columns: 1fr;
    }

}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial,"Helvetica Neue",sans-serif;
    line-height: 1.5;
}

a {
    color: var(--cgt-dark);
}

body>main:not(.page) {
    width: min(1000px,calc(100% - 2rem));
    margin: 2.5rem auto 3rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(1.25rem,4vw,2.25rem);
}

h1 {
    font-size: clamp(1.65rem,4vw,2.25rem);
    line-height: 1.2;
    margin: 0 0 1.1rem;
}

h2 {
    font-size: 1.25rem;
    margin: 1.7rem 0 .75rem;
}

p {
    margin: .7rem 0;
}

small {
    color: var(--muted);
}

.page {
    width: min(1120px,calc(100% - 2rem));
    margin: auto;
    padding: 2rem 0 3rem;
}

.eyebrow {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--cgt-dark);
    font-weight: 800;
    margin: 0 0 .35rem;
}

.page-title {
    font-size: clamp(1.8rem,4vw,2.45rem);
    margin: 0;
}

.lead {
    margin: .4rem 0 1.8rem;
    color: var(--muted);
}

.footer {
    width: min(1120px,calc(100% - 2rem));
    margin: auto;
    padding: 1.2rem 0 2rem;
    color: var(--muted);
    font-size: .82rem;
}

@media (max-width: 760px) {
    body>main:not(.page) {
        width: calc(100% - 1rem);
        margin: 1rem auto;
        padding: 1rem;
        overflow-x: auto;
    }

    .page {
        padding-top: 1.35rem;
    }

}

main>p:first-child:has(>a[href="dashboard.php"]) {
    display: none;
}

main.page {
    width: min(1240px,calc(100% - 2rem));
    margin: 1.5rem auto 3rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(1.25rem,4vw,2.25rem);
}

@media (max-width: 760px) {
    main.page {
        width: calc(100% - 1rem);
        margin: 1rem auto 2rem;
    }

}


/* 02. Formulaires, boutons, tableaux et fenêtres modales
   -------------------------------------------------------------------- */

.action-edit,
table a[href^="document-edit.php"],
table a[href^="module-edit.php"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 122px;
    min-height: 38px;
    padding: .45rem .65rem;
    border-radius: 8px;
    background: var(--cgt-yellow) !important;
    border: 1px solid var(--cgt-yellow) !important;
    color: #161616 !important;
    text-decoration: none;
    font-weight: 700;
    font-size: .82rem;
}

.action-edit:hover,
table a[href^="document-edit.php"]:hover,
table a[href^="module-edit.php"]:hover {
    background: var(--cgt-yellow) !important;
    border-color: var(--cgt-yellow) !important;
    color: #161616 !important;
    filter: brightness(.92);
}

table td:last-child {
    white-space: normal;
    text-align: center;
}

table td:last-child form {
    margin: .55rem 0 0;
    vertical-align: middle;
    gap: .55rem;
    justify-content: center;
}

table td:last-child form button {
    box-sizing: border-box;
    min-width: 122px;
    min-height: 38px;
}

main form label:has(input[type=checkbox]) {
    display: flex;
    align-items: center;
    gap: .55rem;
}

main form label:has(input[type=checkbox]) input {
    width: auto;
}

.editor-toolbar {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
    margin: .6rem 0;
}

.editor-toolbar button {
    background: #64748b;
    border-color: #64748b;
}

td form {
    gap: .55rem;
    align-items: center;
    flex-wrap: wrap;
}

.button-secondary {
    background: #fff !important;
    color: var(--ink) !important;
    border: 1px solid #94a3b8 !important;
}

.overlap-dialog {
    border: 0;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.link-button {
    background: none;
    border: 0;
    color: var(--cgt-dark);
    padding: 0;
    font: inherit;
    text-decoration: underline;
}

.dialog-close {
    margin: 0 0 0 auto !important;
}

.dialog-close button {
    float: right;
    padding: .2rem .55rem;
}

.dialog-actions {
    display: flex;
    gap: .7rem;
}

.danger {
    background: #991b1b;
    border-color: #991b1b;
}

dialog {
    padding: 1.3rem;
}

dialog dl {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: .45rem;
    margin: 1rem 0;
}

dialog dt {
    font-weight: 800;
}

dialog dd {
    margin: 0;
}

form {
    display: grid;
    gap: 1rem;
    max-width: 760px;
    margin: 1.2rem 0;
}

label {
    display: grid;
    gap: .35rem;
    font-weight: 700;
    font-size: .93rem;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: .65rem .72rem;
    font: inherit;
    font-weight: 400;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(227,6,19,.2);
    border-color: var(--cgt);
}

input[type=checkbox] {
    width: auto;
    accent-color: var(--cgt);
}

input[type=color] {
    min-height: 42px;
    padding: .25rem;
}

textarea {
    resize: vertical;
    font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
    line-height: 1.4;
}

button {
    appearance: none;
    cursor: pointer;
    justify-self: start;
    border: 1px solid var(--cgt);
    border-radius: 9px;
    background: var(--cgt);
    color: #fff;
    font: 700 .95rem inherit;
    padding: .7rem 1rem;
}

button:hover {
    background: var(--cgt-dark);
    border-color: var(--cgt-dark);
}

fieldset {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem;
    display: grid;
    gap: .65rem;
}

legend {
    padding: 0 .35rem;
    font-weight: 800;
}

fieldset label {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 400;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    overflow: hidden;
    border-radius: 10px;
    border-style: hidden;
    box-shadow: 0 0 0 1px var(--line);
}

th,
td {
    padding: .75rem;
    text-align: left;
    vertical-align: top;
    border: 1px solid var(--line);
}

th {
    background: #f8fafc;
    font-size: .85rem;
}

td form {
    margin: 0;
    display: inline-flex;
    max-width: none;
}

td button {
    font-size: .82rem;
    padding: .45rem .65rem;
}

[role=alert] {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    color: #991b1b;
    border-radius: 7px;
    padding: .75rem .9rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .65rem .9rem;
    border-radius: 9px;
    background: var(--cgt);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid var(--cgt);
    transition: .15s;
}

.button:hover {
    background: var(--cgt-dark);
    border-color: var(--cgt-dark);
}

.button.light {
    background: #fff;
    color: var(--cgt-dark);
    border-color: #fff;
}

.actions {
    display: grid;
    gap: .7rem;
}

.action-link {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .8rem .9rem;
    font-weight: 700;
}

.action-link:hover {
    border-color: var(--cgt);
    color: var(--cgt-dark);
}

.action-link span {
    color: var(--muted);
    font-weight: 400;
    font-size: .88rem;
}

.action-link b {
    color: var(--cgt);
    font-size: 1.2rem;
}

.notice {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: .8rem .9rem;
    font-size: .92rem;
}

.notice strong {
    display: block;
}

@media (max-width: 760px) {
    table {
        font-size: .86rem;
        min-width: 620px;
    }

}

dialog {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 20px 60px #0005;
    max-width: 520px;
    width: calc(100% - 2rem);
}

dialog::backdrop {
    background: #111827aa;
}

.notice {
    background: #f8fafc;
    border-left-color: var(--cgt-yellow);
}


/* 03. En-tête et navigation
   -------------------------------------------------------------------- */

.portal-nav {
    border-bottom: 1px solid var(--line);
}

.portal-nav>a,
.portal-nav summary {
    white-space: nowrap;
}

.portal-nav details>div {
    display: none;
    border-top: 3px solid var(--cgt);
}

.portal-nav details[open]>div {
    display: grid;
}

.portal-nav details>div a {
    padding: .65rem 1rem;
    color: var(--cgt-dark);
    text-decoration: none;
    font-weight: 600;
}

.portal-nav details>div a:hover {
    background: #fff1f2;
}

.user-menu strong {
    display: block;
}

.user-menu small {
    display: block;
    color: var(--muted);
    font-size: .78rem;
}

.user-menu {
    min-width: 180px;
    text-align: right;
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.header-link {
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
}

.portal-nav {
    display: flex;
    gap: .2rem;
    flex-wrap: wrap;
    width: min(1120px,calc(100% - 2rem));
    background: #fff;
    border: 1px solid var(--line);
    padding: .25rem;
}

.portal-nav>a,
.portal-nav summary {
    display: block;
    padding: .6rem .8rem;
    color: var(--cgt-dark);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.portal-nav summary::-webkit-details-marker {
    display: none;
}

.portal-nav>a:hover,
.portal-nav summary:hover,
.portal-nav details[open] summary {
    background: #fff1f2;
    border-radius: 7px;
}

.portal-nav details {
    position: relative;
}

.portal-nav details>div {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 225px;
    padding: .35rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0 0 9px 9px;
    box-shadow: 0 10px 24px #0002;
}

.portal-nav details a {
    display: block;
    padding: .6rem .75rem;
    color: var(--cgt-dark);
    text-decoration: none;
    font-size: .88rem;
}

.portal-nav details a:hover {
    background: #fff1f2;
    border-radius: 6px;
}

@media (max-width: 760px) {
    .portal-nav {
        display: block;
    }

    .portal-nav>a,
    .portal-nav summary {
        border-bottom: 1px solid var(--line);
    }

    .portal-nav details>div {
        position: static;
        box-shadow: none;
        padding-left: .65rem;
    }

}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10;
    background: #fff;
    padding: .6rem;
    border-radius: .4rem;
}

.portal-header {
    background: var(--paper);
    border-bottom: 4px solid var(--cgt);
}

.header-inner {
    width: min(1120px,calc(100% - 2rem));
    margin: auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    gap: .75rem;
    align-items: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--ink);
}

.brand-mark {
    background: var(--cgt);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-size: .92rem;
}

.logout-link {
    color: var(--cgt-dark);
    font-weight: 700;
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 64px;
    }

    .user-menu span {
        display: none;
    }

}

.portal-header {
    position: sticky !important;
    top: 0;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(15,23,42,.08);
}

.portal-nav {
    position: sticky !important;
    top: 80px;
    z-index: 80;
    margin: 0 auto !important;
    border-radius: 0 0 10px 10px !important;
    box-shadow: 0 5px 12px rgba(15,23,42,.08);
}

@media (max-width: 760px) {
    .portal-nav {
        top: 68px;
    }

}

.nav-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 .3rem;
    border-radius: 999px;
    background: var(--cgt);
    color: #fff;
    font-size: .7rem;
}


/* 04. Avertissement d’inactivité
   -------------------------------------------------------------------- */

.idle-warning>div {
    text-align: center;
}

.idle-warning h2 {
    color: var(--cgt-dark);
}

.idle-warning>div>div {
    align-items: center;
    margin-top: 1.4rem;
}

.idle-warning button,
.idle-warning a {
    min-width: 170px;
}

.idle-warning {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15,23,42,.62);
    padding: 1rem;
    text-align: center;
}

.idle-warning>div {
    width: min(440px,100%);
    background: #fff;
    border-radius: 14px;
    padding: 1.6rem;
    box-shadow: 0 20px 60px #0005;
}

.idle-warning h2 {
    margin-top: 0;
}

.idle-warning[hidden] {
    display: none;
}

.idle-warning .button {
    margin-right: .5rem;
}

.idle-warning>div>div {
    display: flex;
    justify-content: center;
    gap: .75rem;
}

.idle-warning .idle-actions {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 1rem;
    align-items: start;
    margin-top: 1.4rem;
}

.idle-warning .idle-action-column {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .45rem;
    min-width: 0;
}

.idle-warning .idle-button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    margin: 0 !important;
    padding: .7rem 1rem;
    font-size: .95rem;
    line-height: 1.2;
    text-align: center;
}

.idle-warning .idle-countdown {
    min-height: 1.5rem;
    margin: 0;
    color: var(--cgt-dark);
    font-size: .85rem;
    font-weight: 700;
}

.idle-warning .idle-countdown strong {
    color: inherit;
}

@media (max-width: 560px) {
    .idle-warning .idle-actions {
        grid-template-columns: 1fr;
    }

}


/* 05. Comptes et délégations
   -------------------------------------------------------------------- */

html body>main.activation-page {
    width: min(920px,calc(100% - 2rem));
}

.activation-page .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.activation-login,
.activation-step {
    margin: 1.25rem 0;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.activation-login {
    background: #fff8db;
}

.activation-step h2 {
    margin-top: 0;
    font-size: 1.2rem;
}

.authenticator-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.activation-qr-layout {
    display: grid;
    grid-template-columns: 180px minmax(0,1fr);
    align-items: start;
    gap: 1.25rem;
    margin: 1.25rem 0;
}

.activation-qr-layout p:first-child {
    margin-top: 0;
}

.activation-security,
.activation-error {
    padding: .75rem;
    border-left: 4px solid var(--cgt);
    background: #fff1f2;
}

.activation-manual {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7f9fb;
}

.activation-manual summary {
    font-weight: 700;
    cursor: pointer;
}

.activation-manual dt {
    margin-top: .75rem;
    font-weight: 700;
}

.activation-manual dd {
    margin: .25rem 0 0;
}

.activation-page strong,
.activation-secret {
    overflow-wrap: anywhere;
}

.activation-secret {
    user-select: all;
}

.activation-step form>button {
    justify-self: start;
}

@media (max-width: 560px) {
    .activation-step,
    .activation-login {
        padding: 1rem;
    }

    .activation-qr-layout {
        grid-template-columns: minmax(0,1fr);
    }

    .authenticator-downloads .button {
        width: 100%;
    }
}

.account-actions {
    flex-wrap: wrap;
}

.account-actions button {
    min-height: 38px;
}

.account-actions button[name="action"][value="reset_password"],
.account-actions button[name="action"][value="reset_totp"] {
    background: #991b1b;
    border-color: #991b1b;
}

.account-grid + .card {
    margin-top: 1.5rem;
}

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

.account-grid form {
    margin: 0;
    max-width: none;
}

@media (max-width: 760px) {
    .account-grid {
        grid-template-columns: 1fr;
    }

}

.account-action-cell {
    text-align: center;
}

.account-action-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 240px;
    max-width: 100%;
    gap: .55rem;
    margin: 0 auto;
}

.account-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: none;
    gap: .55rem;
    margin: 0 !important;
}

.account-action-stack button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: .65rem .9rem;
    font-size: .9rem;
    line-height: 1.2;
    justify-content: center;
    text-align: center;
}

.account-dialog {
    width: min(620px,calc(100% - 2rem));
    max-width: 620px;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    text-align: left;
}

.account-dialog h2 {
    margin: 0 2.5rem 1rem 0;
}

.account-dialog h3 {
    margin: 0 0 .65rem;
    font-size: 1rem;
}

.account-dialog-section {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
}

.account-dialog-section+.account-dialog-section {
    margin-top: 1rem;
}

table td:last-child .account-dialog form:not(.dialog-close) {
    display: grid;
    max-width: none;
    margin: 0 !important;
    gap: .8rem;
    justify-content: stretch;
}

table td:last-child .account-dialog .dialog-close {
    display: block;
    margin: 0 0 0 auto !important;
}

table td:last-child .account-dialog .dialog-close button {
    width: auto;
    min-width: 0;
    min-height: 0;
}

.account-dialog form>button {
    justify-self: start;
}

.mandate-badge {
    display: inline-block;
    margin: .25rem .2rem 0 0;
    padding: .12rem .4rem;
    border-left: 4px solid var(--badge-color);
    border-radius: 4px;
    background: #f1f5f9;
    font-size: .72rem;
    font-weight: 700;
}

.mandate-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: .3rem;
}

.mandate-badges:empty {
    display: none;
}

.mandate-badges .mandate-badge {
    margin: 0;
}


/* 06. Tableau de bord et éditeur de disposition
   -------------------------------------------------------------------- */

.dashboard-status {
    margin-bottom: 1.2rem;
}

.status-card strong {
    display: block;
    font-size: 2rem;
    color: var(--cgt-dark);
    line-height: 1.05;
}

.status-card progress {
    width: 100%;
    height: .65rem;
    accent-color: var(--cgt);
}

.status-card>a {
    display: inline-block;
    margin-top: .8rem;
    font-weight: 700;
}

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

.dashboard-edit-button {
    font-size: .82rem;
    min-height: 36px;
    padding: .5rem .7rem;
    white-space: nowrap;
}

.dashboard-custom-grid .dashboard-card,
.dashboard-custom-grid .card-size-small {
    grid-column: span 4;
}

.dashboard-custom-grid .card-size-medium {
    grid-column: span 8;
}

.dashboard-custom-grid .card-size-large {
    grid-column: 1/-1;
}

.dashboard-card>strong {
    display: block;
    font-size: 2rem;
    color: var(--cgt-dark);
    line-height: 1.05;
}

.dashboard-card progress {
    width: 100%;
    height: .65rem;
    accent-color: var(--cgt);
}

.dashboard-card>a:not(.button) {
    display: inline-block;
    margin-top: .8rem;
    font-weight: 700;
}

.dashboard-editor-actions {
    position: sticky;
    top: 142px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 12px;
    padding: .8rem;
    margin: 0 0 1rem;
    box-shadow: var(--shadow);
}

.dashboard-editor-actions[hidden],
.hidden-cards-panel[hidden] {
    display: none;
}

.dashboard-editor-actions button {
    padding: .5rem .7rem;
    font-size: .84rem;
}

.device-layout-label {
    color: var(--muted);
    margin-right: auto;
}

.hidden-cards-panel {
    border: 1px dashed #94a3b8;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8fafc;
}

.hidden-cards-panel h2 {
    margin: 0;
}

.hidden-cards-panel p {
    margin: .35rem 0 .7rem;
}

.hidden-cards-panel>div {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.hidden-cards-panel button {
    font-size: .82rem;
    padding: .45rem .65rem;
}

.dashboard-message {
    min-height: 1.5rem;
    color: var(--success);
    font-weight: 700;
}

.card-editor {
    margin: -.65rem -.65rem .85rem;
    padding: .5rem;
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
    background: #f8fafc;
    border: 1px dashed #94a3b8;
    border-radius: 9px;
}

.card-editor[hidden] {
    display: none;
}

.card-editor label {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    margin-left: auto;
}

.card-editor select {
    width: auto;
    padding: .35rem;
    font-size: .8rem;
}

.card-editor button {
    font-size: .78rem;
    padding: .38rem .5rem;
}

.drag-handle {
    cursor: grab;
    touch-action: none;
}

.is-dragging {
    opacity: .65;
    outline: 3px solid var(--cgt);
    z-index: 5;
}

.dashboard-editing .dashboard-card {
    transition: opacity .12s;
    position: relative;
}

.dashboard-editing .dashboard-card-hidden,
.dashboard-card-hidden {
    display: none;
}

@media (max-width: 760px) {
    .dashboard-heading {
        align-items: center;
    }

    .dashboard-heading .lead {
        margin-bottom: 1rem;
    }

    .dashboard-edit-button {
        white-space: normal;
    }

    .dashboard-editor-actions {
        top: 74px;
    }

    .dashboard-custom-grid .dashboard-card,
    .dashboard-custom-grid .card-size-small,
    .dashboard-custom-grid .card-size-medium,
    .dashboard-custom-grid .card-size-large {
        width: 100%;
        margin-bottom: 1rem;
    }

    .card-editor label {
        margin-left: 0;
    }

    .card-editor .card-size,
    .card-editor label:has(.card-size) {
        display: none;
    }

}

.mini-planning {
    grid-column: span 4;
}

.mini-calendar a {
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mini-calendar a.muted {
    opacity: .35;
}

.mini-calendar i {
    margin-top: .25rem;
}

.schedule-list {
    display: grid;
    gap: .55rem;
}

.schedule-list div {
    display: flex;
    gap: .8rem;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: .45rem 0;
}

.schedule-list strong {
    min-width: 85px;
}

.schedule-list i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: .4rem;
}

.mini-planning {
    min-height: 230px;
}

.mini-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mini-title h2 {
    margin: 0;
}

.mini-calendar {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 3px;
    margin-top: .5rem;
}

.mini-calendar a {
    min-height: 27px;
    padding: 3px;
    text-decoration: none;
    color: var(--ink);
    font-size: .72rem;
    border-radius: 4px;
}

.mini-calendar a:hover {
    background: #fff1f2;
}

.mini-calendar i {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    margin: 1px;
}

.mini-calendar .muted {
    color: #94a3b8;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12,1fr);
    gap: 1.2rem;
}

.card {
    grid-column: span 4;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.35rem;
    box-shadow: var(--shadow);
}

.card.primary {
    grid-column: span 8;
    background: linear-gradient(135deg,#e30613,#bd0916);
    color: #fff;
    border: 0;
}

.card.wide {
    grid-column: span 6;
}

.card h2 {
    font-size: 1.15rem;
    margin: 0 0 .4rem;
}

.card p {
    margin: .35rem 0 1rem;
}

.card.primary p {
    color: #ffe9ea;
}

@media (max-width: 760px) {
    .dashboard-grid {
        display: block;
    }

    .card {
        margin-bottom: 1rem;
    }

    .card.primary {
        padding: 1.4rem;
    }

}

.mini-planning[aria-busy="true"] {
    opacity: .55;
    pointer-events: none;
}

.dashboard-custom-grid .dashboard-card.card-size-small {
    grid-column: span 4;
}

.dashboard-custom-grid .dashboard-card.card-size-medium {
    grid-column: span 8;
}

.dashboard-custom-grid .dashboard-card.card-size-large {
    grid-column: 1/-1;
}

@media (max-width: 760px) {
    .dashboard-custom-grid .dashboard-card.card-size-small,
    .dashboard-custom-grid .dashboard-card.card-size-medium,
    .dashboard-custom-grid .dashboard-card.card-size-large {
        width: 100%;
        margin-bottom: 1rem;
    }

}

.dashboard-editing .dashboard-card {
    outline: 1px dashed #94a3b8;
    outline-offset: 2px;
    padding-top: 2.8rem;
}

.dashboard-editing .dashboard-card:hover {
    outline-color: var(--cgt);
}

.dashboard-editing .card-editor {
    position: absolute;
    z-index: 4;
    top: .45rem;
    right: .45rem;
    margin: 0;
    padding: 0;
    display: flex;
    gap: .25rem;
    background: transparent;
    border: 0;
}

.dashboard-editing .card-editor[hidden] {
    display: none;
}

.dashboard-editing .card-editor button {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    min-width: 0;
    padding: 0;
    border-radius: 7px;
    font-size: 1rem;
    line-height: 1;
}

.dashboard-editing .drag-handle {
    cursor: grab;
    background: #fff;
    color: var(--ink);
    border: 1px solid #94a3b8;
    touch-action: none;
}

.dashboard-editing .drag-handle:active {
    cursor: grabbing;
}

.dashboard-editing .hide-card {
    background: #fff;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.dashboard-editing .resize-handle {
    position: absolute;
    z-index: 3;
    top: 22%;
    right: -7px;
    width: 14px;
    height: 56%;
    min-height: 46px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: ew-resize;
    touch-action: none;
}

.dashboard-editing .resize-handle span {
    display: block;
    width: 4px;
    height: 100%;
    margin: auto;
    border-radius: 4px;
    background: #94a3b8;
}

.dashboard-editing .resize-handle:hover span,
.dashboard-editing .is-resizing .resize-handle span {
    background: var(--cgt);
}

.dashboard-editing .is-resizing {
    outline: 3px solid var(--cgt);
    transition: none;
}

@media (max-width: 760px) {
    .dashboard-editing .resize-handle {
        display: none !important;
    }

    .dashboard-editing .dashboard-card {
        padding-top: 2.8rem;
    }

}

.dashboard-edit-button.button {
    min-height: 42px;
    padding: .65rem .9rem;
}


/* 07. Planning et présences
   -------------------------------------------------------------------- */

.calendar .event,
.week .event,
.event {
    border-left-color: var(--event-color,#e30613) !important;
}

.personal-calendar .day {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: var(--ink);
    min-height: 88px;
}

.personal-calendar .day:hover {
    background: #fff1f2;
}

.dots {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: block;
}

.toolbar,
.views,
.nav {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}

.views a,
.nav a {
    padding: .5rem .7rem;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
}

.views a.current {
    background: var(--cgt);
    border-color: var(--cgt);
    color: #fff;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7,minmax(130px,1fr));
    margin-top: 1.2rem;
    overflow: auto;
    border: 1px solid var(--line);
}

.weekday,
.day {
    padding: .55rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.weekday {
    background: #f8fafc;
    font-weight: 700;
}

.day {
    min-height: 125px;
}

.day.muted {
    background: #f8fafc;
    color: var(--muted);
}

.number {
    font-weight: 800;
}

.week {
    display: grid;
    grid-template-columns: repeat(7,minmax(150px,1fr));
    gap: .7rem;
    margin-top: 1rem;
    overflow: auto;
}

.week-day {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .6rem;
    min-height: 180px;
}

.event {
    display: grid !important;
    gap: .1rem;
    width: 100%;
    margin: .45rem 0 !important;
    padding: .45rem .5rem !important;
    text-align: left !important;
    border: 1px solid var(--line) !important;
    border-left-width: 4px !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: var(--ink) !important;
    font-size: .78rem !important;
    box-shadow: none !important;
}

.event:hover {
    border-color: var(--cgt) !important;
}


/* 08. Modules de l’application
   -------------------------------------------------------------------- */

.module-actions-cell {
    text-align: center;
    vertical-align: middle;
}

.module-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
}

main:has(#sections) {
    max-width: 1180px !important;
}

main:has(#sections) form {
    max-width: none !important;
}

main:has(#sections) fieldset {
    margin: 1.75rem 0;
    padding: 1.8rem 2rem;
    background: #f8fafc;
    border-color: #d9e1e8;
}

main:has(#sections) fieldset>label,
main:has(#sections) .module-section label {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .45rem !important;
    align-items: stretch !important;
    font-size: 1rem;
}

main:has(#sections) fieldset>label input,
main:has(#sections) fieldset>label textarea,
main:has(#sections) .module-section input,
main:has(#sections) .module-section textarea {
    font-size: 1rem;
    padding: .8rem .9rem;
}

main:has(#sections) fieldset>label:has(input[type=checkbox]),
main:has(#sections) .module-section label:has(input[type=checkbox]) {
    display: flex !important;
    align-items: center !important;
    gap: .55rem !important;
}

main:has(#sections) .module-section {
    grid-template-columns: 1fr !important;
    background: #fff;
    border-color: #d9e1e8;
    border-radius: 14px;
    padding: 1.8rem;
    margin: 1.25rem 0;
}

main:has(#sections) .module-section .remove-section {
    background: transparent;
    border: 0;
    color: #b91c1c;
    padding: 0;
    font-size: 1rem;
}

main:has(#sections) #add-section {
    background: #64748b;
    border-color: #64748b;
    margin-top: .5rem;
}

main:has(#sections) form>a {
    display: inline-flex;
    margin-left: 1rem;
    align-items: center;
    font-weight: 700;
    color: #64748b;
}

@media (max-width: 760px) {
    main:has(#sections) fieldset,
    main:has(#sections) .module-section {
        padding: 1rem;
    }

}

.module-section {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.module-section label:nth-child(3) {
    grid-column: 1/-1;
}

.module-section .remove-section {
    justify-self: start;
}

@media (max-width: 760px) {
    .module-section {
        grid-template-columns: 1fr;
    }

}

.module-section {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1rem;
    margin: .75rem 0;
    display: grid;
    gap: .7rem;
}

.module-section .remove-section {
    background: #991b1b;
    border-color: #991b1b;
}

.module-actions form {
    display: inline-flex;
    margin: 0 !important;
    gap: .75rem;
    justify-content: center;
}


/* 09. Notifications push
   -------------------------------------------------------------------- */

.notification-layout {
    display: grid;
    grid-template-columns: minmax(0,1.35fr) minmax(280px,.65fr);
    gap: 1.5rem;
    align-items: start;
}

.notification-form {
    max-width: none;
    margin: 0;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.notification-form h2 {
    margin-top: 0;
}

.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.emoji-picker button {
    min-width: 42px;
    padding: .45rem;
    background: #fff;
    border-color: var(--line);
    font-size: 1.15rem;
}

.notification-preview {
    position: sticky;
    top: 165px;
    display: grid;
    gap: .55rem;
    padding: 1.2rem;
    border-radius: 16px;
    background: #f7f8fa;
    border: 1px solid #d8dde5;
    box-shadow: var(--shadow);
}

.notification-preview strong {
    font-size: 1.05rem;
}

.notification-preview p {
    margin: 0;
    white-space: pre-wrap;
}

.notification-preview time {
    color: var(--muted);
    font-size: .8rem;
}

.notification-buttons {
    display: flex;
    gap: .7rem;
    align-items: center;
    flex-wrap: wrap;
}

.notification-actions {
    flex-wrap: wrap;
}

.notification-success {
    background: #ecfdf5;
    border-left: 4px solid #15803d;
    color: #166534;
    padding: .8rem;
    border-radius: 8px;
}

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

.notification-history>article {
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.notification-history h3 {
    margin: 0 0 .4rem;
}

.notification-history article>p {
    white-space: pre-wrap;
}

.notification-actions {
    margin-top: .8rem;
}

.notification-actions form {
    max-width: none;
}

.notification-detail {
    padding: 1.2rem;
    border: 1px solid var(--line);
    border-radius: 12px;
}

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

.notification-detail dl div {
    padding: .7rem;
    background: #f8fafc;
    border-radius: 8px;
}

.notification-detail dt {
    font-weight: 800;
}

.notification-detail dd {
    margin: .2rem 0 0;
}

.pagination {
    display: flex;
    gap: .4rem;
    margin-top: 1.2rem;
}

.pagination a {
    padding: .45rem .7rem;
    border: 1px solid var(--line);
    border-radius: 7px;
    text-decoration: none;
}

.pagination a[aria-current="page"] {
    background: var(--cgt);
    color: #fff;
}

@media (max-width: 800px) {
    .notification-layout {
        grid-template-columns: 1fr;
    }

    .notification-preview {
        position: static;
    }

    .notification-detail dl {
        grid-template-columns: 1fr;
    }

}

.notification-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .55rem;
}

.notification-actions form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .55rem;
    margin: 0;
}

.notification-actions>a.button,
.notification-actions form button {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 180px;
    min-width: 180px;
    min-height: 48px;
    margin: 0;
    padding: .65rem .9rem;
    font-size: .95rem;
    line-height: 1.2;
    text-align: center;
    justify-content: center;
}

.notification-history>article {
    display: grid;
    grid-template-columns: minmax(0,1fr) 180px;
    column-gap: 1.25rem;
    align-items: start;
}

.notification-history>article>h3,
.notification-history>article>p,
.notification-history>article>small {
    grid-column: 1;
}

.notification-history>article>.notification-actions {
    grid-column: 2;
    grid-row: 1/4;
    justify-self: end;
    align-self: start;
    width: 180px;
    margin-top: 0;
}

.notification-history>article>.notification-actions form {
    width: 100%;
}

@media (max-width: 700px) {
    .notification-history>article {
        grid-template-columns: 1fr;
    }

    .notification-history>article>h3,
    .notification-history>article>p,
    .notification-history>article>small {
        grid-column: 1;
        grid-row: auto;
    }

    .notification-history>article>.notification-actions {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        margin-top: .8rem;
    }

}

@media (max-width: 560px) {
    .notification-actions,
    .notification-actions form {
        width: 100%;
    }

    .notification-actions>a.button,
    .notification-actions form button {
        width: 100%;
        min-width: 0;
    }

}


/* 10. Configuration technique et historique
   -------------------------------------------------------------------- */

.env-original {
    max-height: 320px;
    overflow: auto;
    padding: 1rem;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    white-space: pre-wrap;
}

.env-lines {
    display: grid;
    gap: .7rem;
}

.env-line {
    display: grid;
    grid-template-columns: minmax(220px,32%) 1fr;
    align-items: center;
    gap: 1rem;
    padding: .7rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f8fafc;
}

@media (max-width: 760px) {
    .env-line {
        grid-template-columns: 1fr;
        gap: .35rem;
    }

}

.env-warning {
    color: #b91c1c !important;
}

.history-filter {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.history-filter label {
    display: flex;
    align-items: center;
    gap: .35rem;
}


/* 11. Agenda syndical et notifications personnelles
   -------------------------------------------------------------------- */

.agenda-title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.agenda-title form {
    margin: 0;
}

.instance-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.instance-tabs a {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

.instance-tabs a[aria-current=page] {
    background: #fff1f2;
    border-color: var(--cgt);
}

.instance-tabs i {
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
}

.union-calendar .day {
    position: relative;
    min-height: 130px;
}

.add-instance-day {
    position: absolute;
    top: .35rem;
    right: .35rem;
    width: 25px;
    height: 25px;
    min-width: 0;
    padding: 0;
    border-radius: 50%;
    font-size: 1rem;
}

.union-event {
    display: block;
    margin-top: .35rem;
    padding: .35rem .4rem;
    border-left: 4px solid var(--event-color);
    border-radius: 5px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-size: .72rem;
}

.union-event b,
.union-event span {
    display: block;
}

.union-event.cancelled {
    text-decoration: line-through;
    opacity: .5;
}

.instance-dialog {
    width: min(680px,calc(100% - 2rem));
    max-width: 680px;
    border: 0;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px #0004;
}

.instance-dialog::backdrop {
    background: #0008;
}

.form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.instance-type-list {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr));
    gap: 1rem;
}

.instance-type-list form {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
}

[data-instance-form] [hidden],
.instance-schedule-settings [hidden] {
    display: none;
}

[data-instance-form] .instance-checkbox,
.instance-type-list .instance-checkbox {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.instance-form-hint {
    margin: 0;
    color: var(--muted);
    font-size: .875rem;
}

.instance-title-preview {
    margin: 0;
    padding: .75rem;
    background: #f7f9fb;
    border-radius: 8px;
}

html body>main:not(.page) .instance-schedule-settings label {
    display: grid;
    grid-template-columns: minmax(0,1fr);
}

.instance-schedule-settings .form-columns {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: .75rem;
}

.instance-schedule-settings input {
    min-width: 0;
}

.instance-hero {
    border-left: 8px solid var(--instance-color);
    padding: 1.5rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.instance-hero h1 {
    margin: .25rem 0;
}

.instance-hero.cancelled {
    opacity: .65;
}

.response-card {
    margin: 1.2rem 0;
    padding: 1rem;
    border: 1px solid #fdba74;
    background: #fff7ed;
    border-radius: 12px;
}

.response-buttons {
    display: flex;
    flex-wrap: wrap;
}

.admin-instance-edit {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.admin-instance-edit summary {
    font-weight: 800;
    cursor: pointer;
}

.danger-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.danger-actions form {
    margin: 0;
}

.portal-notification-list {
    display: grid;
    gap: .8rem;
}

.portal-notification-list article {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.portal-notification-list article.unread {
    border-left: 5px solid var(--cgt);
}

.portal-notification-list article.read {
    opacity: .7;
}

.portal-notification-list h2 {
    margin: 0;
}

.portal-notification-list article>div {
    display: flex;
    gap: .5rem;
    margin-top: .7rem;
}

.portal-notification-list form {
    margin: 0;
}

.upcoming-instance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: .7rem;
    margin: .8rem 0;
}

.upcoming-instance-grid>a {
    display: grid;
    gap: .2rem;
    padding: .7rem;
    border: 1px solid var(--line);
    border-left: 5px solid var(--instance-color);
    border-radius: 9px;
    text-decoration: none;
    color: var(--ink);
}

.upcoming-instance-grid small {
    font-weight: 700;
}

.response-no_response {
    color: #b45309;
}

.response-present {
    color: var(--success);
}

.response-absent {
    color: #991b1b;
}

.response-pending {
    color: #64748b;
}

@media (max-width: 760px) {
    .agenda-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .union-calendar {
        display: block;
    }

    .union-calendar>.weekday {
        display: none;
    }

    .union-calendar>.day {
        min-height: auto;
        margin-bottom: .5rem;
    }

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

    .instance-schedule-settings .form-columns {
        grid-template-columns: 1fr;
    }

}


/* 12. Activation des fonctionnalités
   -------------------------------------------------------------------- */

.feature-management-form {
    max-width: none;
}

.feature-groups {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 1.2rem;
    align-items: start;
}

.feature-group {
    padding: 1.2rem;
    background: #f8fafc;
    border-radius: 14px;
}

.feature-group legend {
    font-size: 1.15rem;
    color: var(--cgt-dark);
}

.feature-children {
    display: grid;
    gap: .65rem;
    margin-top: .8rem;
}

.feature-switch {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center !important;
    gap: 1rem !important;
    padding: .8rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
}

.feature-switch>span:first-child {
    display: grid;
    gap: .15rem;
}

.feature-switch small {
    font-weight: 400;
    line-height: 1.35;
}

.feature-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-control {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 20px;
    background: #94a3b8;
    transition: .15s;
}

.switch-control::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px #0004;
    transition: .15s;
}

.feature-switch input:checked+.switch-control {
    background: var(--success);
}

.feature-switch input:checked+.switch-control::after {
    transform: translateX(22px);
}

.feature-switch input:focus-visible+.switch-control {
    outline: 3px solid rgba(227,6,19,.25);
}

.feature-switch-master {
    border: 2px solid var(--cgt);
    background: #fff;
}

.feature-confirmation {
    width: 100%;
    max-width: none;
    margin-top: 1.5rem;
}

.feature-confirmation>label {
    display: grid !important;
    grid-template-columns: minmax(180px,24%) minmax(0,1fr) !important;
    align-items: center !important;
    gap: 1rem !important;
}

.feature-confirmation>label>span {
    white-space: nowrap;
}

.feature-confirmation button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.feature-success {
    padding: .8rem .9rem;
    border-left: 4px solid var(--success);
    border-radius: 8px;
    background: #ecfdf5;
    color: #166534;
    font-weight: 700;
}

@media (max-width: 1000px) {
    .feature-groups {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 600px) {
    .feature-switch {
        padding: .7rem;
    }

    .switch-control {
        width: 44px;
    }

    .feature-switch input:checked+.switch-control::after {
        transform: translateX(18px);
    }

    .feature-confirmation>label {
        grid-template-columns: 1fr !important;
        gap: .35rem !important;
    }

    .feature-confirmation>label>span {
        white-space: normal;
    }

}
