:root {
    --theme-bg: #0c1020;
    --theme-surface: rgba(24, 25, 45, 0.94);
    --theme-surface-raised: rgba(34, 35, 61, 0.96);
    --theme-surface-soft: rgba(255, 255, 255, 0.035);
    --theme-border: rgba(207, 196, 231, 0.16);
    --theme-border-strong: rgba(169, 54, 66, 0.32);
    --theme-heading: #f7f3fb;
    --theme-text: #e9e4f1;
    --theme-muted: #b9b4cc;
    --theme-accent: #a93642;
    --theme-accent-hover: #c64b56;
    --theme-accent-soft: rgba(169, 54, 66, 0.11);
    --theme-table-head: rgba(46, 40, 68, 0.98);
    --theme-table-row: rgba(255, 255, 255, 0.018);
    --theme-table-row-alt: rgba(255, 255, 255, 0.035);
    --theme-table-row-hover: rgba(169, 54, 66, 0.075);
    --theme-field: rgba(15, 17, 33, 0.92);
    --theme-shadow: 0 18px 45px rgba(3, 5, 17, 0.34);
    --theme-danger: #d54d68;
    --theme-partner-price: #8dd7de;
    --theme-onsite-price: #f5a24f;

    /* Alias historiques : une seule palette reste la source de vérité. */
    --bg: var(--theme-bg);
    --panel: var(--theme-surface);
    --panel-strong: var(--theme-surface-raised);
    --ink: var(--theme-heading);
    --muted: var(--theme-muted);
    --line: var(--theme-border);
    --field: var(--theme-field);
    --field-ink: var(--theme-text);
    --primary: var(--theme-accent);
    --primary-dark: var(--theme-accent-hover);
    --accent: var(--theme-accent);
    --cyan: var(--theme-accent);
    --danger: var(--theme-danger);
    --shadow: var(--theme-shadow);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 8%, rgba(169, 77, 131, 0.22), transparent 31%),
        radial-gradient(circle at 88% 4%, rgba(86, 186, 196, 0.11), transparent 27%),
        linear-gradient(145deg, var(--theme-bg) 0%, #151329 54%, #090c17 100%);
    background-attachment: fixed;
    color: var(--theme-text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 25% 20%, rgba(123, 62, 133, 0.38), transparent 34%),
        radial-gradient(circle at 80% 10%, rgba(63, 155, 168, 0.18), transparent 27%),
        #0c1020;
}

.login-shell {
    width: min(100%, 420px);
}

.login-panel,
.cart-panel,
.sale-attribution-panel,
.table-wrap,
.stat-card,
.empty-panel,
.admin-panel,
.employee-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.login-panel {
    padding: 30px;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.94);
    color: #20242c;
}

.brand-block,
.app-brand,
.section-heading,
.app-header,
.user-menu,
.totals div,
.cart-row,
.quantity-controls {
    display: flex;
    align-items: center;
}

.brand-block {
    gap: 14px;
    margin-bottom: 26px;
}

.brand-mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #426f87);
    color: #fff;
    font-weight: 800;
}

.site-logo {
    display: block;
    width: auto;
    max-width: 150px;
    height: 42px;
    object-fit: contain;
}

.login-logo {
    display: block;
    width: auto;
    max-width: 160px;
    height: 58px;
    object-fit: contain;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-form input,
.search-input,
.admin-panel input,
.admin-panel select,
.employee-form input,
.employee-form select,
.stock-form input,
.drawer-form input,
.drawer-form select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 12px;
    background: var(--field);
    color: var(--field-ink);
}

.login-panel .login-form input {
    border-color: #dce1e8;
    background: #fff;
    color: #20242c;
    caret-color: #20242c;
}

.login-panel .login-form input::placeholder,
.login-panel .login-form textarea::placeholder {
    color: #7a8290;
    opacity: 1;
}

.registration-shell {
    width: min(100%, 760px);
}

.registration-panel {
    padding: clamp(28px, 5vw, 48px);
    border-radius: 18px;
}

.registration-panel .brand-block {
    justify-content: center;
    margin-bottom: 34px;
}

.registration-panel .brand-block > div {
    text-align: left;
}

.registration-panel .login-logo {
    width: 76px;
    height: 76px;
}

.registration-panel h1 {
    font-size: clamp(30px, 5vw, 42px);
    line-height: 1.05;
}

.registration-step:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(170px, 210px) minmax(0, 1fr);
    align-items: center;
    gap: 14px 22px;
}

.registration-step > .eyebrow,
.registration-step > .form-hint,
.registration-step > .primary-button,
.registration-step > .ghost-button {
    grid-column: 1 / -1;
}

.registration-step > .eyebrow {
    margin-bottom: 8px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e3e6ec;
    font-size: 13px;
}

.registration-step > label {
    color: #363c47;
    font-weight: 700;
    line-height: 1.25;
}

.registration-field-help {
    display: block;
    margin-top: -8px;
    color: #667085;
    font-size: 13px;
    line-height: 1.35;
}

.registration-step .primary-button,
.registration-step .ghost-button {
    justify-self: end;
    min-width: 230px;
    margin-top: 8px;
}

.login-panel .registration-step .ghost-button {
    border: 1px solid #c9ced8;
    background: #fff;
    color: #303642;
    box-shadow: none;
}

.login-panel .registration-step .ghost-button:hover,
.login-panel .registration-step .ghost-button:focus-visible {
    border-color: #a93642;
    background: #fff4f9;
    color: #a63f73;
}

.registration-step textarea {
    width: 100%;
    min-height: 96px;
    border: 1px solid #dce1e8;
    padding: 12px;
    background: #fff;
    color: #20242c;
    resize: vertical;
}

@media (max-width: 640px) {
    .registration-page {
        padding: 12px;
    }

    .registration-panel {
        padding: 24px 18px;
    }

    .registration-panel .brand-block {
        align-items: center;
    }

    .registration-panel .login-logo {
        width: 58px;
        height: 58px;
    }

    .registration-step:not([hidden]) {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .registration-step > label:not(:first-of-type) {
        margin-top: 7px;
    }

    .registration-step > span:empty {
        display: none;
    }

    .registration-field-help {
        margin-top: -3px;
    }

    .registration-step .primary-button,
    .registration-step .ghost-button {
        width: 100%;
        min-width: 0;
    }
}

.login-panel .login-form input.is-invalid,
.login-panel .login-form .prefixed-input.is-invalid,
.login-panel .login-form .password-field.is-invalid {
    border-color: #d42626;
    box-shadow: 0 0 0 3px rgba(212, 38, 38, 0.12);
}

.prefixed-input {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-height: 44px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background: #fff;
    max-height: calc(100vh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
}

.prefixed-input span {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    padding: 0 0 0 12px;
    color: #20242c;
    font-weight: 700;
}

.login-panel .login-form .prefixed-input input {
    min-height: 42px;
    border: 0;
    padding-left: 2px;
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 44px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.login-panel .login-form .password-field input {
    min-height: 42px;
    border: 0;
}

.password-field button {
    align-self: stretch;
    border: 0;
    border-left: 1px solid #dce1e8;
    background: #f3f4f6;
    color: #20242c;
    cursor: pointer;
    font-weight: 700;
    padding: 0 12px;
}

.login-panel .hint {
    color: #6a7280;
}

.login-help-link {
    display: inline-block;
    color: var(--theme-accent);
    font-weight: 700;
    text-decoration: none;
}

.login-form .login-help-link {
    justify-self: end;
}

.login-help-link:hover,
.login-help-link:focus-visible {
    text-decoration: underline;
}

.login-separator { display: flex; align-items: center; gap: 12px; color: #7a8290; margin: 16px 0; }
.login-separator::before, .login-separator::after { content: ""; height: 1px; background: #dce1e8; flex: 1; }
.discord-login-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid #5865f2; border-radius: 7px; background: #5865f2; color: #fff; font-weight: 800; text-decoration: none; }
.discord-login-button:hover, .discord-login-button:focus-visible { background: #4752c4; color: #fff; }
.profile-account-link { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-bottom: 9px; min-height: 42px; border: 0; background: transparent; color: var(--theme-text); font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
.profile-account-link:hover { color: var(--theme-accent); }
.profile-account-link.is-linked { justify-content: flex-start; padding: 7px 9px; border: 1px solid var(--theme-border); border-radius: 9px; background: rgba(88, 101, 242, .09); }
.profile-account-link img, .discord-linked-profile img { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; object-fit: cover; background: #5865f2; }
.profile-account-link span { display: grid; min-width: 0; }
.profile-account-link strong, .profile-account-link small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-account-link small { color: var(--theme-muted); font-size: .72rem; font-weight: 600; }
.discord-linked-profile { display: flex; align-items: center; gap: 12px; }
.discord-linked-profile div { display: grid; gap: 3px; }
.discord-linked-profile small { color: var(--theme-muted); }
.discord-account-modal { width: min(520px, calc(100vw - 32px)); }
.absence-modal { width: min(760px, calc(100vw - 32px)); }
.absence-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-surface-soft); }
.absence-editor-actions, .absence-feedback { grid-column: 1 / -1; }
.absence-editor-actions, .absence-item-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.absence-feedback { margin: 0; color: #ff9aa4; font-weight: 700; }
.absence-history { display: grid; gap: 10px; }
.absence-history h3 { margin: 0; }
.absence-list { display: grid; gap: 8px; }
.absence-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px; border: 1px solid var(--theme-border); border-radius: 9px; background: rgba(255,255,255,.035); }
.absence-item > div:first-child { display: grid; gap: 5px; }
.absence-status { width: fit-content; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.09); color: var(--theme-muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.absence-item.is-current { border-color: var(--theme-accent); }
.absence-item.is-current .absence-status { background: var(--theme-accent-soft); color: var(--theme-accent); }
.absence-item.is-future .absence-status { color: #8ed7ff; }
.absence-item.is-past { opacity: .72; }
.absence-empty { margin: 0; color: var(--theme-muted); }
@media (max-width: 600px) { .absence-editor { grid-template-columns: 1fr; } .absence-item { align-items: stretch; flex-direction: column; } .absence-item-actions { justify-content: stretch; } .absence-item-actions button { flex: 1; } }
.discord-account-modal .discord-linked-profile { padding: 14px; border: 1px solid var(--theme-border); border-radius: 10px; background: rgba(88, 101, 242, .09); }

.primary-button,
.ghost-button,
.danger-button {
    min-height: 42px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

.primary-button {
    border: 1px solid var(--theme-accent);
    background: var(--theme-accent);
    color: #190d16;
    padding: 0 18px;
    box-shadow: 0 10px 24px rgba(169, 77, 131, 0.24);
}

.primary-button:hover,
.primary-button:focus-visible {
    border-color: var(--theme-accent-hover);
    background: var(--theme-accent-hover);
    color: #190d16;
}

.ghost-button {
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-soft);
    color: var(--theme-text);
    padding: 0 12px;
}

.ghost-button:hover,
.ghost-button:focus-visible {
    border-color: var(--theme-border-strong);
    background: var(--theme-accent-soft);
    color: var(--theme-heading);
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(255, 120, 120, 0.44);
    border-radius: 999px;
    background: rgba(183, 53, 53, 0.16);
    color: #ffd6d6;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.logout-form {
    width: 100%;
    margin: 0;
}

.logout-button:hover {
    background: rgba(183, 53, 53, 0.28);
    color: #fff;
}

.danger-button {
    border: 1px solid rgba(213, 77, 104, 0.55);
    background: rgba(213, 77, 104, 0.14);
    color: #ffc5d0;
    padding: 0 12px;
}

.danger-button:hover,
.danger-button:focus-visible {
    background: rgba(213, 77, 104, 0.25);
    color: #ffe8ed;
}

.login-panel .ghost-button,
.login-panel .primary-button {
    color: #fff;
}

.full-width {
    width: 100%;
}

.hint,
.empty-state {
    color: var(--muted);
}

.hint {
    margin: 18px 0 0;
    font-size: 13px;
}

.alert {
    min-width: min(360px, calc(100vw - 32px));
    max-width: min(680px, calc(100vw - 32px));
    margin: 0;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
    cursor: pointer;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.4;
    text-align: center;
    animation: alert-enter 0.28s ease-out both;
    backdrop-filter: blur(18px);
}

.alert-error {
    border-color: rgba(245, 105, 126, 0.48);
    background: rgba(79, 22, 38, 0.96);
    color: #ffd7de;
}

.alert-success {
    border-color: rgba(91, 211, 145, 0.42);
    background: rgba(20, 67, 48, 0.96);
    color: #d1ffe5;
}

.login-panel .alert-success {
    background: rgba(20, 67, 48, 0.96);
    color: #d1ffe5;
    border-color: rgba(91, 211, 145, 0.42);
    font-weight: 700;
}

.alert-stack {
    position: fixed;
    z-index: 10000;
    top: 18px;
    left: 50%;
    display: grid;
    justify-items: center;
    gap: 9px;
    width: min(720px, 100%);
    padding: 0 16px;
    pointer-events: none;
    transform: translateX(-50%);
}

.alert-stack .alert {
    pointer-events: auto;
}

.alert.is-leaving {
    animation: alert-leave 0.26s ease-in both;
}

@keyframes alert-enter {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes alert-leave {
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.97);
    }
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    justify-content: space-between;
    gap: 16px;
    min-height: 62px;
    padding: 8px 20px;
    background: rgba(8, 8, 22, 0.98);
    border-bottom: 1px solid rgba(169, 54, 66, .18);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
    backdrop-filter: blur(22px);
}

.app-brand {
    flex: 0 0 auto;
    gap: 11px;
    min-width: 190px;
    color: #fff;
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: -.01em;
}

.main-nav {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.main-nav a,
.nav-group-summary {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.15;
}

.nav-group {
    position: relative;
}

.nav-group[open] {
    z-index: 110;
}

.nav-group-summary {
    gap: 8px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

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

.nav-group-chevron {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 160ms ease;
}

.nav-group[open] .nav-group-chevron {
    transform: translateY(2px) rotate(225deg);
}

.nav-group-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 30;
    display: grid;
    gap: 5px;
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    background: #151528;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
    transform: translateX(-50%);
    pointer-events: auto;
}

.nav-group-menu::before {
    position: absolute;
    top: -6px;
    left: calc(50% - 6px);
    width: 12px;
    height: 12px;
    content: '';
    border-top: 1px solid var(--theme-border);
    border-left: 1px solid var(--theme-border);
    background: #151528;
    transform: rotate(45deg);
}

.nav-group-menu a {
    position: relative;
    z-index: 1;
    justify-content: flex-start;
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 9px;
}

.nav-group-menu a:hover {
    border-color: rgba(169, 54, 66, 0.28);
}

.main-nav a:hover,
.main-nav a.is-active,
.nav-group-summary:hover,
.nav-group[open] > .nav-group-summary,
.nav-group.is-active > .nav-group-summary {
    background: var(--theme-accent);
    color: #190d16;
}

.main-nav a.is-active:hover {
    background: linear-gradient(135deg, #d3619e, #97508d);
    color: #fff;
}

.user-menu {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 8px;
}

.app-header .site-logo {
    width: 27px;
    height: 36px;
    object-fit: contain;
}

.app-header .logout-button,
.app-header .topbar-advert-button {
    min-height: 34px;
}

.service-toggle-button {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: #22c55e;
    color: #071b0e;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.service-toggle-button:hover:not(:disabled) { background: #4ade80; }
.service-toggle-button.is-active { background: #f59e0b; color: #261500; }
.service-toggle-button.is-active:hover:not(:disabled) { background: #fbbf24; }
.service-toggle-button:disabled { cursor: not-allowed; opacity: .55; }
.service-toggle-button[aria-disabled="true"] { opacity: .55; }
.service-toggle-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.service-toggle-button [data-service-auto-stop-countdown] { color: inherit; font-size: 10px; font-weight: 750; opacity: .78; }

.service-confirmation-countdown {
    margin-top: 12px;
    color: var(--theme-muted);
}

.service-confirmation-countdown strong {
    color: #f59e0b;
    font-variant-numeric: tabular-nums;
}

.profile-menu {
    position: relative;
}

.profile-menu[open] { z-index: 120; }

.profile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(3, 4, 13, .68);
    cursor: default;
    backdrop-filter: blur(3px);
    animation: profile-backdrop-in 180ms ease both;
}

.profile-menu-trigger {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 10px;
    padding: 0 12px 0 14px;
    border: 1px solid rgba(207, 196, 231, .18);
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
    color: #f7f3fb;
    font-size: .92rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
    transition: border-color 150ms ease, background 150ms ease;
}

.profile-menu-trigger::-webkit-details-marker { display: none; }
.profile-menu-trigger-copy { display: grid; min-width: 0; gap: 1px; text-align: left; }
.profile-menu-trigger-copy strong { overflow: hidden; font-size: .92rem; line-height: 1.15; text-overflow: ellipsis; }
.profile-menu-trigger-copy small { font-size: .66rem; font-weight: 800; line-height: 1.1; opacity: .72; font-variant-numeric: tabular-nums; }
.profile-menu.is-on-duty > .profile-menu-trigger:has([data-service-trigger-countdown]:not([hidden])) { min-height: 46px; padding-top: 5px; padding-bottom: 5px; }
.profile-menu-trigger:hover,
.profile-menu[open] > .profile-menu-trigger {
    border-color: rgba(169, 54, 66, .52);
    background: rgba(169, 54, 66, .1);
}

.profile-menu.is-on-duty > .profile-menu-trigger {
    border-color: #22c55e;
    background: #22c55e;
    color: #071b0e;
}

.profile-menu.is-on-duty > .profile-menu-trigger:hover,
.profile-menu.is-on-duty[open] > .profile-menu-trigger { background: #4ade80; }

.profile-menu.is-off-duty > .profile-menu-trigger {
    border-color: #f59e0b;
    background: #f59e0b;
    color: #261500;
}

.profile-menu.is-off-duty > .profile-menu-trigger:hover,
.profile-menu.is-off-duty[open] > .profile-menu-trigger { background: #fbbf24; }

.profile-menu-trigger i {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 160ms ease;
}

.profile-menu[open] .profile-menu-trigger i { transform: translateY(2px) rotate(225deg); }

.profile-menu-panel {
    position: fixed;
    z-index: 201;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    width: min(420px, 100vw);
    overflow-x: hidden;
    overflow-y: auto;
    flex-direction: column;
    border-left: 1px solid rgba(169, 54, 66, .34);
    background:
        radial-gradient(circle at 100% 0, rgba(169, 54, 66, .1), transparent 34%),
        linear-gradient(180deg, #171329 0%, #0f1021 100%);
    box-shadow: -24px 0 70px rgba(0, 0, 0, .52);
    animation: profile-panel-in 210ms ease-out both;
}

@keyframes profile-panel-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes profile-backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.profile-menu-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 26px 24px;
    border-bottom: 1px solid var(--theme-border);
    background: linear-gradient(145deg, rgba(169, 54, 66, .2), rgba(255, 255, 255, .025));
}

.profile-menu-head > div { display: grid; gap: 4px; }
.profile-menu-head > button { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; padding: 0; border: 1px solid var(--theme-border); border-radius: 12px; background: rgba(255,255,255,.045); color: var(--theme-text); font-size: 23px; line-height: 1; cursor: pointer; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.profile-menu-head > button:hover { border-color: var(--theme-border-strong); background: var(--theme-accent-soft); }
.profile-menu-head > button:active { transform: scale(.95); }

.profile-menu-head span { color: var(--theme-muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.profile-menu-head strong { color: #fff; font-size: 1.65rem; line-height: 1.1; letter-spacing: -.025em; }
.profile-menu-head small { width: fit-content; margin-top: 4px; padding: 4px 9px; border-radius: 999px; background: rgba(169, 54, 66, .12); color: #ef9fc8; font-size: .72rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }

.profile-menu-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 18px 26px 12px;
}

.profile-menu-actions button {
    width: 100%;
    min-height: 44px;
    border-radius: 11px;
    font-size: .9rem;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.profile-menu-actions .service-toggle-button {
    grid-column: 1 / -1;
    min-height: 48px;
    box-shadow: 0 10px 26px rgba(34, 197, 94, .14);
}

.profile-menu-actions .service-toggle-button.is-active { box-shadow: 0 10px 26px rgba(245, 158, 11, .14); }

.profile-advert-button {
    border: 1px solid rgba(207, 196, 231, .2);
    background: rgba(255, 255, 255, .045);
    color: var(--theme-text);
    font-weight: 800;
    cursor: pointer;
}

.profile-advert-button:hover:not(:disabled) { border-color: var(--theme-border-strong); background: var(--theme-accent-soft); transform: translateY(-2px); }
.profile-advert-button:disabled { cursor: not-allowed; opacity: .48; }

.profile-menu-actions .profile-advert-browser {
    grid-column: 1 / -1;
    min-height: 36px;
    border-color: transparent;
    background: transparent;
    color: var(--theme-muted);
    font-size: .78rem;
    font-weight: 700;
}

.profile-menu-actions .profile-advert-browser:hover:not(:disabled) {
    border-color: rgba(207, 196, 231, .12);
    background: rgba(255, 255, 255, .025);
    color: var(--theme-text);
    transform: none;
}

.profile-action-center {
    display: grid;
    gap: 14px;
    margin: 8px 26px 22px;
    padding: 18px;
    border: 1px solid rgba(207, 196, 231, .14);
    border-radius: 16px;
    background: rgba(255, 255, 255, .035);
    box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.profile-action-center-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.profile-action-center-head > div { display: grid; gap: 3px; }
.profile-action-center-head span { color: var(--theme-muted); font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.profile-action-center-head h3 { margin: 0; color: #fff; font-size: 1.05rem; line-height: 1.2; }
.profile-action-center-head > strong {
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    padding: 0 8px;
    border: 1px solid rgba(169, 54, 66, .22);
    border-radius: 10px;
    background: rgba(169, 54, 66, .11);
    color: #f2b0d1;
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
}

.profile-action-center-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(74, 222, 128, .12);
    border-radius: 12px;
    background: rgba(34, 197, 94, .055);
}

.profile-action-center-empty > span {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    background: rgba(34, 197, 94, .14);
    color: #65e493;
    font-size: 1rem;
    font-weight: 900;
}

.profile-action-center-empty > div { display: grid; min-width: 0; gap: 2px; }
.profile-action-center-empty strong { color: #f4f1f8; font-size: .87rem; }
.profile-action-center-empty small { color: var(--theme-muted); font-size: .73rem; line-height: 1.35; }
.profile-action-center-error { margin: 0; padding: 12px; border-radius: 10px; background: rgba(239, 68, 68, .08); color: #ffadb4; font-size: .82rem; }
.profile-action-center-list { display: grid; gap: 8px; }
.profile-action-center-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--theme-border); border-radius: 12px; background: rgba(255,255,255,.03); color: var(--theme-text); text-decoration: none; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.profile-action-center-item:hover { border-color: var(--theme-border-strong); background: var(--theme-accent-soft); transform: translateY(-1px); }
.profile-action-center-item > div { display: grid; min-width: 0; gap: 2px; }
.profile-action-center-item > div small { color: var(--theme-muted); font-size: .65rem; font-weight: 750; text-transform: uppercase; }
.profile-action-center-item > div strong { overflow: hidden; color: #fff; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-action-center-item > div span { overflow: hidden; color: var(--theme-muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-action-center-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: rgba(169,54,66,.11); color: #ef9fc8; font-weight: 900; }
.profile-action-center-item > b { min-width: 25px; padding: 4px 6px; border-radius: 8px; background: rgba(255,255,255,.07); text-align: center; font-size: .72rem; }
.profile-action-center-item.is-priority { border-color: rgba(248,113,113,.25); }
.profile-action-center-item.is-priority .profile-action-center-icon { background: rgba(248,113,113,.12); color: #ff9ea5; }

.profile-menu-footer {
    margin-top: auto;
    padding: 18px 26px 24px;
    border-top: 1px solid var(--theme-border);
    background: rgba(0,0,0,.14);
}

.profile-menu-footer .logout-button {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
    font-size: .9rem;
}

.profile-menu-footer .profile-account-link.is-linked {
    min-height: 48px;
    margin-bottom: 9px;
    padding: 5px 9px;
    border-radius: 10px;
    background: rgba(88, 101, 242, .075);
}

.profile-menu-footer .profile-account-link img {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
}

@media (max-width: 480px) {
    .profile-menu-head { padding: 22px 20px 20px; }
    .profile-menu-actions { padding: 16px 20px 10px; }
    .profile-action-center { margin: 8px 20px 18px; }
    .profile-menu-footer { padding: 16px 20px 20px; }
}

#checkoutButton.is-service-required {
    border-color: #22c55e;
    background: #22c55e;
    color: #071b0e;
}

.service-requirement-menu {
    position: fixed;
    z-index: 10000;
    width: 230px;
    padding: 8px;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    background: var(--theme-surface, #241923);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
}

.service-requirement-menu[hidden] { display: none; }
.service-requirement-menu strong { display: block; padding: 7px 9px 9px; color: var(--theme-text); font-size: .82rem; }
.service-requirement-menu button {
    display: block;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--theme-text);
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.service-requirement-menu button:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.service-requirement-menu button:disabled { opacity: .45; cursor: default; }

.action-center-trigger {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    padding: 0 9px 0 12px;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.035);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.action-center-trigger:hover,
.action-center-trigger[aria-expanded="true"] {
    border-color: rgba(169, 54, 66, 0.48);
    background: var(--theme-accent-soft);
}

.action-center-trigger strong {
    display: inline-grid;
    min-width: 23px;
    height: 23px;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    color: #190d16;
    background: var(--theme-accent);
    font-size: 11px;
}

.action-center-layer {
    position: fixed;
    inset: 0;
    z-index: 200;
}

.action-center-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(3, 4, 13, 0.64);
    opacity: 0;
    cursor: default;
    transition: opacity 180ms ease;
    backdrop-filter: blur(3px);
}

.action-center-panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: min(430px, 100%);
    height: 100%;
    flex-direction: column;
    border-left: 1px solid var(--theme-border);
    background: rgba(15, 15, 34, 0.985);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.42);
    transform: translateX(100%);
    transition: transform 200ms ease;
}

.action-center-layer.is-open .action-center-backdrop {
    opacity: 1;
}

.action-center-layer.is-open .action-center-panel {
    transform: translateX(0);
}

.action-center-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px;
    border-bottom: 1px solid var(--theme-border);
}

.action-center-head p {
    margin: 0 0 3px;
    color: var(--theme-accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.action-center-head h2 {
    margin: 0;
    font-size: 24px;
}

.action-center-head > button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--theme-border);
    border-radius: 9px;
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.035);
    font-size: 22px;
    cursor: pointer;
}

.action-center-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 18px 8px;
    padding: 13px 15px;
    border: 1px solid rgba(169, 54, 66, 0.24);
    border-radius: 13px;
    background: var(--theme-accent-soft);
}

.action-center-summary strong {
    font-size: 25px;
}

.action-center-summary span {
    color: var(--muted);
    line-height: 1.35;
}

.action-center-list {
    display: grid;
    gap: 8px;
    padding: 10px 18px 18px;
    overflow-y: auto;
}

.action-center-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 12px;
    border: 1px solid var(--theme-border);
    border-radius: 13px;
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.025);
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.action-center-item:hover {
    border-color: rgba(169, 54, 66, 0.45);
    background: rgba(169, 54, 66, 0.07);
    transform: translateX(-2px);
}

.action-center-item.is-priority {
    border-color: rgba(255, 174, 87, 0.3);
}

.action-center-item-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    color: #f5d9e8;
    background: rgba(169, 54, 66, 0.15);
    font-weight: 900;
}

.action-center-item.is-priority .action-center-item-icon {
    color: #ffdcae;
    background: rgba(255, 174, 87, 0.13);
}

.action-center-item div {
    display: grid;
    gap: 3px;
}

.action-center-item small {
    color: var(--theme-accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.action-center-item div > span {
    color: var(--muted);
    font-size: 12px;
}

.action-center-item > b {
    display: grid;
    min-width: 29px;
    height: 29px;
    place-items: center;
    padding: 0 7px;
    border-radius: 999px;
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.075);
    font-size: 12px;
}

.action-center-empty {
    display: grid;
    justify-items: center;
    gap: 7px;
    margin: auto 22px;
    color: var(--muted);
    text-align: center;
}

.action-center-empty > span {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin-bottom: 6px;
    border-radius: 50%;
    color: #b7f0ce;
    background: rgba(75, 190, 121, 0.12);
    font-size: 24px;
}

.action-center-empty strong {
    color: var(--theme-text);
    font-size: 18px;
}

.action-center-empty p {
    margin: 0;
}

.action-center-error {
    margin: 8px 18px;
    padding: 11px 13px;
    border-radius: 10px;
    color: #ffd1d8;
    background: rgba(213, 77, 104, 0.12);
}

.action-center-footer {
    margin-top: auto;
    padding: 14px 18px;
    border-top: 1px solid var(--theme-border);
}

.action-center-footer a {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.045);
    font-weight: 800;
}

body.action-center-open,
body.profile-menu-open {
    overflow: hidden;
}

/* Le backdrop-filter de la top bar crée un containing block pour ses enfants
   positionnés en fixed. On le neutralise pendant l'ouverture afin que le
   panneau profil occupe bien tout le viewport, comme le centre d'actions. */
body.profile-menu-open .app-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.app-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 22px;
    padding: 24px;
}

.pos-category-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 24px 0;
}

.sales-mode-switch {
    display: flex;
    width: fit-content;
    gap: 5px;
    margin: 14px auto 0;
    padding: 5px;
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    background: #151528;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.sales-mode-switch a {
    display: inline-flex;
    min-width: 126px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 800;
}

.sales-mode-switch a > span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 7px;
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.07);
    font-size: 11px;
    font-weight: 900;
}

.sales-mode-switch a:hover {
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.045);
}

.sales-mode-switch a.is-active {
    border-color: rgba(169, 54, 66, 0.38);
    color: #190d16;
    background: var(--theme-accent);
}

.sales-mode-switch a.is-active > span {
    color: #190d16;
    background: rgba(25, 13, 22, 0.12);
}

.pos-category-strip-dropdown {
    position: relative;
    z-index: 30;
    overflow: visible;
}

.category-filter {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.category-filter:hover,
.category-filter.is-active {
    border-color: rgba(169, 54, 66, 0.58);
    background: rgba(169, 54, 66, 0.14);
    color: var(--ink);
}

.page-shell {
    padding: 24px;
}

.workspace {
    min-width: 0;
}

.section-heading {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading.compact {
    margin-bottom: 14px;
}

.search-input {
    max-width: 320px;
}

.category-dropdown {
    position: relative;
}

.category-dropdown > summary {
    display: flex;
    min-width: 180px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}

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

.category-dropdown-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    display: grid;
    min-width: 100%;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px;
    background: #17172d;
    box-shadow: var(--shadow);
}

.category-dropdown-menu .category-filter {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    white-space: nowrap;
}

.category-dropdown-menu .category-filter[hidden] {
    display: none;
}

#vehicleCategoryFilter[hidden],
.category-dropdown[hidden] {
    display: none;
}

.vehicle-lookup-panel {
    display: grid;
    justify-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background:
        radial-gradient(circle at top right, rgba(86, 186, 196, 0.10), transparent 34%),
        rgba(255, 255, 255, 0.05);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.vehicle-lookup-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    text-align: center;
}

.vehicle-lookup-header h2 {
    font-size: 19px;
}

.vehicle-lookup-header p:last-child {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.vehicle-lookup-icon {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(86, 186, 196, 0.34);
    border-radius: 10px;
    background: rgba(86, 186, 196, 0.10);
    font-size: 23px;
}

.vehicle-lookup {
    display: grid;
    justify-items: center;
    gap: 7px;
    width: min(100%, 620px);
}

.vehicle-lookup > label {
    width: 100%;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.vehicle-lookup-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.plate-input {
    display: grid;
    width: min(100%, 390px);
    min-height: 48px;
    grid-template-columns: 34px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--field);
}

.plate-input > span {
    display: grid;
    place-items: center;
    background: #2456a6;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.plate-input input {
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 0 14px;
    background: transparent;
    color: var(--field-ink);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 2px;
    outline: none;
    text-align: center;
    text-transform: uppercase;
}

.plate-input:focus-within {
    border-color: rgba(169, 54, 66, 0.72);
    box-shadow: 0 0 0 3px rgba(169, 54, 66, 0.10);
}

.vehicle-lookup-controls .primary-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.vehicle-lookup-result {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.vehicle-lookup-result:empty {
    display: none;
}

.vehicle-lookup-result:not(.is-success) {
    grid-template-columns: 1fr;
}

.vehicle-lookup-result.is-success {
    color: var(--ink);
}

.vehicle-lookup-result.is-error {
    padding: 12px 14px;
    border: 1px solid rgba(183, 53, 53, 0.4);
    border-radius: 7px;
    background: rgba(183, 53, 53, 0.10);
    color: var(--danger);
}

.vehicle-data-item {
    display: grid;
    justify-items: center;
    gap: 5px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
}

.vehicle-data-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vehicle-data-value {
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-confirmation {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 13px 14px;
    border: 1px solid rgba(169, 54, 66, 0.28);
    border-radius: 7px;
    background: rgba(169, 54, 66, 0.07);
}

.vehicle-confirmation strong {
    margin-right: auto;
}

.vehicle-lookup-result.is-confirmed {
    padding: 12px;
    border: 1px solid rgba(73, 175, 117, 0.46);
    border-radius: 8px;
    background: rgba(73, 175, 117, 0.08);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 14px;
}

.product-category-groups {
    display: grid;
    gap: 24px;
}

.product-category-group {
    display: grid;
    gap: 12px;
}

.product-category-group[hidden] {
    display: none;
}

.product-category-group > h2 {
    margin: 0;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
}

/* Vue compacte de la caisse : garder toutes les categories visibles sans
   agrandir artificiellement les quelques cartes presentes sur une ligne. */
.product-category-groups {
    gap: 10px;
}

.product-category-groups .product-category-group {
    gap: 6px;
}

.product-category-groups .product-category-group > h2 {
    padding-bottom: 5px;
    font-size: 14px;
}

.product-category-groups .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.product-category-groups .product-card {
    gap: 5px;
    min-height: 0;
    padding: 11px;
    font-size: 13px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.product-category-groups .product-image {
    height: 70px;
    aspect-ratio: auto;
}

.product-category-groups .product-image img {
    padding: 4px;
}

.product-category-groups .product-card strong {
    font-size: 14px;
    line-height: 1.2;
}

.product-category-groups .product-category,
.product-category-groups .product-meta {
    font-size: 12px;
    line-height: 1.2;
}

.product-category-groups .product-price {
    font-size: 16px;
}

.product-card {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 16px;
    cursor: pointer;
    text-align: left;
}

.product-card.has-pending-order {
    position: relative;
    overflow: hidden;
}

.product-order-ribbon {
    position: absolute;
    z-index: 2;
    top: 14px;
    right: -31px;
    width: 112px;
    padding: 5px 0;
    transform: rotate(45deg);
    border-block: 1px solid rgba(255, 255, 255, 0.42);
    background: #d48818;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.34);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    pointer-events: none;
    text-align: center;
    text-transform: uppercase;
}

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

.product-image {
    display: block;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
}

.product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.product-card:hover {
    border-color: rgba(169, 54, 66, 0.54);
    background: linear-gradient(145deg, rgba(169, 54, 66, 0.13), rgba(255, 255, 255, 0.07));
}

.product-card.is-out-of-stock,
.product-card.is-out-of-stock:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.035);
    filter: grayscale(1);
    opacity: 0.42;
    cursor: not-allowed;
}

.product-card[data-product-menu],
.product-card.is-out-of-stock[data-product-menu] {
    cursor: context-menu;
}

.product-category-group[data-product-category-menu] {
    cursor: context-menu;
}

[data-live-category] > h2,
#productGrid[data-live-catalog] [data-live-product] {
    cursor: grab;
    user-select: none;
}

[data-live-category] > h2:active,
#productGrid[data-live-catalog] [data-live-product]:active {
    cursor: grabbing;
}

.is-catalog-dragging {
    opacity: 0.42 !important;
    outline: 2px dashed rgba(169, 54, 66, 0.7);
    outline-offset: 3px;
}

#productGrid[data-live-catalog] [data-live-product-list] {
    min-height: 36px;
    border-radius: 8px;
    transition: background-color 120ms ease, outline-color 120ms ease;
}

#productGrid[data-live-catalog].is-product-dragging [data-live-product-list] {
    background: rgba(255, 255, 255, 0.025);
    outline: 1px dashed rgba(255, 255, 255, 0.16);
    outline-offset: 4px;
}

#productGrid[data-live-catalog] [data-live-product-list].is-catalog-drop-target {
    background: rgba(169, 54, 66, 0.08);
    outline: 2px dashed rgba(169, 54, 66, 0.55);
    outline-offset: 4px;
}

#productGrid[data-live-catalog].is-catalog-saving [data-live-product],
#productGrid[data-live-catalog].is-catalog-saving [data-live-category] > h2 {
    cursor: progress;
}

.product-card.is-inactive-product,
.product-card.is-inactive-product:hover {
    border-color: rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.025);
    filter: grayscale(0.8);
    opacity: 0.48;
}

.product-category,
.product-meta {
    color: var(--muted);
    font-size: 13px;
}

.product-price {
    align-self: end;
    color: #8dd7de;
    font-weight: 800;
}

.cart-column {
    position: sticky;
    top: 94px;
    align-self: start;
    display: grid;
    gap: 14px;
}

.cart-panel {
    padding: 18px;
}

.sale-attribution-panel {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
}

.sale-attribution-panel label {
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.sale-attribution-panel select {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    padding: 0 34px 0 11px;
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    font-weight: 700;
}

.sale-attribution-panel select option,
.billing-selector select option {
    background: #211d33;
    color: #f4f1fa;
}

.sale-attribution-panel small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

/* Panneaux de vente */
.cart-column .sale-attribution-panel,
.cart-column .cart-panel {
    position: relative;
    overflow: hidden;
    border-color: rgba(207, 196, 231, 0.17);
    background:
        linear-gradient(145deg, rgba(33, 29, 57, 0.96), rgba(20, 20, 40, 0.96));
    box-shadow: 0 18px 42px rgba(3, 5, 17, 0.3);
}

.cart-column.has-sale-attribution {
    gap: 0;
}

.cart-column.has-sale-attribution .sale-attribution-panel {
    z-index: 1;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 18px 42px rgba(3, 5, 17, 0.3);
}

.cart-column.has-sale-attribution .cart-panel {
    border-top-color: rgba(207, 196, 231, 0.13);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 22px 42px rgba(3, 5, 17, 0.3);
}

.cart-column.has-sale-attribution .cart-panel::before {
    display: none;
}

.cart-column.has-sale-attribution .sale-attribution-panel::after {
    position: absolute;
    right: 18px;
    bottom: 0;
    left: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(207, 196, 231, 0.2), transparent);
    content: "";
}

.cart-column .sale-attribution-panel::before,
.cart-column .cart-panel::before {
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(169, 54, 66, 0.78), rgba(86, 186, 196, 0.52), transparent);
    content: "";
}

.cart-column .sale-attribution-panel {
    gap: 9px;
    padding: 17px 18px 16px;
}

.cart-column .sale-attribution-panel .eyebrow {
    margin-bottom: 1px;
    letter-spacing: 0.09em;
}

.cart-column .sale-attribution-panel label {
    font-size: 13px;
    letter-spacing: 0.01em;
}

.cart-column .sale-attribution-panel select,
.cart-column .billing-selector select {
    min-height: 44px;
    border-color: rgba(207, 196, 231, 0.18);
    border-radius: 9px;
    background-color: rgba(255, 255, 255, 0.055);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.cart-column .sale-attribution-panel select:hover,
.cart-column .billing-selector select:hover {
    border-color: rgba(169, 54, 66, 0.34);
    background-color: rgba(255, 255, 255, 0.075);
}

.cart-column .sale-attribution-panel select:focus,
.cart-column .billing-selector select:focus {
    border-color: rgba(169, 54, 66, 0.65);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(169, 54, 66, 0.12);
}

.cart-column .sale-attribution-panel small {
    padding-left: 1px;
    color: rgba(185, 180, 204, 0.82);
    font-size: 11px;
}

.cart-column .cart-panel {
    padding: 20px 18px 18px;
}

.cart-column .cart-panel .section-heading.compact {
    margin-bottom: 15px;
}

.cart-column .cart-panel .section-heading h2 {
    margin-top: 2px;
    font-size: 23px;
    letter-spacing: -0.025em;
}

.cart-column #clearCart {
    min-height: 38px;
    padding: 0 13px;
    border-color: rgba(207, 196, 231, 0.16);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.055);
    font-size: 12px;
}

.cart-column #clearCart:hover {
    border-color: rgba(248, 113, 113, 0.34);
    background: rgba(248, 113, 113, 0.1);
    color: #ffd6df;
}

.cart-column .cart-items > .empty-state {
    align-self: center;
    margin: 0;
    padding: 30px 16px;
    color: rgba(185, 180, 204, 0.76);
    font-size: 13px;
    text-align: center;
}

.cart-column .billing-selector {
    margin-top: 14px;
    padding-top: 15px;
}

.cart-column .billing-selector label {
    gap: 8px;
    color: rgba(185, 180, 204, 0.9);
    font-size: 11px;
    letter-spacing: 0.025em;
    text-align: left;
}

.cart-column .totals {
    margin: 14px 0 16px;
}

.cart-column .grand-total {
    padding-top: 14px;
}

.cart-column .grand-total dt {
    font-size: 16px;
}

.cart-column .grand-total dd {
    color: #f8f5ff;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.cart-column #checkoutButton {
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: linear-gradient(135deg, #94498d, #713b78);
    box-shadow: 0 10px 24px rgba(113, 59, 120, 0.25);
    font-size: 14px;
}

.cart-column #checkoutButton:hover:not(:disabled) {
    background: linear-gradient(135deg, #a65398, #804486);
    box-shadow: 0 12px 28px rgba(113, 59, 120, 0.34);
    transform: translateY(-1px);
}

.pos-ticket-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 9px;
}

.pos-fiscal-period {
    padding: 7px 11px;
    border: 1px solid rgba(141, 228, 232, 0.2);
    border-radius: 999px;
    background: rgba(72, 196, 205, 0.08);
    color: #8de4e8;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.bonus-cap-status {
    display: block;
    margin-top: 4px;
    color: rgba(185, 180, 204, 0.72);
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
}

.bonus-cap-status.is-capped {
    color: #ffd58b;
    font-weight: 800;
}

.tax-payment-proof {
    display: grid;
    gap: 14px;
    outline: none;
}

.tax-payment-proof-copy h3 {
    margin: 3px 0 6px;
    font-size: 19px;
}

.tax-payment-proof-copy p:last-child {
    margin: 0;
    color: var(--muted);
}

.tax-payment-proof kbd {
    padding: 2px 6px;
    border: 1px solid rgba(207, 196, 231, 0.22);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.07);
    color: #f8f5ff;
    font: inherit;
    font-size: 11px;
}

.tax-payment-proof-dropzone {
    display: grid;
    min-height: 120px;
    place-content: center;
    border: 1px dashed rgba(141, 228, 232, 0.36);
    border-radius: 14px;
    background: rgba(72, 196, 205, 0.06);
    color: #8de4e8;
    cursor: pointer;
    text-align: center;
}

.tax-payment-proof-dropzone:hover,
.tax-payment-proof:focus .tax-payment-proof-dropzone {
    border-color: rgba(141, 228, 232, 0.7);
    background: rgba(72, 196, 205, 0.11);
}

.tax-payment-proof-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.tax-payment-proof-dropzone span {
    font-weight: 900;
}

.tax-payment-proof-dropzone small {
    margin-top: 5px;
    color: var(--muted);
}

.tax-payment-proof-preview {
    display: grid;
    gap: 7px;
}

.tax-payment-proof-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border: 1px solid rgba(207, 196, 231, 0.16);
    border-radius: 12px;
    background: #090d19;
}

.tax-payment-proof-preview span {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.pos-ticket-actions .ghost-button {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 11px;
}

#heldTicketsCount {
    display: inline-grid;
    min-width: 20px;
    min-height: 20px;
    margin-left: 4px;
    place-items: center;
    border-radius: 999px;
    background: rgba(141, 228, 232, 0.16);
    color: #8de4e8;
}

.held-tickets-modal {
    width: min(620px, calc(100% - 28px));
}

.held-tickets-list {
    display: grid;
    gap: 10px;
    max-height: min(55vh, 520px);
    overflow-y: auto;
}

.held-ticket {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(207, 196, 231, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.held-ticket > div:first-child {
    display: grid;
    gap: 5px;
}

.held-ticket span {
    color: rgba(185, 180, 204, 0.82);
    font-size: 12px;
}

/* POS — ticket compact et hiérarchisé */
.cart-column {
    gap: 0;
}

.cart-column .cart-panel {
    overflow: hidden;
    padding: 14px;
    border: 1px solid rgba(207, 196, 231, 0.2);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(31, 28, 53, 0.98), rgba(18, 19, 37, 0.98));
    box-shadow: 0 18px 42px rgba(3, 5, 17, 0.3);
}

.cart-column .cart-panel::before {
    height: 2px;
}

.cart-column .pos-ticket-heading {
    align-items: center;
    margin: 0 0 11px;
}

.cart-column .pos-ticket-heading .eyebrow {
    margin-bottom: 1px;
    font-size: 9px;
}

.cart-column .pos-ticket-heading h2 {
    margin: 0;
    font-size: 19px;
}

.cart-column #clearCart {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 10px;
}

.pos-sale-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0 -14px;
    padding: 10px 14px;
    border-top: 1px solid rgba(207, 196, 231, 0.12);
    border-bottom: 1px solid rgba(207, 196, 231, 0.12);
    background: rgba(255, 255, 255, 0.022);
}

