/* =========================================================
   AUSGABE â€” EN-TÃŠTE DÃ‰CALÃ‰ ET HISTORIQUE Ã€ DROITE
   ========================================================= */


/* Trois niveaux distincts dans lâ€™en-tÃªte */

:is(#bakeryOutputScreen, #eventOutputScreen), #eventOutputScreen) {
    padding-top: 8px;
}

:is(#bakeryOutputScreen, #eventOutputScreen), #eventOutputScreen) .bakery-dashboard-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 5px 14px;

    margin-top: 0;
    margin-bottom: 28px;
}

:is(#bakeryOutputScreen, #eventOutputScreen) #bakeryOutputEditButton {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: start;
    margin: 0;
}

:is(#bakeryOutputScreen, #eventOutputScreen) #bakeryOutputShiftEndButton {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: start;
    margin: 0;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-dashboard-header h1 {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: center;

    width: 100%;
    margin: 10px 0 0;
    text-align: center;
}


/* Commandes ouvertes Ã  gauche, terminÃ©es Ã  droite */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-output-layout {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(340px, 1fr);
    gap: 24px;
    align-items: start;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-open-orders-panel {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-orders-panel {
    grid-column: 2;
    grid-row: 1;
    min-width: 340px;

    padding: 20px;
    border: 2px solid #b5dfee;
    border-radius: 26px;
    background: #f4faff;
    box-shadow: 0 2px 8px rgba(9, 67, 105, 0.04);
    box-sizing: border-box;
}


/* Barre de menu dÃ©roulant violette */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 15px 13px;
    border-radius: 15px;
    background: #f0edff;
    color: #094369;

    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    cursor: pointer;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary > span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary::after {
    content: "â–¸";
    flex: 0 0 auto;
    color: #8b7ed4;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history[open] summary::after {
    content: "â–¾";
}


/* Historique : numÃ©ro et date sur une seule ligne */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-scroll {
    display: block;
    max-height: 65vh;
    margin-top: 14px;
    padding-right: 5px;
    overflow-y: auto;
    overflow-x: auto;

    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #bab0f4 #edf0f4;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    width: max-content;
    min-width: 100%;
    margin: 0 0 7px;
    padding: 11px 10px;

    border: 1px solid #e3e6ec;
    border-radius: 9px;
    background: #f5f6f8;
    white-space: nowrap;
    box-sizing: border-box;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row strong {
    flex: 0 0 auto;
    color: #094369;
    font-size: 0.95rem;
    font-weight: 800;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row time {
    flex: 0 0 auto;
    color: #667085;
    font-size: 0.8rem;
}


/* Les tests conservent leur fond jaune */

:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row.bakery-test-order {
    background: #fff7d5;
    border-color: #fdbe3f;
}


/* Quand les deux panneaux ne tiennent plus cÃ´te Ã  cÃ´te */

@media (max-width: 820px) {

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-output-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-open-orders-panel {
        grid-column: 1;
        grid-row: 1;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-orders-panel {
        grid-column: 1;
        grid-row: 2;

        width: 100%;
        min-width: 0;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-scroll {
        max-height: 340px;
    }

}


/* Ã‰crans particuliÃ¨rement Ã©troits */

@media (max-width: 380px) {

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-orders-panel {
        padding: 12px;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary {
        padding: 12px 9px;
        font-size: 0.85rem;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row {
        gap: 10px;
        padding: 10px 8px;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row strong {
        font-size: 0.85rem;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row time {
        font-size: 0.72rem;
    }

}

:root {
    --blue: #094369;
    --blue-dark: #094369;
    --blue-light: #e8f3f9;
    --blue-soft: #dcecf5;

    --purple: #bab0f4;
    --purple-dark: #8b7ed4;
    --purple-soft: #f0edff;

    --header-purple: rgba(186, 176, 244, 0.72);

    --green: #bfbd43;
    --green-dark: #78910e;
    --green-soft: #f1f7d7;

    --yellow: #fdbe3f;
    --yellow-soft: #fff7d5;

    --red: #d84b4b;
    --red-dark: #a92d2d;
    --red-soft: #fde7e7;

    --orange: #ef9f38;
    --orange-soft: #fff0db;

    --grey-050: #fafbfc;
    --grey-100: #f4f5f7;
    --grey-150: #eef0f2;
    --grey-200: #e2e5e8;
    --grey-300: #cbd0d5;
    --grey-400: #a5adb5;
    --grey-500: #7b858e;
    --grey-600: #5c6670;
    --grey-700: #3f4850;
    --grey-800: #293138;
    --grey-900: #171c20;

    --white: #ffffff;
    --black: #111111;

    --shadow-small:
        0 2px 8px rgba(20, 35, 50, 0.08);

    --shadow:
        0 8px 24px rgba(20, 35, 50, 0.12);

    --shadow-large:
        0 18px 48px rgba(20, 35, 50, 0.18);

    --radius-small: 10px;
    --radius: 16px;
    --radius-large: 24px;

    --header-height: 64px;

    --content-width: 1280px;

    --transition:
        160ms ease;
}

/* =====================================================================
   RESET
   ===================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--grey-050);
    color: var(--grey-900);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(
            180deg,
            #ffffff 0,
            #f8fafb 240px,
            #f4f6f8 100%
        );
    color: var(--blue-dark);
    line-height: 1.45;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

button,
select {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

img {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

[hidden] {
    display: none !important;
}

/* =====================================================================
   ACCESSIBILITÃƒâ€° / FOCUS
   ===================================================================== */

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(9, 67, 106, 0.28);
    outline-offset: 2px;
}

.app-header {
    position: sticky;
    z-index: 1000;
    top: 0;

    width: 100%;
    height: var(--header-height);

    background: var(--header-purple);

    border-bottom:
        1px solid
        rgba(120, 104, 181, 0.18);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: min(
        100%,
        var(--content-width)
    );

    height: 100%;
    margin: 0 auto;

    padding:
        0
        clamp(14px, 3vw, 30px);
}

.header-logo-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    height: var(--header-height);

    margin: 0;
    padding: 0;

    background: transparent;
    border: 0;
}

.app-header-logo {
    width: auto;

    height: var(--header-height);

    max-width: min(
        46vw,
        350px
    );

    object-fit: contain;
    object-position: left center;
}

.app-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    min-width: 0;

    gap: 10px;
}

.current-person-name {
    overflow: hidden;

    max-width: 220px;

    color: var(--blue-dark);

    font-size: 0.98rem;
    font-weight: 800;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-person-role,
.home-role-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 30px;

    padding:
        5px
        10px;

    background: var(--blue);
    color: var(--white);

    border-radius: 999px;

    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.02em;
}

/*
 * Lehrkraft doit ÃƒÂªtre rouge et non violet.
 */

.current-person-role.teacher-role,
.home-role-label.teacher-role,
.teacher-mode .current-person-role {
    background: var(--red);
    color: var(--white);
}

.header-icon-button {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    padding: 0;

    background:
        rgba(255, 255, 255, 0.72);

    color: var(--blue);

    border:
        1px solid
        rgba(9, 67, 106, 0.1);

    border-radius: 50%;

    box-shadow: var(--shadow-small);

    font-size: 1.2rem;

    transition:
        transform var(--transition),
        background var(--transition);
}

.header-icon-button:hover {
    background: var(--white);
    transform: translateY(-1px);
}

.notification-count {
    position: absolute;
    top: -4px;
    right: -4px;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 20px;
    height: 20px;

    padding: 0 5px;

    background: var(--red);
    color: var(--white);

    border:
        2px solid
        var(--white);

    border-radius: 999px;

    font-size: 0.68rem;
    font-weight: 900;
}

/* =====================================================================
   BREADCRUMB
   ===================================================================== */

/*
 * Le fil d'Ariane est volontairement placÃƒÂ© SOUS le header.
 * Il est violet Ãƒ  100 %, contrairement au header Ãƒ  50 %.
 */

.breadcrumb {
    position: relative;
    z-index: 900;

    display: flex;
    align-items: center;

    width: 100%;

    min-height: 42px;

    padding:
        7px
        max(
            16px,
            calc(
                (100vw - var(--content-width)) / 2 +
                30px
            )
        );

    background: var(--white);

    color: var(--purple-dark);

    gap: 8px;

    box-shadow:
        0 2px 5px
        rgba(20, 35, 50, 0.07);
}

.breadcrumb-item {
    padding: 4px 0;

    background: transparent;
    color: var(--blue-dark);

    border: 0;

    font-weight: 800;
}

.breadcrumb-item:hover {
    text-decoration: underline;
}

.breadcrumb-current {
    overflow: hidden;

    font-size: 0.9rem;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =====================================================================
   SCREENS / LAYOUT
   ===================================================================== */

.screen {
    width: min(
        calc(100% - 28px),
        var(--content-width)
    );

    margin: 0 auto;

    padding:
        clamp(22px, 4vw, 42px)
        0
        60px;
}

.screen-visible {
    animation:
        screen-enter
        180ms
        ease-out;
}

@keyframes screen-enter {
    from {
        opacity: 0;
        transform:
            translateY(5px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0);
    }
}

.screen-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 24px;

    gap: 20px;
}

.screen-header-copy {
    min-width: 0;
}

.screen-title,
.screen-header h1 {
    margin-bottom: 6px;

    color: var(--blue-dark);

    font-size:
        clamp(
            1.7rem,
            4vw,
            2.55rem
        );

    line-height: 1.1;
}

.screen-subtitle,
.screen-header p {
    max-width: 760px;

    margin-bottom: 0;

    color: var(--grey-600);

    font-size:
        clamp(
            0.92rem,
            2vw,
            1.05rem
        );
}

/* =====================================================================
   LOGIN / IDENTITÃƒâ€°
   ===================================================================== */

.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;

    padding: 28px;
}

.login-card {
    width: min(
        100%,
        760px
    );

    padding:
        clamp(
            26px,
            5vw,
            50px
        );

    background:
        rgba(
            255,
            255,
            255,
            0.94
        );

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius-large);

    box-shadow:
        var(--shadow-large);

    text-align: center;
}

.login-logo {
    width: min(
        100%,
        360px
    );

    max-height: 120px;

    margin:
        0 auto
        28px;

    object-fit: contain;
}

.login-card h1 {
    margin-bottom: 10px;

    color: var(--blue-dark);

    font-size:
        clamp(
            1.8rem,
            5vw,
            2.7rem
        );
}

.login-card > p {
    margin-bottom: 26px;

    color: var(--grey-600);
}

.people-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                150px,
                1fr
            )
        );

    gap: 14px;
}

.person-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 138px;

    padding: 18px;

    background: var(--white);

    color: var(--blue-dark);

    border:
        2px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);

    gap: 6px;

    transition:
        border-color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.person-card:hover {
    border-color: var(--blue);

    box-shadow: var(--shadow);

    transform:
        translateY(-2px);
}

.person-card strong {
    font-size: 1rem;
}

.person-card small {
    color: var(--grey-500);
}

.person-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;

    margin-bottom: 5px;

    background: var(--blue-light);

    border-radius: 50%;

    font-size: 1.7rem;
}

/* =====================================================================
   PIN
   ===================================================================== */

.pin-card {
    width: min(
        100%,
        470px
    );
}

.pin-input {
    width: 100%;

    margin:
        10px 0
        16px;

    padding:
        16px
        18px;

    background: var(--white);

    color: var(--blue-dark);

    border:
        2px solid
        var(--grey-300);

    border-radius:
        var(--radius-small);

    font-size: 1.55rem;
    font-weight: 900;

    letter-spacing: 0.35em;
    text-align: center;
}

.pin-input:focus {
    border-color: var(--blue);
}

/* =====================================================================
   SCHOOL CLOSED
   ===================================================================== */

.school-closed-screen {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;

    padding: 28px;
}

.school-closed-card {
    width: min(
        100%,
        680px
    );

    padding:
        clamp(
            30px,
            6vw,
            58px
        );

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius-large);

    box-shadow:
        var(--shadow-large);

    text-align: center;
}

.school-closed-logo {
    width: min(
        100%,
        330px
    );

    margin:
        0 auto
        24px;
}

.large-screen-icon {
    margin-bottom: 12px;

    font-size:
        clamp(
            3rem,
            8vw,
            5rem
        );
}

.school-closed-card h1 {
    margin-bottom: 14px;

    color: var(--blue-dark);

    font-size:
        clamp(
            1.6rem,
            5vw,
            2.4rem
        );
}

.school-closed-card p {
    margin-bottom: 14px;

    color: var(--grey-600);

    font-size: 1.05rem;
}

.school-closed-card strong {
    display: inline-block;

    padding:
        8px
        14px;

    background: var(--purple-soft);

    color: var(--purple-dark);

    border-radius: 999px;
}

/* =====================================================================
   HOME
   ===================================================================== */

.home-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 26px;

    gap: 18px;
}

.home-welcome h1 {
    margin-bottom: 5px;

    color: var(--blue-dark);

    font-size:
        clamp(
            1.8rem,
            4vw,
            2.7rem
        );
}

.home-welcome p {
    margin-bottom: 0;

    color: var(--grey-600);
}

.home-grid,
.menu-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                220px,
                1fr
            )
        );

    gap:
        clamp(
            14px,
            2.5vw,
            22px
        );
}

.home-tile,
.menu-tile {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;

    min-height: 190px;

    padding:
        clamp(
            20px,
            3vw,
            28px
        );

    overflow: hidden;

    background: var(--white);
    color: var(--blue-dark);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius-large);

    box-shadow:
        var(--shadow-small);

    text-align: left;

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.home-tile:hover,
.menu-tile:hover {
    border-color:
        rgba(
            120,
            104,
            181,
            0.45
        );

    box-shadow: var(--shadow);

    transform:
        translateY(-3px);
}

.home-tile-icon,
.menu-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 62px;
    height: 62px;

    margin-bottom: 18px;

    background: var(--blue-light);

    border-radius: 18px;

    font-size: 2rem;
}

.home-tile strong,
.menu-tile strong {
    display: block;

    margin-bottom: 5px;

    font-size: 1.18rem;
}

.home-tile small,
.menu-tile small {
    color: var(--grey-500);

    font-size: 0.88rem;
}

.test-badge {
    position: absolute;
    top: 14px;
    right: 14px;

    padding:
        5px
        9px;

    background: var(--yellow);

    color: #624900;

    border-radius: 999px;

    font-size: 0.68rem;
    font-weight: 900;

    text-transform: uppercase;
}

/* =====================================================================
   ACTIONS / BUTTONS
   ===================================================================== */

.primary-action,
.secondary-action,
.danger-action,
.back-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding:
        10px
        16px;

    border-radius:
        var(--radius-small);

    font-weight: 800;

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        background var(--transition),
        border-color var(--transition);
}

.primary-action {
    background: var(--blue);
    color: var(--white);

    border:
        2px solid
        var(--blue);
}

.primary-action:hover:not(:disabled) {
    background: var(--blue-dark);
    border-color: var(--blue-dark);

    box-shadow: var(--shadow-small);

    transform:
        translateY(-1px);
}

.secondary-action {
    background: var(--white);
    color: var(--blue);

    border:
        2px solid
        var(--blue);
}

.secondary-action:hover:not(:disabled) {
    background: var(--blue-light);
}

.danger-action {
    background: var(--white);
    color: var(--red);

    border:
        2px solid
        var(--red);
}

.danger-action:hover:not(:disabled) {
    background: var(--red-soft);
}

.back-action {
    background: transparent;
    color: var(--blue);

    border:
        1px solid
        var(--grey-300);
}

.back-action:hover {
    background: var(--white);
}

.full-width-action {
    width: 100%;
}

/* =====================================================================
   CARDS / PANELS
   ===================================================================== */

.panel,
.card {
    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);
}

.panel {
    padding:
        clamp(
            18px,
            3vw,
            26px
        );
}

.section-card {
    margin-bottom: 20px;

    padding:
        clamp(
            18px,
            3vw,
            26px
        );

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);
}

.section-card h2 {
    margin-bottom: 16px;

    color: var(--blue-dark);

    font-size: 1.3rem;
}

/* =====================================================================
   TEST BANNERS
   ===================================================================== */

.test-banner {
    display: flex;
    align-items: flex-start;

    margin-bottom: 18px;

    padding:
        12px
        15px;

    background: var(--yellow-soft);

    color: #5c4800;

    border:
        1px solid
        rgba(
            180,
            135,
            0,
            0.28
        );

    border-radius:
        var(--radius-small);

    gap: 10px;
}

.test-banner::before {
    content: "Ã¢Å¡ Ã¯Â¸Â";

    flex: 0 0 auto;
}

.test-banner strong {
    display: block;

    margin-bottom: 2px;
}

/* =====================================================================
   KASSE Ã¢â‚¬â€ LAYOUT
   ===================================================================== */

.cashier-layout {
    display: grid;

    grid-template-columns:
        minmax(
            0,
            1fr
        )
        minmax(
            290px,
            380px
        );

    align-items: start;

    gap:
        clamp(
            16px,
            3vw,
            28px
        );
}

.cashier-products,
.cashier-cart {
    min-width: 0;
}

.cashier-cart {
    position: sticky;

    top:
        calc(
            var(--header-height) +
            58px
        );

    padding: 20px;

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow);
}

.cashier-cart h2 {
    margin-bottom: 16px;

    color: var(--blue-dark);
}

/* =====================================================================
   PRODUCT GRID Ã¢â‚¬â€ KASSE
   ===================================================================== */

.sale-product-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(
                150px,
                1fr
            )
        );

    gap: 12px;
}

.sale-product-card {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 142px;

    padding: 16px 12px;

    background: var(--white);

    color: var(--blue-dark);

    border:
        2px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);

    gap: 5px;

    text-align: center;

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.sale-product-card:hover {
    border-color: var(--blue);

    box-shadow: var(--shadow);

    transform:
        translateY(-2px);
}

.sale-product-card:active {
    transform:
        translateY(0)
        scale(0.98);
}

.sale-product-icon {
    margin-bottom: 3px;

    font-size: 2rem;
}

.sale-product-card strong {
    line-height: 1.2;
}

.sale-product-card > span:last-of-type {
    color: var(--grey-600);

    font-weight: 700;
}

.product-quantity-badge {
    position: absolute;
    top: 8px;
    right: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 27px;
    height: 27px;

    padding: 0 7px;

    background: var(--green);
    color: #304000;

    border-radius: 999px;

    font-size: 0.78rem;
    font-weight: 900;
}

/* =====================================================================
   CART
   ===================================================================== */

.cart-items {
    display: flex;
    flex-direction: column;

    gap: 9px;
}

.empty-cart,
.empty-state {
    padding:
        22px
        16px;

    color: var(--grey-500);

    text-align: center;
}

.cart-row {
    display: grid;

    grid-template-columns:
        minmax(
            0,
            1fr
        )
        auto
        auto;

    align-items: center;

    padding:
        10px
        0;

    border-bottom:
        1px solid
        var(--grey-150);

    gap: 10px;
}

.cart-row:last-child {
    border-bottom: 0;
}

.cart-row > div:first-child {
    min-width: 0;
}

.cart-row strong {
    display: block;
}

.cart-row small {
    display: block;

    margin-top: 2px;

    color: var(--grey-500);
}

.quantity-control {
    display: inline-flex;
    align-items: center;

    overflow: hidden;

    background: var(--grey-100);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        999px;
}

.quantity-control button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    padding: 0;

    background: transparent;
    color: var(--blue);

    border: 0;

    font-size: 1.15rem;
    font-weight: 900;
}

.quantity-control button:hover {
    background: var(--blue-light);
}

.quantity-control span {
    min-width: 30px;

    font-weight: 850;

    text-align: center;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 14px;

    padding-top: 16px;

    border-top:
        2px solid
        var(--grey-200);

    gap: 16px;

    font-size: 1.15rem;
}

.cart-total-row strong {
    color: var(--blue-dark);

    font-size: 1.35rem;
}

/* =====================================================================
   PAYMENT
   ===================================================================== */

.payment-layout {
    display: grid;

    grid-template-columns:
        minmax(
            280px,
            430px
        )
        minmax(
            280px,
            430px
        );

    justify-content: center;

    gap:
        clamp(
            20px,
            4vw,
            42px
        );
}

.payment-summary {
    padding:
        clamp(
            22px,
            4vw,
            34px
        );

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius-large);

    box-shadow:
        var(--shadow);
}

.payment-line {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        12px
        0;

    border-bottom:
        1px solid
        var(--grey-150);

    gap: 20px;
}

.payment-line:last-child {
    border-bottom: 0;
}

.payment-line strong {
    color: var(--blue-dark);

    font-size: 1.2rem;
}

.payment-change {
    margin-top: 12px;

    padding:
        15px;

    background: var(--green-soft);

    border-radius:
        var(--radius-small);
}

.payment-keypad {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            1fr
        );

    gap: 10px;
}

.payment-key {
    min-height: 64px;

    padding: 10px;

    background: var(--white);
    color: var(--blue-dark);

    border:
        2px solid
        var(--grey-200);

    border-radius:
        var(--radius-small);

    box-shadow:
        var(--shadow-small);

    font-size: 1.25rem;
    font-weight: 900;

    transition:
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.payment-key:hover {
    background: var(--blue-light);
    border-color: var(--blue);
}

.payment-key:active {
    transform:
        scale(0.97);
}

.payment-delete {
    color: var(--red);
}

.payment-paid-button {
    grid-column:
        1 / -1;

    min-height: 58px;

    margin-top: 6px;
}

/* =====================================================================
   SUCCESS
   ===================================================================== */

.success-card {
    width: min(
        100%,
        650px
    );

    margin:
        20px auto;

    padding:
        clamp(
            30px,
            6vw,
            55px
        );

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius-large);

    box-shadow:
        var(--shadow-large);

    text-align: center;
}

.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 86px;
    height: 86px;

    margin:
        0 auto
        18px;

    background: var(--green-soft);
    color: var(--green-dark);

    border-radius: 50%;

    font-size: 2.7rem;
}

.success-card h1 {
    color: var(--blue-dark);
}

