:root {
    --a-bg: #fbf7f4;
    --a-surface: #ffffff;
    --a-surface-2: #fdf9f6;
    --a-ink: #3e2a33;
    --a-muted: #8a737d;
    --a-line: #ead9d2;
    --a-brand: #c97b84;
    --a-brand-dark: #a85f69;
    --a-accent: #c9a227;
    --a-sidebar: #3e2a33;
    --a-sidebar-2: #5a3a47;
    --a-radius: 16px;
    --a-radius-sm: 11px;
    --a-shadow: 0 1px 2px rgba(62, 42, 51, 0.04), 0 8px 24px rgba(62, 42, 51, 0.07);
    --a-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--a-font);
    background: var(--a-bg);
    color: var(--a-ink);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

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

h1, h2, h3, h4 {
    letter-spacing: -0.01em;
}

/* ---------- Layout ---------- */
.admin-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    background-color: var(--a-sidebar);
    background-image:
        radial-gradient(circle at 30% 0%, rgba(201, 138, 60, 0.22), transparent 55%),
        linear-gradient(180deg, var(--a-sidebar-2), var(--a-sidebar));
    color: rgba(255, 255, 255, 0.82);
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    margin: 4px 8px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.admin-brand-icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.admin-center-switcher {
    margin: 0 8px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    overflow: hidden;
}

.admin-center-switcher summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 8px;
    align-items: center;
}

.admin-center-switcher summary::-webkit-details-marker {
    display: none;
}

.admin-center-switcher__label {
    grid-column: 1 / -1;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
}

.admin-center-switcher summary strong {
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-center-switcher__chevron {
    color: rgba(255, 255, 255, 0.65);
}

.admin-center-switcher__menu {
    padding: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-center-switcher__menu form {
    margin: 0;
}

.admin-center-switcher__item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: 0.88rem;
    text-align: left;
    cursor: pointer;
}

.admin-center-switcher__item:hover,
.admin-center-switcher__item.is-current {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-center-switcher__check {
    color: var(--a-accent);
}

.admin-center-switcher__link {
    display: block;
    padding: 9px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
}

.admin-center-switcher__link:hover {
    color: #fff;
}

.admin-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(201, 138, 60, 0.18);
    background: color-mix(in srgb, var(--nav-accent, var(--a-accent)) 22%, transparent);
    color: var(--nav-accent, #e6b566);
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.admin-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-nav-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 6px;
}

.admin-nav-section:first-child {
    margin-top: 0;
}

.admin-nav-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 10px 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: color-mix(in srgb, var(--nav-accent, #ffffff) 65%, rgba(255, 255, 255, 0.4));
    user-select: none;
}

.admin-nav-group::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--nav-accent, var(--a-accent));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--nav-accent, var(--a-accent)) 22%, transparent);
}

.admin-nav-section:first-child .admin-nav-group {
    margin-top: 6px;
    padding-top: 0;
    border-top: 0;
}

.admin-nav-module {
    display: flex;
    flex-direction: column;
}

.admin-nav-module.is-active {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
}

.admin-nav-module-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 11px 12px;
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.005em;
    user-select: none;
}

.admin-nav-module.is-active .admin-nav-module-head {
    color: #fff;
}

.admin-nav-module-head::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 999px;
    background: var(--nav-accent, var(--a-accent));
}

.admin-nav-module-head .admin-nav-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(201, 138, 60, 0.18);
    background: color-mix(in srgb, var(--nav-accent, var(--a-accent)) 26%, transparent);
    color: var(--nav-accent, #e6b566);
}

.admin-nav-module-head .admin-nav-icon svg {
    width: 18px;
    height: 18px;
}

.admin-nav-module.is-active .admin-nav-module-head .admin-nav-icon {
    background: var(--nav-accent, var(--a-accent));
    color: #21140b;
}

.admin-nav-module-label {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-nav-module-body {
    display: block;
}

.admin-nav-module-inner {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 2px 0 8px 0;
    margin: 0 0 6px 15px;
}

.admin-nav-module-inner a {
    padding: 8px 12px 8px 10px;
    gap: 10px;
    font-size: 13px;
    border-radius: 9px;
}

.admin-nav-module-inner .admin-nav-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: transparent;
    color: var(--nav-accent, #e6b566);
}

.admin-nav-module-inner .admin-nav-icon svg {
    width: 16px;
    height: 16px;
}

.admin-nav-module:first-child .admin-nav-module-head {
    margin-top: 0;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    position: relative;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.admin-nav a::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 999px;
    background: var(--nav-accent, var(--a-accent));
    transform: translateY(-50%);
    transition: height 0.18s ease;
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.admin-nav a.active {
    background: linear-gradient(135deg, #e6b566, var(--a-accent));
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--nav-accent, var(--a-accent)) 74%, #ffffff),
        var(--nav-accent, var(--a-accent))
    );
    color: #2a1a10;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(20, 14, 10, 0.28);
}

.admin-nav a.active .admin-nav-icon {
    background: rgba(42, 26, 16, 0.16);
    color: #2a1a10;
}

.admin-nav a.active::before {
    height: 0;
}

.admin-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 14, 10, 0.5);
    z-index: 80;
}

.admin-backdrop.open {
    display: block;
}

.admin-main {
    padding: 26px 30px 64px;
    min-width: 0;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
    margin-bottom: 24px;
    padding: 14px 0;
    background: var(--a-bg);
    border-bottom: 1px solid var(--a-line);
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.admin-topbar h1 {
    font-size: 1.45rem;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    border: 1.5px solid var(--a-line);
    background: var(--a-surface);
    color: var(--a-brand-dark);
    font-size: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--a-muted);
    min-width: 0;
}

.admin-user > span {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1.5px solid var(--a-line);
    border-radius: 999px;
    background: var(--a-surface);
    color: var(--a-ink);
    font: inherit;
    cursor: pointer;
}

.admin-user-toggle:hover {
    border-color: var(--a-accent);
}