.pos-sale-controls .sale-attribution-panel {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.pos-sale-controls .sale-attribution-panel::before,
.pos-sale-controls .sale-attribution-panel::after,
.pos-sale-controls .sale-attribution-panel .eyebrow,
.pos-sale-controls .sale-attribution-panel small {
    display: none;
}

.pos-sale-controls .sale-attribution-panel label {
    overflow: hidden;
    color: rgba(207, 201, 221, 0.72);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.pos-sale-controls .sale-attribution-panel select,
.cart-column .billing-selector select {
    width: 100%;
    min-height: 34px;
    padding: 0 28px 0 9px;
    border: 1px solid rgba(207, 196, 231, 0.16);
    border-radius: 7px;
    background-color: rgba(255, 255, 255, 0.055);
    color: var(--ink);
    font-size: 11px;
    font-weight: 750;
}

.cart-column .cart-items {
    min-height: 104px;
    max-height: min(38vh, 360px);
    gap: 6px;
    padding: 8px 0;
    border-top: 0;
    overflow-y: auto;
}

.cart-column .cart-items > .empty-state {
    padding: 20px 10px;
    font-size: 11px;
}

.cart-column .cart-row {
    padding: 8px 9px;
}

.cart-column .billing-selector {
    margin: 0;
    padding: 9px 0;
    border-top: 1px solid rgba(207, 196, 231, 0.12);
}

.cart-column .billing-selector label {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: rgba(207, 201, 221, 0.72);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cart-column .totals {
    margin: 0 0 9px;
}

.cart-column .grand-total {
    min-height: 42px;
    padding: 8px 0 6px;
    border-top: 1px solid rgba(207, 196, 231, 0.12);
}

.cart-column .grand-total dt {
    color: rgba(207, 201, 221, 0.78);
    font-size: 12px;
}

.cart-column .grand-total dd {
    font-size: 20px;
}

.pos-ticket-actions {
    gap: 6px;
    margin-bottom: 7px;
}

.pos-ticket-actions .ghost-button {
    min-height: 32px;
    padding: 5px 7px;
    border-radius: 7px;
    font-size: 9px;
}

#heldTicketsCount {
    min-width: 17px;
    min-height: 17px;
    margin-left: 3px;
    font-size: 9px;
}

.cart-column #checkoutButton {
    min-height: 38px;
    border-radius: 8px;
    font-size: 12px;
}

@media (max-width: 1050px) {
    .pos-sale-controls { grid-template-columns: 1fr; }
}

.held-ticket-actions {
    display: flex;
    gap: 7px;
}

@media (max-width: 600px) {
    .pos-ticket-actions { grid-template-columns: 1fr; }
    .held-ticket { align-items: stretch; flex-direction: column; }
    .held-ticket-actions > button { flex: 1; }
}

.vehicle-history-page {
    display: grid;
    gap: 14px;
    width: min(100%, 900px);
    margin: 0 auto;
}

.vehicle-history-page.is-empty {
    width: min(100%, 720px);
    padding-top: 28px;
}

.vehicle-history-page > .section-heading {
    margin-bottom: 2px;
}

.vehicle-history-page > .section-heading h1 {
    font-size: clamp(24px, 3vw, 32px);
}

.vehicle-catalog-modal {
    width: min(920px, calc(100vw - 32px));
    max-width: 920px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    color: var(--ink);
}

.vehicle-catalog-shell {
    display: grid;
    gap: 18px;
    max-height: min(820px, calc(100vh - 48px));
    padding: 22px;
}

.vehicle-catalog-create {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 140px auto;
    gap: 12px;
    align-items: end;
}

.vehicle-catalog-create label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.vehicle-catalog-create input {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    color: var(--ink);
}

.vehicle-catalog-search {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.vehicle-catalog-search input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    color: var(--ink);
}

.vehicle-catalog-table-wrap {
    max-height: 520px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

[data-vehicle-catalog-row] {
    cursor: context-menu;
}

.vehicle-catalog-empty {
    margin: 0;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 680px) {
    .vehicle-catalog-create { grid-template-columns: 1fr; }
}

.vehicle-history-page > .section-heading p:last-child {
    margin: 6px 0 0;
    color: var(--muted);
}

.vehicle-history-search {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.vehicle-history-search label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.vehicle-history-search > div {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 10px;
}

.vehicle-history-search input {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 0 14px;
    background: var(--field);
    color: var(--field-ink);
}

.vehicle-history-summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--muted);
}

.vehicle-history-summary strong {
    color: var(--ink);
    font-size: 24px;
}

.vehicle-history-list {
    display: grid;
    gap: 18px;
}

.vehicle-history-card {
    overflow: hidden;
}

.vehicle-history-card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

.vehicle-history-card-header > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vehicle-history-card-header h2,
.vehicle-history-card-header p {
    margin: 0;
}

.vehicle-history-card-header p {
    margin-top: 5px;
    color: var(--muted);
}

.vehicle-history-plate {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 7px;
    background: #f4f5f8;
    color: #171923;
    font-weight: 900;
    letter-spacing: 1px;
}

.vehicle-history-card-header dl {
    display: flex;
    gap: 24px;
    margin: 0;
}

.vehicle-history-card-header dl div {
    display: grid;
    gap: 4px;
}

.vehicle-history-card-header dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.vehicle-history-card-header dd {
    margin: 0;
    font-weight: 800;
}

.vehicle-history-timeline {
    display: grid;
    padding: 8px 20px 20px;
}

.vehicle-history-merge-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 14px 20px 0;
    padding: 10px 12px;
    border: 1px dashed rgba(211, 97, 158, 0.55);
    border-radius: 9px;
    background: rgba(211, 97, 158, 0.07);
    color: var(--muted);
    font-size: 13px;
}

.vehicle-history-merge-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e88cbb;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.vehicle-history-merge-choice input { accent-color: #d3619e; }

.vehicle-history-unmerge-form {
    display: flex;
    justify-content: flex-end;
}

.vehicle-history-unmerge-form .text-button {
    color: var(--muted);
    font-size: 12px;
}

.vehicle-history-event {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 12px;
    padding-top: 16px;
}

.vehicle-history-event:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 26px;
    bottom: -16px;
    left: 5px;
    width: 2px;
    background: var(--line);
}

.vehicle-history-event-marker {
    z-index: 1;
    width: 12px;
    height: 12px;
    margin-top: 5px;
    border: 3px solid #d3619e;
    border-radius: 50%;
    background: var(--panel);
}

.vehicle-history-event-content {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
}

.vehicle-history-event-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
}

.vehicle-history-event-title div {
    display: grid;
    gap: 3px;
}

.vehicle-history-event-title span,
.vehicle-history-event-title p {
    color: var(--muted);
    font-size: 13px;
}

.vehicle-history-event-title p {
    margin: 0;
    text-align: center;
}

.vehicle-history-event-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.vehicle-history-event-totals > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
}

.vehicle-history-event-totals > div + div {
    border-left: 1px solid var(--line);
}

.vehicle-history-event-totals dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.vehicle-history-event-totals dd {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
}

.vehicle-history-event-totals .is-total {
    background: rgba(86, 186, 196, 0.07);
}

.vehicle-history-event-totals .is-total dd {
    color: #8dd7de;
}

@media (max-width: 600px) {
    .vehicle-history-event-title,
    .vehicle-history-event-totals {
        grid-template-columns: 1fr;
    }

    .vehicle-history-event-title p {
        text-align: left;
    }

    .vehicle-history-event-totals > div + div {
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

.vehicle-history-event-content ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vehicle-history-event-content li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 7px;
    border-top: 1px solid var(--line);
}

.vehicle-history-invoice-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.vehicle-history-empty {
    padding: 16px 20px;
    color: var(--muted);
    text-align: center;
}

.vehicle-history-page.is-empty .vehicle-history-empty {
    border-style: dashed;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: none;
}

.cart-items {
    display: grid;
    align-content: start;
    gap: 9px;
    min-height: 180px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.cart-row {
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
    transition: border-color 0.18s ease, background 0.18s ease;
}

.cart-row:hover {
    border-color: rgba(169, 54, 66, 0.28);
    background: linear-gradient(135deg, rgba(169, 54, 66, 0.08), rgba(255, 255, 255, 0.03));
}

.cart-product-copy {
    min-width: 0;
}

.cart-product-name {
    display: block;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.25;
}

.cart-unit-price {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.cart-offer-toggle {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 1px solid rgba(169, 54, 66, 0.4);
    border-radius: 999px;
    background: rgba(169, 54, 66, 0.1);
    color: #f3b4d2;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.cart-offer-toggle:hover {
    border-color: rgba(244, 164, 202, 0.72);
    background: rgba(169, 54, 66, 0.2);
    color: #fff;
}

.cart-offer-toggle[aria-pressed="true"] {
    border-color: rgba(129, 230, 217, 0.42);
    background: rgba(74, 190, 178, 0.13);
    color: #a9eee4;
}

.cart-row.is-offered {
    border-color: rgba(169, 54, 66, 0.5);
}

.cart-row.is-offered .cart-line-total {
    color: #a9eee4;
}

.logs-offered-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(169, 54, 66, 0.16);
    color: #f3b4d2;
    font-size: 10px;
    letter-spacing: 0.05em;
}

/* Ticket de caisse : lecture rapide et actions compactes. */
.cart-column .cart-items {
    padding-right: 5px;
    scrollbar-color: rgba(207, 196, 231, 0.42) transparent;
    scrollbar-width: thin;
}

.cart-column .cart-items::-webkit-scrollbar {
    width: 5px;
}

.cart-column .cart-items::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(207, 196, 231, 0.42);
}

.cart-column .cart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 68px;
    padding: 10px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
}

