﻿/* ============================================================
   Tweaks on top of MudBlazor. The C# theme carries the colors,
   the radii and the typography; this file only handles what
   the theme cannot express.
   ============================================================ */

html, body {
    font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

/* --- Top bar and menu: hairlines, not shadows --- */
.top-bar {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

/* The logo and the name form a single block: the gap between them is what binds them, tighter
   than the one separating them from the menu button. The dimensions are also set on the tag,
   so the bar doesn't jump while the image loads. */
.brand-mark {
    display: block;
    flex: none;
    width: 24px;
    height: 24px;
    margin-left: 8px;
}

.brand {
    font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
    font-weight: 700;
    letter-spacing: -.01em;
    margin-left: 8px;
}

.side-menu {
    border-right: 1px solid var(--mud-palette-lines-default);
}

.content {
    background: var(--mud-palette-background);
}

/* --- Aligned figures: ticket numbers, licences, amounts --- */
.numeric,
.mud-table-cell .numeric {
    font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
}

/* --- Discreet labels above a value --- */
.eyebrow {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

/* Icon attached to a label — team, account type. MudBlazor sizes its icons in fixed rem:
   even at Size.Small, 1.25 rem overflows a 12.5 px line. We bring them back to the size of
   the text that carries them and drop them onto its baseline. */
.label-icon {
    width: 1.05em !important;
    height: 1.05em !important;
    vertical-align: -.16em;
    margin-right: 4px;
    flex: none;
    color: var(--mud-palette-text-secondary);
}

/* --- Tight tables: this is where density is won --- */
.mud-table-dense .mud-table-cell {
    padding-top: 6px;
    padding-bottom: 6px;
}

.mud-table-head .mud-table-cell {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

/* Two lines per ticket: the subject, then the company and the folder on a second row. */
.subject {
    font-weight: 500;
    display: block;
}

.subject-detail {
    display: block;
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
    margin-top: 1px;
}

/* --- Statuses: the only vivid color in the interface --- */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}

.status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

/* On a ticket's page, the status is also the button that changes it: the arrow says it
   opens, and hover lays down a discreet background rather than a frame — the label must
   remain a label within the header line. */
.status-pick {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px 2px 6px;
    margin: -2px -4px -2px -6px;
    border-radius: 6px;
    cursor: pointer;
}

.status-pick:hover {
    background: var(--mud-palette-action-default-hover);
}

.st-new  { color: var(--mud-palette-text-secondary); }
.st-qualified { color: var(--mud-palette-primary); }
.st-inprogress  { color: var(--mud-palette-info); }
.st-waiting  { color: var(--mud-palette-warning); }
/* Sent back by development: support has something to answer, and a developer is waiting. */
.st-returned { color: var(--mud-palette-error); }
.st-forwarded { color: var(--mud-palette-tertiary); }
.st-resolved   { color: var(--mud-palette-success); }
.st-delivered    { color: var(--mud-palette-success); }
.st-closed  { color: var(--mud-palette-text-secondary); }

/* Closed shares the grey of "new", and "delivered" the green of "fixed": both times it is
   the same state of mind. The hollow dot sets closed apart, and the label does the rest.
   A shape also reads in black and white, unlike one more shade. */
.st-closed .dot,
.st-delivered .dot {
    background: transparent;
    border: 1px solid currentColor;
}

/* --- Ticket kind: a bug doesn't read like a task ---

   The status says where the work stands, the kind says what work it is: two cues on the
   same line, which must be told apart by something other than hue. The status keeps its
   dot, the kind gets a framed label.

   Five families, not nine kinds: beyond that, color stops informing and becomes decoration
   again. TicketKinds.FamilyOf does the grouping, and the label is always written out — the
   color only speeds up reading.

   Green stays with the "fixed" status: a family of tickets must not look like finished
   work. */
.kd-bug { --kind: var(--mud-palette-error); }
.kd-task { --kind: var(--mud-palette-info); }
.kd-delivery { --kind: var(--mud-palette-tertiary); }
.kd-request { --kind: var(--mud-palette-text-secondary); }
.kd-proposal { --kind: var(--mud-palette-warning); }

/* The tinted background goes through color-mix, otherwise we'd have to freeze one color per
   theme. A browser that doesn't understand it ignores both lines: the label stays framed in
   its own color, which is enough to tell it apart. */
.kind {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    padding: 0 5px;
    border: 1px solid currentColor;
    border-radius: 3px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.7;
    white-space: nowrap;
    vertical-align: middle;
    color: var(--kind);
    border-color: color-mix(in srgb, var(--kind) 40%, transparent);
    background: color-mix(in srgb, var(--kind) 10%, transparent);
}

/* It's the text that gets truncated, not the label: the icon is what remains readable when
   space runs out, so it must never be the part that gets cut. */
.kind-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The queue row picks up its family's tint, in a homeopathic dose: scanning the list you see
   clusters form — three bugs in a row, a series of deliverables — before even reading a
   label. Beyond a few percent, the table stops being a table and becomes a monochrome
   wash: the tint must be noticed without ever being looked at.

   Hover wins, MudBlazor sets it with a higher specificity; and a customer request, whose
   family is already grey, tints nothing at all. */
.mud-table-row.kind-tinted {
    background: color-mix(in srgb, var(--kind) 6%, transparent);
}

.mud-table-row.kind-tinted.kd-request {
    background: none;
}

/* The icon follows the text rather than MudBlazor's sizes, the smallest of which would
   still be twice the line height. It takes the family color like the rest of the
   label. */
.kind .kind-icon {
    flex: none;
    width: 12px;
    height: 12px;
    font-size: 12px;
    fill: currentColor;
}

/* Multi-criteria sort header (SortHeader). Same look as MudTable's: the arrow shows faintly
   on hover, stays once the sort is set, and rotates for descending order.
   The rank only appears when there are several criteria. */
.sort-header {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.sort-header .sort-header-icon {
    font-size: 16px;
    opacity: 0;
    transition: opacity 150ms, transform 150ms;
}

.sort-header:hover .sort-header-icon,
.sort-header:focus-visible .sort-header-icon {
    opacity: .5;
}

.sort-header.sorted .sort-header-icon {
    opacity: 1;
}

.sort-header .sort-header-icon.desc {
    transform: rotate(180deg);
}

.sort-header-rank {
    min-width: 14px;
    padding: 0 3px;
    border-radius: 7px;
    background: var(--mud-palette-action-default-hover);
    font-size: 10px;
    line-height: 14px;
    text-align: center;
}

/* Column filter (HeaderFilter): the funnel follows the title on the same line. Discreet at
   rest, filled as soon as the column filters; the panel opens below. */
.th-filtered {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.header-filter {
    display: inline-block;
}

.header-filter .header-filter-button {
    padding: 2px;
    opacity: .45;
}

.header-filter .header-filter-button:hover,
.header-filter .header-filter-button.active {
    opacity: 1;
}

.header-filter .header-filter-button .mud-icon-root {
    font-size: 16px;
}

.header-filter-panel {
    padding: 8px 12px;
    min-width: 200px;
    max-height: 420px;
    overflow-y: auto;
}

.header-filter-footer {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
    border-top: 1px solid var(--mud-palette-lines-default);
    padding-top: 4px;
}

.choice-filter {
    display: flex;
    flex-direction: column;
}

/* --- Dashboard tiles --- */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 18px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    background: var(--mud-palette-surface);
    text-decoration: none;
    color: inherit;
    transition: border-color .12s ease;
}

.tile:hover {
    border-color: var(--mud-palette-primary);
}

.tile .count {
    font-family: "IBM Plex Sans Condensed", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.tile .caption {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

/* Counters on the left, the to-do list on the right; the list drops below on a narrow screen. */
.home-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
}

.home-top-main {
    flex: 1 1 420px;
    min-width: 0;
}

.home-top-main > .tiles:last-child {
    margin-bottom: 0 !important;
}

.home-top .dashboard-todo {
    flex: 1 1 360px;
    max-width: 560px;
}

/* The list scrolls inside its card rather than pushing the board down. */
.dashboard-todo .todo-lines {
    max-height: 340px;
    overflow-y: auto;
    margin-right: -8px;
    padding-right: 8px;
}

/* --- Login page --- */
.signed-out {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--mud-palette-background, #F4F5F7);
}

.signin-card {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Language choice --- */

/* Outside a session, the four languages sit at the top right rather than in the flow:
   the login card stays centered, and the choice is visible without pushing anything down. */
.language-signed-out {
    position: absolute;
    top: 16px;
    right: 20px;
}

.languages {
    display: flex;
    gap: 2px;
    font-size: .8125rem;
}

.languages .language {
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--mud-palette-text-secondary);
    line-height: 1.4;
}

.languages .language:hover {
    background: var(--mud-palette-action-default-hover);
    color: var(--mud-palette-text-primary);
}

/* The current language stands out by weight and color, never by color alone:
   the four entries look too much alike for a shade to be enough. */
.languages .language.active {
    font-weight: 600;
    color: var(--mud-palette-primary);
}

/* The top bar dropdown: a <details> used as the anchor of its panel. */
.language-menu {
    position: relative;
}

/* The native <summary> marker is replaced by the component's chevron — Chrome's and
   Safari's are not removed the same way, hence the two rules. */
.language-menu > summary {
    list-style: none;
    cursor: pointer;
}

.language-menu > summary::-webkit-details-marker {
    display: none;
}

/* The two-letter code, in capitals and in the monospace of ticket numbers: the four
   languages then take up the same width, and the button doesn't move from one screen to
   another. */
.language-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px 4px 8px;
    border-radius: 6px;
    color: var(--mud-palette-text-secondary);
}

.language-trigger:hover {
    background: var(--mud-palette-action-default-hover);
    color: var(--mud-palette-text-primary);
}

.language-trigger-code {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: .75rem;
    letter-spacing: .02em;
    font-weight: 600;
}

.language-trigger-caret {
    transition: transform .12s ease;
}

.language-menu[open] > .language-trigger .language-trigger-caret {
    transform: rotate(180deg);
}

/* The panel is anchored to the right: it would overflow the window if it started from the
   left, since the button sits against the edge. The z-index goes above MudBlazor's top bar
   (1100) without reaching that of its popovers (1400), so that an open account menu
   still comes in front. */
.languages-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 1200;
    flex-direction: column;
    gap: 0;
    min-width: 170px;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    box-shadow: var(--mud-elevation-8);
}

.languages-dropdown .language {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 6px;
}

/* The code stays in monospace: the names all line up on the same column. */
.languages-dropdown .language-code {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: .6875rem;
    letter-spacing: .02em;
    color: var(--mud-palette-text-disabled);
}

.languages-dropdown .language.active .language-code {
    color: inherit;
}

/* --- Accessibility --- */
:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* --- Login form: plain HTML, styled by hand --- */

/* The logo goes above the title rather than beside it: the card is narrow, and the brand
   is here the first thing you see of the portal. */
.signin-mark {
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 0 12px;
}

.signin-header h1 {
    font-family: "IBM Plex Sans Condensed", sans-serif;
    font-weight: 700;
    font-size: 1.9rem;
    letter-spacing: -.015em;
    margin: 0;
    color: var(--mud-palette-text-primary, #12151A);
}

.signin-header p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary, #59606F);
}

.signin-card form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    border: 1px solid var(--mud-palette-lines-default, #E3E6EB);
    border-radius: 4px;
    background: var(--mud-palette-surface, #FFFFFF);
}

.field { display: flex; flex-direction: column; gap: 5px; }

.signin-card input[type="text"],
.signin-card input[type="password"],
.signin-card input:not([type]) {
    font-family: inherit;
    font-size: 13.5px;
    padding: 8px 10px;
    border: 1px solid var(--mud-palette-lines-inputs, #D5D9E0);
    border-radius: 4px;
    background: var(--mud-palette-surface, #FFFFFF);
    color: var(--mud-palette-text-primary, #12151A);
}

.signin-card input:focus {
    outline: none;
    border-color: var(--mud-palette-primary, #00719F);
    box-shadow: 0 0 0 2px rgba(0, 113, 159, .15);
}

.signin-card .stay {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary, #59606F);
}

.signin-card button {
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 14px;
    border: none;
    border-radius: 4px;
    background: var(--mud-palette-primary, #00719F);
    color: #fff;
    cursor: pointer;
}

.signin-card button:hover { filter: brightness(1.08); }

/* The "eye" button sits inside the field, on the right: the field keeps the card's full
   width and reserves room for the icon so the text doesn't run underneath it. */
.password-field { position: relative; display: flex; }

.password-field input { flex: 1; padding-right: 38px !important; }

.signin-card .password-reveal {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    color: var(--mud-palette-text-secondary, #59606F);
}

.signin-card .password-reveal:hover { filter: none; color: var(--mud-palette-text-primary, #12151A); }

.password-reveal .icon-hide,
.password-reveal[aria-pressed="true"] .icon-show { display: none; }

.password-reveal[aria-pressed="true"] .icon-hide { display: block; }

.signin-card .error {
    margin: 0;
    padding: 10px 12px;
    font-size: 12.5px;
    border: 1px solid var(--mud-palette-error, #B3261E);
    border-radius: 4px;
    color: var(--mud-palette-error, #B3261E);
}

/* --- Ticket page: label / value pairs --- */
.field-row {
    display: grid;
    grid-template-columns: 92px 1fr;
    align-items: baseline;
    gap: 10px;
}

.field-row .value {
    font-size: 13px;
    word-break: break-word;
}

.field-row .value.numeric { font-size: 12.5px; }

/* A handwritten value keeps its paragraphs: a closing comment reads back
   as it was typed, not folded into a single block. */
.field-row .value.multiline { white-space: pre-line; }

/* A version that announced a fix that didn't hold: the line stays, so we know what the
   version carried, but struck through — it wasn't fixed. */
.failed-fix {
    text-decoration: line-through;
    color: var(--mud-palette-text-secondary);
}

/* Tickets close to the one being entered, under its description. A tinted block rather
   than a dialog: it informs, the entry goes on. */
.similar-tickets {
    padding: 12px 14px 14px;
    border: 1px solid color-mix(in srgb, var(--mud-palette-info) 35%, transparent);
    border-radius: 6px;
    background: color-mix(in srgb, var(--mud-palette-info) 6%, transparent);
}

/* "In progress" / "Already handled", with how many: the eye knows at once whether the open
   part is worth reading. */
.similar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 14px 0 6px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.similar-count {
    min-width: 18px;
    padding: 0 6px;
    border-radius: 9px;
    line-height: 18px;
    text-align: center;
    letter-spacing: 0;
    background: color-mix(in srgb, var(--mud-palette-text-secondary) 14%, transparent);
}

/* The rows sit on the surface colour: on the tint, a title in grey-blue would read poorly. */
.similar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    overflow: hidden;
    background: var(--mud-palette-surface);
}

/* Fixed columns for the number and the kind: the titles start at the same place in both
   groups, and the state keeps to the right edge. */
.similar-row {
    display: grid;
    grid-template-columns: 44px 100px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    min-height: 40px;
    padding: 6px 12px;
    cursor: pointer;
}

.similar-row + .similar-row {
    border-top: 1px solid var(--mud-palette-lines-default);
}

.similar-row:hover {
    background: var(--mud-palette-action-default-hover);
}

.similar-row:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
}

.similar-number {
    color: var(--mud-palette-primary);
}

.similar-title {
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.similar-note {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

.similar-state {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
    white-space: nowrap;
    font-size: 12px;
}

/* Written like the status, an icon and a word, rather than framed chips: one weight per row,
   whatever the state. */
.fix-state {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.fix-state .fix-icon {
    width: 15px;
    height: 15px;
    font-size: 15px;
}

.fix-shipped {
    color: var(--mud-palette-success);
    text-decoration: none;
}

.fix-shipped:hover {
    text-decoration: underline;
}

.fix-pending { color: var(--mud-palette-info); }
.fix-failed { color: var(--mud-palette-warning); }

/* On a phone, everything stacks beside the number. */
@media (max-width: 600px) {
    .similar-row {
        grid-template-columns: 44px minmax(0, 1fr);
        row-gap: 4px;
    }

    .similar-kind,
    .similar-title,
    .similar-state {
        grid-column: 2;
    }

    .similar-state {
        justify-self: start;
        white-space: normal;
        flex-wrap: wrap;
    }
}

/* Ticket found by the search, in a version's details. */
.search-hit {
    font-weight: 600;
    background: color-mix(in srgb, var(--mud-palette-warning) 18%, transparent);
    border-radius: 3px;
    padding: 0 3px;
}

.failed-fix-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}

/* --- Notes: internal stands apart from customer-visible at a glance --- */
.note {
    padding: 10px 12px;
    border-left: 2px solid var(--mud-palette-lines-default);
    background: transparent;
}

.note-internal {
    border-left-color: var(--mud-palette-warning);
    background: var(--mud-palette-background);
}

/* A note's screenshots keep the thread readable past them: a click enlarges them. */
.note-body .faq-body-screenshot { margin: 8px 0; }

.note-body .faq-body-screenshot img {
    max-height: 360px;
    width: auto;
}

.cursor-pointer { cursor: pointer; }

/* --- Settings screen: key, field, change trail --- */
.setting {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(220px, 1.4fr) 150px;
    align-items: start;
    gap: 14px;
}

.setting-key { display: flex; flex-direction: column; }

.setting-trace {
    color: var(--mud-palette-text-secondary);
    padding-top: 8px;
    font-size: 11px;
}

@media (max-width: 900px) {
    .setting { grid-template-columns: 1fr; }
    .setting-trace { padding-top: 0; }
}

/* --- Link to sign-up, below the login form --- */
.register-link {
    margin: 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary, #59606F);
}

.register-link a {
    color: var(--mud-palette-primary, #00719F);
    text-decoration: none;
}

.register-link a:hover { text-decoration: underline; }

/* A link inside a note under a form — the privacy policy, on registration and submission —
   reads as a link like the ones below the card, not as the surrounding grey text. */
.signin-card .hint a {
    color: var(--mud-palette-primary, #00719F);
    text-decoration: none;
}

.signin-card .hint a:hover { text-decoration: underline; }

/* ============================================================
   Dashboard
   ============================================================ */

/* A tile that calls for an action signals itself with a border, not a garish background. */
.tile-alert { border-left: 3px solid var(--mud-palette-warning); }

/* --- Horizontal bars --- */
.bars { display: flex; flex-direction: column; gap: 8px; }

.bar-row {
    display: grid;
    grid-template-columns: minmax(90px, 34%) 1fr 34px;
    align-items: center;
    gap: 10px;
}

.bar-name {
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    height: 10px;
    background: var(--mud-palette-lines-default);
    border-radius: 2px;
    overflow: hidden;
}

/* The end of the data is rounded, the baseline stays sharp. */
.bar-fill {
    display: block;
    height: 100%;
    min-width: 2px;
    background: var(--mud-palette-primary);
    border-radius: 0 4px 4px 0;
}

.bar-fill.empty { background: transparent; }

/* A bar that opens. The link isn't underlined and doesn't change color: it's the whole
   row that reacts, not its label — otherwise the funnel looks like a table of contents. */
.bar-row-link {
    text-decoration: none;
    color: inherit;
    padding: 2px 6px;
    margin: -2px -6px;
    border-radius: 3px;
}

.bar-row-link:hover { background: var(--mud-palette-table-hover); }
.bar-row-link:hover .bar-name { color: var(--mud-palette-text-primary); }

/* The step that calls for action. Same tint as the alert tiles: a single attention
   color across the whole portal, and it always means the same thing. */
.bar-row-alert .bar-fill { background: var(--mud-palette-warning); }
.bar-row-alert .bar-name { color: var(--mud-palette-text-primary); font-weight: 500; }

.bar-value {
    text-align: right;
    font-size: 12.5px;
    color: var(--mud-palette-text-primary);
}

.bars-empty {
    margin: 0;
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary);
}

/* The fallback table: read by screen readers and when printing, invisible on screen. */
.bars-table {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media print {
    .bars { display: none; }
    .bars-table {
        position: static;
        width: auto;
        height: auto;
        clip: auto;
        border-collapse: collapse;
    }
}

/* --- Activity curve --- */
.chart {
    width: 100%;
    height: 120px;
    display: block;
    overflow: visible;
}

.chart-grid {
    stroke: var(--mud-palette-lines-default);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.chart-area {
    fill: var(--mud-palette-primary);
    opacity: .10;
}

.chart-line {
    fill: none;
    stroke: var(--mud-palette-primary);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

/* The last point, circled in the background color to stand out from the line. Both
   paths are zero-length segments: the rounded line cap is what makes the disc, and its
   diameter equals the stroke width — hence screen pixels, unaffected by the horizontal
   stretching of the view. The halo is the widest, and goes underneath. */
.chart-halo,
.chart-end {
    fill: none;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.chart-halo {
    stroke: var(--mud-palette-surface);
    stroke-width: 12;
}

.chart-end {
    stroke: var(--mud-palette-primary);
    stroke-width: 8;
}

.chart-dot { fill: transparent; }
.chart-dot:hover { fill: var(--mud-palette-primary); fill-opacity: .06; }

.chart-footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
}

.chart-total { font-family: "IBM Plex Sans", sans-serif; }

/* --- Dashboard ticket lists --- */
.ticket-list { display: flex; flex-direction: column; }

.ticket-row {
    display: grid;
    grid-template-columns: 56px 1fr auto 62px;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    text-decoration: none;
    color: inherit;
}

.ticket-row:last-child { border-bottom: none; }
.ticket-row:hover { background: var(--mud-palette-table-hover); }

.ticket-row .body-text { min-width: 0; }
.ticket-row .subject { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row .when { text-align: right; color: var(--mud-palette-text-secondary); }

.h-100 { height: 100%; }

/* ============================================================
   Account card: the viewing dialog
   ============================================================ */

.detail-header { display: flex; align-items: center; gap: 12px; }

/* An initials badge: enough to tell apart two cards opened one after the other. */
.detail-initials {
    flex: none;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--mud-palette-primary);
    color: #fff;
    font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
    font-weight: 700;
    font-size: 15px;
}

.detail-initials.disabled { background: var(--mud-palette-text-secondary); }

/* The photo fills the badge without distortion: cropped to the center by the browser, as
   it already was by the server. The background color stays underneath — it only shows
   while loading, and on a photo with a transparent background. */
.detail-initials .avatar-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

/* --- The profile photo, on the account page --- */

/* The account page badge, large: this is where you look at what you just uploaded,
   and a 44-pixel preview doesn't tell whether the photo is well framed. */
.avatar-preview {
    width: 96px;
    height: 96px;
    font-size: 32px;
    border-radius: 6px;
}

.avatar-editor {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

/* An account's name in the admin list, preceded by its badge. */
.account-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-row-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

/* What the upload accepts, stated before the click rather than after: formats and max size. */
.avatar-hint {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

.detail-subtitle {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1px;
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary);
}

.detail-subtitle .separator { color: var(--mud-palette-lines-default); }

/* A hairline under each section heading: the card is scanned block by block. */
.detail-section-title {
    display: block;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

/* "Email language" and "Last login" wrapped in the 92 px column inherited from the
   ticket page. Here the labels are longer, so the gutter widens — without touching
   the shared template. */
.detail-fields .field-row { grid-template-columns: 118px 1fr; }

/* The permissions separate from the identity with a hairline, as soon as both fit side by side. */
@media (min-width: 960px) {
    .detail-rights-column {
        height: 100%;
        padding-left: 24px;
        border-left: 1px solid var(--mud-palette-lines-default);
    }
}

.detail-empty {
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px dashed var(--mud-palette-lines-default);
    border-radius: 4px;
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary);
}

/* --- Dialog footer: note on the left, actions on the right, separated from content by a hairline --- */
.detail-footer {
    flex: 1 1 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px 16px;
    padding-top: 14px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.detail-footer-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
    font-size: 12px;
    line-height: 1.35;
    color: var(--mud-palette-text-secondary);
}

.detail-footer-actions { display: flex; align-items: center; gap: 8px; }

/* ============================================================
   Granted permissions: one block per module, one line per permission
   ============================================================ */

/* The circled pill from before read like a button — yet nothing is clickable — and a wall
   of pills can't be counted. One check mark per line says what it is: what the account
   is allowed to do. */
.rights-board {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rights-module-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rights-module-head .mud-icon-root {
    flex: none;
    font-size: 15px;
    color: var(--mud-palette-text-secondary);
}

/* The count sits at the right of the block: you see where permissions cluster without counting. */
.rights-count {
    margin-left: auto;
    color: var(--mud-palette-text-secondary);
}

/* Two columns as soon as the width allows, one otherwise: the labels are short, and
   stacking them across the full width would leave a column of emptiness on the right. */
.rights-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 1px 16px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.right-item {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 23px;
    font-size: 13px;
    line-height: 1.3;
}

.right-item .mud-icon-root {
    flex: none;
    font-size: 14px;
    color: var(--mud-palette-success);
}

/* The panel title carries the total, separated from the content by the same hairline as the
   account card sections. */
.rights-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

/* ============================================================
   My account
   ============================================================ */

/* The page opens with the same header as the account card: the initials badge stands in
   for a portrait, one notch larger because here it's a page title, not a dialog. */
.account-hero {
    display: flex;
    align-items: center;
    gap: 14px;
}

.account-hero .detail-initials {
    width: 44px;
    height: 44px;
    font-size: 17px;
}

/* What the page doesn't let you change, and whom to ask: a note at the foot of the
   panel, marked with an icon so it isn't mistaken for a field caption. */
.account-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--mud-palette-text-secondary);
}

.account-note .mud-icon-root {
    flex: none;
    margin-top: 1px;
    font-size: 15px;
}

/* --- The MCP tokens of "My account" ---
   The secret and the command wrap anywhere: a 49-character token in one word would push the
   panel wider than the column. */
.mcp-token-secret,
.mcp-token-command {
    padding: 8px 10px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    background: var(--mud-palette-action-default-hover);
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
    user-select: all;
}

.mcp-token-secret {
    font-size: 13px;
    font-weight: 600;
}

.mcp-token-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.mcp-token-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.mcp-token-main {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.mcp-token-name {
    font-weight: 600;
}

.mcp-token-facts {
    grid-column: 1;
    font-size: 12px;
}

.mcp-token-row > .mud-icon-button {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.mcp-token-dead {
    opacity: 0.55;
}

/* --- The new password's requirements, checked as you type --- */
.password-checks {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.password-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
}

.password-check .mud-icon-root {
    flex: none;
    font-size: 14px;
}

/* A met requirement turns the green of resolved statuses: it's the same vocabulary as
   everywhere else — what is green is settled. */
.password-check-met { color: var(--mud-palette-success); }

/* --- A ticket's preview, opened from a board card --- */

/* The board stays behind: the window doesn't take the full screen height, so you keep
   sight of the column you came from. The content scrolls — the header, which carries
   the number and status, and the footer, which carries the exit, don't move with it. */
.ticket-peek .mud-dialog-content {
    max-height: calc(100vh - 260px);
    overflow-y: auto;
}

/* The header fits on one line: the ticket on the left, the exit on the right. The close
   button sits at the top, level with the number, and doesn't drop with the title when it becomes a field. */
.peek-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.peek-title > div:first-child { flex: 1 1 auto; min-width: 0; }

.peek-close {
    flex: 0 0 auto;
    margin: -4px -8px 0 0;
    color: var(--mud-palette-text-secondary);
}

/* Target statuses on the left, editing on the right: the everyday gesture — moving the
   ticket forward — is at hand, the one that opens a form stands aside. The hairline
   separates it from the content, as the footer separates its own. */
.peek-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

/* ============================================================
   FAQ: an article's body and its screenshots
   ============================================================ */

/* The body is rendered by Markdig: the manual's line breaks become <br>,
   lists become <ul>. What remains is giving these tags the density of the rest of the UI. */
.faq-body-text {
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.faq-body-text p { margin: 0 0 10px; }
.faq-body-text p:last-child { margin-bottom: 0; }

.faq-body-text ul,
.faq-body-text ol { margin: 0 0 10px; padding-left: 22px; }

.faq-body-text li { margin-bottom: 3px; }

/* An article's subheadings are not page titles: same weight, size barely
   above the text. An article has no deep hierarchy. */
.faq-body-text h1,
.faq-body-text h2,
.faq-body-text h3,
.faq-body-text h4 {
    font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 6px;
}

.faq-body-text h1:first-child,
.faq-body-text h2:first-child,
.faq-body-text h3:first-child { margin-top: 0; }

/* A path, a command, a table name: the monospace of ticket numbers. */
.faq-body-text code {
    font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    font-size: 12.5px;
    padding: 1px 4px;
    border-radius: 3px;
    background: var(--mud-palette-action-default-hover);
}

.faq-body-text pre {
    margin: 0 0 10px;
    padding: 10px 12px;
    overflow-x: auto;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    background: var(--mud-palette-background);
}

.faq-body-text pre code { padding: 0; background: none; }

/* The manual's tables: hairlines, like the rest of the interface. */
.faq-body-text table {
    border-collapse: collapse;
    margin: 0 0 10px;
    font-size: 13px;
}

.faq-body-text th,
.faq-body-text td {
    border: 1px solid var(--mud-palette-lines-default);
    padding: 5px 9px;
    text-align: left;
}

.faq-body-text th { font-weight: 600; background: var(--mud-palette-background); }

.faq-body-text blockquote {
    margin: 0 0 10px;
    padding-left: 12px;
    border-left: 2px solid var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
}

/* --- Visual editor: dress it like the rest, not like ToastUI --- */
.rich-editor .toastui-editor-defaultUI {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

.rich-editor .toastui-editor-toolbar {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.rich-editor .toastui-editor-defaultUI-toolbar {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background);
}

/* The content takes the articles' typography: that's how it will display when read. */
.rich-editor .toastui-editor-contents {
    font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.65;
}

.rich-editor .toastui-editor-contents code,
.rich-editor .toastui-editor-contents pre {
    font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    font-size: 12.5px;
}

/* An article's subheadings are not page titles. */
.rich-editor .toastui-editor-contents h1,
.rich-editor .toastui-editor-contents h2,
.rich-editor .toastui-editor-contents h3 {
    font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
    font-size: 15px;
    font-weight: 600;
    border: none;
    padding: 0;
    margin: 14px 0 6px;
}

/* A screenshot in the editor looks as it does when read: framed, never cropped. */
.rich-editor .toastui-editor-contents img {
    max-width: 100%;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
}

/* The "Markdown / WYSIWYG" toggle stays available: it helps out when the visual mode
   gets tangled in an article taken over from the manual. */
.rich-editor .toastui-editor-mode-switch {
    background: var(--mud-palette-background);
    border-top: 1px solid var(--mud-palette-lines-default);
}

/* A breath between two paragraphs. ToastUI's stylesheet is loaded after this one: at
   equal specificity, it would win — hence the container repeated in the selector. */
.rich-editor .toastui-editor-ww-container .toastui-editor-contents p { margin: 0 0 6px; }

.rich-editor .toastui-editor-contents ul > li::before { margin-top: 10px; }

/* --- Visual editor in dark mode ---
   ToastUI hardcodes its colors, designed for white: white background, #222 text, grey
   icons. Its "dark" stylesheet isn't shipped here; so we reuse the MudBlazor palette,
   which follows the chosen mode. */
.ap-dark .rich-editor .toastui-editor-defaultUI,
.ap-dark .rich-editor .toastui-editor-ww-container,
.ap-dark .rich-editor .toastui-editor-md-container,
.ap-dark .rich-editor .toastui-editor-main-container {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}

.ap-dark .rich-editor .ProseMirror,
.ap-dark .rich-editor .toastui-editor-contents,
.ap-dark .rich-editor .toastui-editor-contents p,
.ap-dark .rich-editor .toastui-editor-contents h1,
.ap-dark .rich-editor .toastui-editor-contents h2,
.ap-dark .rich-editor .toastui-editor-contents h3,
.ap-dark .rich-editor .toastui-editor-contents h4,
.ap-dark .rich-editor .toastui-editor-contents h5,
.ap-dark .rich-editor .toastui-editor-contents h6,
.ap-dark .rich-editor .toastui-editor-contents ul,
.ap-dark .rich-editor .toastui-editor-contents ol,
.ap-dark .rich-editor .toastui-editor-contents table,
.ap-dark .rich-editor .toastui-editor-md-table-cell {
    color: var(--mud-palette-text-primary);
}

.ap-dark .rich-editor .ProseMirror .placeholder,
.ap-dark .rich-editor .toastui-editor-contents del,
.ap-dark .rich-editor .toastui-editor-contents blockquote {
    color: var(--mud-palette-text-secondary);
}

.ap-dark .rich-editor .toastui-editor-contents blockquote {
    border-left-color: var(--mud-palette-lines-default);
}

.ap-dark .rich-editor .toastui-editor-contents a { color: var(--mud-palette-primary); }

.ap-dark .rich-editor .toastui-editor-contents code {
    background: rgba(255, 255, 255, .08);
    color: #f0a6b8;
}

.ap-dark .rich-editor .toastui-editor-contents pre {
    background: var(--mud-palette-background);
}

.ap-dark .rich-editor .toastui-editor-contents pre code { background: none; color: inherit; }

.ap-dark .rich-editor .toastui-editor-contents table,
.ap-dark .rich-editor .toastui-editor-contents td,
.ap-dark .rich-editor .toastui-editor-contents th {
    border-color: var(--mud-palette-lines-default);
}

.ap-dark .rich-editor .toastui-editor-contents ul > li::before {
    background-color: var(--mud-palette-text-secondary);
}

/* Toolbar: the third row of ToastUI's sprite is its dark theme's —
   light icons, and their pale blue for the active state. */
.ap-dark .rich-editor .toastui-editor-defaultUI-toolbar,
.ap-dark .rich-editor .toastui-editor-md-tab-container,
.ap-dark .rich-editor .toastui-editor-mode-switch,
.ap-dark .rich-editor .toastui-editor-dropdown-toolbar {
    background: var(--mud-palette-background);
    border-color: var(--mud-palette-lines-default);
}

.ap-dark .rich-editor .toastui-editor-defaultUI-toolbar button {
    border-color: transparent;
}

.ap-dark .rich-editor .toastui-editor-defaultUI-toolbar button:not(:disabled):hover {
    background-color: var(--mud-palette-action-default-hover);
    border-color: var(--mud-palette-lines-default);
}

.ap-dark .rich-editor .toastui-editor-toolbar-icons { background-position-y: -49px; }
.ap-dark .rich-editor .toastui-editor-toolbar-icons:not(:disabled).active { background-position-y: -75px; }

.ap-dark .rich-editor .toastui-editor-toolbar-divider {
    background-color: var(--mud-palette-lines-default);
}

.ap-dark .rich-editor .toastui-editor-mode-switch .tab-item,
.ap-dark .rich-editor .toastui-editor-md-tab-container .tab-item {
    background: var(--mud-palette-background);
    border-color: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
}

.ap-dark .rich-editor .toastui-editor-mode-switch .tab-item.active,
.ap-dark .rich-editor .toastui-editor-md-tab-container .tab-item.active {
    background: var(--mud-palette-surface);
    border-color: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
}

/* The toolbar's popups — link, table — and the context menu. */
.ap-dark .rich-editor .toastui-editor-popup,
.ap-dark .rich-editor .toastui-editor-context-menu {
    background: var(--mud-palette-surface);
    border-color: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
}

.ap-dark .rich-editor .toastui-editor-popup-body label,
.ap-dark .rich-editor .toastui-editor-popup-add-table .toastui-editor-table-description {
    color: var(--mud-palette-text-secondary);
}

.ap-dark .rich-editor .toastui-editor-popup-body input[type=text] {
    background: var(--mud-palette-background);
    border-color: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
}

.ap-dark .rich-editor .toastui-editor-defaultUI .toastui-editor-close-button {
    background: var(--mud-palette-background);
    border-color: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-primary);
}

.ap-dark .rich-editor .toastui-editor-popup-add-table .toastui-editor-table-cell {
    background: var(--mud-palette-surface);
    border-color: var(--mud-palette-lines-default);
}

.ap-dark .rich-editor .toastui-editor-popup-add-table .toastui-editor-table-cell.header {
    background: var(--mud-palette-background);
}

/* --- Writing toolbar (fallback mode) --- */
.format-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px;
    border: 1px solid var(--mud-palette-lines-default);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: var(--mud-palette-background);
}

/* The text area sticks to its toolbar: the two form a single block. */
.format-toolbar + .mud-input-control .mud-input-outlined-border {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.faq-body-text + .faq-body-text { margin-top: 10px; }

.faq-body-text a { overflow-wrap: anywhere; }

/* A screenshot is framed, never cropped: the error message is often in a corner. */
.faq-body-screenshot {
    margin: 14px 0;
}

.faq-body-screenshot img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    cursor: zoom-in;
    background: var(--mud-palette-surface);
}

.faq-body-screenshot figcaption {
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
}

/* A ticket's description follows the same layout as an article — screenshots included,
   it's the same figure component, and the same Markdown: the description is now written
   in the same editing area. Only the blocks need breathing room between them. */
.ticket-body > * + * { margin-top: 10px; }

/* Enlarged, the screenshot takes the room it needs without overflowing the window. */
.screenshot-zoom {
    display: flex;
    justify-content: center;
    max-height: 78vh;
    overflow: auto;
}

.screenshot-zoom img {
    max-width: 100%;
    height: auto;
}

/* --- Edit screen: attached screenshots --- */
.screenshot-figure {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
}

/* A click on the thumbnail inserts the screenshot into the text: the copy cursor announces it,
   and the frame that lights up on hover confirms it's clickable. */
.screenshot-figure img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 3px;
    cursor: copy;
    flex: none;
    transition: border-color .12s ease;
}

.screenshot-figure img:hover {
    border-color: var(--mud-palette-primary);
}

.screenshot-figure-body { flex: 1; min-width: 0; }

/* Drop zone: a dotted frame, like the other empty areas of the interface. */
.screenshot-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px;
    border: 1px dashed var(--mud-palette-lines-default);
    border-radius: 4px;
    text-align: center;
    color: var(--mud-palette-text-secondary);
    font-size: 12.5px;
    cursor: pointer;
}

.screenshot-drop:hover { border-color: var(--mud-palette-primary); }

/* ============================================================
   Kanban board: the ticket list laid out in columns
   ============================================================ */

/* The board scrolls horizontally, never the page: one more column must not
   push the rest of the interface off screen. */
.kanban-board {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.kanban-column {
    flex: none;
    width: 272px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    background: var(--mud-palette-surface);
}

/* The same treatment as table headers: it's the same function, naming a column. */
.column-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.column-title {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.column-count { color: var(--mud-palette-text-secondary); }

/* Each column scrolls on its own: a long queue must not stretch the others.
   The minimum height keeps a drop target even when the column is empty. */
.column-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    min-height: 96px;
    max-height: calc(100vh - 330px);
    overflow-y: auto;
    transition: background-color .12s ease;
}

.column-empty {
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
    padding: 6px 2px;
}

/* The board's exit: what's dropped here is done with. The dashed line sets it apart from
   the work queues — the column keeps recent closures, long enough to check the gesture,
   but its content no longer waits on anyone and doesn't read like a queue. */
.column-exit {
    border: 1px dashed var(--mud-palette-lines-default);
    border-radius: 6px;
    background: transparent;
}

/* --- The board excerpt, on the home page ---

   The same board, read-only. The columns share the width instead of scrolling:
   there are only three to five, and an excerpt you have to scroll is no longer a quick
   glance. Each one stops at three cards, so its body doesn't scroll either — the screen
   height no longer concerns it. The board's scrolling remains for small screens,
   where the columns can't squeeze any tighter. */
.board-digest .kanban-column {
    flex: 1 1 0;
    width: auto;
    min-width: 168px;
}

.board-digest .column-body {
    min-height: 0;
    max-height: none;
}

/* The title opens the filtered list like the column does, and keeps its header look: it's a
   column name before being a link. */
.board-digest .column-title { text-decoration: none; }
.board-digest .column-title:hover { color: var(--mud-palette-primary); }

/* The card is an anchor here, no longer a block you drag: the dashboard is read,
   not manipulated. */
.board-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.column-more { text-decoration: none; }
.column-more:hover { color: var(--mud-palette-primary); }

/* --- Visual feedback while dragging --- */

/* A forbidden transition shows before the drop, rather than afterwards through an error message.
   The background is enough: color doesn't carry the information alone, the refusal is confirmed on drop. */
.zone-allowed { background: var(--mud-palette-action-default-hover); }

.zone-denied { opacity: .45; }

/* --- Cards --- */

/* The border picks up the family color: in a column, it reads by scanning the
   left edge, without having to go through each label. A card whose family is unknown
   falls back to the ordinary hairline. */
.kanban-card {
    border: 1px solid var(--mud-palette-lines-default);
    border-left: 3px solid var(--kind, var(--mud-palette-lines-default));
    border-radius: 4px;
    background: var(--mud-palette-background);
    padding: 8px 9px 8px 7px;
    cursor: pointer;
    transition: border-color .12s ease;
}

/* Hover doesn't eat the border: it's the only thing the card says permanently. */
.kanban-card:hover {
    border-color: var(--mud-palette-primary);
    border-left-color: var(--kind, var(--mud-palette-primary));
}

/* The kind label follows the number, and pushes the date to the end of the line: the two
   work cues stay grouped, the time cue stays in its place. */
.card-header .kind {
    flex: 0 1 auto;
    min-width: 0;
    margin-right: auto;
}

/* The drag in progress: the card fades without disappearing, so its place is kept. */
.mud-drop-item-dragging { opacity: .4; }

.card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.card-when {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10.5px;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

/* Two lines of subject at most: beyond that, cards stop being comparable at a glance. */
.card-subject {
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-customer {
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
}

.card-product,
.card-assignee {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-assignee { font-weight: 500; }

/* A ticket nobody owns: the word stays discreet, but the column gathers it
   with the others — that's where you go looking for it. */
.card-assignee.orphan { font-weight: 400; font-style: italic; }

/* An offer's follow-ups, between its number and its date: pushes the date to the end of the
   line, as the kind label does on a ticket. The count says it in a tooltip as well. */
.offer-followups {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: auto;
    font-size: 10.5px;
    color: var(--mud-palette-text-secondary);
}

.offer-followups .mud-icon-root { font-size: 13px; }

/* A contact form message in the list: two lines, the rest is read in the dialog. */
.contact-message {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-line;
    font-size: 12.5px;
}

/* The same two lines on a board card, a size down: the sender stays what reads first. */
.contact-message.card-message {
    font-size: 11.5px;
    margin-top: 4px;
    color: var(--mud-palette-text-secondary);
}

/* --- The development backlog ---

   The same cards as the ticket boards, with what a backlog item carries instead of a customer:
   its plan key after the number, its feature under the title, its tags in the footer. The key
   pushes the date to the end of the line, as the kind label does on a ticket. */
.backlog-key {
    font-size: 10.5px;
    color: var(--mud-palette-text-secondary);
    margin-right: auto;
}

.backlog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    min-width: 0;
}

.backlog-tag {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    padding: 0 5px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 3px;
    white-space: nowrap;
}

/* A bug says so in words as well as by its stripe: the color never carries the information alone. */
.backlog-type {
    color: var(--kind);
    border-color: color-mix(in srgb, var(--kind) 40%, transparent);
}

/* --- An article's languages ---

   Three pills: what exists, what's missing, and what still needs proofreading. They are
   used as-is in the list — where they only inform — and on the article, where a
   click changes the displayed language. The difference never relies on color alone: the
   missing language is hollow, the unreviewed translation carries a dot. */
.faq-languages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.faq-language {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-width: 30px;
    justify-content: center;
    padding: 2px 6px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    line-height: 1.5;
    background: none;
    color: var(--mud-palette-text-secondary);
}

button.faq-language {
    cursor: pointer;
    font-family: inherit;
}

/* The language we have: filled, readable from afar. */
.faq-language-on {
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary);
}

/* The one that's missing: hollow, and without needless contrast — it's an absence, not an alert. */
.faq-language-off {
    border-style: dashed;
    opacity: .55;
}

/* Translated but not reviewed: the dot says what color alone wouldn't tell everyone. */
.faq-language-draft {
    border-color: var(--mud-palette-warning);
    color: var(--mud-palette-warning);
}

.faq-language-mark {
    font-size: 14px;
    line-height: 1;
}

/* The displayed language, on the article. */
.faq-language-shown {
    background: var(--mud-palette-action-default-hover);
    border-width: 2px;
}

.faq-languages-compact .faq-language {
    min-width: 26px;
    padding: 1px 4px;
    font-size: 10px;
}

/* ============================================================
   Notifications
   ============================================================ */

/* A notification row, in the bell panel as on the page. The whole row
   opens the ticket: the cursor must say so, since the clickable area goes well beyond
   the title. */
.notif {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    cursor: pointer;
}

.notif:last-child {
    border-bottom: none;
}

/* Unread: a hairline on the left, not a background color. A list where half the rows
   are tinted reads worse than a list where the eye follows an edge. */
.notif-unread {
    border-left: 3px solid var(--mud-palette-primary);
}

.notif-unread .notif-subject {
    font-weight: 600;
}

/* A ticket title goes up to 512 characters — whole SQL errors. It fits
   on one line and ends with an ellipsis: the panel is for recognizing
   a ticket, not reading it. */
.notif-subject {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* --- The bell panel --- */
.notif-popover {
    max-width: 94vw;
}

.notif-menu {
    width: 400px;
    max-width: 94vw;
    padding-top: 0;
    padding-bottom: 0;
}

.notif-menu .notif {
    display: block;
    padding-top: 8px;
    padding-bottom: 8px;
}

.notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
}

/* The counter at the top, where "mark all as read" used to be: a reminder, nothing
   clickable. The panel's top right corner falls under the cursor that just opened the
   bell, and nothing destructive belongs there. */
.notif-count {
    font-size: 11.5px;
    white-space: nowrap;
}

/* The footer: "mark all as read", far enough from the bell that you reach it on purpose. */
.notif-foot {
    display: flex;
    justify-content: center;
    padding: 4px 12px;
}

.notif-empty {
    padding: 20px 12px;
    text-align: center;
    font-size: 13px;
}

.notif-when {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10.5px;
    white-space: nowrap;
}

/* The panel footer: an exit to the full page, not one more row in the list. */
.notif-all {
    justify-content: center;
    font-size: 12.5px;
}

/* --- The account menu --- */

/* The avatar opens the menu: it must present itself as clickable, which a colored circle
   doesn't do on its own. */
.account-avatar {
    cursor: pointer;
}

.account-menu {
    min-width: 220px;
    padding-top: 0;
}

.account-head {
    padding: 10px 12px 8px;
    line-height: 1.3;
}

/* What you're signed in under: the team, or failing that the account type. A single
   mention, aligned with its icon, which carries its own gutter. */
.account-role {
    display: flex;
    align-items: center;
}

/* ============================================================
   Price documents: the list and the editor.

   The sheet preview lives in order-form.css, which describes
   paper. This block only handles what surrounds it on screen.
   ============================================================ */

/* --- List: cards grouped by year --- */
.price-year {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 10px;
}

.price-year .numeric {
    font-family: "IBM Plex Sans Condensed", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

.price-year-rule {
    flex: 1 1 auto;
    height: 1px;
    background: var(--mud-palette-lines-default);
}

.price-year-count {
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
}

/* --- Compartments and ranges ---

   A compartment per kind of document (price lists, terms of sale, other), then the year,
   then the range: the team looks for "AOL PME 2027", in that order of questions. */
.price-shelf + .price-shelf {
    margin-top: 36px;
}

.price-shelf-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--mud-palette-text-primary);
}

.price-shelf-empty {
    display: block;
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary);
}

.price-family {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.price-year + .price-family {
    margin-top: 4px;
}

/* A range heading is a band in the range colour, and its cards carry the same colour along
   their top edge: three ranges in a row read as three groups, not as one wall of cards. The
   text stays in the theme's ink — the darker range inks would vanish on a dark background. */
.price-family[class*="price-family-allegro-"] {
    margin: 22px 0 10px;
    padding: 6px 12px;
    border-left: 4px solid var(--family);
    border-radius: 3px;
    background: color-mix(in srgb, var(--family) 14%, transparent);
    font-size: 13px;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.price-year + .price-family[class*="price-family-allegro-"] {
    margin-top: 6px;
}

.price-family[class*="price-family-allegro-"] .price-range {
    display: none;
}

.price-family[class*="price-family-allegro-"] + .price-cards .price-card {
    border-top: 3px solid var(--family);
}

.price-family-allegro-popsy,
.price-family-allegro-popsy + .price-cards { --family: var(--range-popsy); }
.price-family-allegro-online,
.price-family-allegro-online + .price-cards { --family: var(--range-online); }
.price-family-allegro-subito,
.price-family-allegro-subito + .price-cards { --family: var(--range-subito); }
.price-family-allegro-windows,
.price-family-allegro-windows + .price-cards { --family: var(--range-windows); }

.price-card-subtitle {
    font-size: 12px;
    line-height: 1.3;
    color: var(--mud-palette-text-secondary);
}

.price-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.price-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    background: var(--mud-palette-surface);
    text-decoration: none;
    color: inherit;
    transition: border-color .12s ease;
}

.price-card:hover {
    border-color: var(--mud-palette-primary);
}

/* A draft isn't confused with a price list in force: the left border says so
   before you even read the pill. */
.price-card-draft {
    border-left: 3px solid var(--mud-palette-warning);
}

.price-card-archived {
    opacity: .62;
}

.price-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-lang {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .08em;
    padding: 1px 5px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 3px;
    color: var(--mud-palette-text-secondary);
}

.price-status {
    font-size: 11px;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
}

.price-status-draft { color: var(--mud-palette-warning); }
.price-status-published { color: var(--mud-palette-success); }
.price-status-archived { color: var(--mud-palette-text-secondary); }

.price-card-title {
    font-family: "IBM Plex Sans Condensed", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
}

.price-card-meta,
.price-card-foot {
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
}

.price-card-foot {
    margin-top: 4px;
}

/* --- The range, on the list card ---

   The same color code as the printed sheet, reduced to a pill: you recognize a price list by
   its color before reading its title. A pill and not the left border, which already states
   the status — a draft remains a draft before being a Popsy. The colors are declared
   only once, in order-form.css, which App.razor loads on every page. */
.price-range {
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--mud-palette-lines-default);
}

.price-range-allegro-popsy { background: var(--range-popsy); }
.price-range-allegro-online { background: var(--range-online); }
.price-range-allegro-subito { background: var(--range-subito); }
.price-range-allegro-windows { background: var(--range-windows); }

/* --- The language being written ---

   A bar rather than a tab: a price list's two languages are not two pages, it's
   the same document whose words change. The pill says how many texts remain to
   translate; without it, a half-done language looks like a finished one. */
.price-lang-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.price-lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* One button per language under the note, in the version list: two letters, no
   wider than they are. */
.note-lang-download {
    min-width: 0;
    padding: 0 6px;
    font-size: 12px;
    letter-spacing: .04em;
}

/* A version's channel, framed like a ticket's kind. The Next takes the warning color: it is
   the one not yet fully tested, and the one a reader must not hand to a customer by mistake. */
.ch-official { --kind: var(--mud-palette-text-secondary); }
.ch-next { --kind: var(--mud-palette-warning); }

/* Online on the SaaS: the stable version users reach. Its own color, so that scanning the list
   by date, the most recent one shows how far the SaaS has come. */
.ch-saas { --kind: var(--mud-palette-info); }
.ch-blocked { --kind: var(--mud-palette-error); }

/* The setups of a version: one outlined group, one segment per setup, so that a row stays
   one line high. The tooltips wrap each link in a div: the dividers go on the group's
   children, whatever they are. */
.setup-links {
    display: inline-flex;
    align-items: stretch;
    white-space: nowrap;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    background: var(--mud-palette-surface);
    overflow: hidden;
}

.setup-links > * + * {
    border-left: 1px solid var(--mud-palette-lines-default);
}

.setup-links-icon {
    display: flex;
    align-items: center;
    padding: 0 5px;
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-secondary);
}

.setup-links-icon .mud-icon-root {
    width: 15px;
    height: 15px;
}

.setup-link {
    display: flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    color: var(--mud-palette-text-primary);
    text-decoration: none;
    transition: background-color .12s ease, color .12s ease;
}

.setup-link:hover {
    background: var(--mud-palette-primary-hover);
    color: var(--mud-palette-primary);
}

.setup-link:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
}

.price-lang-base,
.price-lang-missing {
    margin-left: 6px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: none;
}

.price-lang-missing {
    padding: 0 5px;
    border-radius: 8px;
    background: var(--mud-palette-warning);
    color: #fff;
}

.price-lang-note {
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
}

/* The reference language, on the list card: it's the one used as fallback. */
.price-lang-ref {
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary);
}

/* --- Editor: content on the left, sheet on the right --- */
.price-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 20px;
    align-items: start;
}

/* Below 1400 px, the sheet moves under the editor: shrunk any further, it would say
   nothing about the layout anymore, and that's its whole point. */
@media (max-width: 1400px) {
    .price-editor {
        grid-template-columns: minmax(0, 1fr);
    }
}

.price-edit-pane {
    min-width: 0;
}

.price-panels {
    margin-bottom: 16px;
}

.price-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    padding: 4px 0 8px;
}

.price-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    grid-column: 1 / -1;
}

/* --- Sections and lines --- */
.price-section {
    margin-bottom: 20px;
    padding: 12px 14px 8px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    background: var(--mud-palette-surface);
}

.price-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.price-section-title {
    flex: 1 1 40%;
}

.price-section-title input {
    font-family: "IBM Plex Sans Condensed", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.price-section-subtitle {
    flex: 1 1 30%;
}

.price-lines {
    display: flex;
    flex-direction: column;
}

.price-line {
    padding: 8px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.price-line:last-child {
    border-bottom: 0;
}

.price-line-main {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.price-line-main > .mud-input-control:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

/* Wide enough for a four-digit licence (1050) next to the clear button and spinner. */
.price-amount {
    flex: 0 0 140px;
}

.price-unit {
    flex: 0 0 96px;
}

/* A computed amount is shown without being editable: correcting it by hand would give a
   figure that comes back on the next save. */
.price-derived {
    flex: 0 0 140px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    border: 1px dashed var(--mud-palette-lines-inputs);
    border-radius: 4px;
    text-align: right;
}

.price-line-tools {
    display: flex;
    align-items: center;
    padding-top: 2px;
}

.price-details {
    margin-top: 6px;
    padding-left: 4px;
}

/* --- Where the translation is missing ---

   The selector's pill says how many texts remain to be written; it doesn't say which, and
   on a forty-line grid the count alone forces you to compare the two languages by hand.
   The mark carries the code of the missing language rather than an alert sign: from
   French, you learn that it's Dutch that isn't written without switching language.

   The border is drawn as an inset shadow and not a border: a flagged line thus keeps
   exactly the width and alignment of the others, otherwise the amounts column would shift
   as translations progress. */
.price-gap-marks {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 4px;
}

/* Line fields are top-aligned: the mark drops down to the level of the typed text. */
.price-line-main > .price-gap-marks {
    margin-top: 9px;
}

.price-gap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    padding: 2px 6px 2px 4px;
    border-radius: 3px;
    background: var(--mud-palette-warning);
    color: #fff;
}

/* The clickable mark looks the same: only the cursor and the hover say it leads somewhere. */
.price-gap-go {
    border: 0;
    cursor: pointer;
}

.price-gap-go:hover {
    filter: brightness(.9);
}

.price-gap-go:focus-visible {
    outline: 2px solid var(--mud-palette-warning-darken);
    outline-offset: 1px;
}

/* The icon says "translation" before the code is read: two letters alone get taken for
   some random abbreviation. */
.price-gap .mud-icon-root {
    width: 13px;
    height: 13px;
    font-size: 13px;
}

/* The border flags, the background makes the line stand out in a long grid: from afar, you see
   the blocks to translate without reading a single label. */
.price-line.price-gap-row {
    box-shadow: inset 2px 0 0 var(--mud-palette-warning);
    background: var(--mud-palette-warning-hover);
}

.price-section.price-gap-row {
    box-shadow: inset 3px 0 0 var(--mud-palette-warning);
}

/* --- The banner: what's missing, named, with the path to get there --- */
.price-gap-banner {
    margin-bottom: 14px;
}

.price-gap-banner-body {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
}

/* --- The two languages side by side ---

   The same reading as the before/after of an indexation, applied to words: two columns, one
   per language, and the named field on the left. What's missing shows as an empty spot rather
   than a sign, because that's exactly what will be missing on the printed sheet. */
.price-compare {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    max-height: 55vh;
    overflow: auto;
}

.price-compare-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-size: 12.5px;
}

.price-compare-row:last-child {
    border-bottom: 0;
}

/* The header stays visible while scrolling down: without it, you no longer know which column
   is which language after thirty lines. */
.price-compare-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--mud-palette-surface);
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.price-compare-group {
    padding: 6px 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-table-hover);
    font-family: "IBM Plex Sans Condensed", sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.price-compare-what {
    color: var(--mud-palette-text-secondary);
    font-size: 11.5px;
}

/* Multi-line fields — included services, footer — keep their line breaks:
   that's how they print, and a translation that lost a line is spotted at a
   glance. */
.price-compare-cell {
    min-width: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.price-compare-gap {
    background: var(--mud-palette-warning-hover);
}

.price-compare-missing {
    font-size: 11px;
    font-weight: 600;
    font-style: italic;
    color: var(--mud-palette-warning);
}

/* Below 900 px the window no longer has room for two columns of text: the values stack
   one under the other, and each then carries its language code — stacked without it, you
   wouldn't know which one is the translation. */
@media (max-width: 900px) {
    .price-compare-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .price-compare-head {
        display: none;
    }

    .price-compare-cell::before {
        content: attr(data-lang) " ";
        font-family: "IBM Plex Mono", ui-monospace, monospace;
        font-size: 10px;
        letter-spacing: .08em;
        color: var(--mud-palette-text-secondary);
    }
}

/* A collapsed panel's title carries the same mark: the document's texts aren't in
   the grid, and an untranslated header would otherwise only show once the panel is open. */
.price-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* A subheading or a note has no price: the lightly tinted background is a reminder. */
.price-line-subheading,
.price-line-note {
    background: var(--mud-palette-table-hover);
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
}

/* --- Preview --- */
.price-preview {
    position: sticky;
    top: 68px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    background: var(--mud-palette-surface);
    overflow: hidden;
}

.price-preview-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 6px 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.price-preview-frame {
    max-height: calc(100vh - 140px);
}

/* --- Indexation: before and after, side by side --- */
.price-dirty {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--mud-palette-warning);
}

.price-diff {
    margin-top: 8px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    max-height: 340px;
    overflow: auto;
}

.price-diff-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 5px 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.price-diff-row:last-child {
    border-bottom: 0;
}

.price-diff-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.price-diff-cell {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

/* The old amount stays readable but fades: it's the new one you proofread. */
.price-from {
    color: var(--mud-palette-text-secondary);
    text-decoration: line-through;
}

.price-arrow {
    color: var(--mud-palette-text-disabled);
    font-size: 11px;
}

.price-to {
    font-weight: 600;
    color: var(--mud-palette-primary);
}

.price-reverted {
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
    font-style: italic;
}

/* --- Versions: the list, and an older sheet at full size --- */
.price-revision-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.price-revision-frame {
    max-height: 70vh;
}

/* ---- Release notes ----------------------------------------------------

   The note is skimmed: short bullets, airy line spacing, and the
   ticket reference set back so it doesn't break the sentence. The
   section subheadings reuse .price-year, already designed for that. */

.release-lines {
    margin: 10px 0 0;
    padding-left: 20px;
    list-style: disc;
}

.release-lines li {
    margin-bottom: 8px;
    line-height: 1.55;
}

/* A candidate ticket's internal title. It can be long and is only there to
   recognize the line: it gets cut rather than pushing the column. */
.candidate-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

/* A line's sentence in the note editor. It is the text the customer will
   read: it fills the row and is set a size above the other fields. */
.note-line-text {
    flex: 1;
    min-width: 0;
}

.note-line-text textarea {
    font-size: 15px;
    line-height: 1.55;
}

.note-line-area {
    flex: 0 0 170px;
}

/* The ticket above a line's sentence: number, kind and internal title, on one
   line that never wraps, quieter than the sentence it labels. */
.note-line-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
}

/* The announcement's recipients: two columns of names that scroll, so a long list
   of resellers doesn't push the message out of the dialog. */
.announce-recipients {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
    padding: 4px 8px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
}

/* The announcement goes out as plain text: a fixed-width font shows its lists and
   blank lines as the recipient's mail client will. */
.announce-body textarea {
    font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
}

/* --- Public upload ---
   The same card as the login, but wider: the form carries an identity, a
   description and files, and at 380 pixels each field took three lines. */
.signin-card.wide { max-width: 620px; }

.signin-card select,
.signin-card textarea,
.signin-card input[type="email"],
.signin-card input[type="tel"],
.signin-card input[type="file"] {
    font-family: inherit;
    font-size: 13.5px;
    padding: 8px 10px;
    border: 1px solid var(--mud-palette-lines-inputs, #D5D9E0);
    border-radius: 4px;
    background: var(--mud-palette-surface, #FFFFFF);
    color: var(--mud-palette-text-primary, #12151A);
}

.signin-card textarea { resize: vertical; line-height: 1.45; }

.signin-card select:focus,
.signin-card textarea:focus {
    outline: none;
    border-color: var(--mud-palette-primary, #00719F);
    box-shadow: 0 0 0 2px rgba(0, 113, 159, .15);
}

/* The help under a field: it says what the label can't say in two words. */
.signin-card .hint {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--mud-palette-text-secondary, #59606F);
}

/* A note placed under a form rather than under a field: a paragraph's margin
   would double the gap the card already keeps itself. */
.signin-card p.hint {
    margin: 0;
    text-align: center;
}

/* A required field's asterisk, and the line that explains it at the top of the form. The
   line stays on the left where the other notes are centered: it reads with the
   labels it explains, not like a footer. */
.signin-card .req {
    color: var(--mud-palette-error, #B3261E);
    font-weight: 600;
}

.signin-card p.hint.required-legend { text-align: left; }

/* An upload's progress, placed by js/upload-progress.js above the button. The color
   follows the palette: a hardcoded bar would stand out badly in dark theme. */
.signin-card .upload-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.signin-card .upload-progress[hidden] { display: none; }

.signin-card .upload-progress progress {
    width: 100%;
    height: 8px;
    accent-color: var(--mud-palette-primary, #00719F);
}

.signin-card button:disabled { opacity: .6; cursor: progress; filter: none; }

/* The counterpart of .error: same shape, different news. */
.signin-card .sent {
    margin: 0;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.5;
    border: 1px solid var(--mud-palette-success, #2E7D32);
    border-radius: 4px;
    color: var(--mud-palette-success, #2E7D32);
}

/* ===================================================================================
   What's new

   A list of news items is scanned before being read: it's the only screen of the
   portal expected to make you want to read on. Hence cards rather than a table, a colored
   border that states the type without being read, and a three-level hierarchy — type,
   title, teaser.

   The colors come from the MudBlazor palette: the portal switches to dark theme, and a
   hardcoded value would come out white on white there.
   =================================================================================== */

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* The card and its menu. The menu is laid over the card rather than inside the link:
   a button inside an anchor opens the post while unfolding. Hence the wrapper, which only
   serves to give it a positioning reference. */
.news-card-shell {
    position: relative;
}

.news-card-actions {
    position: absolute;
    top: 6px;
    right: 6px;
}

/* The menu's space is reserved in the card: without it, a footer date or a channel pill
   would slip underneath. */
.news-card-managed .news-card-body {
    padding-right: 48px;
}

.news-card {
    position: relative;
    display: flex;
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    background: var(--mud-palette-surface);
    text-decoration: none;
    color: inherit;
    transition: border-color .12s ease, transform .12s ease;
}

.news-card:hover {
    border-color: var(--mud-palette-primary);
    transform: translateY(-1px);
}

/* The border carries the type's color. It stands in for an icon at reading distance:
   you see there's a news item in the list before reading anything. */
.news-card-bar {
    flex: 0 0 4px;
    background: var(--mud-palette-lines-default);
}

.news-card-feature .news-card-bar { background: var(--mud-palette-primary); }
.news-card-improvement .news-card-bar { background: var(--mud-palette-success); }
.news-card-fix .news-card-bar { background: var(--mud-palette-warning); }
.news-card-info .news-card-bar { background: var(--mud-palette-text-disabled); }

.news-card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 18px;
    width: 100%;
}

.news-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mud-palette-text-secondary);
}

.news-card-kind {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.news-card-pin {
    color: var(--mud-palette-text-secondary);
}

.news-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--mud-palette-text-primary);
}

/* The teaser is cut at two lines: beyond that, the card becomes the article, and the list
   can no longer be scanned. The full post is one click away. */
.news-card-lead {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.5;
    color: var(--mud-palette-text-secondary);
}

.news-card-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
}

/* The card's pills. Small, without a garish background: they inform, they don't
   call out. The freshness one is the only colored one — it's the only one that must be seen. */
.news-badge {
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 10px;
    border: 1px solid var(--mud-palette-lines-default);
}

.news-badge-fresh {
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary);
}

.news-badge-draft {
    border-color: var(--mud-palette-warning);
    color: var(--mud-palette-warning);
}

.news-badge-audience {
    color: var(--mud-palette-text-secondary);
}

/* ---- The creation dialog ----

   Three clickable blocks rather than a dropdown: the starting point decides everything
   that follows, and a choice you don't see is a choice you don't make. */

.news-start {
    padding: 12px 14px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}

.news-start:hover {
    border-color: var(--mud-palette-primary);
}

.news-start-on {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-action-default-hover);
}

.news-start-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* ---- The open post ---- */

.news-read-lead {
    font-weight: 500;
    line-height: 1.5;
    color: var(--mud-palette-text-secondary);
}

.news-read .faq-body-text h2 {
    margin: 22px 0 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
}

.news-read .faq-body-text ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.7;
}

/* ---- What the post announces, entry by entry ----

   The sections replace the headings everyone used to write by hand in their Markdown: they
   are short, in capitals, in the secondary text color — a subheading, not a title.
   What gets read are the entries.

   The same formatting serves the open post and the writer's preview: what the customer
   will see must be judged without publishing. */

.news-items {
    margin-top: 20px;
}

.news-item-section {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 22px 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.news-item-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.news-item {
    padding: 7px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    line-height: 1.5;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item-title {
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

/* The work's number: there for whoever needs to find the ticket, faded for whoever reads. */
.news-item-ref {
    margin-left: 8px;
    font-size: 12px;
    color: var(--mud-palette-text-disabled);
}

.news-item-body {
    margin-top: 3px;
    color: var(--mud-palette-text-secondary);
}

.news-item-body p {
    margin: 0 0 4px;
}

/* ---- The table of contents, while writing ----

   The right column acts as a summary: you must see at once what the post
   announces and in what order, while writing a line below. Hence compact
   rows, clickable across their full width, and a number aligned on the left — it's the rank
   within the section, the one the reader will follow. */

.news-item-rows {
    display: flex;
    flex-direction: column;
}

.news-item-row {
    display: flex;
    align-items: center;
    gap: 2px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.news-item-row:hover {
    background: var(--mud-palette-action-default-hover);
}

.news-item-row-on {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-action-default-hover);
}

/* The row is a button: it can be chosen by keyboard as by mouse, and the click area
   covers the whole title rather than a three-pixel icon. */
.news-item-pick {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 7px 8px;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.news-item-no {
    flex: 0 0 auto;
    min-width: 18px;
    font-size: 12px;
    color: var(--mud-palette-text-disabled);
}

.news-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- The entry being written ---- */

.news-item-edit {
    padding: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    background: var(--mud-palette-background-grey);
}

/* ============================================================
   Absence type: one tint per type
   ============================================================

   The general calendar lays nine types side by side that aren't equivalent — a statutory
   leave, a training, a sick leave —, and the only thing that tells them apart from one end
   of a thirty-one-column grid to the other is their color. The theme roles only offered
   five: three types shared the accent, and the legend lined up three identical blue squares
   next to three different labels, which is worse than no legend at all.

   Hence a palette of its own, kept here and nowhere else. Each type sets its tint in
   --leave; the three styles that follow — filled pill, softened chip, icon — read it
   without ever naming a color. Changing a type's tint is therefore one line.

   The tints are spaced around the wheel rather than picked one by one: what informs is the
   gap between two neighbouring types in a grid, not the accuracy of an isolated color.
   Each holds at least 4.5:1 on its mode's background, because it also serves as an icon
   color in lists, where it's no longer a flat fill but a two-pixel stroke.

   The label stays written wherever space allows, and the tooltip carries it elsewhere: the
   color speeds up reading, it doesn't replace it — see Rules/LeaveVisibility for what is
   never said. */

.lv-legal { --leave: #00719F; }
.lv-extra { --leave: #0E7C6B; }
.lv-seniority { --leave: #6A48A6; }
.lv-recovery { --leave: #3F7D20; }
.lv-sick { --leave: #8A5610; }
.lv-unpaid { --leave: #59606F; }
.lv-training { --leave: #3B4FB0; }
.lv-family { --leave: #A33A78; }
.lv-worked { --leave: #7A6A00; }
.lv-other { --leave: #6E5B4E; }

/* Working from home: not an absence, so the lightest touch on the calendar — a small
   grey-blue house, nothing else (see the fill rules below). Its tint stays readable for
   icons and chips. */
.lv-homework { --leave: #587089; }

/* A day a part-timer's schedule leaves out: the weekend's grey, apart from every kind of leave
   and quieter than any absence — it is the person's usual week, not an event of it. The ink
   (icons, chips, the agenda's edge) takes the secondary text grey; the fill takes the very grey
   of a weekend column. */
.lv-parttime { --leave: var(--mud-palette-text-secondary); }

.lv-fill.lv-parttime {
    background: var(--mud-palette-background-gray);
    box-shadow: inset 0 0 0 1px var(--mud-palette-lines-inputs);
}

.lv-soft.lv-parttime {
    border-left-color: var(--mud-palette-lines-inputs);
    background: var(--mud-palette-background-gray);
}

/* An absence whose type is withheld. The grey of the unknown, never another type's
   tint: "absent" is all we know, and a named color would give it away. */
.lv-hidden { --leave: var(--mud-palette-text-disabled); }

/* The same tints raised for the ink background: the light mode colors drop to 2:1 there and
   blend in pairs. The marker is set by MainLayout, which is the only one that knows which
   mode we're in — MudBlazor sets no class to say so. */
.ap-dark .lv-legal { --leave: #4FB6E0; }
.ap-dark .lv-extra { --leave: #46B9A3; }
.ap-dark .lv-seniority { --leave: #B49DE3; }
.ap-dark .lv-recovery { --leave: #86C265; }
.ap-dark .lv-sick { --leave: #DFAE55; }
.ap-dark .lv-unpaid { --leave: #8F97A6; }
.ap-dark .lv-training { --leave: #8494E8; }
.ap-dark .lv-family { --leave: #E081B4; }
.ap-dark .lv-worked { --leave: #D4C24A; }
.ap-dark .lv-other { --leave: #C0A48F; }
.ap-dark .lv-homework { --leave: #A9BCD1; }

/* A type's icon, in lists and cards. */
.lv-ink { color: var(--leave); }

/* The same tint on a MudBlazor chip, which colors its own by role. The rule is written
   at the same weight as its own and wins through stylesheet order — app.css is loaded
   after its own — rather than by forcing. */
.mud-chip.lv-ink, .mud-chip.lv-ink .mud-icon-root { color: var(--leave); }

/* The calendar's filled pill. The inner border is what detaches it from a greyed
   column — a flat fill on a grey background loses its edge, and two adjoining pills become
   one. */
.lv-fill {
    background: var(--leave);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--leave) 70%, #000);
}

/* A withheld type gets hatching rather than a flat fill: a solid grey read like a
   tenth type, whereas it says exactly the opposite — that there is nothing to read. */
.lv-fill.lv-hidden {
    background: repeating-linear-gradient(-45deg,
        var(--leave) 0 3px, transparent 3px 6px);
    box-shadow: inset 0 0 0 1px var(--leave);
}

/* Working from home is drawn barely there: just a small house in the cell — no fill, no
   edge —, so that a week of it doesn't weigh on the grid like a week of leave. The person is
   at work. The house is an image rather than an icon element because the cell is an empty
   span; its colour is therefore written twice, once per mode. */
.lv-fill.lv-homework {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23587089' d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
    box-shadow: none;
}

.ap-dark .lv-fill.lv-homework {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23A9BCD1' d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
}

.leave-week .lv-fill.lv-homework { background-size: 11px 11px; }

/* The named chip in the agenda view: the name reads in the theme's ink, the type reads in
   the border. Writing the name in its type's tint would have required nine colors readable at
   size 11 on a white background — yet what you look for in a cell is the name, not the
   type. */
.lv-soft {
    border-left: 3px solid var(--leave);
    background: color-mix(in srgb, var(--leave) 12%, transparent);
}

.lv-soft.lv-homework {
    border-left-color: color-mix(in srgb, var(--leave) 40%, transparent);
    background: color-mix(in srgb, var(--leave) 6%, transparent);
}

/* ============================================================
   Recurring tasks
   ============================================================ */

/* A task card. The left border carries two pieces of information in the same place, and they
   don't compete: a running task is always more urgent to spot than a task
   that is yours, so .rec-running comes after in the stylesheet. */
.rec-card {
    border-left: 3px solid transparent;
    transition: border-color .15s ease;
}

/* What's yours: a discreet border. You don't look for it, you recognize it in passing —
   it's the only thing in the list you can act on. */
.rec-mine {
    border-left-color: var(--mud-palette-lines-default);
}

/* What's running. The only question you ask the screen when opening it, and the only
   background tint in the list: a very pale fill is enough to single out the row without a list of
   thirty tasks turning into a checkerboard. */
.rec-running {
    border-left-color: var(--mud-palette-info);
    background: color-mix(in srgb, var(--mud-palette-info) 6%, transparent);
}

/* The instructions, under the title. They keep their line breaks — it's a procedure,
   not a paragraph, and gluing it back into one block made the steps unreadable. */
.rec-notes {
    white-space: pre-wrap;
}

/* The word written by whoever switched a task, in the bell and on the page. It is
   indented under the line and quoted in italics: it's not a sentence from the portal, it's
   someone speaking. */
.notif-word {
    margin-top: 2px;
    padding-left: 8px;
    border-left: 2px solid var(--mud-palette-lines-default);
    font-style: italic;
    white-space: pre-wrap;
}

/* ============================================================
   Online help: the manual, with its table of contents on the left
   ============================================================ */

/* The classes are those of the printed manual — docs/manuel/build.py — so the same
   fragment reads on screen as on paper. The colors come from the theme, to follow
   dark mode; the callouts keep their three tints, which state the tone of the message. */

.help-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.help-toc {
    position: sticky;
    top: 68px;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
}

.help-toc nav { display: flex; flex-direction: column; }

.help-toc a {
    display: flex;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    color: inherit;
    text-decoration: none;
    line-height: 1.35;
}

.help-toc a:hover { background: var(--mud-palette-action-default-hover); }

.help-toc-chapter { font-weight: 600; margin-top: 6px; font-size: 13.5px; }
.help-toc-section { padding-left: 16px !important; font-size: 13px; color: var(--mud-palette-text-secondary) !important; }

.help-toc-num {
    flex: none;
    min-width: 26px;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--mud-palette-primary);
}

.help-toc-empty { padding: 4px 8px; color: var(--mud-palette-text-secondary); }

/* On a narrow screen, the table of contents moves above and stops following the scroll. */
@media (max-width: 900px) {
    .help-layout { grid-template-columns: minmax(0, 1fr); }
    .help-toc { position: static; max-height: 320px; }
}

.help-body {
    line-height: 1.6;
    overflow-wrap: anywhere;
    max-width: 900px;
}

/* Scrolling to an anchor leaves room for the top bar. */
.help-body [id] { scroll-margin-top: 68px; }

.help-body section + section {
    margin-top: 32px;
    padding-top: 8px;
}

.help-body h2 {
    font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
    font-size: 21px;
    font-weight: 600;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--mud-palette-primary);
}

.help-body h2 .num { color: var(--mud-palette-primary); font-weight: 400; margin-right: 8px; }

.help-body h3 { font-size: 16px; font-weight: 600; margin: 22px 0 6px; }

.help-body h4 {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--mud-palette-text-secondary);
    margin: 14px 0 4px;
}

.help-body p { margin: 0 0 10px; }
.help-body ul, .help-body ol { margin: 0 0 10px; padding-left: 22px; }
.help-body li { margin-bottom: 3px; }
.help-body a { color: var(--mud-palette-primary); }

.help-body .lead { font-size: 15px; color: var(--mud-palette-text-secondary); }

.help-body .path {
    font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    font-size: 12.5px;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-action-default-hover);
    white-space: nowrap;
}

.help-body .cols { column-count: 2; column-gap: 32px; }
.help-body .cols li { break-inside: avoid; }

@media (max-width: 600px) {
    .help-body .cols { column-count: 1; }
    .help-body td.k { white-space: normal; }
}

/* A wide table scrolls within its frame rather than widening the page. */
.help-body table {
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 8px 0 14px;
    font-size: 13.5px;
}

.help-body th {
    text-align: left;
    font-weight: 600;
    padding: 6px 10px;
    border-bottom: 1.5px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-action-default-hover);
}

.help-body td {
    padding: 6px 10px;
    vertical-align: top;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.help-body tr:last-child td { border-bottom: none; }
.help-body td.k { font-weight: 600; white-space: nowrap; }

.help-body .note,
.help-body .warn,
.help-body .tip {
    border-left: 3px solid var(--mud-palette-primary);
    background: var(--mud-palette-action-default-hover);
    border-radius: 0 4px 4px 0;
    padding: 10px 14px;
    margin: 10px 0 14px;
    font-size: 13.5px;
}

.help-body .warn { border-left-color: var(--mud-palette-error); }
.help-body .tip { border-left-color: var(--mud-palette-success); }

.help-body .note p:last-child,
.help-body .warn p:last-child,
.help-body .tip p:last-child { margin-bottom: 0; }

.help-body .lbl {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--mud-palette-primary);
    margin-bottom: 3px;
}

.help-body .warn .lbl { color: var(--mud-palette-error); }
.help-body .tip .lbl { color: var(--mud-palette-success); }

.help-body ol.steps { counter-reset: step; list-style: none; padding-left: 0; }

.help-body ol.steps > li {
    counter-increment: step;
    position: relative;
    padding-left: 34px;
    margin-bottom: 8px;
}

.help-body ol.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 1px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    line-height: 22px;
}

/* The getting-started screenshots. Light even in dark theme: they're
   photos of the screen, not of the interface. The orange markers on them match the
   "marks" lists and the .mk pills in the text, in the same color. */
.help-body figure { margin: 10px 0 14px; }

.help-body figure img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.help-body figure.narrow img { max-width: 460px; }

.help-body ol.marks > li::before,
.help-body .mk { background: #E8590C; color: #fff; }

.help-body .mk {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    vertical-align: 1px;
}

/* --- Work items inside an expanded release: both tables share column widths, so the
   shipped list and the assignable list line up one under the other. --- */
.release-items table { table-layout: fixed; width: 100%; }
.release-items th {
    font-size: 11px;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
}
.release-items .col-number { width: 80px; }
.release-items .col-kind   { width: 130px; }
.release-items .col-status { width: 120px; }
.release-items .col-action { width: 52px; text-align: center; }
.release-items td { vertical-align: middle; }

/* A ticket's release-note sentence: one line cut short, the whole sentence in the tooltip. */
.release-items .release-note-tip { display: block; min-width: 0; }
.release-items .release-note-line {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--mud-palette-text-secondary);
}

/* ============================================================
   Peppol console
   ============================================================ */

/* Flowin's answer, as it came back: indented JSON or XML, read like a log. It scrolls inside
   its frame rather than stretching the page — a list of customers runs to thousands of lines. */
.peppol-body {
    margin: 0;
    max-height: 520px;
    overflow: auto;
    padding: 10px 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    background: var(--mud-palette-background);
    font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre;
}

/* The first tab, as PeppolLookup's: who the customer is on the left, what to ask on the right.
   Stacked below 960px, where the two would squeeze the fields. */
.peppol-panels {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 12px;
}
@media (max-width: 959.98px) {
    .peppol-panels { grid-template-columns: minmax(0, 1fr); }
}

/* The actions, two to a row like the old tool's buttons; one per row on a phone. */
.peppol-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
@media (max-width: 599.98px) {
    .peppol-actions { grid-template-columns: minmax(0, 1fr); }
}

/* A resource from Flowin, as a sheet: cards side by side, as many as the width allows. The
   main values take a whole row — they are the most numerous. */
.peppol-sections,
.peppol-parties {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.peppol-section-main { grid-column: 1 / -1; }
.peppol-section {
    padding: 12px 14px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    min-width: 0;
}

/* Label and value in two columns; the values break rather than push the card wider. */
.peppol-fields {
    display: grid;
    grid-template-columns: minmax(120px, max-content) minmax(0, 1fr);
    gap: 4px 16px;
    margin: 8px 0 0;
    font-size: 14px;
}
.peppol-section-main .peppol-fields { grid-template-columns: repeat(auto-fill, minmax(140px, 180px) minmax(200px, 1fr)); }
.peppol-fields dt { color: var(--mud-palette-text-secondary); }
.peppol-fields dd { margin: 0; overflow-wrap: anywhere; }
.peppol-text { white-space: pre-line; }

/* The document's dates and references, on one line under its number. */
.peppol-fields-inline { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.peppol-fields-inline dd { margin-right: 20px; }
.peppol-fields-inline dt::after { content: " :"; }

/* The totals, amounts right-aligned under each other. */
.peppol-totals dd { text-align: right; }

/* The raw answer, folded under the laid-out one. */
.peppol-raw .mud-expand-panel { border: 1px solid var(--mud-palette-lines-default); border-radius: 4px; }

/* The customer the actions apply to, picked in the list. */
.peppol-selected > td { background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent); }

/* A column of identifiers or dates: no wrapping, it would cut a GUID in two. */
.peppol-table td { white-space: nowrap; }

/* The session's calls, under the answer: one line each, the answer shown again on click. */
.peppol-journal { display: flex; flex-direction: column; gap: 2px; }
.peppol-journal button {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 2px 4px;
    border: 0;
    border-radius: 3px;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.peppol-journal button:hover { background: var(--mud-palette-action-default-hover); }
.peppol-journal .status-ok { color: var(--mud-palette-success); }
.peppol-journal .status-ko { color: var(--mud-palette-error); }

/* ============================================================
   Manuals — /documentation
   ============================================================ */

/* The reader follows the help layout: the table of contents on the left, sticky, the topic
   on the right. The colors come from the theme, the callouts keep their three tints. */

.manual-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.manual-card { display: flex; flex-direction: column; }
.manual-card-link { color: inherit; text-decoration: none; }
.manual-card-link:hover .manual-card-title { color: var(--mud-palette-primary); }
.manual-card-title { font-weight: 600; font-size: 16px; line-height: 1.3; }
.manual-card-subtitle { color: var(--mud-palette-text-secondary); font-size: 13.5px; margin-top: 4px; }

.manual-outline-preview {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
}
.manual-outline-preview li { padding: 1px 0; }

.manual-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.manual-toc {
    position: sticky;
    top: 68px;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
}

.manual-toc nav, .manual-editor-tree { display: flex; flex-direction: column; }

.manual-toc-home {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: inherit;
    text-decoration: none;
    padding: 4px 8px;
}

.manual-toc-entry {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 13.5px;
    text-align: left;
    text-decoration: none;
    line-height: 1.35;
    cursor: pointer;
}
.manual-toc-entry:hover { background: var(--mud-palette-action-default-hover); }
.manual-toc-entry.depth-1 { font-weight: 600; margin-top: 6px; }
.manual-toc-entry.depth-2 { padding-left: 20px; }
.manual-toc-entry.depth-3 { padding-left: 36px; font-size: 13px; color: var(--mud-palette-text-secondary); }
.manual-toc-entry.current {
    background: var(--mud-palette-action-default-hover);
    color: var(--mud-palette-primary);
    box-shadow: inset 3px 0 0 var(--mud-palette-primary);
}
.manual-toc-text { flex: 1; min-width: 0; }

@media (max-width: 900px) {
    .manual-layout, .manual-editor, .manual-layout-editor { grid-template-columns: minmax(0, 1fr) !important; }
    .manual-toc, .manual-editor-outline, .manual-layout-preview { position: static !important; max-height: 320px; }
}

.manual-body { line-height: 1.6; overflow-wrap: anywhere; max-width: 920px; }

.manual-toolbar { display: flex; align-items: center; gap: 6px; margin: -8px -8px 8px; }

.manual-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 6px;
}
.manual-crumbs a { color: inherit; text-decoration: none; }
.manual-crumbs a:hover { color: var(--mud-palette-primary); }

.manual-title {
    font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 14px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--mud-palette-primary);
}

.manual-body .num, .manual-home .num, .manual-children .num {
    color: var(--mud-palette-primary);
    font-weight: 400;
    margin-right: 8px;
}

.manual-home { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.manual-home-chapter { display: flex; flex-direction: column; gap: 3px; }
.manual-home-title { font-weight: 600; font-size: 15.5px; color: inherit; text-decoration: none; margin-bottom: 2px; }
.manual-home-topic { color: var(--mud-palette-text-secondary); text-decoration: none; font-size: 13.5px; padding-left: 26px; }
.manual-home-title:hover, .manual-home-topic:hover { color: var(--mud-palette-primary); }

/* What a topic contains, as ManualHtml writes it — the same classes go to the PDF. */
.manual-content p { margin: 0 0 10px; }
.manual-content ul, .manual-content ol { margin: 0 0 10px; padding-left: 22px; }
.manual-content li { margin-bottom: 4px; }
.manual-content a { color: var(--mud-palette-primary); }
.manual-content table { display: block; overflow-x: auto; border-collapse: collapse; margin: 8px 0 14px; font-size: 13.5px; }
.manual-content th, .manual-content td { padding: 6px 10px; border-bottom: 1px solid var(--mud-palette-lines-default); text-align: left; vertical-align: top; }
.manual-content th { background: var(--mud-palette-action-default-hover); font-weight: 600; }
.manual-content code { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; font-size: 12.5px; padding: 1px 4px; border-radius: 3px; background: var(--mud-palette-action-default-hover); }

.manual-lead { font-size: 15.5px; color: var(--mud-palette-text-secondary); margin-bottom: 14px; }

.manual-heading { font-size: 16px; font-weight: 600; margin: 20px 0 6px; }

.manual-location {
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-action-default-hover);
    border-radius: 4px;
    padding: 8px 12px;
    margin: 6px 0 14px;
}
.manual-location p:last-child { margin-bottom: 0; }

.manual-content .lbl {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--mud-palette-primary);
    margin-bottom: 3px;
}

.manual-callout {
    border-left: 3px solid var(--mud-palette-primary);
    background: var(--mud-palette-action-default-hover);
    border-radius: 0 4px 4px 0;
    padding: 10px 14px;
    margin: 10px 0 14px;
    font-size: 14px;
}
.manual-callout p:last-child { margin-bottom: 0; }
.manual-tip { border-left-color: var(--mud-palette-success); }
.manual-content .manual-tip .lbl { color: var(--mud-palette-success); }
.manual-warning { border-left-color: var(--mud-palette-error); }
.manual-content .manual-warning .lbl { color: var(--mud-palette-error); }

.manual-steps li { margin-bottom: 8px; }
.manual-steps li::marker { color: var(--mud-palette-primary); font-weight: 600; }

.manual-figure { margin: 8px 0 14px; }
.manual-figure img {
    max-width: 100%;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    cursor: zoom-in;
}
.manual-figure figcaption { font-size: 12.5px; color: var(--mud-palette-text-secondary); margin-top: 4px; }

.manual-children {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid var(--mud-palette-lines-default);
}
.manual-children a { color: inherit; text-decoration: none; }
.manual-children a:hover { color: var(--mud-palette-primary); }

.manual-pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    padding-top: 12px;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-size: 13.5px;
}
.manual-pager a { display: flex; align-items: center; gap: 4px; color: var(--mud-palette-primary); text-decoration: none; max-width: 48%; }
.manual-pager-next { text-align: right; margin-left: auto; }

/* Read without signing in. */
.manual-public { min-height: 100vh; background: var(--mud-palette-background, #F4F5F7); display: flex; flex-direction: column; }
.manual-public-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.manual-public-logo { height: 30px; }
.manual-public-body { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 16px; }

/* The editor: the outline, the topic. */
.manual-editor {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.manual-editor-outline { position: sticky; top: 68px; max-height: calc(100vh - 88px); overflow-y: auto; }
.manual-editor-tree button:disabled { cursor: progress; opacity: .7; }

.manual-state { flex: none; width: 8px; height: 8px; border-radius: 50%; align-self: center; }
.manual-state-missing { background: var(--mud-palette-error); }
.manual-state-machine { background: var(--mud-palette-info); }
.manual-state-outdated { background: var(--mud-palette-warning); }
.manual-state-incomplete { background: transparent; border: 1.5px solid var(--mud-palette-text-secondary); }

.manual-block {
    border: 1px solid var(--mud-palette-lines-default);
    border-left: 3px solid var(--mud-palette-primary);
    border-radius: 4px;
    padding: 10px 14px 14px;
    margin-top: 14px;
}
.manual-block-tip { border-left-color: var(--mud-palette-success); }
.manual-block-warning { border-left-color: var(--mud-palette-error); }
.manual-block-text { border-left-color: var(--mud-palette-lines-default); }
.manual-block-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.manual-block-kind { font-weight: 600; font-size: 13.5px; }

.manual-original {
    margin: 4px 0 8px;
    padding: 6px 10px;
    border-radius: 4px;
    background: var(--mud-palette-action-default-hover);
    font-size: 13.5px;
}
.manual-original summary { cursor: pointer; color: var(--mud-palette-text-secondary); }

.manual-template-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }

.manual-layout-editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.manual-layout-preview { position: sticky; top: 68px; }
.manual-layout-preview .manual-title { font-size: 19px; }
.manual-layout-preview-block {
    border-left: 3px solid var(--mud-palette-lines-default);
    padding: 4px 10px;
    margin: 10px 0;
    font-size: 13.5px;
}

/* Manuals, second pass: icons in a sentence, figures, links to topics, front pages. */
.manual-content p.manual-figure { margin: 8px 0 14px; }
.manual-content p.manual-figure img {
    max-width: 100%;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    cursor: zoom-in;
}
.manual-caption { display: block; font-size: 12.5px; color: var(--mud-palette-text-secondary); margin-top: 4px; }
.manual-content img.manual-icon { vertical-align: middle; max-height: 40px; margin: 0 2px; }
.manual-content a.manual-topic-link { text-decoration: underline dotted; }
.manual-foreword { margin: 4px 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--mud-palette-lines-default); }
.manual-foreword h2 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }

.manual-logos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.manual-logo {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    background: #fff;
    padding: 8px 12px;
    cursor: pointer;
}
.manual-logo img { height: 36px; display: block; }
.manual-logo.selected { border-color: var(--mud-palette-primary); box-shadow: 0 0 0 2px var(--mud-palette-primary); }

.manual-markdown-field textarea { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; font-size: 12.5px; }

/* ============================================================
   Messaging between colleagues, read the Outlook way
   ============================================================ */

/* Three panes on one card: folders, list, reading pane. */
.mail {
    height: calc(100vh - 64px - 32px);
    min-height: 520px;
    display: grid;
    grid-template-columns: 220px 380px minmax(0, 1fr);
    overflow: hidden;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
}

/* --- Folders --- */
.mail-folders {
    min-height: 0;
    overflow-y: auto;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--mud-palette-background-gray);
    border-right: 1px solid var(--mud-palette-lines-default);
}

.mail-new {
    margin-bottom: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    color: var(--mud-palette-primary-text);
    background: var(--mud-palette-primary);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
    transition: transform .12s ease, box-shadow .12s ease;
}

.mail-new:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--mud-palette-primary) 45%, transparent);
}

.mail-folder {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    font: inherit;
    font-size: 14px;
    text-align: left;
    color: var(--mud-palette-text-primary);
}

.mail-folder:hover {
    background: var(--mud-palette-action-default-hover);
}

.mail-folder.active {
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent);
    color: var(--mud-palette-primary);
    font-weight: 600;
}

.mail-folder-name {
    flex: 1;
    min-width: 0;
}

.mail-folder.has-unread .mail-folder-name {
    font-weight: 700;
}

.mail-folder-count {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mud-palette-primary);
}

/* --- The list --- */
.mail-list {
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--mud-palette-lines-default);
}

.mail-list-head {
    flex: none;
    padding: 14px 14px 8px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.mail-list-title {
    font-weight: 700;
    font-size: 18px;
}

.mail-search {
    margin: 10px 0 0;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 20px;
    background: var(--mud-palette-background-gray);
}

.mail-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--mud-palette-text-primary);
}

.mail-search-icon {
    color: var(--mud-palette-text-secondary);
}

.mail-empty {
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
}

.mail-list-scroll {
    flex: 1;
    overflow-y: auto;
}

/* A row: who, when, the subject, the start of the text. Unread carries Outlook's edge and
   bold; the open one is tinted. */
.mail-row {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 14px 11px 11px;
    border: none;
    border-left: 3px solid transparent;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mail-row:hover {
    background: var(--mud-palette-action-default-hover);
}

.mail-row.unread {
    border-left-color: var(--mud-palette-primary);
}

.mail-row.selected {
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
}

.mail-row-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mail-row-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.mail-row-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-row-when {
    flex: none;
    font-size: 11.5px;
    color: var(--mud-palette-text-secondary);
}

.mail-row-subject {
    display: block;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-row-mark {
    margin-right: 4px;
    vertical-align: -3px;
    font-size: 15px !important;
    color: var(--mud-palette-text-secondary);
}

.mail-row-mark.returned {
    color: var(--mud-palette-warning);
}

.mail-row-excerpt {
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-row.unread .mail-row-name,
.mail-row.unread .mail-row-subject {
    font-weight: 700;
}

.mail-row.unread .mail-row-subject,
.mail-row.unread .mail-row-when {
    color: var(--mud-palette-primary);
}

/* --- The reading pane --- */
.mail-reader {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.mail-toolbar {
    flex: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.mail-reader-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 22px 28px 28px;
}

.mail-reader-subject {
    margin: 0 0 18px;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.mail-reader-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.mail-reader-who {
    flex: 1;
    min-width: 0;
}

.mail-reader-from {
    font-weight: 600;
    font-size: 15px;
}

.mail-reader-to,
.mail-reader-date {
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary);
}

.mail-reader-date {
    flex: none;
    text-align: right;
}

/* The ticket a message is about: a card above the text, opening it. A return to support
   carries the amber edge the portal gives to what waits on someone. */
.mail-ticket {
    margin: 0 0 18px;
    max-width: 560px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    border-left: 3px solid var(--mud-palette-warning);
    background: var(--mud-palette-background-gray);
    color: inherit;
    text-decoration: none;
}

.mail-ticket:hover {
    filter: brightness(.97);
}

.mail-ticket-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mail-ticket-kind {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mud-palette-warning-darken);
}

.mail-ticket-title {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-ticket-open {
    flex: none;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mud-palette-primary);
}

.mail-reader-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 14.5px;
    line-height: 1.6;
}

.mail-reader-empty {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--mud-palette-text-secondary);
}

.mail-reader-empty-icon {
    font-size: 56px !important;
    opacity: .35;
}

/* --- Avatars: round, with a green dot for whoever has the portal open --- */
.person-av {
    position: relative;
    flex: none;
    display: inline-block;
}

.person-av .detail-initials {
    width: 36px;
    height: 36px;
    font-size: 13.5px;
    border-radius: 50%;
}

.person-av-lg .detail-initials {
    width: 42px;
    height: 42px;
    font-size: 15px;
}

.person-online {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--mud-palette-success);
    border: 2px solid var(--mud-palette-surface);
}

/* --- Compose --- */
.mail-compose-ticket {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--mud-palette-primary);
    background: var(--mud-palette-background-gray);
    font-size: 13px;
}

/* Wide: the back arrow has nowhere to go back to. */
@media (min-width: 1101px) {
    .mail .mail-back {
        display: none;
    }
}

/* Medium: the folders fold into a strip above the list. */
@media (max-width: 1100px) {
    .mail {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }

    .mail-folders {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }

    .mail-new {
        margin: 0 8px 0 0;
    }

    .mail-list {
        border-right: none;
    }

    .mail.show-list .mail-reader,
    .mail.show-reader .mail-list {
        display: none;
    }
}

/* ---- Social networks: the accounts, and the media of a publication ---- */

.social-accounts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.social-account {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    padding: 12px;
}

.social-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.social-media-item img,
.social-media-item video {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    background: var(--mud-palette-background-gray);
}

/* The video studio: one line per shot — number, text, length, look, order — and the preview
   at the height of a phone held in the hand. */
.social-video-scenes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.social-video-scene {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.social-video-scene-number {
    min-width: 24px;
    text-align: center;
    color: var(--mud-palette-text-secondary);
}

.social-video-preview {
    max-height: 420px;
    max-width: 100%;
    border-radius: 12px;
    background: #10131F;
}


/* ============================================================
   The system in the mail view, and the personal space with its to-do list
   ============================================================ */

/* The folder title carries its actions — pick all, mark all read, empty the folder — and,
   once lines are picked, their count and their deletion. */
.mail-list-title {
    display: flex;
    align-items: center;
    gap: 2px;
}

.mail-list-title-text {
    flex: 1;
    min-width: 0;
}

.mail-check-all {
    width: 16px;
    height: 16px;
    margin: 0 10px 0 13px;
    accent-color: var(--mud-palette-primary);
    cursor: pointer;
}

/* A line's box sits over its avatar, Outlook's way: shown on hover, and on every line once
   one is picked. The avatar steps aside while it shows. */
.mail-line {
    position: relative;
}

.mail-check {
    position: absolute;
    z-index: 1;
    top: 11px;
    left: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    cursor: pointer;
}

.mail-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--mud-palette-primary);
    cursor: pointer;
}

.mail-line:hover .mail-check,
.mail-line.picking .mail-check,
.mail-check:focus-within {
    opacity: 1;
}

.mail-line.pickable:hover .mail-row > :first-child,
.mail-line.picking .mail-row > :first-child,
.mail-line:has(.mail-check:focus-within) .mail-row > :first-child {
    visibility: hidden;
}

/* The portal's badge where a colleague's photo would be: a round tinted icon. */
.system-av {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-lines-default);
}

.system-av.person-av-lg {
    width: 42px;
    height: 42px;
}

.system-av-primary { color: var(--mud-palette-primary); background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent); }
.system-av-info { color: var(--mud-palette-info); background: color-mix(in srgb, var(--mud-palette-info) 12%, transparent); }
.system-av-success { color: var(--mud-palette-success); background: color-mix(in srgb, var(--mud-palette-success) 12%, transparent); }
.system-av-warning { color: var(--mud-palette-warning); background: color-mix(in srgb, var(--mud-palette-warning) 14%, transparent); }
.system-av-error { color: var(--mud-palette-error); background: color-mix(in srgb, var(--mud-palette-error) 12%, transparent); }

/* --- The top bar's panel --- */
.todo-panel {
    padding: 4px 0 8px;
    max-height: 60vh;
    overflow-y: auto;
}

.todo-quick {
    padding: 6px 12px 8px;
}

.todo-quick input,
.todo-add-input,
.todo-edit {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-surface);
    outline: none;
}

.todo-quick input:focus,
.todo-add-input:focus,
.todo-edit:focus {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--mud-palette-primary) 20%, transparent);
}

.todo-line {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 12px 0 4px;
    font-size: 14px;
}

.todo-line-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todo-line-title a,
.todo-text a {
    color: inherit;
    text-decoration: none;
}

.todo-line-title a:hover {
    text-decoration: underline;
}

.todo-line.done .todo-line-title,
.todo-row.done .todo-text {
    text-decoration: line-through;
    color: var(--mud-palette-text-disabled);
}

.todo-star {
    font-size: 15px !important;
    margin-right: 2px;
    vertical-align: -2px;
    color: var(--mud-palette-warning);
}

.todo-late {
    font-size: 12px;
    font-weight: 600;
    color: var(--mud-palette-error);
}

/* --- The personal space --- */
.space-card {
    border-radius: 14px !important;
}

.todo-add {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 6px 6px 10px;
    border: 1px dashed var(--mud-palette-lines-inputs);
    border-radius: 10px;
}

.todo-add-input {
    flex: 1;
    border: none;
    padding: 6px 2px;
    background: transparent;
}

.todo-add-input:focus {
    box-shadow: none;
}

.todo-add-icon {
    color: var(--mud-palette-text-secondary);
}

.todo-pick {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 16px 10px;
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
}

.todo-pick input {
    font: inherit;
    padding: 4px 6px;
    border: 1px solid var(--mud-palette-lines-inputs);
    border-radius: 6px;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-surface);
}

.todo-empty {
    padding: 32px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    color: var(--mud-palette-text-secondary);
}

.todo-section + .todo-section {
    margin-top: 14px;
}

.todo-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.todo-section-overdue .todo-section-head {
    color: var(--mud-palette-error);
}

.todo-section-today .todo-section-head {
    color: var(--mud-palette-primary);
}

.todo-section-count {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-weight: 600;
}

.todo-row {
    display: flex;
    align-items: center;
    gap: 2px;
    min-height: 40px;
    padding: 0 2px;
    border-bottom: 1px solid color-mix(in srgb, var(--mud-palette-lines-default) 60%, transparent);
}

.todo-row:hover {
    background: var(--mud-palette-action-default-hover);
}

.todo-row-title {
    flex: 1;
    min-width: 0;
}

.todo-text {
    display: block;
    padding: 6px 4px;
    cursor: text;
    overflow-wrap: anywhere;
}

/* ---- Allebot: conversations on the left, the open one on the right ---- */

.allebot {
    height: calc(100vh - 64px - 32px);
    min-height: 520px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    overflow: hidden;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
}

.allebot-side {
    min-height: 0;
    overflow-y: auto;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--mud-palette-background-gray);
    border-right: 1px solid var(--mud-palette-lines-default);
}

.allebot-side-empty {
    padding: 8px 12px;
    color: var(--mud-palette-text-secondary);
    font-size: .85rem;
}

.allebot-side-row {
    display: flex;
    align-items: center;
    border-radius: 8px;
}

.allebot-side-row:hover,
.allebot-side-row.active {
    background: var(--mud-palette-action-default-hover);
}

.allebot-side-link {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.allebot-side-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .9rem;
}

.allebot-side-row.active .allebot-side-title {
    font-weight: 600;
}

.allebot-side-meta {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .75rem;
    color: var(--mud-palette-text-secondary);
}

.allebot-side-delete {
    visibility: hidden;
}

.allebot-side-row:hover .allebot-side-delete {
    visibility: visible;
}

.allebot-main {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.allebot-head {
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.allebot-head-title {
    min-width: 0;
}

.allebot-head-scope {
    display: flex;
    gap: 10px;
    min-width: 420px;
}

.allebot-thread {
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.allebot-welcome {
    margin: auto;
    max-width: 560px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.allebot-welcome-icon {
    font-size: 48px !important;
    color: var(--mud-palette-primary);
}

.allebot-examples {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.allebot-example {
    padding: 10px 14px;
    text-align: left;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    background: var(--mud-palette-surface);
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.allebot-example:hover {
    background: var(--mud-palette-action-default-hover);
}

.allebot-question {
    align-self: flex-end;
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px 14px 4px 14px;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.allebot-answer {
    align-self: flex-start;
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 14px 14px 14px 4px;
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-lines-default);
    overflow-wrap: anywhere;
}

.allebot-answer.failed {
    border-color: var(--mud-palette-error);
}

.allebot-answer.pending {
    color: var(--mud-palette-text-secondary);
}

.allebot-answer-text > :first-child {
    margin-top: 0;
}

.allebot-answer-text > :last-child {
    margin-bottom: 0;
}

.allebot-answer-actions {
    margin-top: 8px;
    padding-top: 6px;
    display: flex;
    align-items: center;
    gap: 2px;
    border-top: 1px solid var(--mud-palette-lines-default);
    font-size: .85rem;
}

.allebot-steps {
    margin: 8px 0 0 0;
    padding-left: 20px;
    font-size: .85rem;
}

.allebot-compose {
    padding: 12px 20px 14px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.allebot-compose-foot {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.allebot-journal td {
    vertical-align: top;
}

@media (max-width: 1100px) {
    .allebot {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }

    .allebot-side {
        max-height: 160px;
        border-right: none;
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }

    .allebot-head-scope {
        min-width: 0;
        width: 100%;
    }
}

/* Allebot: screenshots waiting to be sent, and sent with a question. */
.allebot-attachments {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.allebot-thumb {
    position: relative;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    overflow: hidden;
    background: var(--mud-palette-background-gray);
}

.allebot-thumb img {
    display: block;
    max-width: 120px;
    max-height: 90px;
}

.allebot-thumb button {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}

.allebot-question-images {
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.allebot-question-images img {
    display: block;
    max-width: 220px;
    max-height: 160px;
    border-radius: 8px;
    background: #fff;
}

.allebot-privacy {
    flex: 1;
}

/* Allebot: the documents an answer made, to download. */
.allebot-documents {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.allebot-document {
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-primary);
    text-decoration: none;
    font-size: .9rem;
}

.allebot-document:hover {
    background: var(--mud-palette-action-default-hover);
}

/* Allebot: a video it made, played in place, at the height of a phone held in the hand. */
.allebot-video {
    max-width: 100%;
    max-height: 480px;
    border-radius: 12px;
    background: #10131F;
}

/* Allebot: the recipes' tiles, and an email laid out under its answer. */
.allebot-recipes {
    margin-top: 14px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

.allebot-recipe {
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 12px;
    background: var(--mud-palette-surface);
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.allebot-recipe:hover:not(:disabled) {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-action-default-hover);
}

.allebot-recipe-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.allebot-recipe-name {
    font-weight: 600;
    font-size: .9rem;
}

.allebot-recipe-text {
    font-size: .78rem;
    color: var(--mud-palette-text-secondary);
}

.allebot-mail {
    margin-top: 12px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    background: #fff;
    color: #10131F;
    overflow: hidden;
}

.allebot-mail-head {
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #F4F7FA;
    border-bottom: 1px solid #E1E6EC;
    font-size: .9rem;
}

.allebot-mail-subject {
    font-weight: 600;
}

.allebot-mail-language {
    padding: 1px 8px;
    border-radius: 6px;
    background: #0086BF;
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
}

.allebot-mail-body {
    padding: 14px 16px;
}

.allebot-mail-actions {
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #E1E6EC;
    background: #FAFBFC;
}

/* ---- Shared files (/partages) ----
   The listing is the drop zone: a dashed frame says where the dragged files will land. */
.file-share-zone {
    border: 2px dashed transparent;
    border-radius: 6px;
    transition: border-color .15s, background-color .15s;
}

.file-share-zone.file-share-drop {
    border-color: var(--mud-palette-primary);
    background-color: var(--mud-palette-primary-hover);
}

/* Icon view: tiles in a grid, as the Windows explorer's large icons. The checkbox and the menu
   sit over the tile, outside its link, and show on hover or once the tile is selected. */
.file-share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 6px;
    padding: 6px;
}

.file-share-tile {
    position: relative;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: background-color .1s, border-color .1s;
}

.file-share-tile:hover {
    background-color: var(--mud-palette-action-default-hover);
}

.file-share-tile.file-share-selected {
    background-color: var(--mud-palette-primary-hover);
    border-color: var(--mud-palette-primary);
}

.file-share-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px 8px;
    color: inherit;
    text-decoration: none;
}

.file-share-big.mud-icon-root {
    font-size: 64px;
    width: 64px;
    height: 64px;
}

.file-share-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 64px;
}

.file-share-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* A checkerboard behind transparent icons and logos, so that white ones stay visible. */
    background: repeating-conic-gradient(#EEF1F4 0% 25%, #FFFFFF 0% 50%) 50% / 12px 12px;
}

.file-share-label {
    max-width: 100%;
    font-size: .8125rem;
    line-height: 1.25;
    text-align: center;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-share-check,
.file-share-more {
    position: absolute;
    top: 0;
    opacity: 0;
    transition: opacity .1s;
}

.file-share-check { left: 0; }
.file-share-more { right: 0; }

.file-share-tile:hover .file-share-check,
.file-share-tile:hover .file-share-more,
.file-share-tile:focus-within .file-share-check,
.file-share-tile:focus-within .file-share-more,
.file-share-selected .file-share-check {
    opacity: 1;
}