.admin-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--a-accent);
    color: #21140b;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ---------- Tiroirs latéraux (menu compte) ---------- */
.waiter-drawer {
    position: fixed;
    top: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(76vw, 260px);
    height: 100%;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
    background: var(--a-surface);
    box-shadow: 0 0 50px rgba(43, 29, 22, 0.35);
    transition: transform 0.26s ease;
    overflow-y: auto;
    touch-action: pan-y;
}

.waiter-drawer[hidden] {
    display: none;
}

.waiter-drawer--right {
    right: 0;
    transform: translateX(100%);
}

.waiter-drawer--left {
    left: 0;
    transform: translateX(-100%);
}

.waiter-drawer--right.is-open,
.waiter-drawer--left.is-open {
    transform: translateX(0);
}

.waiter-drawer.is-dragging {
    transition: none;
}

.waiter-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--a-line);
    font-size: 1.1rem;
    cursor: grab;
    touch-action: pan-y;
}

.waiter-drawer-close {
    border: 0;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--a-muted);
    cursor: pointer;
}

.waiter-drawer-name {
    margin: 0;
    font-weight: 600;
    color: var(--a-muted);
}

.waiter-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.waiter-drawer-nav a,
.waiter-drawer-nav button {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--a-ink);
    font: inherit;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.waiter-drawer-nav a:hover,
.waiter-drawer-nav button:hover {
    background: var(--a-surface-2);
}

.waiter-drawer-logout {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--a-line);
}

.waiter-drawer-logout .btn {
    width: 100%;
    color: var(--a-ink);
    border-color: var(--a-line);
}

.waiter-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(43, 29, 22, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.26s ease, visibility 0.26s ease;
}

.waiter-drawer-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.waiter-drawer-lock {
    overflow: hidden;
}

/* ---------- Popover du menu compte ---------- */
.account-popover {
    top: 68px;
    right: 16px;
    height: auto;
    max-height: min(560px, calc(100vh - 90px));
    width: min(92vw, 320px);
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius);
    box-shadow: var(--a-shadow);
    overflow: hidden;
}

.account-popover-head {
    padding-bottom: 10px;
    cursor: default;
}

.account-popover-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
}

.account-popover-id {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 2px 12px;
    border-bottom: 1px solid var(--a-line);
}

.account-popover-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--a-accent);
    color: #21140b;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
}

.account-popover-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.account-popover-name {
    font-size: 0.95rem;
    color: var(--a-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-popover-email {
    font-size: 0.8rem;
    color: var(--a-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-popover-role {
    align-self: flex-start;
    margin-top: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(201, 138, 60, 0.14);
    color: var(--a-brand-dark);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.account-popover-nav a,
.account-popover-nav button {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-popover-icon {
    display: inline-flex;
    flex-shrink: 0;
    color: var(--a-muted);
}

.account-popover-nav a:hover .account-popover-icon,
.account-popover-nav button:hover .account-popover-icon {
    color: var(--a-accent);
}

.account-popover-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-popover-external {
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--a-muted);
}

.account-popover-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
}

.account-popover-version {
    font-size: 0.72rem;
    color: var(--a-muted);
}

.account-popover-logout-form {
    margin: 0;
}

.account-popover-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.account-popover-logout .account-popover-icon {
    color: inherit;
}

@media (max-width: 560px) {
    .account-popover {
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100vh - 74px);
    }
}

/* ---------- Cards ---------- */
.admin-card {
    background: var(--a-surface);
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--a-shadow);
}

.admin-card h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.card-head h2 {
    margin: 0;
}

/* ---------- Stats & grids ---------- */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--a-surface);
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius);
    padding: 18px 20px;
    box-shadow: var(--a-shadow);
}

.stat-card .label {
    font-size: 0.74rem;
    color: var(--a-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}

.stat-card .value {
    font-size: 1.7rem;
    font-weight: 700;
    margin-top: 6px;
    color: var(--a-brand-dark);
    line-height: 1.1;
}

.admin-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    align-items: start;
}

/* ---------- Tables ---------- */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Cards holding a table scroll horizontally instead of overflowing. */
.admin-card:has(table.admin-table) {
    overflow-x: auto;
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

table.admin-table th,
table.admin-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--a-line);
    vertical-align: middle;
}

table.admin-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--a-muted);
    white-space: nowrap;
}

table.admin-table tbody tr:last-child td {
    border-bottom: none;
}

table.admin-table tbody tr:hover td {
    background: var(--a-surface-2);
}

table.admin-table td .actions-row {
    white-space: nowrap;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #efeae4;
    color: var(--a-brand-dark);
    white-space: nowrap;
}

