/* ===========================================================================
   The panel's look: one design layer over Unfold, loaded on every admin page.

   Calm, light and green (the company colour): a softly tinted canvas, white
   cards with a gentle shadow, generous spacing, colour spent only where it
   carries meaning (the primary action, a status, an alert). Every colour comes
   from Unfold's variables (--color-primary-*, --color-base-*) or from the
   semantic tokens below, each redefined for the dark theme, so both themes and
   an operator's own primary colour keep working.

   It has two halves:

   1. The shell -- Unfold's own pages (sidebar, header, lists, forms, messages,
      sign-in), restyled by selector without forking a template.
   2. Components -- the `sy-*` classes the panel's custom pages and home-page
      widgets are written in:

        .sy-page-head                    a page's title, lead and actions
        .sy-grid / .sy-grid--stats       responsive card grids
        .sy-card (__head __title __body __foot)
        .sy-stat (__icon __value __label __hint)   a number with its meaning
        .sy-badge  --success --warning --danger --info --neutral --primary --violet
        .sy-btn    --primary --danger --ghost --sm --block
        .sy-toolbar / .sy-input / .sy-select       filters above a list
        .sy-dl                           label/value pairs
        .sy-list / .sy-list__item        rows with dividers
        .sy-table                        a plain data table
        .sy-empty                        nothing to show, said kindly
        .sy-alert  --success --warning --danger --info
        .sy-tiles / .sy-tile             big shortcut buttons (thumb-sized)
        .sy-timeline                     steps of a request
        .sy-pager                        previous / next
        .sy-avatar                       initials in a circle
        .sy-form                         a custom page's form column
   =========================================================================== */

:root {
    --sy-canvas: color-mix(in oklch, var(--color-base-50) 82%, var(--color-primary-50));
    --sy-surface: #fff;
    --sy-surface-2: var(--color-base-50);
    --sy-surface-3: var(--color-base-100);
    --sy-border: var(--color-base-200);
    --sy-border-soft: color-mix(in oklch, var(--color-base-200) 60%, transparent);
    --sy-text: var(--color-base-900);
    --sy-text-2: var(--color-base-700);
    --sy-muted: var(--color-base-500);
    --sy-ring: color-mix(in oklch, var(--color-primary-500) 35%, transparent);

    --sy-radius: 14px;
    --sy-radius-sm: 10px;
    --sy-radius-xs: 7px;

    --sy-shadow-xs: 0 1px 2px rgb(15 23 42 / 0.05);
    --sy-shadow-sm: 0 1px 3px rgb(15 23 42 / 0.06), 0 1px 2px rgb(15 23 42 / 0.04);
    --sy-shadow: 0 4px 14px -4px rgb(15 23 42 / 0.10), 0 2px 4px -2px rgb(15 23 42 / 0.05);
    --sy-shadow-lg: 0 16px 32px -12px rgb(15 23 42 / 0.18);

    /* Status colours: background, text, border */
    --sy-success-bg: oklch(96.2% 0.044 156.7);
    --sy-success-fg: oklch(44.8% 0.119 151.3);
    --sy-success-bd: oklch(87.1% 0.09 154.4);
    --sy-warning-bg: oklch(96.2% 0.059 95.6);
    --sy-warning-fg: oklch(47.3% 0.137 46.2);
    --sy-warning-bd: oklch(87.9% 0.115 85.2);
    --sy-danger-bg: oklch(95.8% 0.024 17.7);
    --sy-danger-fg: oklch(50.5% 0.213 27.5);
    --sy-danger-bd: oklch(88.5% 0.062 18.3);
    --sy-info-bg: oklch(95.1% 0.026 236.8);
    --sy-info-fg: oklch(48.8% 0.143 241.9);
    --sy-info-bd: oklch(86.5% 0.065 236.8);
    --sy-violet-bg: oklch(94.3% 0.029 294.6);
    --sy-violet-fg: oklch(49.1% 0.21 292.6);
    --sy-violet-bd: oklch(87% 0.065 292.7);
    --sy-neutral-bg: var(--color-base-100);
    --sy-neutral-fg: var(--color-base-600);
    --sy-neutral-bd: var(--color-base-200);
}

.dark {
    --sy-canvas: var(--color-base-950);
    --sy-surface: var(--color-base-900);
    --sy-surface-2: color-mix(in oklch, var(--color-base-900) 70%, var(--color-base-800));
    --sy-surface-3: var(--color-base-800);
    --sy-border: var(--color-base-800);
    --sy-border-soft: color-mix(in oklch, var(--color-base-800) 70%, transparent);
    --sy-text: var(--color-base-100);
    --sy-text-2: var(--color-base-300);
    --sy-muted: var(--color-base-400);
    --sy-ring: color-mix(in oklch, var(--color-primary-400) 40%, transparent);

    --sy-shadow-xs: 0 1px 2px rgb(0 0 0 / 0.3);
    --sy-shadow-sm: 0 1px 3px rgb(0 0 0 / 0.35);
    --sy-shadow: 0 6px 16px -6px rgb(0 0 0 / 0.5);
    --sy-shadow-lg: 0 18px 36px -12px rgb(0 0 0 / 0.6);

    --sy-success-bg: oklch(39.3% 0.095 152.5 / 0.35);
    --sy-success-fg: oklch(84.5% 0.143 164.98);
    --sy-success-bd: oklch(52.7% 0.137 150.07 / 0.5);
    --sy-warning-bg: oklch(41.4% 0.112 45.9 / 0.35);
    --sy-warning-fg: oklch(87.9% 0.169 91.6);
    --sy-warning-bd: oklch(55.5% 0.163 48.998 / 0.5);
    --sy-danger-bg: oklch(39.6% 0.141 25.7 / 0.35);
    --sy-danger-fg: oklch(80.8% 0.114 19.6);
    --sy-danger-bd: oklch(50.5% 0.213 27.5 / 0.5);
    --sy-info-bg: oklch(39.1% 0.09 240.9 / 0.35);
    --sy-info-fg: oklch(82.8% 0.111 230.3);
    --sy-info-bd: oklch(50% 0.134 242.7 / 0.5);
    --sy-violet-bg: oklch(38% 0.189 293.7 / 0.35);
    --sy-violet-fg: oklch(81.1% 0.111 293.6);
    --sy-violet-bd: oklch(49.1% 0.27 292.6 / 0.5);
    --sy-neutral-bg: var(--color-base-800);
    --sy-neutral-fg: var(--color-base-300);
    --sy-neutral-bd: var(--color-base-700);
}