.order-number-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 170px;

    margin:
        10px 0
        22px;

    padding:
        14px
        24px;

    background: var(--purple);

    color: var(--blue-dark);

    border-radius:
        var(--radius);

    font-size:
        clamp(
            2.1rem,
            7vw,
            3.5rem
        );

    font-weight: 950;
    letter-spacing: 0.08em;
}

/* =====================================================================
   FREE DRINKS
   ===================================================================== */

.free-drinks-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.quantity-product-row {
    display: grid;

    grid-template-columns:
        auto
        minmax(
            0,
            1fr
        )
        auto;

    align-items: center;

    padding:
        12px
        14px;

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius-small);

    gap: 12px;
}

.quantity-product-row > span:first-child {
    font-size: 1.45rem;
}

/* =====================================================================
   FORMULAIRES
   ===================================================================== */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;

    min-width: 0;

    gap: 6px;
}

.form-field-full {
    grid-column:
        1 / -1;
}

.form-field label,
.form-field > span {
    color: var(--grey-700);

    font-size: 0.88rem;
    font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea,
.text-input,
.select-input {
    width: 100%;

    min-height: 44px;

    padding:
        10px
        12px;

    background: var(--white);
    color: var(--grey-900);

    border:
        1.5px solid
        var(--grey-300);

    border-radius:
        var(--radius-small);

    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.form-field textarea {
    min-height: 105px;

    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.text-input:focus,
.select-input:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px
        rgba(9, 67, 106, 0.09);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    grid-column:
        1 / -1;

    margin-top: 5px;

    gap: 10px;
}

.form-message,
.error-message {
    min-height: 1.4em;

    margin:
        8px 0
        0;

    color: var(--red);

    font-size: 0.9rem;
    font-weight: 700;
}

.success-message {
    color: var(--green-dark);
}

/* =====================================================================
   INVENTUR
   ===================================================================== */

.inventory-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.inventory-count-row,
.teacher-inventory-row {
    display: grid;

    grid-template-columns:
        minmax(
            0,
            1fr
        )
        auto;

    align-items: center;

    padding:
        14px 16px;

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);

    gap: 16px;
}

.inventory-product-info {
    display: flex;
    align-items: center;

    min-width: 0;

    gap: 12px;
}

.inventory-product-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 46px;
    height: 46px;

    background: var(--blue-light);

    border-radius: 13px;

    font-size: 1.5rem;
}

.inventory-product-info strong,
.inventory-product-info small {
    display: block;
}

.inventory-product-info small {
    margin-top: 3px;

    color: var(--grey-500);
}

.inventory-count-input {
    width: 100px;

    min-height: 48px;

    padding:
        8px
        10px;

    background: var(--blue-light);
    color: var(--blue-dark);

    border:
        2px solid
        rgba(9, 67, 106, 0.28);

    border-radius:
        var(--radius-small);

    font-size: 1.1rem;
    font-weight: 900;

    text-align: center;
}

.inventory-count-input:focus {
    border-color: var(--blue);

    outline: none;

    box-shadow:
        0 0 0 3px
        rgba(9, 67, 106, 0.1);
}

.teacher-stock-form {
    display: grid;

    grid-template-columns:
        90px
        115px
        auto;

    align-items: center;

    gap: 8px;
}

.teacher-stock-form input {
    min-width: 0;

    min-height: 42px;

    padding:
        8px
        10px;

    border:
        1.5px solid
        var(--grey-300);

    border-radius:
        var(--radius-small);
}

/* =====================================================================
   SUBMISSIONS INVENTUR
   ===================================================================== */

.submission-card {
    margin-bottom: 12px;

    padding: 16px;

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);
}

.submission-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 12px;

    gap: 12px;
}

.submission-card-header strong {
    color: var(--blue-dark);
}

.submission-card-header small {
    color: var(--grey-500);
}

.submission-items {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                180px,
                1fr
            )
        );

    gap: 7px;
}

.submission-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        8px
        10px;

    background: var(--grey-100);

    border-radius: 8px;

    gap: 12px;
}
/* =====================================================================
   PRODUKTE Ã¢â‚¬â€ ADMINISTRATION
   ===================================================================== */

.product-filter-tabs,
.report-period-tabs,
.report-sort-tabs,
.notification-tabs {
    display: flex;
    flex-wrap: wrap;

    margin-bottom: 18px;

    gap: 8px;
}

.product-filter-tabs button,
.report-period-tabs button,
.report-sort-tabs button,
.notification-tabs button {
    min-height: 40px;

    padding:
        8px
        14px;

    background: var(--white);
    color: var(--blue);

    border:
        1.5px solid
        var(--grey-300);

    border-radius: 999px;

    font-weight: 800;

    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition);
}

.product-filter-tabs button.active,
.report-period-tabs button.active,
.report-sort-tabs button.active,
.notification-tabs button.active {
    background: var(--blue);
    color: var(--white);

    border-color: var(--blue);
}

.product-admin-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.product-admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        13px
        15px;

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);

    gap: 18px;
}

.product-admin-main {
    display: flex;
    align-items: center;

    min-width: 0;

    gap: 12px;
}

.product-admin-main > span {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 46px;
    height: 46px;

    background: var(--blue-light);

    border-radius: 13px;

    font-size: 1.55rem;
}

.product-admin-main strong,
.product-admin-main small {
    display: block;
}

.product-admin-main small {
    margin-top: 3px;

    color: var(--grey-500);
}

.product-admin-actions {
    display: flex;
    align-items: center;

    flex: 0 0 auto;

    gap: 7px;
}

/* =====================================================================
   RECHNUNGEN
   ===================================================================== */

.invoice-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.invoice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        14px
        16px;

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);

    gap: 18px;
}

.invoice-row > div {
    min-width: 0;
}

.invoice-row > div:last-child {
    text-align: right;
}

.invoice-row strong,
.invoice-row small {
    display: block;
}

.invoice-row strong {
    color: var(--blue-dark);
}

.invoice-row small {
    margin-top: 3px;

    color: var(--grey-500);
}

.inventory-invoice-context-card {
    margin-bottom: 18px;

    padding:
        14px
        16px;

    background: var(--yellow-soft);

    border:
        1px solid
        rgba(180, 135, 0, 0.25);

    border-radius:
        var(--radius);
}

.inventory-invoice-context-card strong,
.inventory-invoice-context-card span {
    display: block;
}

.inventory-invoice-context-card span {
    margin-top: 3px;

    color: var(--grey-600);
}

/* =====================================================================
   SCHÃƒÅ“LER
   ===================================================================== */

.students-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.student-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        14px
        16px;

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);

    gap: 18px;
}

.student-row-main {
    display: flex;
    align-items: center;

    min-width: 0;

    gap: 12px;
}

.student-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 46px;
    height: 46px;

    background: var(--purple-soft);

    border-radius: 50%;

    font-size: 1.35rem;
}

.student-row-main strong,
.student-row-main small {
    display: block;
}

.student-row-main small {
    margin-top: 3px;

    color: var(--grey-500);
}

.student-row-actions {
    display: flex;
    align-items: center;

    flex: 0 0 auto;

    gap: 7px;
}

/* =====================================================================
   NOTIFICATIONS Ã¢â‚¬â€ HEADER POPOVER
   ===================================================================== */

.notification-popover {
    position: fixed;
    z-index: 1600;

    top:
        calc(
            var(--header-height) -
            4px
        );

    right:
        max(
            14px,
            calc(
                (100vw - var(--content-width)) / 2 +
                20px
            )
        );

    width:
        min(
            calc(100vw - 28px),
            390px
        );

    max-height:
        min(
            620px,
            calc(100vh - 95px)
        );

    overflow: auto;

    padding: 14px;

    background:
        rgba(255, 255, 255, 0.98);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-large);

    backdrop-filter:
        blur(16px);

    -webkit-backdrop-filter:
        blur(16px);
}

.notification-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 10px;

    gap: 12px;
}

.notification-popover-header h2 {
    margin: 0;

    color: var(--blue-dark);

    font-size: 1.08rem;
}

.notification-popover-close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    padding: 0;

    background: var(--grey-100);
    color: var(--grey-600);

    border: 0;

    border-radius: 50%;

    font-size: 1.1rem;
}

.notification-preview-list {
    display: flex;
    flex-direction: column;

    gap: 7px;
}

.notification-preview-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    width: 100%;

    padding:
        11px
        12px;

    border:
        1px solid
        transparent;

    border-radius:
        var(--radius-small);

    gap: 3px;

    text-align: left;
}

.notification-preview-item strong {
    color: inherit;

    font-size: 0.91rem;
}

.notification-preview-item small {
    display: -webkit-box;

    overflow: hidden;

    color: inherit;

    font-size: 0.8rem;

    opacity: 0.78;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.notification-preview-empty {
    padding: 18px 10px;

    color: var(--grey-500);

    text-align: center;
}

/*
 * Non lue :
 * volontairement colorÃƒÂ©e pour attirer l'attention.
 */

.notification-new {
    background:
        linear-gradient(
            135deg,
            var(--purple-soft),
            var(--blue-light)
        );

    color: var(--blue-dark);

    border-color:
        rgba(120, 104, 181, 0.25);
}

/*
 * DÃƒÂ©jÃƒ  lue :
 * volontairement grise.
 */

.notification-read {
    background: var(--grey-100);
    color: var(--grey-600);

    border-color: var(--grey-200);
}

.notification-sent {
    background: var(--white);
    color: var(--grey-800);

    border-color: var(--grey-200);
}

.notifications-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

.notification-card {
    padding:
        15px
        16px;

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.notification-card.notification-new {
    border-color:
        rgba(120, 104, 181, 0.32);

    box-shadow:
        0 6px 18px
        rgba(120, 104, 181, 0.12);
}

.notification-card.notification-new:hover {
    transform:
        translateY(-1px);

    box-shadow: var(--shadow);
}

.notification-card-main {
    display: flex;
    align-items: flex-start;

    gap: 12px;
}

.notification-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 42px;
    height: 42px;

    background:
        rgba(255, 255, 255, 0.72);

    border-radius: 12px;

    font-size: 1.2rem;
}

.notification-card-main > div:last-child {
    min-width: 0;
}

.notification-card strong {
    display: block;

    margin-bottom: 4px;

    color: inherit;
}

.notification-card p {
    margin:
        0 0
        6px;

    white-space: pre-wrap;
}

.notification-card small {
    color: inherit;

    opacity: 0.7;
}

/* =====================================================================
   NOTIFICATIONS Ã¢â‚¬â€ ENVOI LEHRKRAFT
   ===================================================================== */

.teacher-notification-composer {
    margin-bottom: 24px;

    padding:
        clamp(
            18px,
            3vw,
            26px
        );

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);
}

.teacher-notification-composer h2 {
    margin-bottom: 16px;

    color: var(--blue-dark);
}

.notification-recipient-list {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                190px,
                1fr
            )
        );

    max-height: 270px;

    overflow-y: auto;

    padding: 5px;

    gap: 7px;
}

.recipient-option {
    display: flex;
    align-items: center;

    min-height: 44px;

    padding:
        9px
        11px;

    background: var(--grey-050);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius-small);

    gap: 9px;

    cursor: pointer;
}

.recipient-option:hover {
    background: var(--blue-light);
}

.recipient-option input {
    width: 18px;
    height: 18px;

    accent-color: var(--blue);
}

.recipient-option-all {
    background: var(--purple-soft);

    border-color:
        rgba(120, 104, 181, 0.28);

    font-weight: 850;
}

/* =====================================================================
   BÃƒâ€žCKEREI / EVENT Ã¢â‚¬â€ AUSGABE
   ===================================================================== */

.output-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 4fr)
        minmax(190px, 1fr);

    align-items: start;

    gap:
        clamp(
            14px,
            2.5vw,
            24px
        );
}

.output-open-column,
.output-completed-column {
    min-width: 0;
}

.output-open-column h2,
.output-completed-column h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;

    color: var(--blue-dark);

    gap: 8px;
}

.output-orders {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(
                220px,
                1fr
            )
        );

    gap: 14px;
}

.output-order-card {
    display: flex;
    flex-direction: column;

    min-height: 235px;

    padding: 18px;

    background: var(--white);

    border:
        2px solid
        var(--purple);

    border-radius:
        var(--radius-large);

    box-shadow: var(--shadow);

    gap: 14px;
}

.output-order-number {
    color: var(--blue-dark);

    font-size:
        clamp(
            2rem,
            5vw,
            3.1rem
        );

    font-weight: 950;

    line-height: 1;
    letter-spacing: 0.06em;
}

.output-order-items {
    display: flex;
    flex: 1;
    flex-direction: column;

    color: var(--grey-700);

    gap: 5px;
}

.output-order-card .primary-action {
    width: 100%;
}

.completed-orders {
    display: flex;
    flex-direction: column;

    gap: 7px;
}

.completed-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        10px
        11px;

    background: var(--grey-100);

    color: var(--grey-600);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius-small);

    gap: 8px;
}

.completed-order-row strong {
    color: var(--blue-dark);
}

/* =====================================================================
   EVENTS Ã¢â‚¬â€ LISTE
   ===================================================================== */

.event-list {
    display: flex;
    flex-direction: column;

    gap: 9px;
}

.event-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    min-height: 68px;

    padding:
        13px
        16px;

    background: var(--white);
    color: var(--blue-dark);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);

    gap: 16px;

    text-align: left;

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

button.event-list-row:hover {
    border-color: var(--purple-dark);

    box-shadow: var(--shadow);

    transform:
        translateY(-1px);
}

.event-list-row strong,
.event-list-row small {
    display: block;
}

.event-list-row small {
    margin-top: 3px;

    color: var(--grey-500);
}

.event-list-row > span:last-child {
    flex: 0 0 auto;

    font-size: 1.3rem;
    font-weight: 900;
}

.event-closed {
    background: var(--grey-100);
    color: var(--grey-600);

    box-shadow: none;

    cursor: default;
}

.event-closed-badge {
    padding:
        5px
        9px;

    background: var(--grey-200);
    color: var(--grey-600);

    border-radius: 999px;

    font-size: 0.74rem !important;
    font-weight: 850;
}

/* =====================================================================
   EVENT WORKSPACE
   ===================================================================== */

.event-workspace-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    margin-bottom: 20px;

    padding:
        14px
        16px;

    background: var(--purple-soft);

    border:
        1px solid
        rgba(120, 104, 181, 0.2);

    border-radius:
        var(--radius);

    gap:
        8px
        12px;
}

.event-workspace-info > span {
    font-size: 1.3rem;
}

.event-workspace-info strong {
    color: var(--blue-dark);

    font-size: 1.05rem;
}

.event-workspace-info small {
    flex-basis: 100%;

    color: var(--grey-600);
}

.event-workspace-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                210px,
                1fr
            )
        );

    gap: 14px;
}

.event-action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;

    min-height: 150px;

    padding: 18px;

    background: var(--white);
    color: var(--blue-dark);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);

    gap: 10px;

    text-align: left;
}

.event-action-card:hover {
    border-color: var(--purple-dark);

    box-shadow: var(--shadow);
}

.event-close-area {
    margin-top: 24px;

    padding:
        18px;

    background: var(--grey-100);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);
}

.event-close-area .danger-action {
    min-width: 230px;
}

/* =====================================================================
   OTHER EVENT
   ===================================================================== */

.other-event-revenue-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        18px;

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);

    gap: 18px;
}

.other-event-revenue-card strong {
    display: block;

    color: var(--blue-dark);

    font-size: 1.35rem;
}

.other-event-revenue-card small {
    color: var(--grey-500);
}

/* =====================================================================
   EVENT PRODUCTS
   ===================================================================== */

.event-products-toolbar {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: end;

    margin-bottom: 18px;

    gap: 10px;
}

.event-products-toolbar select {
    width: 100%;

    min-height: 44px;

    padding:
        9px
        12px;

    background: var(--white);

    border:
        1.5px solid
        var(--grey-300);

    border-radius:
        var(--radius-small);
}

/* =====================================================================
   EVENT END INVENTORY
   ===================================================================== */

.event-end-inventory-list {
    display: flex;
    flex-direction: column;

    gap: 10px;
}

/* =====================================================================
   BERICHTE
   ===================================================================== */

.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;

    gap: 12px;
}

.report-current-date {
    color: var(--grey-500);

    font-weight: 700;
}

.report-export-action {
    margin-left: auto;
}

.report-kpi-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                160px,
                1fr
            )
        );

    margin-bottom: 22px;

    gap: 12px;
}

.report-kpi-card {
    padding:
        17px;

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);
}

.report-kpi-card span {
    display: block;

    margin-bottom: 6px;

    color: var(--grey-500);

    font-size: 0.82rem;
    font-weight: 750;
}

.report-kpi-card strong {
    display: block;

    color: var(--blue-dark);

    font-size:
        clamp(
            1.25rem,
            3vw,
            1.75rem
        );

    line-height: 1.1;
}

.report-top-product {
    margin-bottom: 20px;

    padding: 18px;

    background:
        linear-gradient(
            135deg,
            var(--green-soft),
            var(--white)
        );

    border:
        1px solid
        rgba(120, 145, 14, 0.2);

    border-radius:
        var(--radius);
}

.report-top-product strong {
    display: block;

    color: var(--blue-dark);

    font-size: 1.25rem;
}

.report-top-product span {
    color: var(--grey-600);
}

/* =====================================================================
   REPORT PRODUCT TABLE
   ===================================================================== */

.report-product-table {
    overflow-x: auto;

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);
}

.report-product-header,
.report-product-row {
    display: grid;

    grid-template-columns:
        minmax(160px, 2fr)
        minmax(70px, 0.7fr)
        minmax(70px, 0.7fr)
        minmax(95px, 1fr)
        minmax(95px, 1fr);

    align-items: center;

    min-width: 620px;

    padding:
        11px
        14px;

    gap: 10px;
}

.report-product-header {
    background: var(--blue);
    color: var(--white);

    font-size: 0.78rem;
    font-weight: 850;
}

.report-product-row {
    border-bottom:
        1px solid
        var(--grey-150);

    font-size: 0.9rem;
}

.report-product-row:last-child {
    border-bottom: 0;
}

.report-product-row span:not(:first-child),
.report-product-header span:not(:first-child) {
    text-align: right;
}

/* =====================================================================
   SCHOOL YEAR CHART
   ===================================================================== */

.report-chart-card {
    margin-top: 22px;

    padding:
        clamp(
            16px,
            3vw,
            24px
        );

    background: var(--white);

    border:
        1px solid
        var(--grey-200);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow-small);
}

.report-chart-card h2 {
    color: var(--blue-dark);
}

.school-year-profit-chart {
    display: flex;
    align-items: flex-end;

    min-height: 245px;

    overflow-x: auto;

    padding:
        34px
        5px
        0;

    border-bottom:
        2px solid
        var(--grey-200);

    gap:
        clamp(
            8px,
            1.6vw,
            18px
        );
}

.chart-column {
    display: flex;
    flex:
        1 0
        58px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;

    min-width: 58px;

    gap: 5px;
}

.chart-value {
    min-height: 18px;

    color: var(--grey-600);

    font-size: 0.68rem;
    font-weight: 750;

    text-align: center;
}

.chart-bar {
    width:
        min(
            42px,
            75%
        );

    min-height: 4px;

    background:
        linear-gradient(
            180deg,
            var(--purple-dark),
            var(--blue)
        );

    border-radius:
        8px
        8px
        0
        0;
}

.chart-column small {
    min-height: 30px;

    color: var(--grey-500);

    font-size: 0.72rem;

    text-align: center;
}

/* =====================================================================
   MODALS
   ===================================================================== */

.modal {
    position: fixed;
    z-index: 2000;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(
            20,
            28,
            35,
            0.48
        );

    backdrop-filter:
        blur(5px);

    -webkit-backdrop-filter:
        blur(5px);
}

.modal-card {
    width: min(
        100%,
        610px
    );

    max-height:
        calc(
            100vh - 40px
        );

    overflow-y: auto;

    padding:
        clamp(
            20px,
            4vw,
            30px
        );

    background: var(--white);

    border-radius:
        var(--radius-large);

    box-shadow:
        var(--shadow-large);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 20px;

    gap: 15px;
}

.modal-header h2 {
    margin: 0;

    color: var(--blue-dark);
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    padding: 0;

    background: var(--grey-100);
    color: var(--grey-600);

    border: 0;

    border-radius: 50%;

    font-size: 1.2rem;
}

.modal-close:hover {
    background: var(--grey-200);
}

/* =====================================================================
   TEAM FINISHED OVERLAY
   ===================================================================== */

.team-finished-overlay {
    position: fixed;
    z-index: 2400;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(
            20,
            28,
            35,
            0.52
        );

    backdrop-filter:
        blur(6px);

    -webkit-backdrop-filter:
        blur(6px);
}

.team-finished-card {
    width: min(
        100%,
        520px
    );

    padding:
        clamp(
            28px,
            6vw,
            48px
        );

    background: var(--white);

    border-radius:
        var(--radius-large);

    box-shadow:
        var(--shadow-large);

    text-align: center;
}

.team-finished-icon {
    display: block;

    margin-bottom: 12px;

    font-size: 3.5rem;
}

.team-finished-card h2 {
    margin-bottom: 9px;

    color: var(--blue-dark);
}

.team-finished-card p {
    margin-bottom: 22px;

    color: var(--grey-600);
}

/* =====================================================================
   TOASTS
   ===================================================================== */

.toast-container {
    position: fixed;
    z-index: 3000;

    right: 18px;
    bottom: 18px;

    display: flex;
    flex-direction: column;

    width:
        min(
            calc(100vw - 36px),
            390px
        );

    gap: 8px;

    pointer-events: none;
}

.toast {
    padding:
        12px
        14px;

    background: var(--grey-800);
    color: var(--white);

    border-radius:
        var(--radius-small);

    box-shadow:
        var(--shadow-large);

    font-size: 0.9rem;
    font-weight: 750;

    animation:
        toast-enter
        180ms
        ease-out;
}