.badge-new { background: #e3ecff; color: #2b4fa8; }
.badge-contacted { background: #fff0d6; color: #a5711a; }
.badge-converted { background: #dcf3e7; color: #1f6b4a; }
.badge-lost { background: #fbe0e0; color: #a33a3a; }
.badge-active { background: #dcf3e7; color: #1f6b4a; }
.badge-pending { background: #fff0d6; color: #a5711a; }
.badge-past_due { background: #fbe0e0; color: #a33a3a; }
.badge-cancelled { background: #ece9e6; color: #6f5b50; }
.badge-inactive { background: #ece9e6; color: #6f5b50; }
.badge-churned { background: #fbe0e0; color: #a33a3a; }
.badge-paid { background: #dcf3e7; color: #1f6b4a; }
.badge-failed { background: #fbe0e0; color: #a33a3a; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: var(--a-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.1;
    border: 1.5px solid transparent;
    cursor: pointer;
    background: var(--a-brand);
    color: #fff;
    white-space: nowrap;
    max-width: 100%;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
    background: var(--a-brand-dark);
}

.btn:active {
    transform: translateY(1px);
}

.btn-ghost {
    background: transparent;
    border-color: var(--a-line);
    color: var(--a-ink);
}

.btn-ghost:hover {
    background: #f0efed;
}

.btn-danger {
    background: #c0392b;
}

.btn-danger:hover {
    background: #a52f22;
}

.btn-success {
    background: #1f9d63;
}

.btn-success:hover {
    background: #178052;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 0.8rem;
    border-radius: 9px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0;
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

.btn-sm.btn-icon {
    width: 32px;
    height: 32px;
}

.btn-xs {
    padding: 4px 9px;
    font-size: 0.72rem;
    border-radius: 7px;
    gap: 5px;
}

.btn-xs.btn-icon {
    width: 26px;
    height: 26px;
}

/* ---------- Selection switch ---------- */
.switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--a-muted, #6f5b50);
    user-select: none;
    margin: 0;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-track {
    position: relative;
    flex: none;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #d8d3cf;
    transition: background 0.15s ease;
}

.switch-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.switch input:checked + .switch-track {
    background: var(--a-brand);
}

.switch input:checked + .switch-track::after {
    transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
    box-shadow: 0 0 0 3px rgba(111, 78, 55, 0.25);
}

/* ---------- Bulk selection ---------- */
.row-check {
    display: none;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--a-brand);
}

.check-col {
    display: none;
    width: 34px;
    text-align: center;
}

[data-bulk].is-selecting .row-check {
    display: inline-block;
}

[data-bulk].is-selecting .check-col {
    display: table-cell;
}

.bulk-bar {
    display: none;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1.5px dashed var(--a-line);
    border-radius: var(--a-radius-sm, 10px);
    background: #faf9f7;
}

[data-bulk].is-selecting .bulk-bar {
    display: flex;
}

.bulk-bar select {
    padding: 7px 10px;
    border: 1.5px solid var(--a-line);
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.8rem;
    background: #fff;
    color: var(--a-ink);
}

.bulk-bar-count {
    font-size: 0.78rem;
    color: var(--a-muted, #6f5b50);
}

/* ---------- Forms ---------- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field {
    margin-bottom: 14px;
    min-width: 0;
}

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
    color: var(--a-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--a-accent);
    box-shadow: 0 0 0 3px rgba(201, 138, 60, 0.15);
}

.field textarea {
    resize: vertical;
    min-height: 90px;
}

.field-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    margin: 0 16px 12px 0;
    cursor: pointer;
}

.field-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--a-brand);
}

/* ---------- Pack service picker ---------- */
.service-picker-subtitle {
    margin: 18px 0 10px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--a-muted);
}

.service-picker-subtitle:first-of-type {
    margin-top: 0;
}

.service-picker-group {
    margin-bottom: 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--a-line);
}

.service-picker-group:last-of-type {
    border-bottom: 0;
}

.service-picker-title {
    margin: 0 0 8px;
    font-size: 0.92rem;
    font-weight: 600;
}

.service-module-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-left: 4px;
}

/* ---------- Actions ---------- */
.actions-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.actions-row.nowrap {
    flex-wrap: nowrap;
}

.actions-row form {
    margin: 0;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    margin-bottom: 24px;
}

.upload-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.upload-form .upload-field {
    width: 100%;
    margin-bottom: 0;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--a-radius-sm);
    font-size: 0.875rem;
    margin-bottom: 18px;
}

.alert-success {
    background: #dcf3e7;
    color: #1f6b4a;
}

.alert-error {
    background: #fbe0e0;
    color: #a33a3a;
}

.alert-warning {
    background: #fdf1d6;
    color: #8a6212;
}

/* ---------- Filters / pagination ---------- */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.filters select,
.filters input {
    padding: 9px 12px;
    border: 1.5px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    font-size: 0.86rem;
    background: #fff;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 14px;
}

.filter-fields {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.filter-field > label {
    font-size: 0.71rem;
    font-weight: 600;
    color: var(--a-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-field input,
.filter-field select {
    padding: 9px 12px;
    border: 1.5px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    font-size: 0.86rem;
    background: #fff;
    color: var(--a-ink);
    min-width: 150px;
    max-width: 100%;
}

.filter-field.search input {
    min-width: 240px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-count {
    color: var(--a-muted);
    font-size: 0.84rem;
    align-self: center;
}

.pagination {
    margin-top: 18px;
}

.pagination svg {
    width: 16px;
    height: 16px;
}

.muted {
    color: var(--a-muted);
}

/* ---------- Charts ---------- */
.chart-box {
    position: relative;
    height: 210px;
}

/* ---------- QR tools ---------- */
.is-hidden {
    display: none !important;
}

.qr-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.qr-tools select {
    padding: 9px 12px;
    border: 1.5px solid var(--a-line);
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
}

.qr-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}

/* ---------- Login ---------- */
.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, var(--a-brand-dark), var(--a-brand));
    padding: 24px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px;
    width: 100%;
    max-width: 410px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.login-card h1 {
    margin: 0 0 6px;
    font-size: 1.45rem;
}

/* ---------- Responsive ---------- */
@media (min-width: 1101px) {
    .admin-shell {
        transition: grid-template-columns 0.22s ease;
    }

    .admin-sidebar {
        transition: padding 0.2s ease, width 0.22s ease;
    }

    .admin-shell.collapsed {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .admin-shell.collapsed .admin-sidebar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .admin-shell.collapsed .admin-brand {
        justify-content: center;
        margin-left: 0;
        margin-right: 0;
    }

    .admin-shell.collapsed .admin-brand-name,
    .admin-shell.collapsed .admin-nav-label {
        display: none;
    }

    .admin-shell.collapsed .admin-nav-module-head {
        display: none;
    }

    .admin-shell.collapsed .admin-nav-module-inner {
        padding-left: 0;
        margin-left: 0;
    }

    .admin-shell.collapsed .admin-nav a {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 1100px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -100%;
        width: 300px;
        max-width: 84vw;
        height: auto;
        transition: left 0.24s ease;
        z-index: 90;
        touch-action: pan-y;
    }

    .admin-sidebar.is-dragging {
        transition: none;
    }

    .admin-sidebar.open {
        left: 0;
    }

    body.admin-drawer-open {
        overflow: hidden;
    }

    .admin-menu-toggle {
        display: inline-flex;
    }

    .admin-main {
        padding: 20px 18px 56px;
    }
}

@media (max-width: 720px) {
    .admin-main {
        padding: 18px 14px 52px;
    }

    .admin-topbar h1 {
        font-size: 1.2rem;
    }

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

    .admin-2col {
        grid-template-columns: 1fr;
    }

    .stat-card .value {
        font-size: 1.5rem;
    }

    .chart-box {
        height: 180px;
    }

    .login-card {
        padding: 28px 22px;
    }
}

/* ---- Orders & kitchen screen ---- */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.order-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--a-surface);
    border: 1px solid var(--a-line);
    border-inline-start: 6px solid #9aa1ad;
    border-radius: var(--a-radius);
    padding: 14px 16px;
    box-shadow: var(--a-shadow);
}

.order-card.is-ok {
    border-inline-start-color: #2f9e63;
    background: linear-gradient(0deg, rgba(47, 158, 99, 0.05), rgba(47, 158, 99, 0.05)), var(--a-surface);
}

.order-card.is-warning {
    border-inline-start-color: #e8a13a;
    background: linear-gradient(0deg, rgba(232, 161, 58, 0.08), rgba(232, 161, 58, 0.08)), var(--a-surface);
}

.order-card.is-late {
    border-inline-start-color: #d64545;
    background: linear-gradient(0deg, rgba(214, 69, 69, 0.1), rgba(214, 69, 69, 0.1)), var(--a-surface);
}

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

.order-card-id {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-ref {
    font-weight: 700;
    font-size: 1.05rem;
}

.order-table {
    display: inline-block;
    align-self: flex-start;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--a-surface-2);
    border: 1px solid var(--a-line);
    font-size: 0.82rem;
    color: var(--a-muted);
}

.order-server {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--a-brand);
}

.order-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1;
}

.order-card.is-ok .order-timer { color: #2f9e63; }
.order-card.is-warning .order-timer { color: #c07c12; }
.order-card.is-late .order-timer { color: #d64545; }

.order-lines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-lines li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
}

.order-line-thumb {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: var(--a-radius-sm);
    background: var(--a-surface-2);
    object-fit: cover;
    overflow: hidden;
}

.order-line-thumb.is-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--a-muted);
}

.order-qty {
    font-weight: 700;
    min-width: 28px;
}

.order-line-options {
    color: var(--a-muted);
    font-size: 0.85rem;
}

.order-line-total {
    margin-inline-start: auto;
    color: var(--a-muted);
    font-size: 0.88rem;
}

.order-note {
    margin: 0;
    padding: 8px 10px;
    border-radius: var(--a-radius-sm);
    background: var(--a-surface-2);
    font-size: 0.9rem;
    font-style: italic;
}

.order-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--a-line);
    padding-top: 10px;
}

.order-total {
    font-weight: 700;
}

.order-actions {
    display: flex;
    gap: 8px;
}

.order-empty {
    grid-column: 1 / -1;
    padding: 40px 0;
    text-align: center;
    color: var(--a-muted);
}

.kitchen-body {
    background: var(--a-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.kitchen {
    flex: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.kitchen-orders {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.kitchen-pairing {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.kitchen-pairing[hidden],
.kitchen-orders[hidden] {
    display: none !important;
}

.orders-grid {
    width: 100%;
}

.kitchen-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.kitchen-search-input {
    flex: 1;
    max-width: 280px;
    padding: 10px 14px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: inherit;
    background: var(--a-surface);
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius-sm);
}

.kitchen-search-input:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

.kitchen-search-feedback {
    font-size: 0.85rem;
    font-weight: 600;
    color: #b45309;
}

.kitchen-search-feedback.is-error {
    color: #dc2626;
}

.order-card.is-targeted {
    animation: order-target-flash 1.5s ease-out;
}

@keyframes order-target-flash {
    0%,
    100% {
        box-shadow: var(--a-shadow);
    }
    30% {
        box-shadow: 0 0 0 3px #f59e0b, var(--a-shadow);
    }
}

.kitchen-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.kitchen-head h1 {
    margin: 0;
    font-size: 1.5rem;
}

.kitchen-head p {
    margin: 2px 0 0;
    color: var(--a-muted);
}

.kitchen-head-actions {
    display: flex;
    gap: 8px;
}

.pairing {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    margin-top: 12px;
}

.pairing-qr {
    padding: 10px;
    background: #fff;
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    min-width: 180px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pairing-qr-fallback {
    color: var(--a-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 10px;
}

.pairing-qr img,
.pairing-qr canvas {
    display: block;
}

.pairing-info {
    flex: 1;
    min-width: 240px;
}

.pairing-label {
    display: block;
    font-size: 0.82rem;
    color: var(--a-muted);
    margin-bottom: 4px;
}

.pairing-url {
    word-break: break-all;
    font-size: 0.9rem;
    margin: 0 0 10px;
}

.tabs-row {
    display: flex;
    gap: 8px;
}

@media (max-width: 720px) {
    .kitchen-head {
        flex-direction: column;
        align-items: flex-start;
    }

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

/* ---- Screen assignment highlight & pairing ---- */
.order-lines li.is-assigned,
.order-lines li.is-assigned .order-line-name {
    font-weight: 700;
    color: #b45309;
}

.order-lines li.is-assigned .order-line-options,
.order-lines li.is-assigned .order-line-total {
    color: #b45309;
}

.order-card.has-assigned {
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.4), var(--a-shadow);
}

.order-scope {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0 0 10px;
    font-size: 0.72rem;
}

.order-scope-label {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #92400e;
    margin-inline-end: 2px;
}

.order-scope-tag,
.scope-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
    font-size: 0.72rem;
    margin: 1px 1px 1px 0;
}

.pairing-sep {
    border: 0;
    border-top: 1px solid var(--a-line);
    margin: 20px 0;
}

.pairing-code {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: #92400e;
    text-align: center;
    margin: 12px 0;
    font-variant-numeric: tabular-nums;
}

.pairing-form h3 {
    margin: 0 0 4px;
}

.pairing-code-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 12px 0;
}

.pairing-code-row input[name="name"] {
    flex: 1;
    min-width: 180px;
    padding: 11px 14px;
    border: 2px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    font-size: 1rem;
}

.pairing-code-row [data-code-input] {
    flex: 0 0 auto;
    width: 190px;
    font-size: 1.4rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 10px 14px;
    border: 2px solid var(--a-line);
    border-radius: var(--a-radius-sm);
}

.kitchen-restaurant-sub {
    display: inline-block;
    margin-inline-start: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--a-muted);
}

.pairing-scope {
    margin-top: 8px;
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    padding: 10px 14px;
}

.pairing-scope summary {
    cursor: pointer;
    font-weight: 600;
}

.scope-menu {
    margin-top: 12px;
}

.scope-category {
    margin: 8px 0 8px 14px;
}

.scope-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-inline-start: 22px;
}

.scan-camera {
    margin-top: 12px;
}

.scan-camera video {
    width: 100%;
    max-width: 420px;
    border-radius: var(--a-radius-sm);
    background: #000;
    display: block;
    margin-bottom: 8px;
}

/* ---- Kitchen compact header & language ---- */
.kitchen-restaurant {
    font-weight: 700;
    font-size: 1.05rem;
}

.kitchen-icon {
    padding: 6px 10px !important;
    line-height: 1;
}

.lang-switch {
    display: inline-flex;
    gap: 2px;
    border: 1px solid var(--a-line);
    border-radius: 999px;
    padding: 2px;
    background: var(--a-surface);
}

.lang-switch a {
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--a-muted);
}

.lang-switch a.active {
    background: var(--a-brand);
    color: #fff;
}

/* ---- Per-line preparation ---- */
.order-lines li.is-ready {
    opacity: 0.55;
}

.order-lines li.is-ready .order-line-name {
    text-decoration: line-through;
}

.order-line-check {
    margin-inline-end: 4px;
}

.order-progress {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #2f9e63;
}

/* Bandeau de démonstration */
.demo-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fdf3e3;
    border: 1px solid #f0dcc2;
    color: #6b4a24;
}

.demo-banner__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Visite guidée */
.onboarding {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 300;
    max-width: 340px;
}

.onboarding[hidden] {
    display: none;
}

.onboarding__bubble {
    background: var(--a-surface);
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius);
    box-shadow: var(--a-shadow), 0 20px 50px rgba(24, 20, 17, 0.18);
    padding: 18px;
}

.onboarding__progress {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--a-accent);
    margin-bottom: 6px;
}

.onboarding__bubble h4 {
    margin: 0 0 6px;
    font-size: 16px;
}

.onboarding__bubble p {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--a-muted);
}

.onboarding__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.onboarding__spacer {
    flex: 1;
}

.onboarding-highlight {
    position: relative;
    z-index: 301;
    outline: 3px solid var(--a-accent) !important;
    outline-offset: 2px;
    border-radius: 8px;
    background: rgba(201, 138, 60, 0.12);
}

@media (max-width: 640px) {
    .onboarding {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

/* Assistant de démarrage (démo) */
.demo-guide {
    background: var(--a-surface);
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius);
    box-shadow: var(--a-shadow);
    padding: 18px 20px;
    margin-bottom: 18px;
}

.demo-guide__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.demo-guide__counter {
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--a-accent);
}

.demo-guide__bar {
    height: 8px;
    border-radius: 999px;
    background: var(--a-surface-2);
    overflow: hidden;
    margin-bottom: 12px;
}

.demo-guide__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--a-accent), var(--a-brand));
    transition: width 0.3s ease;
}

