﻿:root {
    --ts-bg: #f6f7f8;
    --ts-card: #ffffff;
    --ts-card-elevated: #ffffff;
    --ts-border: #e5e7eb;
    --ts-border-strong: #cfd6df;
    --ts-text: #111827;
    --ts-muted: #6b7280;
    --ts-link: #2563eb;
    --ts-link-hover: #1d4ed8;
    --ts-row-alt: #f2f3f5;
    --ts-row-hover: #e7e9ee;
    --ts-header-bg: #ffffff;
    --ts-header-border: #e5e7eb;
    --ts-subheader-bg: #f6f7f8;
    --ts-subheader-border: #eef0f2;
    --ts-subheader-separator: #c0c4c8;
    --ts-surface-soft: #eef1f5;
    --ts-surface-soft-hover: #e6eaf0;
    --ts-input-bg: #ffffff;
    --ts-table-head-bg: #ffffff;
    --ts-table-cell-border: rgba(229, 231, 235, 0.35);
    --ts-alert-danger-bg: #fdecec;
    --ts-alert-danger-border: #f7c2c2;
    --ts-alert-danger-text: #842029;
    --ts-alert-success-bg: #e8f7ee;
    --ts-alert-success-border: #bfe7cc;
    --ts-alert-success-text: #0f5132;
    --ts-status-green-bg: #e8f7ee;
    --ts-status-green-border: #bfe7cc;
    --ts-status-green-text: #0f5132;
    --ts-status-red-bg: #fdecec;
    --ts-status-red-border: #f7c2c2;
    --ts-status-red-text: #842029;
    --ts-status-gray-bg: #f3f4f6;
    --ts-status-gray-border: #e5e7eb;
    --ts-status-gray-text: #374151;
    color-scheme: light;
}

html[data-theme="dark"],
body.ts-theme-dark {
    --ts-bg: #111827;
    --ts-card: #1f2937;
    --ts-card-elevated: #243041;
    --ts-border: #374151;
    --ts-border-strong: #4b5563;
    --ts-text: #f3f4f6;
    --ts-muted: #9ca3af;
    --ts-link: #93c5fd;
    --ts-link-hover: #bfdbfe;
    --ts-row-alt: #253142;
    --ts-row-hover: #304055;
    --ts-header-bg: #0f172a;
    --ts-header-border: #1f2937;
    --ts-subheader-bg: #172033;
    --ts-subheader-border: #243041;
    --ts-subheader-separator: #4b5563;
    --ts-surface-soft: #243041;
    --ts-surface-soft-hover: #304055;
    --ts-input-bg: #111827;
    --ts-table-head-bg: #1b2433;
    --ts-table-cell-border: rgba(75, 85, 99, 0.45);
    --ts-alert-danger-bg: #3f1d1d;
    --ts-alert-danger-border: #7f1d1d;
    --ts-alert-danger-text: #fecaca;
    --ts-alert-success-bg: #163122;
    --ts-alert-success-border: #1f5a39;
    --ts-alert-success-text: #bbf7d0;
    --ts-status-green-bg: #163122;
    --ts-status-green-border: #1f5a39;
    --ts-status-green-text: #bbf7d0;
    --ts-status-red-bg: #3f1d1d;
    --ts-status-red-border: #7f1d1d;
    --ts-status-red-text: #fecaca;
    --ts-status-gray-bg: #243041;
    --ts-status-gray-border: #4b5563;
    --ts-status-gray-text: #e5e7eb;
    color-scheme: dark;
}