.toast-success {
    background: var(--green-dark);
}

.toast-error {
    background: var(--red-dark);
}

.toast-info {
    background: var(--blue);
}

@keyframes toast-enter {
    from {
        opacity: 0;

        transform:
            translateY(8px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}

/* =====================================================================
   UTILITY CLASSES
   ===================================================================== */

.text-muted {
    color: var(--grey-500);
}

.text-blue {
    color: var(--blue);
}

.text-red {
    color: var(--red);
}

.text-green {
    color: var(--green-dark);
}

.text-center {
    text-align: center;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

/* =====================================================================
   RESPONSIVE Ã¢â‚¬â€ TABLET
   ===================================================================== */

@media (
    max-width: 960px
) {

    .cashier-layout {
        grid-template-columns:
            minmax(
                0,
                1fr
            )
            minmax(
                260px,
                330px
            );

        gap: 15px;
    }

    .sale-product-grid {
        grid-template-columns:
            repeat(
                auto-fill,
                minmax(
                    135px,
                    1fr
                )
            );
    }

    .teacher-stock-form {
        grid-template-columns:
            80px
            105px
            auto;
    }

    .current-person-name {
        max-width: 150px;
    }
}

/* =====================================================================
   RESPONSIVE Ã¢â‚¬â€ PETIT TABLET / MOBILE
   ===================================================================== */

@media (
    max-width: 760px
) {

    :root {
        --header-height: 66px;
    }

    .app-header-inner {
        padding:
            0
            10px;
    }

    .app-header-logo {
        height:
            var(--header-height);

        max-width: 38vw;
    }

    .current-person-name {
        display: block;
    }

    .current-person-role {
        min-height: 27px;

        padding:
            4px
            7px;

        font-size: 0.66rem;
    }

    .header-icon-button {
        width: 39px;
        height: 39px;
    }

    .breadcrumb {
        min-height: 38px;

        padding:
            6px
            14px;
    }

    .screen {
        width:
            min(
                calc(
                    100% - 20px
                ),
                var(--content-width)
            );

        padding:
            20px
            0
            45px;
    }

    .screen-header {
        flex-direction: column;

        margin-bottom: 18px;

        gap: 12px;
    }

    .home-welcome {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-grid,
    .menu-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

        gap: 10px;
    }

    .home-tile,
    .menu-tile {
        min-height: 155px;

        padding: 16px;
    }

    .home-tile-icon,
    .menu-tile-icon {
        width: 50px;
        height: 50px;

        margin-bottom: 12px;

        font-size: 1.65rem;
    }

    .cashier-layout {
        grid-template-columns:
            1fr;
    }

    .cashier-cart {
        position: static;
    }

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

    .sale-product-card {
        min-height: 125px;

        padding:
            13px
            8px;

        font-size: 0.86rem;
    }

    .payment-layout {
        grid-template-columns:
            1fr;
    }

    .output-layout {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(150px, 0.34fr);

        gap: 10px;
    }

    .output-orders {
        grid-template-columns:
            repeat(
                auto-fill,
                minmax(
                    180px,
                    1fr
                )
            );

        gap: 10px;
    }

    .output-order-card {
        min-height: 205px;

        padding: 14px;
    }

    .completed-order-row {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .form-field-full,
    .form-actions {
        grid-column: auto;
    }

    .inventory-count-row,
    .teacher-inventory-row {
        grid-template-columns:
            1fr;
    }

    .inventory-count-input {
        width: 100%;
    }

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

    .teacher-stock-form .primary-action {
        grid-column:
            1 / -1;
    }

    .product-admin-row,
    .student-row,
    .invoice-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-admin-actions,
    .student-row-actions {
        width: 100%;
    }

    .product-admin-actions button,
    .student-row-actions button {
        flex: 1;
    }

    .invoice-row > div:last-child {
        width: 100%;

        text-align: left;
    }

    .event-products-toolbar {
        grid-template-columns:
            1fr;
    }

    .other-event-revenue-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .notification-popover {
        top:
            calc(
                var(--header-height) +
                3px
            );

        right: 10px;

        width:
            calc(
                100vw - 20px
            );
    }

    .notification-recipient-list {
        grid-template-columns:
            1fr;
    }

    .report-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .report-export-action {
        width: 100%;

        margin-left: 0;
    }

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

/* =====================================================================
   RESPONSIVE Ã¢â‚¬â€ MOBILE Ãƒâ€°TROIT
   ===================================================================== */

@media (
    max-width: 520px
) {

    .login-screen,
    .school-closed-screen {
        padding: 14px;
    }

    .login-card,
    .school-closed-card {
        padding:
            24px
            18px;
    }

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

        gap: 9px;
    }

    .person-card {
        min-height: 120px;

        padding:
            13px
            8px;
    }

    .home-grid,
    .menu-grid {
        grid-template-columns:
            1fr;
    }

    .home-tile,
    .menu-tile {
        min-height: 130px;
    }

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

    .sale-product-card {
        min-height: 118px;
    }

    .cart-row {
        grid-template-columns:
            minmax(
                0,
                1fr
            )
            auto;
    }

    .cart-row > strong:last-child {
        grid-column:
            1 / -1;

        text-align: right;
    }

    .output-layout {
        grid-template-columns:
            1fr;
    }

    .output-completed-column {
        padding-top: 15px;

        border-top:
            2px solid
            var(--grey-200);
    }

    .completed-orders {
        display: grid;

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

    .completed-order-row {
        align-items: center;
    }

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

    .teacher-stock-form .primary-action {
        grid-column: auto;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

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

    .report-kpi-grid {
        grid-template-columns:
            1fr;
    }

    .event-close-area .danger-action {
        width: 100%;
        min-width: 0;
    }

    .notification-card-main {
        gap: 9px;
    }

    .notification-card-icon {
        width: 36px;
        height: 36px;
    }
}

/* =====================================================================
   iPAD / TOUCH
   ===================================================================== */

@media (
    hover: none
) {

    .home-tile:hover,
    .menu-tile:hover,
    .sale-product-card:hover,
    button.event-list-row:hover,
    .notification-card.notification-new:hover {
        transform: none;
    }

    .primary-action,
    .secondary-action,
    .danger-action,
    .back-action {
        min-height: 46px;
    }

    .sale-product-card {
        touch-action: manipulation;
    }

    .payment-key {
        min-height: 68px;

        touch-action: manipulation;
    }
}

/* =====================================================================
   LANDSCAPE iPAD
   ===================================================================== */

@media (
    min-width: 761px
) and (
    max-width: 1180px
) and (
    orientation: landscape
) {

    .screen {
        width:
            calc(
                100% - 36px
            );
    }

    .cashier-layout {
        grid-template-columns:
            minmax(
                0,
                1fr
            )
            330px;
    }

    .sale-product-grid {
        grid-template-columns:
            repeat(
                4,
                minmax(
                    0,
                    1fr
                )
            );
    }

    .output-layout {
        grid-template-columns:
            minmax(
                0,
                4fr
            )
            minmax(
                175px,
                1fr
            );
    }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */

@media (
    prefers-reduced-motion:
        reduce
) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;
    }
}

/* =====================================================================
   PRINT
   ===================================================================== */

@media print {

    .app-header,
    .breadcrumb,
    .notification-popover,
    .toast-container,
    button {
        display: none !important;
    }

    body {
        background: var(--white);
    }

    .screen {
        width: 100%;

        padding: 0;
    }

    .panel,
    .card,
    .section-card,
    .report-chart-card,
    .report-product-table {
        box-shadow: none;
    }
}

/*
 * Les rÃƒÂ¨gles suivantes conservent le rendu lorsque l'index utilise
 * certains noms de classes historiques des versions prÃƒÂ©cÃƒÂ©dentes.
 */

.appHeader {
    height: var(--header-height);
}

.header-logo,
#homeLogoButton img {
    width: auto;
    height: var(--header-height);

    object-fit: contain;
}

#appHeader {
    height: var(--header-height);

    background:
        rgba(
            189,
            179,
            230,
            0.5
        );
}

#appHeader .app-header-inner,
#appHeader .header-inner {
    height: 100%;
}

#breadcrumb {
    background: var(--purple);
}

#currentPersonRole.teacher-role {
    background: var(--red);
    color: var(--white);
}

#schoolClosedScreen {
    min-height: 100vh;
}

#bakeryOutputOrders,
#eventOutputOrders {
    min-width: 0;
}

#bakeryCompletedOrders,
#eventCompletedOrders {
    min-width: 0;
}

#notificationsList {
    min-width: 0;
}

#notificationRecipientList {
    min-width: 0;
}

#schoolYearProfitChart {
    min-width: 0;
}

.bakery-output-layout,
:is(#bakeryOutputScreen, #eventOutputScreen) .output-layout {
    grid-template-columns:
        minmax(0, 4fr)
        minmax(180px, 1fr);
}

#bakeryCompletedOrders .completed-order-row {
    font-size: 0.86rem;
}

#eventOutputScreen .output-layout {
    grid-template-columns:
        minmax(0, 4fr)
        minmax(180px, 1fr);
}

#receivedNotificationsTab.active,
#sentNotificationsTab.active {
    background: var(--blue);
    color: var(--white);

    border-color: var(--blue);
}

#notificationsList .notification-new {
    background:
        linear-gradient(
            135deg,
            #eeeafd,
            #e8f3f9
        );

    color: var(--blue-dark);
}

#notificationsList .notification-read {
    background: #f0f1f2;
    color: #667078;

    border-color: #dfe2e5;
}

#notificationsList .notification-sent {
    background: var(--white);
    color: var(--grey-800);
}

#teacherNotificationTitle,
#teacherNotificationMessage {
    width: 100%;
}

#teacherNotificationMessage {
    min-height: 110px;

    resize: vertical;
}

#teacherNotificationMessageStatus {
    margin-top: 9px;
}

/*
 * L'ÃƒÂ©cran fermÃƒÂ© ne contient volontairement aucun bouton
 * permettant Ãƒ  un ÃƒÂ©lÃƒÂ¨ve de revenir au PIN.
 */

#schoolClosedScreen button {
    display: none;
}

.teacher-mode .teacher-test-banner,
.teacher-mode .test-banner {
    display: flex;
}

.teacher-test-banner,
.test-banner {
    background: var(--yellow-soft);
    color: #5c4800;

    border-color:
        rgba(
            180,
            135,
            0,
            0.28
        );
}

body.modal-open {
    overflow: hidden;
}

button {
    user-select: none;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    margin: 0;

    -webkit-appearance: none;
}

::selection {
    background:
        rgba(
            189,
            179,
            230,
            0.55
        );

    color: var(--blue-dark);
}

/*
 * Cette rÃƒÂ¨gle est volontairement en fin de fichier.
 * Elle garantit que l'ancien CSS ne puisse plus remettre
 * le header en blanc semi-transparent.
 */

#appHeader,
.app-header {
    background:
        rgba(
            189,
            179,
            230,
            0.5
        ) !important;
}

/*
 * Le breadcrumb reste violet opaque et distinct du header.
 */

#breadcrumb,
.breadcrumb {
    background:
        rgb(
            189,
            179,
            230
        ) !important;
}

/*
 * Logo LauterMacher :
 * hauteur exactement ÃƒÂ©gale au header.
 */

#homeLogoButton,
.header-logo-button {
    height:
        var(--header-height);
}

#homeLogoButton img,
#appHeader .app-header-logo,
.app-header-logo {
    width: auto !important;

    height:
        var(--header-height) !important;

    max-height:
        var(--header-height) !important;

    object-fit:
        contain !important;
}

/*
 * Lehrkraft = rouge.
 */

#currentPersonRole.teacher-role,
.teacher-mode #currentPersonRole,
.teacher-role {
    background:
        var(--red) !important;

    color:
        var(--white) !important;
}

@media (
    max-width: 760px
) {

    #homeLogoButton img,
    #appHeader .app-header-logo,
    .app-header-logo {
        height:
            var(--header-height) !important;

        max-height:
            var(--header-height) !important;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .output-layout,
    #eventOutputScreen .output-layout {
        grid-template-columns:
            minmax(0, 3fr)
            minmax(145px, 1fr);
    }
}

@media (
    max-width: 520px
) {

    :is(#bakeryOutputScreen, #eventOutputScreen) .output-layout,
    #eventOutputScreen .output-layout {
        grid-template-columns:
            1fr;
    }
}

/* =====================================================================
   COMPATIBILITÃƒâ€° HTML ACTUEL Ã¢â‚¬â€ STYLE V4
   SÃƒÂ©lecteurs correspondant aux classes prÃƒÂ©sentes dans index.html.
   ===================================================================== */

/* Accueil : cartes et icÃƒÂ´nes dans la disposition V4 */
.home-menu-grid, .admin-menu-grid, .choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: clamp(14px, 2.5vw, 22px);
}
.home-menu-card, .admin-menu-card, .choice-card {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 140px;
    padding: 22px;
    background: var(--white);
    color: var(--blue-dark);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
    text-align: left;
    gap: 16px;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    overflow-wrap: anywhere;
}
.home-menu-card:hover, .admin-menu-card:hover, .choice-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.home-menu-icon, .admin-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    background: var(--blue-light);
    border-radius: var(--radius);
    font-size: 2rem;
}
.home-menu-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 5px;
}
.home-menu-text strong, .admin-menu-card strong, .choice-card strong {
    color: var(--blue-dark);
    font-size: 1.15rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}
.home-menu-text small, .admin-menu-card small, .choice-card small {
    color: var(--grey-600);
    overflow-wrap: anywhere;
}
.home-menu-arrow { margin-left: auto; color: var(--blue); font-size: 1.8rem; }

/* Badge du rÃƒÂ´le : en haut de la page, pas dans le header */
#homeRoleLabel.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    background: var(--blue);
    color: var(--white);
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 850;
}
#homeRoleLabel.role-badge.teacher-role,
.teacher-mode #homeRoleLabel.role-badge { background: var(--red); color: var(--white); }

/* Indicateur TEST : uniquement visible au survol en mode enseignant */
.teacher-mode .home-menu-card .test-badge:not([hidden]),
.teacher-mode .admin-menu-card .test-badge:not([hidden]) {
    opacity: 0;
    transition: opacity var(--transition);
}
.teacher-mode .home-menu-card:hover .test-badge:not([hidden]),
.teacher-mode .home-menu-card:focus-visible .test-badge:not([hidden]),
.teacher-mode .admin-menu-card:hover .test-badge:not([hidden]),
.teacher-mode .admin-menu-card:focus-visible .test-badge:not([hidden]) { opacity: 1; }

/* PIN et sÃƒÂ©lection de profil : nuances de bleu */
#loginPinInput {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 12px auto 22px;
    padding: 16px;
    background: var(--white);
    color: var(--blue-dark);
    border: 2px solid var(--blue);
    border-radius: var(--radius-small);
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: .35em;
    text-align: center;
}
#loginPinInput:focus { border-color: var(--blue); outline-color: var(--blue); }
.person-card:hover, .person-card:focus-visible {
    color: var(--blue-dark);
    border-color: var(--blue);
    background: var(--blue-light);
}
.person-avatar { background: var(--blue-light); }

/* Kasse : disposition V4 avec les classes actuelles */
.sale-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 380px);
    align-items: start;
    gap: clamp(16px, 3vw, 28px);
}
.sale-products-panel, .cart-panel { min-width: 0; }
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.cart-panel {
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.section-heading h2, .cart-panel h2 { color: var(--blue-dark); }
.section-heading p { color: var(--grey-600); }
.pay-button, .paid-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 12px 18px;
    background: var(--blue);
    color: var(--white);
    border: 2px solid var(--blue);
    border-radius: var(--radius-small);
    font-size: 1.05rem;
    font-weight: 850;
}
.pay-button:hover:not(:disabled), .paid-button:hover:not(:disabled) {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
}
.back-button {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 14px;
    background: transparent;
    color: var(--blue);
    border: 1px solid var(--grey-300);
    border-radius: var(--radius-small);
    font-weight: 800;
}
.back-button:hover { background: var(--blue-light); }

/* Factures : une ligne par facture, sans dÃƒÂ©bordement */
#invoiceList { display: flex; flex-direction: column; min-width: 0; gap: 10px; }
#invoiceList .invoice-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
    padding: 12px;
    gap: clamp(4px, 1vw, 14px);
}
#invoiceList .invoice-row > * { min-width: 0; }
#invoiceList .invoice-row strong, #invoiceList .invoice-row small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(.65rem, 1.4vw, .95rem);
}

/* Texte long et grilles adaptatives */
button, .home-menu-text, .section-card, .panel { overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .sale-layout { grid-template-columns: minmax(0, 1fr); }
    .cart-panel { position: static; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); }
    .home-menu-grid, .admin-menu-grid, .choice-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    }
}
@media (max-width: 520px) {
    .home-menu-card, .admin-menu-card, .choice-card {
        padding: 14px;
        min-height: 105px;
        gap: 10px;
    }
    .home-menu-icon, .admin-menu-icon {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #invoiceList .invoice-row { padding: 8px 6px; gap: 4px; }
}

/* =====================================================================
   HEADER ET FIL D'ARIANE VALIDÃƒâ€°S Ã¢â‚¬â€ NE PAS MODIFIER
   ===================================================================== */
#appHeader.app-header {
    height: var(--header-height);
    background: rgba(186, 176, 244, .72) !important;
    background-image: none !important;
    border-bottom: 1px solid rgba(120, 104, 181, .28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: visible;
}
#appHeader .app-header-inner { overflow: visible; }
#appHeader #homeLogoButton.header-logo-button {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    height: var(--header-height);
    min-width: 0;
    overflow: visible;
}
#appHeader #homeLogoButton img.app-header-logo {
    display: block;
    height: 100% !important;
    max-height: none !important;
    width: auto !important;
    max-width: none !important;
    object-fit: contain;
    object-position: left center;
    transform: none;
}
#appHeader .app-header-actions {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    gap: 8px;
    min-width: 0;
}
#appHeader .current-person-name {
    color: #094369;
    font-weight: 800;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#appHeader #notificationButton, #appHeader #logoutButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    background: rgba(255, 255, 255, .75);
    color: #094369;
    border: 1px solid rgba(9, 67, 105, .15);
    border-radius: 12px;
}
#appHeader #notificationButton {
    position: relative;
    width: 42px;
    height: 42px;
    padding: 0;
}
#appHeader #logoutButton {
    padding: 9px 14px;
    font-weight: 800;
    white-space: nowrap;
}
#appHeader #notificationButton:hover, #appHeader #logoutButton:hover {
    background: #ffffff;
    border-color: #094369;
}
html body #breadcrumb.breadcrumb {
    background: #ffffff !important;
    background-image: none !important;
    color: #bab0f4 !important;
    border-bottom: 1px solid #e2e5e8;
    box-shadow: none;
}
#breadcrumb .breadcrumb-item, #breadcrumb .breadcrumb-current, #breadcrumb > span {
    color: #8b7ed4;
}
@media (max-width: 760px) {
    #appHeader .app-header-inner { gap: 8px; }
    #appHeader .app-header-actions { gap: 5px; }
    #appHeader .current-person-name { max-width: 110px; font-size: .78rem; }
    #appHeader #notificationButton {
        width: 36px; height: 36px; min-height: 36px; flex-shrink: 0;
    }
    #appHeader #logoutButton {
        min-height: 36px; padding: 6px 8px; font-size: .75rem; flex-shrink: 0;
    }
}
@media (max-width: 420px) {
    #appHeader .current-person-name { max-width: 65px; }
    #appHeader .app-header-actions { gap: 4px; }
}
/* =========================================================
   INVENTUR PROFESSEUR â€” VF1.2
   ========================================================= */

#teacherInventoryScreen .submissions-section[hidden],
#teacherInventoryScreen #teacherInventoryNotice[hidden] {
    display: none !important;
}

#teacherInventoryScreen #teacherInventoryList {
    display: grid;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}

#teacherInventoryScreen .teacher-inventory-row,
#teacherInventoryScreen .teacher-inventory-heading {
    display: grid;

    grid-template-columns:
        minmax(230px, 1fr)
        340px;

    align-items: center;
    gap: 12px;
    min-width: 620px;
    padding: 10px 14px;
}

#teacherInventoryScreen
.has-student-inventory
.teacher-inventory-row,

#teacherInventoryScreen
.has-student-inventory
.teacher-inventory-heading {
    grid-template-columns:
        minmax(230px, 1fr)
        120px
        110px
        340px;

    min-width: 880px;
}

#teacherInventoryScreen .teacher-inventory-heading {
    font-weight: 800;
}

#teacherInventoryScreen
.teacher-inventory-heading > :nth-child(2),

#teacherInventoryScreen
.teacher-inventory-heading > :nth-child(3) {
    text-align: center;
}

#teacherInventoryScreen
.teacher-inventory-heading > :last-child {
    text-align: right;
}

#teacherInventoryScreen .teacher-student-count {
    align-self: stretch;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background: #e2dcfa;
    border-radius: 12px;

    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;

    padding: 6px;
}

#teacherInventoryScreen .teacher-student-difference {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
}

#teacherInventoryScreen
.teacher-student-difference.is-different {
    color: #dd3434;
}

#teacherInventoryScreen
.teacher-student-difference.is-equal {
    color: #7c8b13;
}

#teacherInventoryScreen .teacher-student-count small,
#teacherInventoryScreen .teacher-student-difference small {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
}

#teacherInventoryScreen .teacher-stock-form {
    display: grid;

    grid-template-columns:
        80px
        110px
        134px;

    gap: 8px;
    align-items: center;
}

#teacherInventoryScreen .teacher-stock-form input,
#teacherInventoryScreen .teacher-stock-form button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin: 0;
}

#teacherInventoryScreen .teacher-stock-form input:disabled {
    opacity: 0.45;
}