.demo-guide__hint,
.demo-guide__success {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--a-muted);
}

.demo-guide__success {
    color: #1f6b4a;
    font-weight: 600;
}

.demo-missions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.demo-mission {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--a-radius-sm);
    border: 1px solid var(--a-line);
    background: var(--a-surface-2);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.demo-mission__state {
    flex: 0 0 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    background: #e7e9ee;
    color: var(--a-muted);
}

.demo-mission__body strong {
    display: block;
    font-size: 14px;
}

.demo-mission__body p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--a-muted);
}

.demo-mission.is-done {
    border-color: #bfe3d0;
    background: #eef8f2;
}

.demo-mission.is-done .demo-mission__state {
    background: #2f7d5b;
    color: #fff;
}

.demo-mission.is-current {
    border-color: var(--a-accent);
    background: #fdf3e3;
}

.demo-mission.is-current .demo-mission__state {
    background: var(--a-accent);
    color: #fff;
}

.demo-mission.is-locked {
    opacity: 0.65;
}

.demo-mission.is-current .btn {
    margin-top: 8px;
}

/* Liens de test */
.demo-testlinks {
    background: var(--a-surface);
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius);
    box-shadow: var(--a-shadow);
    padding: 18px 20px;
    margin-bottom: 18px;
}

.demo-testlinks h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.demo-testlinks .muted {
    margin: 0 0 14px;
    font-size: 13px;
}