/* Base */
header {
    background: var(--ts-header-bg);
    border-bottom: 1px solid var(--ts-border);
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--ts-bg);
    color: var(--ts-text);
}

    body.ts-theme-dark {
        background: var(--ts-bg);
        color: var(--ts-text);
    }

        body.ts-theme-dark header {
            background: var(--ts-header-bg);
            border-bottom: 1px solid var(--ts-border);
        }

        body.ts-theme-dark .ts-main {
            background: var(--ts-bg);
            color: var(--ts-text);
        }

        body.ts-theme-dark .list-card,
        body.ts-theme-dark .status-card,
        body.ts-theme-dark .card,
        body.ts-theme-dark .modal-content,
        body.ts-theme-dark .detail-body,
        body.ts-theme-dark .list-card-body,
        body.ts-theme-dark .actions-body,
        body.ts-theme-dark .list-footer {
            background: var(--ts-card);
            color: var(--ts-text);
            border-color: var(--ts-border);
        }

        body.ts-theme-dark .list-header,
        body.ts-theme-dark .footer,
        body.ts-theme-dark .status-card-head,
        body.ts-theme-dark .list-table thead th,
        body.ts-theme-dark .list-table tbody td {
            border-color: var(--ts-border);
        }

        body.ts-theme-dark .list-title,
        body.ts-theme-dark .list-strong,
        body.ts-theme-dark .detail-label,
        body.ts-theme-dark .detail-section-title,
        body.ts-theme-dark .status-card-title,
        body.ts-theme-dark .status-strong,
        body.ts-theme-dark .status-row-title,
        body.ts-theme-dark .status-v,
        body.ts-theme-dark .ts-brand-text,
        body.ts-theme-dark .ts-user-link,
        body.ts-theme-dark .theme-current-badge {
            color: var(--ts-text);
        }

        body.ts-theme-dark .list-subtitle,
        body.ts-theme-dark .detail-help,
        body.ts-theme-dark .theme-help,
        body.ts-theme-dark .status-muted,
        body.ts-theme-dark .status-row-sub,
        body.ts-theme-dark .status-row-id,
        body.ts-theme-dark .status-row-right-sub,
        body.ts-theme-dark .status-k,
        body.ts-theme-dark .ts-trading-text,
        body.ts-theme-dark .ts-trading-age {
            color: var(--ts-muted);
        }

        body.ts-theme-dark .control-input,
        body.ts-theme-dark .control-select,
        body.ts-theme-dark .detail-input,
        body.ts-theme-dark .detail-select,
        body.ts-theme-dark textarea.detail-textarea,
        body.ts-theme-dark .form-control,
        body.ts-theme-dark .form-select {
            background: var(--ts-input-bg);
            color: var(--ts-text);
            border-color: var(--ts-border);
        }

        body.ts-theme-dark .control-button,
        body.ts-theme-dark .btn-outline-secondary,
        body.ts-theme-dark .theme-current-badge,
        body.ts-theme-dark .ts-theme-toggle {
            background: var(--ts-surface-soft);
            color: var(--ts-text);
            border-color: var(--ts-border-strong);
        }

            body.ts-theme-dark .control-button:hover,
            body.ts-theme-dark .btn-outline-secondary:hover,
            body.ts-theme-dark .ts-theme-toggle:hover {
                background: var(--ts-surface-soft-hover);
                color: var(--ts-text);
            }

        body.ts-theme-dark .list-table thead th {
            background: var(--ts-table-head-bg);
            color: var(--ts-text);
        }

        body.ts-theme-dark .list-table tbody td {
            color: var(--ts-text);
        }

        body.ts-theme-dark .list-table tbody tr:nth-child(even) {
            background: var(--ts-row-alt);
        }

        body.ts-theme-dark .list-table tbody tr:hover {
            background: var(--ts-row-hover);
        }

        body.ts-theme-dark .dropdown-menu {
            background: var(--ts-card);
            border-color: var(--ts-border);
        }

        body.ts-theme-dark .dropdown-item {
            color: var(--ts-text);
        }

            body.ts-theme-dark .dropdown-item:hover,
            body.ts-theme-dark .dropdown-item:focus {
                background: var(--ts-surface-soft);
                color: var(--ts-text);
            }

        body.ts-theme-dark .dropdown-header {
            color: var(--ts-muted);
        }

        body.ts-theme-dark .dropdown-divider,
        body.ts-theme-dark hr,
        body.ts-theme-dark .border,
        body.ts-theme-dark .border-top,
        body.ts-theme-dark .border-bottom {
            border-color: var(--ts-border) !important;
        }

/* Extra ruimte zodat de absolute footer niet “tegen” de pagina plakt */
.ts-main {
    padding-bottom: 20px;
}

/* Links */
a {
    text-decoration: none;
}

    a:hover {
        text-decoration: none;
    }

.ts-user-link {
    color: var(--ts-text);
    text-decoration: none;
}

    .ts-user-link:hover {
        color: var(--ts-text);
        text-decoration: none;
    }

/* ---------- LIST / DETAIL SHARED ---------- */

.list-page {
    padding: 0;
}

/* Header */
.list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 0;
    padding: 14px 0 16px 0;
    background: transparent;
    border-bottom: 1px solid var(--ts-border);
}

.list-title-block {
    min-width: 220px;
}

.list-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 650;
    color: var(--ts-text);
}

.list-subtitle {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--ts-muted);
}

.list-strong {
    font-weight: 700;
    color: var(--ts-text);
}

/* Header: force bottom alignment between title/subtitle and action buttons */
.ts-header-align-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.list-header-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

/* Controls */
.list-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.control-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.control-label {
    font-size: 0.84rem;
    color: var(--ts-muted);
    margin-right: 2px;
}

.control-input {
    height: 34px;
    width: 240px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--ts-border);
    background: var(--ts-input-bg);
    font-size: 0.92rem;
    outline: none;
}

    .control-input:focus {
        border-color: #cbd5e1;
        box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.35);
    }

.control-select {
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--ts-border);
    background: var(--ts-input-bg);
    font-size: 0.92rem;
}