#teacherInventoryScreen
.teacher-stock-form
.teacher-action-override {
    background: #bdb0f5;
    color: var(--blue-dark, #09436a);
    border-color: #bdb0f5;
}

#teacherInventoryScreen
.teacher-stock-form
.teacher-action-confirm {
    background: #b1c139;
    color: var(--blue-dark, #09436a);
    border-color: #b1c139;
}

#teacherInventoryScreen .teacher-stock-form button:disabled {
    opacity: 0.55;
}
/* =========================================================
   PRODUKTE â€” LISTE COMPACTE ET FORMULAIRE INLINE
   ========================================================= */

#productsScreen #productAdminList {
    display: grid;
    gap: 10px;
}

#productsScreen .product-admin-item {
    position: relative;
    min-width: 0;
}

#productsScreen .product-admin-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

#productsScreen .product-admin-main {
    min-width: 0;
    gap: 10px;
}

#productsScreen .product-admin-main > div {
    min-width: 0;
}

#productsScreen .product-admin-main strong {
    overflow-wrap: anywhere;
}

#productsScreen .product-admin-main > span {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

#productsScreen .product-admin-actions {
    display: flex;
    width: auto;
    gap: 8px;
}

#productsScreen .product-admin-actions button {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    padding: 8px 12px;
    white-space: nowrap;
    font-size: 0.95rem;
}

#productsScreen .product-admin-actions button:disabled {
    opacity: 0.45;
}


/* Produit ajoutÃ© par un Ã©lÃ¨ve */

#productsScreen .product-added {
    background: #e1f2fc;
    border-color: #a6d9f3;
}


/* Champ modifiÃ© par un Ã©lÃ¨ve */

#productsScreen .product-field-changed {
    background: #d2edfc;
    border-radius: 8px;
    padding: 3px 6px;
    cursor: pointer;
}

#productsScreen .product-field-changed:focus-visible {
    outline: 2px solid #147bb2;
    outline-offset: 2px;
}


/* Bulle d'information professeur */

#productsScreen .product-change-popover {
    margin: 3px 12px 0;
}

#productsScreen .product-change-popover summary {
    color: #145d82;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 5px 0;
}

#productsScreen .product-change-panel {
    position: absolute;

    top: 100%;
    left: 0;
    right: 0;

    z-index: 20;

    padding: 14px;

    background: #eff9ff;
    color: var(--blue-dark, #09436a);

    border: 2px solid #9ed5f1;
    border-radius: 14px;

    box-shadow:
        0 8px 24px
        rgba(9, 67, 106, 0.15);
}

#productsScreen .product-change-panel p {
    margin: 0 0 8px;
    overflow-wrap: anywhere;
}


/* Formulaire sous le produit */

#productsScreen .product-inline-editor {
    position: static;

    width: 100%;
    box-sizing: border-box;

    margin: 8px 0 12px;
    padding: 18px;

    background: #f2faff;

    border: 1px solid #a6d9f3;
    border-radius: 16px;

    scroll-margin-top: 130px;
}

#productModal[hidden] {
    display: none !important;
}

#productsScreen .product-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

#productsScreen .product-editor-header h2 {
    margin: 0 0 12px;
}

#productsScreen .product-editor-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;
}

#productsScreen .product-editor-grid input,
#productsScreen .product-editor-grid select {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

#productsScreen .product-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}


/* Petites fenÃªtres : boutons toujours Ã  droite */

@media (max-width: 480px) {
    #productsScreen .product-admin-row {
        gap: 6px;
        padding: 8px;
    }

    #productsScreen .product-admin-main {
        gap: 6px;
    }

    #productsScreen .product-admin-main > span {
        width: 32px;
        height: 36px;
        font-size: 1.2rem;
    }

    #productsScreen .product-admin-actions {
        gap: 4px;
    }

    #productsScreen .product-admin-actions button {
        padding: 6px;
        font-size: 0.78rem;
    }

    #productsScreen .product-editor-grid {
        grid-template-columns: 1fr;
    }
}
/* PRODUKTE â€” supprimer l'ancienne sÃ©lection d'emojis.
   Le champ de saisie au clavier reste disponible. */

#productEmojiGrid,
#productModal .emoji-grid {
    display: none !important;
}
/* =========================================================
   RECHNUNGEN â€” DERNIÃˆRES FACTURES EN LIGNES COMPACTES
   ========================================================= */

#invoicesScreen .invoice-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: center;
    gap: 12px;

    padding: 12px 14px;
}

#invoicesScreen .invoice-row > div:first-child {
    min-width: 0;
    text-align: left;
}

#invoicesScreen .invoice-row > div:first-child strong,
#invoicesScreen .invoice-row > div:first-child small {
    display: block;
    overflow-wrap: anywhere;
}

#invoicesScreen .invoice-row > div:last-child {
    width: auto;
    text-align: right;
}

#invoicesScreen .invoice-row > div:last-child strong,
#invoicesScreen .invoice-row > div:last-child small {
    display: block;
    white-space: nowrap;
}
/* =========================================================
   RECHNUNGEN â€” QUESTION DE MISE Ã€ JOUR DES STOCKS
   ========================================================= */

.invoice-stock-dialog {
    width: min(460px, calc(100vw - 40px));
    box-sizing: border-box;

    padding: 24px;

    background: var(--white, #fff);
    color: var(--blue-dark, #09436a);

    border: 1px solid #b9dcef;
    border-radius: 20px;

    box-shadow:
        0 16px 48px
        rgba(9, 67, 106, 0.2);
}

.invoice-stock-dialog::backdrop {
    background: rgba(9, 67, 106, 0.35);
}

.invoice-stock-dialog h2 {
    margin: 0 0 12px;
}

.invoice-stock-dialog p {
    margin: 0 0 24px;
}

.invoice-stock-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.invoice-stock-dialog-actions button {
    min-width: 90px;
    min-height: 44px;
}
/* =========================================================
   INVENTUR PROFESSEUR â€” VF1.3
   ========================================================= */

/* Historique */

#teacherInventoryScreen .teacher-inventory-history {
    margin: 18px 0 24px;
}

#teacherInventoryScreen .teacher-inventory-history h2 {
    margin: 0 0 12px;
}

#teacherInventoryScreen .teacher-inventory-history-list {
    display: grid;
    gap: 6px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
}

#teacherInventoryScreen .teacher-inventory-history-heading,
#teacherInventoryScreen .teacher-inventory-history-row {
    display: grid;

    grid-template-columns:
        175px
        minmax(170px, 1fr)
        260px;

    align-items: center;
    gap: 12px;

    min-width: 660px;
    padding: 10px 14px;
    box-sizing: border-box;
}

#teacherInventoryScreen .teacher-inventory-history-heading {
    font-weight: 800;
}

#teacherInventoryScreen .teacher-inventory-history-row {
    background: var(--white, #fff);
    border: 1px solid var(--grey-200, #dde2e6);
    border-radius: 12px;
}

#teacherInventoryScreen .teacher-inventory-history-row span {
    min-width: 0;
    white-space: nowrap;
}

#teacherInventoryScreen
.teacher-inventory-history-row span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
}

#teacherInventoryScreen
.teacher-inventory-history-row.is-current {
    background: #e4ddfb;
    border-color: #b8a8ed;
}

#teacherInventoryScreen
.teacher-inventory-history-row.is-replaced {
    background: #f0f2f4;
    color: #687480;
}

/* Tableau des produits */

#teacherInventoryScreen #teacherInventoryList {
    display: grid;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
}

#teacherInventoryScreen .teacher-inventory-row,
#teacherInventoryScreen .teacher-inventory-heading {
    display: grid !important;

    grid-template-columns:
        minmax(160px, 1fr)
        360px !important;

    align-items: center;
    gap: 12px;

    min-width: 560px;
    padding: 10px 14px;
    box-sizing: border-box;
}

#teacherInventoryScreen
.has-student-inventory
.teacher-inventory-row,

#teacherInventoryScreen
.has-student-inventory
.teacher-inventory-heading {
    grid-template-columns:
        minmax(160px, 1fr)
        110px
        100px
        360px !important;

    min-width: 820px;
}

#teacherInventoryScreen .teacher-stock-form {
    display: grid !important;

    grid-template-columns:
        80px
        100px
        164px !important;

    align-items: center;
    gap: 8px;
}

#teacherInventoryScreen .teacher-stock-form input,
#teacherInventoryScreen .teacher-stock-form button {
    grid-column: auto !important;
    grid-row: auto !important;

    width: 100%;
    min-width: 0;
    min-height: 42px;

    margin: 0;
    box-sizing: border-box;
}

#teacherInventoryScreen .teacher-stock-form button {
    padding: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
}

#teacherInventoryScreen .teacher-inventory-heading {
    font-weight: 800;
}

#teacherInventoryScreen .teacher-inventory-heading-action {
    display: flex;
    justify-content: flex-end;
}

#teacherInventoryScreen
.teacher-inventory-heading-action button {
    width: 164px;
    min-height: 42px;
    padding: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
}

#teacherInventoryScreen .inventory-product-info {
    min-width: 0;
}

#teacherInventoryScreen .inventory-product-info strong {
    overflow-wrap: anywhere;
}

/* Comptage et diffÃ©rence */

#teacherInventoryScreen .teacher-student-count {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;

    padding: 6px;
    background: #e4ddfb;
    border-radius: 12px;

    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
}

#teacherInventoryScreen .teacher-student-difference {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 800;
}

#teacherInventoryScreen
.teacher-student-difference.is-equal {
    color: #7c8b13;
}

#teacherInventoryScreen
.teacher-student-difference.is-different {
    color: #dd3434;
}

#teacherInventoryScreen .teacher-student-count small,
#teacherInventoryScreen .teacher-student-difference small {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
}

#teacherInventoryScreen
.teacher-stock-form .teacher-action-confirm {
    background: #b1c139;
    border-color: #b1c139;
    color: var(--blue-dark, #09436a);
}

#teacherInventoryScreen
.teacher-stock-form .teacher-action-override {
    background: #bdb0f5;
    border-color: #bdb0f5;
    color: var(--blue-dark, #09436a);
}

#teacherInventoryScreen .teacher-stock-form input:disabled,
#teacherInventoryScreen .teacher-stock-form button:disabled {
    opacity: 0.5;
}

#teacherInventoryScreen .submissions-section[hidden] {
    display: none !important;
}
/* =====================================================================
   BUCHHALTUNG
   ===================================================================== */

#invoicesScreen .admin-content > h2 {
    margin: 0 0 16px;
}

#invoicesScreen .accounting-history + h2 {
    margin-top: 34px;
}

#invoicePfandAmount {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--grey-200, #e5e7eb);
    border-radius: 12px;
    background: #f5f3ff;
    color: var(--purple-dark, #5846a5);
    font-weight: 800;
}

#invoicesScreen .accounting-history {
    margin-top: 18px;
    padding: 0;
    border: 1px solid var(--grey-200, #e5e7eb);
    border-radius: 16px;
    background: #fff;
}

#invoicesScreen .accounting-history > summary {
    padding: 16px 18px;
    cursor: pointer;
    color: var(--grey-700, #374151);
    font-weight: 800;
}

#invoicesScreen .accounting-history[open] > summary {
    border-bottom: 1px solid var(--grey-200, #e5e7eb);
}

#invoicesScreen .invoice-list {
    display: block;
    overflow-x: auto;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
}

#invoicesScreen .invoice-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 510px;
    margin: 0 0 8px;
    padding: 12px 14px;
    border: 1px solid var(--grey-200, #e5e7eb);
    border-radius: 12px;
    background: #fff;
}

#invoicesScreen .invoice-row:last-child {
    margin-bottom: 0;
}

#invoicesScreen .invoice-row > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#invoicesScreen .invoice-row > div:first-child {
    flex: 1;
}

#invoicesScreen .invoice-row > div:last-child {
    flex: 0 0 auto;
    align-items: flex-end;
    text-align: right;
}

#invoicesScreen .invoice-row strong,
#invoicesScreen .invoice-row small {
    white-space: nowrap;
}

#invoicesScreen .invoice-row small {
    color: var(--grey-500, #6b7280);
    font-size: 0.78rem;
}


/* Question aprÃ¨s l'enregistrement d'une facture. */

.invoice-stock-dialog {
    width: min(430px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 24px;
    border: 0;
    border-radius: 20px;
    color: var(--grey-800, #1f2937);
    background: #fff;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
}

.invoice-stock-dialog::backdrop {
    background: rgba(20, 24, 40, 0.42);
}

.invoice-stock-dialog h2 {
    margin: 0 0 12px;
}

.invoice-stock-dialog p {
    margin: 0 0 22px;
    line-height: 1.5;
}

.invoice-stock-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}


/* Rapports : Pfand et recettes complÃ©mentaires. */

#reportAccountingSummary {
    margin-top: 14px;
}


/* Graphique : valeurs positives et nÃ©gatives. */

.accounting-chart-plot {
    position: relative;
    width: 100%;
    height: 180px;
}

.accounting-chart-plot::after {
    position: absolute;
    top: 90px;
    right: 0;
    left: 0;
    height: 1px;
    background: var(--grey-300, #d1d5db);
    content: "";
}

.accounting-chart-bar {
    position: absolute;
    z-index: 1;
    left: 50%;
    width: min(42px, 75%);
    transform: translateX(-50%);
    border-radius: 6px 6px 0 0;
    background: linear-gradient(
        180deg,
        var(--purple-dark, #6751b8),
        var(--blue, #5a9de2)
    );
}

.accounting-chart-bar.is-negative {
    border-radius: 0 0 6px 6px;
    background: #d77878;
}
/* Espacement du troisiÃ¨me bloc : Letzte EintrÃ¤ge. */

#invoicesScreen #receiptForm + h2 {
    margin-top: 34px;
}
/* =====================================================================
   BUCHHALTUNG â€” LETZTE EINTRÃ„GE
   ===================================================================== */

#invoicesScreen .bookkeeping-history-card {
    margin-top: 30px;
    padding: 14px;
    border-radius: 16px;
    background: #f5f6f8;
    color: #12496c;
}

#invoicesScreen .bookkeeping-history-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 2px 4px 16px;
    cursor: pointer;
    list-style: none;
}

#invoicesScreen .bookkeeping-history-summary::-webkit-details-marker {
    display: none;
}

#invoicesScreen .bookkeeping-history-summary > span:first-child {
    font-size: 1.25rem;
    font-weight: 850;
}

#invoicesScreen .bookkeeping-history-summary > span:last-child {
    margin-left: auto;
    color: #68778a;
    font-size: 0.8rem;
    white-space: nowrap;
}

#invoicesScreen .bookkeeping-history-summary::after {
    content: "â–¾";
    font-size: 1.1rem;
}

#invoicesScreen #bookkeepingHistory:not([open])
    .bookkeeping-history-summary::after {
    content: "â–¸";
}

#invoicesScreen .bookkeeping-table-scroll {
    max-height: 360px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #b9b7ff #f5f6f8;
    -webkit-overflow-scrolling: touch;
}

#invoicesScreen .bookkeeping-table-scroll::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

#invoicesScreen .bookkeeping-table-scroll::-webkit-scrollbar-thumb {
    border-radius: 12px;
    background: #b9b7ff;
}

#invoicesScreen .bookkeeping-table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 0.88rem;
}

#invoicesScreen .bookkeeping-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px;
    background: #f5f6f8;
    color: #12496c;
    font-weight: 850;
    text-align: left;
    white-space: nowrap;
}

#invoicesScreen .bookkeeping-table td {
    padding: 11px 12px;
    border-top: 1px solid #e1e5ea;
    border-bottom: 1px solid #e1e5ea;
    background: #fff;
    white-space: nowrap;
    vertical-align: middle;
}

#invoicesScreen .bookkeeping-table td:first-child {
    border-left: 1px solid #e1e5ea;
    border-radius: 11px 0 0 11px;
}

#invoicesScreen .bookkeeping-table td:last-child {
    border-right: 1px solid #e1e5ea;
    border-radius: 0 11px 11px 0;
}

#invoicesScreen .bookkeeping-table th:last-child,
#invoicesScreen .bookkeeping-table .bookkeeping-amount {
    text-align: right;
}

#invoicesScreen .bookkeeping-amount {
    font-weight: 800;
}

#invoicesScreen .bookkeeping-income-row .bookkeeping-amount {
    color: #267456;
}

#invoicesScreen .bookkeeping-expense-row .bookkeeping-amount {
    color: #12496c;
}

#invoicesScreen #bookkeepingHistoryMessage:empty {
    display: none;
}
/* =====================================================================
   SCHÃœLER â€” LIGNES COMPACTES
   ===================================================================== */

#studentsScreen #studentsList {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
}

#studentsScreen .student-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    width: 100%;
    min-width: 560px;
    gap: 16px;
    padding: 12px 14px;
}

#studentsScreen .student-row-main {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

#studentsScreen .student-row-main strong,
#studentsScreen .student-row-main small {
    white-space: nowrap;
}

#studentsScreen .student-row-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: auto;
    gap: 8px;
}

#studentsScreen .student-row-actions button {
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    padding: 9px 13px;
    white-space: nowrap;
}

#studentsScreen .student-avatar {
    width: 40px;
    height: 40px;
}


/* =====================================================================
   ZUGANG FREISCHALTEN
   ===================================================================== */

#studentsScreen .student-access-panel {
    margin-top: 34px;
}

#studentsScreen .access-development-note {
    margin: 0 0 18px;
    color: #68778a;
    line-height: 1.5;
}

#studentsScreen .access-selection-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 14px 0 10px;
}

#studentsScreen #accessSelectionCount {
    color: #68778a;
    font-size: 0.82rem;
    white-space: nowrap;
}

#studentsScreen .access-student-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    max-height: 180px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #e1e5ea;
    border-radius: 12px;
    background: #f7f8fa;
}

#studentsScreen .access-choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

#studentsScreen .access-choice input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #8172cf;
}

#studentsScreen .access-selected-students {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 20px;
}

#studentsScreen .access-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid #d3cdf3;
    border-radius: 22px;
    background: #f0edff;
    color: #12496c;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

#studentsScreen .access-chip-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8172cf;
    color: #fff;
    font-weight: 800;
}

#studentsScreen .access-until {
    color: #12496c;
    font-weight: 750;
}


/* =====================================================================
   FREISCHALTUNGEN â€” HISTORIQUE
   ===================================================================== */

#studentsScreen .access-history-card {
    margin-top: 22px;
    padding: 14px;
    border-radius: 16px;
    background: #f5f6f8;
    color: #12496c;
}

#studentsScreen .access-history-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 2px 4px 16px;
    cursor: pointer;
    list-style: none;
}

#studentsScreen .access-history-summary::-webkit-details-marker {
    display: none;
}

#studentsScreen .access-history-summary > span:first-child {
    font-size: 1.25rem;
    font-weight: 850;
}

#studentsScreen .access-history-summary > span:last-child {
    margin-left: auto;
    color: #68778a;
    font-size: 0.8rem;
    white-space: nowrap;
}

#studentsScreen .access-history-summary::after {
    content: "â–¾";
}

#studentsScreen #accessHistory:not([open])
    .access-history-summary::after {
    content: "â–¸";
}

#studentsScreen .access-table-scroll {
    max-height: 360px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #b9b7ff #f5f6f8;
    -webkit-overflow-scrolling: touch;
}

#studentsScreen .access-table-scroll::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

#studentsScreen .access-table-scroll::-webkit-scrollbar-thumb {
    border-radius: 12px;
    background: #b9b7ff;
}

#studentsScreen .access-history-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 0.88rem;
}

#studentsScreen .access-history-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px;
    background: #f5f6f8;
    text-align: left;
    white-space: nowrap;
}

#studentsScreen .access-history-table td {
    padding: 10px 12px;
    border-top: 1px solid #e1e5ea;
    border-bottom: 1px solid #e1e5ea;
    background: #fff;
    white-space: nowrap;
}

#studentsScreen .access-history-table td:first-child {
    border-left: 1px solid #e1e5ea;
    border-radius: 11px 0 0 11px;
}

#studentsScreen .access-history-table td:last-child {
    border-right: 1px solid #e1e5ea;
    border-radius: 0 11px 11px 0;
}

#studentsScreen .access-active td {
    background: #eef5ff;
}

#studentsScreen .access-planned td {
    background: #f0edff;
}

#studentsScreen .access-finished td {
    background: #f0f1f4;
    color: #68778a;
}

#studentsScreen .access-history-table button {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

#studentsScreen #accessHistoryMessage:empty {
    display: none;
}
/* SÃ©lection unique : bulles blanches ou colorÃ©es. */

#studentsScreen .access-student-choices {
    gap: 8px;
    background: #f7f8fa;
}

#studentsScreen .access-chip {
    padding: 9px 14px;
    border: 1px solid #dce1e7;
    border-radius: 22px;
    background: #fff;
    color: #12496c;
    font-weight: 650;
    transition:
        background 0.15s,
        border-color 0.15s;
}

#studentsScreen .access-chip.is-selected {
    border-color: #9283df;
    background: #ddd6fa;
    color: #12496c;
}

#studentsScreen .access-chip:focus-visible {
    outline: 3px solid #b9b7ff;
    outline-offset: 2px;
}
/* =====================================================================
   PRODUKTE â€” PRIX PLUS VISIBLES
   ===================================================================== */

#productsScreen [data-product-field="price"] {
    color: #267456;
    font-size: 1.05rem;
    font-weight: 850;
    white-space: nowrap;
}


/* =====================================================================
   HISTORIQUES â€” STYLE COMMUN
   ===================================================================== */

#teacherInventoryNotice.admin-history-card,
#productsScreen .admin-history-card {
    margin-top: 28px;
    padding: 14px;
    border-radius: 16px;
    background: #f5f6f8;
    color: #12496c;
}

.admin-history-card[hidden] {
    display: none !important;
}

.admin-history-card .admin-history-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 2px 4px 16px;
    cursor: pointer;
    list-style: none;
}

.admin-history-card .admin-history-summary::-webkit-details-marker {
    display: none;
}

.admin-history-card .admin-history-summary > span:first-child {
    font-size: 1.25rem;
    font-weight: 850;
}

.admin-history-card .admin-history-summary > span:last-child {
    margin-left: auto;
    color: #68778a;
    font-size: 0.8rem;
    white-space: nowrap;
}