.demo-testlinks__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}

.demo-testlink {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    background: var(--a-surface-2);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.demo-testlink:hover {
    border-color: var(--a-accent);
    transform: translateY(-1px);
}

.demo-testlink span {
    font-weight: 600;
    font-size: 14px;
}

.demo-testlink small {
    color: var(--a-muted);
    font-size: 12px;
}

.demo-testlink.is-done {
    border-color: #bfe3d0;
    background: #eef8f2;
}

/* Identifiants de test */
.demo-credentials {
    background: var(--a-surface);
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius);
    box-shadow: var(--a-shadow);
    padding: 18px 20px;
    margin-bottom: 18px;
}

.demo-credentials h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.demo-credentials .muted {
    margin: 0 0 14px;
    font-size: 13px;
}

.demo-credentials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.demo-credential {
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    padding: 12px 14px;
    background: var(--a-surface-2);
}

.demo-credential__role {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--a-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.demo-credential dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    font-size: 13px;
}

.demo-credential dt {
    color: var(--a-muted);
}

.demo-credential dd {
    margin: 0;
}

.demo-credential code {
    background: #fff;
    border: 1px solid var(--a-line);
    border-radius: 6px;
    padding: 1px 6px;
    font-size: 12px;
}

.demo-testlink.is-locked {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Tableau de bord client */
.dashboard-hero {
    background: linear-gradient(135deg, #fff, #f8f3ec);
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.dashboard-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    background: var(--a-surface-2);
    font-weight: 600;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.dashboard-action:hover {
    border-color: var(--a-accent);
    transform: translateY(-1px);
}

.dashboard-action__icon {
    font-size: 18px;
    line-height: 1;
}

/* Mes cartes */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.card-tile {
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    background: var(--a-surface-2);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-tile__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-tile__head h3 {
    margin: 0;
    font-size: 15px;
}

/* Bouton retour */
.back-row {
    margin-bottom: 14px;
}

.pairing-url-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--a-surface-2);
    color: var(--a-ink);
}

/* Notifications bell */
.notif { position: relative; display: inline-flex; }
.notif-toggle { position: relative; }
.notif-bell { font-size: 1.05rem; line-height: 1; }
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #d64545;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-width: 90vw;
    background: var(--a-surface);
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    box-shadow: var(--a-shadow);
    z-index: 60;
    overflow: hidden;
}
.notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--a-line);
}
.notif-clear {
    background: none;
    border: 0;
    color: var(--a-brand);
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}
.notif-clear:hover { text-decoration: underline; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--a-line);
    text-decoration: none;
    color: inherit;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--a-surface-2); }