/* ===========================================================================
   1. The shell
   =========================================================================== */

/* --- Canvas and header -------------------------------------------------------------------------------------- */

#main {
    background: var(--sy-canvas);
}

#main > .border-b:first-child {
    backdrop-filter: saturate(1.4) blur(8px);
    background: color-mix(in oklch, var(--sy-surface) 88%, transparent);
    border-color: var(--sy-border-soft);
    box-shadow: var(--sy-shadow-xs);
    position: sticky;
    top: 0;
}

#header-inner h1 {
    color: var(--sy-text);
    font-size: 1.05rem;
    font-weight: 700;
}

/* --- Sidebar ------------------------------------------------------------------------------------------------- */

#nav-sidebar,
#nav-sidebar-inner {
    background: var(--sy-surface) !important;
    border-color: var(--sy-border-soft) !important;
}

#nav-sidebar-inner > div:first-child {
    border-color: var(--sy-border-soft);
}

/* Group headings: quieter, with room between groups */
#nav-sidebar-inner h2 {
    border-radius: var(--sy-radius-sm);
    color: var(--sy-text-2);
    font-size: 0.86rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#nav-sidebar-inner h2:hover {
    background: var(--sy-surface-2);
}

#nav-sidebar-inner h2 > .material-symbols-outlined:first-child {
    align-items: center;
    background: var(--color-primary-50);
    border-radius: 8px;
    color: var(--color-primary-700);
    display: inline-flex;
    font-size: 17px;
    height: 28px;
    justify-content: center;
    margin-inline-end: 0.65rem;
    width: 28px;
}

.dark #nav-sidebar-inner h2 > .material-symbols-outlined:first-child {
    background: color-mix(in oklch, var(--color-primary-500) 18%, transparent);
    color: var(--color-primary-300);
}

/* Links under a group: indented under the heading with a hairline guide */
#nav-sidebar-inner ol {
    border-inline-start: 1px solid var(--sy-border);
    gap: 2px;
    margin-inline-start: 2.05rem;
    padding-inline: 0.6rem 1rem;
}

#nav-sidebar-inner ol a {
    border-radius: var(--sy-radius-xs);
    color: var(--sy-text-2);
    height: 36px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#nav-sidebar-inner ol a:hover {
    background: var(--sy-surface-2);
    color: var(--color-primary-700);
}

/* The page you are on */
#nav-sidebar-inner ol a.font-semibold {
    background: var(--color-primary-50) !important;
    box-shadow: inset -3px 0 0 var(--color-primary-600);
    color: var(--color-primary-700) !important;
}

.dark #nav-sidebar-inner ol a:hover {
    color: var(--color-primary-300);
}

.dark #nav-sidebar-inner ol a.font-semibold {
    background: color-mix(in oklch, var(--color-primary-500) 16%, transparent) !important;
    color: var(--color-primary-300) !important;
}

/* The sidebar's search box */
#nav-sidebar-inner .shadow-xs {
    border-color: var(--sy-border);
    border-radius: var(--sy-radius-sm);
    box-shadow: none;
}

/* --- Messages ------------------------------------------------------------------------------------------------ */

#main div.py-3.bg-green-100,
#main div.py-3.bg-red-100,
#main div.py-3.bg-orange-100,
#main div.py-3.bg-blue-100 {
    border: 1px solid;
    border-inline-start-width: 4px;
    border-radius: var(--sy-radius-sm);
    box-shadow: var(--sy-shadow-xs);
    font-weight: 500;
    padding: 0.8rem 1rem;
}

#main div.py-3.bg-green-100 {
    background: var(--sy-success-bg);
    border-color: var(--sy-success-bd);
    color: var(--sy-success-fg);
}

#main div.py-3.bg-red-100 {
    background: var(--sy-danger-bg);
    border-color: var(--sy-danger-bd);
    color: var(--sy-danger-fg);
}

#main div.py-3.bg-orange-100 {
    background: var(--sy-warning-bg);
    border-color: var(--sy-warning-bd);
    color: var(--sy-warning-fg);
}

#main div.py-3.bg-blue-100 {
    background: var(--sy-info-bg);
    border-color: var(--sy-info-bd);
    color: var(--sy-info-fg);
}

/* --- Lists (change lists) ------------------------------------------------------------------------------------ */

/* The search-and-filters bar and the table read as one card */
#changelist-form .lg\:border.lg\:rounded-b-default,
#changelist-form .lg\:border.lg\:rounded-default {
    background: var(--sy-surface);
}