.cart-column .cart-product-copy {
    display: grid;
    align-self: stretch;
    align-content: center;
    gap: 7px;
}

.cart-column .cart-product-meta {
    display: grid;
    grid-template-columns: 72px 52px;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.cart-column .cart-product-name {
    min-width: 0;
    font-size: 12px;
    line-height: 1.2;
}

.cart-column .cart-unit-price {
    margin: 0;
    font-size: 9px;
    line-height: 1.15;
    white-space: nowrap;
}

.cart-column .cart-unit-price s {
    opacity: 0.65;
}

.cart-column .cart-offer-toggle {
    width: 52px;
    padding: 3px 7px;
    font-size: 8px;
    letter-spacing: 0.04em;
}

.cart-column .cart-row-side {
    align-self: stretch;
    align-content: space-between;
    gap: 6px;
}

.cart-column .cart-line-total {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.cart-column .quantity-controls {
    border-radius: 7px;
}

.cart-column .quantity-controls button,
.cart-column .cart-quantity {
    height: 27px;
}

.cart-column .quantity-controls button {
    width: 27px;
    font-size: 14px;
}

.cart-column .cart-quantity {
    width: 32px;
    font-size: 11px;
}

.cart-column .cart-row.is-offered {
    border-color: rgba(129, 230, 217, 0.32);
    background: linear-gradient(135deg, rgba(74, 190, 178, 0.1), rgba(255, 255, 255, 0.022));
}

@media (max-width: 420px) {
    .cart-column .cart-product-meta {
        grid-template-columns: minmax(0, 1fr) 52px;
    }
}

.cart-row-side {
    display: grid;
    flex: 0 0 auto;
    gap: 7px;
    justify-items: end;
}

.cart-line-total {
    color: #9de5eb;
    font-size: 14px;
    white-space: nowrap;
}

.quantity-controls {
    overflow: hidden;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background: rgba(7, 8, 20, 0.28);
}

.quantity-controls button {
    width: 29px;
    height: 29px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.075);
    color: var(--ink);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease;
}

.quantity-controls button:hover:not(:disabled) {
    background: rgba(169, 54, 66, 0.24);
    color: #fff;
}

.quantity-controls button:disabled {
    opacity: 0.28;
}

.cart-quantity {
    width: 36px;
    height: 29px;
    margin: 0;
    padding: 0 2px;
    border-top: 0;
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    outline: 0;
    background: rgba(7, 8, 20, 0.38);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}

.cart-quantity::-webkit-inner-spin-button,
.cart-quantity::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

.cart-quantity:focus {
    background: rgba(169, 54, 66, 0.14);
    box-shadow: inset 0 0 0 1px rgba(169, 54, 66, 0.45);
}

.totals {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.billing-selector {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.billing-selector label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.billing-selector select,
.billing-selector input {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    padding: 0 34px 0 11px;
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    font-weight: 700;
}

.billing-selector [hidden] {
    display: none;
}

.totals div {
    justify-content: space-between;
}

.totals dt {
    color: var(--muted);
}

.totals dd {
    margin: 0;
    font-weight: 800;
}

.grand-total {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 20px;
}

.partner-payment-breakdown {
    display: grid;
    gap: 0;
    padding: 4px 14px;
    border: 1px solid rgba(169, 54, 66, 0.32);
    border-radius: 10px;
    background: rgba(169, 54, 66, 0.08);
}

.partner-payment-breakdown[hidden] {
    display: none;
}

.partner-payment-breakdown > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
}

.partner-payment-breakdown dd {
    margin: 0;
    color: var(--theme-partner-price);
    font-size: 17px;
    font-weight: 900;
    white-space: nowrap;
}

.partner-payment-breakdown .partner-onsite-total {
    border-top: 1px solid var(--line);
}

.partner-payment-breakdown .partner-onsite-total dd {
    color: var(--theme-onsite-price);
}

.onsite-payment-confirm-modal {
    width: min(560px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid rgba(169, 54, 66, 0.35);
    border-radius: 18px;
    background: #19182e;
    color: var(--ink);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62);
}

.onsite-payment-confirm-modal::backdrop {
    background: rgba(5, 6, 16, 0.76);
    backdrop-filter: blur(5px);
}

.onsite-payment-confirm-shell {
    display: grid;
    gap: 16px;
    padding: 30px;
    text-align: center;
}

.onsite-payment-confirm-shell h2,
.onsite-payment-confirm-shell p {
    margin: 0;
}

.onsite-payment-confirm-shell > p:not(.eyebrow) {
    color: var(--muted);
    font-size: 16px;
}

.onsite-payment-confirm-shell > p strong {
    color: #ffcf7d;
    white-space: nowrap;
}

.onsite-payment-confirm-shell .product-modal-actions {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
    margin: 8px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    background: transparent;
    backdrop-filter: none;
}

.onsite-payment-confirm-shell .product-modal-actions button {
    width: auto;
    min-height: 46px;
    margin: 0;
    border-radius: 10px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
}

.onsite-payment-confirm-shell #onsitePaymentCancel {
    min-width: 120px;
}

.onsite-payment-confirm-shell #onsitePaymentConfirm {
    min-width: 270px;
}

@media (max-width: 520px) {
    .onsite-payment-confirm-shell {
        padding: 24px 18px;
    }

    .onsite-payment-confirm-shell h2 {
        font-size: 22px;
    }

    .onsite-payment-confirm-shell .product-modal-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .onsite-payment-confirm-shell .product-modal-actions button,
    .onsite-payment-confirm-shell #onsitePaymentCancel,
    .onsite-payment-confirm-shell #onsitePaymentConfirm {
        width: 100%;
        min-width: 0;
    }
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.07);
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.admin-panel,
.employee-card,
.empty-panel {
    padding: 18px;
}

.admin-panel,
.employee-form,
.stock-form,
.drawer-form {
    display: grid;
    gap: 12px;
}

.employee-list {
    display: grid;
    gap: 14px;
}

.employee-card {
    display: grid;
    gap: 14px;
}

.employee-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.employee-card-head h2 {
    margin-top: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-grid label,
.admin-panel label {
    display: grid;
    gap: 6px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.checkbox-line input {
    width: auto;
    min-height: auto;
}

.role-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
}

.role-badge {
    border: 1px solid rgba(86, 186, 196, 0.38);
    color: #8dd7de;
}

.status-badge.is-active {
    background: rgba(75, 160, 110, 0.18);
    color: #bff2d1;
}

.status-badge.is-inactive {
    background: rgba(183, 53, 53, 0.18);
    color: #ffd6d6;
}

.delete-form {
    justify-self: end;
}

.product-admin-grid {
    grid-template-columns: 360px minmax(0, 1fr);
}

.product-editor-card {
    gap: 16px;
}

.product-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.stock-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.stock-form label {
    display: grid;
    gap: 6px;
}

.inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    text-decoration: none;
}

.minimal-admin,
.employee-admin-layout {
    display: grid;
    gap: 18px;
    justify-content: stretch;
    width: 100%;
}

.minimal-admin + .minimal-admin {
    margin-top: 72px;
}

.employee-admin-layout {
    max-width: min(1440px, calc(100vw - 48px));
    margin: 0 auto;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr);
    align-items: start;
}

.minimal-create,
.minimal-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(18px);
}

.minimal-row {
    width: fit-content;
    min-width: 520px;
    max-width: min(920px, calc(100vw - 48px));
}

.minimal-create summary,
.minimal-row summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 28px;
    gap: 18px;
    align-items: center;
    min-height: 64px;
    padding: 0 18px;
    cursor: pointer;
    list-style: none;
}

.minimal-row summary {
    grid-template-columns: auto 28px;
}

.employee-directory {
    gap: 10px;
}

.employee-grid {
    display: grid;
    grid-template-columns: minmax(170px, 1.2fr) minmax(130px, 0.8fr) minmax(110px, 0.7fr) minmax(100px, 0.7fr) 28px;
    column-gap: 28px;
    align-items: center;
}

.minimal-header {
    width: 100%;
    max-width: min(920px, calc(100vw - 48px));
    padding: 0 18px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.employee-directory .minimal-row {
    width: 100%;
    min-width: 0;
}

.employee-directory .minimal-row summary {
    grid-template-columns: minmax(170px, 1.2fr) minmax(130px, 0.8fr) minmax(110px, 0.7fr) minmax(100px, 0.7fr) 28px;
}

.role-management-panel,
.employee-management-panel {
    width: 100%;
    max-width: none;
    margin: 0;
}

.employee-management-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(18px);
}

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

.grade-form {
    display: grid;
    gap: 12px;
}

.grade-grid {
    display: grid;
    grid-template-columns: minmax(160px, 0.8fr) 120px minmax(260px, 1.4fr) auto;
    gap: 24px;
    align-items: center;
}

.grade-row {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--ink);
}

.role-card {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(112px, 0.55fr);
    gap: 12px;
    align-items: stretch;
}

.role-access,
.role-actions {
    grid-column: 1 / -1;
}

.role-card-section {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(13, 11, 20, 0.24);
}

.role-actions {
    justify-items: start;
}

.field-caption {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.compact-number {
    display: grid;
    grid-template-columns: minmax(72px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.compact-number span {
    color: var(--muted);
    font-weight: 900;
}

.permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.permission-list label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
}

.permission-list.expanded {
    padding: 10px 0;
}

.role-create {
    margin-top: 2px;
}

.role-create .drawer-form {
    padding: 0 18px 18px;
}

.employee-groups-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
}

.employee-group-panel {
    width: 100%;
    max-width: none;
    margin: 0;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.employee-grid strong {
    display: block;
}

.minimal-create summary::-webkit-details-marker,
.minimal-row summary::-webkit-details-marker {
    display: none;
}

.minimal-create summary::after,
.minimal-row summary::after {
    content: "+";
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
}

.minimal-create[open] summary::after,
.minimal-row[open] summary::after {
    content: "-";
}

.minimal-create summary {
    font-weight: 800;
}

.summary-meta,
.row-meta {
    color: var(--muted);
    font-size: 13px;
}

.row-main,
.row-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.row-main strong {
    min-width: 160px;
}

.employee-directory .row-main strong {
    min-width: 0;
}

.row-main span,
.row-meta span {
    white-space: nowrap;
}

.minimal-list {
    display: grid;
    gap: 8px;
    justify-content: stretch;
    width: 100%;
}

.directory-panel {
    display: grid;
    gap: 12px;
    width: fit-content;
    max-width: min(980px, calc(100vw - 48px));
    margin: 0 auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(18px);
}

.directory-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
}

.directory-title h2 {
    font-size: 18px;
}

.directory-title span,
.directory-empty {
    color: var(--muted);
    font-size: 13px;
}

.directory-empty {
    margin: 0;
    padding: 12px 18px;
}

.catalog-empty {
    padding: 18px;
    color: var(--muted);
}

.minimal-details {
    display: grid;
    gap: 14px;
    padding: 0 18px 18px;
    width: min(720px, calc(100vw - 48px));
}

.minimal-details::before {
    content: "";
    height: 1px;
    background: var(--line);
}

.drawer-form {
    padding-top: 4px;
}

.drawer-form .primary-button,
.product-actions .ghost-button,
.delete-form .danger-button {
    justify-self: start;
}

.hr-action-row {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.hr-action-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.hr-action-form input {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
}

.floating-actions {
    position: fixed;
    display: grid;
    justify-items: end;
    gap: 10px;
    right: 24px;
    bottom: 24px;
    z-index: 30;
}

.floating-actions-custom {
    right: auto;
    left: 24px;
    justify-items: start;
}

.floating-actions-custom .floating-create .drawer-form {
    right: auto;
    left: 0;
}

.floating-actions-pos {
    right: 24px;
    left: auto;
}

.floating-create {
    position: relative;
}

.floating-create summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(169, 54, 66, 0.36);
    border-radius: 999px;
    background: linear-gradient(135deg, #8a467f, var(--primary));
    color: #fff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
    cursor: pointer;
    list-style: none;
}

.floating-create summary::-webkit-details-marker {
    display: none;
}

.floating-create summary::after {
    content: none;
}

.floating-create .fab-label {
    font-weight: 800;
}

.floating-create .fab-plus {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    font-size: 20px;
    line-height: 1;
}

.floating-create[open] .fab-plus {
    transform: rotate(45deg);
}

.floating-create .drawer-form {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(420px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(25, 22, 35, 0.96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.floating-create textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    font: inherit;
}

.stat-card {
    display: grid;
    gap: 8px;
    padding: 20px;
}

.stat-card span {
    color: var(--muted);
}

.stat-card strong {
    font-size: 28px;
}

.reports-page {
    width: min(100%, 1380px);
    margin: 0 auto;
}

.reports-heading {
    align-items: end;
}

.reports-period-form {
    display: flex;
    align-items: end;
    gap: 10px;
}

.reports-period-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 800;
}

.reports-period-form input {
    width: 92px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 10px;
    background: var(--field);
    color: var(--field-ink);
}

.reports-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.report-kpi,
.report-panel {
    overflow: hidden;
}

.report-kpi {
    display: grid;
    gap: 8px;
    padding: 18px;
}

.report-kpi span,
.report-kpi small,
.report-panel-head span,
.report-metrics span,
.reports-product-grid span,
.reports-product-grid small {
    color: var(--muted);
}

.report-kpi strong {
    font-size: 28px;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.report-panel {
    overflow: hidden;
    margin-bottom: 14px;
}

.report-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--theme-border);
}

.report-panel-head h2 {
    margin: 0;
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--theme-border);
}

.report-metrics div {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    background: var(--theme-surface-raised);
}

.report-metrics strong {
    font-size: 20px;
}

.reports-table-wrap {
    overflow: hidden;
}

.reports-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.reports-table th {
    height: 42px;
    padding: 0 10px;
    border-bottom: 1px solid var(--theme-border);
    font-size: 11px;
    text-align: left;
    text-transform: uppercase;
}

.reports-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--theme-border);
    overflow-wrap: anywhere;
}

.reports-table th:nth-child(n+4),
.reports-table td:nth-child(n+4) {
    text-align: right;
}

.reports-table .is-positive {
    color: #7be0b1;
    font-weight: 800;
}

.reports-top-wrap .reports-table th:nth-child(n),
.reports-top-wrap .reports-table td:nth-child(n) {
    text-align: left;
}

.reports-top-wrap .reports-table th:nth-child(n+3),
.reports-top-wrap .reports-table td:nth-child(n+3) {
    text-align: right;
}

.reports-rank {
    width: 72px;
    font-weight: 800;
}

.reports-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.reports-product-grid article {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.reports-product-grid div {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
}

.reports-product-grid b { color: var(--theme-accent); }

.reports-product-grid .reports-product-rank {
    margin-right: 5px;
}

.reports-product-grid .reports-product-trend {
    font-weight: 800;
}

.reports-product-grid .reports-product-trend.is-up {
    color: #7be0b1;
}

.reports-product-grid .reports-product-trend.is-down {
    color: #ff8f9c;
}

.reports-hourly-panel .report-panel-head > div {
    display: grid;
    gap: 4px;
}

.reports-peak-hour {
    color: var(--theme-accent);
    text-align: right;
}

.reports-hourly-chart {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--theme-border);
}

.reports-hour-row {
    display: grid;
    grid-template-columns: 72px minmax(80px, 1fr) 76px 100px;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    background: var(--theme-surface-raised);
}

.reports-hour-row.is-peak {
    box-shadow: inset 3px 0 0 var(--theme-accent);
}

.reports-hour-row b,
.reports-hour-row small {
    text-align: right;
}

.reports-hour-row small {
    color: var(--muted);
}

.reports-hour-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--theme-surface);
}

.reports-hour-bar span {
    display: block;
    min-height: 100%;
    border-radius: inherit;
    background: var(--theme-accent);
}

@media (max-width: 1000px) {
    .reports-heading,
    .reports-period-form {
        align-items: stretch;
    }

    .reports-period-form {
        flex-wrap: wrap;
    }

    .reports-period-form label,
    .reports-period-form button {
        flex: 1;
    }

    .reports-period-form input {
        width: 100%;
    }

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

@media (max-width: 640px) {
    .reports-kpi-grid,
    .reports-grid,
    .report-metrics,
    .reports-product-grid {
        grid-template-columns: 1fr;
    }

    .reports-table-wrap {
        overflow: auto;
    }

    .reports-table {
        min-width: 760px;
    }

    .reports-hourly-chart {
        grid-template-columns: 1fr;
    }

    .reports-hourly-panel .report-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .reports-peak-hour {
        text-align: left;
    }

    .reports-hour-row {
        grid-template-columns: 64px minmax(50px, 1fr) 70px 88px;
        gap: 8px;
        padding-inline: 10px;
    }
}

/* Reports dashboard redesign */
.reports-page {
    --reports-card: color-mix(in srgb, var(--theme-surface-raised) 94%, transparent);
    --reports-soft: color-mix(in srgb, var(--theme-accent) 8%, transparent);
    display: grid;
    gap: 0;
}

.reports-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 28px;
    margin: 28px 0 22px;
}

.reports-hero-copy h1 {
    margin: 3px 0 7px;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -.035em;
}

.reports-hero-copy > p:last-child {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
}

.reports-period-form {
    display: grid;
    grid-template-columns: auto 84px 76px auto;
    align-items: end;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--reports-card);
}

.reports-period-title {
    display: grid;
    gap: 2px;
    min-width: 145px;
    padding: 0 8px 2px 2px;
}

.reports-period-title span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.reports-period-form label {
    gap: 4px;
    font-size: 11px;
}

.reports-period-form input {
    width: 100%;
    min-height: 38px;
    border-radius: 9px;
}

.reports-kpi-grid {
    gap: 14px;
    margin-bottom: 38px;
}

.report-kpi,
.report-panel {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--reports-card);
}

.report-kpi {
    position: relative;
    min-height: 132px;
    align-content: space-between;
    padding: 19px;
}

.report-kpi::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--theme-accent);
    opacity: .72;
}

.report-kpi-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.report-kpi strong {
    font-size: clamp(25px, 2.4vw, 34px);
    letter-spacing: -.025em;
}

.reports-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 14px;
}

.reports-section-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reports-section-heading > div > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 35%, var(--line));
    border-radius: 10px;
    color: var(--theme-accent);
    background: var(--reports-soft);
    font-size: 11px;
    font-weight: 900;
}

.reports-section-heading h2,
.reports-section-heading p {
    margin: 0;
}

.reports-section-heading h2 {
    font-size: 20px;
}

.reports-section-heading p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.reports-grid {
    gap: 14px;
    margin-bottom: 36px;
}

.report-panel {
    margin-bottom: 36px;
}

.reports-grid .report-panel {
    margin-bottom: 0;
}

.report-panel-head {
    min-height: 72px;
    padding: 15px 18px;
}

.report-panel-head h3,
.report-panel-head p {
    margin: 0;
}

.report-panel-head h3 {
    margin-top: 2px;
    font-size: 18px;
}

.report-panel-kicker {
    color: var(--theme-accent);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.report-metrics div {
    min-height: 76px;
    justify-content: center;
    padding: 13px 18px;
}

.reports-hourly-panel .report-panel-head > div {
    gap: 2px;
}

.reports-peak-hour {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0 8px;
    padding: 9px 12px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 30%, var(--line));
    border-radius: 11px;
    background: var(--reports-soft);
    text-align: right;
}

.reports-peak-hour > span {
    grid-column: 1 / -1;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.reports-peak-hour small {
    color: var(--muted);
    font-weight: 700;
}

.reports-hourly-chart {
    gap: 0;
    background: transparent;
}

.reports-hour-row {
    min-height: 43px;
    border-bottom: 1px solid var(--theme-border);
    background: transparent;
}

.reports-hour-row:nth-last-child(-n+2) {
    border-bottom: 0;
}

.reports-hour-row:nth-child(odd) {
    border-right: 1px solid var(--theme-border);
}

.reports-hour-row.is-peak {
    background: var(--reports-soft);
}

.reports-hour-bar {
    background: color-mix(in srgb, var(--theme-text) 7%, transparent);
}

.reports-team-panel {
    margin-bottom: 14px;
}

.reports-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
}

.reports-podium-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 124px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--theme-surface) 55%, transparent);
}

.reports-podium-card.rank-1 {
    border-color: color-mix(in srgb, #e7bd55 45%, var(--line));
    background: color-mix(in srgb, #e7bd55 6%, var(--theme-surface-raised));
}

.reports-podium-rank {
    display: grid;
    justify-items: center;
    gap: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.reports-podium-rank span {
    font-size: 23px;
}

.reports-podium-name {
    display: grid;
    gap: 4px;
}

.reports-podium-name strong {
    font-size: 16px;
}

.reports-podium-name span,
.reports-podium-card dt {
    color: var(--muted);
    font-size: 11px;
}

.reports-podium-card > b {
    color: var(--theme-accent);
    font-size: 24px;
}

.reports-podium-card > b small {
    font-size: 11px;
}

.reports-podium-card dl {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.reports-podium-card dl div {
    display: grid;
    gap: 2px;
}

.reports-podium-card dd {
    margin: 0;
    font-weight: 800;
}

.reports-products-panel {
    margin-bottom: 0;
}

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

.reports-product-grid article {
    grid-template-columns: 38px minmax(130px, 1fr) 70px 90px 120px;
    align-items: center;
    gap: 13px;
    min-height: 78px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--theme-border);
}

.reports-product-grid article:nth-child(odd) {
    border-right: 1px solid var(--theme-border);
}

.reports-product-grid article:nth-last-child(-n+2) {
    border-bottom: 0;
}

.reports-product-grid .reports-product-rank {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    margin: 0;
    border-radius: 9px;
    background: var(--reports-soft);
}

.reports-product-main {
    display: grid !important;
    gap: 8px !important;
}

.reports-product-bar {
    display: block !important;
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-text) 7%, transparent);
}

.reports-product-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--theme-accent);
}

.reports-product-volume,
.reports-product-money {
    display: grid !important;
    justify-content: stretch !important;
    gap: 1px !important;
    text-align: right;
}

.reports-product-volume strong {
    font-size: 18px;
}

.reports-product-trend {
    text-align: right;
}

.reports-product-trend span {
    color: var(--muted);
    font-weight: 500;
}

@media (max-width: 1120px) {
    .reports-hero {
        grid-template-columns: 1fr;
    }

    .reports-period-form {
        grid-template-columns: minmax(140px, 1fr) 100px 100px auto;
    }

    .reports-podium {
        grid-template-columns: 1fr;
    }

    .reports-product-grid {
        grid-template-columns: 1fr;
    }

    .reports-product-grid article:nth-child(odd) {
        border-right: 0;
    }

    .reports-product-grid article:nth-last-child(2) {
        border-bottom: 1px solid var(--theme-border);
    }
}

@media (max-width: 720px) {
    .reports-hero {
        margin-top: 20px;
    }

    .reports-period-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reports-period-title,
    .reports-period-form button {
        grid-column: 1 / -1;
    }

    .reports-section-heading p {
        display: none;
    }

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

    .reports-kpi-grid,
    .reports-grid,
    .report-panel {
        margin-bottom: 28px;
    }

    .reports-hourly-chart {
        grid-template-columns: 1fr;
    }

    .reports-hour-row:nth-child(odd) {
        border-right: 0;
    }

    .reports-hour-row:nth-last-child(2) {
        border-bottom: 1px solid var(--theme-border);
    }

    .reports-product-grid article {
        grid-template-columns: 34px minmax(100px, 1fr) 62px;
    }

    .reports-product-trend,
    .reports-product-money {
        grid-column: 2 / -1;
        text-align: left;
    }

    .reports-product-money {
        display: flex !important;
        justify-content: flex-start !important;
    }
}

.accounting-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
}

.accounting-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 14px;
}

.sales-accounting-panel {
    margin-top: 14px;
}

.accounting-table-wrap {
    overflow: auto;
}

.accounting-table {
    min-width: 1180px;
}

.sales-table {
    min-width: 980px;
}

.hr-history-table {
    min-width: 1040px;
}

.accounting-table th {
    border: 0;
    background: linear-gradient(135deg, var(--primary), #3a2d63);
    color: #fff;
    text-align: center;
}

.accounting-table th:first-child {
    border-radius: 999px 0 0 999px;
}

.accounting-table th:last-child {
    border-radius: 0 999px 999px 0;
}

.accounting-table th small {
    display: block;
    font-size: 10px;
    line-height: 1;
}

.accounting-table td {
    background: rgba(255, 255, 255, 0.035);
}

.accounting-table td:nth-child(n+5) {
    text-align: right;
    font-weight: 700;
}

.table-input {
    width: 100%;
    min-width: 90px;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    font-weight: 700;
}

.money-input,
.percent-input {
    text-align: right;
}

.accounting-save-button {
    justify-self: end;
}

.accounting-table .salary-cell {
    background: rgba(75, 160, 110, 0.16);
    color: #7be0b1;
}

.accounting-table .margin-cell {
    background: rgba(86, 186, 196, 0.10);
    color: #8dd7de;
    font-weight: 800;
}

.accounting-table .total-cell {
    background: rgba(86, 186, 196, 0.10);
    color: #8dd7de;
}

.masked-info {
    display: inline-block;
    min-width: 64px;
    filter: blur(5px);
    opacity: 0.58;
    user-select: none;
}

.accounting-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1.6fr auto;
    gap: 12px;
    align-items: end;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.accounting-summary label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

.accounting-summary input {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    font-weight: 800;
}

.accounting-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 14px;
    background: rgba(86, 186, 196, 0.10);
    color: #8dd7de;
    font-weight: 800;
}

.sale-item {
    display: block;
    color: var(--muted);
    line-height: 1.5;
}

.hr-history-panel {
    max-width: 1240px;
    margin: 0 auto;
}

.hr-history-page {
    width: min(100%, 1240px);
    margin: 0 auto;
}

.hr-history-page > .section-heading {
    margin-bottom: 14px;
}

.hr-history-page .hr-history-panel {
    gap: 0;
    overflow: hidden;
    max-width: none;
    padding: 0;
}

.hr-history-page .hr-history-panel > .directory-title {
    padding: 14px 16px;
    border-bottom: 1px solid var(--theme-border);
}

.hr-history-page .accounting-table-wrap {
    padding: 0;
}

.hr-history-page .hr-history-table {
    width: 100%;
    min-width: 960px;
    border-collapse: separate;
    border-spacing: 0;
}