.control-button {
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #cfd6df;
    background: var(--ts-surface-soft);
    color: #111827;
    font-size: 0.90rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

    .control-button:hover {
        background: var(--ts-surface-soft-hover);
    }

.control-primary {
    height: 34px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid #1d4ed8;
    background: #2563eb;
    color: #fff;
    font-size: 0.90rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

    .control-primary:hover {
        background: #1d4ed8;
    }

.control-right {
    margin-left: auto;
}

/* Card */
.list-card {
    margin-top: 14px;
    background: var(--ts-card);
    border: 1px solid var(--ts-border);
    border-radius: 12px;
    overflow: hidden;
}
    /* Space between card header divider and first detail row */
    .list-card .list-card-body .detail-grid {
        margin-top: 14px;
    }

/* Table */
.list-table {
    width: 100%;
    border-collapse: collapse;
}

    .list-table thead th {
        padding: 12px 12px;
        font-size: 0.86rem;
        font-weight: 700;
        color: #111827;
        border-bottom: 1px solid var(--ts-border);
        background: var(--ts-input-bg);
    }

    .list-table tbody td {
        padding: 12px 12px;
        font-size: 0.92rem;
        color: var(--ts-text);
        border-bottom: 1px solid var(--ts-table-cell-border);
    }

    .list-table tbody tr:nth-child(even) {
        background: var(--ts-row-alt);
    }

    .list-table tbody tr:hover {
        background: var(--ts-row-hover);
    }

.th-link {
    color: var(--ts-text);
    font-weight: 700;
}

    .th-link:hover {
        color: var(--ts-text);
    }

.td-link {
    color: var(--ts-link);
    font-weight: 600;
}

    .td-link:hover {
        color: var(--ts-link-hover);
    }

.text-right {
    text-align: right;
}

/* Pills */
.pill {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.pill-role {
    background: #4b5563;
    color: #fff;
}

.pill-active {
    background: #15803d;
    color: #fff;
}

.pill-inactive {
    background: #6b7280;
    color: #fff;
}

/* Time ago only */
.date-sub {
    font-size: 0.78rem;
    color: var(--ts-muted);
}

/* Footer */
.list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 12px;
    background: var(--ts-input-bg);
    border-top: 1px solid var(--ts-border);
}

.pager {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pager-btn {
    height: 30px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #cfd6df;
    background: var(--ts-surface-soft);
    color: #111827;
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
}

    .pager-btn:hover {
        background: var(--ts-surface-soft-hover);
    }

    .pager-btn.disabled {
        pointer-events: none;
        opacity: 0.55;
    }

.pager-mid {
    font-size: 0.84rem;
    color: var(--ts-muted);
}

.rows-note {
    font-size: 0.84rem;
    color: var(--ts-muted);
}

/* ---------- USERS DETAIL ---------- */

.detail-body {
    padding: 16px 16px 12px 16px;
}
/* Some detail pages use .list-card-body instead of .detail-body.
   Keep spacing consistent across all detail cards (top/left/right/bottom). */
.list-card-body {
    padding: 16px 16px 12px 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}

.detail-field-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: #111827;
}

.detail-help {
    font-size: 0.78rem;
    color: var(--ts-muted);
}

.detail-input,
.detail-select {
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--ts-border);
    padding: 0 12px;
    font-size: 0.95rem;
    background: var(--ts-input-bg);
    outline: none;
}

    .detail-input:focus,
    .detail-select:focus {
        border-color: #cbd5e1;
        box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.35);
    }

    .detail-input[disabled],
    .detail-select[disabled] {
        background: var(--ts-surface-soft);
        color: #111827;
        opacity: 1; /* Bootstrap zet anders fade */
        cursor: not-allowed;
    }

.detail-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--ts-border);
    background: var(--ts-input-bg);
}

    .detail-checkbox-row.disabled {
        background: var(--ts-surface-soft);
        cursor: not-allowed;
    }

    .detail-checkbox-row input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    .detail-checkbox-row label {
        margin: 0;
        font-size: 0.95rem;
        font-weight: 600;
        color: #111827;
    }

.detail-span-2 {
    grid-column: 1 / -1;
}

.detail-section-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

.detail-section-sub {
    margin-top: 4px;
    font-size: 0.80rem;
    color: var(--ts-muted);
}

/* Actions */
.actions-body {
    padding: 14px 16px 14px 16px;
}

.actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.action-button {
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #cfd6df;
    background: var(--ts-surface-soft);
    color: #111827;
    font-size: 0.90rem;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    opacity: 0.70; /* UI only */
    cursor: not-allowed;
}

/* Footer layout stabilizers */
.list-footer {
    display: flex;
    align-items: center;
}