.admin-history-card .admin-history-summary::after {
    content: "â–¾";
}

.admin-history-card details:not([open])
    > .admin-history-summary::after {
    content: "â–¸";
}

.admin-history-card .admin-history-scroll {
    max-height: 360px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #b9b7ff #f5f6f8;
    -webkit-overflow-scrolling: touch;
}

.admin-history-card .admin-history-scroll::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.admin-history-card .admin-history-scroll::-webkit-scrollbar-thumb {
    border-radius: 12px;
    background: #b9b7ff;
}

.admin-history-card .admin-history-table {
    width: 100%;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 0.88rem;
}

#productsScreen .admin-history-table {
    min-width: 1000px;
}

.admin-history-card .admin-history-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px;
    background: #f5f6f8;
    text-align: left;
    white-space: nowrap;
}

.admin-history-card .admin-history-table td {
    padding: 11px 12px;
    border-top: 1px solid #e1e5ea;
    border-bottom: 1px solid #e1e5ea;
    background: #fff;
    white-space: nowrap;
    vertical-align: middle;
}

.admin-history-card .admin-history-table td:first-child {
    border-left: 1px solid #e1e5ea;
    border-radius: 11px 0 0 11px;
}

.admin-history-card .admin-history-table td:last-child {
    border-right: 1px solid #e1e5ea;
    border-radius: 0 11px 11px 0;
}

.admin-history-card .admin-history-table td small {
    display: block;
    margin-top: 3px;
    color: #68778a;
    font-size: 0.75rem;
}

.admin-history-card .history-current td {
    background: #e8e1ff;
}

.admin-history-card .history-unseen td {
    background: #e7f3ff;
}

.admin-history-card .history-seen td {
    background: #f0f1f4;
    color: #68778a;
}

.admin-history-card .form-message:empty {
    display: none;
}
/* Produkte â€” prix en vert accent, gras, taille intermÃ©diaire. */

#productsScreen [data-product-field="price"] {
    color: #b2bd43;
    font-size: 0.95rem;
    font-weight: 800;
    white-space: nowrap;
}
/* Bulles Ã©lÃ¨ves : cercle aprÃ¨s le nom. */

#studentsScreen #accessStudentChoices .access-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#studentsScreen #accessStudentChoices .access-chip::after {
    content: "";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    border: 2px solid #b7aedf;
    border-radius: 50%;
    background: #fff;
}

#studentsScreen #accessStudentChoices .access-chip.is-selected::after {
    content: "âœ“";
    border-color: #8172cf;
    background: #8172cf;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}
/* =====================================================================
   BENACHRICHTIGUNGEN â€” LISTE COMPACTE
   ===================================================================== */

#notificationsScreen #notificationsList {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: #b9b7ff #f5f6f8;
    -webkit-overflow-scrolling: touch;
}

#notificationsScreen #notificationsList::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

#notificationsScreen #notificationsList::-webkit-scrollbar-thumb {
    border-radius: 12px;
    background: #b9b7ff;
}

#notificationsScreen #notificationsList .notification-card {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: max-content;
    min-width: 100%;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
}

#notificationsScreen #notificationsList .notification-card-main {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
}

#notificationsScreen #notificationsList .notification-card-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 1rem;
}

#notificationsScreen #notificationsList
    .notification-card-main > div:last-child {
    display: grid;
    grid-template-columns:
        230px
        minmax(360px, max-content)
        minmax(220px, max-content);
    align-items: center;
    gap: 18px;
}

#notificationsScreen #notificationsList .notification-card strong {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: left;
    white-space: nowrap;
}

#notificationsScreen #notificationsList .notification-card p {
    margin: 0;
    padding: 0;
    font-size: 0.86rem;
    line-height: 1.4;
    text-align: left;
    white-space: nowrap;
}

#notificationsScreen #notificationsList .notification-card small {
    margin: 0;
    font-size: 0.77rem;
    line-height: 1.4;
    text-align: right;
    white-space: nowrap;
}


/* =====================================================================
   EMPFÃ„NGER â€” BULLES COMME DANS SCHÃœLER
   ===================================================================== */

#notificationsScreen #notificationRecipientList {
    display: block;
    width: 100%;
    min-width: 0;
}

#notificationsScreen #notificationRecipientSearch {
    width: 100%;
}

#notificationsScreen .notification-selection-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 14px 0 10px;
}

#notificationsScreen #notificationRecipientCount {
    color: #68778a;
    font-size: 0.82rem;
    white-space: nowrap;
}

#notificationsScreen .notification-recipient-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #e1e5ea;
    border-radius: 12px;
    background: #f7f8fa;
}

#notificationsScreen .notification-recipient-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border: 1px solid #dce1e7;
    border-radius: 22px;
    background: #fff;
    color: #12496c;
    font-size: 0.85rem;
    font-weight: 650;
    cursor: pointer;
}

#notificationsScreen .notification-recipient-chip[hidden] {
    display: none !important;
}

/* Garder les cases accessibles au clavier,
   tout en les prÃ©sentant sous forme de bulles. */

#notificationsScreen .notification-recipient-chip input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

#notificationsScreen .recipient-chip-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#notificationsScreen .recipient-chip-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    border: 2px solid #b7aedf;
    border-radius: 50%;
    background: #fff;
}

#notificationsScreen .notification-recipient-chip:has(input:checked) {
    border-color: #9283df;
    background: #ddd6fa;
}

#notificationsScreen .notification-recipient-chip
    input:checked + .recipient-chip-name .recipient-chip-circle {
    border-color: #8172cf;
    background: #8172cf;
    color: #fff;
}

#notificationsScreen .notification-recipient-chip
    input:checked + .recipient-chip-name .recipient-chip-circle::after {
    content: "âœ“";
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

#notificationsScreen .notification-recipient-chip:focus-within {
    outline: 3px solid #b9b7ff;
    outline-offset: 2px;
}
/* =====================================================================
   GETRÃ„NKE + BÃ„CKEREI â€” CAISSES
   ===================================================================== */

/* Boutons de paiement en vert accent. */

#drinksPayButton,
#drinksPaidButton,
#bakeryPayButton,
#bakeryPaidButton {
    background: #b2bd43;
    border-color: #b2bd43;
    color: #12496c;
    font-weight: 850;
}

/* Touches de calculatrice en violet. */

#drinksPaymentKeypad .payment-key,
#bakeryPaymentKeypad .payment-key {
    color: #8172cf;
    font-weight: 850;
}


/* =====================================================================
   PROFESSEUR â€” UNIVERS TEST JAUNE
   ===================================================================== */