.hr-history-page .hr-history-table th {
    height: 44px;
    padding: 0 12px;
    border-right: 1px solid var(--theme-border);
    border-bottom: 1px solid var(--theme-border);
    border-radius: 0;
    font-size: 12px;
    letter-spacing: 0.025em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.hr-history-page .hr-history-table th:last-child {
    border-right: 0;
    border-radius: 0;
}

.hr-history-page .hr-history-table td {
    height: 46px;
    padding: 9px 12px;
    border-right: 1px solid var(--theme-border);
    font-weight: 400;
    text-align: left;
    vertical-align: middle;
}

.hr-history-page .hr-history-table td:last-child {
    border-right: 0;
}

.hr-history-page .hr-history-actions {
    width: 180px;
    white-space: nowrap;
}

.hr-history-page .hr-history-action-buttons {
    display: flex;
    align-items: center;
    gap: 7px;
}

.hr-history-page .hr-history-action-buttons form {
    margin: 0;
}

.hr-history-page .hr-history-action-buttons .compact-action {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
}

.hr-history-page .hr-history-modal-row > td {
    height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.hr-history-page .hr-history-modal-row:hover > td {
    background: transparent;
}

.hr-history-page .empty-state {
    margin: 0;
    padding: 20px 16px;
}

.bilan-page {
    width: min(100%, 1480px);
    margin: 0 auto;
}

.bilan-simple-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin: 30px 0 16px;
}

.bilan-simple-intro h2 { margin: 3px 0 6px; font-size: clamp(24px, 3vw, 34px); }
.bilan-simple-intro p:last-child { margin: 0; color: var(--muted); max-width: 680px; }
.bilan-period-chip { padding: 9px 13px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 800; white-space: nowrap; }

.bilan-equation {
    display: grid;
    grid-template-columns: repeat(7, auto);
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 14px 0;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
}
.bilan-equation div { display: grid; gap: 3px; }
.bilan-equation span { color: var(--muted); font-size: 12px; font-weight: 700; }
.bilan-equation strong { font-size: 16px; }
.bilan-equation b { color: var(--muted); font-size: 20px; }
.bilan-equation .is-result { padding: 9px 13px; border-radius: 10px; background: rgba(52, 211, 153, 0.1); }

.bilan-details { margin-top: 22px; }
.bilan-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    cursor: pointer;
    list-style: none;
}
.bilan-details > summary::-webkit-details-marker { display: none; }
.bilan-details > summary span:first-child { display: grid; gap: 4px; }
.bilan-details > summary small { color: var(--muted); font-weight: 500; }
.bilan-details-action { color: var(--primary); font-size: 13px; font-weight: 900; }
.bilan-details[open] .bilan-details-action::before { content: "Masquer"; }
.bilan-details[open] .bilan-details-action { font-size: 0; }
.bilan-details[open] .bilan-details-action::before { font-size: 13px; }
.bilan-details[open] > summary { margin-bottom: 16px; }

@media (max-width: 700px) {
    .bilan-simple-intro { align-items: flex-start; flex-direction: column; gap: 12px; }
    .bilan-equation { grid-template-columns: 1fr auto; justify-content: stretch; gap: 9px 14px; }
    .bilan-equation b { text-align: right; }
    .bilan-equation .is-result { margin-top: 3px; }
    .bilan-details > summary { align-items: flex-start; }
    .bilan-details > summary small { display: none; }
}

.declaration-v2-bilan-review {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 16px;
    padding: 18px 22px;
    border: 1px solid rgba(141, 228, 232, 0.3);
    border-radius: 16px;
    background: rgba(72, 196, 205, 0.09);
}

.declaration-v2-bilan-review h2,
.declaration-v2-bilan-review p {
    margin: 4px 0;
}

.declaration-v2-bilan-checklist {
    display: grid;
    gap: 12px;
}

.declaration-v2-bilan-checklist label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
}

@media (max-width: 700px) {
    .declaration-v2-bilan-review {
        align-items: stretch;
        flex-direction: column;
    }
}

/* La gestion des tickets reste compacte, y compris sur mobile. */
.cart-column .pos-ticket-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.held-tickets-modal .modal-form {
    gap: 12px;
    padding: 18px;
}

.held-tickets-modal .modal-head h2 {
    margin-bottom: 3px;
    font-size: 20px;
}

.held-tickets-modal .modal-head p:last-child {
    margin: 0;
    font-size: 11px;
}

.held-tickets-list {
    gap: 7px;
}

.held-ticket {
    gap: 10px;
    padding: 10px;
    border-radius: 9px;
}

.held-ticket > div:first-child {
    gap: 2px;
}

.held-ticket span {
    font-size: 10px;
}

.held-ticket-actions {
    gap: 5px;
}

.held-ticket-actions button {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 10px;
}

.product-card.is-partner-product-blocked {
    opacity: .38;
    filter: grayscale(.85);
    cursor: not-allowed;
    outline: 2px solid rgba(220, 38, 38, .45);
}

.product-card.is-partner-product-available {
    border-color: #22c55e;
    outline: 2px solid rgba(34, 197, 94, .9);
    outline-offset: 1px;
    background: linear-gradient(160deg, rgba(34, 197, 94, .1), rgba(255, 255, 255, .025));
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .08), 0 10px 24px rgba(0, 0, 0, .18);
}

.product-card.is-partner-product-available:hover {
    outline-color: #4ade80;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .12), 0 14px 30px rgba(0, 0, 0, .24);
}

#checkoutButton,
#checkoutButton:hover,
#checkoutButton:focus,
#checkoutButton:active,
#checkoutButton:disabled {
    color: #fff !important;
}

.partner-products-warning-modal .modal-form { width: min(520px, calc(100vw - 32px)); }
.partner-products-warning-list {
    display: grid;
    gap: 8px;
    max-height: 280px;
    margin: 0;
    padding: 0;
    overflow: auto;
    list-style: none;
}
.partner-products-warning-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 13px;
    border: 1px solid rgba(244, 63, 94, .28);
    border-radius: 10px;
    background: rgba(244, 63, 94, .08);
}
.partner-products-warning-list span { color: var(--muted); white-space: nowrap; }

.cart-row.is-partner-product-invalid {
    border: 2px solid #dc2626;
    background: rgba(220, 38, 38, .12);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
}

.partner-product-config-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px;
    border: 1px solid var(--border-color, #334155);
    border-radius: 16px;
    background: var(--panel-bg, #111827);
}

.partner-product-config-bar h1 { margin: 4px 0; }
.partner-product-config-bar form { display: flex; align-items: center; gap: 10px; }
.is-partner-product-configuration .cart-column { display: none; }
.is-partner-product-configuration > .workspace { grid-column: 1 / -1; }
.is-partner-product-configuration .product-card { position: relative; opacity: .55; outline: 2px solid transparent; }
.is-partner-product-configuration .product-card.is-partner-product-selected {
    opacity: 1;
    outline-color: #22c55e;
    background: rgba(34, 197, 94, .12);
}

.partnership-service-number {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 3;
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .3);
}

@media (max-width: 800px) {
    .partner-product-config-bar { align-items: stretch; flex-direction: column; }
    .partner-product-config-bar form { flex-wrap: wrap; }
}

.partner-invoice-table tr[data-invoice-context-row] { cursor: context-menu; }
.partner-invoice-table tr[data-invoice-context-row]:hover { background: rgba(99, 102, 241, .08); }
.invoice-context-menu {
    position: fixed;
    z-index: 10000;
    width: 180px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, .3);
    border-radius: 10px;
    background: #171827;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .45);
}
.invoice-context-menu[hidden] { display: none; }
.invoice-context-menu button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #f8fafc;
    text-align: left;
    cursor: pointer;
}
.invoice-context-menu button:hover { background: rgba(99, 102, 241, .18); }
.invoice-context-menu button.is-danger { color: #fda4af; }
.invoice-context-menu button.is-danger:hover { background: rgba(225, 29, 72, .16); }

.partners-page .partner-card[data-partner-context-card] { cursor: context-menu; }
.partner-context-menu {
    position: fixed;
    z-index: 10000;
    width: 210px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, .3);
    border-radius: 10px;
    background: #171827;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .45);
}
.partner-context-menu[hidden] { display: none; }
.partner-context-menu button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #f8fafc;
    text-align: left;
    cursor: pointer;
}
.partner-context-menu button:hover { background: rgba(169, 54, 66, .16); }
.partner-context-menu button.is-danger { color: #fda4af; }
.partner-context-menu button.is-danger:hover:not(:disabled) { background: rgba(225, 29, 72, .16); }
.partner-context-menu button:disabled { cursor: not-allowed; opacity: .45; }

.partner-card.is-inactive {
    position: relative;
    overflow: hidden;
}

.partner-inactive-ribbon {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 8;
    width: 155%;
    padding: 10px 20px;
    transform: translate(-50%, -50%) rotate(-38deg);
    border-top: 2px solid rgba(255, 255, 255, .35);
    border-bottom: 2px solid rgba(255, 255, 255, .35);
    background: rgba(190, 24, 93, .9);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .18em;
    text-align: center;
    text-transform: uppercase;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

/* Partenaires — cartes plus aérées et hiérarchie plus nette */
.partners-page .partner-grid {
    gap: 20px;
    align-items: stretch;
}

.partners-page .partner-card {
    position: relative;
    gap: 18px;
    padding: 22px;
    border-color: rgba(148, 163, 184, .22) !important;
    border-top: 3px solid rgba(169, 54, 66, .78);
    border-radius: 16px !important;
    background:
        radial-gradient(circle at 100% 0, rgba(169, 54, 66, .08), transparent 34%),
        linear-gradient(160deg, rgba(31, 31, 52, .98), rgba(22, 24, 42, .98)) !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .2) !important;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.partners-page .partner-card:not(.is-inactive):hover {
    transform: translateY(-2px);
    border-color: rgba(169, 54, 66, .42);
    border-top-color: #a93642;
    box-shadow: 0 20px 44px rgba(0, 0, 0, .28);
}

.partners-page .partner-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 0 0 16px;
    border-bottom: 1px solid rgba(148, 163, 184, .18);
    background: none !important;
}

.partners-page .partner-card-head > div:first-child { min-width: 0; }
.partners-page .partner-card-head h2 {
    overflow: hidden;
    margin: 2px 0 0;
    color: #fff;
    font-size: clamp(19px, 1.5vw, 23px);
    line-height: 1.15;
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partners-page .partner-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.partners-page .partner-card-actions .compact-action {
    min-height: 34px;
    padding: 7px 10px;
    border-color: rgba(148, 163, 184, .24);
    border-radius: 9px;
    background: rgba(255, 255, 255, .035);
    font-size: 12px;
    white-space: nowrap;
}

.partners-page .partner-card-actions .compact-action:first-child {
    color: #f3a6ca;
}

.partners-page .partner-channel {
    padding: 9px 11px;
    border-color: rgba(148, 163, 184, .16);
    background: rgba(9, 12, 25, .3);
}

.partners-page .partner-channel span {
    color: #9ca3b8;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.partners-page .partner-channel code {
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .045);
    color: #dce5ff;
    font-size: 11px;
}

.partners-page .partner-week-summary {
    gap: 13px;
    padding-top: 0;
    border-top: 0;
}

.partners-page .partner-sales-count {
    padding: 0 2px;
}

.partners-page .partner-sales-count span {
    color: #929ab1;
    font-size: 10px;
    letter-spacing: .09em;
}

.partners-page .partner-sales-count strong {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(169, 54, 66, .1);
    color: #f4b1d0;
    font-size: 12px;
}

.partners-page .partner-price-breakdown {
    border-color: rgba(148, 163, 184, .17);
    border-radius: 13px;
    background: rgba(10, 14, 28, .25);
}

.partners-page .partner-price-breakdown > div {
    min-height: 46px;
    padding: 11px 13px;
}

.partners-page .partner-discount-row { background: rgba(74, 222, 128, .035); }
.partners-page .partner-net-row { background: linear-gradient(90deg, rgba(86, 186, 196, .06), rgba(169, 54, 66, .06)); }
.partners-page .partner-net-row dd { color: #9fe5eb; font-size: 22px; }

.partners-page .partner-card > form { margin-top: auto; }
.partners-page .partner-card > form .primary-button {
    min-height: 44px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(100deg, #d95d9a, #e373ad);
    color: #190d16;
    font-weight: 850;
    box-shadow: 0 8px 20px rgba(217, 93, 154, .18);
}

.partners-page .partner-card > form .primary-button:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.partners-page .partner-card > form .primary-button:disabled {
    background: rgba(132, 65, 105, .52);
    color: rgba(15, 10, 17, .72);
    box-shadow: none;
}

@media (max-width: 1450px) and (min-width: 1181px) {
    .partners-page .partner-card-head { grid-template-columns: 1fr; }
    .partners-page .partner-card-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
    .partners-page .partner-card { padding: 17px; }
    .partners-page .partner-card-head { grid-template-columns: 1fr; }
    .partners-page .partner-card-actions { justify-content: stretch; }
    .partners-page .partner-card-actions .compact-action { flex: 1; text-align: center; }
}

.bilan-heading {
    align-items: end;
}

.bilan-fiscal-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
        "title brand period"
        "opening opening configure";
    align-items: center;
    gap: 16px 20px;
    margin-bottom: 14px;
    padding: 22px 26px;
    border: 1px solid rgba(169, 54, 66, 0.22);
    border-radius: 20px;
    background:
        radial-gradient(circle at 0 0, rgba(169, 54, 66, 0.15), transparent 34%),
        linear-gradient(120deg, rgba(35, 30, 55, 0.98), rgba(25, 31, 52, 0.98));
    box-shadow: 0 24px 60px rgba(5, 4, 18, 0.28);
}

.bilan-fiscal-header h1 {
    grid-area: brand;
    margin: 0;
    font-size: clamp(20px, 2vw, 28px);
    white-space: nowrap;
}

.bilan-fiscal-header h1 span {
    margin: 0 7px;
    color: var(--accent);
}

.bilan-fiscal-left {
    grid-area: title;
    text-align: left !important;
}

.bilan-fiscal-right {
    grid-area: period;
    text-align: right !important;
}

.bilan-period-selector {
    display: flex;
    grid-area: period;
    align-items: end;
    justify-content: flex-end;
    gap: 8px;
}

.bilan-period-selector label {
    display: grid;
    gap: 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.bilan-period-selector select,
.bilan-period-selector input {
    width: 78px;
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid rgba(207, 196, 231, 0.2);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.06);
    color: #f8f5ff;
    font: inherit;
    font-size: 12px;
}

.bilan-period-selector input {
    width: 84px;
}

.bilan-period-selector option {
    color: #171421;
}

.bilan-period-selector > strong {
    align-self: center;
    margin-top: 12px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.bilan-fiscal-opening {
    display: flex;
    grid-area: opening;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(207, 196, 231, 0.12);
}

.bilan-fiscal-opening:last-child {
    grid-column: 1 / -1;
}

.bilan-fiscal-opening-label {
    color: #f178b2;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bilan-fiscal-opening-copy {
    display: flex;
    align-items: baseline;
    gap: 7px;
    color: #f8f5ff;
    font-size: 13px;
    font-weight: 800;
}

.bilan-fiscal-opening-copy small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.bilan-fiscal-status {
    padding: 5px 9px;
    border: 1px solid rgba(207, 196, 231, 0.14);
    border-radius: 999px;
    font-size: 11px;
    white-space: nowrap;
}

.bilan-fiscal-status.is-exempt {
    border-color: rgba(141, 228, 232, 0.28);
    background: rgba(72, 196, 205, 0.11);
    color: #8de4e8;
}

.bilan-fiscal-status.is-normal {
    border-color: rgba(126, 213, 159, 0.24);
    background: rgba(126, 213, 159, 0.1);
    color: #9ce3b7;
}

.bilan-fiscal-status.is-warning {
    border-color: rgba(250, 194, 92, 0.26);
    background: rgba(250, 194, 92, 0.1);
    color: #ffd58b;
}

.bilan-fiscal-configure {
    grid-area: configure;
    justify-self: end;
    min-width: 112px;
    margin-top: 14px;
}

.bilan-fiscal-left,
.bilan-fiscal-right {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.bilan-heading > div > p:last-child {
    margin: 7px 0 0;
    color: var(--muted);
}

.bilan-date {
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.bilan-placeholder {
    display: flex;
    min-height: 240px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 1px dashed rgba(169, 54, 66, 0.32);
    border-radius: 16px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.025);
    text-align: left;
}

.bilan-placeholder-icon {
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 16px;
    background: rgba(86, 186, 196, 0.11);
    color: #8dd7de;
    font-size: 28px;
}

.bilan-placeholder h2 {
    margin: 0 0 6px;
}

.bilan-placeholder p {
    margin: 0;
    color: var(--muted);
}

.bilan-grid {
    display: grid;
    align-items: stretch;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
        "products products products products products products deductible deductible deductible deductible deductible deductible"
        "misc misc misc misc nondeductible nondeductible nondeductible nondeductible taxation taxation taxation taxation"
        "revenue-summary revenue-summary revenue-summary revenue-summary revenue-summary revenue-summary revenue-summary total total total total total"
        "profit profit profit profit profit profit profit profit profit profit profit profit";
    gap: 18px;
}

.bilan-balance {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
    padding: 20px 24px;
}

.bilan-balance h2 {
    font-size: 18px;
}

.bilan-balance p:last-child {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.bilan-balance-form {
    display: flex;
    align-items: end;
    gap: 10px;
}

.bilan-balance-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.accounting-misc-revenue-form {
    flex-wrap: wrap;
}

.accounting-misc-revenue-form input {
    min-width: 150px;
}

.partner-invoice-paid:disabled {
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.16);
    color: #86efac;
    opacity: 1;
    cursor: default;
}

.partner-invoice-paid:not(:disabled) {
    border-color: rgba(74, 222, 128, 0.55);
    background: rgba(74, 222, 128, 0.2);
    color: #a7f3d0;
}

.bilan-money-input {
    display: flex;
    overflow: hidden;
    min-width: 210px;
    min-height: 42px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--field);
}

.bilan-money-input input {
    width: 170px;
    min-height: 40px;
    border: 0;
    background: transparent;
    color: var(--field-ink);
    font-weight: 800;
}

.bilan-money-input > span {
    display: grid;
    align-self: stretch;
    place-items: center;
    padding: 0 13px;
    background: rgba(113, 59, 120, 0.14);
    color: var(--field-ink);
    font-weight: 900;
}

.bilan-balance-value {
    color: #8dd7de;
    font-size: clamp(24px, 3vw, 34px);
}

.bilan-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.bilan-overview-card {
    position: relative;
    display: grid;
    min-height: 134px;
    align-content: center;
    gap: 8px;
    overflow: hidden;
    padding: 20px;
}

.bilan-overview-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #8dd7de;
    content: "";
}

.bilan-overview-card.is-expense::before,
.bilan-overview-card.is-alert::before {
    background: #f38bad;
}

.bilan-overview-card.is-result::before {
    background: #c5a2ef;
}

.bilan-overview-card.is-bank {
    background: linear-gradient(135deg, rgba(86, 186, 196, 0.14), rgba(30, 29, 49, 0.96));
}

.bilan-overview-card > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bilan-overview-card > strong {
    color: #f4f1f8;
    font-size: clamp(22px, 2.2vw, 30px);
}

.bilan-overview-card.is-result.is-positive > strong {
    color: #86efac;
}

.bilan-overview-card.is-result.is-negative > strong {
    color: #fda4af;
}

.bilan-overview-card.is-result.is-neutral > strong {
    color: var(--theme-heading);
}

.bilan-overview-card > small {
    color: var(--muted);
    line-height: 1.35;
}

.bilan-overview-variance.is-positive { color: #86efac; }
.bilan-overview-variance.is-negative { color: #fda4af; }

.bilan-overview-card.is-bank .bilan-overview-variance.is-positive {
    color: #86efac;
}

.bilan-overview-card.is-bank .bilan-overview-variance.is-negative {
    color: #fda4af;
}

.bilan-overview-card.is-bank .bilan-overview-variance:not(.is-positive):not(.is-negative) {
    color: var(--theme-muted);
}

.bilan-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding: 0 4px;
}

.bilan-section-heading h2 { margin: 2px 0 0; font-size: 22px; }
.bilan-section-heading > span { color: var(--muted); font-size: 13px; font-weight: 800; }

.bilan-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    position: relative;
}

.bilan-card:hover,
.bilan-card:focus-within {
    z-index: 5;
}

.bilan-tooltip-target {
    position: relative;
    cursor: help;
    outline: none;
}

.bilan-tooltip-target::before {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 20;
    width: min(320px, calc(100vw - 36px));
    padding: 12px 13px;
    border: 1px solid rgba(141, 215, 222, 0.35);
    border-radius: 11px;
    background: #171b2b;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
    color: #e8edf5;
    content: attr(data-tooltip);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 5px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.bilan-tooltip-target:hover::before,
.bilan-tooltip-target:focus::before {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
}

.bilan-tooltip-target:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(141, 215, 222, 0.3);
}

.bilan-card-deductible {
    grid-area: deductible;
}

.bilan-card-products {
    grid-area: products;
}

.bilan-card-taxation {
    grid-area: taxation;
}

.bilan-card-nondeductible {
    grid-area: nondeductible;
}

.bilan-card-misc-revenue {
    grid-area: misc;
}

.bilan-card-total {
    grid-area: total;
}

.bilan-card-revenue-summary {
    grid-area: revenue-summary;
}

.bilan-card-profit-distribution {
    grid-area: profit;
}

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

    .bilan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "deductible products"
            "nondeductible misc"
            "total revenue-summary"
            "taxation profit";
    }
}

@media (max-width: 700px) {
    .bilan-fiscal-header {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "title"
            "period"
            "opening"
            "configure";
        gap: 10px;
    }

    .bilan-fiscal-header h1,
    .bilan-fiscal-left,
    .bilan-fiscal-right {
        text-align: left !important;
    }

    .bilan-fiscal-opening {
        align-items: flex-start;
        flex-direction: column;
        width: 100%;
    }

    .bilan-fiscal-opening-copy {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .bilan-fiscal-status {
        white-space: normal;
    }

    .bilan-fiscal-configure {
        justify-self: stretch;
        width: 100%;
        margin-top: 0;
    }

    .bilan-overview {
        grid-template-columns: 1fr;
    }

    .bilan-balance {
        align-items: flex-start;
        flex-direction: column;
    }

    .bilan-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .bilan-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "deductible"
            "products"
            "taxation"
            "profit"
            "misc"
            "revenue-summary"
            "nondeductible"
            "total";
    }
}

.bilan-metric-total {
    background: rgba(169, 54, 66, 0.09);
}

.bilan-metric-total span,
.bilan-metric-total strong {
    color: #f3b7d3;
    font-size: 16px;
    font-weight: 900;
}

.bilan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 78px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    background: linear-gradient(90deg, rgba(169, 54, 66, 0.055), transparent);
}

.bilan-card-header h2 {
    margin: 2px 0 0;
    font-size: 16px;
    line-height: 1.25;
}

.bilan-card-header .eyebrow {
    margin: 0;
    font-size: 10px;
    line-height: 1.2;
}

.bilan-card-icon {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    background: rgba(169, 54, 66, 0.12);
    color: #f3b7d3;
    font-size: 18px;
    font-weight: 900;
}

.bilan-metric-row {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 18px;
}

.bilan-metric-row + .bilan-metric-row {
    border-top: 1px solid var(--line);
}

.bilan-metric-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
}

.bilan-metric-row strong {
    color: #8dd7de;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
}

.bilan-actual-balance-row {
    align-items: center;
    flex-direction: row;
}

.bilan-actual-balance-form {
    display: flex;
    width: auto;
    min-width: 130px;
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 0 auto;
    color: #8dd7de;
    font-size: 16px;
    font-weight: 800;
}

.bilan-actual-balance-form::after {
    content: " $";
}

.bilan-actual-balance-form input {
    width: 135px;
    min-width: 0;
    min-height: 28px;
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    padding: 2px 0;
    background: transparent;
    color: #8dd7de;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    text-align: right;
    outline: none;
    cursor: text;
}

.bilan-actual-balance-form input:hover {
    color: #b8edf1;
}

.bilan-actual-balance-form input:focus {
    border-bottom-color: rgba(141, 215, 222, 0.6);
    color: #b8edf1;
    box-shadow: none;
}

.bilan-opening-balance-form {
    min-width: 210px;
}

.bilan-opening-balance-form input {
    width: 190px;
    min-height: 42px;
    font-size: clamp(24px, 3vw, 34px);
}

.bilan-kpi-balance-form {
    width: fit-content;
    min-width: 0;
    margin: 0 auto;
    justify-content: center;
    line-height: 1;
}

.bilan-kpi-balance-form input {
    width: 165px;
    min-height: 38px;
    font-size: clamp(22px, 2.2vw, 30px);
    text-align: right;
}

.bilan-balance-variance.is-positive {
    color: #86efac;
}

.bilan-balance-variance.is-negative {
    color: #fda4af;
}

.bilan-balance-variance.is-neutral {
    color: var(--muted);
}


.partners-page {
    display: grid;
    gap: 18px;
    width: min(100%, 1380px);
    margin: 0 auto;
}

.partners-page > .section-heading {
    margin-bottom: 0;
}

.partner-heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.partner-heading-actions form {
    margin: 0;
}

@media (max-width: 720px) {
    .partner-heading-actions,
    .partner-heading-actions form,
    .partner-heading-actions button {
        width: 100%;
    }
}

.partners-subtitle {
    margin: 7px 0 0;
    color: var(--muted);
}

.partner-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.partner-stats .stat-card {
    min-height: 112px;
    justify-content: center;
    text-align: left;
}

.partner-stats .stat-card span {
    max-width: none;
}