.pager {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Toolbar wrap behavior */
.list-controls {
    display: flex;
    align-items: center;
}

/* Mobile */
@media (max-width: 780px) {

    /* Header blijft netjes: titel links, controls rechts, wrap indien nodig */
    .list-header {
        flex-direction: row;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .list-title-block {
        flex: 1 1 auto;
        min-width: 180px;
    }

    /* Controls: ALTIJD rechts, en mogen wrappen */
    .list-controls {
        flex: 1 1 auto;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Search input: niet full width, maar mag kleiner worden */
    .control-input {
        width: 220px;
        max-width: 220px;
        flex: 0 1 220px;
    }

    /* Rows dropdown: compact houden */
    .control-select {
        flex: 0 0 auto;
    }

    /* New knop: NOOIT full width */
    .control-primary {
        flex: 0 0 auto;
        width: auto;
    }

    /* Footer blijft goed (zoals we al hadden) */
    .list-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .pager {
        flex: 1 1 auto;
        flex-wrap: wrap;
    }

    .rows-note {
        margin-left: auto;
        flex: 0 0 auto;
        white-space: nowrap;
        text-align: right;
    }

    .ts-header-align-bottom {
        flex-wrap: wrap;
        gap: 10px;
    }

    .list-header-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
/* ===========================
   Phase 4 polish: header + toolbar alignment
   =========================== */

/* Detail/Password: force 2-column layout so buttons never drop below subtitle */
.list-header.ts-header-grid {
    display: grid; /* overrides flex */
    grid-template-columns: 1fr auto;
    align-items: end; /* bottom-align with subtitle */
    column-gap: 16px;
}

/* Buttons always right, and bottom aligned with subtitle */
.ts-header-actions {
    display: inline-flex;
    justify-content: flex-end;
    align-items: end;
    gap: 10px;
    white-space: nowrap; /* keep Back/Edit together */
}

/* Users list toolbar: always right aligned */
.list-controls.users-toolbar {
    justify-content: flex-end;
}

/* Default (desktop): Search + Rows, then New at the end */
.users-toolbar-search {
    order: 1;
}

.users-toolbar-rows {
    order: 2;
}

.users-toolbar-newwrap {
    order: 3;
}

/* New wrapper behaves like an item but keeps the button tight */
.users-toolbar-newwrap {
    display: inline-flex;
    align-items: center;
}

/* Tight-space behavior:
   - everything right aligned
   - New comes FIRST and sits top-right
   - Search + Rows come AFTER (under it) on the right */
@media (max-width: 780px) {
    .users-toolbar-search {
        order: 2;
    }

    .users-toolbar-rows {
        order: 3;
    }

    .users-toolbar-newwrap {
        order: 1;
        flex-basis: 100%; /* forces its own row */
        justify-content: flex-end; /* button goes to the right */
        display: flex;
    }
}

/* ------------------------------------------------------------
   Admin Status
------------------------------------------------------------ */

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 992px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
}

.status-card {
    background: var(--ts-card);
    border: 1px solid var(--ts-border);
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}

.status-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ts-border);
}

.status-card-title {
    font-weight: 700;
    color: var(--ts-text);
}

.status-card-body {
    padding: 12px 14px;
}

.status-muted {
    color: var(--ts-muted);
}

.status-strong {
    font-weight: 700;
    color: var(--ts-text);
}

.status-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.status-row-title {
    font-weight: 700;
    color: var(--ts-text);
    word-break: break-word;
}

.status-row-sub {
    margin-top: 2px;
    color: var(--ts-muted);
    font-size: 0.92rem;
}

.status-row-right {
    flex: 0 0 auto;
}

/* --- Status row layout helpers --- */
.status-row-left {
    flex: 1 1 auto;
    min-width: 0;
}

.status-row-id {
    margin-top: 2px;
    color: var(--ts-muted);
    font-size: 0.82rem;
    word-break: break-all;
}

.status-row-right-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.status-row-right-sub {
    color: var(--ts-muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

/* --- Subsections (Message / Offline) --- */
.status-subsection {
    margin-top: 8px;
}

.status-subsection-title {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ts-muted);
    font-weight: 800;
    margin-bottom: 6px;
}


.status-message {
    margin-top: 6px;
    color: var(--ts-text);
    background: var(--ts-bg);
    border: 1px solid var(--ts-border);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.95rem;
}

.status-sep {
    height: 1px;
    background: var(--ts-border);
    margin: 10px 0;
}

/* Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--ts-border);
}

.status-pill-green {
    background: var(--ts-status-green-bg);
    border-color: var(--ts-status-green-border);
    color: var(--ts-status-green-text);
}

.status-pill-red {
    background: var(--ts-status-red-bg);
    border-color: var(--ts-status-red-border);
    color: var(--ts-status-red-text);
}

.status-pill-gray {
    background: var(--ts-status-gray-bg);
    border-color: var(--ts-status-gray-border);
    color: var(--ts-status-gray-text);
}

/* Header badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
    border: 1px solid var(--ts-border);
}

.status-badge-green {
    background: #1f7a3f;
    border-color: #1f7a3f;
    color: #ffffff;
}

.status-badge-red {
    background: #9f1c1c;
    border-color: #9f1c1c;
    color: #ffffff;
}

.status-badge-gray {
    background: #6b7280;
    border-color: #6b7280;
    color: #ffffff;
}

/* Key/value block */
.status-kv {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 8px 12px;
}

@media (max-width: 576px) {
    .status-kv {
        grid-template-columns: 1fr;
    }
}

.status-k {
    color: var(--ts-muted);
    font-weight: 600;
}

.status-v {
    color: var(--ts-text);
    font-weight: 700;
    word-break: break-word;
}

/* ------------------------------------------------------------
   Admin Status - Header badge stack (right side)
   - Always horizontal
   - Wrap on small screens (so Proxy never disappears)
   - Tighter spacing + slightly smaller badges
------------------------------------------------------------ */

.status-badge-stack {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* allow 2nd row on small screens */
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
}

/* Two-line header badge blocks (label + value) */
.status-badge-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 96px;
}

.status-badge-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ts-muted);
    margin-bottom: 3px;
    line-height: 1;
    white-space: nowrap;
}

.status-badge-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    border: 1px solid var(--ts-border);
    white-space: nowrap;
}

.status-icon {
    font-size: 0.95em;
    line-height: 1;
}

