:root {
    --acc-ink: #1e4b7a;
    --acc-ink-soft: #3b6ea5;
    --acc-paper: #f4f6f9;
    --acc-card: #ffffff;
    --acc-line: #d5dbe3;
    --acc-accent: #2563eb;
    --acc-text: #1c2430;
    --acc-muted: #5c6b7c;
    --acc-sidebar: 272px;

    --svc-ink: #1e4b7a;
    --svc-paper: var(--acc-paper);
    --svc-card: #ffffff;
    --svc-line: #d5dbe3;
    --svc-copper: #3d5a80;
    --svc-copper-deep: #1e4b7a;
    --svc-text: #1c2430;
    --svc-muted: #5c6b7c;
    --svc-danger: #e11d48;
    --svc-shadow: 0 16px 36px rgba(30, 41, 59, 0.1);
}

* { box-sizing: border-box; }

body.acc-body {
    margin: 0;
    min-height: 100vh;
    color: var(--acc-text);
    background:
        radial-gradient(980px 460px at 100% -12%, rgba(37, 99, 235, 0.14), transparent 56%),
        radial-gradient(760px 440px at -10% -8%, rgba(148, 163, 184, 0.32), transparent 54%),
        radial-gradient(640px 380px at 78% 118%, rgba(203, 213, 225, 0.45), transparent 58%),
        var(--acc-paper);
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.acc-shell {
    display: grid;
    grid-template-columns: var(--acc-sidebar) minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 180ms ease;
}

html.acc-side-collapsed .acc-shell {
    grid-template-columns: 0px minmax(0, 1fr);
}

.acc-side {
    position: sticky;
    top: 0;
    height: 100vh;
    min-width: 0;
    overflow: hidden;
    color: #f8fafc;
    background:
        radial-gradient(340px 200px at 118% -8%, rgba(96, 165, 250, 0.45), transparent 64%),
        radial-gradient(300px 240px at -24% 112%, rgba(148, 163, 184, 0.28), transparent 68%),
        linear-gradient(180deg, #3d5270 0%, #24344a 38%, #121a26 100%);
}

.acc-side-scroll {
    width: var(--acc-sidebar);
    height: 100%;
    overflow: auto;
    padding: 28px 18px 24px;
}

.acc-side-scroll::-webkit-scrollbar { width: 8px; }
.acc-side-scroll::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.28);
}

.acc-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0 8px 28px;
    color: inherit;
    text-decoration: none;
}

.acc-brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff, #d5e3f5);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
    color: #1e4b7a;
    font-size: 22px;
}