.partner-stats .stat-card strong {
    font-size: 28px;
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

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

.partner-card {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 20px;
}

.partner-entry > .partner-card {
    height: 100%;
}

.partner-grid > .empty-panel {
    grid-column: 1 / -1;
}

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

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

.partner-card.is-inactive {
    opacity: 0.62;
}

.partner-card-head,
.partner-card-head > div,
.partner-week-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.partner-card-head h2 {
    font-size: 20px;
}

.partner-channel {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    font-size: 12px;
}

.partner-channel span {
    flex: 0 0 auto;
    font-weight: 700;
}

.partner-channel code {
    overflow: hidden;
    color: var(--ink);
    font-family: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.partner-details div {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.03);
}

.partner-details dt {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.partner-details dd {
    overflow: hidden;
    margin: 5px 0 0;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-week-summary {
    display: grid;
    min-height: 0;
    align-items: stretch;
    justify-content: stretch;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.partner-sales-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.partner-sales-count span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.partner-sales-count strong {
    color: var(--ink);
    font-size: 15px;
}

.partner-price-breakdown {
    display: grid;
    gap: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.partner-price-breakdown > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 44px;
    padding: 10px 12px;
}

.partner-price-breakdown > div + div {
    border-top: 1px solid var(--line);
}

.partner-price-breakdown dt {
    color: var(--muted);
    font-size: 13px;
}

.partner-price-breakdown dd {
    margin: 0;
    font-weight: 800;
}

.partner-discount-row {
    background: rgba(74, 222, 128, 0.045);
}

.partner-discount-row dd {
    color: #86efac;
}

.partner-discount-row small {
    margin-left: 5px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(74, 222, 128, 0.12);
    font-size: 10px;
}

.partner-net-row {
    background: rgba(86, 186, 196, 0.055);
}

.partner-net-row dt {
    color: var(--ink);
    font-weight: 800;
}

.partner-net-row dd {
    color: #8dd7de;
    font-size: 20px;
}

.partner-invoice-panel {
    gap: 0;
    overflow: hidden;
    margin-top: 0;
    padding: 0;
}

.partner-invoice-panel > .directory-title {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.partner-invoice-table {
    width: 100%;
    min-width: 760px;
}

.partner-invoice-table th {
    border-radius: 0;
}

.partner-invoice-panel > .empty-state {
    margin: 0;
    padding: 26px 20px;
    text-align: center;
}

.partners-page .partner-invoice-panel > .directory-title {
    min-height: 70px;
    padding: 16px 20px;
}

.partners-page .partner-invoice-panel > .directory-title > span {
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--theme-surface-soft);
    color: var(--theme-muted);
    font-size: 12px;
}

.partners-page .partner-invoice-panel .accounting-table-wrap {
    overflow-x: auto;
    padding: 0;
    scrollbar-color: var(--theme-accent) var(--theme-surface-soft);
    scrollbar-width: thin;
}

.partners-page .partner-invoice-table {
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
}

.partners-page .partner-invoice-table th {
    height: 46px;
    padding: 0 11px;
    border-radius: 0;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.partners-page .partner-invoice-table td {
    height: 62px;
    padding: 10px 11px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.partners-page .partner-invoice-table th:last-child,
.partners-page .partner-invoice-table td:last-child {
    border-right: 0;
}

.partners-page .partner-invoice-table tbody tr:last-child td {
    border-bottom: 0;
}

.partners-page .partner-invoice-number {
    color: var(--theme-accent);
    font-size: 12px;
    letter-spacing: 0.015em;
}

.partners-page .partner-discord-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
}

.partners-page .partner-discord-status::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    content: "";
}

.partners-page .partner-discord-status.is-sent {
    border-color: rgba(123, 224, 177, 0.26);
    background: rgba(123, 224, 177, 0.07);
    color: #7be0b1;
}

.partners-page .partner-discord-status.is-sent::before {
    background: #7be0b1;
    box-shadow: 0 0 8px rgba(123, 224, 177, 0.55);
}

.partners-page .partner-discord-status.is-unsent {
    color: var(--muted);
}

.partners-page .partner-discord-status.is-unsent::before {
    background: var(--muted);
}

.partners-page .partner-payment-select {
    min-width: 112px;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    padding: 0 28px 0 10px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--ink);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    color-scheme: dark;
}

.partners-page .partner-payment-select.is-paid {
    border-color: rgba(79, 220, 144, 0.65) !important;
    background-color: rgba(35, 134, 84, 0.24) !important;
    color: #70e6a7 !important;
}

.partners-page .partner-payment-select.is-pending {
    border-color: rgba(245, 166, 35, 0.70) !important;
    background-color: rgba(176, 103, 17, 0.25) !important;
    color: #ffbd59 !important;
}

.partners-page .partner-payment-select option[value="pending"] {
    background: #2f281b;
    color: #f1c77a;
}

.partners-page .partner-payment-select option[value="paid"] {
    background: #193329;
    color: #7be0b1;
}

.partners-page .partner-invoice-table .danger-button {
    min-height: 34px;
    border-radius: 10px;
    padding: 0 11px;
}

.expense-panel {
    margin-top: 14px;
}

.accounting-page {
    display: flex;
    flex-direction: column;
    width: min(100%, 1900px);
    margin: 0 auto;
    padding-right: 12px;
    padding-left: 12px;
}

.accounting-page > .section-heading {
    order: 0;
    margin-bottom: 14px;
}

.accounting-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accounting-heading-actions form {
    margin: 0;
}

.accounting-configuration-menu {
    width: min(720px, calc(100vw - 32px));
}

.accounting-configuration-modal {
    width: min(1040px, calc(100vw - 32px));
}

.accounting-profit-modal {
    width: min(900px, calc(100vw - 32px));
}

.accounting-configuration-modal .accounting-secondary-settings,
.accounting-profit-modal .accounting-profit-distribution {
    order: initial;
    margin: 0;
}

.accounting-configuration-menu .modal-form,
.accounting-configuration-modal .modal-form,
.accounting-profit-modal .modal-form {
    gap: 20px;
    padding: 26px;
}

.accounting-configuration-menu .modal-head,
.accounting-configuration-modal .modal-head,
.accounting-profit-modal .modal-head {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.accounting-configuration-menu .modal-head h2,
.accounting-configuration-modal .modal-head h2,
.accounting-profit-modal .modal-head h2 {
    margin: 2px 0;
    font-size: 22px;
}

.accounting-configuration-menu .employee-create-choice {
    min-height: 145px;
    border-radius: 14px;
}

.accounting-configuration-modal .accounting-secondary-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.accounting-configuration-modal .accounting-opening-balance {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.accounting-configuration-modal .accounting-opening-balance:nth-child(3) {
    grid-column: 1 / -1;
}

.accounting-configuration-modal .bilan-balance-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.accounting-configuration-modal .accounting-misc-revenue-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.accounting-configuration-modal .bilan-balance-form input,
.accounting-configuration-modal .bilan-money-input {
    min-height: 42px;
}

.accounting-profit-modal .accounting-profit-distribution {
    border-radius: 14px;
}

.accounting-profit-modal .accounting-profit-distribution-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
}

.accounting-profit-modal .accounting-profit-distribution-form .primary-button {
    grid-column: 1 / -1;
    min-width: 160px;
    justify-self: end;
}

@media (max-width: 760px) {
    .accounting-heading-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .accounting-configuration-modal .accounting-secondary-settings,
    .accounting-profit-modal .accounting-profit-distribution-form {
        grid-template-columns: 1fr;
    }

    .accounting-configuration-modal .accounting-opening-balance:nth-child(3),
    .accounting-profit-modal .accounting-profit-distribution-form .primary-button {
        grid-column: auto;
    }

    .accounting-configuration-modal .bilan-balance-form,
    .accounting-configuration-modal .accounting-misc-revenue-form {
        grid-template-columns: 1fr;
    }

    .accounting-configuration-modal .primary-button,
    .accounting-profit-modal .primary-button {
        width: 100%;
    }
}

.accounting-page .accounting-stats {
    order: 3;
    grid-template-columns: repeat(3, minmax(170px, 220px));
    justify-content: start;
    gap: 10px;
    margin: 14px 0;
}

.accounting-page > .alert {
    order: 1;
}

.accounting-salary-panel {
    order: 2;
    width: fit-content;
    min-width: 0;
    max-width: 100%;
    align-self: center;
    box-shadow: 0 18px 45px rgba(5, 4, 18, 0.28);
}

.accounting-secondary-settings {
    display: grid;
    order: 4;
    grid-template-columns: minmax(240px, 0.85fr) minmax(240px, 0.85fr) minmax(430px, 1.5fr);
    gap: 10px;
    margin-top: 18px;
    margin-bottom: 14px;
}

.accounting-secondary-settings .accounting-opening-balance {
    display: grid;
    align-content: start;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
}

.accounting-secondary-settings .bilan-balance-form {
    display: flex;
    align-items: end;
    flex-direction: row;
    gap: 8px;
}

.accounting-secondary-settings .bilan-balance-form label {
    min-width: 0;
    flex: 1;
}

.accounting-secondary-settings .bilan-balance-form input,
.accounting-secondary-settings .bilan-money-input {
    width: 100%;
    min-width: 0;
    min-height: 36px;
}

.accounting-secondary-settings .bilan-money-input input {
    flex: 1;
    width: auto;
    min-height: 34px;
}

.accounting-secondary-settings .primary-button {
    min-height: 36px;
    padding: 8px 13px;
    white-space: nowrap;
}

.accounting-secondary-settings h2 {
    font-size: 16px;
}

.accounting-secondary-settings .eyebrow {
    font-size: 11px;
}

.accounting-secondary-settings .accounting-misc-revenue-form {
    flex-wrap: nowrap;
}

.accounting-profit-distribution {
    order: 4;
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.028);
}

.accounting-profit-distribution-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(169, 54, 66, 0.08), rgba(86, 186, 196, 0.035));
}

.accounting-profit-distribution-head h2,
.accounting-profit-distribution-head p {
    margin: 0;
}

.accounting-profit-distribution-head > div {
    display: grid;
    gap: 4px;
}

.accounting-profit-distribution-head > div > p:last-child {
    color: var(--muted);
    font-size: 12px;
}

.accounting-profit-distribution-head > strong {
    border: 1px solid rgba(141, 215, 222, 0.24);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(86, 186, 196, 0.08);
    color: #8dd7de;
}

.accounting-profit-distribution-head > strong.is-over-limit {
    border-color: rgba(255, 111, 111, 0.35);
    background: rgba(255, 111, 111, 0.09);
    color: #ff9b9b;
}

.accounting-profit-distribution-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
    align-items: end;
    gap: 10px;
    padding: 14px 18px 18px;
}

.accounting-profit-distribution-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.accounting-profit-distribution-form label > span {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.055);
}

.accounting-profit-distribution-form input {
    min-width: 0;
    width: 100%;
    min-height: 40px;
    border: 0;
    padding: 0 10px;
    background: transparent;
    color: var(--ink);
    font-weight: 800;
}

.accounting-profit-distribution-form small {
    display: grid;
    min-width: 34px;
    border-left: 1px solid var(--line);
    place-items: center;
    color: #8dd7de;
}

.bilan-card-profit-distribution {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-color: rgba(86, 186, 196, 0.16);
    background: linear-gradient(120deg, rgba(35, 31, 55, 0.98), rgba(25, 34, 51, 0.98));
}

.bilan-card-profit-distribution .bilan-card-header {
    grid-column: 1 / -1;
}

.bilan-card-profit-distribution .bilan-metric-row {
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    border-right: 1px solid rgba(255, 255, 255, 0.075);
}

.bilan-card-revenue-summary {
    border-color: rgba(86, 186, 196, 0.2);
    background: linear-gradient(145deg, rgba(31, 43, 57, 0.98), rgba(28, 28, 49, 0.98));
}

.bilan-card-total {
    border-color: rgba(169, 54, 66, 0.17);
}