body.teacher-test-mode :is(
    #drinksSaleScreen,
    #drinksPaymentScreen,
    #drinksSuccessScreen,
    #freeDrinksScreen,
    #bakerySaleScreen,
    #bakeryPaymentScreen,
    :is(#bakerySuccessScreen, #eventSuccessScreen),
    :is(#bakeryOutputScreen, #eventOutputScreen)
) {
    box-sizing: border-box;
    min-height: calc(100vh - 160px);
    background: #fff9df;
    border: 2px solid #efd575;
    border-radius: 20px;
}

body.teacher-test-mode :is(
    #drinksTestBanner,
    #drinksPaymentTestBanner,
    #freeDrinksTestBanner,
    #bakerySaleTestBanner,
    #bakeryPaymentTestBanner
) {
    margin-bottom: 24px;
    padding: 18px 22px;
    border: 2px solid #e5bd39;
    border-radius: 18px;
    background: #fff0ae;
    color: #665000;
    font-size: 1.05rem;
    font-weight: 850;
}


/* =====================================================================
   ZAHLUNG ERFOLGREICH â€” CENTRAGE
   ===================================================================== */

#drinksSuccessScreen .success-content,
:is(#bakerySuccessScreen, #eventSuccessScreen) .success-content {
    box-sizing: border-box;
    width: min(100%, 760px);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 60px) 20px;
    text-align: center;
}

#drinksSuccessScreen .success-content h1,
#drinksSuccessScreen .success-content p,
:is(#bakerySuccessScreen, #eventSuccessScreen) .success-content h1,
:is(#bakerySuccessScreen, #eventSuccessScreen) .success-content p {
    text-align: center;
}

#drinksSuccessScreen .success-icon,
:is(#bakerySuccessScreen, #eventSuccessScreen) .success-icon {
    margin-right: auto;
    margin-left: auto;
}

#drinksSuccessScreen .success-actions,
:is(#bakerySuccessScreen, #eventSuccessScreen) .success-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

body.teacher-test-mode :is(
    #drinksSuccessScreen,
    :is(#bakerySuccessScreen, #eventSuccessScreen)
) .success-content::before {
    content: "TESTUMGEBUNG â€” Keine echten VerkÃ¤ufe oder BestandsÃ¤nderungen";
    display: block;
    margin-bottom: 28px;
    padding: 16px 20px;
    border: 2px solid #e5bd39;
    border-radius: 18px;
    background: #fff0ae;
    color: #665000;
    font-weight: 850;
}
/* Berichte â€” suivi sÃ©parÃ© des boissons gratuites. */

#reportsScreen #freeDrinksReportPanel {
    margin-top: 22px;
}

#reportsScreen .free-drinks-report-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

#reportsScreen .free-drinks-report-heading h2 {
    margin: 0;
    font-size: 1.15rem;
}

#reportsScreen .free-drinks-report-heading > strong {
    padding: 9px 14px;
    border-radius: 12px;
    background: #e8e1ff;
    color: #12496c;
    font-size: 1.2rem;
    font-weight: 850;
}
/* =====================================================================
   PROFESSEUR â€” UNE SEULE ZONE TEST
   ===================================================================== */

body.teacher-test-mode :is(
    #drinksSaleScreen,
    #drinksPaymentScreen,
    #drinksSuccessScreen,
    #freeDrinksScreen,
    #bakerySaleScreen,
    #bakeryPaymentScreen,
    :is(#bakerySuccessScreen, #eventSuccessScreen),
    :is(#bakeryOutputScreen, #eventOutputScreen)
) {
    box-sizing: border-box;
    padding: 18px;
    background: #fff9df;
    border: 2px solid #efd575;
    border-radius: 20px;
}

/* Remplacer les anciennes bulles de test par un seul texte. */

body.teacher-test-mode :is(
    #drinksTestBanner,
    #drinksPaymentTestBanner,
    #freeDrinksTestBanner,
    #bakerySaleTestBanner,
    #bakeryPaymentTestBanner,
    #bakeryOutputTestBanner
) {
    display: none !important;
}

body.teacher-test-mode :is(
    #drinksSaleScreen,
    #drinksPaymentScreen,
    #drinksSuccessScreen,
    #freeDrinksScreen,
    #bakerySaleScreen,
    #bakeryPaymentScreen,
    :is(#bakerySuccessScreen, #eventSuccessScreen),
    :is(#bakeryOutputScreen, #eventOutputScreen)
)::before {
    content: "âš ï¸ Lehrer-Testumgebung";
    display: block;
    margin-bottom: 18px;
    color: #7a5b00;
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-weight: 850;
    text-align: right;
}

/* Supprimer la seconde bulle ajoutÃ©e sur les Ã©crans de succÃ¨s. */

body.teacher-test-mode :is(
    #drinksSuccessScreen,
    :is(#bakerySuccessScreen, #eventSuccessScreen)
) .success-content::before {
    content: none !important;
    display: none !important;
}


/* =====================================================================
   BEZAHLEN â€” CALCULATRICE CENTRÃ‰E
   ===================================================================== */

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen) .screen-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .screen-header h1 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    text-align: center;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .screen-header .back-button {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: auto;
    padding: 9px 12px;
    font-size: 0.9rem;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-container {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: min(360px, 100%);
    margin: 0 auto;
    gap: 12px;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 12px 16px;
    border: 1px solid #dce1e7;
    border-radius: 14px;
    background: #fff;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-summary-card > span {
    color: #12496c;
    font-size: 1rem;
    font-weight: 700;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-summary-card > strong {
    color: #12496c;
    font-size: 1.45rem;
    font-weight: 850;
    white-space: nowrap;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .change-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 12px 16px;
    border-radius: 22px;
    background: #d8cff8;
    color: #12496c;
    font-size: 1.05rem;
    font-weight: 750;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .change-container strong {
    font-size: 1.45rem;
    font-weight: 850;
    white-space: nowrap;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(280px, 100%);
    margin: 4px auto;
    gap: 8px;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-key {
    box-sizing: border-box;
    width: 100%;
    height: 70px;
    min-height: 0;
    padding: 0;
    border: 2px solid #b9acf0;
    border-radius: 12px;
    background: #fff;
    color: #8172cf;
    font-size: 1.7rem;
    font-weight: 850;
    box-shadow: none;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-key:hover {
    border-color: #8172cf;
    background: #f1edff;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-key:active {
    background: #ddd6fa;
}

#drinksPaidButton,
#bakeryPaidButton {
    box-sizing: border-box;
    width: 100%;
    min-height: 58px;
    margin: 0;
    border: 0;
    border-radius: 30px;
    background: #b2bd43;
    color: #12496c;
    font-size: 1.2rem;
    font-weight: 850;
}

#drinksPaidButton:disabled,
#bakeryPaidButton:disabled {
    opacity: 0.45;
}


/* =====================================================================
   ZAHLUNG ERFOLGREICH â€” CONTENU CENTRÃ‰
   ===================================================================== */

:is(#drinksSuccessScreen, :is(#bakerySuccessScreen, #eventSuccessScreen))
    .success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: min(760px, 100%);
    min-height: 420px;
    margin: 0 auto;
    padding: 28px 16px;
    gap: 16px;
    text-align: center;
}

:is(#drinksSuccessScreen, :is(#bakerySuccessScreen, #eventSuccessScreen))
    .success-content h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    text-align: center;
}

:is(#drinksSuccessScreen, :is(#bakerySuccessScreen, #eventSuccessScreen))
    .success-content p {
    margin: 0;
    font-size: 1rem;
    text-align: center;
}

:is(#drinksSuccessScreen, :is(#bakerySuccessScreen, #eventSuccessScreen))
    .success-icon {
    margin: 0;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .success-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

@media (max-width: 600px) {
    :is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
        .screen-header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    :is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
        .screen-header h1 {
        order: -1;
    }

    :is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
        .screen-header .back-button {
        align-self: flex-start;
    }
}
/* Montants sans bulles : Zu zahlen et Kunde gibt. */

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-summary-card {
    justify-content: center;
    gap: 8px;
    padding: 2px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-summary-card > span {
    font-size: 0.95rem;
    font-weight: 650;
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-summary-card > span::after {
    content: ":";
}

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
    .payment-summary-card > strong {
    font-size: 1.1rem;
    font-weight: 800;
}
/* =========================================================
   AUSGABE â€” TESTS PERSONNELS DU PROFESSEUR
   ========================================================= */

:is(#bakeryOutputScreen, #eventOutputScreen) .output-order-card.bakery-test-order,
:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row.bakery-test-order {
    background: #fff7d5;
    border-color: #fdbe3f;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-test-order .output-order-number {
    color: #78520b;
    font-size: 1.9rem;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-readonly-label {
    display: block;
    align-self: flex-end;
    margin-top: auto;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 600;
}
/* =========================================================
   AUSGABE â€” CARTES ADAPTÃ‰ES AU MOCK-UP
   ========================================================= */


/* Zone dÃ©filante, indÃ©pendante des colonnes de cartes */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-output-orders {
    display: block;
    column-width: auto;
    column-count: auto;

    max-height: 70vh;
    padding: 3px 8px 3px 3px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}


/* Disposition en colonnes, avec hauteurs libres */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-masonry {
    column-width: 240px;
    column-gap: 18px;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .output-order-card {
    display: inline-block;
    vertical-align: top;
    break-inside: avoid;

    width: 100%;
    margin: 0 0 18px;
    padding: 0;

    overflow: hidden;
    border: 2px solid #094369;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: none;
    box-sizing: border-box;
}


/* Bandeau bleu foncÃ© */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-card-header {
    display: block;
    margin: 0;
    padding: 15px 18px;

    background: #094369;
    color: #ffffff;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .output-order-number,
:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-test-order .output-order-number {
    display: block;
    margin: 0;

    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
}


/* Contenu */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-card-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 14px 14px;
    background: #ffffff;
    color: #094369;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-time {
    display: block;
    align-self: flex-end;

    margin: 6px 0 16px;
    color: #7a7a7a;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.3;
    opacity: 1;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .output-order-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-item {
    display: flex;
    align-items: flex-start;
    gap: 5px;

    color: #094369;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-item-quantity {
    flex: 0 0 auto;
    color: #094369;
    font-weight: 700;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-total {
    display: block;
    margin: 8px 0 18px;

    color: #094369;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.35;
}


/* Grand bouton vert intÃ©grÃ© dans la carte */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-served-button {
    display: block;
    align-self: stretch;

    width: 100%;
    margin: 0;
    padding: 11px 14px;

    border: 0;
    border-radius: 999px;
    background: #b2bd43;
    color: #094369;

    font: inherit;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-served-button:disabled {
    opacity: 0.55;
    cursor: wait;
}


/* Tests du professeur */

:is(#bakeryOutputScreen, #eventOutputScreen) .output-order-card.bakery-test-order {
    border-color: #094369;
    background: #fff7d5;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-test-order .bakery-order-card-body {
    background: #fff7d5;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-readonly-label {
    align-self: flex-end;
    margin: 0 0 2px;
    color: #667085;
    font-size: 0.8rem;
    font-weight: 600;
}


/* Message vide */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-output-empty {
    column-span: all;
    min-height: 180px;
}
/* =========================================================
   AUSGABE â€” DISPOSITION FINALE DU DASHBOARD
   ========================================================= */

:is(#bakeryOutputScreen, #eventOutputScreen) {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}


/* En-tÃªte */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-dashboard-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-dashboard-header h1 {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    color: #094369;
    font-size: clamp(1.3rem, 2.2vw, 1.9rem);
    font-weight: 800;
    text-align: center;
}

#bakeryOutputEditButton {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: auto;
    white-space: nowrap;
}

:is(#bakeryOutputScreen, #eventOutputScreen) #bakeryOutputShiftEndButton {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: auto;
    white-space: nowrap;

    padding: 11px 16px;
    border: 2px solid #094369;
    border-radius: 10px;
    background: #ffffff;
    color: #094369;
    font-weight: 800;
}


/* 20 % historique Ã  gauche, 80 % commandes Ã  droite */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-output-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 4fr);
    gap: 24px;
    align-items: start;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-orders-panel {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;

    padding: 14px;
    border: 2px solid #094369;
    border-radius: 26px;
    background: #ffffff;
    box-sizing: border-box;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-open-orders-panel {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;

    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-output-heading {
    margin: 0 0 18px;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-output-heading h2 {
    margin: 0;
    color: #094369;
    font-size: 1.3rem;
    font-weight: 800;
}


/* Cartes compactes, hauteurs libres */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-output-orders {
    display: block;
    column-width: auto;
    column-count: auto;

    max-height: 72vh;
    padding: 2px 7px 2px 2px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-masonry {
    column-width: 190px;
    column-gap: 14px;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .output-order-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 14px;
    padding: 0;

    break-inside: avoid;
    vertical-align: top;
    overflow: hidden;

    border: 2px solid #094369;
    border-radius: 20px;
    background: #ffffff;
    box-sizing: border-box;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-card-header {
    padding: 11px 12px;
    background: #094369;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .output-order-number,
:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-test-order .output-order-number {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-card-body {
    padding: 0 10px 10px;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-time {
    margin: 5px 0 13px;
    color: #7a7a7a;
    font-size: 0.65rem;
    text-align: right;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-item {
    gap: 5px;
    color: #094369;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-order-total {
    margin: 8px 0 12px;
    color: #094369;
    font-size: 0.9rem;
    font-weight: 800;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-served-button {
    width: 100%;
    padding: 9px 12px;
    border-radius: 999px;
    background: #b2bd43;
    color: #094369;
    font-size: 1.05rem;
    font-weight: 800;
}


/* Historique : barre dÃ©roulante */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    padding: 11px 10px;
    border-radius: 12px;
    background: #f0edff;
    color: #094369;

    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
    list-style: none;
    cursor: pointer;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary > span {
    flex: 1;
    min-width: 0;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary::-webkit-details-marker {
    display: none;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary::after {
    content: "â–¸";
    flex: 0 0 auto;
    margin-left: 0;
    color: #8b7ed4;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history[open] summary::after {
    content: "â–¾";
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-scroll {
    display: block;
    max-height: 65vh;
    margin-top: 12px;
    padding-right: 5px;
    overflow: auto;

    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #bab0f4 #edf0f4;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    width: max-content;
    min-width: 100%;
    margin: 0 0 5px;
    padding: 8px 9px;

    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f5f6f8;
    white-space: nowrap;
    box-sizing: border-box;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row strong {
    color: #094369;
    font-size: 0.8rem;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row time {
    color: #667085;
    font-size: 0.68rem;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-scroll::-webkit-scrollbar {
    width: 10px;
    height: 8px;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-scroll::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #edf0f4;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-scroll::-webkit-scrollbar-thumb {
    border: 2px solid #edf0f4;
    border-radius: 999px;
    background: #bab0f4;
}


/* Tests personnels jaunes */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-test-order .bakery-order-card-body,
:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row.bakery-test-order {
    background: #fff7d5;
}


/* TrÃ¨s petit Ã©cran : historique sous les commandes */

@media (max-width: 600px) {

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-dashboard-header {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-dashboard-header h1 {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 6px;
    }

    #bakeryOutputEditButton {
        grid-column: 1;
        grid-row: 1;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) #bakeryOutputShiftEndButton {
        grid-column: 2;
        grid-row: 1;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-output-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-open-orders-panel {
        grid-column: 1;
        grid-row: 1;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-orders-panel {
        grid-column: 1;
        grid-row: 2;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-scroll {
        max-height: 280px;
    }

}
/* =========================================================
   AUSGABE â€” EN-TÃŠTE DÃ‰CALÃ‰ ET HISTORIQUE Ã€ DROITE
   ========================================================= */


/* Trois niveaux distincts dans lâ€™en-tÃªte */

:is(#bakeryOutputScreen, #eventOutputScreen) {
    padding-top: 8px;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-dashboard-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 5px 14px;

    margin-top: 0;
    margin-bottom: 28px;
}

:is(#bakeryOutputScreen, #eventOutputScreen) #bakeryOutputEditButton {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: start;
    margin: 0;
}

:is(#bakeryOutputScreen, #eventOutputScreen) #bakeryOutputShiftEndButton {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: start;
    margin: 0;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-dashboard-header h1 {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: center;

    width: 100%;
    margin: 10px 0 0;
    text-align: center;
}


/* Commandes ouvertes Ã  gauche, terminÃ©es Ã  droite */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-output-layout {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(340px, 1fr);
    gap: 24px;
    align-items: start;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-open-orders-panel {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-orders-panel {
    grid-column: 2;
    grid-row: 1;
    min-width: 340px;

    padding: 20px;
    border: 2px solid #b5dfee;
    border-radius: 26px;
    background: #f4faff;
    box-shadow: 0 2px 8px rgba(9, 67, 105, 0.04);
    box-sizing: border-box;
}


/* Barre de menu dÃ©roulant violette */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 15px 13px;
    border-radius: 15px;
    background: #f0edff;
    color: #094369;

    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    cursor: pointer;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary > span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary::after {
    content: "â–¸";
    flex: 0 0 auto;
    color: #8b7ed4;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history[open] summary::after {
    content: "â–¾";
}


/* Historique : numÃ©ro et date sur une seule ligne */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-scroll {
    display: block;
    max-height: 65vh;
    margin-top: 14px;
    padding-right: 5px;
    overflow-y: auto;
    overflow-x: auto;

    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #bab0f4 #edf0f4;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    width: max-content;
    min-width: 100%;
    margin: 0 0 7px;
    padding: 11px 10px;

    border: 1px solid #e3e6ec;
    border-radius: 9px;
    background: #f5f6f8;
    white-space: nowrap;
    box-sizing: border-box;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row strong {
    flex: 0 0 auto;
    color: #094369;
    font-size: 0.95rem;
    font-weight: 800;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row time {
    flex: 0 0 auto;
    color: #667085;
    font-size: 0.8rem;
}


/* Les tests conservent leur fond jaune */

:is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row.bakery-test-order {
    background: #fff7d5;
    border-color: #fdbe3f;
}


/* Quand les deux panneaux ne tiennent plus cÃ´te Ã  cÃ´te */

@media (max-width: 820px) {

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-output-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-open-orders-panel {
        grid-column: 1;
        grid-row: 1;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-orders-panel {
        grid-column: 1;
        grid-row: 2;

        width: 100%;
        min-width: 0;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-scroll {
        max-height: 340px;
    }

}


/* Ã‰crans particuliÃ¨rement Ã©troits */

@media (max-width: 380px) {

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-orders-panel {
        padding: 12px;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary {
        padding: 12px 9px;
        font-size: 0.85rem;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row {
        gap: 10px;
        padding: 10px 8px;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row strong {
        font-size: 0.85rem;
    }

    :is(#bakeryOutputScreen, #eventOutputScreen) .completed-order-row time {
        font-size: 0.72rem;
    }

}
#freeDrinksScreen .free-drinks-warning {
    color: #b42318 !important;
    font-weight: 800;
}
/* =========================================================
   PRODUKTE â€” FILTRES EN BULLES BLEUES
   ========================================================= */

#productsScreen .filter-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 16px 0 20px;
}

#productsScreen button[data-product-filter] {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 9px 16px;

    border: 1.5px solid #094369;
    border-radius: 999px;
    background: #ffffff;
    color: #094369;

    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;

    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

#productsScreen button[data-product-filter].active {
    border-color: #094369;
    background: #094369;
    color: #ffffff;
}

@media (hover: hover) {
    #productsScreen button[data-product-filter]:not(.active):hover {
        background: #edf6fc;
    }
}

#productsScreen button[data-product-filter]:focus-visible {
    outline: 3px solid #bab0f4;
    outline-offset: 3px;
}
/* Masquer les Ã©crans tant que showScreen()
   ne les a pas explicitement ouverts. */

.screen:not(.screen-visible) {
    display: none !important;
}
/* =========================================================
   SON DERVERANSTALTUNGEN â€” COMPLÃ‰MENT V6
   ========================================================= */

.event-v6-dialog {
    width: min(620px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    box-sizing: border-box;
    overflow: auto;
    padding: 24px;
    border: 0;
    border-radius: 24px;
    color: #09436a;
    background: white;
}

.event-v6-dialog::backdrop {
    background: rgb(9 67 106 / 40%);
}

.event-v6-dialog .form-field {
    margin: 14px 0;
}

.event-v6-dialog input,
.event-v6-dialog select,
.event-v6-dialog textarea {
    box-sizing: border-box;
    max-width: 100%;
}

.event-v6-dialog textarea {
    width: 100%;
    padding: 12px;
}

.event-v6-offer {
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    background: #ff79bd;
    color: #52213e;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.event-v6-offer:focus-visible {
    outline: 3px solid #09436a;
    outline-offset: 3px;
}

#foodEventWorkspace.event-v6-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#foodEventWorkspace .admin-menu-card {
    min-width: 0;
}

#foodEventWorkspace .admin-menu-card strong,
#foodEventWorkspace .admin-menu-card small {
    word-break: normal;
    overflow-wrap: normal;
}

.event-v6-chips,
.event-v6-output-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.event-v6-chips button {
    border-radius: 999px;
    padding: 10px 16px;
}

.event-v6-chips button:disabled {
    opacity: .65;
}

.event-v6-output-tabs button {
    padding: 10px 16px;
    border-radius: 14px;
    cursor: pointer;
}

.event-v6-test {
    background: #fff5c4 !important;
}

.event-v6-warning {
    color: #b91c1c;
    font-weight: 800;
}

.event-v6-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    margin: 6px 0;
    border: 1px solid #d9e2ea;
    border-radius: 14px;
    background: white;
    color: #09436a;
    font: inherit;
    text-align: left;
}

button.event-v6-row {
    cursor: pointer;
}

.event-v6-row strong {
    flex: 1;
    min-width: 140px;
}

.event-v6-history summary {
    padding: 14px;
    font-weight: 800;
    cursor: pointer;
}

.event-v6-history #pastEventsList {
    max-height: 280px;
    overflow-y: auto;
}

#eventV6Dialog [hidden],
#eventCostsFields [hidden],
.event-v6-offer[hidden],
.event-v6-output-tabs[hidden] {
    display: none !important;
}

@media (max-width: 700px) {
    #foodEventWorkspace.event-v6-grid {
        grid-template-columns: 1fr;
    }

    .event-v6-dialog {
        padding: 18px;
    }
}
/* =========================================================
   SONDERVERANSTALTUNG â€” BULLE IN BEARBEITUNG
   ========================================================= */

#homeEventsButton {
    position: relative;
}

#homeEventsButton .event-work-badge {
    position: absolute;
    top: 14px;
    right: 14px;

    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto;
    padding: 5px 9px;

    background: var(--yellow, #ffc43d);
    color: #624900;
    border-radius: 999px;

    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1.3;
    text-transform: uppercase;
    white-space: nowrap;

    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transition: opacity 150ms ease;
}

/* =========================================================
   ACCUEIL â€” CARTES DIMENSIONNÃ‰ES PAR LEUR CONTENU
   Ã‰lÃ¨ves et professeur
   ========================================================= */

#homeScreen .home-menu-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 18px;
}

#homeScreen .home-menu-card {
    /* La carte ne s'Ã©tire pas et ne rÃ©trÃ©cit pas */
    flex: 0 0 auto;
    width: max-content;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;

    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;

    min-height: 140px;
    padding: 22px;
    gap: 16px;

    text-align: left;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* IcÃ´ne de taille constante */
#homeScreen .home-menu-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    font-size: 1.8rem;
}

/* La largeur suit le texte le plus long */
#homeScreen .home-menu-text {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;

    width: max-content;
    min-width: 0;
    gap: 5px;
}

#homeScreen .home-menu-text strong {
    display: block;
    font-size: 1.1rem;
    line-height: 1.25;

    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

#homeScreen .home-menu-text small {
    display: block;
    max-width: none;
    font-size: 0.9rem;
    line-height: 1.4;

    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* Une place rÃ©servÃ©e Ã  la flÃ¨che */
#homeScreen .home-menu-arrow {
    flex: 0 0 auto;
    margin-left: 0;
    font-size: 1.6rem;
    line-height: 1;
}
/* =========================================================
   CAISSES â€” PRODUITS COMPACTS ET PANIER Ã€ DROITE
   ========================================================= */

/* Trois produits par ligne */
:is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
.product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

/* Cartes produits plus compactes */
:is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
.sale-product-card {
    box-sizing: border-box;
    min-width: 0;
    min-height: 105px;
    padding: 10px 8px;
    gap: 4px;
    font-size: 0.85rem;
}

/* Emojis plus petits */
:is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
.sale-product-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

/* Noms : retour Ã  la ligne entre les mots */
:is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
.sale-product-card strong {
    font-size: 0.85rem;
    line-height: 1.2;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* Prix */
:is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
.sale-product-card > span:last-of-type {
    font-size: 0.8rem;
}

/* iPad : produits Ã  gauche, panier Ã  droite */
@media (min-width: 700px) {
    :is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
    .sale-layout {
        grid-template-columns:
            minmax(0, 1fr)
            clamp(260px, 34vw, 380px);
        gap: 16px;
        align-items: start;
    }

    :is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
    .cart-panel {
        position: sticky;
        top: calc(var(--header-height, 66px) + 12px);
        padding: 16px;
    }
}

/* TÃ©lÃ©phone ou fenÃªtre trÃ¨s Ã©troite */
@media (max-width: 699px) {
    :is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
    .sale-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    :is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
    .cart-panel {
        position: static;
    }
}

@media (max-width: 420px) {
    :is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* =========================================================
   CAISSES â€” NOMS LISIBLES ET CARTES PRODUITS COMPACTES
   ========================================================= */

/* Panier : nom sur toute la largeur */
:is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
.cart-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
}

:is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
.cart-row > div:first-child {
    grid-column: 1 / -1;
    min-width: 0;
}

:is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
.cart-row > div:first-child strong {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

:is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
.cart-row > .quantity-control {
    grid-column: 1;
    justify-self: start;
}

:is(#drinksSaleScreen, #bakerySaleScreen, #eventSaleScreen)
.cart-row > strong:last-child {
    grid-column: 2;
    justify-self: end;
    text-align: right;
    white-space: nowrap;
}
/* =========================================================
   PAIEMENT â€” MONTANT REÃ‡U ET MONNAIE Ã€ RENDRE
   GetrÃ¤nke et BÃ¤ckerei
   ========================================================= */

/* Les deux-points figurent maintenant directement dans le HTML */
:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
.payment-summary-card > span::after,

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
.change-container > span::after {
    content: none;
}

/* Deux rectangles arrondis, plus Ã©troits que le bouton Bezahlt */
:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
.payment-received-card,

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
.change-container {
    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    width: min(300px, 100%);
    min-height: 52px;
    margin: 0 auto;
    padding: 12px 14px;
    gap: 8px;

    border: none;
    border-radius: 20px;
    box-shadow: none;
}

/* Montant donnÃ© par le client */
:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
.payment-received-card {
    background: #cfe7f7;
}

/* Monnaie Ã  rendre */
:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
.change-container {
    background: #d8cff8;
}

/* MÃªme taille de texte dans les deux bulles */
:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
.payment-received-card > span,

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
.payment-received-card > strong,

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
.change-container > span,

:is(#drinksPaymentScreen, #bakeryPaymentScreen, #eventPaymentScreen)
.change-container > strong {
    color: #12496c;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}
/* BÃ¤ckerei : numÃ©ro de commande bien visible */

:is(#bakerySuccessScreen, #eventSuccessScreen) :is(#bakerySuccessOrderNumber, #eventSuccessOrderNumber) {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    min-width: 160px;
    max-width: 100%;
    padding: 16px 28px;

    background: #cfe7f7;
    color: #12496c;
    border-radius: 20px;

    font-size: clamp(1.45rem, 2.7vw, 1.85rem);
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
/* =========================================================
   MENUS â€” CARTES ADAPTÃ‰ES Ã€ LEUR CONTENU
   Bearbeiten, BÃ¤ckerei et Sonderveranstaltung
   Ã‰lÃ¨ves et professeur
   ========================================================= */

/* Les cartes passent automatiquement Ã  la ligne */
body .screen .admin-menu-grid,
body .screen .choice-grid,
body .screen .event-workspace-grid,
#foodEventWorkspace.event-v6-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 18px;
}

/* Chaque carte garde la largeur nÃ©cessaire Ã  son contenu */
body .screen :is(.admin-menu-card, .choice-card) {
    position: relative;
    flex: 0 0 auto;

    width: max-content;
    min-width: 0;
    max-width: none;
    min-height: 140px;
    box-sizing: border-box;

    display: grid;
    grid-template-columns: 48px max-content;
    grid-template-rows: auto auto;
    align-content: center;
    align-items: center;
    justify-content: start;

    padding: 22px;
    column-gap: 16px;
    row-gap: 5px;

    text-align: left;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* IcÃ´ne Ã  gauche du titre et du sous-titre */
body .screen .admin-menu-card > .admin-menu-icon,
body .screen .choice-card > span:first-child {
    grid-column: 1;
    grid-row: 1 / 3;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    margin: 0;

    background: var(--blue-light);
    border-radius: var(--radius);
    font-size: 1.8rem;
}

/* Titre entier, sur la premiÃ¨re ligne */
body .screen :is(.admin-menu-card, .choice-card) > strong {
    grid-column: 2;
    grid-row: 1;

    display: block;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.25;

    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* Sous-titre entier, juste en dessous */
body .screen :is(.admin-menu-card, .choice-card) > small {
    grid-column: 2;
    grid-row: 2;

    display: block;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;

    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* Respecte les cartes masquÃ©es selon le rÃ´le */
body .screen :is(.admin-menu-card, .choice-card)[hidden] {
    display: none !important;
}
/* =========================================================
   CLOCHE â€” NOTIFICATIONS COMPACTES SUR UNE LIGNE
   ========================================================= */

#notificationPopover {
    width: min(560px, calc(100vw - 24px));
    box-sizing: border-box;
}

#notificationPreviewList .notification-compact {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;

    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    gap: 6px;

    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

/* Titre en gras */
#notificationPreviewList .notification-compact > strong {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 65%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 0.91rem;
    font-weight: 800;
}

/* Tiret entre le titre et le message */
#notificationPreviewList .notification-separator {
    flex: 0 0 auto;
}

/* Message normal, avec une fin en dÃ©gradÃ© */
#notificationPreviewList .notification-compact > small {
    display: block;
    flex: 1 1 0;
    min-width: 0;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;

    font-size: 0.8rem;
    font-weight: 400;
    opacity: 1;

    -webkit-line-clamp: unset;
    -webkit-box-orient: initial;

    -webkit-mask-image:
        linear-gradient(to right, #000 85%, transparent);
    mask-image:
        linear-gradient(to right, #000 85%, transparent);
}

/* Notifications nouvelles */
#notificationPreviewList .notification-compact.notification-new {
    background: #e8f3fc;
    color: #094369;
    border: 1px solid #cfe3f3;
}

/* Notifications dÃ©jÃ  lues : visibles pour les Ã©lÃ¨ves */
#notificationPreviewList .notification-compact.notification-read {
    background: #f1f3f5;
    color: #737b85;
    border: 1px solid #e2e5e8;
}

#notificationPreviewList .notification-compact:focus-visible {
    outline: 2px solid #094369;
    outline-offset: 2px;
}

#notificationsList .notification-card[role="button"] {
    cursor: pointer;
}
/* =========================================================
   AUSGABE â€” HISTORIQUE DANS UNE CARTE BLANCHE
   ========================================================= */

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-orders-panel {
    background: #ffffff;
    border: 1px solid var(--grey-200, #e2e5e8);
    border-radius: var(--radius, 22px);
    box-shadow: var(--shadow, 0 8px 24px rgba(9, 67, 105, 0.12));
    padding: 20px;
}

/* En-tÃªte sans fond violet */
:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary {
    background: #ffffff;
    color: #094369;
}

/* FlÃ¨che du menu repliable */
:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-history summary::after {
    color: rgba(83, 113, 253, 0.8);
}

/* DÃ©filement Ã  l'intÃ©rieur de la carte */
:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-scroll {
    max-height: min(360px, 45vh);
    margin-top: 14px;
    padding-right: 8px;

    overflow-y: auto;
    overflow-x: auto;
    scrollbar-gutter: stable;
}

/* =========================================================
   SITE ENTIER â€” BARRES DE DÃ‰FILEMENT BLEUES
   ========================================================= */

html,
body,
body * {
    scrollbar-width: thin;
    scrollbar-color:
        rgba(83, 113, 253, 0.8)
        #edf0f4 !important;
}

/* Chrome, Edge et Safari compatibles */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #edf0f4 !important;
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(83, 113, 253, 0.8) !important;
    border: 2px solid #edf0f4 !important;
    border-radius: 999px !important;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(83, 113, 253, 0.9) !important;
}
/* BÃ¤ckerei : historique toujours ouvert, sans triangle */

:is(#bakeryOutputScreen, #eventOutputScreen), #eventOutputScreen) .bakery-completed-heading {
    padding: 12px 0;
    color: #094369;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

:is(#bakeryOutputScreen, #eventOutputScreen) .bakery-completed-scroll {
    height: 180px;
    max-height: 40vh;
    margin-top: 10px;
    padding-right: 8px;

    overflow-y: scroll;
    overflow-x: auto;
    scrollbar-gutter: stable;
}
/* Un seul avertissement pour les boissons gratuites */
#freeDrinksScreen .free-drinks-warning {
    color: #b91c1c;
    font-weight: 800;
    line-height: 1.5;
}
/* Champ PIN avec crayon gris Ã  droite */

#studentModal .student-pin-editor {
    position: relative;
    width: 100%;
}

#studentModal .student-pin-editor input {
    box-sizing: border-box;
    width: 100%;
    padding-right: 52px;
}

#studentModal .student-pin-pencil {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 10px;

    background: transparent;
    color: #737b85;
    font-size: 1.5rem;
    cursor: pointer;
}

#studentModal .student-pin-pencil:hover {
    background: #f1f3f5;
    color: #094369;
}

#studentModal .student-pin-pencil[hidden] {
    display: none;
}
/* Inventaire Ã©lÃ¨ve : lignes compactes, saisie toujours Ã  droite */

#studentInventoryScreen .inventory-count-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px;
    align-items: center;

    padding: 10px 12px;
    gap: 12px;
}

#studentInventoryScreen .inventory-product-info {
    min-width: 0;
    gap: 10px;
}

#studentInventoryScreen .inventory-product-info > div {
    min-width: 0;
}

#studentInventoryScreen .inventory-product-info strong {
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

#studentInventoryScreen .inventory-count-input {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;

    box-sizing: border-box;
    width: 90px;
    min-height: 44px;
    padding: 8px;
}

/* TrÃ¨s petites fenÃªtres : champ lÃ©gÃ¨rement moins large */
@media (max-width: 420px) {
    #studentInventoryScreen .inventory-count-row {
        grid-template-columns: minmax(0, 1fr) 72px;
        gap: 8px;
    }

    #studentInventoryScreen .inventory-count-input {
        width: 72px;
    }

    #studentInventoryScreen .inventory-product-icon {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }
}
/* Croix de suppression dans l'historique professeur */

#notificationsList .notification-removable {
    position: relative;
    padding-right: 54px;
}

#notificationsList .notification-remove-button {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    padding: 0;

    border: none;
    border-radius: 10px;
    background: transparent;
    color: #737b85;

    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

#notificationsList .notification-remove-button:hover {
    background: #fff0f0;
    color: #b91c1c;
}

#notificationsList .notification-remove-button:focus-visible {
    outline: 2px solid #094369;
    outline-offset: 2px;
}
/* Notifications : lignes compactes sans dÃ©filement horizontal */

#notificationsScreen #notificationsList {
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 6px;
}

#notificationsScreen #notificationsList .notification-card {
    position: relative;
    box-sizing: border-box;

    width: 100%;
    min-width: 0;
    max-width: 100%;

    padding: 9px 12px;
}

/* RÃ©serve la place de la croix professeur */
#notificationsScreen #notificationsList
.notification-card.notification-removable {
    padding-right: 52px;
}

#notificationsScreen #notificationsList .notification-card-main {
    min-width: 0;
    gap: 8px;
}

#notificationsScreen #notificationsList .notification-card-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
}

/* Titre, message et date tiennent dans la ligne */
#notificationsScreen #notificationsList
.notification-card-main > div:last-child {
    flex: 1 1 0;
    min-width: 0;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

#notificationsScreen #notificationsList .notification-card strong {
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Message normal, coupÃ© progressivement en fin de ligne */
#notificationsScreen #notificationsList .notification-card p {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;

    font-size: 0.8rem;
    font-weight: 400;

    -webkit-mask-image:
        linear-gradient(to right, #000 85%, transparent);
    mask-image:
        linear-gradient(to right, #000 85%, transparent);
}

#notificationsScreen #notificationsList .notification-card small {
    font-size: 0.72rem;
    white-space: nowrap;
}

/* Petite fenÃªtre : date sous le titre et le message */
@media (max-width: 700px) {
    #notificationsScreen #notificationsList
    .notification-card-main > div:last-child {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 3px 8px;
    }

    #notificationsScreen #notificationsList .notification-card small {
        grid-column: 1 / -1;
        text-align: left;
    }
}
/* =========================================================
   SON DERVERANSTALTUNG V7 â€” PRÃ‰SENTATION COMPLÃ‰MENTAIRE
   ========================================================= */

/* Angebot en haut Ã  droite */
:is(#eventWorkspaceScreen, #eventSaleScreen, #eventOutputScreen)
.screen-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

:is(#eventWorkspaceScreen, #eventSaleScreen, #eventOutputScreen)
.screen-header > .back-button {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

:is(#eventWorkspaceScreen, #eventSaleScreen, #eventOutputScreen)
.event-v6-offer {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    white-space: nowrap;
}

:is(#eventWorkspaceScreen, #eventSaleScreen, #eventOutputScreen)
.screen-header > h1,
#eventWorkspaceScreen .screen-title-stack {
    grid-column: 1 / -1;
    grid-row: 2;
}

#eventOutputScreen #eventOutputShiftEndButton {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

/* Produits disponibles : clairs */
#eventProductsScreen #eventGlobalChips button {
    background: #edf5fb;
    border-color: #cbdce9;
    color: #55738b;
}

/* Produits sÃ©lectionnÃ©s : bleu foncÃ© */
#eventProductsScreen #eventGlobalChips button.is-selected,
#eventProductsScreen #eventGlobalChips button.is-selected:disabled {
    background: #094369;
    border-color: #094369;
    color: white;
    opacity: 1;
}

#eventProductsScreen #eventSelectAllDrinksButton {
    margin: 12px 0 0;
}

/* Lignes compactes, Bearbeiten Ã  droite */
#eventProductsScreen .event-v7-product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

#eventProductsScreen .product-admin-main,
#eventProductsScreen .product-admin-main > div {
    min-width: 0;
}

#eventProductsScreen .product-admin-main strong {
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
}

#eventProductsScreen .product-admin-actions {
    display: flex;
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

#eventProductsScreen .product-admin-actions button {
    width: auto;
    white-space: nowrap;
}

#eventProductsScreen .event-v7-products-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Historique toujours ouvert */
#eventsScreen .event-list-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

#eventsScreen .event-v7-history {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--grey-200, #e2e5e8);
    border-radius: var(--radius, 22px);
    background: white;
    box-shadow: var(--shadow-small);
}

#eventsScreen #pastEventsList {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
}

#eventsScreen #pastEventsList .event-v6-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.85rem;
}

#eventsScreen #pastEventsList .event-v6-row strong {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Saisie des produits gratuits : lignes comme dans GetrÃ¤nke */
#eventV6Dialog #eventFreeProductList .quantity-product-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

#eventV6Dialog .free-drinks-warning {
    color: #b91c1c;
    font-weight: 800;
    line-height: 1.5;
}

#eventV6Dialog #eventFreeProductList strong {
    word-break: normal;
    overflow-wrap: normal;
}

@media (max-width: 520px) {
    #eventOutputScreen #eventOutputShiftEndButton {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    #eventOutputScreen .screen-header > h1 {
        grid-row: 3;
    }

    #eventsScreen #pastEventsList .event-v6-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}
/* =========================================================
   V8 â€” ANGEBOT ET INVENTUR DES PRODUITS SPÃ‰CIFIQUES
   ========================================================= */

#eventV6Dialog .event-offer-row-v8 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px;
    align-items: center;
    gap: 12px;

    padding: 10px 12px;
    margin-bottom: 8px;

    background: #f5f7ff;
    border-radius: 16px;
}

#eventV6Dialog .event-offer-row-v8 .inventory-product-info {
    min-width: 0;
    gap: 10px;
}

#eventV6Dialog .event-offer-row-v8 .inventory-product-info > div {
    min-width: 0;
}

#eventV6Dialog .event-offer-row-v8 strong,
#eventV6Dialog .event-offer-row-v8 small {
    display: block;
}

#eventV6Dialog .event-offer-row-v8 input {
    box-sizing: border-box;
    width: 90px;
    min-height: 44px;
    padding: 8px;

    border: 1px solid #f0a5cb;
    border-radius: 12px;
    background: #ffe3f0;
    color: #912558;

    text-align: center;
    font: inherit;
    font-weight: 700;
}

#eventV6Dialog .event-offer-row-v8 input:focus {
    outline: 2px solid #e570ad;
    outline-offset: 2px;
}

#eventV6Dialog .event-leftovers-note-v8 {
    color: #c42e3b;
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.4;
}

.event-v8-hidden {
    display: none !important;
}

#studentInventoryFiltersV8,
#teacherInventoryFiltersV8 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

#teacherEventStockV8 .event-stock-card-v8 {
    margin: 10px 0;
    padding: 12px;

    border-radius: 16px;
    background: white;
    box-shadow: 0 4px 18px rgb(30 50 100 / 8%);
}

.event-stock-review-v8 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
}