@media (min-width: 1024px) {
    #changelist .overflow-x-auto.lg\:border {
        border-color: var(--sy-border) !important;
        border-radius: 0 0 var(--sy-radius) var(--sy-radius);
        box-shadow: var(--sy-shadow-sm) !important;
    }

    #changelist .overflow-x-auto.lg\:rounded-default {
        border-radius: var(--sy-radius);
    }

    #result_list thead th {
        background: var(--sy-surface-2);
        color: var(--sy-muted);
        font-size: 0.8rem;
        font-weight: 600;
        padding-bottom: 0.7rem;
        padding-top: 0.7rem;
    }

    #result_list thead th a {
        color: inherit;
    }

    #result_list tbody tr td,
    #result_list tbody tr th {
        border-color: var(--sy-border-soft);
    }

    #result_list > tbody {
        background: transparent !important;
    }

    #result_list > tbody:hover {
        background: color-mix(in oklch, var(--color-primary-50) 70%, transparent) !important;
        box-shadow: none !important;
    }

    .dark #result_list > tbody:hover {
        background: color-mix(in oklch, var(--color-primary-500) 8%, transparent) !important;
    }

    /* The first column links to the record: make it read as the record's name */
    #result_list tbody th a,
    #result_list tbody td:nth-child(2) > a {
        color: var(--color-primary-700);
        font-weight: 600;
    }

    .dark #result_list tbody th a,
    .dark #result_list tbody td:nth-child(2) > a {
        color: var(--color-primary-300);
    }
}

/* The toolbar above a list (search box and «فیلترها») */
#changelist .flex.flex-col.gap-4.mb-4,
#changelist #toolbar {
    gap: 0.75rem;
}

#changelist #searchbar,
#changelist input[type="search"] {
    border-radius: var(--sy-radius-sm);
}

/* Filter side sheet */
#changelist-filter > div {
    border-radius: var(--sy-radius) 0 0 var(--sy-radius);
}

/* The pagination footer: a soft bar that matches the canvas */
#main > div.relative.z-40:last-child,
#main > div.lg\:sticky {
    border-color: var(--sy-border-soft) !important;
}

/* Phones: each row is a card */
@media (max-width: 1023.98px) {
    #result_list > tbody > tr {
        background: var(--sy-surface);
        border-color: var(--sy-border) !important;
        border-radius: var(--sy-radius) !important;
        box-shadow: var(--sy-shadow-sm) !important;
        overflow: hidden;
    }
}

/* --- Forms (change forms) ------------------------------------------------------------------------------------ */

/* A fieldset's rows sit on a white card */
fieldset.module > .aligned,
fieldset.module > div.border.rounded-default {
    background: var(--sy-surface);
    border-color: var(--sy-border) !important;
    border-radius: var(--sy-radius) !important;
    box-shadow: var(--sy-shadow-sm) !important;
}

fieldset.module .field-line {
    border-color: var(--sy-border-soft);
}

/* A fieldset's own title (one shown without tabs) */
fieldset.module > h2 {
    background: transparent !important;
    color: var(--sy-text);
    font-size: 0.95rem;
    padding-inline: 0.25rem !important;
}

/* Field labels and help */
.field-line label,
.form-row label.required,
.form-row label {
    color: var(--sy-text-2);
}

/* Tabs: a segmented control on a tinted rail */
#content ul:has(+ .tab-wrapper),
#content .tab-list > nav {
    background: color-mix(in oklch, var(--sy-surface-3) 80%, transparent) !important;
    border: 1px solid var(--sy-border-soft);
    border-radius: var(--sy-radius-sm) !important;
    padding: 4px !important;
}

#content ul:has(+ .tab-wrapper) > li > a,
#content .tab-list > nav > a {
    border-radius: 8px !important;
    color: var(--sy-text-2);
    font-weight: 500;
    padding: 0.45rem 0.9rem !important;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

#content ul:has(+ .tab-wrapper) > li > a:hover,
#content .tab-list > nav > a:hover {
    color: var(--color-primary-700);
}

#content ul:has(+ .tab-wrapper) > li > a.bg-white,
#content .tab-list > nav > a.active {
    background: var(--sy-surface) !important;
    box-shadow: var(--sy-shadow-xs), 0 0 0 1px var(--sy-border-soft);
    color: var(--color-primary-700) !important;
    font-weight: 700;
}

.dark #content ul:has(+ .tab-wrapper) > li > a.bg-white,
.dark #content .tab-list > nav > a.active {
    color: var(--color-primary-300) !important;
}

/* The page's action buttons (history, custom actions) */
.tab-list > ul > li {
    background: var(--sy-surface);
}

.tab-list > ul {
    border-radius: var(--sy-radius-sm);
    box-shadow: var(--sy-shadow-xs);
}

/* Inline tables inside a form */
.inline-group .tabular-table,
.inline-group table {
    background: var(--sy-surface);
}

.inline-group > .tabular > div.border,
.inline-group .overflow-x-auto.border {
    border-color: var(--sy-border) !important;
    border-radius: var(--sy-radius) !important;
    box-shadow: var(--sy-shadow-sm);
}

.inline-group thead th {
    background: var(--sy-surface-2);
    color: var(--sy-muted);
    font-size: 0.8rem;
}

/* The save bar: floats above the page with a frosted look */
#submit-row,
.submit-row {
    gap: 0.5rem;
}

/* --- Inputs and buttons (everywhere) ------------------------------------------------------------------------- */