@media (max-width: 1000px) {
    .bilan-card-profit-distribution {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .bilan-card-profit-distribution {
        grid-template-columns: 1fr;
    }

    .bilan-card-profit-distribution .bilan-metric-row {
        border-right: 0;
    }
}

.bilan-distribution-row strong {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.bilan-distribution-row strong small {
    border-radius: 999px;
    padding: 3px 7px;
    background: rgba(86, 186, 196, 0.10);
    color: #8dd7de;
    font-size: 10px;
}

.bilan-distribution-value {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.bilan-distribution-value > small,
.bilan-distribution-rate-form {
    border-radius: 999px;
    padding: 3px 7px;
    background: rgba(86, 186, 196, 0.1);
    color: #8dd7de;
    font-size: 10px;
}

.bilan-distribution-rate-form {
    display: flex;
    align-items: center;
    padding-right: 6px;
}

.bilan-distribution-rate-form::after {
    content: "%";
    font-weight: 900;
}

.bilan-distribution-rate-form input {
    width: 48px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #8dd7de;
    font: inherit;
    font-weight: 900;
    text-align: right;
    outline: none;
    appearance: textfield;
}

.bilan-distribution-rate-form input::-webkit-inner-spin-button,
.bilan-distribution-rate-form input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

@media (max-width: 1100px) {
    .accounting-profit-distribution-form {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}

@media (max-width: 650px) {
    .accounting-profit-distribution-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

.accounting-page > .expense-panel {
    order: 5;
    width: 100%;
    max-width: 1280px;
    align-self: center;
    margin-top: 20px;
}

.expense-panel-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.form-span-2 {
    grid-column: 1 / -1;
}

.accounting-page .expense-panel {
    overflow: visible;
}

.expense-create summary {
    min-height: 38px;
    padding: 0 12px;
    box-shadow: none;
}

.expense-create .fab-plus {
    width: 23px;
    height: 23px;
    font-size: 17px;
}

.expense-create .drawer-form {
    z-index: 20;
    top: calc(100% + 10px);
    right: 0;
    bottom: auto;
}

@media (max-width: 700px) {
    .expense-panel-actions {
        align-items: flex-end;
        flex-direction: column;
        gap: 7px;
    }
}

@media (max-width: 1100px) {
    .accounting-secondary-settings {
        grid-template-columns: 1fr 1fr;
    }

    .accounting-secondary-settings .accounting-opening-balance:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .accounting-secondary-settings {
        grid-template-columns: 1fr;
    }

    .accounting-secondary-settings .accounting-opening-balance:last-child {
        grid-column: auto;
    }

    .accounting-page .accounting-stats {
        grid-template-columns: 1fr;
    }

    .accounting-secondary-settings .bilan-balance-form {
        align-items: stretch;
        flex-direction: column;
    }

    .accounting-secondary-settings .accounting-misc-revenue-form {
        flex-wrap: wrap;
    }
}

.accounting-opening-balance {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding: 16px;
}

.accounting-opening-balance h2 {
    font-size: 18px;
}

.accounting-page .stat-card {
    gap: 4px;
    min-height: 64px;
    padding: 9px 13px;
}

.accounting-page .stat-card span {
    font-size: 13px;
}

.accounting-page .stat-card strong {
    font-size: 20px;
}

.accounting-page .accounting-panel {
    gap: 0;
    overflow: hidden;
    padding: 0;
}

.accounting-page .accounting-panel > .directory-title {
    padding: 14px 16px;
    border-bottom: 1px solid var(--theme-border);
}

.accounting-page .accounting-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    padding: 0;
}

.accounting-page .accounting-table {
    width: max-content;
    min-width: 0;
    max-width: none;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.accounting-page .accounting-table th {
    height: 44px;
    padding: 0 12px;
    border-right: 1px solid var(--theme-border);
    border-bottom: 1px solid var(--theme-border);
    border-radius: 0;
    font-size: 12px;
    letter-spacing: 0.025em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.accounting-page .accounting-table th:nth-child(n+5) {
    text-align: center;
}

.accounting-page .accounting-table th:last-child {
    border-right: 0;
    border-radius: 0;
}

.accounting-page .accounting-table td {
    height: 46px;
    padding: 9px 12px;
    border-right: 1px solid var(--theme-border);
    text-align: center;
    white-space: nowrap;
}

.accounting-page .accounting-table td:nth-child(n+5) {
    text-align: center;
}

.payroll-action-button {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(123, 224, 177, 0.42);
    border-radius: 10px;
    padding: 0;
    background: rgba(123, 224, 177, 0.14);
    color: #8be4b8;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.payroll-action-button:hover:not(:disabled) {
    border-color: rgba(123, 224, 177, 0.72);
    background: rgba(123, 224, 177, 0.24);
    transform: translateY(-1px);
}

.payroll-action-button.is-paid,
.payroll-action-button:disabled {
    border-color: rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.055);
    color: var(--muted);
    cursor: default;
    opacity: 0.72;
}

.accounting-page .accounting-table td:last-child {
    border-right: 0;
}

.accounting-page .accounting-column-totals th,
.accounting-page .accounting-column-totals td {
    height: 46px;
    border-top: 1px solid var(--theme-border-strong);
    border-right: 1px solid var(--theme-border);
    background: var(--theme-accent-soft);
    color: var(--theme-heading);
    font-weight: 900;
}

.accounting-page .accounting-column-totals th {
    padding: 9px 12px;
}

.accounting-page .accounting-column-totals td:last-child {
    border-right: 0;
    background: var(--theme-accent-soft);
    color: var(--theme-accent);
}

.accounting-page .accounting-summary {
    grid-template-columns: 140px 140px minmax(220px, 1fr) minmax(190px, 230px);
    gap: 12px;
    align-items: end;
    margin: 0;
    padding: 16px;
    border-top: 1px solid var(--theme-border);
    background: var(--theme-surface-raised);
}

.accounting-page .accounting-summary label {
    gap: 5px;
    margin: 0;
    color: var(--theme-muted);
    font-size: 12px;
}

.accounting-page .accounting-summary input,
.accounting-page .accounting-total-row,
.accounting-page .accounting-summary .ghost-button {
    min-height: 44px;
}

.accounting-page .accounting-summary input {
    width: 100%;
    text-align: center;
}

.accounting-page .accounting-summary .ghost-button {
    width: min(100%, 240px);
    justify-self: start;
    font-weight: 800;
}

.accounting-page .accounting-total-row {
    gap: 14px;
    min-width: 0;
    padding: 0 16px;
    border: 1px solid var(--theme-border-strong);
    border-radius: 10px;
    background: var(--theme-accent-soft);
}

.accounting-page .accounting-total-row span {
    color: var(--theme-muted);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.accounting-page .accounting-total-row strong {
    color: var(--theme-accent);
    font-size: 17px;
    white-space: nowrap;
}

.accounting-page .expense-panel {
    min-height: 160px;
    overflow: hidden;
}

.accounting-page .expense-panel > .directory-title {
    min-height: 76px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(169, 54, 66, 0.08), rgba(86, 186, 196, 0.035));
}

.accounting-page .expense-panel > .directory-title h2 {
    position: relative;
    padding-left: 17px;
    font-size: 19px;
}

.accounting-page .expense-panel > .directory-title h2::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 5px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(180deg, #a93642, #8dd7de);
    box-shadow: 0 0 18px rgba(169, 54, 66, 0.38);
    content: "";
    transform: translateY(-50%);
}

.accounting-page .expense-panel > .empty-state {
    margin: 0;
    padding: 28px 22px;
}

.expense-request-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
}

.accounting-page .expense-panel .expense-request {
    position: relative;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(360px, auto);
    align-items: center;
    gap: 24px;
    min-height: 150px;
    padding: 22px 24px 22px 28px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(169, 54, 66, 0.08), transparent 42%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.expense-request::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: linear-gradient(180deg, #a93642, rgba(141, 215, 222, 0.7));
    content: "";
}

.expense-request:hover {
    border-color: rgba(169, 54, 66, 0.28);
    box-shadow: 0 14px 30px rgba(5, 4, 18, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.expense-request strong,
.expense-request span {
    display: block;
}

.expense-request > div:first-child strong {
    margin-bottom: 7px;
    color: #f7f4fb;
    font-size: 17px;
    line-height: 1.3;
}

.expense-request > div:first-child {
    min-width: 0;
    text-align: left;
}

.expense-request > div:first-child > span {
    color: #a9e7ec;
    font-size: 14px;
    font-weight: 750;
}

.expense-request p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.expense-request-actions {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px 14px;
}

.expense-request-actions form {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.expense-request-actions form select {
    width: 100%;
    min-width: 0;
}

.expense-request-actions :is(button, select) {
    min-height: 42px;
}

.expense-management-actions {
    display: flex;
    align-items: center;
    grid-column: 2;
    justify-content: flex-end;
    gap: 10px;
}

.expense-management-actions form {
    display: contents;
}

.expense-status {
    width: max-content;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.expense-status-approved {
    border-color: rgba(123, 224, 177, 0.32);
    background: rgba(123, 224, 177, 0.08);
    color: #7be0b1;
    box-shadow: 0 0 20px rgba(123, 224, 177, 0.06);
}

.expense-status-rejected {
    border-color: rgba(255, 111, 111, 0.32);
    background: rgba(255, 111, 111, 0.08);
    color: #ff9b9b;
}

@media (max-width: 980px) {
    .accounting-page .expense-panel .expense-request {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .expense-request-actions {
        grid-template-columns: auto 1fr;
    }
}

@media (max-width: 620px) {
    .accounting-page .expense-panel > .directory-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .expense-panel-actions {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .expense-panel-actions > span {
        padding-bottom: 2px;
    }

    .expense-request-list {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .accounting-page .expense-panel .expense-request {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 16px;
        padding: 20px;
    }

    .expense-request-actions {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

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

    .expense-request-actions form select {
        grid-column: 1 / -1;
    }

    .expense-management-actions {
        grid-column: 1;
        justify-content: stretch;
    }

    .expense-management-actions > * {
        flex: 1;
    }

    .expense-management-actions button {
        width: 100%;
    }
}

.employee-admin-layout .directory-panel,
.employee-management-panel {
    background: rgba(255, 255, 255, 0.028);
}

.employee-admin-layout .directory-title {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.employee-admin-layout .directory-title h2 {
    margin: 0;
}

.employee-admin-layout .directory-title span {
    display: block;
    margin-top: 4px;
}

.employee-admin-layout .role-card {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
    overflow: hidden;
}

.employee-admin-layout .role-card:last-of-type {
    border-bottom: 0;
}

.employee-admin-layout .role-card-section {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.employee-admin-layout .role-access,
.employee-admin-layout .role-actions {
    grid-column: 1 / -1;
}

.employee-admin-layout .permission-list {
    gap: 6px;
    min-width: 0;
}

.employee-admin-layout .permission-list label {
    min-height: 28px;
    padding: 0 9px;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.035);
    font-size: 12px;
}

.employee-admin-layout .grade-form > .primary-button {
    justify-self: end;
    min-width: 220px;
}

.employee-admin-layout .role-actions {
    display: flex;
    justify-content: flex-end;
}

.employee-admin-layout .role-create {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.035);
}

.employee-management-panel .employee-groups-grid {
    gap: 18px;
}

.employee-management-panel .employee-group-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.employee-management-panel .employee-group-panel + .employee-group-panel {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.employee-management-panel .employee-group-panel > .directory-title {
    padding: 0 0 8px;
    border-bottom: 0;
}

.employee-management-panel .minimal-header {
    max-width: none;
    padding: 0 18px 8px;
    border-bottom: 1px solid var(--line);
}

.employee-management-panel .minimal-row {
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
}

.employee-management-panel .minimal-row:last-child {
    border-bottom: 0;
}

.employee-management-panel .minimal-row summary {
    min-height: 56px;
    padding: 0 18px;
}

.employee-management-panel .minimal-row:hover {
    background: rgba(255, 255, 255, 0.045);
}

.employee-management-panel .directory-empty {
    padding: 18px;
    border-top: 1px solid var(--line);
}

.employee-choice-modal {
    width: min(620px, calc(100vw - 32px));
}

.employee-create-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.employee-create-choice {
    display: grid;
    gap: 8px;
    min-height: 180px;
    align-content: center;
    justify-items: start;
    border: 1px solid var(--line);
    padding: 20px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}

.employee-create-choice:hover {
    border-color: rgba(169, 54, 66, 0.52);
    background: rgba(169, 54, 66, 0.09);
    transform: translateY(-1px);
}

.employee-create-choice-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: rgba(86, 186, 196, 0.12);
    color: #8dd7de;
    font-size: 21px;
    font-weight: 800;
}

.employee-create-choice strong {
    font-size: 17px;
}

.employee-create-choice small {
    color: var(--muted);
    line-height: 1.45;
}

@media (max-width: 1180px) {
    .employee-admin-layout {
        grid-template-columns: 1fr;
    }

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

    .role-access,
    .role-actions {
        grid-column: 1 / -1;
    }

    .employee-groups-grid {
        grid-template-columns: 1fr;
    }

    .employee-create-choices {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .app-header,
    .app-layout {
        grid-template-columns: 1fr;
    }

    .app-header {
        position: static;
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .main-nav {
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .nav-group {
        flex: 1 1 150px;
    }

    .nav-group-summary {
        justify-content: space-between;
        width: 100%;
    }

    .nav-group-menu {
        position: static;
        min-width: 0;
        margin-top: 6px;
        transform: none;
    }

    .nav-group-menu::before {
        display: none;
    }

    .user-menu {
        width: 100%;
        flex-wrap: wrap;
    }

    .action-center-trigger {
        margin-left: 0;
    }

    .app-layout {
        display: block;
        padding: 16px;
    }

    .pos-category-strip {
        padding: 12px 16px 0;
    }

    .sales-mode-switch {
        width: calc(100% - 32px);
    }

    .sales-mode-switch a {
        min-width: 0;
        flex: 1 1 0;
    }

    .cart-column {
        position: static;
        margin-top: 18px;
    }

    .vehicle-history-search > div {
        grid-template-columns: 1fr;
    }

    .vehicle-history-card-header,
    .vehicle-history-card-header dl {
        align-items: flex-start;
        flex-direction: column;
    }

    .vehicle-history-card-header dl {
        gap: 12px;
    }

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

    .search-input {
        max-width: none;
    }

    .vehicle-lookup-result.is-success {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .admin-grid,
    .form-grid,
    .accounting-summary,
    .role-card,
    .employee-groups-grid {
        grid-template-columns: 1fr;
    }

    .minimal-create summary,
    .minimal-row summary {
        grid-template-columns: minmax(0, 1fr) 28px;
        min-height: auto;
        padding: 14px;
    }

    .minimal-admin,
    .employee-admin-layout,
    .minimal-list {
        justify-content: stretch;
    }

    .directory-panel {
        width: 100%;
        max-width: none;
        padding: 14px;
    }

    .directory-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .minimal-row {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .summary-meta,
    .row-meta {
        grid-column: 1 / -1;
    }

    .row-main,
    .row-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .minimal-header {
        display: none;
    }

    .employee-grid,
    .employee-directory .minimal-row summary,
    .grade-grid {
        grid-template-columns: minmax(0, 1fr) 28px;
        row-gap: 4px;
    }

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

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

    .role-card-section {
        padding: 10px;
    }

    .role-actions {
        justify-items: stretch;
    }

    .role-actions .danger-button {
        width: 100%;
    }

    .employee-management-panel {
        padding: 14px;
    }

    .employee-directory .minimal-row summary > span:not(.row-main) {
        grid-column: 1;
    }

    .row-main strong {
        min-width: 0;
    }

    .minimal-details {
        width: auto;
        padding: 0 14px 14px;
    }

    .floating-actions {
        right: 16px;
        bottom: 16px;
    }

    .floating-actions-custom {
        right: auto;
        left: 16px;
    }

    .floating-actions-pos {
        right: 16px;
        left: auto;
    }

    .floating-create summary {
        min-height: 48px;
        padding: 0 14px;
    }

    .floating-create .fab-label {
        display: none;
    }

    .floating-create .drawer-form {
        right: 0;
        bottom: 60px;
    }
}

@media (max-width: 560px) {
    .vehicle-lookup-panel {
        padding: 16px;
    }

    .vehicle-lookup-header {
        flex-direction: column;
    }

    .vehicle-lookup-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .plate-input,
    .vehicle-lookup-controls .primary-button {
        width: 100%;
    }

    .vehicle-lookup-controls .primary-button {
        justify-content: center;
    }

    .vehicle-lookup-result.is-success {
        grid-template-columns: 1fr;
    }
}

.employee-page {
    max-width: 1320px;
    margin: 0 auto;
}

.employee-topbar {
    align-items: flex-end;
}

.employee-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.employee-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.employee-stat {
    display: grid;
    gap: 6px;
    min-height: 92px;
    padding: 16px;
}

.employee-stat span,
.employee-panel-head span,
.employee-table td span,
.role-line span {
    color: var(--muted);
    font-size: 13px;
}

.employee-stat strong {
    font-size: 30px;
    line-height: 1;
}

.employee-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 16px;
    align-items: start;
}

.employee-side-panels {
    display: grid;
    gap: 16px;
}

.contract-list {
    display: grid;
    gap: 8px;
}

.contract-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    cursor: grab;
}

.contract-line.is-dragging {
    opacity: 0.58;
    border-color: rgba(169, 54, 66, 0.56);
    transform: scale(0.99);
}

.contract-drag-handle {
    color: var(--muted);
    cursor: grab;
    font-weight: 900;
}

.contract-line > div {
    display: grid;
    gap: 4px;
}

.contract-line span {
    color: var(--muted);
    font-size: 13px;
}

.contract-line form {
    margin: 0;
}

.employee-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.employee-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.employee-panel-head h2 {
    font-size: 18px;
}

.employee-table-wrap {
    overflow: auto;
}

.employee-table {
    min-width: 940px;
}

.employee-investment-cell {
    min-width: 185px;
}

.employee-investment-cell strong,
.employee-investment-cell span {
    display: block;
}

.employee-investment-cell span {
    margin-top: 4px;
    font-size: 12px;
}

.investment-status.is-amortized {
    color: #57f287;
}

.investment-status.is-pending {
    color: var(--muted);
}

.investment-empty {
    color: var(--muted);
}

.employee-investment-cell .investment-forecast {
    margin-top: 7px;
    color: var(--text);
    font-weight: 700;
}

.employee-investment-cell .investment-average {
    color: var(--muted);
    font-size: 11px;
}

.employee-table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.employee-table td {
    padding: 14px 12px;
    vertical-align: middle;
}

.employee-table td:first-child {
    display: grid;
    gap: 4px;
}

.employee-actions-cell {
    white-space: nowrap;
    text-align: right;
}

.employee-table tbody tr[data-employee-menu] {
    cursor: context-menu;
    outline: none;
}

.employee-table tbody tr[data-employee-menu]:hover td,
.employee-table tbody tr[data-employee-menu]:focus-visible td {
    background: var(--theme-table-row-hover);
}

.employee-context-hint {
    color: var(--theme-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.service-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
}

.service-status-pill i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .14);
}

.service-status-pill.is-on-duty { color: #4ade80; }
.service-status-pill.is-on-duty i {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .14);
}

.service-status-pill.is-off-duty { color: #f59e0b; }

.compact-action {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
}

.status-pill.is-active {
    border: 1px solid rgba(123, 224, 177, 0.32);
    background: rgba(75, 160, 110, 0.16);
    color: #bff2d1;
}

.status-pill.is-inactive {
    border: 1px solid rgba(255, 120, 120, 0.32);
    background: rgba(183, 53, 53, 0.16);
    color: #ffd6d6;
}

.role-list {
    display: grid;
    gap: 8px;
}

.role-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    cursor: grab;
    transition: border-color 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.role-line.is-dragging {
    opacity: 0.58;
    border-color: rgba(169, 54, 66, 0.56);
    transform: scale(0.99);
}

.drag-handle {
    display: grid;
    width: 26px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 6px;
    color: var(--muted);
    font-weight: 900;
    line-height: 1;
}

.role-line div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.role-line strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-modal {
    position: relative;
    width: min(720px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    background: rgba(23, 19, 36, 0.98);
    color: var(--ink);
    box-shadow: var(--shadow);
}

.app-modal::backdrop {
    background: rgba(5, 5, 8, 0.68);
    backdrop-filter: blur(6px);
}

.modal-form {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.modal-head {
    display: grid;
    gap: 4px;
    padding-right: 38px;
}

.modal-close-form {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}

.modal-close-form button {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
    appearance: none;
}

.modal-form input,
.modal-form select,
.hr-modal-actions input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 12px;
    background: var(--field);
    color: var(--field-ink);
}

.modal-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
    text-align: left;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.employee-profile-form {
    gap: 18px;
}

.employee-profile-form .modal-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.modal-section {
    display: grid;
    gap: 12px;
}

.modal-section h3 {
    margin: 0;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.modal-section .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-profile-form .modal-section:first-of-type .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-profile-form .modal-section:first-of-type .form-grid label:last-child {
    grid-column: 1 / -1;
}

.modal-security-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.switch-line {
    display: inline-grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--ink);
    white-space: nowrap;
}

.modal-form .switch-line input[type="checkbox"] {
    position: relative;
    width: 42px;
    min-width: 42px;
    height: 24px;
    min-height: 24px;
    margin: 0;
    appearance: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.modal-form .switch-line input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: var(--muted);
    transition: transform 0.16s ease, background 0.16s ease;
}

.modal-form .switch-line input[type="checkbox"]:checked {
    border-color: rgba(123, 224, 177, 0.42);
    background: rgba(75, 160, 110, 0.30);
}

.modal-form .switch-line input[type="checkbox"]:checked::after {
    transform: translateX(18px);
    background: #bff2d1;
}

.role-create-form .modal-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.grade-modal-form {
    gap: 18px;
    padding: 26px;
}

.grade-management-modal {
    width: min(840px, calc(100vw - 32px));
    max-height: min(860px, calc(100vh - 32px));
}

.grade-modal-form .modal-head {
    gap: 6px;
    padding: 0 48px 17px 0;
    border-bottom: 1px solid var(--line);
}

.grade-modal-form .modal-head h2 {
    font-size: 28px;
}

.grade-settings-section {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.grade-modal-form .form-grid input {
    min-height: 38px;
}

.grade-modal-form .grade-permission-grid {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 9px;
}

.grade-modal-form .permission-tile {
    min-height: 44px;
    gap: 9px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.2;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.grade-modal-form .permission-tile:hover {
    border-color: rgba(169, 54, 66, 0.5);
    background: rgba(169, 54, 66, 0.08);
    transform: translateY(-1px);
}

.grade-modal-form .permission-tile input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
}

.grade-choice-section {
    gap: 13px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.grade-choice-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.04em;
}

.grade-choice-section h3::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--line);
}

.grade-discord-section {
    border-color: rgba(88, 101, 242, 0.3);
    background: rgba(88, 101, 242, 0.045);
}

.grade-access-section {
    border-color: rgba(169, 54, 66, 0.24);
}

.grade-modal-form .modal-actions {
    gap: 8px;
    padding-top: 10px;
}

@media (max-width: 600px) {
    .grade-modal-form {
        padding: 18px;
    }

    .grade-modal-form .form-grid,
    .grade-modal-form .grade-permission-grid {
        grid-template-columns: 1fr;
    }

    .grade-modal-form .modal-actions > * {
        flex: 1;
    }
}

.grade-modal-form .modal-actions .primary-button,
.grade-modal-form .modal-actions .danger-button,
.grade-modal-form .modal-actions .ghost-button {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
}

.role-config-grid {
    grid-template-columns: minmax(0, 1fr) 140px;
}

.discord-mappings-modal {
    width: min(920px, calc(100vw - 32px));
}

.discord-mappings-form {
    gap: 22px;
    padding: 28px;
}

.discord-mappings-form .modal-head {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.discord-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.discord-section-title span {
    color: var(--muted);
    font-size: 12px;
}

.discord-mapping-list {
    display: grid;
    gap: 10px;
}

.discord-mapping-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
}

.discord-mapping-row.is-dragging {
    opacity: 0.48;
    border-color: var(--accent);
}

.discord-mapping-drag {
    align-self: center;
    color: var(--muted);
    cursor: grab;
    font-size: 18px;
    letter-spacing: -4px;
    user-select: none;
}

.discord-mapping-fields {
    display: grid;
    grid-template-columns: minmax(130px, 0.8fr) minmax(210px, 1.25fr) minmax(150px, 0.9fr);
    gap: 12px;
}

.discord-mapping-actions {
    display: flex;
    gap: 8px;
    padding-bottom: 1px;
}

.discord-mapping-add {
    padding: 18px;
    border: 1px solid rgba(169, 54, 66, 0.28);
    border-radius: 10px;
    background: rgba(169, 54, 66, 0.055);
}

.discord-mapping-add-grid {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr) minmax(190px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.discord-mapping-add-grid .primary-button {
    min-height: 42px;
}

@media (max-width: 820px) {
    .discord-mapping-row,
    .discord-mapping-add-grid {
        grid-template-columns: 1fr;
    }

    .discord-mapping-fields {
        grid-template-columns: 1fr 1fr;
    }

    .discord-mapping-fields label:last-child {
        grid-column: 1 / -1;
    }

    .discord-mapping-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 560px) {
    .discord-mappings-form {
        padding: 18px;
    }

    .discord-mapping-fields {
        grid-template-columns: 1fr;
    }

    .discord-mapping-fields label:last-child {
        grid-column: auto;
    }
}

.modal-permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
}

.permission-tile {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--ink);
}

.modal-form .permission-tile input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    accent-color: var(--accent);
}

.permission-tile:has(input:checked) {
    border-color: rgba(169, 54, 66, 0.56);
    background: rgba(169, 54, 66, 0.10);
}

.permission-tile span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-modal-actions {
    display: grid;
    gap: 10px;
}

.employee-hr-form {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.018);
}

.hr-current-grade {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(169, 54, 66, 0.30);
    border-radius: 8px;
    background: rgba(169, 54, 66, 0.08);
}

.hr-current-grade span {
    color: var(--muted);
    font-weight: 800;
}

.hr-current-grade strong {
    color: #ff8fca;
}

.hr-action-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hr-action-buttons button {
    min-height: 42px;
}

.modal-form option.current-role-option {
    background: rgba(169, 54, 66, 0.32);
    color: #ffffff;
    font-weight: 800;
}

.hr-grade-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.hr-grade-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}

.hr-danger-section .modal-delete-form {
    padding-top: 0;
    border-top: 0;
}

.hr-modal-actions .hr-action-form {
    grid-template-columns: minmax(0, 1fr) 132px;
}

.modal-delete-form {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.topbar-advert-button {
    min-height: 36px;
    padding: 0 14px;
    white-space: nowrap;
}


/* Système d'arrondis commun à toutes les pages */
button,
.primary-button,
.ghost-button,
.danger-button,
.logout-button,
.inline-button,
.compact-action,
.accounting-save-button {
    border-radius: 12px;
}

input,
select,
textarea,
.prefixed-input,
.password-field,
.plate-input {
    border-radius: 10px;
}

.main-nav a,
.nav-group-summary,
.category-filter,
.category-dropdown > summary,
.minimal-create > summary {
    border-radius: 11px;
}

.floating-create > summary,
.role-badge,
.status-badge {
    border-radius: 999px;
}

.login-panel,
.cart-panel,
.sale-attribution-panel,
.table-wrap,
.stat-card,
.empty-panel,
.admin-panel,
.employee-card,
.accounting-panel,
.directory-panel,
.vehicle-lookup-panel,
.product-card,
.app-modal,
.modal-section,
.employee-panel,
.permission-tile {
    border-radius: 14px;
}

.vehicle-data-item,
.vehicle-confirmation,
.drawer-form {
    border-radius: 11px;
}

.alert {
    border-radius: 999px;
}

/* Alignement typographique global */
body *,
input,
select,
textarea,
button {
    text-align: center;
}

.employee-create-choice,
.vehicle-data-item {
    justify-items: center;
}

@media (max-width: 650px) {
    .bilan-fiscal-header {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .bilan-fiscal-left,
    .bilan-fiscal-right {
        text-align: center !important;
    }

    .bilan-balance,
    .accounting-opening-balance,
    .bilan-balance-form {
        align-items: stretch;
        flex-direction: column;
    }

    .bilan-money-input,
    .bilan-balance-form .primary-button {
        width: 100%;
    }

    .bilan-money-input input {
        width: 100%;
    }

    .partner-stats {
        grid-template-columns: 1fr;
    }

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

.product-context-menu {
    position: fixed;
    z-index: 50;
    display: grid;
    min-width: 180px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(20, 17, 31, 0.98);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
}

.product-context-menu[hidden] {
    display: none;
}

.product-context-menu button {
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    padding: 0 11px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    transition: background 0.14s ease, color 0.14s ease;
}

.product-context-menu button:hover {
    background: rgba(169, 54, 66, 0.18);
    color: #ffffff;
}

.product-context-menu button.is-danger {
    color: #fca5a5;
}

.product-context-menu button.is-danger:hover {
    background: rgba(248, 113, 113, 0.16);
    color: #fecaca;
}

.product-context-menu button.is-warning {
    color: #f1cf7c;
}

.product-context-menu button.is-warning:hover {
    background: rgba(224, 178, 75, 0.15);
    color: #ffe2a0;
}

.employee-context-menu {
    min-width: 250px;
}

.employee-context-menu button.is-warning {
    color: #f1cf7c;
}

.employee-context-menu button.is-warning:hover,
.employee-context-menu button.is-warning:focus-visible {
    background: rgba(224, 178, 75, 0.15);
    color: #ffe2a0;
}

.employee-context-menu button:focus-visible {
    outline: 2px solid rgba(169, 54, 66, 0.58);
    outline-offset: -2px;
}

/* =========================
   Modales produits - systeme final
   ========================= */

dialog.product-modal {
    --pm-bg: var(--theme-surface-raised);
    --pm-surface: var(--theme-surface);
    --pm-surface-2: var(--theme-surface-raised);
    --pm-surface-3: var(--theme-surface-soft);
    --pm-border: var(--theme-border);
    --pm-border-strong: var(--theme-border-strong);
    --pm-text: var(--theme-text);
    --pm-muted: var(--theme-muted);
    --pm-soft: var(--theme-text);
    --pm-accent: var(--theme-accent);
    --pm-pink: var(--theme-accent);

    position: relative;
    width: min(1040px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow: hidden;
    padding: 0;
}

dialog.product-modal.product-edit-modal {
    width: min(1080px, calc(100vw - 48px));
}

dialog.product-modal[id^="pos-product-"].product-edit-modal,
dialog.product-modal[id^="custom-product-"].product-edit-modal {
    width: min(760px, calc(100vw - 32px));
}

dialog.product-modal[id^="pos-category-create-"].product-edit-modal,
dialog.product-modal[id^="custom-category-create-"].product-edit-modal {
    width: min(760px, calc(100vw - 32px));
}

dialog.product-modal,
dialog.product-modal * {
    box-sizing: border-box;
    text-align: left;
}

dialog.product-modal .product-modal-form,
dialog.product-modal .product-action-modal {
    display: grid;
    align-content: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 170px),
        var(--pm-bg);
    scrollbar-width: thin;
    scrollbar-color: var(--theme-accent) var(--theme-surface-soft);
}

dialog.product-modal .product-action-modal {
    max-width: 640px;
}

/* Les actions rapides de la caisse utilisent une vraie modale compacte. */
dialog.product-modal[id^="pos-product-"]:not(.product-edit-modal),
dialog.product-modal[id^="custom-product-"]:not(.product-edit-modal),
dialog.product-modal#pos-new-category-modal,
dialog.product-modal#custom-new-category-modal {
    width: min(580px, calc(100vw - 32px));
    border-radius: 18px;
}

dialog.product-modal[id^="pos-product-"]:not(.product-edit-modal) .product-action-modal,
dialog.product-modal[id^="custom-product-"]:not(.product-edit-modal) .product-action-modal,
dialog.product-modal#pos-new-category-modal .product-action-modal,
dialog.product-modal#custom-new-category-modal .product-action-modal {
    width: 100%;
    max-width: none;
}

dialog.product-modal[id^="pos-product-"]:not(.product-edit-modal) .product-modal-head,
dialog.product-modal[id^="custom-product-"]:not(.product-edit-modal) .product-modal-head,
dialog.product-modal#pos-new-category-modal .product-modal-head,
dialog.product-modal#custom-new-category-modal .product-modal-head {
    gap: 9px;
    padding: 26px 28px 23px;
    background:
        radial-gradient(circle at 92% 10%, rgba(169, 54, 66, 0.16), transparent 35%),
        linear-gradient(135deg, var(--theme-accent-soft), transparent 72%),
        var(--pm-surface);
}

dialog.product-modal[id^="pos-product-"]:not(.product-edit-modal) .product-modal-head h2,
dialog.product-modal[id^="custom-product-"]:not(.product-edit-modal) .product-modal-head h2,
dialog.product-modal#pos-new-category-modal .product-modal-head h2,
dialog.product-modal#custom-new-category-modal .product-modal-head h2 {
    max-width: 100%;
    font-size: 26px;
    line-height: 1.16;
    overflow-wrap: anywhere;
}

dialog.product-modal[id^="pos-product-"]:not(.product-edit-modal) .product-modal-head p:not(.eyebrow),
dialog.product-modal[id^="custom-product-"]:not(.product-edit-modal) .product-modal-head p:not(.eyebrow),
dialog.product-modal#pos-new-category-modal .product-modal-head p:not(.eyebrow),
dialog.product-modal#custom-new-category-modal .product-modal-head p:not(.eyebrow) {
    max-width: 48ch;
    font-size: 14px;
}

dialog.product-modal[id^="pos-product-"]:not(.product-edit-modal) .product-modal-section,
dialog.product-modal[id^="custom-product-"]:not(.product-edit-modal) .product-modal-section,
dialog.product-modal#pos-new-category-modal .product-modal-section,
dialog.product-modal#custom-new-category-modal .product-modal-section {
    margin: 18px 24px 0;
    padding: 16px;
}

dialog.product-modal[id^="pos-product-"]:not(.product-edit-modal) .product-modal-actions,
dialog.product-modal[id^="custom-product-"]:not(.product-edit-modal) .product-modal-actions,
dialog.product-modal#pos-new-category-modal .product-modal-actions,
dialog.product-modal#custom-new-category-modal .product-modal-actions {
    position: static;
    justify-content: flex-end;
    margin-top: 18px;
    padding: 16px 24px 20px;
}

dialog.product-modal[id^="pos-product-"]:not(.product-edit-modal) .product-modal-actions button,
dialog.product-modal[id^="custom-product-"]:not(.product-edit-modal) .product-modal-actions button,
dialog.product-modal#pos-new-category-modal .product-modal-actions button,
dialog.product-modal#custom-new-category-modal .product-modal-actions button {
    min-width: 138px;
}

dialog.product-modal .product-modal-form::-webkit-scrollbar,
dialog.product-modal .product-action-modal::-webkit-scrollbar {
    width: 10px;
}

dialog.product-modal .product-modal-form::-webkit-scrollbar-track,
dialog.product-modal .product-action-modal::-webkit-scrollbar-track {
    background: var(--theme-surface-soft);
}

dialog.product-modal .product-modal-form::-webkit-scrollbar-thumb,
dialog.product-modal .product-action-modal::-webkit-scrollbar-thumb {
    border: 2px solid var(--pm-bg);
    border-radius: 999px;
    background: var(--theme-accent);
}

dialog.product-modal .product-modal-head {
    display: grid;
    gap: 8px;
    padding: 30px 84px 24px 32px;
    border-bottom: 1px solid var(--pm-border);
    background:
        linear-gradient(90deg, var(--theme-accent-soft), transparent 70%),
        var(--pm-surface);
}

dialog.product-modal .product-modal-head .eyebrow {
    margin: 0;
    color: var(--pm-accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

dialog.product-modal .product-modal-head h2 {
    margin: 0;
    color: #ffffff;
    font-size: 32px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0;
}

dialog.product-modal .product-modal-head p:not(.eyebrow) {
    margin: 0;
    color: var(--pm-muted);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.45;
}

dialog.product-modal .product-modal-section {
    display: grid;
    gap: 18px;
    margin: 20px 32px 0;
    border: 1px solid var(--pm-border);
    border-radius: 12px;
    padding: 18px;
    background: var(--pm-surface);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

dialog.product-modal .product-modal-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--pm-pink);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

dialog.product-modal .product-modal-section h3::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(226, 232, 240, 0.12);
}

dialog.product-modal .product-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

dialog.product-modal .product-form-span-2 {
    grid-column: 1 / -1;
}

dialog.product-modal label {
    display: grid;
    min-width: 0;
    gap: 8px;
    margin: 0;
    color: var(--pm-soft);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

dialog.product-modal input:not([type="checkbox"]),
dialog.product-modal select,
dialog.product-modal textarea {
    display: block;
    width: 100%;
    min-width: 0;
    height: 46px;
    border-radius: 9px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 750;
    line-height: 46px;
    text-align: center;
    appearance: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease, background 0.14s ease;
}

dialog.product-modal textarea {
    height: auto;
    min-height: 96px;
    padding-top: 12px;
    line-height: 1.45;
    resize: vertical;
}

dialog.product-modal input[type="number"] {
    text-align: center;
}





dialog.product-modal .product-switch-line {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 13px;
    border: 1px solid var(--pm-border-strong);
    border-radius: 10px;
    padding: 12px 14px;
    background: var(--pm-surface-2);
    color: #ffffff;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.3;
    justify-content: center;
    text-align: center;
    transition: border-color 0.14s ease, background 0.14s ease;
}

dialog.product-modal .product-switch-line:hover {
    border-color: var(--theme-border-strong);
    background: var(--pm-surface-3);
}

dialog.product-modal .product-switch-line input[type="checkbox"] {
    position: relative;
    width: 46px;
    min-width: 46px;
    height: 26px;
    margin: 0;
    border: 1px solid rgba(226, 232, 240, 0.22);
    border-radius: 999px;
    background: var(--theme-field);
    cursor: pointer;
    appearance: none;
    transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

dialog.product-modal .product-switch-line input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
    transition: transform 0.14s ease;
}

dialog.product-modal .product-switch-line input[type="checkbox"]:checked {
    border-color: var(--theme-accent);
    background: var(--theme-accent);
}

dialog.product-modal .product-switch-line input[type="checkbox"]:checked::after {
    transform: translateX(20px);
}

dialog.product-modal .product-switch-line input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--theme-accent-soft);
}

dialog.product-modal .product-switch-line span {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: center;
}

dialog.product-modal .product-modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 8;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 24px;
    border-top: 1px solid var(--pm-border);
    padding: 18px 32px 20px;
    background: var(--theme-surface-raised);
    backdrop-filter: blur(14px);
}

dialog.product-modal .product-modal-actions button,
dialog.product-modal .primary-button,
dialog.product-modal .ghost-button,
dialog.product-modal .danger-button {
    display: inline-flex;
    min-width: 132px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    padding: 0 18px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    appearance: none;
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}


dialog.product-modal .product-danger-modal .product-modal-head {
    background:
        linear-gradient(90deg, rgba(224, 102, 119, 0.24), rgba(241, 139, 199, 0.06)),
        var(--pm-surface);
}

dialog.product-modal .product-danger-modal .product-modal-head .eyebrow {
    color: #ffb3be;
}

dialog.product-modal .product-danger-modal .product-modal-head p:last-child {
    color: #ffd2d8;
}

dialog.product-modal .advert-modal-shell {
    display: grid;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: var(--theme-surface-raised);
}

dialog.product-modal .advert-modal-head {
    display: grid;
    gap: 8px;
    padding: 30px 32px 24px;
    border-bottom: 1px solid var(--pm-border);
    background:
        linear-gradient(90deg, var(--theme-accent-soft), transparent 70%),
        var(--pm-surface);
}

dialog.product-modal .advert-modal-head h2,
dialog.product-modal .advert-modal-head p {
    margin: 0;
    text-align: center;
}

dialog.product-modal .advert-modal-content {
    display: grid;
    gap: 18px;
    margin: 20px 32px 0;
    border: 1px solid var(--pm-border);
    border-radius: 12px;
    padding: 18px;
    background: var(--pm-surface);
}

dialog.product-modal .advert-modal-field {
    display: grid;
    gap: 8px;
    width: min(100%, 560px);
    justify-self: center;
    color: var(--pm-muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

dialog.product-modal .advert-modal-field input,
dialog.product-modal .advert-modal-field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--pm-border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.55;
    text-align: center;
    resize: vertical;
}

dialog.product-modal .advert-modal-field input {
    min-height: 48px;
}

dialog.product-modal .advert-modal-field textarea {
    min-height: 210px;
    white-space: pre-wrap;
}

dialog.product-modal .advert-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    border-top: 1px solid var(--pm-border);
    padding: 18px 32px 20px;
    background: var(--theme-surface-raised);
}

dialog.product-modal .advert-publication-status {
    display: grid;
    flex: 1;
    justify-items: start;
    gap: 5px;
}

dialog.product-modal .advert-publication-status p {
    margin: 0;
    color: var(--pm-muted);
    font-size: 13px;
}

dialog.product-modal .advert-publication-status p strong { color: var(--theme-accent); }

dialog.product-modal .advert-publication-status small { color: var(--theme-muted); }

dialog.product-modal .advert-publication-status .primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}


/* Advert workspace */
dialog.product-modal.advert-modal {
    width: min(880px, calc(100vw - 32px));
    border-radius: 22px;
}

dialog.product-modal.advert-choice-modal,
dialog.product-modal.advert-editor-modal {
    width: min(760px, calc(100vw - 32px));
    border-radius: 22px;
}

.advert-choice-list {
    display: grid;
    gap: 12px;
    padding: 6px 28px 24px;
}

.advert-choice-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    width: 100%;
    border: 1px solid var(--pm-border);
    border-radius: 16px;
    padding: 15px 17px;
    background: var(--theme-surface-soft);
    color: var(--pm-text);
    cursor: pointer;
    text-align: left;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.advert-choice-card:hover {
    border-color: var(--theme-border-strong);
    background: var(--theme-accent-soft);
    transform: translateY(-1px);
}

.advert-choice-card > span:nth-child(2) {
    display: grid;
    gap: 4px;
}

.advert-choice-card small {
    overflow: hidden;
    color: var(--pm-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.advert-choice-icon {
    display: grid;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    place-items: center;
    background: var(--theme-accent-soft);
}

.advert-choice-actions {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--pm-border);
    padding: 18px 28px 22px;
}

.advert-detail-actions {
    display: flex;
    gap: 10px;
}

.advert-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.advert-editor-grid label {
    display: grid;
    gap: 7px;
}

.advert-editor-grid input,
.advert-editor-grid textarea {
    width: 100%;
}

.advert-editor-grid textarea {
    min-height: 190px;
    resize: vertical;
    border: 1px solid var(--theme-border);
    border-radius: 9px;
    padding: 12px;
    font: inherit;
    line-height: 1.5;
}

.advert-editor-message {
    grid-column: 1 / -1;
}

dialog.product-modal .advert-modal-shell {
    border-radius: inherit;
}

dialog.product-modal .advert-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
}

dialog.product-modal .advert-modal-heading-copy {
    display: flex;
    align-items: center;
    gap: 16px;
}

dialog.product-modal .advert-modal-heading-copy > div {
    display: grid;
    gap: 4px;
}

dialog.product-modal .advert-modal-heading-copy h2,
dialog.product-modal .advert-modal-heading-copy p {
    text-align: left;
}

dialog.product-modal .advert-modal-icon {
    display: grid;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border: 1px solid var(--theme-border-strong);
    border-radius: 16px;
    place-items: center;
    background: var(--theme-accent-soft);
    font-size: 23px;
}

dialog.product-modal .advert-modal-close {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--pm-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--pm-muted);
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
    place-items: center;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

dialog.product-modal .advert-modal-close:hover {
    border-color: var(--theme-border-strong);
    background: var(--theme-accent-soft);
    color: var(--pm-text);
}

dialog.product-modal .advert-modal-content {
    gap: 14px;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 24px 28px;
    background: transparent;
}

dialog.product-modal .advert-modal-meta-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 14px;
}

dialog.product-modal .advert-modal-field {
    gap: 7px;
    width: 100%;
    color: var(--pm-muted);
    text-align: left;
}

dialog.product-modal .advert-modal-field > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 3px;
}

dialog.product-modal .advert-modal-field > span small {
    color: rgba(255, 255, 255, 0.38);
    font-size: 10px;
    font-weight: 600;
}

dialog.product-modal .advert-modal-field input,
dialog.product-modal .advert-modal-field textarea {
    border-radius: 14px;
    text-align: left;
    cursor: copy;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

dialog.product-modal .advert-modal-field input:hover,
dialog.product-modal .advert-modal-field textarea:hover {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 3px var(--theme-accent-soft);
}

dialog.product-modal .advert-modal-field textarea {
    min-height: 190px;
    padding: 18px 20px;
    line-height: 1.65;
}

dialog.product-modal .advert-modal-actions {
    align-items: center;
    gap: 20px;
    margin-top: 0;
    padding: 18px 28px 22px;
}

dialog.product-modal .advert-publication-status {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 14px;
}

dialog.product-modal .advert-publication-status .primary-button {
    grid-row: 1 / span 2;
    min-height: 46px;
    border-radius: 14px;
    padding-inline: 20px;
}

dialog.product-modal .advert-publication-status p,
dialog.product-modal .advert-publication-status small {
    grid-column: 2;
}

dialog.product-modal .advert-close-button {
    min-width: 108px;
    min-height: 46px;
    border-radius: 14px;
}

@media (max-width: 700px) {
    .advert-choice-list,
    .advert-choice-actions {
        padding-right: 18px;
        padding-left: 18px;
    }

    .advert-editor-grid {
        grid-template-columns: 1fr;
    }

    .advert-editor-message {
        grid-column: 1;
    }

    dialog.product-modal .advert-modal-head,
    dialog.product-modal .advert-modal-content,
    dialog.product-modal .advert-modal-actions {
        padding-right: 18px;
        padding-left: 18px;
    }

    dialog.product-modal .advert-modal-meta-grid {
        grid-template-columns: 1fr;
    }

    dialog.product-modal .advert-modal-actions {
        align-items: stretch;
        flex-direction: column;
    }

    dialog.product-modal .advert-publication-status {
        grid-template-columns: 1fr;
        width: 100%;
    }

    dialog.product-modal .advert-publication-status .primary-button,
    dialog.product-modal .advert-publication-status p,
    dialog.product-modal .advert-publication-status small {
        grid-column: 1;
        grid-row: auto;
    }

    dialog.product-modal .advert-close-button {
        width: 100%;
    }

    .advert-detail-actions {
        width: 100%;
    }

    .advert-detail-actions button {
        flex: 1;
    }
}

@media (max-width: 720px) {
    dialog.product-modal,
    dialog.product-modal.product-edit-modal {
        width: min(100%, calc(100vw - 16px));
        max-height: calc(100vh - 16px);
        border-radius: 14px;
    }

    dialog.product-modal .product-modal-form,
    dialog.product-modal .product-action-modal {
        max-height: calc(100vh - 16px);
    }

    dialog.product-modal .product-modal-head {
        padding: 22px 60px 18px 18px;
    }

    dialog.product-modal .product-modal-head h2 {
        font-size: 24px;
    }

    dialog.product-modal .product-modal-section {
        margin: 14px 16px 0;
        padding: 15px;
    }

    dialog.product-modal .product-form-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    dialog.product-modal .product-form-span-2 {
        grid-column: auto;
    }

    dialog.product-modal .product-modal-actions {
        padding: 14px 16px 16px;
    }

    dialog.product-modal .product-modal-actions button,
    dialog.product-modal .primary-button,
    dialog.product-modal .ghost-button,
    dialog.product-modal .danger-button {
        width: 100%;
    }
}


.declaration-v2-guided .app-header {
    display: none;
}

.declaration-v2-guided::before {
    content: "MODE SIMULATION · AUCUNE ACTION RÉELLE";
    position: sticky;
    z-index: 1000;
    top: 0;
    display: block;
    padding: 9px 16px;
    background: #7a2848;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: center;
}

.declaration-v2-guided .accounting-page > * {
    display: none !important;
}

.declaration-v2-guided .accounting-page > .accounting-salary-panel {
    display: block !important;
    margin-top: 0;
}

.declaration-v2-guided .accounting-salary-panel .accounting-summary {
    display: none !important;
}

.declaration-v2-guided .accounting-page > .declaration-guide-navigation {
    display: flex !important;
}

.declaration-v2-guided .accounting-page > dialog.app-modal {
    display: none;
}

.declaration-v2-guided .accounting-page > dialog.app-modal[open] {
    display: block !important;
}

.declaration-guide-navigation {
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

@media (max-width: 900px) {
    .accounting-page .accounting-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .accounting-page .accounting-summary .ghost-button,
    .accounting-page .accounting-total-row {
        grid-column: span 1;
    }
}

@media (max-width: 560px) {
    .accounting-page .accounting-summary {
        grid-template-columns: 1fr;
    }

    .accounting-page .accounting-summary .ghost-button,
    .accounting-page .accounting-total-row {
        grid-column: auto;
    }

    .accounting-page .accounting-summary .ghost-button {
        width: 100%;
    }
}

.declaration-guide-navigation span {
    color: var(--muted);
    font-weight: 800;
}

.declaration-v2-balance-grid {
    display: grid;
    gap: 12px;
}

.declaration-v2-balance-grid label,
.declaration-v2-balance-grid > div {
    display: grid;
    gap: 7px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
}

.declaration-v2-balance-grid input {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 12px;
    background: var(--field);
    color: var(--field-ink);
}

.declaration-v2-balance-grid span {
    color: var(--muted);
}

.declaration-v2-balance-grid strong {
    font-size: 1.2rem;
}

.declaration-v2-balance-grid .is-total {
    border-color: rgba(169, 54, 66, 0.42);
    background: rgba(169, 54, 66, 0.1);
}

.declaration-v2-tax-modal {
    width: min(720px, calc(100vw - 24px));
}

.declaration-v2-tax-slides {
    min-height: 280px;
}

.declaration-v2-tax-slide {
    display: grid;
    gap: 14px;
}

.declaration-v2-tax-slide[hidden] {
    display: none;
}

.declaration-v2-tax-slide img {
    display: block;
    width: auto;
    max-width: min(100%, 620px);
    max-height: 42vh;
    margin: 0 auto;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #090d19;
}

.declaration-v2-tax-slide p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.declaration-v2-tax-net-profit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(141, 228, 232, 0.35);
    border-radius: 12px;
    background: rgba(72, 196, 205, 0.1);
}

.declaration-v2-tax-net-profit span {
    font-weight: 800;
}

.declaration-v2-tax-net-profit strong {
    color: #8de4e8;
    font-size: 24px;
    white-space: nowrap;
}

.declaration-v2-tax-net-profit small {
    color: var(--muted);
}

@media (max-width: 620px) {
    .declaration-v2-tax-net-profit {
        align-items: flex-start;
        flex-direction: column;
    }
}

.declaration-v2-tax-actions [hidden] {
    display: none;
}

.declaration-v2-guided .partners-page > *,
.declaration-v2-guided .employee-page > * {
    display: none !important;
}

.declaration-v2-guided .partners-page > .partner-grid,
.declaration-v2-guided .employee-page > .employee-dashboard {
    display: grid !important;
}

.declaration-v2-guided .partners-page > .declaration-guide-navigation,
.declaration-v2-guided .employee-page > .declaration-guide-navigation {
    display: flex !important;
}

.declaration-v2-guided .partners-page > dialog.app-modal[open],
.declaration-v2-guided .employee-page > dialog.app-modal[open] {
    display: block !important;
}

.declaration-v2-guided .partner-card-head .compact-action,
.declaration-v2-guided .partner-channel,
.declaration-v2-guided .partner-week-summary,
.declaration-v2-guided .employee-side-panels {
    display: none !important;
}

.declaration-v2-guided .employee-dashboard {
    grid-template-columns: minmax(0, 1fr);
}

.declaration-v2-guided .declaration-guide-navigation form {
    display: block !important;
}

@media (max-width: 700px) {
    .declaration-guide-navigation {
        align-items: stretch;
        flex-direction: column;
        text-align: center;
    }

    .declaration-guide-navigation button {
        width: 100%;
    }
}


/* ========================================================================== */
/* Thème visuel commun à toutes les pages                                     */
/* Les blocs propres aux pages ne définissent plus que leur disposition.      */
/* ========================================================================== */

body :is(.page-shell, .app-layout) :is(
    .panel,
    .empty-panel,
    .cart-panel,
    .sale-attribution-panel,
    .vehicle-lookup-panel,
    .product-category-group,
    .product-card,
    .vehicle-history-search,
    .vehicle-history-card,
    .accounting-opening-balance,
    .accounting-panel,
    .expense-request,
    .bilan-balance,
    .bilan-overview-card,
    .bilan-card,
    .partner-card,
    .stat-card,
    .report-kpi,
    .report-panel,
    .reports-product-grid article,
    .employee-stat,
    .employee-panel,
    .employee-group-panel,
    .logs-panel
) {
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    background: var(--theme-surface);
    color: var(--theme-text);
    box-shadow: var(--theme-shadow);
}

body :is(.page-shell, .app-layout) :is(
    .directory-title,
    .report-panel-head,
    .vehicle-history-card-header,
    .partner-card-head,
    .employee-panel-head,
    .bilan-card-header,
    .logs-panel-head
) {
    border-color: var(--theme-border);
    background: linear-gradient(90deg, var(--theme-accent-soft), rgba(255, 255, 255, 0.012));
}

body :is(.page-shell, .app-layout) :is(h1, h2, h3, strong, dt) {
    color: var(--theme-heading);
}

body :is(.page-shell, .app-layout) :is(
    .section-heading p,
    .sale-item,
    .empty-state,
    small,
    dd,
    .product-category,
    .product-meta
) {
    color: var(--theme-muted);
}

body :is(.page-shell, .app-layout, dialog) :is(
    input:not([type="checkbox"]):not([type="radio"]):not([data-auto-save-money-input]),
    select,
    textarea
) {
    border-color: var(--theme-border);
    background: var(--theme-field);
    color: var(--theme-text);
    color-scheme: dark;
}

body :is(.page-shell, .app-layout, dialog) :is(
    input:not([type="checkbox"]):not([type="radio"]):not([data-auto-save-money-input]),
    select,
    textarea
):focus {
    border-color: var(--theme-accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--theme-accent-soft);
}

body :is(.page-shell, .app-layout, dialog) :is(input, textarea)::placeholder {
    color: color-mix(in srgb, var(--theme-muted) 72%, transparent);
}

/* Menus déroulants compacts de la caisse */
.app-layout :is(#saleCashier, #saleCollaborator, #billingTarget) {
    width: 100%;
    min-height: 36px;
    appearance: none;
    border: 1px solid var(--theme-border);
    border-radius: 9px;
    padding: 0 34px 0 11px;
    background-color: color-mix(in srgb, var(--theme-field) 88%, var(--theme-accent) 12%);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23b9b4cc' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
    background-position: right 10px center, 0 0;
    background-repeat: no-repeat;
    background-size: 16px 16px, 100% 100%;
    color: var(--theme-text);
    color-scheme: dark;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.app-layout :is(#saleCashier, #saleCollaborator, #billingTarget):hover {
    border-color: var(--theme-border-strong);
    background-color: color-mix(in srgb, var(--theme-field) 80%, var(--theme-accent) 20%);
}

.app-layout :is(#saleCashier, #saleCollaborator, #billingTarget):focus {
    border-color: var(--theme-accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--theme-accent-soft);
}

.app-layout :is(#saleCashier, #saleCollaborator, #billingTarget) option {
    background: var(--theme-surface-raised);
    color: var(--theme-text);
    font-weight: 600;
    text-align: left;
}

.app-layout #partnerInvoiceTotal {
    color: var(--theme-partner-price);
}

.app-layout #partnerOnsiteTotal {
    color: var(--theme-onsite-price);
}







body .page-shell :is(
    .accounting-table,
    .partner-invoice-table,
    .reports-table,
    .employee-table,
    .hr-history-table,
    .vehicle-catalog-table,
    .logs-table
) {
    border-color: var(--theme-border);
    background: transparent;
    color: var(--theme-text);
}

body .page-shell :is(
    .accounting-table,
    .partner-invoice-table,
    .reports-table,
    .employee-table,
    .hr-history-table,
    .vehicle-catalog-table,
    .logs-table
) th {
    border-color: var(--theme-border);
    background: var(--theme-table-head);
    color: var(--theme-muted);
}

body .page-shell :is(
    .accounting-table,
    .partner-invoice-table,
    .reports-table,
    .employee-table,
    .hr-history-table,
    .vehicle-catalog-table,
    .logs-table
) td {
    border-color: var(--theme-border);
    background: var(--theme-table-row);
    color: var(--theme-text);
}

body .page-shell :is(
    .accounting-table,
    .partner-invoice-table,
    .reports-table,
    .employee-table,
    .hr-history-table,
    .vehicle-catalog-table,
    .logs-table
) tbody tr:nth-child(even) td {
    background: var(--theme-table-row-alt);
}

body .page-shell :is(
    .accounting-table,
    .partner-invoice-table,
    .reports-table,
    .employee-table,
    .hr-history-table,
    .vehicle-catalog-table,
    .logs-table
) tbody tr:hover td {
    background: var(--theme-table-row-hover);
}

/* Vente, bénéfice et salaire partagent le même repère vert. */
body .accounting-page .accounting-table th:nth-child(6),
body .accounting-page .accounting-table td:nth-child(6),
body .accounting-page .accounting-table th:nth-child(7),
body .accounting-page .accounting-table td:nth-child(7),
body .accounting-page .accounting-table th:nth-child(9),
body .accounting-page .accounting-table td:nth-child(9) {
    background: rgba(75, 160, 110, 0.15);
    color: #8be4b8;
}

/* Le gain entreprise conserve un repère bleu clair distinct. */
body .accounting-page .accounting-table th:nth-child(8),
body .accounting-page .accounting-table td:nth-child(8) {
    background: rgba(86, 186, 196, 0.14);
    color: #8ddfe5;
}

body .accounting-page .accounting-table tbody tr:hover :is(
    td:nth-child(6),
    td:nth-child(7),
    td:nth-child(8),
    td:nth-child(9)
) {
    filter: brightness(1.2);
}

body .accounting-page .accounting-table .accounting-column-totals :is(th, td) {
    border-top-color: var(--theme-border-strong);
    font-weight: 900;
}

body dialog:is(.app-modal, .product-modal) {
    border-color: var(--theme-border);
    background: var(--theme-surface-raised);
    color: var(--theme-text);
    box-shadow: 0 28px 80px rgba(3, 5, 17, 0.62);
}

body dialog:is(.app-modal, .product-modal)::backdrop {
    background: rgba(4, 5, 14, 0.74);
    backdrop-filter: blur(5px);
}

body dialog:is(.app-modal, .product-modal) :is(
    .modal-head,
    .product-modal-head,
    .advert-modal-head,
    .modal-section,
    .product-modal-section
) {
    border-color: var(--theme-border);
    background-color: transparent;
    color: var(--theme-text);
}

body .eyebrow {
    color: var(--theme-accent);
}



body :is(.status-pill, .partner-discord-status, .partner-payment-select) {
    box-shadow: none;
}

body .page-shell :is(
    .partner-invoice-panel,
    .accounting-panel,
    .employee-panel,
    .hr-history-panel,
    .logs-panel
) > .directory-title {
    border-color: var(--theme-border);
    background: linear-gradient(90deg, var(--theme-accent-soft), rgba(255, 255, 255, 0.012));
}

body .page-shell :is(
    .partner-invoice-panel,
    .accounting-panel,
    .employee-panel,
    .hr-history-panel,
    .logs-panel
) > .directory-title h2::before {
    background: var(--theme-accent);
}

/* Logs : structure propre, sans dépendance aux styles Partenaires. */
.logs-page {
    display: grid;
    gap: 18px;
    width: min(100%, 1380px);
    margin: 0 auto;
}

.logs-heading-description {
    margin: 6px 0 0;
    color: var(--theme-muted);
}

.logs-view-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.logs-view-switch a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    padding: 10px 14px;
    background: var(--theme-surface);
    color: var(--theme-muted);
    box-shadow: var(--theme-shadow);
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.logs-view-switch a:hover,
.logs-view-switch a:focus-visible,
.logs-view-switch a.is-active {
    border-color: var(--theme-border-strong);
    background: var(--theme-accent-soft);
    color: var(--theme-heading);
    outline: none;
    transform: translateY(-1px);
}

.logs-view-switch a.is-active {
    box-shadow: inset 3px 0 0 var(--theme-accent), var(--theme-shadow);
}

.logs-switch-icon {
    display: grid;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    place-items: center;
    background: var(--theme-accent-soft);
    color: var(--theme-accent);
    font-weight: 900;
}

.logs-view-switch strong,
.logs-result-count {
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    padding: 5px 9px;
    background: var(--theme-surface-soft);
    color: var(--theme-muted);
    font-size: 12px;
}

.logs-panel {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--theme-border);
    border-radius: 18px;
}

.logs-panel > .directory-title {
    min-height: 70px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--theme-border);
}

.logs-panel > .directory-title h2 {
    position: relative;
    padding-left: 14px;
}

.logs-panel > .directory-title h2::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 4px;
    height: 26px;
    border-radius: 999px;
    background: var(--theme-accent);
    content: "";
    transform: translateY(-50%);
}