.event-stock-review-v8 > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.event-stock-review-v8 input {
    width: 80px;
    margin-left: 6px;
}

#studentInventoryList [hidden],
#teacherInventoryList [hidden],
#teacherEventStockV8[hidden],
#productsScreen .filter-tabs [hidden],
#studentInventoryFiltersV8 [hidden],
#teacherInventoryFiltersV8 [hidden] {
    display: none !important;
}

@media (max-width: 420px) {
    #eventV6Dialog .event-offer-row-v8 {
        grid-template-columns: minmax(0, 1fr) 72px;
        gap: 8px;
    }

    #eventV6Dialog .event-offer-row-v8 input {
        width: 72px;
    }
}
/* Inventur : mÃªme design des filtres que dans Produkte */

#studentInventoryFiltersV8,
#teacherInventoryFiltersV8 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 10px;
    margin: 16px 0 20px;
}

#studentInventoryFiltersV8 button,
#teacherInventoryFiltersV8 button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 16px;

    border: 1.5px solid #094369;
    border-radius: 999px;
    background: #ffffff;
    color: #094369;

    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

#studentInventoryFiltersV8 button.active,
#teacherInventoryFiltersV8 button.active {
    border-color: #094369;
    background: #094369;
    color: #ffffff;
}

@media (hover: hover) {
    #studentInventoryFiltersV8 button:not(.active):hover,
    #teacherInventoryFiltersV8 button:not(.active):hover {
        background: #edf6fc;
    }
}

#studentInventoryFiltersV8 button:focus-visible,
#teacherInventoryFiltersV8 button:focus-visible {
    outline: 3px solid #bab0f4;
    outline-offset: 3px;
}

#studentInventoryFiltersV8 button[hidden],
#teacherInventoryFiltersV8 button[hidden] {
    display: none !important;
}
/* Produits spÃ©cifiques : lignes compactes dans Inventur */

#teacherEventStockV8 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#teacherEventStockV8 .event-stock-card-v8 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 16px;

    margin: 0;
    padding: 10px 12px;

    border: 1px solid var(--grey-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-small);
}

#teacherEventStockV8 .inventory-product-info {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    gap: 10px;
}

#teacherEventStockV8 .inventory-product-info > div {
    min-width: 0;
}

#teacherEventStockV8 .inventory-product-info strong {
    font-size: 1rem;
    line-height: 1.2;
}

#teacherEventStockV8 .inventory-product-info small {
    font-size: 0.8rem;
    line-height: 1.3;
}

#teacherEventStockV8 .event-stock-review-v8 {
    grid-column: 1 / -1;
    margin: 0;
    gap: 8px;
    font-size: 0.85rem;
}

/* Champ de saisie et bouton sur la ligne du produit */

#teacherEventStockV8 .event-stock-review-v8:last-child {
    grid-column: 2;
    grid-row: 1;

    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

#teacherEventStockV8 .event-stock-review-v8:last-child label {
    display: flex;
    align-items: center;
    gap: 8px;
}

#teacherEventStockV8 .inventory-count-input {
    box-sizing: border-box;
    width: 72px;
    min-height: 40px;
    margin: 0;
    padding: 6px;
    font-size: 1rem;
}

#teacherEventStockV8 .event-stock-review-v8 button {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Petite fenÃªtre : les actions restent Ã  droite */

@media (max-width: 760px) {
    #teacherEventStockV8 .event-stock-review-v8:last-child {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    #teacherEventStockV8 .event-stock-review-v8:last-child label {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        font-size: 0.75rem;
    }
}
/* Produits spÃ©cifiques : mÃªme disposition que le stock habituel */

#teacherEventStockV8 .event-stock-card-v8 {
    grid-template-columns:
        minmax(0, 1fr)
        minmax(240px, 340px);

    align-items: center;
    padding: 10px 14px;
    gap: 12px;
}

#teacherEventStockV8 .event-stock-entry-v9 {
    grid-column: 2;
    grid-row: 1;

    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        auto;

    align-items: center;
    width: 100%;
    min-width: 0;
    margin: 0;
    gap: 8px;
}

#teacherEventStockV8 .event-stock-entry-v9 input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 0;
}

#teacherEventStockV8 .event-stock-entry-v9 button {
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 600px) {
    #teacherEventStockV8 .event-stock-card-v8 {
        grid-template-columns: minmax(0, 1fr) 210px;
        padding: 10px;
        gap: 8px;
    }

    #teacherEventStockV8 .event-stock-entry-v9 {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr)
            auto;

        gap: 5px;
    }

    #teacherEventStockV8 .event-stock-entry-v9 input {
        padding: 6px;
    }

    #teacherEventStockV8 .event-stock-entry-v9 button {
        padding: 8px;
        font-size: 0.8rem;
    }
}
/* Message dâ€™erreur de connexion */

#pinLoginError {
    color: #b42318 !important;
}
/* Petit champ : nombre dâ€™unitÃ©s par IAN */

#productModal .product-ian-fields {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-width: 0;
}

#productModal #productIanInput {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
}

#productModal .product-ian-units {
    display: flex;
    flex-direction: column;
    flex: 0 0 72px;
    gap: 4px;
    margin: 0;
}

#productModal .product-ian-units span {
    font-size: 0.75rem;
}

#productModal #productIanUnitsInput {
    box-sizing: border-box;
    width: 72px;
    text-align: center;
}
/* Prix du lot et petit champ du prix unitaire */

#productModal .product-purchase-fields {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-width: 0;
}

#productModal #productPurchasePriceInput {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
}

#productModal .product-unit-cost {
    display: flex;
    flex-direction: column;
    flex: 0 0 88px;
    gap: 4px;
    margin: 0;
}

#productModal .product-unit-cost span {
    font-size: 0.75rem;
    white-space: nowrap;
}

#productModal #productUnitCostInput {
    box-sizing: border-box;
    width: 88px;
    text-align: center;
    background: var(--blue-light);
    color: var(--blue-dark);
}
/* =========================================================
   BERICHTE V1
   ========================================================= */

#reportsScreen .r1-content {
    max-width: 1280px;
    margin: auto;
    padding: 18px;
    display: grid;
    gap: 18px;
}

#reportsScreen .r1-toolbar,
#reportsScreen .r1-heading,
#reportsScreen .r1-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

#reportsScreen .r1-actions {
    justify-content: flex-end;
}

#reportsScreen .r1-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#reportsScreen .r1-tabs button {
    flex: 0 0 auto;
    padding: 9px 16px;
    min-height: 40px;

    border: 1.5px solid #094369;
    border-radius: 999px;
    background: white;
    color: #094369;

    font: inherit;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

#reportsScreen .r1-tabs button.active {
    background: #094369;
    color: white;
}

#reportsScreen .r1-tabs button:focus-visible,
#reportsScreen select:focus-visible {
    outline: 3px solid #5371fd;
    outline-offset: 3px;
}

#reportsScreen .r1-periods {
    margin-bottom: 10px;
}

#reportsScreen h2 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    color: #094369;
}

#reportsScreen h3 {
    margin: 0 0 8px;
    color: #094369;
    font-size: 1rem;
}

#reportsScreen .r1-card {
    background: white;
    border: 1px solid #e5eaf0;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgb(9 67 105 / 8%);
    padding: 18px;
    min-width: 0;
}

#reportsScreen .r1-result-top {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: 18px;
    margin: 16px 0;
}

#reportsScreen .r1-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

#reportsScreen .r1-kpi {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 16px;
    border-radius: 18px;
    background: #edf4ff;
    color: #094369;
}

#reportsScreen .r1-kpi strong {
    font-size: 1.65rem;
}

#reportsScreen .r1-kpi small {
    font-size: 0.8rem;
}

#reportsScreen .r1-green {
    background: #e5f6e9;
    color: #246e42;
}

#reportsScreen .r1-muted {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.5;
}

#reportsScreen #r1Results > .r1-card,
#reportsScreen #r1Stock > .r1-card {
    margin-top: 18px;
}

#reportsScreen .r1-winner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #edf1f6;
}

#reportsScreen .r1-winner strong,
#reportsScreen .r1-winner small {
    display: block;
}

#reportsScreen .r1-winner small {
    color: #64748b;
    margin-top: 4px;
}

#reportsScreen .r1-medal {
    font-size: 1.6rem;
}

#reportsScreen .r1-product-icon {
    display: grid;
    place-items: center;
    background: #edf4ff;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    font-size: 1.4rem;
}

#reportsScreen svg {
    display: block;
    width: 100%;
    height: auto;
    font-family: inherit;
    color: #094369;
}

#reportsScreen .r1-scroll {
    overflow: auto;
    max-height: 380px;
    scrollbar-color: rgba(83, 113, 253, 0.8) #edf1f6;
    scrollbar-width: thin;
}

#reportsScreen .r1-scroll::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

#reportsScreen .r1-scroll::-webkit-scrollbar-thumb {
    background: rgba(83, 113, 253, 0.8);
    border-radius: 999px;
}

#reportsScreen .r1-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9rem;
}

#reportsScreen .r1-table th,
#reportsScreen .r1-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf1f6;
    text-align: right;
    white-space: nowrap;
}

#reportsScreen .r1-table th:first-child,
#reportsScreen .r1-table td:first-child {
    text-align: left;
}

#reportsScreen .r1-table th {
    position: sticky;
    top: 0;
    background: #edf4ff;
    color: #094369;
}

#reportsScreen .r1-gauges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin: 16px 0;
}

#reportsScreen .r1-gauge {
    text-align: center;
}

#reportsScreen .r1-gauge svg {
    max-width: 180px;
    margin: auto;
}

#reportsScreen .r1-stock-state {
    font-weight: 700;
    margin: 8px 0;
}

#reportsScreen .r1-gauge summary {
    font-size: 0.8rem;
    cursor: pointer;
    color: #5371fd;
}

#reportsScreen .r1-gauge form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    text-align: left;
}

#reportsScreen .r1-gauge label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.8rem;
}

#reportsScreen .r1-gauge input {
    width: 75px;
    padding: 6px;
}

#reportsScreen select {
    width: auto;
    max-width: 100%;
    background: white;
    color: #094369;
    border: 1px solid #cad7e4;
    border-radius: 12px;
    padding: 8px 10px;
    font: inherit;
    font-size: 0.85rem;
}

#reportsScreen .r1-picker {
    position: relative;
}

#reportsScreen .r1-picker summary {
    cursor: pointer;
    padding: 9px 12px;
    background: #edf4ff;
    border-radius: 12px;
    color: #094369;
}

#reportsScreen #r1StockChoices {
    position: absolute;
    right: 0;
    z-index: 5;
    width: 260px;
    max-width: 75vw;
    max-height: 300px;
    overflow: auto;
    background: white;
    padding: 12px;
    border: 1px solid #dce5ef;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgb(9 67 105 / 12%);
    scrollbar-color: rgba(83, 113, 253, 0.8) #edf1f6;
}

#reportsScreen #r1StockChoices label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    font-size: 0.9rem;
}

#reportsScreen #r1StockChoices input {
    width: 16px;
    height: 16px;
    accent-color: #5371fd;
}

#reportsScreen .r1-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
    margin-top: 10px;
}

#reportsScreen .r1-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#reportsScreen .r1-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

#reportsScreen [hidden] {
    display: none !important;
}

@media (max-width: 800px) {
    #reportsScreen .r1-result-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #reportsScreen .r1-content {
        padding: 10px;
    }

    #reportsScreen .r1-card {
        padding: 12px;
    }

    #reportsScreen .r1-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #reportsScreen .r1-kpi {
        padding: 10px;
    }

    #reportsScreen .r1-kpi strong {
        font-size: 1.3rem;
    }
}
/* =========================================================
   BERICHTE V2 â€” ONGLETS ET COMPARAISONS
   ========================================================= */

/* Onglets avec apparence Chrome / Excel */

#reportsScreen .r1-toolbar {
    border-bottom: 2px solid #cad7e4;
    align-items: flex-end;
    padding-bottom: 0;
}

#reportsScreen nav.r1-tabs {
    gap: 5px;
    align-items: flex-end;
}

#reportsScreen nav.r1-tabs button {
    border: 1.5px solid #cad7e4;
    border-bottom: 2px solid #cad7e4;
    border-radius: 15px 15px 0 0;

    background: #e8eef6;
    color: #094369;

    min-height: 46px;
    padding: 12px 24px;
    margin-bottom: -2px;
}

#reportsScreen nav.r1-tabs button.active {
    background: white;
    color: #094369;
    border-color: #094369;
    border-bottom-color: white;

    position: relative;
    z-index: 1;

    box-shadow: 0 -3px 10px rgb(9 67 105 / 5%);
}

#reportsScreen .r1-toolbar > .r1-actions {
    padding-bottom: 8px;
}

/* Texte des graphiques */

#reportsScreen svg text {
    fill: #094369;
}

#reportsScreen svg .r2-bar-value {
    fill: white;
}

/* Comparaisons en dehors des bulles */

#reportsScreen .r2-kpi-wrap {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

#reportsScreen .r2-kpi-wrap .r1-kpi {
    flex: 1;
}

#reportsScreen .r2-comparison {
    margin: 0;
    padding: 0 8px;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.4;
}

#reportsScreen .r2-comparison strong {
    font-weight: 800;
}

/* Boissons gratuites : tons orange */

#reportsScreen .r1-kpi.r2-orange {
    background: #fff0e6;
    border: 1px solid #ffd0b1;
    border-left: 4px solid #ff914d;
    color: #094369;
}

#reportsScreen .r1-kpi.r2-orange > strong {
    color: #c9570f;
}

#reportsScreen .r2-purchase-key {
    color: #094369;
    font-weight: 700;
}
/* En-tÃªtes de tableaux avec triangles de tri */

#reportsScreen .r3-sort-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;

    margin: 0;
    padding: 0;
    min-height: 0;

    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;

    color: inherit;
    font: inherit;
    font-weight: inherit;
    white-space: nowrap;
    cursor: pointer;
}

#reportsScreen .r3-sort-triangle {
    font-size: 0.8em;
    font-weight: 400;
    opacity: 0.45;
}

#reportsScreen .r3-sort-active .r3-sort-triangle {
    color: #094369;
    font-weight: 900;
    opacity: 1;
}

#reportsScreen .r3-sort-button:focus-visible {
    outline: 2px solid #5371fd;
    outline-offset: 4px;
}
/* RÃ©fÃ©rences multiples dâ€™un produit */

#productModal .product-refs-panel {
    grid-column: 1 / -1;
    min-width: 0;
}

#productModal .product-refs-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    color: #094369;
}

#productModal #addProductPurchaseRef {
    min-width: 40px;
    min-height: 40px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 1.5rem;
}

#productModal .product-purchase-ref {
    display: grid;
    grid-template-columns:
        minmax(100px, 1fr)
        minmax(150px, 2fr)
        minmax(100px, 1fr)
        32px;

    align-items: end;
    gap: 8px;
    margin-bottom: 10px;
}

#productModal .product-purchase-ref label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    margin: 0;
}

#productModal .product-purchase-ref label span {
    color: #094369;
    font-size: 0.78rem;
}

#productModal .product-purchase-ref input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

#productModal .product-ref-remove {
    width: 32px;
    min-height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #b42318;
    font-size: 1.4rem;
    cursor: pointer;
}

#productModal .product-refs-panel > small {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.4;
}

#productModal .product-ref-units label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (max-width: 650px) {
    #productModal .product-purchase-ref {
        grid-template-columns: minmax(0, 1fr) 32px;
        padding: 10px;
        border-radius: 14px;
        background: #f3f7fc;
    }

    #productModal .product-purchase-ref label {
        grid-column: 1;
    }

    #productModal .product-ref-remove {
        grid-column: 2;
        grid-row: 1;
    }
}
/* RÃ©fÃ©rences : une seule ligne, champs compacts */

#productModal .product-refs-panel {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

#productModal .product-refs-heading {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 10px 0;
}

#productModal #productPurchaseRefs {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 8px;

    scrollbar-color: rgba(83, 113, 253, 0.8) #edf1f6;
    scrollbar-width: thin;
}

#productModal #productPurchaseRefs::-webkit-scrollbar {
    height: 8px;
}

#productModal #productPurchaseRefs::-webkit-scrollbar-thumb {
    background: rgba(83, 113, 253, 0.8);
    border-radius: 999px;
}

#productModal .product-purchase-ref {
    display: grid;

    grid-template-columns:
        90px
        minmax(150px, 1fr)
        140px
        90px
        120px
        95px
        130px
        28px;

    align-items: end;
    gap: 8px;

    min-width: 960px;
    margin: 0 0 10px;
    padding: 0;

    background: transparent;
    border-radius: 0;
}

#productModal .product-purchase-ref label {
    grid-column: auto;
    grid-row: auto;

    display: flex;
    flex-direction: column;
    gap: 5px;

    min-width: 0;
    margin: 0;
}

#productModal .product-purchase-ref label span {
    color: #094369;
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
}

#productModal .product-purchase-ref input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px;
    font-size: 0.9rem;
}

#productModal .product-purchase-ref [data-ref-units],
#productModal .product-purchase-ref [data-ref-unit-cost] {
    text-align: center;
}

#productModal .product-purchase-ref [data-ref-unit-cost] {
    background: var(--blue-light);
    color: var(--blue-dark);
    font-weight: 800;
}

#productModal .product-purchase-ref .product-ref-remove {
    grid-column: auto;
    grid-row: auto;

    align-self: end;
    width: 28px;
    min-height: 40px;
    padding: 0;

    border: 0;
    background: transparent;
    color: #b42318;
    font-size: 1.4rem;
}
/* RÃ©fÃ©rences : ligne compacte, magasin en premier */