#main input[type="text"],
#main input[type="search"],
#main input[type="email"],
#main input[type="number"],
#main input[type="password"],
#main input[type="url"],
#main input[type="tel"],
#main textarea,
#main select {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#main input[type="text"]:focus,
#main input[type="search"]:focus,
#main input[type="email"]:focus,
#main input[type="number"]:focus,
#main input[type="password"]:focus,
#main input[type="url"]:focus,
#main input[type="tel"]:focus,
#main textarea:focus,
#main select:focus {
    border-color: var(--color-primary-500) !important;
    box-shadow: 0 0 0 3px var(--sy-ring) !important;
    outline: none !important;
}

/* Unfold's primary buttons */
#main button.bg-primary-600,
#main a.bg-primary-600,
#main input[type="submit"].bg-primary-600 {
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.08), inset 0 1px 0 rgb(255 255 255 / 0.12);
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

#main button.bg-primary-600:hover,
#main a.bg-primary-600:hover,
#main input[type="submit"].bg-primary-600:hover {
    background-color: var(--color-primary-700);
    box-shadow: 0 4px 12px -4px color-mix(in oklch, var(--color-primary-600) 60%, transparent);
}

#main button.bg-primary-600:active,
#main a.bg-primary-600:active {
    transform: translateY(1px);
}

/* --- Sign-in page -------------------------------------------------------------------------------------------- */

/*
   The sign-in form (templates/admin/login.html) and the steps around it -- the SMS code, the forgotten password,
   activation (account/templates/account/sign_in_step.html): one centred card on a soft green canvas.

     .sy-auth                         the column: the card, clear of the theme switch above it
     .sy-auth-card                    the card, with a thin band of the company green along its top
     .sy-auth-brand (__logo __welcome __name, --small)   the configured logo and the project's name
     .sy-auth-step (__icon)           a step's icon, title and explanation
     .sy-auth-title / .sy-auth-lead
     .sy-auth-actions                 the full-width buttons under a form
*/

body.login #page,
body.login {
    background:
        radial-gradient(1100px 560px at 100% 0%, color-mix(in oklch, var(--color-primary-200) 60%, transparent), transparent 62%),
        radial-gradient(900px 520px at 0% 100%, color-mix(in oklch, var(--color-primary-300) 30%, transparent), transparent 60%),
        var(--sy-canvas);
}

.dark body.login #page,
.dark body.login {
    background:
        radial-gradient(1100px 560px at 100% 0%, color-mix(in oklch, var(--color-primary-800) 30%, transparent), transparent 62%),
        radial-gradient(900px 520px at 0% 100%, color-mix(in oklch, var(--color-primary-900) 35%, transparent), transparent 60%),
        var(--sy-canvas);
}

body.login .sy-auth {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Unfold's theme switch and «return to site» sit at the top of the page, over whatever is there on a phone */
    padding-block: 4.5rem 2.5rem;
}