.logs-panel-tools,
.logs-member-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logs-member-filter label {
    color: var(--theme-muted);
    font-size: 12px;
    font-weight: 800;
}

.logs-member-filter select {
    min-width: 220px;
    min-height: 38px;
    border-radius: 9px;
    padding: 0 10px;
}

.logs-panel .accounting-table-wrap {
    overflow: auto;
    padding: 0;
}

.logs-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: separate;
    border-spacing: 0;
}

.logs-table th,
.logs-table td {
    height: 50px;
    padding: 10px 11px;
    text-align: center;
    vertical-align: middle;
}

.logs-table th {
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.logs-week-row th {
    height: 38px;
    background: var(--theme-accent-soft) !important;
    color: var(--theme-accent) !important;
    text-align: left;
}

.logs-week-row th span {
    color: var(--theme-muted);
}

.logs-modal-row > td {
    height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.logs-modal-row:hover > td {
    background: transparent !important;
}

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

    .logs-panel > .directory-title,
    .logs-panel-tools,
    .logs-member-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .logs-member-filter select {
        width: 100%;
        min-width: 0;
    }
}

/* Passe responsive globale : navigation, surfaces tactiles et point de vente. */
.mobile-cart-toggle {
    display: none;
}

@media (max-width: 900px) {
    .app-header {
        gap: 12px;
    }

    .app-brand {
        width: 100%;
        justify-content: center;
    }

    .main-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 7px;
    }

    .main-nav > a,
    .main-nav > .nav-group > .nav-group-summary {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        border: 1px solid var(--theme-border);
        border-radius: 10px;
        background: var(--theme-surface-soft);
    }

    .main-nav > .nav-group {
        min-width: 0;
    }

    .nav-group-menu a {
        min-height: 44px;
    }

    .user-menu {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, auto));
        justify-content: center;
        gap: 8px;
    }

    .user-menu > span {
        grid-column: 1 / -1;
        text-align: center;
    }

    .user-menu :is(.action-center-trigger, .topbar-advert-button, .logout-button) {
        min-height: 42px;
        justify-content: center;
    }

    .page-shell {
        padding: 16px;
    }

    .app-layout {
        padding-bottom: 92px;
    }

    .cart-column,
    .cart-column.has-sale-attribution {
        position: fixed;
        inset: 8px 8px 72px;
        z-index: 900;
        display: grid;
        width: auto;
        max-width: none;
        height: auto;
        max-height: none;
        align-self: auto;
        margin: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 4px;
        border: 1px solid var(--theme-border-strong);
        border-radius: 17px;
        background: #0f0f22;
        box-shadow: 0 0 0 100vmax rgba(4, 4, 14, 0.76), 0 24px 70px rgba(0, 0, 0, 0.68);
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transform: translateY(24px) scale(0.985);
        transform-origin: bottom center;
        transition: transform 180ms ease, opacity 150ms ease, visibility 0s linear 180ms;
    }

    .cart-column.is-mobile-open,
    .cart-column.has-sale-attribution.is-mobile-open {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        transform: translateY(0);
        transition-delay: 0s;
    }

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

    .cart-column > :is(.cart-panel, .sale-attribution-panel) {
        width: 100%;
    }

    .mobile-cart-toggle {
        position: fixed;
        right: 16px;
        bottom: 16px;
        z-index: 910;
        display: inline-flex;
        min-height: 48px;
        align-items: center;
        gap: 10px;
        padding: 0 10px 0 17px;
        border: 1px solid rgba(169, 54, 66, 0.55);
        border-radius: 999px;
        color: #190d16;
        background: var(--theme-accent);
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
        font: inherit;
        font-weight: 900;
        cursor: pointer;
    }

    .mobile-cart-toggle strong {
        display: grid;
        min-width: 30px;
        height: 30px;
        place-items: center;
        padding: 0 7px;
        border-radius: 999px;
        background: rgba(25, 13, 22, 0.14);
        font-size: 12px;
    }

    .accounting-table-wrap,
    .employee-table-wrap,
    .reports-table-wrap,
    .vehicle-catalog-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
}