.notif-item.is-unread { background: rgba(201, 138, 60, 0.08); }
.notif-icon { font-size: 1.1rem; line-height: 1.4; }
.notif-main { min-width: 0; }
.notif-title { font-weight: 600; font-size: 0.88rem; }
.notif-body { font-size: 0.82rem; color: var(--a-muted); margin-top: 2px; }
.notif-at { font-size: 0.72rem; color: var(--a-muted); margin-top: 4px; }
.notif-empty { margin: 0; padding: 18px 14px; text-align: center; color: var(--a-muted); font-size: 0.85rem; }

/* ---------- Schedule / attendance timeline ---------- */
.timeline-day-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.timeline-legend {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 0.82rem;
    color: var(--a-muted);
}
.timeline-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.timeline-legend-swatch {
    width: 18px;
    height: 12px;
    border-radius: 4px;
    display: inline-block;
}
.timeline-legend-swatch.is-planned {
    border: 1px dashed var(--a-brand);
    background: rgba(111, 78, 55, 0.08);
}
.timeline-legend-swatch.is-present {
    background: #1f6b4a;
}

.timeline {
    --tl-gutter: 180px;
    --tl-row-height: 42px;
    border: 1px solid var(--a-line);
    border-radius: var(--a-radius-sm);
    overflow: hidden;
    background: var(--a-surface);
}
.timeline + .timeline { margin-top: 12px; }

.timeline-ruler,
.timeline-row {
    display: grid;
    grid-template-columns: var(--tl-gutter) minmax(0, 1fr);
    align-items: stretch;
}

.timeline-ruler {
    background: var(--a-surface-2);
    border-bottom: 1px solid var(--a-line);
}

.timeline-gutter {
    padding: 6px 10px;
    border-right: 1px solid var(--a-line);
    min-width: 0;
}

.timeline-axis {
    position: relative;
    height: 24px;
}
.timeline-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px solid var(--a-line);
}
.timeline-tick-label {
    position: absolute;
    top: 4px;
    left: 2px;
    font-size: 0.68rem;
    color: var(--a-muted);
    white-space: nowrap;
}

.timeline-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--a-muted);
    background: var(--a-surface-2);
    border-top: 1px solid var(--a-line);
}
.timeline-group:first-child { border-top: 0; }
.timeline-group-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.timeline-row {
    border-top: 1px solid var(--a-line);
}
.timeline-row.is-open {
    background: rgba(201, 138, 60, 0.05);
}

.timeline-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
    background: none;
    border: 0;
    border-right: 1px solid var(--a-line);
    font: inherit;
    font-size: 0.86rem;
    color: var(--a-ink);
    text-align: left;
    cursor: pointer;
    padding: 8px 10px;
}
.timeline-name:disabled { cursor: default; }
.timeline-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-track {
    position: relative;
    height: var(--tl-row-height);
    background: var(--a-surface);
}
.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px solid var(--a-line);
}