body.login .sy-auth-card {
    background: var(--sy-surface);
    border: 1px solid var(--sy-border-soft);
    border-radius: 20px;
    box-shadow: var(--sy-shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow: hidden;
    padding: 2.1rem 1.75rem 1.75rem;
    position: relative;
}

body.login .sy-auth-card::before {
    background: linear-gradient(90deg, var(--color-primary-400), var(--color-primary-700));
    content: '';
    height: 4px;
    inset: 0 0 auto;
    position: absolute;
}

body.login .sy-auth-brand {
    align-items: center;
    border-bottom: 1px dashed var(--sy-border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    text-align: center;
}

body.login .sy-auth-brand__logo {
    display: block;
    height: auto;
    max-height: 72px;
    max-width: 200px;
    object-fit: contain;
    width: auto;
}

body.login .sy-auth-brand__name {
    color: var(--sy-text);
    display: flex;
    flex-direction: column;
    font-size: 1.2rem;
    font-weight: 800;
    gap: 0.15rem;
    line-height: 1.6;
    margin: 0;
}

body.login .sy-auth-brand__welcome {
    color: var(--sy-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* On a step page the brand is a quieter line above the step itself */
body.login .sy-auth-brand--small {
    flex-direction: row;
    gap: 0.6rem;
    justify-content: center;
    padding-bottom: 1rem;
}

body.login .sy-auth-brand--small .sy-auth-brand__logo {
    max-height: 34px;
    max-width: 110px;
}

body.login .sy-auth-brand--small .sy-auth-brand__name {
    color: var(--sy-text-2);
    font-size: 0.9rem;
    font-weight: 700;
}

body.login .sy-auth-step {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

body.login .sy-auth-step__icon {
    align-items: center;
    background: var(--color-primary-50);
    border: 1px solid var(--color-primary-100);
    border-radius: 50%;
    color: var(--color-primary-700);
    display: inline-flex;
    font-size: 26px !important;
    height: 54px;
    justify-content: center;
    margin-bottom: 0.25rem;
    width: 54px;
}

.dark body.login .sy-auth-step__icon {
    background: color-mix(in oklch, var(--color-primary-500) 18%, transparent);
    border-color: color-mix(in oklch, var(--color-primary-500) 30%, transparent);
    color: var(--color-primary-300);
}

body.login .sy-auth-title {
    color: var(--sy-text);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.6;
    margin: 0;
}

body.login .sy-auth-lead {
    color: var(--sy-muted);
    font-size: 0.875rem;
    line-height: 1.9;
    margin: 0;
}

body.login .sy-auth-card .sy-alert {
    font-size: 0.85rem;
    line-height: 1.8;
}

/* The boxes: taller and at 16px, so a thumb hits them and a phone does not zoom the page into a smaller box */
body.login .sy-auth-card label {
    font-size: 0.85rem;
}

body.login .sy-auth-card input:is([type="text"], [type="password"], [type="email"], [type="tel"], [type="number"]) {
    border-color: var(--sy-border);
    border-radius: var(--sy-radius-sm);
    font-size: 1rem;
    min-height: 46px;
    padding-inline: 0.85rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.login .sy-auth-card input:is([type="text"], [type="password"], [type="email"], [type="tel"], [type="number"]):focus {
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px var(--sy-ring);
    outline: none;
}

body.login .sy-auth-card .errors input {
    border-color: var(--sy-danger-fg);
}

/* The SMS code reads as one spaced number */
body.login .sy-auth-card input[autocomplete="one-time-code"] {
    font-size: 1.3rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.35em;
    text-align: center;
}

body.login .sy-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

body.login .sy-auth-actions form {
    display: contents;
}

body.login .sy-auth .sy-btn {
    font-size: 0.95rem;
    min-height: 46px;
    white-space: normal;
}

@media (max-width: 639.98px) {
    body.login .sy-auth {
        padding-block: 4rem 1.5rem;
    }

    body.login .sy-auth-card {
        border-radius: 18px;
        padding: 1.75rem 1.15rem 1.25rem;
    }
}

/* ===========================================================================
   2. Components (custom pages and home-page widgets)
   =========================================================================== */

/* --- Page head ----------------------------------------------------------------------------------------------- */

.sy-page-head {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    justify-content: space-between;
}

.sy-page-head__text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.sy-page-head__title {
    color: var(--sy-text);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.5;
    margin: 0;
}

.sy-page-head__lead {
    color: var(--sy-muted);
    font-size: 0.9rem;
    margin: 0;
}

.sy-page-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* The home page's welcome band */
.sy-hero {
    background:
        radial-gradient(500px 220px at 0% 0%, color-mix(in oklch, var(--color-primary-200) 55%, transparent), transparent 70%),
        linear-gradient(135deg, var(--color-primary-600), var(--color-primary-800));
    border-radius: 20px;
    box-shadow: 0 18px 36px -18px color-mix(in oklch, var(--color-primary-700) 70%, transparent);
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    justify-content: space-between;
    overflow: hidden;
    padding: 1.5rem 1.75rem;
    position: relative;
}

.sy-hero::after {
    background: rgb(255 255 255 / 0.07);
    border-radius: 50%;
    content: '';
    height: 260px;
    inset-inline-start: -60px;
    position: absolute;
    top: -120px;
    width: 260px;
}

.sy-hero__title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
}

.sy-hero__lead {
    margin: 0;
    opacity: 0.92;
}

.sy-hero__chips {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    position: relative;
    z-index: 1;
}

.sy-hero__chip {
    background: rgb(255 255 255 / 0.16);
    border: 1px solid rgb(255 255 255 / 0.22);
    border-radius: 999px;
    font-size: 0.8rem;
    padding: 0.2rem 0.75rem;
}

/* --- Grids --------------------------------------------------------------------------------------------------- */

.sy-grid {
    display: grid;
    gap: 1rem;
    /* A card across the whole row would leave a hole before it; later cards fill it */
    grid-auto-flow: dense;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.sy-grid--stats {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}

.sy-grid--2 {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
}

.sy-span-all {
    grid-column: 1 / -1;
}

.sy-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sy-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sy-section-title {
    align-items: center;
    color: var(--sy-text);
    display: flex;
    font-size: 1rem;
    font-weight: 700;
    gap: 0.5rem;
    margin: 0.5rem 0 0;
}

/* --- Card ---------------------------------------------------------------------------------------------------- */

.sy-card {
    background: var(--sy-surface);
    border: 1px solid var(--sy-border-soft);
    border-radius: var(--sy-radius);
    box-shadow: var(--sy-shadow-sm);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sy-card--hover:hover,
a.sy-card:hover {
    border-color: color-mix(in oklch, var(--color-primary-300) 60%, var(--sy-border));
    box-shadow: var(--sy-shadow);
}

.sy-card__head {
    align-items: center;
    border-bottom: 1px solid var(--sy-border-soft);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
}

.sy-card__title {
    align-items: center;
    color: var(--sy-text);
    display: flex;
    font-size: 0.95rem;
    font-weight: 700;
    gap: 0.55rem;
    margin: 0;
    min-width: 0;
}

.sy-card__title .material-symbols-outlined {
    align-items: center;
    background: var(--color-primary-50);
    border-radius: 9px;
    color: var(--color-primary-700);
    display: inline-flex;
    flex: none;
    font-size: 18px;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.dark .sy-card__title .material-symbols-outlined {
    background: color-mix(in oklch, var(--color-primary-500) 18%, transparent);
    color: var(--color-primary-300);
}

.sy-card__body {
    color: var(--sy-text-2);
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
}

.sy-card__foot {
    border-top: 1px solid var(--sy-border-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 0.75rem 1.1rem;
}

.sy-card__link {
    color: var(--color-primary-700);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.sy-card__link:hover {
    text-decoration: underline;
}

.dark .sy-card__link {
    color: var(--color-primary-300);
}

/* --- Stat tile ----------------------------------------------------------------------------------------------- */

.sy-stat {
    align-items: center;
    background: var(--sy-surface);
    border: 1px solid var(--sy-border-soft);
    border-radius: var(--sy-radius);
    box-shadow: var(--sy-shadow-sm);
    color: inherit;
    display: flex;
    gap: 0.9rem;
    min-width: 0;
    padding: 1rem 1.1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

a.sy-stat:hover {
    border-color: color-mix(in oklch, var(--color-primary-300) 60%, var(--sy-border));
    box-shadow: var(--sy-shadow);
    transform: translateY(-1px);
}

.sy-stat__icon {
    align-items: center;
    background: var(--color-primary-50);
    border-radius: 12px;
    color: var(--color-primary-700);
    display: inline-flex;
    flex: none;
    font-size: 24px !important;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.sy-stat--warning .sy-stat__icon { background: var(--sy-warning-bg); color: var(--sy-warning-fg); }
.sy-stat--danger .sy-stat__icon { background: var(--sy-danger-bg); color: var(--sy-danger-fg); }
.sy-stat--info .sy-stat__icon { background: var(--sy-info-bg); color: var(--sy-info-fg); }
.sy-stat--violet .sy-stat__icon { background: var(--sy-violet-bg); color: var(--sy-violet-fg); }

.dark .sy-stat__icon {
    background: color-mix(in oklch, var(--color-primary-500) 18%, transparent);
    color: var(--color-primary-300);
}

.sy-stat__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sy-stat__title {
    color: var(--sy-text-2);
    font-size: 0.82rem;
    font-weight: 700;
}

.sy-stat__value {
    color: var(--sy-text);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.35;
}

.sy-stat__label {
    color: var(--sy-muted);
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.6;
}

.sy-stat__hint {
    color: var(--sy-warning-fg);
    font-size: 0.75rem;
    font-weight: 600;
}

/* --- Badge --------------------------------------------------------------------------------------------------- */

.sy-badge {
    align-items: center;
    background: var(--sy-neutral-bg);
    border: 1px solid var(--sy-neutral-bd);
    border-radius: 999px;
    color: var(--sy-neutral-fg);
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.3rem;
    line-height: 1.6;
    padding: 0 0.6rem;
    white-space: nowrap;
}

.sy-badge::before {
    background: currentColor;
    border-radius: 50%;
    content: '';
    height: 6px;
    opacity: 0.85;
    width: 6px;
}

.sy-badge--plain::before { display: none; }
.sy-badge--success { background: var(--sy-success-bg); border-color: var(--sy-success-bd); color: var(--sy-success-fg); }
.sy-badge--warning { background: var(--sy-warning-bg); border-color: var(--sy-warning-bd); color: var(--sy-warning-fg); }
.sy-badge--danger { background: var(--sy-danger-bg); border-color: var(--sy-danger-bd); color: var(--sy-danger-fg); }
.sy-badge--info { background: var(--sy-info-bg); border-color: var(--sy-info-bd); color: var(--sy-info-fg); }
.sy-badge--violet { background: var(--sy-violet-bg); border-color: var(--sy-violet-bd); color: var(--sy-violet-fg); }
.sy-badge--primary {
    background: var(--color-primary-50);
    border-color: var(--color-primary-200);
    color: var(--color-primary-700);
}

.dark .sy-badge--primary {
    background: color-mix(in oklch, var(--color-primary-500) 18%, transparent);
    border-color: color-mix(in oklch, var(--color-primary-500) 35%, transparent);
    color: var(--color-primary-300);
}

/* --- Buttons ------------------------------------------------------------------------------------------------- */

.sy-btn {
    align-items: center;
    background: var(--sy-surface);
    border: 1px solid var(--sy-border);
    border-radius: var(--sy-radius-sm);
    box-shadow: var(--sy-shadow-xs);
    color: var(--sy-text);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 600;
    gap: 0.4rem;
    justify-content: center;
    line-height: 1.5;
    min-height: 40px;
    padding: 0.45rem 1rem;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.sy-btn:hover {
    background: var(--sy-surface-2);
    border-color: var(--color-base-300);
}

.sy-btn:focus-visible {
    box-shadow: 0 0 0 3px var(--sy-ring);
    outline: none;
}

.sy-btn .material-symbols-outlined {
    font-size: 19px;
}

.sy-btn--primary {
    background: var(--color-primary-600);
    border-color: var(--color-primary-600);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.08), inset 0 1px 0 rgb(255 255 255 / 0.14);
    color: #fff;
}

.sy-btn--primary:hover {
    background: var(--color-primary-700);
    border-color: var(--color-primary-700);
    box-shadow: 0 6px 14px -6px color-mix(in oklch, var(--color-primary-600) 70%, transparent);
    color: #fff;
}

.sy-btn--danger {
    background: var(--sy-surface);
    border-color: var(--sy-danger-bd);
    color: var(--sy-danger-fg);
}

.sy-btn--danger:hover {
    background: var(--sy-danger-bg);
    border-color: var(--sy-danger-fg);
}

.sy-btn--ghost {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: var(--color-primary-700);
}

.sy-btn--ghost:hover {
    background: var(--color-primary-50);
    border-color: transparent;
}

.dark .sy-btn--ghost { color: var(--color-primary-300); }
.dark .sy-btn--ghost:hover { background: color-mix(in oklch, var(--color-primary-500) 14%, transparent); }

.sy-btn--sm {
    font-size: 0.8rem;
    min-height: 32px;
    padding: 0.25rem 0.7rem;
}

.sy-btn--block {
    width: 100%;
}

.sy-btn[disabled],
.sy-btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.55;
}

/* --- Toolbar and plain inputs -------------------------------------------------------------------------------- */

.sy-toolbar {
    align-items: center;
    background: var(--sy-surface);
    border: 1px solid var(--sy-border-soft);
    border-radius: var(--sy-radius);
    box-shadow: var(--sy-shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem;
}

.sy-toolbar > * {
    min-width: 0;
}

.sy-toolbar__grow {
    flex: 1 1 12rem;
}

.sy-input,
.sy-select {
    background: var(--sy-surface);
    border: 1px solid var(--sy-border);
    border-radius: var(--sy-radius-sm);
    color: var(--sy-text);
    font-size: 0.875rem;
    min-height: 40px;
    padding: 0.4rem 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sy-input::placeholder {
    color: var(--sy-muted);
}

.sy-input:focus,
.sy-select:focus {
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px var(--sy-ring);
    outline: none;
}

.sy-select {
    padding-inline-end: 2rem;
}

/* --- Definition list ----------------------------------------------------------------------------------------- */

.sy-dl {
    display: grid;
    gap: 0.6rem 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    margin: 0;
}

.sy-dl > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.sy-dl dt {
    color: var(--sy-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.sy-dl dd {
    color: var(--sy-text);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    overflow-wrap: anywhere;
}

/* --- Lists --------------------------------------------------------------------------------------------------- */

.sy-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sy-list__item {
    align-items: center;
    border-bottom: 1px dashed var(--sy-border);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    min-width: 0;
    padding: 0.55rem 0;
}

.sy-list__item:last-child {
    border-bottom: 0;
}

.sy-list__item:first-child {
    padding-top: 0;
}

.sy-list__main {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.sy-list__title {
    color: var(--sy-text);
    font-size: 0.875rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

a.sy-list__title:hover {
    color: var(--color-primary-700);
}

.sy-list__meta {
    color: var(--sy-muted);
    font-size: 0.78rem;
}

/* --- Table --------------------------------------------------------------------------------------------------- */

.sy-table-wrap {
    border: 1px solid var(--sy-border-soft);
    border-radius: var(--sy-radius);
    box-shadow: var(--sy-shadow-sm);
    overflow-x: auto;
}

.sy-table {
    background: var(--sy-surface);
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
    width: 100%;
}

.sy-table th {
    background: var(--sy-surface-2);
    color: var(--sy-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.65rem 0.9rem;
    text-align: start;
    white-space: nowrap;
}

.sy-table td {
    border-top: 1px solid var(--sy-border-soft);
    color: var(--sy-text-2);
    padding: 0.65rem 0.9rem;
    vertical-align: middle;
}

.sy-table tbody tr:hover td {
    background: color-mix(in oklch, var(--color-primary-50) 60%, transparent);
}

.dark .sy-table tbody tr:hover td {
    background: color-mix(in oklch, var(--color-primary-500) 7%, transparent);
}

.sy-table td.sy-num,
.sy-table th.sy-num {
    font-variant-numeric: tabular-nums;
    text-align: end;
}

.sy-table tfoot td {
    background: var(--sy-surface-2);
    font-weight: 700;
}

.sy-card .sy-table-wrap {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* --- Empty state --------------------------------------------------------------------------------------------- */

.sy-empty {
    align-items: center;
    color: var(--sy-muted);
    display: flex;
    flex-direction: column;
    font-size: 0.875rem;
    gap: 0.4rem;
    padding: 1.25rem 0.5rem;
    text-align: center;
}

.sy-empty .material-symbols-outlined {
    color: var(--color-base-300);
    font-size: 34px;
}

.dark .sy-empty .material-symbols-outlined {
    color: var(--color-base-600);
}

.sy-empty--inline {
    align-items: flex-start;
    flex-direction: row;
    padding: 0;
    text-align: start;
}

/* --- Alerts -------------------------------------------------------------------------------------------------- */

.sy-alert {
    align-items: flex-start;
    background: var(--sy-neutral-bg);
    border: 1px solid var(--sy-neutral-bd);
    border-inline-start-width: 4px;
    border-radius: var(--sy-radius-sm);
    color: var(--sy-text-2);
    display: flex;
    font-size: 0.875rem;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
}

.sy-alert .material-symbols-outlined {
    font-size: 20px;
}

.sy-alert--success { background: var(--sy-success-bg); border-color: var(--sy-success-bd); color: var(--sy-success-fg); }
.sy-alert--warning { background: var(--sy-warning-bg); border-color: var(--sy-warning-bd); color: var(--sy-warning-fg); }
.sy-alert--danger { background: var(--sy-danger-bg); border-color: var(--sy-danger-bd); color: var(--sy-danger-fg); }
.sy-alert--info { background: var(--sy-info-bg); border-color: var(--sy-info-bd); color: var(--sy-info-fg); }

.sy-alert ul {
    margin: 0;
    padding-inline-start: 1.1rem;
}

/* --- Shortcut tiles ------------------------------------------------------------------------------------------ */

.sy-tiles {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
}

.sy-tile {
    align-items: center;
    background: var(--sy-surface-2);
    border: 1px solid var(--sy-border-soft);
    border-radius: var(--sy-radius-sm);
    color: var(--sy-text-2);
    display: flex;
    font-size: 0.85rem;
    font-weight: 600;
    gap: 0.55rem;
    min-height: 46px;
    padding: 0.55rem 0.75rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sy-tile:hover {
    background: var(--color-primary-50);
    border-color: var(--color-primary-200);
    color: var(--color-primary-800);
    transform: translateY(-1px);
}

.dark .sy-tile:hover {
    background: color-mix(in oklch, var(--color-primary-500) 14%, transparent);
    border-color: color-mix(in oklch, var(--color-primary-500) 30%, transparent);
    color: var(--color-primary-200);
}

.sy-tile .material-symbols-outlined {
    color: var(--color-primary-600);
    flex: none;
    font-size: 20px;
}

.dark .sy-tile .material-symbols-outlined {
    color: var(--color-primary-400);
}

/* --- Timeline ------------------------------------------------------------------------------------------------ */

.sy-timeline {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sy-timeline > li {
    padding-bottom: 1rem;
    padding-inline-start: 1.6rem;
    position: relative;
}

.sy-timeline > li::before {
    background: var(--sy-border);
    bottom: 0;
    content: '';
    inset-inline-start: 0.42rem;
    position: absolute;
    top: 1.1rem;
    width: 2px;
}

.sy-timeline > li:last-child::before {
    display: none;
}

.sy-timeline > li::after {
    background: var(--sy-surface);
    border: 3px solid var(--color-primary-500);
    border-radius: 50%;
    content: '';
    height: 0.95rem;
    inset-inline-start: 0;
    position: absolute;
    top: 0.3rem;
    width: 0.95rem;
}

.sy-timeline > li.is-muted::after {
    border-color: var(--color-base-300);
}

/* --- Pager --------------------------------------------------------------------------------------------------- */

.sy-pager {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.sy-pager__info {
    color: var(--sy-muted);
    font-size: 0.85rem;
    padding: 0 0.5rem;
}

/* --- Avatar -------------------------------------------------------------------------------------------------- */

.sy-avatar {
    align-items: center;
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-700));
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: none;
    font-size: 0.85rem;
    font-weight: 700;
    height: 38px;
    justify-content: center;
    width: 38px;
}

/* --- A custom page's form ------------------------------------------------------------------------------------ */

.sy-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    max-width: 48rem;
}

.sy-form--wide {
    max-width: none;
}

.sy-form__actions {
    align-items: center;
    border-top: 1px solid var(--sy-border-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
}

.sy-help {
    color: var(--sy-muted);
    font-size: 0.8rem;
}

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

.sy-strong {
    color: var(--sy-text);
    font-weight: 700;
}

.sy-link {
    color: var(--color-primary-700);
    font-weight: 600;
}

.sy-link:hover {
    text-decoration: underline;
}

.dark .sy-link {
    color: var(--color-primary-300);
}

.sy-num {
    font-variant-numeric: tabular-nums;
}

/* A progress bar (balances, completed checklists) */
.sy-progress {
    background: var(--sy-surface-3);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.sy-progress > span {
    background: linear-gradient(90deg, var(--color-primary-400), var(--color-primary-600));
    border-radius: 999px;
    display: block;
    height: 100%;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sy-stat,
    .sy-tile,
    .sy-card,
    .sy-btn {
        transition: none;
    }

    a.sy-stat:hover,
    .sy-tile:hover {
        transform: none;
    }
}

/* --- A custom page's title ----------------------------------------------------------------------------------- */

.sy-page-head__title {
    align-items: center;
    display: flex;
    gap: 0.6rem;
}

.sy-page-head__icon {
    align-items: center;
    background: var(--color-primary-50);
    border-radius: 11px;
    color: var(--color-primary-700);
    display: inline-flex;
    font-size: 22px !important;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.dark .sy-page-head__icon {
    background: color-mix(in oklch, var(--color-primary-500) 18%, transparent);
    color: var(--color-primary-300);
}

.sy-page-head__actions:empty {
    display: none;
}

/* --- The approval inbox -------------------------------------------------------------------------------------- */

.sy-inbox-item {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.sy-inbox-item:has(input[name="requests"]:checked) {
    border-color: var(--color-primary-400);
    box-shadow: 0 0 0 3px var(--sy-ring), var(--sy-shadow-sm);
}

.sy-inbox-item__head {
    align-items: flex-start;
    display: flex;
    gap: 0.8rem;
    padding: 1rem 1.1rem 0.25rem;
}

.sy-inbox-item__check {
    accent-color: var(--color-primary-600);
    flex: none;
    height: 18px;
    margin-top: 0.6rem;
    width: 18px;
}

.sy-inbox-item__who {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.sy-inbox-item__title {
    color: var(--sy-text);
    font-size: 0.98rem;
    font-weight: 700;
}

.sy-inbox-item__title:hover {
    color: var(--color-primary-700);
}

.sy-decision-bar {
    background: color-mix(in oklch, var(--sy-surface) 92%, transparent);
    backdrop-filter: blur(8px);
    border: 1px solid var(--sy-border);
    border-radius: var(--sy-radius);
    bottom: 0.75rem;
    box-shadow: var(--sy-shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    z-index: 30;
}

/* On a wide screen the bar stays in view while the cards scroll; on a phone it would cover them */
@media (min-width: 1024px) {
    .sy-decision-bar {
        position: sticky;
    }
}

.sy-decision-bar__row {
    align-items: flex-end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) auto;
}

@media (max-width: 767.98px) {
    .sy-decision-bar__row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.sy-decision-bar textarea {
    min-height: 42px;
}

/* --- Codes in lists ------------------------------------------------------------------------------------------ */

/*
 * A cottage number («1405-3318-04») is a Latin code: in a right-to-left cell it wrapped and its hyphens moved to the
 * wrong side («-1405 / 3318-04»). It reads left to right on one line, wherever a list shows it.
 */
#result_list td.field-cottage_number,
#result_list td.field-cottage_number a {
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

/*
 * «بخش‌های حمل» on a laptop (1280px wide, the side menu open): with the cottage number on one line (above) and the
 * selection column every list has, its nine columns ran some 40px past the card and the last one was cut. Unfold
 * keeps a column title on one line, so the two yes/no columns were as wide as their titles («ترخیص و بارگیری»،
 * «اخذ رفع تعهد ارزی») while holding one mark each. Those two titles may take two lines; they do so only when the
 * table would otherwise not fit, and no other list is touched.
 */
body.model-shipment #result_list th.column-clearance_and_loading,
body.model-shipment #result_list th.column-currency_commitment_relieved {
    white-space: normal;
}