@media (max-width: 600px) {
    .app-header {
        padding: 12px;
    }

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

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

    .user-menu > span,
    .user-menu .action-center-trigger {
        grid-column: 1 / -1;
    }

    .page-shell,
    .app-layout {
        padding-right: 12px;
        padding-left: 12px;
    }

    .section-heading {
        gap: 12px;
    }

    .section-heading :is(.primary-button, .ghost-button, .danger-button) {
        width: 100%;
    }

    .pos-category-strip {
        gap: 7px;
        padding: 10px 12px;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    .pos-category-strip > * {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .sales-mode-switch {
        width: calc(100% - 24px);
        margin-top: 10px;
    }

    .sales-mode-switch a {
        min-height: 44px;
        padding: 0 9px;
    }

    .product-category-groups .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .product-category-groups .product-card {
        min-width: 0;
        padding: 9px;
    }

    .product-category-groups .product-image {
        height: 62px;
    }

    .product-category-groups .product-card strong,
    .product-category-groups .product-price {
        overflow-wrap: anywhere;
    }

    .app-modal,
    dialog.product-modal,
    .vehicle-catalog-modal {
        width: calc(100vw - 12px);
        max-width: none;
        max-height: calc(100dvh - 12px);
        border-radius: 14px;
    }

    .modal-form,
    dialog.product-modal :is(.product-modal-form, .product-action-modal),
    .vehicle-catalog-shell {
        padding: 16px;
    }

    .modal-actions,
    dialog.product-modal .product-modal-actions {
        position: sticky;
        bottom: 0;
        z-index: 4;
        display: grid;
        grid-template-columns: 1fr;
        padding: 12px 0 0;
        background: var(--theme-surface-raised);
    }

    .modal-actions > *,
    dialog.product-modal .product-modal-actions > * {
        width: 100%;
        min-width: 0;
    }

    :is(input, select, textarea, button) {
        font-size: 16px;
    }

    .action-center-panel {
        width: 100%;
        border-left: 0;
    }

    .action-center-head,
    .action-center-list {
        padding-right: 14px;
        padding-left: 14px;
    }

    .mobile-cart-toggle {
        right: 12px;
        bottom: 12px;
        max-width: calc(100vw - 24px);
    }

    .vehicle-history-card-header {
        padding: 15px;
    }

    .vehicle-history-timeline {
        padding: 6px 12px 15px;
    }

    .vehicle-history-merge-bar {
        align-items: stretch;
        flex-direction: column;
        margin: 12px 12px 0;
    }

    .vehicle-history-merge-bar button {
        width: 100%;
    }

    .vehicle-history-event-content li {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .vehicle-history-invoice-form,
    .vehicle-history-invoice-form .button,
    .vehicle-history-invoice-form button {
        width: 100%;
    }

    .logs-panel,
    .accounting-panel,
    .employee-panel {
        min-width: 0;
    }
}

@media (max-width: 390px) {
    .product-category-groups .product-grid {
        grid-template-columns: 1fr;
    }

    .app-brand > span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Keep the reports dashboard hierarchy above the shared card skin. */
body .reports-page .report-kpi,
body .reports-page .report-panel {
    border-radius: 16px;
    background: var(--reports-card);
}

body .reports-page .reports-product-grid article {
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body .reports-page .reports-product-grid article:nth-child(odd) {
    border-right-width: 1px;
}

body .reports-page .reports-product-grid article:nth-last-child(-n+2) {
    border-bottom-width: 0;
}

@media (max-width: 1120px) {
    body .reports-page .reports-product-grid article:nth-child(odd) {
        border-right-width: 0;
    }

    body .reports-page .reports-product-grid article:nth-last-child(2) {
        border-bottom-width: 1px;
    }
}
.contract-required-modal {
    width: min(1100px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100dvh - 24px);
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(169, 54, 66, .28);
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 0, rgba(169, 54, 66, .12), transparent 38%),
        linear-gradient(145deg, #25263f, #1c2035);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.contract-required-modal.is-details {
    width: min(780px, calc(100vw - 24px));
}

.contract-required-modal::backdrop {
    background: rgba(5, 8, 13, .88);
}

.contract-required-content {
    width: 100%;
    padding: clamp(24px, 4vw, 42px);
}

.contract-required-content > .modal-head {
    max-width: 650px;
    margin: 0 auto 28px;
    text-align: center;
}

.contract-required-content > .modal-head h2 {
    margin: 7px 0 10px;
    font-size: clamp(25px, 3vw, 34px);
}

.contract-required-content > .modal-head p:last-child {
    margin-bottom: 0;
    color: rgba(239, 237, 247, .72);
    line-height: 1.55;
}

.contract-completion-form {
    display: grid;
    gap: 24px;
}

.contract-completion-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.contract-completion-grid label {
    display: grid;
    gap: 7px;
    color: var(--text-soft, #c8c5d8);
    font-weight: 700;
}

.contract-completion-grid input,
.contract-completion-grid textarea {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(9, 12, 27, .72);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.contract-completion-grid input:focus,
.contract-completion-grid textarea:focus {
    border-color: #a93642;
    background: rgba(9, 12, 27, .92);
    box-shadow: 0 0 0 3px rgba(169, 54, 66, .14);
    outline: none;
}

.contract-address-field {
    grid-column: 1 / -1;
}

.contract-completion-actions {
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.contract-modal-logout {
    display: flex;
    justify-content: flex-start;
    margin-top: 14px;
}

.contract-retry-form {
    display: flex;
    justify-content: center;
    margin: 10px 0 22px;
}

.contract-status-message,
.contract-bot-offline {
    margin: 0 auto 22px;
    padding: 13px 16px;
    max-width: 620px;
    border: 1px solid rgba(232, 155, 53, .35);
    border-radius: 12px;
    background: rgba(232, 155, 53, .1);
    color: #f4d7ad;
    text-align: center;
}

.contract-bot-offline {
    display: grid;
    gap: 4px;
}

.contract-bot-offline span {
    color: rgba(244, 215, 173, .75);
    font-size: 14px;
}

@media (max-width: 640px) {
    .contract-required-content {
        padding: 24px 18px;
    }

    .contract-completion-grid {
        grid-template-columns: 1fr;
    }

    .contract-address-field {
        grid-column: auto;
    }

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

    .contract-completion-actions button {
        width: 100%;
    }
}

.contract-pdf-frame {
    width: 100%;
    height: clamp(320px, 46dvh, 620px);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: #fff;
}

@media (max-height: 760px) {
    .contract-required-content {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .contract-required-content > .modal-head {
        margin-bottom: 18px;
    }

    .contract-pdf-frame {
        height: 38dvh;
        min-height: 260px;
    }
}

/* Partenaires — vue de facturation compacte */
.partners-page {
    width: min(100%, 1480px);
    gap: 14px;
}

.partners-page > .section-heading {
    align-items: center;
    padding: 20px 22px;
    border: 1px solid rgba(169, 54, 66, .18);
    border-radius: 17px;
    background:
        radial-gradient(circle at 0 0, rgba(169, 54, 66, .12), transparent 34%),
        linear-gradient(120deg, rgba(31, 27, 49, .97), rgba(22, 29, 48, .97));
}

.partners-page > .section-heading h1 {
    margin: 3px 0 0;
    font-size: clamp(24px, 2.4vw, 34px);
    letter-spacing: -.035em;
}

.partners-page .partners-subtitle {
    margin-top: 5px;
    font-size: 13px;
}

.partner-period-badge {
    display: grid;
    gap: 3px;
    min-width: 155px;
    padding: 9px 12px;
    border: 1px solid rgba(174, 189, 195, .22);
    border-radius: 11px;
    background: rgba(8, 12, 26, .35);
    text-align: right;
}

.partner-period-badge span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.partner-period-badge strong {
    color: #b7c5ca;
    font-size: 13px;
}

.partners-page .partner-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(10, 13, 27, .48);
}

.partners-page .partner-stats .stat-card {
    position: relative;
    display: grid;
    min-height: 78px;
    align-content: center;
    gap: 5px;
    padding: 13px 18px 13px 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.partners-page .partner-stats .stat-card + .stat-card {
    border-left: 1px solid var(--line);
}

.partners-page .partner-stats .stat-card::before {
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 0;
    width: 2px;
    border-radius: 2px;
    background: #7896c8;
    content: "";
}

.partners-page .partner-stats .is-sales::before { background: #56bac4; }
.partners-page .partner-stats .is-amount::before { background: #38d9a9; }
.partners-page .partner-stats .is-pending::before { background: #a93642; }

.partners-page .partner-stats .stat-card span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.partners-page .partner-stats .stat-card strong {
    font-size: 22px;
    line-height: 1.1;
}

.partner-billing-panel,
.partners-page .partner-invoice-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: rgba(9, 12, 25, .52);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .12);
}

.partner-section-heading {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .018);
}

.partner-section-heading .eyebrow { margin: 0 0 3px; }
.partner-section-heading h2 { margin: 0; font-size: 18px; }
.partner-section-heading > span {
    padding: 6px 10px;
    border: 1px solid rgba(169, 54, 66, .2);
    border-radius: 999px;
    background: rgba(169, 54, 66, .07);
    color: #ef9fc5;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.partners-page .partner-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.partners-page .partner-entry + .partner-entry {
    border-top: 1px solid var(--line);
}

.partners-page .partner-card {
    display: grid;
    grid-template-columns: minmax(205px, 1.15fr) minmax(155px, .8fr) minmax(430px, 2.25fr) 150px;
    gap: 18px;
    min-height: 112px;
    align-items: center;
    padding: 14px 18px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.partners-page .partner-entry:nth-child(even) .partner-card {
    background: rgba(255, 255, 255, .014) !important;
}

.partners-page .partner-card:not(.is-inactive):hover {
    background: rgba(120, 142, 151, .045) !important;
}

.partners-page .partner-card-head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 0;
    border: 0;
}

.partner-avatar {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(169, 54, 66, .28);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(169, 54, 66, .16), rgba(120, 142, 151, .12));
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

.partner-card-identity {
    display: grid;
    min-width: 0;
    justify-items: start;
    gap: 5px;
}

.partners-page .partner-card-head h2 {
    width: 100%;
    margin: 0;
    font-size: 15px;
    text-overflow: ellipsis;
}

.partner-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.partner-state::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7be0b1;
    content: "";
}

.partner-state.is-inactive::before { background: #f58a9d; }
.partners-page .partner-inactive-ribbon { display: none; }

.partners-page .partner-channel {
    display: grid;
    justify-content: start;
    gap: 5px;
    padding: 0;
    border: 0;
    background: none;
}

.partners-page .partner-channel span { font-size: 9px; }
.partners-page .partner-channel code {
    max-width: 100%;
    padding: 5px 7px;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 7px;
    background: rgba(255, 255, 255, .025);
    font-size: 10px;
}

.partners-page .partner-week-summary {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
}

.partners-page .partner-sales-count {
    display: grid;
    justify-items: start;
    gap: 6px;
}

.partners-page .partner-sales-count span { font-size: 9px; }
.partners-page .partner-sales-count strong { font-size: 12px; }

.partners-page .partner-price-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-color: rgba(148, 163, 184, .14);
    border-radius: 10px;
    background: rgba(7, 10, 21, .24);
}

.partners-page .partner-price-breakdown > div {
    display: grid;
    min-height: 58px;
    align-content: center;
    justify-items: center;
    gap: 4px;
    padding: 8px 10px;
}

.partners-page .partner-price-breakdown > div + div {
    border-top: 0;
    border-left: 1px solid var(--line);
}

.partners-page .partner-price-breakdown dt { font-size: 9px; text-transform: uppercase; }
.partners-page .partner-price-breakdown dd { font-size: 13px; }
.partners-page .partner-price-breakdown .partner-net-row dd { font-size: 16px; }
.partners-page .partner-discount-row,
.partners-page .partner-net-row { background: transparent; }

.partners-page .partner-card > form { width: 100%; margin: 0; }
.partners-page .partner-card > form .primary-button {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 11px;
    box-shadow: none;
}

.partners-page .partner-card.is-inactive { opacity: .54; }

.partners-page .partner-invoice-panel > .directory-title {
    min-height: 64px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, .018);
}

.partners-page .partner-invoice-panel .accounting-table-wrap { overflow-x: visible; }
.partners-page .partner-invoice-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.partners-page .partner-invoice-table th,
.partners-page .partner-invoice-table td {
    overflow: hidden;
    padding-right: 7px;
    padding-left: 7px;
    text-overflow: ellipsis;
}

.partners-page .partner-invoice-table th:nth-child(1) { width: 16%; }
.partners-page .partner-invoice-table th:nth-child(2) { width: 13%; }
.partners-page .partner-invoice-table th:nth-child(3) { width: 14%; }
.partners-page .partner-invoice-table th:nth-child(4) { width: 8%; }
.partners-page .partner-invoice-table th:nth-child(5) { width: 10%; }
.partners-page .partner-invoice-table th:nth-child(6) { width: 11%; }
.partners-page .partner-invoice-table th:nth-child(7) { width: 10%; }
.partners-page .partner-invoice-table th:nth-child(8) { width: 9%; }
.partners-page .partner-invoice-table th:nth-child(9) { width: 9%; }

@media (max-width: 1120px) {
    .partners-page .partner-card {
        grid-template-columns: minmax(210px, 1fr) minmax(0, 2fr) 145px;
    }
    .partners-page .partner-channel { display: none; }
    .partners-page .partner-invoice-panel .accounting-table-wrap { overflow-x: auto; }
    .partners-page .partner-invoice-table { min-width: 980px; table-layout: auto; }
}

@media (max-width: 820px) {
    .partners-page .partner-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .partners-page .partner-stats .stat-card:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
    .partners-page .partner-stats .stat-card:nth-child(4) { border-top: 1px solid var(--line); }
    .partners-page .partner-card { grid-template-columns: 1fr auto; }
    .partners-page .partner-week-summary { grid-column: 1 / -1; grid-row: 2; }
    .partners-page .partner-card > form { grid-column: 2; grid-row: 1; width: 145px; }
}

@media (max-width: 620px) {
    .partners-page > .section-heading { align-items: stretch; padding: 17px; }
    .partner-heading-actions { display: grid; grid-template-columns: 1fr; }
    .partner-period-badge { width: 100%; text-align: left; }
    .partners-page .partner-stats { grid-template-columns: 1fr; }
    .partners-page .partner-stats .stat-card + .stat-card { border-top: 1px solid var(--line); border-left: 0; }
    .partner-section-heading { align-items: flex-start; flex-direction: column; }
    .partners-page .partner-card { grid-template-columns: 1fr; gap: 13px; padding: 16px; }
    .partners-page .partner-card > form,
    .partners-page .partner-week-summary { grid-column: auto; grid-row: auto; width: 100%; }
    .partners-page .partner-week-summary { grid-template-columns: 1fr; }
    .partners-page .partner-price-breakdown { grid-template-columns: 1fr; }
    .partners-page .partner-price-breakdown > div { grid-template-columns: 1fr auto; justify-items: stretch; min-height: 42px; }
    .partners-page .partner-price-breakdown > div + div { border-top: 1px solid var(--line); border-left: 0; }
    .partners-page .partner-price-breakdown dd { text-align: right; }
}

/* Historique partenaire — registre de factures */
.partners-page .partner-invoice-panel > .directory-title > div {
    display: grid;
    gap: 3px;
}

.partners-page .partner-invoice-panel > .directory-title .eyebrow {
    margin: 0;
    font-size: 9px;
}

.partners-page .partner-invoice-panel > .directory-title h2 {
    margin: 0;
    font-size: 18px;
}

.partners-page .partner-invoice-table {
    min-width: 0;
    table-layout: fixed;
}

.partners-page .partner-invoice-table th {
    height: 42px;
    padding: 0 14px;
    background: rgba(255, 255, 255, .025);
    color: #9fa7bd;
    text-align: left;
}

.partners-page .partner-invoice-table td {
    height: 74px;
    padding: 11px 14px;
    text-align: left;
    white-space: normal;
}

.partners-page .partner-invoice-table th:nth-child(1) { width: 22%; }
.partners-page .partner-invoice-table th:nth-child(2) { width: 16%; }
.partners-page .partner-invoice-table th:nth-child(3) { width: 10%; }
.partners-page .partner-invoice-table th:nth-child(4) { width: 23%; }
.partners-page .partner-invoice-table th:nth-child(5) { width: 11%; }
.partners-page .partner-invoice-table th:nth-child(6) { width: 18%; }

.partners-page .partner-invoice-table tbody tr {
    transition: background-color .16s ease;
}

.partners-page .partner-invoice-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, .012);
}

.partner-invoice-identity {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.partners-page .partner-invoice-number {
    overflow: hidden;
    color: #ee8cbb;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-invoice-identity small {
    color: var(--muted);
    font-size: 10px;
}

.partner-invoice-name {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-invoice-period {
    display: inline-flex;
    padding: 5px 8px;
    border: 1px solid rgba(174, 189, 195, .18);
    border-radius: 7px;
    background: rgba(120, 142, 151, .07);
    color: #a8caff;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.partner-invoice-calculation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 9px;
    background: rgba(7, 10, 21, .22);
}

.partner-invoice-calculation > span {
    display: grid;
    min-width: 0;
    gap: 3px;
    padding: 7px 9px;
}

.partner-invoice-calculation > span + span {
    border-left: 1px solid var(--line);
}

.partner-invoice-calculation small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.partner-invoice-calculation strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-invoice-calculation strong.has-discount { color: #7be0b1; }

.partner-invoice-total {
    color: #8de4e8;
    font-size: 15px;
    white-space: nowrap;
}

.partner-invoice-tracking {
    display: flex;
    align-items: center;
    gap: 7px;
}

.partner-invoice-tracking form { margin: 0; }
.partners-page .partner-invoice-tracking .partner-discord-status,
.partners-page .partner-invoice-tracking .partner-payment-select {
    min-width: 0;
    min-height: 30px;
    font-size: 9px;
}

.partners-page .partner-invoice-tracking .partner-payment-select {
    width: 94px;
    padding-right: 24px;
}

@media (max-width: 1120px) and (min-width: 761px) {
    .partners-page .partner-invoice-panel .accounting-table-wrap { overflow-x: visible; }
    .partners-page .partner-invoice-table { min-width: 0; table-layout: fixed; }
    .partners-page .partner-invoice-table th,
    .partners-page .partner-invoice-table td { padding-right: 8px; padding-left: 8px; }
    .partner-invoice-tracking { align-items: flex-start; flex-direction: column; }
    .partners-page .partner-invoice-table th:nth-child(1) { width: 21%; }
    .partners-page .partner-invoice-table th:nth-child(2) { width: 15%; }
    .partners-page .partner-invoice-table th:nth-child(3) { width: 10%; }
    .partners-page .partner-invoice-table th:nth-child(4) { width: 25%; }
    .partners-page .partner-invoice-table th:nth-child(5) { width: 12%; }
    .partners-page .partner-invoice-table th:nth-child(6) { width: 17%; }
}

@media (max-width: 760px) {
    .partners-page .partner-invoice-panel .accounting-table-wrap {
        overflow: visible;
        padding: 10px;
    }
    .partners-page .partner-invoice-table,
    .partners-page .partner-invoice-table tbody {
        display: grid;
        width: 100%;
        min-width: 0;
        gap: 10px;
    }
    .partners-page .partner-invoice-table thead { display: none; }
    .partners-page .partner-invoice-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(255, 255, 255, .018);
    }
    .partners-page .partner-invoice-table td {
        display: grid;
        height: auto;
        min-height: 64px;
        align-content: center;
        gap: 5px;
        padding: 10px 12px;
        border: 0;
        border-bottom: 1px solid var(--line);
    }
    .partners-page .partner-invoice-table td:nth-child(odd) { border-right: 1px solid var(--line); }
    .partners-page .partner-invoice-table td::before {
        color: var(--muted);
        font-size: 8px;
        font-weight: 800;
        letter-spacing: .055em;
        text-transform: uppercase;
        content: attr(data-label);
    }
    .partners-page .partner-invoice-table td:nth-last-child(-n+2) { border-bottom: 0; }
    .partner-invoice-tracking { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
    .partners-page .partner-invoice-table tbody tr { grid-template-columns: 1fr; }
    .partners-page .partner-invoice-table td:nth-child(odd) { border-right: 0; }
    .partners-page .partner-invoice-table td:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

/* Rapports — tableau de pilotage hebdomadaire */
.reports-page {
    width: min(100%, 1480px);
    gap: 14px;
}

.reports-page .reports-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 20px 22px;
    border: 1px solid rgba(169, 54, 66, .18);
    border-radius: 17px;
    background:
        radial-gradient(circle at 0 0, rgba(169, 54, 66, .12), transparent 34%),
        linear-gradient(120deg, rgba(31, 27, 49, .97), rgba(22, 29, 48, .97));
}

.reports-page .reports-hero-copy h1 {
    margin: 3px 0 5px;
    font-size: clamp(24px, 2.4vw, 34px);
}

.reports-page .reports-hero-copy > p:last-child { font-size: 13px; }

.reports-page .reports-period-form {
    grid-template-columns: minmax(145px, auto) 76px 70px auto;
    gap: 8px;
    padding: 9px;
    border-color: rgba(174, 189, 195, .18);
    border-radius: 12px;
    background: rgba(8, 12, 26, .36);
}

.reports-page .reports-period-title span,
.reports-page .reports-period-form label {
    font-size: 9px;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.reports-page .reports-period-title strong { color: #b7c5ca; font-size: 13px; }
.reports-page .reports-period-form input,
.reports-page .reports-period-form button { min-height: 34px; }

.reports-page .reports-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(10, 13, 27, .48);
}

.reports-page .report-kpi {
    min-height: 88px;
    align-content: center;
    gap: 5px;
    padding: 13px 18px 13px 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.reports-page .report-kpi + .report-kpi { border-left: 1px solid var(--line); }
.reports-page .report-kpi::before { top: 20px; bottom: 20px; height: auto; border-radius: 3px; }
.reports-page .report-kpi.is-profit::before { background: #38d9a9; }
.reports-page .report-kpi.is-sales::before { background: #56bac4; }
.reports-page .report-kpi.is-result::before { background: #a93642; }
.reports-page .report-kpi-label { font-size: 9px; }
.reports-page .report-kpi strong { font-size: 22px; }
.reports-page .report-kpi small { font-size: 10px; }

.reports-page .reports-section-heading {
    margin: 10px 0 0;
    padding: 0 2px;
}

.reports-page .reports-section-heading > div > span {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 9px;
}

.reports-page .reports-section-heading h2 { font-size: 17px; }
.reports-page .reports-section-heading p { font-size: 11px; }

.reports-page .report-panel {
    margin: 0;
    border-radius: 15px;
    background: rgba(9, 12, 25, .52);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .1);
}

.reports-financial-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reports-financial-half { min-width: 0; }
.reports-financial-half + .reports-financial-half { border-left: 1px solid var(--line); }
.reports-financial-half .report-panel-head { background: rgba(255, 255, 255, .018); }
.reports-financial-half.is-income .report-panel-kicker { color: #56bac4; }
.reports-financial-half.is-expenses .report-panel-kicker { color: #a93642; }

.reports-page .report-panel-head {
    min-height: 58px;
    padding: 11px 15px;
}

.reports-page .report-panel-head h3 { font-size: 15px; }
.reports-page .report-panel-head > span { font-size: 10px; }

.reports-page .report-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: var(--line);
}

.reports-page .report-metrics div {
    min-height: 66px;
    gap: 5px;
    padding: 10px 13px;
    background: rgba(11, 14, 29, .96);
}

.reports-page .report-metrics span { font-size: 10px; }
.reports-page .report-metrics strong { font-size: 16px; }

.reports-page .reports-hourly-panel .report-panel-head { min-height: 64px; }
.reports-page .reports-peak-hour { padding: 7px 10px; font-size: 11px; }
.reports-page .reports-peak-hour > span { font-size: 8px; }

.reports-page .reports-hourly-chart {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 4px;
    padding: 14px 15px 12px;
    background: transparent;
}

.reports-page .reports-hour-row {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 16px 82px 16px;
    gap: 4px;
    min-width: 0;
    min-height: 126px;
    align-items: stretch;
    justify-items: center;
    padding: 5px 2px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
}

.reports-page .reports-hour-row:nth-child(odd) { border: 0; }
.reports-page .reports-hour-row.is-peak {
    background: rgba(86, 186, 196, .08);
    box-shadow: inset 0 0 0 1px rgba(86, 186, 196, .18);
}

.reports-page .reports-hour-row > b {
    color: var(--ink);
    font-size: 10px;
}

.reports-page .reports-hour-row > strong {
    color: var(--muted);
    font-size: 9px;
}

.reports-page .reports-hour-row > small { display: none; }

.reports-page .reports-hour-bar {
    display: flex;
    width: 8px;
    height: 82px;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .055);
}

.reports-page .reports-hour-bar span {
    display: block;
    width: 100%;
    height: max(3px, var(--hour-share));
    border-radius: inherit;
    background: linear-gradient(180deg, #6ecdd5, #4a84dc);
}

.reports-page .reports-hour-row.is-peak .reports-hour-bar span {
    background: linear-gradient(180deg, #7be0b1, #56bac4);
    box-shadow: 0 0 12px rgba(86, 186, 196, .35);
}

.reports-page .reports-team-panel { margin: 0; }
.reports-page .reports-podium { gap: 0; padding: 0; }

.reports-page .reports-podium-card {
    min-height: 108px;
    padding: 14px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.reports-page .reports-podium-card + .reports-podium-card { border-left: 1px solid var(--line); }
.reports-page .reports-podium-card.rank-1 { background: rgba(231, 189, 85, .035); }

.reports-page .reports-podium-rank span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(174, 189, 195, .2);
    border-radius: 10px;
    background: rgba(120, 142, 151, .08);
    color: #a8caff;
    font-size: 12px;
}

.reports-page .reports-podium-name strong { font-size: 14px; }
.reports-page .reports-podium-card > b { font-size: 20px; }

.reports-page .reports-products-panel { margin: 0; }
.reports-page .reports-product-grid article { min-height: 70px; padding: 10px 14px; }
.reports-page .reports-product-grid .reports-product-rank { width: 30px; height: 30px; font-size: 10px; }
.reports-page .reports-product-volume strong { font-size: 15px; }
.reports-page .reports-product-money b { font-size: 12px; }

@media (max-width: 1120px) {
    .reports-page .reports-hero { grid-template-columns: 1fr; }
    .reports-page .reports-period-form { grid-template-columns: minmax(140px, 1fr) 90px 90px auto; }
    .reports-page .reports-hourly-chart { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .reports-page .reports-podium { grid-template-columns: 1fr; }
    .reports-page .reports-podium-card + .reports-podium-card { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 820px) {
    .reports-page .reports-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reports-page .report-kpi:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
    .reports-page .report-kpi:nth-child(4) { border-top: 1px solid var(--line); }
    .reports-financial-panel { grid-template-columns: 1fr; }
    .reports-financial-half + .reports-financial-half { border-top: 1px solid var(--line); border-left: 0; }
    .reports-page .reports-hourly-chart { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .reports-page .reports-hero { padding: 17px; }
    .reports-page .reports-period-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reports-page .reports-period-title,
    .reports-page .reports-period-form button { grid-column: 1 / -1; }
    .reports-page .reports-kpi-grid { grid-template-columns: 1fr; }
    .reports-page .report-kpi + .report-kpi { border-top: 1px solid var(--line); border-left: 0; }
    .reports-page .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reports-page .reports-hourly-chart { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .reports-page .reports-hourly-panel .report-panel-head { align-items: flex-start; flex-direction: column; }
    .reports-page .reports-peak-hour { width: 100%; text-align: left; }
}

/* Logs — journal d'activité compact */
.logs-page {
    width: min(100%, 1480px);
    gap: 14px;
}

.logs-page > .section-heading {
    align-items: center;
    margin: 0;
    padding: 20px 22px;
    border: 1px solid rgba(169, 54, 66, .18);
    border-radius: 17px;
    background:
        radial-gradient(circle at 0 0, rgba(169, 54, 66, .12), transparent 34%),
        linear-gradient(120deg, rgba(31, 27, 49, .97), rgba(22, 29, 48, .97));
}

.logs-page > .section-heading h1 {
    margin: 3px 0 0;
    font-size: clamp(24px, 2.4vw, 34px);
    letter-spacing: -.035em;
}

.logs-page .logs-heading-description { margin-top: 5px; font-size: 13px; }

.logs-page .logs-view-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(10, 13, 27, .48);
}

.logs-page .logs-view-switch a {
    min-height: 62px;
    padding: 10px 15px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.logs-page .logs-view-switch a + a { border-left: 1px solid var(--line); }
.logs-page .logs-view-switch a:hover,
.logs-page .logs-view-switch a:focus-visible { background: rgba(120, 142, 151, .045); }
.logs-page .logs-view-switch a.is-active {
    background: linear-gradient(90deg, rgba(169, 54, 66, .09), rgba(120, 142, 151, .055));
    box-shadow: inset 0 -2px 0 #a93642;
}

.logs-page .logs-switch-icon {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(174, 189, 195, .18);
    border-radius: 9px;
    background: rgba(120, 142, 151, .07);
    color: #a8caff;
    font-size: 11px;
}

.logs-page .logs-view-switch a.is-active .logs-switch-icon {
    border-color: rgba(169, 54, 66, .25);
    background: rgba(169, 54, 66, .09);
    color: #ef9fc5;
}

.logs-page .logs-view-switch strong,
.logs-page .logs-result-count {
    padding: 4px 8px;
    font-size: 10px;
}

.logs-page .logs-panel {
    border-radius: 17px;
    background: rgba(9, 12, 25, .52);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .1);
}

.logs-page .logs-panel > .directory-title {
    min-height: 64px;
    padding: 12px 17px;
    background: rgba(255, 255, 255, .018);
}

.logs-page .logs-panel > .directory-title h2 {
    padding-left: 12px;
    font-size: 17px;
}

.logs-page .logs-panel > .directory-title h2::before { width: 2px; height: 22px; }
.logs-page .logs-member-filter label { font-size: 9px; text-transform: uppercase; }
.logs-page .logs-member-filter select { min-width: 190px; min-height: 34px; font-size: 11px; }

.logs-page .logs-panel .accounting-table-wrap {
    overflow-x: visible;
    padding: 0;
}

.logs-page .logs-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.logs-page .logs-table th {
    height: 40px;
    padding: 0 9px;
    background: rgba(255, 255, 255, .022);
    color: #9fa7bd;
    font-size: 9px;
}

.logs-page .logs-table td {
    height: 60px;
    padding: 9px;
    font-size: 11px;
    white-space: normal;
}

.logs-page .logs-table tbody tr:not(.logs-week-row):not(.logs-modal-row):nth-child(even) {
    background: rgba(255, 255, 255, .012);
}

.logs-page .logs-table tbody tr[data-log-menu],
.logs-page .logs-table tbody tr[data-service-log-menu] { cursor: context-menu; }

.logs-page .logs-week-row th {
    height: 32px;
    padding-left: 14px;
    background: rgba(120, 142, 151, .055) !important;
    color: #a8caff !important;
    font-size: 9px;
}

.logs-page .sales-table th:nth-child(1) { width: 12%; }
.logs-page .sales-table th:nth-child(2) { width: 19%; }
.logs-page .sales-table th:nth-child(3) { width: 24%; }
.logs-page .sales-table th:nth-child(4) { width: 19%; }
.logs-page .sales-table th:nth-child(5) { width: 26%; }

.logs-page .sales-table td { height: 92px; text-align: left; vertical-align: middle; }
.logs-page .sales-table th { text-align: left; }

.logs-sale-identity,
.logs-charge-date,
.logs-charge-name {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.logs-sale-identity strong { color: #ee8cbb; font-size: 12px; }
.logs-sale-identity small,
.logs-charge-date small,
.logs-charge-name small { color: var(--muted); font-size: 9px; }

.logs-page .sale-item {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logs-billing-badge,
.logs-fiscal-badge {
    display: inline-flex;
    max-width: 100%;
    margin-top: 6px;
    padding: 4px 7px;
    overflow: hidden;
    border: 1px solid rgba(174, 189, 195, .18);
    border-radius: 999px;
    background: rgba(120, 142, 151, .06);
    color: #a8caff;
    font-size: 9px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logs-billing-badge.is-partner {
    border-color: rgba(169, 54, 66, .2);
    background: rgba(169, 54, 66, .07);
    color: #ef9fc5;
}

.logs-items-cell { max-width: 0; }

.logs-sale-money {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 9px;
    background: rgba(7, 10, 21, .22);
}

.logs-sale-money div {
    display: grid;
    min-width: 0;
    gap: 2px;
    padding: 6px 8px;
}

.logs-sale-money div:nth-child(even) { border-left: 1px solid var(--line); }
.logs-sale-money div:nth-child(n+3) { border-top: 1px solid var(--line); }
.logs-sale-money dt { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.logs-sale-money dd { overflow: hidden; margin: 0; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.logs-sale-money .salary-cell { color: #7be0b1; }
.logs-sale-money .total-cell { color: #8de4e8; }

.logs-page .accounting-charge-log-panel .logs-table th:nth-child(1) { width: 17%; }
.logs-page .accounting-charge-log-panel .logs-table th:nth-child(2) { width: 28%; }
.logs-page .accounting-charge-log-panel .logs-table th:nth-child(3) { width: 22%; }
.logs-page .accounting-charge-log-panel .logs-table th:nth-child(4) { width: 12%; }
.logs-page .accounting-charge-log-panel .logs-table th:nth-child(5) { width: 13%; }
.logs-page .accounting-charge-log-panel .logs-table th:nth-child(6) { width: 8%; }
.logs-page .accounting-charge-log-panel .logs-table td { text-align: left; }
.logs-charge-amount { color: #8de4e8; font-size: 13px; white-space: nowrap; }

@media (max-width: 980px) {
    .logs-page .logs-table th,
    .logs-page .logs-table td { padding-right: 6px; padding-left: 6px; }
    .logs-page .sales-table th:nth-child(1) { width: 13%; }
    .logs-page .sales-table th:nth-child(2) { width: 19%; }
    .logs-page .sales-table th:nth-child(3) { width: 22%; }
    .logs-page .sales-table th:nth-child(4) { width: 18%; }
    .logs-page .sales-table th:nth-child(5) { width: 28%; }
}

@media (max-width: 760px) {
    .logs-page .logs-view-switch { grid-template-columns: 1fr; }
    .logs-page .logs-view-switch a + a { border-top: 1px solid var(--line); border-left: 0; }
    .logs-page .logs-panel > .directory-title,
    .logs-page .logs-panel-tools,
    .logs-page .logs-member-filter { align-items: stretch; flex-direction: column; }
    .logs-page .logs-member-filter select { width: 100%; min-width: 0; }
    .logs-page .logs-panel .accounting-table-wrap { overflow: visible; padding: 10px; }
    .logs-page .logs-table,
    .logs-page .logs-table tbody { display: grid; width: 100%; min-width: 0; gap: 10px; }
    .logs-page .logs-table thead { display: none; }
    .logs-page .logs-table tbody tr:not(.logs-week-row):not(.logs-modal-row) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(255, 255, 255, .016);
    }
    .logs-page .logs-table tbody tr.logs-week-row { display: table; width: 100%; }
    .logs-page .logs-table tbody tr.logs-modal-row { display: table-row; width: 0; height: 0; }
    .logs-page .logs-table td {
        display: grid;
        height: auto;
        min-height: 58px;
        align-content: center;
        padding: 10px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        text-align: left;
    }
    .logs-page .logs-table td::before {
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 8px;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
        content: attr(data-label);
    }
    .logs-page .sales-table td { height: auto; max-width: none; }
    .logs-page .sales-table td:last-child { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
    .logs-page > .section-heading { padding: 17px; }
    .logs-page .logs-table tbody tr:not(.logs-week-row):not(.logs-modal-row) { grid-template-columns: 1fr; }
    .logs-page .sales-table td:last-child { grid-column: auto; }
}