.timeline-block,
.timeline-interval {
    position: absolute;
    top: 6px;
    bottom: 6px;
    border-radius: 6px;
    overflow: hidden;
    min-width: 4px;
}
.timeline-block.is-editable {
    background: linear-gradient(180deg, #7c5a3f, #6f4e37);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.timeline-block.is-planned {
    background: rgba(111, 78, 55, 0.08);
    border: 1px dashed var(--a-brand);
    top: 5px;
    bottom: 5px;
}
.timeline-interval {
    background: linear-gradient(180deg, #2a8a63, #1f6b4a);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.timeline-interval.is-open {
    background: linear-gradient(180deg, #c98a3c, #b0742b);
}

.timeline-block-label,
.timeline-interval-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

.timeline-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 12px;
    cursor: ew-resize;
    z-index: 3;
    touch-action: none;
}
.timeline-handle-start { left: -1px; }
.timeline-handle-end { right: -1px; }
.timeline-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 16px;
    transform: translate(-50%, -50%);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.7);
}
.timeline-block-delete {
    position: absolute;
    top: 2px;
    right: 14px;
    z-index: 4;
    width: 16px;
    height: 16px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.timeline-block-delete:hover { background: rgba(255, 255, 255, 0.45); }

[data-resv-day] {
    transition: opacity 0.15s ease;
}
[data-resv-day].is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.timeline-block.is-dragging {
    z-index: 5;
    opacity: 0.85;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    cursor: grabbing;
}
.timeline-block.is-conflict {
    background: linear-gradient(180deg, #c0473a, #a33a3a);
    box-shadow: 0 0 0 2px rgba(163, 58, 58, 0.55);
}
.timeline-ghost {
    position: absolute;
    top: 5px;
    bottom: 5px;
    border-radius: 6px;
    background: rgba(43, 79, 168, 0.18);
    border: 2px dashed #2b4fa8;
    color: #2b4fa8;
    z-index: 4;
    pointer-events: none;
}
.timeline-ghost .timeline-block-label {
    color: #2b4fa8;
    font-size: 0.68rem;
}

.resv-clipboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--a-surface-2);
    border: 1px dashed var(--a-line);
}
.resv-clipboard-info {
    font-size: 0.85rem;
    color: var(--a-text, inherit);
}
.resv-clipboard-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.resv-simulation {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(43, 79, 168, 0.06);
    border: 1px solid rgba(43, 79, 168, 0.25);
    font-size: 0.85rem;
    line-height: 1.6;
}
.resv-sim-ok { color: #1f6b4a; font-weight: 600; }
.resv-sim-error { color: #a33a3a; font-weight: 600; }
.resv-sim-conflict {
    display: inline-block;
    margin-top: 2px;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(163, 58, 58, 0.12);
    color: #a33a3a;
}

.timeline-editor {
    grid-column: 1 / -1;
    padding: 12px 14px 14px;
    background: var(--a-surface-2);
    border-top: 1px dashed var(--a-line);
}
.timeline-editor-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}
.timeline-editor-values {
    font-size: 0.85rem;
    color: var(--a-muted);
}

.dual-range {
    position: relative;
    height: 28px;
    margin: 0 8px;
    touch-action: none;
}
.dual-range-track {
    position: absolute;
    top: 12px;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 2px;
    background: var(--a-line);
}
.dual-range-fill {
    position: absolute;
    top: 12px;
    height: 4px;
    border-radius: 2px;
    background: var(--a-accent);
}
.dual-range-thumb {
    position: absolute;
    top: 6px;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--a-brand);
    box-shadow: var(--a-shadow);
    cursor: ew-resize;
    padding: 0;
    touch-action: none;
    z-index: 2;
}
.dual-range-thumb:focus-visible {
    outline: 2px solid var(--a-accent);
    outline-offset: 2px;
}
.dual-range-thumb.is-active { background: var(--a-accent); }

.timeline-status {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #dcf3e7;
    color: #1f6b4a;
    font-size: 0.84rem;
}
.timeline-status.is-error {
    background: #fbe0e0;
    color: #a33a3a;
}
.timeline-status:empty { display: none; }

@media (max-width: 720px) {
    .timeline {
        --tl-gutter: 120px;
    }
    .timeline-tick-label {
        display: none;
    }
}

.timeline-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--a-muted);
    font-size: 0.85rem;
}

/* ---------- Reservation planning: day strip & selectable blocks ---------- */
.resv-daystrip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0 10px;
    scroll-snap-type: x mandatory;
}
.resv-daychip {
    scroll-snap-align: start;
    flex: none;
    min-width: 58px;
    text-align: center;
    padding: 7px 10px;
    border: 1px solid var(--a-line);
    border-radius: 12px;
    text-decoration: none;
    color: var(--a-ink);
    background: var(--a-surface);
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.resv-daychip:hover {
    border-color: var(--a-accent);
    transform: translateY(-1px);
}
.resv-daychip span {
    display: block;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--a-muted);
}
.resv-daychip strong {
    font-size: 0.9rem;
}
.resv-daychip.is-active {
    background: var(--a-brand);
    border-color: var(--a-brand);
    color: #fff;
}
.resv-daychip.is-active span {
    color: rgba(255, 255, 255, 0.8);
}

.resv-selectable {
    cursor: pointer;
}
.resv-selectable:hover {
    box-shadow: 0 6px 16px rgba(43, 29, 22, 0.22);
}
.resv-selectable .timeline-block-label {
    padding-left: 16px;
}
.resv-check {
    position: absolute;
    top: 5px;
    left: 6px;
    z-index: 5;
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
}
.timeline-block.is-editable.is-selected {
    outline: 3px solid var(--a-accent);
    outline-offset: -2px;
}
.resv-draggable {
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}
.resv-draggable.is-dragging {
    cursor: grabbing;
    opacity: 0.85;
    z-index: 6;
    box-shadow: 0 8px 20px rgba(43, 29, 22, 0.3);
}