/* tighter on smaller screens */
@media (max-width: 780px) {
    .status-badge-stack {
        gap: 6px;
    }

    .status-badge-block {
        min-width: 64px;
    }

    .status-badge-value {
        padding: 2px 6px;
        font-size: 0.68rem;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .status-badge-stack {
        gap: 4px; /* nog iets dichter */
    }

    /* label ultra-compact */
    .status-badge-label {
        font-size: 7px;
        letter-spacing: 0.02em;
    }

    /* block zo klein mogelijk zonder breken */
    .status-badge-block {
        min-width: 64px;
    }

    /* pill maximaal compact */
    .status-badge-value {
        padding: 2px 6px;
        font-size: 0.68rem;
        font-weight: 600;
    }

    /* regular status badges (OK / Online / Offline elders) */
    .status-badge {
        padding: 2px 6px;
        font-size: 0.70rem;
        font-weight: 600;
    }
}


/* ------------------------------------------------------------
   Admin Status - Force "Offline" look consistent everywhere
------------------------------------------------------------ */

/* If you ever render a badge/pill with text Offline but wrong class,
   these helpers keep it consistent (safe no-op if unused). */
.status-pill-offline {
    background: #fdecec;
    border-color: #f7c2c2;
    color: #842029;
}

.status-badge-offline {
    background: #fdecec;
    border-color: #f7c2c2;
    color: #842029;
}

/* Info/action button row spacing (nice and consistent) */
.info-actions,
.status-info-actions {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dropdown-header {
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: #6c757d;
}

/* Global footer spacing */
.footer {
    margin-top: 32px; /* ruimte TUSSEN content en footer */
    padding-top: 20px; /* ruimte BINNEN footer boven */
    padding-bottom: 20px; /* ruimte BINNEN footer onder */
}

.detail-inline-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* --- Detail page helpers (Schedules/User-style) --- */
.detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.detail-inline-grow {
    flex: 1 1 auto;
    min-width: 0;
}

.detail-inline-shrink {
    flex: 0 0 160px;
    max-width: 160px;
}
/* ------------------------------------------------------------
   Schedules Detail - small layout fixes (align like Users)
------------------------------------------------------------ */

/* Keep first row aligned (Schedule key has help text, Enabled usually not) */
.detail-help-spacer {
    visibility: hidden;
    height: 18px;
}

/* Interval: keep value + unit together and stable */
.interval-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

    .interval-row .interval-value {
        flex: 1 1 auto;
        min-width: 0;
    }

    .interval-row .interval-unit {
        flex: 0 0 150px;
        max-width: 150px;
    }

/* Mobile: interval value + unit each ~50% */
@media (max-width: 640px) {
    .interval-row .interval-unit {
        flex: 1 1 50%;
        max-width: none;
    }

    .interval-row .interval-value {
        flex: 1 1 50%;
    }
}

/* Textarea must not be forced to input height */
textarea.detail-textarea {
    height: auto !important;
    min-height: 140px !important; /* ~5 lines */
    line-height: 1.35;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Actions aligned to the right like Users */
.detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

/* Theme preference page */
.theme-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.theme-mode-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--ts-border);
    border-radius: 12px;
    background: var(--ts-card);
}

.theme-mode-card-title {
    font-weight: 700;
    color: var(--ts-text);
    margin-bottom: 2px;
}

.theme-mode-card-subtitle {
    color: var(--ts-muted);
    font-size: 0.84rem;
}

.theme-help {
    color: var(--ts-muted);
    font-size: 0.84rem;
}

.theme-current-badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--ts-border);
    background: var(--ts-surface-soft);
    color: var(--ts-text);
    font-size: 0.82rem;
    font-weight: 700;
}

.alert-danger {
    background: var(--ts-alert-danger-bg);
    border-color: var(--ts-alert-danger-border);
    color: var(--ts-alert-danger-text);
}