.acc-brand strong { display: block; font-size: 16px; letter-spacing: 0.01em; }
.acc-brand span span { display: block; color: #e8eef6; font-size: 12px; }

.acc-nav-section { display: block; }

.acc-group {
    display: flex;
    align-items: center;
    gap: 8px;
    width: calc(100% - 16px);
    margin: 18px 8px 8px;
    padding: 6px 8px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: #fff;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.55);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.acc-group::-webkit-details-marker { display: none; }
.acc-group::marker { content: ""; }
.acc-group:hover { background: rgba(255, 255, 255, 0.1); }
.acc-group:focus { outline: none; }
.acc-group:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 2px;
}

.acc-group .material-symbols-rounded {
    margin-inline-start: auto;
    font-size: 18px;
    transition: transform 160ms ease;
}

.acc-nav-section:not([open]) > .acc-group .material-symbols-rounded { transform: rotate(-90deg); }
html[dir="rtl"] .acc-nav-section:not([open]) > .acc-group .material-symbols-rounded { transform: rotate(90deg); }

.acc-link {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 2px 0;
    padding: 10px 12px;
    border-radius: 12px;
    color: #f8fafc;
    text-decoration: none;
    transition: background 140ms ease;
}

.acc-link .material-symbols-rounded { font-size: 20px; opacity: 1; }
.acc-link:hover { background: rgba(255, 255, 255, 0.12); }
.acc-link.is-active {
    color: #1e3a5f;
    background: linear-gradient(90deg, #ffffff, #dbe7f6);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.22);
}
.acc-link.is-active .material-symbols-rounded { color: #1e3a5f; }
.acc-link-solo { margin-top: 18px; }

.acc-main { min-width: 0; }
.acc-top {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: flex-end;
    padding: 18px 28px 14px;
    background: color-mix(in srgb, var(--acc-paper) 84%, transparent);
    backdrop-filter: blur(14px);
}

.acc-menu-btn, .acc-icon-btn, .acc-user-btn {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--acc-line);
    border-radius: 999px;
    background: var(--acc-card);
    color: var(--acc-text);
    padding: 8px 12px;
    box-shadow: 0 8px 18px rgba(30, 41, 59, 0.06);
    white-space: nowrap;
    transition: border-color 140ms ease, transform 140ms ease;
}

.acc-menu-btn:hover, .acc-icon-btn:hover, .acc-user-btn:hover {
    border-color: #9bb0c7;
}

.acc-menu-btn { display: inline-flex; margin-inline-end: auto; }
.acc-menu-btn-text { display: none; }
html[dir="rtl"] .acc-menu-btn .material-symbols-rounded { transform: scaleX(-1); }
.acc-tools {
    display: flex;
    flex: 1 1 12rem;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.acc-rates {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--acc-line);
    border-radius: 999px;
    background: var(--acc-card);
    color: var(--acc-text);
    padding: 8px 12px;
    box-shadow: 0 8px 18px rgba(30, 41, 59, 0.06);
    text-decoration: none;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.acc-rates:hover { border-color: #9bb0c7; }

.acc-rate {
    display: inline-flex;
    gap: 6px;
    align-items: baseline;
    font-size: 13px;
    font-weight: 700;
}

.acc-rate + .acc-rate {
    border-inline-start: 1px solid var(--acc-line);
    padding-inline-start: 10px;
}

.acc-rate b {
    color: var(--acc-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}
.acc-content { padding: 8px 28px 48px; }
/* A page is on its way after a menu click: dim the old one, but only when the wait is long enough to notice. */
html.acc-nav-busy .acc-content { opacity: 0.5; pointer-events: none; transition: opacity 0.15s linear 0.2s; }

.acc-cari { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.acc-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}
.acc-tab {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--acc-muted);
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}
.acc-tab:hover { background: rgba(37, 99, 235, 0.08); color: var(--acc-ink); }
.acc-tab.is-active { background: var(--acc-ink); color: #fff; }
.acc-tabbar { margin-bottom: 16px; }

/* Totals under the lines of an invoice. */
.cb-totals { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; margin: 10px 0; color: var(--acc-muted); }
.cb-totals b { color: var(--acc-ink); }

/* An editable table of lines inside a form. The selectors name the page and the grid so they win over the general field and grid rules further down. */
.cb-page .cb-lines input:not([type="hidden"]), .cb-page .cb-lines select { width: 100%; min-width: 84px; height: 34px; padding: 0 8px; border-radius: 8px; }
.cb-page .cb-lines input[type="checkbox"] { width: 18px; min-width: 18px; height: 18px; }
.cb-grid.cb-lines td { padding: 6px; }
.cb-grid.cb-lines th { padding-left: 6px; padding-right: 6px; }
.cb-grid.cb-lines .cb-lines-wide { width: 24%; }
.cb-page .cb-lines .cb-lines-wide input { min-width: 200px; }
.cb-page .cb-lines .cb-lines-kind select { min-width: 112px; }
.cb-page .cb-lines td:nth-child(5) input, .cb-page .cb-lines td:nth-child(7) input, .cb-page .cb-lines td:nth-child(9) input { min-width: 60px; }

/* Permission checkboxes on the users page. */
.cb-permissions { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.cb-permissions legend { float: none; margin-bottom: 4px; color: var(--acc-ink); font-size: 14px; font-weight: 700; }
.cb-permissions:disabled { opacity: 0.5; }

@media (max-width: 860px) {
    .acc-shell,
    html.acc-side-collapsed .acc-shell {
        grid-template-columns: minmax(0, 1fr);
        transition: none;
    }
    .acc-menu-btn-text { display: inline; }
    .acc-side,
    html.acc-side-collapsed .acc-side {
        position: fixed;
        z-index: 20;
        width: min(86vw, 320px);
        overflow: hidden;
        transform: translateX(-105%);
        transition: transform 160ms ease;
    }
    .acc-side-scroll { width: 100%; }
    html[dir="rtl"] .acc-side,
    html[dir="rtl"].acc-side-collapsed .acc-side { transform: translateX(105%); }
    html.acc-side-open .acc-side,
    html.acc-side-open.acc-side-collapsed .acc-side { transform: none; }
    .acc-top, .acc-content { padding-left: 16px; padding-right: 16px; }
}

body.acc-body .svc-head h1,
body.acc-body .svc-card h2 { color: var(--svc-ink); }

body.acc-body .svc-stat { position: relative; overflow: hidden; transition: border-color 140ms ease, transform 140ms ease; }
body.acc-body .svc-stat::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
}
html[dir="rtl"] body.acc-body .svc-stat::before { inset: 0 0 0 auto; }
body.acc-body .svc-stat:nth-child(4n + 1)::before { background: #2563eb; }
body.acc-body .svc-stat:nth-child(4n + 1) b { color: #1d4ed8; }
body.acc-body .svc-stat:nth-child(4n + 2)::before { background: #64748b; }
body.acc-body .svc-stat:nth-child(4n + 2) b { color: #334155; }
body.acc-body .svc-stat:nth-child(4n + 3)::before { background: #38bdf8; }
body.acc-body .svc-stat:nth-child(4n + 3) b { color: #0369a1; }
body.acc-body .svc-stat:nth-child(4n + 4)::before { background: #94a3b8; }
body.acc-body .svc-stat:nth-child(4n + 4) b { color: #1e293b; }
body.acc-body .svc-stat:hover {
    border-color: #93b4d9;
    transform: translateY(-2px);
}

body.acc-body .svc-table tr.is-selected { background: #eef3f8; }
body.acc-body .svc-pill {
    background: #e8eef5;
    color: var(--acc-ink);
    font-weight: 700;
}

body.acc-body .svc-btn,
body.acc-body button.svc-btn {
    background: var(--acc-ink);
    box-shadow: 0 8px 18px rgba(30, 75, 122, 0.24);
}
body.acc-body .svc-btn:hover,
body.acc-body button.svc-btn:hover { filter: brightness(1.08); }
body.acc-body .svc-btn.copper,
body.acc-body button.svc-btn.copper {
    background: #3d5a80;
    color: #fff;
    box-shadow: 0 8px 18px rgba(61, 90, 128, 0.28);
}
body.acc-body .svc-btn.ghost,
body.acc-body button.svc-btn.ghost {
    background: #fff;
    color: var(--acc-ink);
    border-color: #c5d0de;
    box-shadow: none;
}
body.acc-body .svc-btn.ghost:hover,
body.acc-body button.svc-btn.ghost:hover {
    background: #f4f7fb;
    filter: none;
}
body.acc-body .svc-btn.danger,
body.acc-body button.svc-btn.danger {
    background: var(--svc-danger);
    color: #fff;
    box-shadow: 0 8px 18px rgba(225, 29, 72, 0.24);
}

body.acc-body .svc-form input,
body.acc-body .svc-form select,
body.acc-body .svc-form textarea,
body.acc-body .svc-inline input,
body.acc-body .svc-inline select,
body.acc-body .svc-inline textarea {
    border-color: #d5dbe3;
}
body.acc-body .svc-form input:focus,
body.acc-body .svc-form select:focus,
body.acc-body .svc-form textarea:focus,
body.acc-body .svc-inline input:focus,
body.acc-body .svc-inline select:focus,
body.acc-body .svc-inline textarea:focus {
    border-color: var(--acc-ink-soft);
    outline: 3px solid rgba(37, 99, 235, 0.18);
}
body.acc-body .dropdown-item:hover { background: #eef3f8; }
body.acc-body .acc-icon-btn span:not(.material-symbols-rounded) {
    min-width: 1.25rem;
    border-radius: 999px;
    background: var(--acc-accent);
    color: #fff;
    padding: 1px 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.Elmasium-btn-loading {
    position: relative;
    overflow: hidden;
}

.Elmasium-btn-loading > .Elmasium-btn-loading__content {
    visibility: hidden;
}

.Elmasium-btn-loading > .Elmasium-btn-loading__spinner-host {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 0;
    transition: none;
}

.Elmasium-btn-loading > .Elmasium-btn-loading__spinner-host .spinner-border {
    margin: 0;
    vertical-align: middle;
    transition: none;
}

.cb-page { display: flex; flex-direction: column; gap: 14px; }

.cb-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.cb-head h1 {
    margin: 0;
    color: var(--acc-ink);
    font-size: 28px;
    letter-spacing: -0.03em;
}

.cb-head p { margin: 4px 0 0; max-width: 40rem; color: var(--acc-muted); }
.cb-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.cb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--acc-ink);
    color: #fff;
    font: inherit;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

.cb-btn:hover { filter: brightness(1.08); }
.cb-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.35); outline-offset: 2px; }
.cb-btn .material-symbols-rounded { font-size: 20px; }

.cb-btn.ghost {
    border-color: #c5d0de;
    background: #fff;
    color: var(--acc-ink);
}

.cb-btn.ghost:hover { background: #f4f7fb; filter: none; }
.cb-btn.danger { background: var(--svc-danger); }
.cb-btn:disabled { opacity: 0.45; cursor: default; filter: none; }
.cb-page input[type="checkbox"] { width: auto; height: auto; }

/* The filter bar of a list: the search box first, the other filters after it, then Search, Clear and the record count. */
.cb-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 14px;
    align-items: flex-end;
    padding: 14px 16px;
    border: 1px solid var(--acc-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(30, 41, 59, 0.05);
}

.cb-filters > .cb-field { flex: 1 1 150px; max-width: 260px; }
.cb-filters > .cb-field:first-of-type { flex: 2 1 220px; max-width: 420px; }
.cb-filter-end { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.cb-count { margin: 0; color: var(--acc-muted); font-size: 13px; font-weight: 650; white-space: nowrap; }

.cb-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--acc-muted);
    font-size: 12px;
    font-weight: 700;
}

.cb-req::after {
    content: " *";
    color: var(--svc-danger);
}

.cb-field > .field-validation-valid:empty {
    display: none;
}

.cb-field .field-validation-error {
    color: var(--svc-danger);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

.cb-page input:not([type="hidden"]),
.cb-page select,
.cb-page textarea {
    width: 100%;
    height: 40px;
    border: 1px solid #d5dbe3;
    border-radius: 10px;
    background: #fff;
    color: var(--acc-text);
    padding: 0 12px;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
}

.cb-page input:focus,
.cb-page select:focus {
    border-color: var(--acc-ink-soft);
    outline: 3px solid rgba(37, 99, 235, 0.18);
}

.cb-page input.input-validation-error,
.cb-page select.input-validation-error,
.cb-page textarea.input-validation-error {
    border-color: var(--svc-danger);
}

.cb-page input.input-validation-error:focus,
.cb-page select.input-validation-error:focus,
.cb-page textarea.input-validation-error:focus {
    border-color: var(--svc-danger);
    outline: 3px solid rgba(225, 29, 72, 0.2);
}

.cb-page input[readonly] { background: #f5f7fb; }
.cb-page input[type="checkbox"] {
    width: 18px;
    height: 18px;
    padding: 0;
}
.cb-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
}
.cb-page textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }

.cb-panel {
    max-height: calc(100dvh - 220px);
    overflow: auto;
    border: 1px solid var(--acc-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(30, 41, 59, 0.05);
}

.cb-grid { width: 100%; min-width: 680px; border-collapse: collapse; }
.cb-grid.wide { min-width: 920px; }
.cb-grid th,
.cb-grid td {
    padding: 11px 14px;
    border-bottom: 1px solid #e6ebf2;
    text-align: start;
    vertical-align: middle;
}

.cb-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f5f7fb;
    color: var(--acc-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cb-grid tbody tr:last-child td { border-bottom: 0; }
.cb-row { cursor: pointer; }
.cb-row:hover { background: #f4f8fc; }
.cb-row:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.45); outline-offset: -2px; }
.cb-open { width: 44px; color: #8aa0b8; text-align: center; }
.cb-open.has-delete { width: 76px; white-space: nowrap; }
.cb-open.has-delete.has-link { width: 108px; }
.cb-row:hover .cb-open,
.cb-row:focus-visible .cb-open { color: var(--acc-ink); }
.cb-open .material-symbols-rounded { font-size: 18px; vertical-align: middle; }
.cb-row-delete {
    border: 0;
    padding: 0;
    margin-left: 6px;
    background: transparent;
    color: inherit;
    line-height: 0;
    cursor: pointer;
}
.cb-row-delete:hover,
.cb-row-delete:focus-visible { color: var(--svc-danger); }

.cb-num {
    direction: ltr;
    font-variant-numeric: tabular-nums;
    text-align: end;
    white-space: nowrap;
}

.cb-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e8eef5;
    color: var(--acc-ink);
    font-size: 12px;
    font-weight: 700;
}

.cb-badge.cash { background: #e8f6ee; color: #166534; }
.cb-badge.bank { background: #e8f1fc; color: #1d4ed8; }
.cb-badge.pos { background: #f3e8ff; color: #6b21a8; }
.cb-badge.card { background: #fff1e6; color: #9a3412; }
.cb-badge.danger { background: #fde8e8; color: #b91c1c; }
.cb-in { color: #166534; font-weight: 700; }
.cb-out { color: #be123c; font-weight: 700; }
.cb-zero { color: var(--acc-muted); font-weight: 650; }
.cb-empty { padding: 36px 16px; color: var(--acc-muted); text-align: center; }
.cb-grid tr.cb-sum td { background: #f7f9fc; font-weight: 700; }
.cb-files { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; padding: 0; list-style: none; }
.cb-files li { display: flex; align-items: center; gap: 6px; }
.cb-files .material-symbols-rounded { font-size: 18px; color: var(--acc-muted); }
.cb-files .cb-sub { display: inline; margin: 0; }
.cb-sub { display: block; margin-top: 2px; color: var(--acc-muted); font-size: 12px; font-weight: 500; }
.is-hidden { display: none !important; }

.cb-modal .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - var(--bs-modal-margin) * 2);
}

.cb-modal .modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.cb-modal .modal-header { padding: 16px 20px; border-bottom: 1px solid var(--acc-line); }
.cb-modal .modal-title { margin: 0; color: var(--acc-ink); font-size: 20px; }
.cb-modal .modal-body { padding: 18px 20px 20px; }

.cb-account-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
    gap: 12px;
}

.cb-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.cb-moves { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--acc-line); }
.cb-moves h2,
.cb-moves h3 { margin: 0 0 10px; color: var(--acc-ink); font-size: 16px; }
.cb-move-context { margin: -4px 0 10px; color: var(--acc-muted); font-size: 13px; }

.cb-move-scroll {
    max-height: 240px;
    overflow: auto;
    margin-bottom: 16px;
    border: 1px solid var(--acc-line);
    border-radius: 12px;
}

.cb-move-scroll .cb-grid { min-width: 760px; }
.cb-move-scroll .cb-grid td { vertical-align: top; }
.cb-move-scroll .cb-empty { padding: 22px 16px; }

/* The form grid: four columns. A field takes half the row; cb-col-1 is a quarter (dates, amounts, codes),
   cb-col-3 three quarters, cb-span-2 the whole row. In a narrow modal the quarter fields widen to half. */
.cb-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.cb-form > * { grid-column: span 2; }
.cb-form > .cb-col-1 { grid-column: span 1; }
.cb-form > .cb-col-3 { grid-column: span 3; }
.cb-span-2, .cb-form > .cb-span-2, .cb-form > .cb-section, .cb-form > .cb-form-actions { grid-column: 1 / -1; }
.cb-modal .modal-body, .cb-form-panel { container-type: inline-size; }
@container (max-width: 640px) {
    .cb-form > .cb-col-1 { grid-column: span 2; }
    .cb-form > .cb-col-3 { grid-column: 1 / -1; }
}
@container (max-width: 400px) {
    .cb-form > * { grid-column: 1 / -1; }
}
.cb-move-set { min-inline-size: 0; margin: 0; padding: 0; border: 0; }

/* Rows that only list: no detail page and no editor behind them. */
.cb-row.is-static { cursor: default; }
.cb-row.is-static:hover { background: transparent; }

/* A head with many actions: the actions move under the title instead of squeezing it. */
.cb-head.wrap { flex-wrap: wrap; }
.cb-head.wrap > div:first-child { flex: 1 1 320px; }

/* Buttons inside a grid row. */
.cb-btn.sm { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
.cb-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

/* A form laid out on one line, inside a grid cell or a page head. */
.cb-inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.cb-page .cb-inline input:not([type="hidden"]):not([type="checkbox"]),
.cb-page .cb-inline select { flex: 1 1 110px; width: auto; min-width: 0; }
.cb-inline .cb-btn { flex: 0 0 auto; }

/* Heading between two panels, and the status badge beside a record title. */
.cb-title { margin: 6px 0 -4px; color: var(--acc-ink); font-size: 16px; }
/* Label and value rows of one record. Long values keep their line breaks. */
.cb-grid.cb-facts td { white-space: pre-line; vertical-align: top; }
.cb-grid.cb-facts td:first-child { width: 220px; color: var(--acc-muted); font-weight: 600; white-space: nowrap; }
.cb-head h1 .cb-badge { margin-inline-start: 8px; letter-spacing: 0; vertical-align: middle; }

/* Several short forms stacked in one modal. */
.cb-modal .cb-form + .cb-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--acc-line); }

@media (max-width: 860px) {
    .cb-head { align-items: stretch; flex-direction: column; }
    .cb-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .cb-account-fields { grid-template-columns: 1fr; }
    .cb-filters > .cb-field, .cb-filters > .cb-field:first-of-type { flex-basis: 100%; max-width: none; }
    .cb-filter-end { justify-content: space-between; width: 100%; }
    .cb-panel { max-height: none; }
}

body.acc-body #toast-container {
    z-index: 1090;
}

#toast-container .Elmasium-toast {
    min-width: 320px;
    max-width: 420px;
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    background: #fff;
    color: #212529;
    opacity: 1;
}

#toast-container .Elmasium-toast .toast-body {
    font-weight: 600;
    background: #fff;
}

#toast-container .Elmasium-toast .Elmasium-toast__header {
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

#toast-container .Elmasium-toast .Elmasium-toast__time {
    color: rgba(255, 255, 255, 0.85);
}

#toast-container .Elmasium-toast .btn-close {
    filter: invert(1) grayscale(100%);
    opacity: 0.9;
}

#toast-container .Elmasium-toast--info {
    border-inline-start: 6px solid #0b5ed7;
}

#toast-container .Elmasium-toast--error {
    border-inline-start: 6px solid #b02a37;
}

#toast-container .Elmasium-toast--info .Elmasium-toast__header {
    background: #0d6efd;
}

#toast-container .Elmasium-toast--error .Elmasium-toast__header {
    background: #dc3545;
}

/* Maintenance plan: months beyond the contract length stay hidden. */
.svc-plan-month.is-hidden { display: none; }

/*
    Pages before sign-in: login, sign-up, invitation, forgot password.
    Wide screens: a dark brand panel beside the form. Narrow screens: the form alone on the light background.
    The forgot-password modal sits inside the form card, so nothing from .acc-auth down to .acc-auth-card may
    create a stacking context or a containing block for fixed elements (no transform, filter, isolation or z-index).
*/
.acc-auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
}

.acc-auth-brand { margin: 0; }
.acc-auth-brand strong { font-size: 18px; }

/* Brand panel: the sidebar's steel-to-night gradient, slow blue lights and a fine grid. */
.acc-auth-side {
    position: sticky;
    top: 0;
    display: none;
    flex-direction: column;
    gap: 28px;
    align-self: start;
    height: 100vh;
    padding: clamp(28px, 3.4vw, 48px);
    overflow: hidden;
    isolation: isolate;
    color: #f8fafc;
    background: linear-gradient(155deg, #24507f 0%, #1a3656 42%, #121a26 100%);
}

.acc-auth-side::before {
    content: "";
    position: absolute;
    inset: -20%;
    z-index: -2;
    background:
        radial-gradient(34% 30% at 76% 20%, rgba(59, 130, 246, 0.55), transparent 70%),
        radial-gradient(36% 32% at 14% 86%, rgba(96, 165, 250, 0.3), transparent 70%),
        radial-gradient(26% 24% at 86% 80%, rgba(148, 163, 184, 0.22), transparent 70%);
    animation: acc-auth-drift 24s ease-in-out infinite alternate;
}

.acc-auth-side::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 95% 80% at 70% 22%, #000 12%, transparent 76%);
    mask-image: radial-gradient(ellipse 95% 80% at 70% 22%, #000 12%, transparent 76%);
}

/* The lights follow the reading direction. */
[dir="rtl"] .acc-auth-side::before, [dir="rtl"] .acc-auth-side::after { scale: -1 1; }

@keyframes acc-auth-drift {
    from { translate: -3% -2%; }
    to { translate: 4% 3%; }
}

.acc-auth-pitch { display: grid; gap: 18px; max-width: 540px; margin-block: auto; }

.acc-auth-eyebrow {
    justify-self: start;
    margin: 0;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #dbe7fb;
    font-size: 13px;
    font-weight: 650;
}

.acc-auth-pitch-title {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 2.7vw, 40px);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

[dir="rtl"] .acc-auth-pitch-title { letter-spacing: 0; line-height: 1.4; }

.acc-auth-pitch-lead { margin: 0; color: #c9d6e6; font-size: 16px; line-height: 1.6; }

.acc-auth-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.acc-auth-points li {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(6px);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.acc-auth-points .material-symbols-rounded {
    display: grid;
    flex: none;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: rgba(96, 165, 250, 0.22);
    color: #bfdbfe;
    font-size: 20px;
}

.acc-auth-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #b9c7d9;
    font-size: 13px;
}

.acc-auth-facts li { display: inline-flex; gap: 6px; align-items: center; }
.acc-auth-facts .material-symbols-rounded { color: #93c5fd; font-size: 18px; }

/* Form side: a light wash with a blue light in two corners and a dot pattern fading out from the middle. */
.acc-auth-main {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    min-height: 100vh;
    padding: 20px clamp(16px, 4vw, 40px);
    background:
        radial-gradient(52% 44% at 100% 0%, rgba(37, 99, 235, 0.17), transparent 70%),
        radial-gradient(46% 40% at 0% 100%, rgba(96, 165, 250, 0.18), transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #f1f5fd 58%, var(--acc-paper) 100%);
}

.acc-auth-main::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(30, 75, 122, 0.28) 1px, transparent 1.5px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 46%, #000 20%, transparent 78%);
    mask-image: radial-gradient(ellipse 70% 62% at 50% 46%, #000 20%, transparent 78%);
    pointer-events: none;
}

/* Positioned without a z-index: they paint over the dot pattern and still share the page's stacking context. */
.acc-auth-top, .acc-auth-card { position: relative; }

.acc-auth-top {
    display: flex;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.acc-auth-top .acc-auth-brand { color: var(--acc-ink); }

/* On the light side the mark carries the brand colours itself. */
.acc-auth-top .acc-brand-mark {
    background: linear-gradient(135deg, var(--acc-accent) 0%, var(--acc-ink) 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
    color: #fff;
}

.acc-auth-top .dropdown { margin-inline-start: auto; }

.acc-auth-card {
    align-self: center;
    justify-self: center;
    width: min(100%, 440px);
    margin: 32px 0 64px;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid transparent;
    border-radius: 22px;
    background:
        linear-gradient(var(--acc-card), var(--acc-card)) padding-box,
        linear-gradient(150deg, rgba(37, 99, 235, 0.55), rgba(213, 219, 227, 0.9) 34%, rgba(213, 219, 227, 0.9) 70%, rgba(96, 165, 250, 0.5)) border-box;
    box-shadow: 0 1px 2px rgba(30, 41, 59, 0.05), 0 24px 60px rgba(30, 75, 122, 0.16);
}

/* The card's content rises in, not the card: an animated card would trap the modal inside it. */
.acc-auth-card > :not(.modal) { animation: acc-auth-rise 420ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }

@keyframes acc-auth-rise {
    from { opacity: 0; translate: 0 10px; }
}

.acc-auth-card h1 {
    margin: 0 0 6px;
    color: var(--acc-ink);
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

[dir="rtl"] .acc-auth-card h1 { letter-spacing: 0; }

.acc-auth-lead { margin: 0 0 22px; color: var(--acc-muted); }

.acc-auth-card a:not(.cb-btn) { color: var(--acc-accent); font-weight: 600; text-decoration: none; }
.acc-auth-card a:not(.cb-btn):hover { text-decoration: underline; }

.acc-auth-foot {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid #e6eaf0;
    color: var(--acc-muted);
    font-size: 14px;
    text-align: center;
}

@media (min-width: 1000px) {
    .acc-auth { grid-template-columns: minmax(420px, 0.9fr) minmax(0, 1.1fr); }
    .acc-auth-side { display: flex; }
    .acc-auth-top .acc-auth-brand { display: none; }
}

/* Short screens keep the headline and the four tiles; the rest of the panel gives way. */
@media (min-width: 1000px) and (max-height: 700px) {
    .acc-auth-eyebrow, .acc-auth-facts { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .acc-auth-side::before, .acc-auth-card > :not(.modal) { animation: none; }
}
.acc-companies .dropdown-menu { min-width: 260px; max-width: 340px; }
.acc-companies .dropdown-item { display: flex; gap: 8px; align-items: center; justify-content: space-between; white-space: normal; }

.acc-auth-form { display: grid; gap: 14px; }
.acc-auth-field { display: grid; gap: 6px; align-content: start; }
/* First and last name share a row; on a narrow phone each takes its own. */
.acc-auth-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }

@media (max-width: 420px) {
    .acc-auth-pair { grid-template-columns: minmax(0, 1fr); }
}

.acc-auth-field > label { color: var(--acc-muted); font-size: 13px; font-weight: 650; }
.acc-auth-field .form-control {
    height: 46px;
    border-color: var(--acc-line);
    border-radius: 12px;
    background-color: #f8fafc;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.acc-auth-field .form-control:hover { border-color: #b3c0d0; }

.acc-auth-field .form-control:focus {
    border-color: var(--acc-accent);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.acc-auth-field .form-control.input-validation-error { border-color: var(--svc-danger); }
.acc-auth-field .form-control.input-validation-error:focus { box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.14); }
.acc-auth-field .field-validation-error,
.acc-auth-form .validation-summary-errors { color: var(--svc-danger); font-size: 13px; }
.acc-auth-form .validation-summary-errors ul { margin: 0; padding: 0; list-style: none; }

.acc-auth-password { position: relative; }
.acc-auth-password .form-control { padding-inline-end: 44px; }
.acc-auth-password .toggle-password {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 44px;
    border: 0;
    background: transparent;
    color: var(--acc-muted);
}

.acc-auth-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.acc-auth-row label { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.acc-auth-form input[type="checkbox"], .acc-auth-form input[type="radio"] { width: 16px; height: 16px; accent-color: var(--acc-accent); }
.acc-auth-form .cb-btn, .acc-auth-card > .cb-btn { width: 100%; height: 46px; border-radius: 12px; }

.acc-auth-form .cb-btn:not(.ghost), .acc-auth-card > .cb-btn {
    background: linear-gradient(135deg, var(--acc-accent) 0%, var(--acc-ink) 100%);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26);
    transition: box-shadow 160ms ease, translate 160ms ease, filter 160ms ease;
}

.acc-auth-form .cb-btn:not(.ghost):not(:disabled):hover, .acc-auth-card > .cb-btn:hover {
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
    translate: 0 -1px;
}

.acc-auth-form .cb-btn:disabled { box-shadow: none; }
.acc-auth-channels { display: flex; flex-wrap: wrap; gap: 16px; }
.acc-auth-channels label { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; }
.acc-auth-link { border: 0; padding: 0; background: transparent; color: var(--acc-accent); }
.acc-auth-timer { color: var(--acc-muted); font-size: 13px; }
.acc-auth-hint { color: var(--acc-muted); font-size: 13px; margin: 6px 0 0; }

.cb-pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 10px; }
.cb-pager-range { color: var(--acc-muted); font-size: 13px; font-weight: 650; }
.cb-pager .material-symbols-rounded { font-size: 18px; }

/* Shown only on paper: the heading a printed report carries in place of the page chrome. */
.cb-print-only { display: none; }

@media print {
    @page { margin: 12mm; }
    body { background: #fff !important; }
    .acc-side, .acc-top, .acc-tabbar, .acc-cari, .cb-filters, .cb-actions, .cb-row-actions, .cb-no-print, .cb-pager,
    .cb-open, .modal, .modal-backdrop, .toast-container, .Elmasium-feedback-fab { display: none !important; }
    .cb-head { display: none !important; }
    .acc-shell, .acc-main, .acc-content, .cb-page { display: block !important; margin: 0 !important; padding: 0 !important; width: auto !important; max-width: none !important; }
    .cb-print-only { display: block !important; }
    .cb-print-head { margin-bottom: 10px; }
    .cb-print-logo { display: block !important; max-width: 185px; max-height: 56px; margin: 0 auto 10px 0; object-fit: contain; }
    .cb-print-head h1 { margin: 2px 0; font-size: 18px; }
    .cb-print-head p { margin: 0; font-size: 12px; }
    .cb-panel { border: 0 !important; box-shadow: none !important; overflow: visible !important; }
    .cb-grid, .cb-grid.wide { min-width: 0 !important; width: 100% !important; font-size: 11px; }
    .cb-grid th, .cb-grid td { padding: 4px 6px !important; border-bottom: 1px solid #c9d1dc !important; }
    .cb-grid a { color: inherit !important; text-decoration: none !important; }
    .cb-badge { padding: 0 !important; border: 0 !important; background: none !important; color: inherit !important; font-weight: 600; }
    .cb-grid tr { break-inside: avoid; }
    .cb-grid thead { display: table-header-group; }
}

/* The company logo on the company settings screen. */
.cb-logo-preview img { display: block; max-width: 240px; max-height: 80px; object-fit: contain; }

/* The heading of a group of fields in a form. */
.cb-section { grid-column: 1 / -1; margin: 6px 0 -2px; padding-top: 12px; border-top: 1px solid var(--acc-line); color: var(--acc-ink); font-size: 15px; font-weight: 700; }
.cb-form > .cb-section:first-child, .cb-form > input[type="hidden"] + .cb-section { margin-top: 0; padding-top: 0; border-top: 0; }
.cb-hint { margin: 0; color: var(--acc-muted); font-size: 12px; font-weight: 500; line-height: 1.4; }
.cb-lines-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.cb-page .cb-lines .cb-lines-total { min-width: 96px; color: var(--acc-ink); font-weight: 650; text-align: right; white-space: nowrap; }

/* The trail above a record or a form: the list it belongs to, with the way back, then the record. */
.cb-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: -4px; color: var(--acc-ink); font-size: 14px; font-weight: 700; }
.cb-crumbs a { color: var(--acc-muted); font-weight: 600; text-decoration: none; }
.cb-crumbs a:hover, .cb-crumbs a:focus-visible { color: var(--acc-ink); }
.cb-crumbs .material-symbols-rounded { color: var(--acc-muted); font-size: 18px; }
.cb-crumbs .cb-crumb-back { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-inline-end: 4px; border: 1px solid #c5d0de; border-radius: 9px; background: #fff; }
.cb-crumbs .cb-crumb-back .material-symbols-rounded { color: var(--acc-ink); }
html[dir="rtl"] .cb-crumbs .material-symbols-rounded { transform: scaleX(-1); }

/* A record on its own page: its panels show whole, the page scrolls, not the panel. */
.cb-record .cb-panel { max-height: none; }

/* A form on its own page: the fields in a panel, Cancel and Save in a bar that stays at the bottom of the window. */
.cb-form-page { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.cb-panel.cb-form-panel { max-height: none; overflow: visible; padding: 18px; }
.cb-form-bar {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid var(--acc-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 -6px 24px rgba(30, 41, 59, 0.08);
}
/* Delete sits apart from Cancel and Save, at the start of the bar. */
.cb-form-bar .cb-bar-start, .cb-form-actions .cb-bar-start { margin-inline-end: auto; }

/* In a long modal with one form, Cancel and Save stay in sight while the fields scroll. */
.cb-modal .modal-dialog-scrollable .modal-body > form.cb-form:only-of-type > .cb-form-actions {
    position: sticky;
    bottom: -20px;
    z-index: 2;
    margin: 6px -20px -20px;
    padding: 12px 20px;
    border-top: 1px solid var(--acc-line);
    background: #fff;
}

/* Actions that do not fit beside the main one, gathered in a menu. */
@media (max-width: 860px) {
    .cb-actions .cb-more > .cb-btn { width: 100%; }
}
.cb-more .dropdown-menu { min-width: 220px; padding: 6px; border: 1px solid var(--acc-line); border-radius: 12px; box-shadow: 0 16px 36px rgba(30, 41, 59, 0.14); }
.cb-more .dropdown-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--acc-text); font-weight: 600; text-align: start; }
.cb-more .dropdown-item:hover, .cb-more .dropdown-item:focus-visible { background: #f4f7fb; color: var(--acc-ink); }
.cb-more .dropdown-item.danger { color: var(--svc-danger); }
.cb-more .dropdown-item .material-symbols-rounded { font-size: 18px; }
.cb-more form { margin: 0; }

/* The line table of a document form scrolls sideways on a narrow window; the page keeps its width. */
.cb-lines-scroll { overflow-x: auto; border: 1px solid var(--acc-line); border-radius: 12px; }
.cb-lines .cb-row-delete, [data-cb-lines] .cb-row-delete { margin: 0; padding: 6px; color: #8aa0b8; }
/* A line table inside a modal takes the width the modal has. */
.cb-modal .cb-grid.cb-lines, .cb-modal [data-cb-lines] { min-width: 0; }

/* One item of a list shown in a modal, with its own small actions under it. */
.cb-stack-item { display: grid; gap: 8px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--acc-line); }
.cb-stack-item > p { margin: 0; }
.cb-stack-item .cb-row-actions { justify-content: flex-start; }

/* A tick box with its label beside it, wherever it stands in a form. */
.cb-field.cb-check { justify-content: flex-start; color: var(--acc-text); font-size: 14px; font-weight: 600; }
.cb-form > .cb-field.cb-check { align-self: end; }

/* Rows of a grid ticked for a printout, and the bar that ticks, clears, and prints them. */
.cb-select-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cb-select-bar .cb-check { min-height: 30px; margin: 0; color: var(--acc-muted); font-size: 13px; font-weight: 650; }
.cb-select-bar .cb-field { min-width: 150px; }
.cb-select-bar .cb-count { margin-inline-start: auto; }
.cb-grid .cb-tick { width: 40px; text-align: center; }
.cb-row-link { margin-right: 6px; color: inherit; line-height: 0; }
.cb-row-link:hover, .cb-row-link:focus-visible { color: var(--acc-ink-soft); }

/* Totals shown above a list, one tile each. */
.cb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cb-tile { padding: 14px 16px; border: 1px solid var(--acc-line); border-radius: 14px; background: #fff; box-shadow: 0 10px 28px rgba(30, 41, 59, 0.05); }
.cb-tile span { display: block; color: var(--acc-muted); font-size: 12px; font-weight: 700; }
.cb-tile strong { display: block; margin-top: 4px; color: var(--acc-ink); font-size: 22px; line-height: 1.2; }
@media print {
    .cb-select-bar, .cb-tick { display: none !important; }
}

/* Shown while an admin acts as a person. The storefront has the same rules in css/site.css; the ERP loads only this file. */
.Elmasium-impersonation-banner {
    position: sticky;
    top: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 44px;
    padding: 8px 16px;
    background: #b42318;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.Elmasium-impersonation-banner .material-symbols-rounded { font-size: 20px; line-height: 1; }
.Elmasium-impersonation-banner-form { margin: 0; }

.Elmasium-impersonation-banner-return {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 4px 10px;
    background: transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.Elmasium-impersonation-banner-return:hover { background: rgba(255, 255, 255, 0.12); }

@media print {
    .Elmasium-impersonation-banner { display: none; }
}

/* A field that starts a new row of the form grid. */
.cb-form > .cb-row-start { grid-column: 1 / span 2; }
@container (max-width: 400px) {
    .cb-form > .cb-row-start { grid-column: 1 / -1; }
}

/*
    A person's own account and notifications (Views/Themes/erp/Account). Both pages are driven by the scripts of the
    storefront account pages (js/account/account-my.js, js/account/account-notifications.js, js/shared/address-section.js).
    Those scripts build their rows, badges and pager buttons with the storefront's class names (Elmasium-myaccount-*,
    Elmasium-address-*, ds-notif-*); the ERP does not load the storefront's stylesheets, so they are laid out here.
*/
.cb-profile .cb-panel, .cb-notifications .cb-panel { max-height: none; }
.cb-profile .cb-title .cb-badge { margin-inline-start: 8px; vertical-align: middle; }
.cb-profile .field-validation-valid:empty, .cb-profile .field-validation-error:empty, .cb-profile .cb-hint:empty { display: none; }
.cb-profile .field-validation-error { color: var(--svc-danger); font-size: 12px; font-weight: 650; line-height: 1.35; }
.cb-profile input[type="radio"] { flex: none; width: 18px; height: 18px; margin-top: 1px; padding: 0; accent-color: var(--acc-ink); }

/* A row of small controls: filters at the start, actions at the end. */
.cb-profile-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cb-profile-bar-end { margin-inline-start: auto; }
.cb-profile-bar > .cb-field { flex: 0 1 240px; }
.cb-profile-bar > .cb-hint { flex: 1 1 240px; }

.cb-profile-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.cb-profile-photo-actions { display: grid; gap: 6px; }
.cb-profile-avatar {
    display: grid;
    flex: none;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: 50%;
    background: #e8eef5 center / cover no-repeat;
    color: var(--acc-ink);
    font-size: 24px;
    font-weight: 700;
}

/* Under the e-mail and the phone: whether it is verified, and the button that verifies it while it is not. */
.cb-profile-verify { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cb-profile [data-account-badge] { gap: 4px; background: #e8f6ee; color: #166534; }
.cb-profile [data-account-badge].is-unverified { background: #fde8e8; color: #b91c1c; }
.cb-profile [data-account-badge] .material-symbols-rounded { font-size: 16px; }
.cb-profile [data-account-badge]:has([data-account-badge-text]:empty) { display: none; }
.cb-profile .cb-btn.is-verified { display: none; }

.cb-profile .password-strength--segments.is-empty { display: none; }
.cb-profile .password-strength__label { margin: 0 0 6px; color: var(--acc-muted); font-size: 12px; font-weight: 500; }
.cb-profile .password-strength__label-prefix { margin-inline-end: 4px; }
.cb-profile .password-strength__label-value { font-weight: 700; }
.cb-profile .password-strength__label-value--danger { color: #dc3545; }
.cb-profile .password-strength__label-value--warning { color: #c2410c; }
.cb-profile .password-strength__label-value--success { color: #198754; }
.cb-profile .password-strength__label-value--extra { color: #146c43; }
.cb-profile .password-strength__segments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cb-profile .password-strength__segment { display: block; height: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.08); }
.cb-profile .password-strength__segment.is-filled.is-danger { background: #dc3545; }
.cb-profile .password-strength__segment.is-filled.is-warning { background: #fd7e14; }
.cb-profile .password-strength__segment.is-filled.is-success { background: #198754; }
.cb-profile .password-strength__segment.is-filled.is-extra { background: #146c43; }

.cb-profile .Elmasium-myaccount-security-twofactor-row { align-items: flex-start; min-height: 0; padding: 4px 0; }
.cb-profile .Elmasium-myaccount-security-twofactor-row.is-disabled { opacity: 0.55; }
.cb-profile .Elmasium-myaccount-pill,
.cb-profile .Elmasium-myaccount-notif-readonly,
.cb-profile .Elmasium-address-tile-map-pill {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e8eef5;
    color: var(--acc-ink);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.cb-profile .Elmasium-myaccount-pill--success, .cb-profile .Elmasium-address-tile-map-pill--default { background: #e8f6ee; color: #166534; }
.cb-profile .Elmasium-myaccount-pill--neutral { background: #e8eef5; color: var(--acc-muted); }

/* Small buttons the scripts build: closing a session, the pages of a list, the actions of an address. */
.cb-profile .Elmasium-myaccount-security-session-close,
.cb-profile .Elmasium-myaccount-notif-page,
.cb-profile .Elmasium-address-tile-actions button,
.cb-notifications .ds-notif-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 30px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid #c5d0de;
    border-radius: 8px;
    background: #fff;
    color: var(--acc-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
}
.cb-profile .Elmasium-myaccount-security-session-close:hover,
.cb-profile .Elmasium-myaccount-notif-page:hover,
.cb-profile .Elmasium-address-tile-actions button:hover,
.cb-notifications .ds-notif-pagination-btn:hover { background: #f4f7fb; }
.cb-profile .Elmasium-myaccount-notif-page.is-active,
.cb-notifications .ds-notif-pagination-btn.is-active { border-color: var(--acc-ink); background: var(--acc-ink); color: #fff; }
.cb-profile .Elmasium-myaccount-notif-page:disabled,
.cb-profile .Elmasium-address-tile-actions button:disabled,
.cb-notifications .ds-notif-pagination-btn:disabled { opacity: 0.45; cursor: default; }
.cb-profile .Elmasium-myaccount-notif-page .material-symbols-rounded,
.cb-profile .Elmasium-address-tile-actions .material-symbols-rounded,
.cb-notifications .ds-notif-pagination-btn .material-symbols-rounded { font-size: 18px; }
.cb-profile .Elmasium-address-tile-delete:hover { border-color: var(--svc-danger); color: var(--svc-danger); }

.cb-profile-sessions.is-scrollable { max-height: 320px; overflow: auto; }
.cb-profile .Elmasium-myaccount-security-session-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    padding: 10px 0;
    border-bottom: 1px solid #e6ebf2;
}
.cb-profile .Elmasium-myaccount-security-session-item:first-child { padding-top: 0; }
.cb-profile .Elmasium-myaccount-security-session-title { margin: 0; color: var(--acc-text); font-size: 14px; font-weight: 650; }
.cb-profile .Elmasium-myaccount-security-session-meta { margin: 2px 0 0; color: var(--acc-muted); font-size: 12px; }
.cb-profile .Elmasium-myaccount-security-session-action { display: flex; align-items: center; gap: 8px; }
.cb-profile .Elmasium-myaccount-security-sessions-empty { margin: 0; color: var(--acc-muted); }

/* Addresses: the kinds as pills over the list, one row per address. The map preview of the storefront card is left out. */
.cb-profile-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-profile .Elmasium-address-filter {
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--acc-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}
.cb-profile .Elmasium-address-filter:hover { background: rgba(37, 99, 235, 0.08); color: var(--acc-ink); }
.cb-profile .Elmasium-address-filter.is-active { background: var(--acc-ink); color: #fff; }
.cb-profile .Elmasium-address-list { margin-top: 12px; border-top: 1px solid #e6ebf2; }
.cb-profile .Elmasium-address-tile {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 14px;
    padding: 11px 0;
    border-bottom: 1px solid #e6ebf2;
}
.cb-profile .Elmasium-address-tile-map-canvas, .cb-profile .Elmasium-address-tile-map-empty { display: none; }
.cb-profile .Elmasium-address-tile-title { margin: 0; color: var(--acc-text); font-size: 14px; font-weight: 650; }
.cb-profile .Elmasium-address-tile-meta { display: flex; align-items: center; gap: 4px; margin-top: 2px; color: var(--acc-muted); font-size: 12px; }
.cb-profile .Elmasium-address-tile-meta .material-symbols-rounded { font-size: 16px; }
.cb-profile .Elmasium-address-tile-desc { margin: 2px 0 0; color: var(--acc-muted); font-size: 13px; }
.cb-profile .Elmasium-address-tile-actions { display: flex; gap: 6px; }
/* The "new address" tile the script adds after the rows: the button over the list does that here, so the tile shows
   only while there is no address, as the empty state of the list. */
.cb-profile .Elmasium-address-tile--empty { display: none; }
.cb-profile .Elmasium-address-tile--empty:only-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 2px;
    width: 100%;
    padding: 28px 16px;
    border: 0;
    background: none;
    color: var(--acc-muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.cb-profile .Elmasium-address-tile-empty-icon { display: none; }
.cb-profile .Elmasium-address-tile-empty-title { color: var(--acc-ink); font-size: 14px; font-weight: 650; }
/* The map of the address form. It keeps its own layers under the buttons that stay at the bottom of the window. */
.cb-profile-map { height: 260px; border: 1px solid var(--acc-line); border-radius: 12px; overflow: hidden; isolation: isolate; }
.cb-profile-map.is-unavailable { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--acc-muted); font-size: 13px; }

/* Notification preferences: one row per notification, a tick box per channel. */
.cb-profile-channels th.cb-profile-channel, .cb-profile .Elmasium-myaccount-notif-channel-cell { width: 110px; text-align: center; }
.cb-profile .Elmasium-myaccount-notif-type { display: flex; align-items: flex-start; gap: 10px; }
.cb-profile .Elmasium-myaccount-notif-type-icon {
    display: grid;
    flex: none;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    background: #e8eef5;
    color: var(--acc-ink);
}
.cb-profile .Elmasium-myaccount-notif-type-icon .material-symbols-rounded { font-size: 18px; }
.cb-profile .Elmasium-myaccount-notif-type-title { font-weight: 650; }
.cb-profile .Elmasium-myaccount-notif-type-desc { margin-top: 2px; color: var(--acc-muted); font-size: 12px; }
.cb-profile .Elmasium-myaccount-notif-readonly { margin-top: 4px; }
.cb-profile .Elmasium-myaccount-notif-check { display: inline-flex; margin: 0; }
.cb-profile .Elmasium-myaccount-notif-check-mark { display: none; }
.cb-profile .Elmasium-myaccount-notif-empty { padding: 28px 16px; color: var(--acc-muted); text-align: center; }
.cb-profile .cb-pager { justify-content: space-between; margin-top: 0; }
.cb-profile-pages { display: flex; flex-wrap: wrap; gap: 6px; }

/* Notifications: one row per notification. A row is a button; it opens the notification in a window. */
.cb-notifications .ds-notif-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #e6ebf2;
    background: none;
    color: var(--acc-text);
    font: inherit;
    text-align: start;
    cursor: pointer;
}
.cb-notifications .ds-notif-card:last-child { border-bottom: 0; }
.cb-notifications .ds-notif-card:hover { background: #f4f8fc; }
.cb-notifications .ds-notif-card:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.45); outline-offset: -2px; }
.cb-notifications .ds-notif-card-icon {
    display: grid;
    flex: none;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 10px;
    background: #e8f1fc;
    color: #1d4ed8;
}
.cb-notifications .ds-notif-card-icon.tone-green { background: #e8f6ee; color: #166534; }
.cb-notifications .ds-notif-card-icon.tone-orange { background: #fff1e6; color: #9a3412; }
.cb-notifications .ds-notif-card-icon.tone-gray { background: #e8eef5; color: var(--acc-muted); }
.cb-notifications .ds-notif-card-icon .material-symbols-rounded { font-size: 20px; }
.cb-notifications .ds-notif-card-body { display: grid; flex: 1 1 auto; gap: 4px; min-width: 0; }
.cb-notifications .ds-notif-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cb-notifications .ds-notif-card-title-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.cb-notifications .ds-notif-card-title { font-weight: 600; }
.cb-notifications .ds-notif-card.is-unread .ds-notif-card-title { color: var(--acc-ink); font-weight: 750; }
/* An unread notification carries a badge; its text is the label the script gives the storefront's dot. */
.cb-notifications .ds-notif-card-unread-dot {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e8f1fc;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}
.cb-notifications .ds-notif-card-unread-dot::after { content: attr(aria-label); }
.cb-notifications .ds-notif-card-date { flex: none; color: var(--acc-muted); font-size: 12px; white-space: nowrap; }
.cb-notifications .ds-notif-card-message {
    display: -webkit-box;
    overflow: hidden;
    color: var(--acc-muted);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.cb-notifications .ds-notif-card-channels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--acc-muted); font-size: 12px; }
.cb-notifications .ds-notif-channel-list, .cb-notifications .ds-notif-detail-channel-list { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cb-notifications .ds-notif-channel,
.cb-notifications .ds-notif-detail-channel {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1f4f8;
    color: #9aa8b8;
    font-size: 12px;
    font-weight: 650;
}
.cb-notifications .ds-notif-channel.is-active,
.cb-notifications .ds-notif-detail-channel.is-active { background: #e8eef5; color: var(--acc-ink); }
.cb-notifications .ds-notif-detail-channel .material-symbols-rounded { font-size: 16px; }
.cb-notifications .cb-pager { gap: 6px; margin-top: 0; }
.cb-notifications .ds-notif-pagination-ellipsis { color: var(--acc-muted); }
.cb-notifications .ds-notif-detail-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.cb-notifications .ds-notif-detail-item-title { margin: 0; color: var(--acc-ink); font-size: 16px; }
.cb-notifications .ds-notif-detail-item-date { display: flex; align-items: center; gap: 4px; margin: 2px 0 0; color: var(--acc-muted); font-size: 12px; }
.cb-notifications .ds-notif-detail-item-date .material-symbols-rounded { font-size: 16px; }
.cb-notifications .ds-notif-detail-message { margin: 0 0 14px; white-space: pre-line; }
.cb-notifications .ds-notif-detail-section-label { margin-bottom: 6px; color: var(--acc-muted); font-size: 12px; font-weight: 700; }

@media (max-width: 860px) {
    .cb-profile .Elmasium-address-tile { grid-template-columns: minmax(0, 1fr); }
    .cb-notifications .ds-notif-card-top { flex-wrap: wrap; }
}

/* Home page. A page of cards instead of one list: tiles for figures, small tables, and charts drawn by the server. */
.cb-home { gap: 16px; }
.cb-home-title {
    margin: 8px 2px -6px;
    color: var(--acc-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.cb-home-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.cb-home-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.cb-home-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* The period switch: today, this week, this month. */
.cb-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--acc-line); border-radius: 12px; background: #fff; }
.cb-seg a {
    padding: 7px 14px;
    border-radius: 9px;
    color: var(--acc-muted);
    font-weight: 650;
    white-space: nowrap;
    text-decoration: none;
}
.cb-seg a:hover { background: #f4f8fc; color: var(--acc-ink); }
.cb-seg a:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.35); outline-offset: 1px; }
.cb-seg a.is-active { background: var(--acc-ink); color: #fff; }

.cb-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 16px 18px 18px;
    border: 1px solid var(--acc-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(30, 41, 59, 0.05);
}
.cb-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cb-card-head h2 { margin: 0; color: var(--acc-ink); font-size: 17px; letter-spacing: -0.01em; }
.cb-card-head a {
    display: inline-flex;
    align-items: center;
    color: var(--acc-ink-soft);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    text-decoration: none;
}
.cb-card-head a:hover { color: var(--acc-ink); }
.cb-card-head a .material-symbols-rounded { font-size: 18px; }
html[dir="rtl"] .cb-card-head a .material-symbols-rounded { transform: scaleX(-1); }
.cb-card h3 { margin: 0; color: var(--acc-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
/* Spaced capitals break the joining of Arabic letters. */
html[dir="rtl"] .cb-home-title, html[dir="rtl"] .cb-card h3, html[dir="rtl"] .cb-mini th, html[dir="rtl"] .cb-chart-title { letter-spacing: 0; }
.cb-none { margin: 0; color: var(--acc-muted); font-size: 14px; }
.cb-none a { color: var(--acc-ink); font-weight: 650; }

/* A tile: label, figure, and a line under it. A zero is shown, only quieter. */
.cb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cb-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f7fb;
    color: inherit;
    text-decoration: none;
}
a.cb-stat:hover { background: #e9eff7; }
a.cb-stat:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.35); outline-offset: 1px; }
.cb-stat-label { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; color: var(--acc-muted); font-size: 12px; font-weight: 600; line-height: 1.35; }
.cb-stat-value {
    color: var(--acc-text);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    overflow-wrap: anywhere;
    unicode-bidi: isolate;
}
.cb-stat-sub { color: var(--acc-muted); font-size: 12px; line-height: 1.35; }
/* An amount keeps its own order (number, then currency) on a right-to-left page, as it does in the grids. */
html[dir="rtl"] .cb-stat-value, html[dir="rtl"] .cb-aging-list b { direction: ltr; text-align: right; }
.cb-stat.zero .cb-stat-value { color: #6b7a8d; font-weight: 600; }
.cb-stat.warn .cb-stat-value { color: #be123c; }
.cb-period {
    display: inline-block;
    padding: 0 6px;
    border-radius: 999px;
    background: #dfe8f3;
    color: var(--acc-ink);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 16px;
    white-space: nowrap;
}

/* What waits for the user: one line each, the count at the end. */
.cb-watch { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 22px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.cb-watch a { display: flex; align-items: center; gap: 10px; height: 100%; padding: 6px; border-radius: 8px; color: var(--acc-text); line-height: 1.3; text-decoration: none; }
.cb-watch a:hover { background: #f4f8fc; }
.cb-watch a:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.45); outline-offset: -2px; }
.cb-watch .material-symbols-rounded { color: var(--acc-ink-soft); font-size: 20px; }
.cb-watch b {
    min-width: 30px;
    margin-inline-start: auto;
    padding: 1px 8px;
    border-radius: 999px;
    background: #e8eef5;
    color: var(--acc-ink);
    font-size: 13px;
    text-align: center;
}
.cb-watch a.is-zero { color: var(--acc-muted); }
.cb-watch a.is-zero .material-symbols-rounded { color: #a9b6c6; }
.cb-watch a.is-zero b { background: transparent; color: #6b7a8d; }
.cb-watch a.is-warn b { background: #fde8e8; color: #b91c1c; }
/* Rows at zero show only while the switch beside the title is on; the empty note shows only while it is off. */
.cb-watch-head { justify-content: flex-start; flex-wrap: wrap; }
.cb-watch-card:not(:has(.cb-switch input:checked)) .cb-watch li.is-zero { display: none; }
.cb-watch-card:has(.cb-switch input:checked) .cb-watch-empty { display: none; }
.cb-watch-empty { margin: 0; color: var(--acc-muted); font-size: 14px; }

/* An on/off switch drawn from a tick box. */
.cb-switch { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--acc-muted); font-size: 13px; cursor: pointer; user-select: none; }
.cb-switch input[type="checkbox"] {
    position: relative;
    flex: none;
    width: 32px;
    min-width: 32px;
    height: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: var(--acc-line);
    appearance: none;
    cursor: pointer;
    transition: background 0.15s;
}
.cb-switch input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px;
    inset-inline-start: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: inset-inline-start 0.15s;
}
.cb-switch input[type="checkbox"]:checked { background: var(--acc-accent); }
.cb-switch input[type="checkbox"]:checked::after { inset-inline-start: 16px; }
.cb-switch input:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.45); outline-offset: 2px; }

/* Details of an entry form (cb-later): hidden while the "Show all fields" switch of their modal, or of the page whose head
   holds it, is off (_LaterSwitch.cshtml, erp.js bindLater). */
.modal:has(.cb-later-switch input:not(:checked)) .cb-later,
.cb-page:has(> .cb-head .cb-later-switch input:not(:checked)) .cb-later:not(.modal .cb-later) { display: none; }
.modal-header .cb-later-switch { margin-inline-start: auto; margin-inline-end: 12px; }
.modal-header:has(.cb-later-switch) .btn-close { margin-inline-start: 0; }

/* A short table inside a card. */
.cb-mini-wrap { overflow-x: auto; }
.cb-mini { width: 100%; border-collapse: collapse; font-size: 14px; }
.cb-mini th {
    padding: 6px 8px;
    border-bottom: 1px solid #e6ebf2;
    color: var(--acc-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: start;
    text-transform: uppercase;
    white-space: nowrap;
}
.cb-mini td { padding: 8px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.cb-mini tbody tr:last-child td { border-bottom: 0; }
.cb-mini th:first-child, .cb-mini td:first-child { padding-inline-start: 0; }
.cb-mini th:last-child, .cb-mini td:last-child { padding-inline-end: 0; }
.cb-mini a { color: var(--acc-ink); font-weight: 650; text-decoration: none; }
.cb-mini a:hover { text-decoration: underline; }
.cb-mini th.cb-num { text-align: end; }
.cb-mini .cb-end { text-align: end; white-space: nowrap; }

/* The open amount by how long it has been due: lighter is younger, darker is older. */
.cb-aging { display: flex; flex-direction: column; gap: 10px; }
.cb-aging-bar { display: flex; gap: 2px; height: 8px; overflow: hidden; border-radius: 999px; background: #eef2f7; }
.cb-aging-bar span { flex: 1 1 0; min-width: 3px; }
.cb-aging-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.cb-aging-list li { display: flex; align-items: center; gap: 8px; }
.cb-aging-list i { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 3px; }
.cb-aging-list b { margin-inline-start: auto; font-variant-numeric: tabular-nums; white-space: nowrap; unicode-bidi: isolate; }
.cb-aging-list li.is-zero { color: var(--acc-muted); }
.cb-aging-list li.is-zero b { color: #6b7a8d; font-weight: 600; }
.cb-age-0 { background: #86b6ef; }
.cb-age-1 { background: #5598e7; }
.cb-age-2 { background: #2a78d6; }
.cb-age-3 { background: #1c5cab; }
.cb-age-4 { background: #0d366b; }

/* A share of a whole, such as the visits of the month that are done. */
.cb-meter { height: 8px; overflow: hidden; border-radius: 999px; background: #cde2fb; }
.cb-meter span { display: block; height: 100%; border-radius: 999px; background: #2a78d6; }
.cb-meter-text { margin: 0; color: var(--acc-text); font-size: 14px; font-weight: 650; }

/* A column chart. Two series beside each other, or the second on top of the first when they are parts of one total. */
.cb-chart { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.cb-chart figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 14px; margin-bottom: 4px; }
.cb-chart-title { color: var(--acc-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.cb-legend { display: inline-flex; gap: 14px; color: var(--acc-muted); font-size: 12px; font-weight: 600; }
.cb-legend i, .cb-tip i { display: inline-block; width: 10px; height: 10px; margin-inline-end: 6px; border-radius: 3px; vertical-align: -1px; }
.cb-s1 { background: #2a78d6; }
.cb-s2 { background: #eb6834; }
.cb-plot { position: relative; display: flex; gap: 4px; height: 148px; padding-top: 16px; border-bottom: 1px solid #c3ccd8; }
.cb-gridline { position: absolute; inset-inline: 0; border-top: 1px solid #eaeef4; pointer-events: none; }
.cb-gridline.top { top: 16px; }
.cb-gridline.mid { top: calc(16px + (100% - 16px) / 2); }
.cb-gridline span {
    position: absolute;
    inset-inline-start: 0;
    bottom: 1px;
    color: #94a3b8;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.cb-chart-empty { position: absolute; inset: 16px 0 0; display: grid; place-items: center; margin: 0; color: var(--acc-muted); font-size: 13px; }
.cb-col {
    position: relative;
    display: flex;
    flex: 1 1 0;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    border-radius: 6px 6px 0 0;
}
.cb-col.stacked { flex-direction: column-reverse; align-items: center; justify-content: flex-start; }
.cb-col:hover { background: rgba(37, 99, 235, 0.07); }
.cb-bar { flex: 0 0 auto; width: min(12px, 42%); border-radius: 4px 4px 0 0; }
.cb-col.stacked .cb-bar { width: min(22px, 70%); }
.cb-col.stacked .cb-bar.under { border-radius: 0; }
.cb-col:not(.is-current) .cb-bar { opacity: 0.55; }
.cb-col:hover .cb-bar { opacity: 1; }
.cb-tip {
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    z-index: 5;
    display: none;
    flex-direction: column;
    gap: 3px;
    min-width: 170px;
    padding: 8px 10px;
    border: 1px solid var(--acc-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(30, 41, 59, 0.14);
    color: var(--acc-muted);
    font-size: 12px;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
}
.cb-col:hover .cb-tip { display: flex; }
/* At the two ends the note is tied to the edge of its column, so it stays inside the card on either reading direction. */
.cb-col.is-first .cb-tip { inset-inline: 0 auto; transform: none; }
.cb-col.is-last .cb-tip { inset-inline: auto 0; transform: none; }
.cb-tip strong { color: var(--acc-text); font-size: 12px; }
.cb-tip span { display: flex; align-items: center; }
.cb-tip b { margin-inline-start: auto; padding-inline-start: 14px; color: var(--acc-text); font-variant-numeric: tabular-nums; }
.cb-axis { display: flex; gap: 4px; }
.cb-axis span { flex: 1 1 0; min-width: 0; overflow: hidden; color: var(--acc-muted); font-size: 11px; text-align: center; white-space: nowrap; }
.cb-axis span.is-current { color: var(--acc-text); font-weight: 700; }

@media (max-width: 1100px) {
    .cb-home-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
    .cb-seg { width: 100%; }
    .cb-seg a { flex: 1 1 0; text-align: center; }
    .cb-stats { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