#productModal .product-purchase-ref {
    grid-template-columns:
        72px
        76px
        minmax(110px, 1fr)
        64px
        90px
        80px
        110px
        24px;

    min-width: 680px;
    align-items: end;
    gap: 6px;
    margin-bottom: 10px;
    padding: 0;
}

/* Ordre visuel : GeschÃ¤ft, IAN, nom, quantitÃ©, prix, EK, EAN */

#productModal .product-purchase-ref > label {
    grid-row: 1;
    position: relative;
    min-width: 0;
    gap: 4px;
}

#productModal .product-purchase-ref > label:nth-of-type(1) {
    grid-column: 1;
}

#productModal .product-purchase-ref > label:nth-of-type(3) {
    grid-column: 2;
}

#productModal .product-purchase-ref > label:nth-of-type(2) {
    grid-column: 3;
}

#productModal .product-purchase-ref > label:nth-of-type(4) {
    grid-column: 4;
}

#productModal .product-purchase-ref > label:nth-of-type(5) {
    grid-column: 5;
}

#productModal .product-purchase-ref > label:nth-of-type(6) {
    grid-column: 6;
}

#productModal .product-purchase-ref > label:nth-of-type(7) {
    grid-column: 7;
}

#productModal .product-purchase-ref > label > span {
    display: flex;
    align-items: flex-end;

    min-height: 2.4em;
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: normal;
}

#productModal .product-purchase-ref input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 38px;
    min-height: 38px;
    padding: 6px;
    font-size: 0.85rem;
}

#productModal .product-purchase-ref .product-ref-remove {
    grid-column: 8;
    grid-row: 1;
    align-self: end;

    width: 24px;
    min-height: 38px;
    padding: 0;
}

/* Estomper uniquement les champs magasin et nom */

#productModal .product-purchase-ref > label:nth-of-type(1)::after,
#productModal .product-purchase-ref > label:nth-of-type(2)::after {
    content: "";
    position: absolute;

    right: 2px;
    bottom: 2px;
    width: 18px;
    height: 34px;

    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0),
        #ffffff
    );

    border-radius: 0 7px 7px 0;
    pointer-events: none;
}

/* Pendant la saisie, laisser le texte et le curseur visibles */

#productModal .product-purchase-ref > label:focus-within::after {
    opacity: 0;
}
/* Einkaufsliste */

#shoppingListScreen .shopping-content {
    max-width: 1200px;
    margin: auto;
}

#shoppingListScreen .shopping-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

#shoppingListScreen .shopping-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #094369;
}

#shoppingListScreen .shopping-toolbar input {
    width: 65px;
    padding: 8px;
    text-align: center;
}

#shoppingListScreen .shopping-note {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #64748b;
}

#shoppingListScreen .shopping-scroll {
    max-height: 65vh;
    overflow: auto;
    border-radius: 18px;
    background: white;
    box-shadow: 0 5px 20px rgb(9 67 105 / 8%);
    scrollbar-color: rgba(83, 113, 253, 0.8) #edf1f6;
}

#shoppingListScreen .shopping-table {
    width: 100%;
    border-collapse: collapse;
    color: #094369;
}

#shoppingListScreen th,
#shoppingListScreen td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid #edf1f6;
}

#shoppingListScreen th {
    position: sticky;
    top: 0;
    background: #edf4ff;
    white-space: nowrap;
}

#shoppingListScreen th:nth-child(2),
#shoppingListScreen td:nth-child(2) {
    text-align: left;
}

#shoppingListScreen td small {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: #64748b;
}

#shoppingListScreen [data-shopping-packs] {
    width: 76px;
    min-height: 40px;
    padding: 6px;
    background: #edf4ff;
    color: #094369;
    border: 1px solid #cad7e4;
    border-radius: 10px;
    text-align: center;
}

#shoppingListScreen [data-shopping-check] {
    width: 20px;
    height: 20px;
    accent-color: #05a85a;
}

#shoppingListScreen .shopping-checked {
    background: #edf8f0;
}

#shoppingListScreen .shopping-checked td:nth-child(2) strong {
    text-decoration: line-through;
    opacity: 0.65;
}

#shoppingTotal {
    color: #094369;
    font-weight: 800;
}
/* Rechnungen : boutons scan et import */

#invoicesScreen > .screen-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

#invoicesScreen .invoice-scan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

#invoicesScreen .invoice-scan-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 10px 14px;

    border: 0;
    border-radius: 13px;
    background: #5371fd;
    color: white;

    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

#invoicesScreen .invoice-scan-actions button:disabled {
    opacity: 0.55;
    cursor: wait;
}

#invoicesScreen .invoice-scan-actions svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* FenÃªtre de vÃ©rification */

.invoice-ocr-dialog {
    box-sizing: border-box;
    width: min(980px, calc(100vw - 24px));
    max-height: 90vh;
    padding: 20px;

    border: 0;
    border-radius: 20px;
    background: white;
    color: #094369;

    overflow: auto;
    scrollbar-color: rgba(83, 113, 253, 0.8) #edf1f6;
}

.invoice-ocr-dialog::backdrop {
    background: rgb(9 35 60 / 45%);
}

.invoice-ocr-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.invoice-ocr-heading h2 {
    margin: 0;
    font-size: 1.3rem;
}

.invoice-ocr-heading button {
    background: transparent;
    border: 0;
    color: #64748b;
    font-size: 1.8rem;
    cursor: pointer;
}

.invoice-ocr-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(240px, 1fr);

    gap: 20px;
    margin-top: 16px;
}

.invoice-ocr-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.invoice-ocr-fields label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 700;
}

.invoice-ocr-fields input {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 10px;

    border: 1px solid #cad7e4;
    border-radius: 12px;
    background: #f5f8ff;
    color: #094369;
    font: inherit;
}

#invoiceOcrImage {
    display: block;
    max-width: 100%;
    max-height: 400px;
    margin: auto;
    object-fit: contain;
}

#invoiceOcrText {
    box-sizing: border-box;
    width: 100%;
    min-height: 200px;
    margin-top: 8px;
    padding: 10px;
    font-size: 0.85rem;
}

.invoice-ocr-dialog summary {
    cursor: pointer;
    margin-top: 12px;
}

#invoiceOcrProgress {
    width: 100%;
    accent-color: #5371fd;
}

#invoiceOcrWarning {
    color: #b42318;
    font-size: 0.85rem;
    line-height: 1.4;
}

@media (max-width: 650px) {
    .invoice-ocr-layout {
        grid-template-columns: 1fr;
    }

    #invoiceOcrImage {
        max-height: 230px;
    }

    #invoicesScreen .invoice-scan-actions {
        width: 100%;
    }
}
/* FenÃªtre camÃ©ra pour les factures */

.invoice-camera-dialog {
    box-sizing: border-box;
    width: min(760px, calc(100vw - 24px));
    max-height: 92vh;
    overflow: auto;
    padding: 20px;

    border: 0;
    border-radius: 20px;
    background: white;
    color: #094369;

    scrollbar-color: rgba(83, 113, 253, 0.8) #edf1f6;
}

.invoice-camera-dialog::backdrop {
    background: rgb(9 35 60 / 55%);
}

.invoice-camera-preview {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #102332;
}

.invoice-camera-preview video {
    display: block;
    width: 100%;
    min-height: 200px;
    max-height: 55vh;
    object-fit: contain;
}

.invoice-camera-frame {
    position: absolute;
    inset: 12px;

    border: 2px solid rgb(255 255 255 / 75%);
    border-radius: 12px;

    pointer-events: none;
}

.invoice-camera-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.invoice-camera-actions .primary-action {
    background: #5371fd;
    color: white;
}

.invoice-camera-actions button {
    min-height: 42px;
    border-radius: 12px;
}
/* Einkaufsliste : lignes compactes */

#shoppingListScreen .shopping-table th,
#shoppingListScreen .shopping-table td {
    padding: 8px 10px;
    vertical-align: middle;
}

#shoppingListScreen .shopping-table td > strong {
    display: block;
    margin: 0;
    line-height: 1.2;
}

#shoppingListScreen .shopping-product-reference {
    display: block;
    margin: 3px 0 0;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
}

#shoppingListScreen input[data-shopping-packs] {
    box-sizing: border-box;
    width: 64px;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 6px 8px;
    border-radius: 10px;
    text-align: center;
}

#shoppingListScreen input[data-shopping-check] {
    width: 18px;
    height: 18px;
    margin: 0;
    vertical-align: middle;
}
/* =========================================================
   BUCHHALTUNG â€” GEKAUFTE PRODUKTE
   ========================================================= */

.invoice-items-section {
    margin-top: 18px;
    min-width: 0;
}

.invoice-items-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.invoice-items-heading .secondary-action {
    padding: 8px 12px;
}

.invoice-items-scroll {
    width: 100%;
    overflow-x: auto;
}

.invoice-items-list {
    display: grid;
    gap: 8px;
}

.invoice-item-row {
    display: grid;
    grid-template-columns:
        90px
        minmax(135px, 2fr)
        72px
        92px
        100px
        90px
        36px;
    align-items: end;
    gap: 7px;
    min-width: 0;
}

.invoice-item-row label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.invoice-item-row label span {
    font-size: 11px;
    font-weight: 600;
}

.invoice-item-row input,
.invoice-item-row select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 6px 7px;
    font-size: 13px;
}

.invoice-item-row input[readonly] {
    background: rgba(127, 127, 127, 0.08);
}

.invoice-item-remove {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #d8a0a0;
    border-radius: 8px;
    background: transparent;
    color: #a33232;
    font-size: 20px;
    cursor: pointer;
}

.invoice-items-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 18px;
    margin-top: 14px;
    font-size: 13px;
}

.invoice-items-check {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 600;
}

.invoice-items-check[data-valid="true"] {
    color: #18733c;
}

.invoice-items-check[data-valid="false"] {
    color: #ad3939;
}

@media (max-width: 700px) {
    .invoice-item-row {
        grid-template-columns:
            76px
            minmax(120px, 1fr)
            62px
            82px
            80px
            80px
            32px;
        gap: 5px;
        min-width: 620px;
    }

    .invoice-item-row input,
    .invoice-item-row select {
        font-size: 12px;
        padding: 5px;
    }

    .invoice-item-remove {
        width: 32px;
        height: 36px;
    }
}
/* Deux emojis : centrÃ©s dans le carrÃ© existant */
.product-admin-main > span.product-icon-double,
.inventory-product-icon.product-icon-double,
.sale-product-icon.product-icon-double {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex-direction: row !important;
    flex-wrap: nowrap !important;

    font-size: 15px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;

    text-align: center;
    overflow: hidden;
}
/* ================================================
   BEZAHLEN â€” PAIEMENT EXACT
   ================================================ */


/* =====================================================
   PASSEND BEZAHLT — GETRÄNKE, BÄCKEREI, EVENTS
   ===================================================== */

:is(
    #drinksPaymentScreen,
    #bakeryPaymentScreen,
    #eventPaymentScreen
) .exact-payment-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 58px;
    max-width: none;

    box-sizing: border-box;
    margin: 12px 0 0;
    padding: 12px 18px;

    border: 0;
    border-radius: 30px;

    background: #5974FD;
    color: #ffffff;

    font: inherit;
    font-size: 1.2rem;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;

    cursor: pointer;
    touch-action: manipulation;
}

:is(
    #drinksPaymentScreen,
    #bakeryPaymentScreen,
    #eventPaymentScreen
) .exact-payment-button:active {
    transform: scale(0.98);
    background: #435DE0;
}

:is(
    #drinksPaymentScreen,
    #bakeryPaymentScreen,
    #eventPaymentScreen
) .exact-payment-button:focus-visible {
    outline: 3px solid #12496c;
    outline-offset: 3px;
}

:is(
    #drinksPaymentScreen,
    #bakeryPaymentScreen,
    #eventPaymentScreen
) .exact-payment-button:disabled {
    opacity: 0.45;
    cursor: wait;
}

/* PROFESSEUR â€” COMMUTATEUR TEST / RÃ‰EL */
.teacher-test-toggle {
    display: block;
    width: fit-content;
    margin: 0 0 14px auto;
    padding: 11px 17px;
    border: 2px solid #e5bd39;
    border-radius: 14px;
    background: #fff0ae;
    color: #665000;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}
.teacher-test-toggle:hover { background: #ffe68c; }
.teacher-test-toggle[aria-pressed="true"] { background: #efd575; }
body.teacher-test-mode :is(
    #drinksSaleScreen,#drinksPaymentScreen,#drinksSuccessScreen,#freeDrinksScreen,
    #bakerySaleScreen,#bakeryPaymentScreen,#bakerySuccessScreen,#bakeryOutputScreen,
    #eventSaleScreen,#eventPaymentScreen,#eventSuccessScreen,#eventOutputScreen
)::before { content: none !important; display: none !important; }

/* ==========================================
   ZAHLUNG ERFOLGREICH — RÜCKGELD VISIBLE
   ========================================== */

:is(
    #drinksSuccessScreen,
    #bakerySuccessScreen,
    #eventSuccessScreen
) .success-content .success-change,
:is(
    #drinksSuccessScreen,
    #bakerySuccessScreen,
    #eventSuccessScreen
) .success-content .change-amount {
    display: block;
    box-sizing: border-box;

    width: 100%;
    max-width: 650px;

    margin: 20px auto 26px;
    padding: 22px 24px;

    border-radius: 36px;
    background: #dcd3fa;
    color: #10476b;

    font-size: clamp(1.5rem, 4.5vw, 2.2rem);
    font-weight: 850;
    line-height: 1.25;
    text-align: center;
}

/* Rückgeld : plus discret sur l'écran de succès */

:is(
    #drinksSuccessScreen,
    #bakerySuccessScreen,
    #eventSuccessScreen
) .success-content :is(.success-change, .change-amount) {
    max-width: 560px;
    margin: 12px auto 22px;
    padding: 16px 22px;

    border-radius: 26px;

    font-size: clamp(1.15rem, 2.5vw, 1.65rem);
    font-weight: 750;
    line-height: 1.3;
}
/* Rückgeld : bulle ajustée au texte */

:is(
    #drinksSuccessScreen,
    #bakerySuccessScreen,
    #eventSuccessScreen
) .success-content :is(.success-change, .change-amount) {
    width: fit-content;
    max-width: 100%;
    min-width: 0;

    padding: 14px 26px;
    margin: 12px auto 22px;

    border-radius: 24px;
    white-space: nowrap;
}
/* Sonderveranstaltung :
   masquer les bulles TEST sur Kasse et Ausgabe */

#eventDetailScreen .test-badge,
#eventDetailScreen .test-badge:hover {
    display: none !important;
}

/* ==========================================
   LOGO LAUTER MACHER — GRAND FORMAT
   ========================================== */

#appHeader #homeLogoButton {
    height: 100% !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    overflow: visible;
}

#appHeader #homeLogoButton img.app-header-logo {
    display: block;

    height: 100% !important;
    max-height: none !important;

    width: auto !important;
    max-width: none !important;

    object-fit: contain;
    object-position: left center;
}

/* ==========================================
   LOGO LAUTER MACHER — AGRANDISSEMENT VISUEL
   ========================================== */

#appHeader #homeLogoButton {
    overflow: visible !important;
    flex-shrink: 0;
}

#appHeader #homeLogoButton img.app-header-logo {
    height: 100% !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;

    transform: scale(1.8) !important;
    transform-origin: left center !important;
}

/* Sur les petits écrans, agrandissement plus modéré */
@media (max-width: 760px) {
    #appHeader #homeLogoButton img.app-header-logo {
        transform: scale(1.3) !important;
    }
}

/* ==========================================
   SONDERVERANSTALTUNG — STYLE CAISSE ROUGE
   ========================================== */

:root {
    --event-payment-red: #ff5757;
}

/* Calculatrice : même disposition que les autres caisses */

#eventPaymentScreen .payment-container {
    width: min(600px, calc(100% - 24px));
    margin-inline: auto;
}

#eventPaymentScreen .payment-keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(560px, 100%);
    gap: 12px;
    margin: 12px auto;
}

#eventPaymentScreen .payment-key {
    width: 100%;
    height: 110px;
    min-height: 0;
    padding: 0;

    border: 3px solid #b9acf0;
    border-radius: 24px;

    background: #fff;
    color: #8172cf;

    font-size: 2.4rem;
    font-weight: 800;
}

#eventPaymentScreen .payment-key:hover {
    background: #f1edff;
    border-color: #8172cf;
}

/* Bouton Bezahlen du panier */

#eventPayButton {
    background: var(--event-payment-red) !important;
    border-color: var(--event-payment-red) !important;
    color: #fff !important;
}

/* Bouton Bezahlt de la calculatrice */

#eventPaymentScreen #eventPaidButton {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 72px;
    margin: 12px 0 0;
    padding: 14px 20px;

    border: 0;
    border-radius: 36px;

    background: var(--event-payment-red) !important;
    color: #fff !important;

    font-size: 1.35rem;
    font-weight: 850;
}

/* Conserver le gris lorsqu'un paiement est impossible */

#eventPaymentScreen #eventPaidButton:disabled,
#eventPayButton:disabled {
    background: #85a0b4 !important;
    border-color: #85a0b4 !important;
    cursor: not-allowed;
    opacity: 1;
}

/* Le bouton Passend bezahlt reste bleu */

#eventPaymentScreen .exact-payment-button {
    background: #5974fd !important;
    border-radius: 36px;
}

/* Adaptation aux téléphones */


/* ==========================================
   SONDERVERANSTALTUNG
   Calculatrice identique à Getränke / Bäckerei
   ========================================== */

#eventPaymentScreen .payment-container {
    width: min(360px, 100%);
    margin: 0 auto;
}

#eventPaymentScreen .payment-keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(280px, 100%);
    margin: 4px auto;
    gap: 8px;
}

#eventPaymentScreen .payment-key {
    box-sizing: border-box;
    width: 100%;
    height: 70px;
    min-height: 0;
    padding: 0;

    border: 2px solid #b9acf0;
    border-radius: 12px;

    background: #fff;
    color: #8172cf;

    font-size: 1.7rem;
    font-weight: 850;
    box-shadow: none;
}

#eventPaymentScreen .payment-key:hover {
    border-color: #8172cf;
    background: #f1edff;
}

#eventPaymentScreen .payment-key:active {
    background: #ddd6fa;
}


    #eventPaymentScreen #eventPaidButton {
        min-height: 60px;
        font-size: 1.2rem;
    }
}

/* ==========================================
   TESTUMGEBUNG — BOUTON JAUNE ARRONDI
   ========================================== */

.teacher-test-toggle {
    display: block;
    width: fit-content;
    max-width: 100%;

    margin: 0 0 14px auto;
    padding: 12px 24px;

    border: 0;
    border-radius: 999px;

    background: #fdbe3f;
    color: #094369;

    font: inherit;
    font-weight: 850;

    cursor: pointer;
}

.teacher-test-toggle:hover {
    background: #f4b52d;
}

.teacher-test-toggle[aria-pressed="true"] {
    background: #fdbe3f;
    color: #094369;
}

.teacher-test-toggle:focus-visible {
    outline: 3px solid #094369;
    outline-offset: 3px;
}

/* ==========================================
   TESTUMGEBUNG — MÊME DISPOSITION
   Aucun padding ou bordure supplémentaire
   ========================================== */

body.teacher-test-mode :is(
    #drinksSaleScreen,
    #drinksPaymentScreen,
    #drinksSuccessScreen,
    #freeDrinksScreen,
    #bakerySaleScreen,
    #bakeryPaymentScreen,
    #bakerySuccessScreen,
    #bakeryOutputScreen,
    #eventSaleScreen,
    #eventPaymentScreen,
    #eventSuccessScreen,
    #eventOutputScreen
) {
    background: #fff4b8 !important;
    border-color: transparent !important;
}

/* Pas de texte supplémentaire qui décale le contenu */

body.teacher-test-mode :is(
    #drinksSaleScreen,
    #drinksPaymentScreen,
    #drinksSuccessScreen,
    #freeDrinksScreen,
    #bakerySaleScreen,
    #bakeryPaymentScreen,
    #bakerySuccessScreen,
    #bakeryOutputScreen,
    #eventSaleScreen,
    #eventPaymentScreen,
    #eventSuccessScreen
)::before {
    content: none !important;
    display: none !important;
}

/* Neutraliser les anciens ajouts d'espace
   uniquement lorsqu'ils proviennent du mode test */

body.teacher-test-mode :is(
    #drinksSaleScreen,
    #drinksPaymentScreen,
    #drinksSuccessScreen,
    #freeDrinksScreen,
    #bakerySaleScreen,
    #bakeryPaymentScreen,
    #bakerySuccessScreen,
    #bakeryOutputScreen
) {
    padding: clamp(22px, 4vw, 42px) 0 60px !important;
    min-height: 0 !important;
    border-width: 0 !important;
}

/* ==========================================
   LAUTER MACHER — EN-TÊTES HARMONISÉS
   Titre centré, boutons presque alignés
   ========================================== */

.screen-header,
.page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    position: relative;
    padding-top: 14px;
    padding-bottom: 14px;
}

/* Titre parfaitement centré */
.screen-header > h1,
.page-header > h1 {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    text-align: center;
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.2;
}

/* Bouton retour : à gauche */
.screen-header > .back-button,
.page-header > .back-button {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    margin: 8px 0 0;
}

/* Boutons d'action : à droite */
.screen-header > :is(button, .screen-mode-badge):not(.back-button),
.page-header > :is(button, .screen-mode-badge):not(.back-button) {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin-top: 8px;
}

/* Sur petit écran, éviter les débordements */
@media (max-width: 650px) {
    .screen-header,
    .page-header {
        column-gap: 8px;
    }

    .screen-header > h1,
    .page-header > h1 {
        font-size: clamp(1.3rem, 4.5vw, 1.8rem);
    }

    .screen-header > .back-button,
    .page-header > .back-button {
        font-size: 0.8rem;
    }
}