.alert-success {
    background: var(--ts-alert-success-bg);
    border-color: var(--ts-alert-success-border);
    color: var(--ts-alert-success-text);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .dropdown-item,
html[data-theme="dark"] .dropdown-header,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .form-check-label,
html[data-theme="dark"] .navbar-brand,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .navbar-text,
html[data-theme="dark"] .page-link,
html[data-theme="dark"] .btn,
html[data-theme="dark"] .btn-link,
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .table,
html[data-theme="dark"] .table th,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .list-card,
html[data-theme="dark"] .list-footer,
html[data-theme="dark"] .detail-body,
html[data-theme="dark"] .detail-label,
html[data-theme="dark"] .detail-help,
html[data-theme="dark"] .detail-value,
html[data-theme="dark"] .status-k,
html[data-theme="dark"] .status-v,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer * {
    color: var(--ts-text);
}

html[data-theme="dark"] .navbar,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .dropdown-item,
html[data-theme="dark"] .list-card,
html[data-theme="dark"] .list-footer,
html[data-theme="dark"] .detail-body,
html[data-theme="dark"] .detail-field-block,
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .table,
html[data-theme="dark"] .list-table thead th,
html[data-theme="dark"] .list-table tbody td,
html[data-theme="dark"] .list-table tbody tr,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .control-input,
html[data-theme="dark"] .control-select,
html[data-theme="dark"] .detail-input,
html[data-theme="dark"] .detail-select,
html[data-theme="dark"] textarea.detail-textarea,
html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .control-button {
    background-color: var(--ts-card);
    border-color: var(--ts-border);
}

    html[data-theme="dark"] .dropdown-menu,
    html[data-theme="dark"] .dropdown-item:hover,
    html[data-theme="dark"] .dropdown-item:focus,
    html[data-theme="dark"] .page-link,
    html[data-theme="dark"] .btn-outline-secondary,
    html[data-theme="dark"] .control-button,
    html[data-theme="dark"] .theme-current-badge {
        background-color: var(--ts-surface-soft);
    }

        html[data-theme="dark"] .dropdown-item:hover,
        html[data-theme="dark"] .dropdown-item:focus,
        html[data-theme="dark"] .btn-outline-secondary:hover,
        html[data-theme="dark"] .control-button:hover {
            background-color: var(--ts-surface-soft-hover);
        }

    html[data-theme="dark"] .navbar-toggler,
    html[data-theme="dark"] .navbar-toggler-icon,
    html[data-theme="dark"] .dropdown-divider,
    html[data-theme="dark"] .border,
    html[data-theme="dark"] .border-top,
    html[data-theme="dark"] .border-bottom,
    html[data-theme="dark"] hr,
    html[data-theme="dark"] .table,
    html[data-theme="dark"] .table th,
    html[data-theme="dark"] .table td,
    html[data-theme="dark"] .page-link,
    html[data-theme="dark"] .list-header,
    html[data-theme="dark"] .list-footer,
    html[data-theme="dark"] .footer {
        border-color: var(--ts-border) !important;
    }
html[data-theme="dark"] .navbar-toggler {
    border-color: var(--ts-border) !important;
}

html[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28230, 237, 243, 0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .control-input,
html[data-theme="dark"] .control-select,
html[data-theme="dark"] .detail-input,
html[data-theme="dark"] .detail-select,
html[data-theme="dark"] textarea.detail-textarea {
    color: var(--ts-text);
    background-color: var(--ts-input-bg);
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .list-subtitle,
html[data-theme="dark"] .control-label,
html[data-theme="dark"] .date-sub,
html[data-theme="dark"] .dropdown-header,
html[data-theme="dark"] .ts-trading-text,
html[data-theme="dark"] .ts-trading-age,
html[data-theme="dark"] .theme-help {
    color: var(--ts-muted) !important;
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd),
html[data-theme="dark"] .list-table tbody tr:nth-child(even) {
    background-color: var(--ts-row-alt);
}

html[data-theme="dark"] .table-hover > tbody > tr:hover,
html[data-theme="dark"] .list-table tbody tr:hover {
    background-color: var(--ts-row-hover);
}

html[data-theme="dark"] .td-link,
html[data-theme="dark"] a:not(.btn):not(.control-button):not(.control-primary):not(.dropdown-item):not(.navbar-brand):not(.nav-link):not(.ts-user-link) {
    color: var(--ts-link);
}

    html[data-theme="dark"] .td-link:hover,
    html[data-theme="dark"] a:not(.btn):not(.control-button):not(.control-primary):not(.dropdown-item):not(.navbar-brand):not(.nav-link):not(.ts-user-link):hover {
        color: var(--ts-link-hover);
    }

@media (max-width: 860px) {
    .theme-mode-grid {
        grid-template-columns: 1fr;
    }
}
/* ============================================
   Phase 13 dark theme fixes
   - Email recipients list visibility
   - Pager Previous disabled visibility
   Put this at the VERY END of site.css
   ============================================ */

/* Email settings - recipients list/table/card */
html[data-theme="dark"] .list-card table,
html[data-theme="dark"] .list-card tbody,
html[data-theme="dark"] .list-card thead,
html[data-theme="dark"] .list-card tr,
html[data-theme="dark"] .list-card td,
html[data-theme="dark"] .list-card th,
html[data-theme="dark"] .table,
html[data-theme="dark"] .table tbody,
html[data-theme="dark"] .table thead,
html[data-theme="dark"] .table tr,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th,
body.ts-theme-dark .list-card table,
body.ts-theme-dark .list-card tbody,
body.ts-theme-dark .list-card thead,
body.ts-theme-dark .list-card tr,
body.ts-theme-dark .list-card td,
body.ts-theme-dark .list-card th,
body.ts-theme-dark .table,
body.ts-theme-dark .table tbody,
body.ts-theme-dark .table thead,
body.ts-theme-dark .table tr,
body.ts-theme-dark .table td,
body.ts-theme-dark .table th {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
    border-color: #374151 !important;
}

/* Keep striped rows readable in dark mode */
html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd),
body.ts-theme-dark .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #253142 !important;
}

html[data-theme="dark"] .table-hover > tbody > tr:hover,
body.ts-theme-dark .table-hover > tbody > tr:hover {
    background-color: #304055 !important;
}

/* Make links/actions inside dark tables visible */
html[data-theme="dark"] .table a,
html[data-theme="dark"] .list-card table a,
body.ts-theme-dark .table a,
body.ts-theme-dark .list-card table a {
    color: #93c5fd !important;
}

    html[data-theme="dark"] .table a:hover,
    html[data-theme="dark"] .list-card table a:hover,
    body.ts-theme-dark .table a:hover,
    body.ts-theme-dark .list-card table a:hover {
        color: #bfdbfe !important;
    }

/* Pager buttons - disabled Previous must still be readable */
html[data-theme="dark"] .pager-btn,
body.ts-theme-dark .pager-btn {
    background: #243041 !important;
    color: #f3f4f6 !important;
    border-color: #4b5563 !important;
}

    html[data-theme="dark"] .pager-btn:hover,
    body.ts-theme-dark .pager-btn:hover {
        background: #304055 !important;
        color: #f3f4f6 !important;
    }

    html[data-theme="dark"] .pager-btn.disabled,
    html[data-theme="dark"] .pager-btn[aria-disabled="true"],
    body.ts-theme-dark .pager-btn.disabled,
    body.ts-theme-dark .pager-btn[aria-disabled="true"] {
        background: #1b2433 !important;
        color: #9ca3af !important;
        border-color: #374151 !important;
        opacity: 1 !important;
    }

/* Also cover Bootstrap disabled buttons used as pager */
html[data-theme="dark"] .btn:disabled,
html[data-theme="dark"] .btn.disabled,
body.ts-theme-dark .btn:disabled,
body.ts-theme-dark .btn.disabled {
    background-color: #1b2433 !important;
    color: #9ca3af !important;
    border-color: #374151 !important;
    opacity: 1 !important;
}


/* ============================================
   Phase 13 responsive layout improvements
   - Prevent page-level horizontal overflow
   - Keep list/detail pages usable on tablet/mobile
   - Preserve desktop layout
   ============================================ */

/* Global safety: avoid children forcing page-level overflow */
.ts-main,
.list-page,
.list-header,
.list-header-actions,
.list-controls,
.list-card,
.list-card-body,
.detail-body,
.detail-grid,
.detail-field-block,
.actions-grid,
.status-grid,
.status-card,
.table-responsive {
    min-width: 0;
}

/* Shared table wrapper behavior */
.list-card,
.table-responsive {
    max-width: 100%;
}

/* Prevent controls and form fields from overflowing their container */
.control-group,
.detail-field-block,
.detail-checkbox-row,
.actions-grid,
.ts-header-actions,
.list-header-actions {
    min-width: 0;
}

.control-input,
.control-select,
.control-button,
.control-primary,
.detail-input,
.detail-select,
textarea.detail-textarea {
    max-width: 100%;
}

textarea.detail-textarea {
    width: 100%;
}

.detail-input,
.detail-select,
textarea.detail-textarea {
    min-width: 0;
}

/* Tablet and down */
@media (max-width: 992px) {
    .list-header {
        flex-wrap: wrap;
    }

    .list-header-actions,
    .ts-header-actions {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-span-2 {
        grid-column: auto;
    }

    .detail-checkbox-row {
        height: auto;
        min-height: 38px;
        padding-top: 8px;
        padding-bottom: 8px;
        align-items: flex-start;
    }

        .detail-checkbox-row label {
            line-height: 1.35;
        }

    .list-footer {
        flex-wrap: wrap;
    }
}

/* Mobile/tablet list usability */
@media (max-width: 780px) {
    .ts-main {
        overflow-x: hidden;
    }

    .list-page {
        overflow-x: hidden;
    }

    .list-header,
    .list-header.ts-header-grid {
        display: flex;
        grid-template-columns: none;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .list-title-block {
        min-width: 0;
    }

    .list-header-actions,
    .ts-header-actions {
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
    }

    .list-controls,
    .list-controls.users-toolbar {
        width: 100%;
        justify-content: flex-start;
        align-items: stretch;
        gap: 10px;
    }

    .control-group {
        flex: 1 1 100%;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 8px;
    }

    .control-label {
        width: 100%;
        margin-right: 0;
    }

    .control-input,
    .control-select,
    .control-button,
    .control-primary {
        width: 100%;
        max-width: 100%;
        flex: 1 1 100%;
        justify-content: center;
    }

    .control-right {
        margin-left: 0;
    }

    .users-toolbar-search,
    .users-toolbar-rows,
    .users-toolbar-newwrap {
        order: initial;
        flex-basis: auto;
    }

    .users-toolbar-newwrap {
        width: 100%;
        justify-content: flex-start;
    }

    .list-card {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .list-table {
        min-width: 640px;
    }

        .list-table thead th,
        .list-table tbody td {
            white-space: nowrap;
        }

    .list-card-body,
    .detail-body,
    .actions-body {
        padding-left: 12px;
        padding-right: 12px;
    }

    .detail-grid {
        gap: 12px;
    }

    .actions-grid {
        flex-direction: column;
        align-items: stretch;
    }

        .actions-grid > *,
        .actions-grid .control-button,
        .actions-grid .control-primary,
        .actions-grid .action-button,
        .list-header-actions > .control-button,
        .list-header-actions > .control-primary,
        .ts-header-actions > .control-button,
        .ts-header-actions > .control-primary {
            width: 100%;
            justify-content: center;
        }

    .pager {
        width: 100%;
        justify-content: space-between;
    }

    .pager-btn {
        justify-content: center;
    }

    .rows-note {
        width: 100%;
        margin-left: 0;
        text-align: left;
        white-space: normal;
    }

    .status-row {
        grid-template-columns: 1fr;
    }

    .status-row-right,
    .status-row-right-stack {
        align-items: flex-start;
    }
}

/* Very small phones */
@media (max-width: 480px) {
    .list-title {
        font-size: 1.35rem;
    }

    .list-card {
        border-radius: 10px;
    }

    .list-table {
        min-width: 560px;
    }

    .list-footer {
        padding-left: 10px;
        padding-right: 10px;
    }

    .pager {
        gap: 8px;
    }

    .pager-mid {
        width: 100%;
        text-align: left;
    }
}
/* =========================================================
   Email HTML preview (Admin → Operations → Emails)
   ========================================================= */

.ts-mail-body-html {
    border: 1px solid #d7dce3;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    color: #212529;
    min-height: 80px;
    overflow: auto;
}

    .ts-mail-body-html * {
        max-width: 100%;
    }

    .ts-mail-body-html,
    .ts-mail-body-html p,
    .ts-mail-body-html div,
    .ts-mail-body-html span,
    .ts-mail-body-html td,
    .ts-mail-body-html th,
    .ts-mail-body-html li,
    .ts-mail-body-html strong,
    .ts-mail-body-html b,
    .ts-mail-body-html em,
    .ts-mail-body-html i,
    .ts-mail-body-html h1,
    .ts-mail-body-html h2,
    .ts-mail-body-html h3,
    .ts-mail-body-html h4,
    .ts-mail-body-html h5,
    .ts-mail-body-html h6 {
        color: #212529 !important;
    }

        .ts-mail-body-html a {
            color: #0d6efd !important;
        }

        .ts-mail-body-html table {
            width: 100%;
            border-collapse: collapse;
        }

        .ts-mail-body-html img {
            max-width: 100%;
            height: auto;
        }

/* DARK THEME */

[data-theme="dark"] .ts-mail-body-html,
.ts-theme-dark .ts-mail-body-html {
    border-color: #2f4a73;
    background: #07152f;
    color: #f2f6fc;
}

    [data-theme="dark"] .ts-mail-body-html *,
    .ts-theme-dark .ts-mail-body-html * {
        color: #f2f6fc !important;
    }

    [data-theme="dark"] .ts-mail-body-html a,
    .ts-theme-dark .ts-mail-body-html a {
        color: #8ec5ff !important;
    }

    [data-theme="dark"] .ts-mail-body-html table,
    [data-theme="dark"] .ts-mail-body-html td,
    [data-theme="dark"] .ts-mail-body-html th,
    .ts-theme-dark .ts-mail-body-html table,
    .ts-theme-dark .ts-mail-body-html td,
    .ts-theme-dark .ts-mail-body-html th {
        border-color: #2f4a73 !important;
    }

/* =========================================
   Phase 13.2 - Collapsible list filters
   ========================================= */

.list-header-compact {
    display: block;
    margin-bottom: 8px;
    padding-bottom: 0;
    border-bottom: none;
}

.list-filtered-indicator {
    margin-left: 6px;
    font-weight: 400;
    color: var(--ts-muted);
}

.list-toolbar-shell {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ts-border);
}

.list-toolbar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 16px;
    row-gap: 10px;
}

.list-toolbar-left,
.list-toolbar-right {
    display: flex;
    align-items: center;
}

.list-toolbar-right {
    justify-content: flex-end;
}

.list-rows-form {
    margin: 0;
}

.list-rows-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

    .list-rows-group .control-label {
        width: auto;
        margin: 0;
        white-space: nowrap;
    }

    .list-rows-group .control-select {
        width: auto;
        min-width: 82px;
        flex: 0 0 auto;
    }

.list-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 1px solid var(--ts-border);
    background: var(--ts-card);
    color: var(--ts-text);
    border-radius: 10px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

    .list-filter-toggle:hover {
        background: var(--ts-surface-soft);
    }

.list-filter-toggle-compact {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
}

.list-filter-toggle-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0.68rem;
    transition: transform 0.15s ease;
}

.list-filter-toggle.is-open .list-filter-toggle-chevron {
    transform: rotate(0deg);
}

.list-filter-panel {
    margin-top: 12px;
    padding: 14px;
    background: var(--ts-card);
    border: 1px solid var(--ts-border);
    border-radius: 14px;
}

    .list-filter-panel[hidden] {
        display: none !important;
    }

.list-filter-form {
    margin: 0;
}

.list-filter-grid {
    display: grid;
    gap: 14px;
}

.list-filter-grid-commands {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.list-filter-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 0;
}

    .list-filter-group .control-label {
        width: auto;
        margin: 0;
    }

    .list-filter-group .control-input,
    .list-filter-group .control-select {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

.list-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

@media (max-width: 767.98px) {
    .list-toolbar-shell {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .list-toolbar-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        column-gap: 12px;
        row-gap: 8px;
    }

    .list-toolbar-left,
    .list-toolbar-right {
        align-items: flex-start;
    }

    .list-toolbar-right {
        justify-content: flex-end;
    }

    .list-filter-toggle-compact {
        min-height: 30px;
        padding: 0 10px;
        font-size: 0.82rem;
    }

    .list-rows-group {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex: 0 0 auto;
    }

        .list-rows-group .control-label {
            width: auto;
            margin: 0;
            white-space: nowrap;
        }

        .list-rows-group .control-select {
            width: auto;
            min-width: 74px;
            max-width: 74px;
            flex: 0 0 auto;
        }

    .list-filter-panel {
        margin-top: 10px;
        padding: 12px;
    }

    .list-filter-grid,
    .list-filter-grid-commands {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .list-filter-group {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
        min-width: 0;
    }

        .list-filter-group .control-label {
            width: 100%;
            margin: 0;
        }

        .list-filter-group .control-input,
        .list-filter-group .control-select {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            flex: 1 1 auto;
            box-sizing: border-box;
        }

    .list-filter-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 12px;
    }

        .list-filter-actions .control-button,
        .list-filter-actions .control-button-secondary {
            width: 100%;
            max-width: 100%;
            justify-content: center;
            box-sizing: border-box;
        }
}

.ts-ml-sm {
    margin-left: 8px;
}