/* --- Système & box : suivi des applications et des commandes --- */
.badge-running { background: #e3ecff; color: #2b4fa8; }

.system-live { margin-top: 12px; }

.system-status {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--a-line, #e7ddd3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.015);
}
.system-status .muted { font-size: .84rem; }

.system-subtitle {
    margin: 18px 0 6px;
    font-size: .95rem;
    letter-spacing: .01em;
}

.system-table-wrap { overflow-x: auto; }

.system-table {
    width: 100%;
    border-collapse: collapse;
}
.system-table th {
    text-align: left;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a7a6f;
    padding: 6px 8px;
    border-bottom: 1px solid var(--a-line, #e7ddd3);
    white-space: nowrap;
}
.system-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: top;
}
.system-table td .badge { margin-right: 4px; }

/* Compact per-application action buttons (start/stop/restart/install/uninstall). */
.system-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}
.system-actions form { display: inline-flex; margin: 0; align-items: center; }
.system-actions-head { text-align: right; }
.system-table td.system-actions-cell,
.system-table td:last-child { white-space: nowrap; vertical-align: middle; }
.system-danger { color: #b91c1c; border-color: #f0c6c6; }
.system-danger:hover { background: #fdecec; }

.system-command-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.system-diagnostic {
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: .82rem;
}

.system-output {
    margin: 6px 0 0;
    padding: 8px;
    max-height: 220px;
    overflow: auto;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    font-size: .76rem;
    white-space: pre-wrap;
}

/* --- Terminal SSH (connexion directe à la box) --- */
.ssh-terminal {
    margin-top: 10px;
    border: 1px solid #16233d;
    border-radius: 10px;
    overflow: hidden;
    background: #0b1220;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .18);
}
.ssh-terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #111c30;
    color: #9fb4d6;
    font-size: .78rem;
    border-bottom: 1px solid #16233d;
}
.ssh-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .18);
}
.ssh-terminal-target { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ssh-terminal-seen { margin-left: auto; color: #64748b; }
.ssh-terminal-screen {
    margin: 0;
    padding: 12px;
    min-height: 180px;
    max-height: 380px;
    overflow: auto;
    background: #0b1220;
    color: #d7e3f4;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .8rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.ssh-line-command { color: #7dd3fc; }
.ssh-line-meta { color: #64748b; }
.ssh-line-error { color: #fca5a5; }
.ssh-terminal-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #0f172a;
    border-top: 1px solid #16233d;
}
.ssh-terminal-prompt {
    color: #34d399;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ssh-terminal-input input {
    flex: 1;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid #24344f;
    border-radius: 7px;
    background: #0b1220;
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .82rem;
}
.ssh-terminal-input input:focus { outline: none; border-color: #3b82f6; }

.ssh-command-palette { margin-top: 8px; }
.ssh-command-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.ssh-command-group-label {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #8a7a6f;
    margin-right: 4px;
}

.ssh-settings { margin-top: 12px; }
.ssh-settings > summary {
    cursor: pointer;
    font-size: .84rem;
    color: #6b5b4f;
}

/* --- Tiroirs (drawers) de la page système --- */
.drawer {
    margin-top: 14px;
    border: 1px solid var(--a-line, #e7ddd3);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.drawer > summary {
    cursor: pointer;
    list-style: none;
    padding: 10px 14px;
    font-weight: 600;
    font-size: .9rem;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 8px;
}
.drawer > summary::-webkit-details-marker { display: none; }
.drawer > summary::before {
    content: "▸";
    color: #9a877d;
    transition: transform .15s ease;
}
.drawer[open] > summary::before { transform: rotate(90deg); }
.drawer-body { padding: 12px 14px; }

/* --- Historique des commandes intégré aux applications --- */
.command-detail > td {
    background: rgba(0, 0, 0, 0.02);
    padding: 12px 16px;
}
.command-detail .system-table { background: #fff; }
.system-command-table th { font-size: .72rem; }
.system-command-table td { font-size: .82rem; }

/* --- Palette du terminal au-dessus de la console --- */
.ssh-command-palette { margin: 0 0 8px; }

/* --- Toast (retour des commandes en arrière-plan) --- */
.system-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    max-width: 360px;
    padding: 11px 15px;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: .85rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .28);
}
.system-toast-error { background: #7f1d1d; }

/* --- Informations de la box (stockage, mémoire, réseau) --- */
.box-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin: 6px 0 4px;
}
.box-info-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--a-line, #e7ddd3);
    border-radius: 10px;
    background: #fff;
}
.box-info-wide { grid-column: 1 / -1; }
.box-info-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #8a7a6f;
}
.box-info-value { font-weight: 600; font-size: .95rem; }
.box-info-value .box-iface { display: inline-block; margin-right: 12px; font-weight: 500; font-size: .84rem; }
.box-info-bar {
    display: block;
    height: 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.07);
    overflow: hidden;
}
.box-info-bar > span {
    display: block;
    height: 100%;
    background: #34d399;
    border-radius: 4px;
}

/* --- Client contact dialog (reservations) --- */
.resv-client-dialog {
    width: calc(100% - 32px);
    max-width: 520px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    box-shadow: 0 24px 60px rgba(43, 29, 22, .28);
}
.resv-client-dialog::backdrop {
    background: rgba(43, 29, 22, .55);
    backdrop-filter: blur(3px);
}
.resv-client-dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 12px;
}
.resv-client-dialog__head h3 {
    margin: 4px 0 0;
    font-size: 1.25rem;
}
.resv-client-dialog__head .muted {
    font-size: .78rem;
}
.resv-client-dialog__close {
    flex: none;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, .06);
    color: #6f6259;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.resv-client-dialog__close:hover {
    background: rgba(0, 0, 0, .12);
}
.resv-client-dialog__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
    margin: 0;
    padding: 8px 24px 18px;
}
.resv-client-dialog__grid > div {
    min-width: 0;
}
.resv-client-dialog__grid .is-full {
    grid-column: 1 / -1;
}
.resv-client-dialog__grid dt {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #8a7a6f;
}
.resv-client-dialog__grid dd {
    margin: 3px 0 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.resv-client-dialog__grid dd a {
    color: var(--a-brand, #6f4e37);
}
.resv-client-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 24px 22px;
    border-top: 1px solid rgba(0, 0, 0, .07);
}

@media (max-width: 520px) {
    .resv-client-dialog__grid {
        grid-template-columns: 1fr;
    }
}

/* Arabic / RTL client space */
html[dir="rtl"] body {
    font-family: 'Tajawal', 'Inter', system-ui, sans-serif;
}
html[dir="rtl"] .admin-main {
    text-align: right;
}
html[dir="rtl"] .admin-table th,
html[dir="rtl"] .admin-table td {
    text-align: right;
}
html[dir="rtl"] .admin-nav-label,
html[dir="rtl"] .admin-nav-module-label,
html[dir="rtl"] .admin-brand-name {
    text-align: right;
}
html[dir="rtl"] .actions-row,
html[dir="rtl"] .card-head,
html[dir="rtl"] .admin-topbar,
html[dir="rtl"] .admin-user {
    direction: rtl;
}
