/* Workspace design system. Shared tokens also drive the legacy module styles. */
:root {
    --se-primary: #146c60;
    --se-primary-light: #edf7f3;
    --se-primary-soft: #e7f3ef;
    --se-accent: #a87320;
    --se-accent-soft: #fcf4e4;
    --se-on-primary: #ffffff;
    --se-info: #42649a;
    --se-success: #23724b;
    --se-warning: #9a6516;
    --se-danger: #bb4141;
    --se-warning-soft: #fcf4e4;
    --se-danger-soft: #fceeee;
    --se-surface: #ffffff;
    --se-surface-alt: #f7f8f8;
    --se-surface-soft: #f0f2f2;
    --se-surface-muted: #f0f2f2;
    --se-page-bg: #ffffff;
    --se-sidebar-bg: #f7f8f8;
    --se-text: #202727;
    --se-muted: #687575;
    --se-muted-strong: #4e5c5c;
    --se-muted-soft: #879494;
    --se-border: #e4e9e8;
    --se-border-strong: #cbd4d2;
    --se-editable: #f0f7f7;
    --se-hover: #f2f5f4;
    --se-neutral-soft: #20272708;
    --se-shadow-soft: 0 1px 2px #14251f06;
    --se-shadow-hover: 0 3px 12px #14251f0a;
    --se-sidebar-width: 220px;
    --se-radius-lg: 8px;
    --se-radius-md: 6px;
    --se-radius-sm: 5px;
    --se-font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bs-body-bg: var(--se-page-bg);
    --bs-body-color: var(--se-text);
    --bs-border-color: var(--se-border);
    --bs-secondary-color: var(--se-muted);
}

:root[data-theme="dark"] {
    --se-primary: #82c9b4;
    --se-primary-light: #223b34;
    --se-primary-soft: #223b34;
    --se-accent: #deb66f;
    --se-accent-soft: #3c3323;
    --se-on-primary: #112720;
    --se-info: #9ab5e4;
    --se-success: #88c8a2;
    --se-warning: #deb66f;
    --se-danger: #f18d8d;
    --se-warning-soft: #3c3323;
    --se-danger-soft: #412b2b;
    --se-surface: #202525;
    --se-surface-alt: #252b2b;
    --se-surface-soft: #2a3131;
    --se-surface-muted: #2a3131;
    --se-page-bg: #1b2020;
    --se-sidebar-bg: #171c1c;
    --se-text: #e6ecea;
    --se-muted: #a0aeaa;
    --se-muted-strong: #bdc9c5;
    --se-muted-soft: #81908b;
    --se-border: #343d3a;
    --se-border-strong: #4a5752;
    --se-editable: #223132;
    --se-hover: #2b3330;
    --se-neutral-soft: #e6ecea0a;
    --se-shadow-soft: none;
    --se-shadow-hover: none;
}

html, body { background: var(--se-page-bg) !important; color: var(--se-text); }
body { font-size: 13px; line-height: 1.5; }
*, *::before, *::after { letter-spacing: 0 !important; }
button, input, textarea, select { font: inherit; }
a { color: var(--se-primary); }
a:hover { color: var(--se-text); }
::selection { background: var(--se-primary-soft); color: var(--se-text); }
:focus-visible { outline: 2px solid var(--se-primary); outline-offset: 3px; }
.text-muted, small, .small { color: var(--se-muted) !important; }
.text-dark { color: var(--se-text) !important; }
.bg-white, .bg-light { background: var(--se-surface) !important; }
button:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }

/* Shell: independent scrolling navigation, no Bootstrap grid width calculations. */
#layout-root.layout-root { display: block; padding: 0 !important; min-height: 100dvh; width: 100%; }
#layout-root .se-sidebar {
    position: fixed !important; inset: 0 auto 0 0 !important; z-index: 1040;
    width: var(--se-sidebar-width) !important; min-width: 0 !important;
    max-width: none !important; height: 100dvh !important;
    padding: 0 12px 14px !important; margin: 0 !important;
    display: flex !important; flex-direction: column; overflow-y: auto;
    background: var(--se-sidebar-bg) !important; border: 0 !important;
    border-right: 1px solid var(--se-border) !important;
    box-shadow: none !important; transform: none; transition: transform 150ms ease !important;
}
.se-brand { display: flex; align-items: center; gap: 10px; min-height: 80px; padding: 0 10px; color: var(--se-text); }
.se-brand:hover { color: var(--se-text); }
.se-brand img { object-fit: contain; }
.se-brand > div { display: flex; flex-direction: column; }
.se-brand strong { font-size: 16px; font-weight: 650; }
.se-brand span { color: var(--se-muted); font-size: 11px; }
#sidebar-nav { display: flex; gap: 3px; }
.se-nav-section { padding: 19px 12px 7px; font-size: 10px; font-weight: 600; color: var(--se-muted); }
.se-nav-section:first-child { padding-top: 0; }
#layout-root .se-sidebar-link {
    display: flex !important; align-items: center; gap: 11px;
    min-height: 38px !important; height: 38px !important; margin: 0 !important;
    padding: 9px 12px !important; border: 0 !important; border-radius: 5px !important;
    font-size: 13px !important; font-weight: 500 !important; line-height: 20px;
    background: transparent !important; color: var(--se-muted-strong) !important;
    box-shadow: none !important; white-space: nowrap; text-decoration: none;
}
#layout-root .se-sidebar-link:hover { background: var(--se-hover) !important; color: var(--se-text) !important; }
#layout-root .se-sidebar-link.active { background: var(--se-primary-soft) !important; color: var(--se-primary) !important; font-weight: 600 !important; }
.se-sidebar-link svg { flex: 0 0 18px; }
.se-sidebar-footer { margin-top: auto; padding-top: 24px; }
.se-workspace { margin-left: var(--se-sidebar-width); min-width: 0; }
.se-workspace-topbar {
    position: sticky; top: 0; z-index: 1020; height: 58px;
    display: flex; align-items: center; gap: 16px; padding: 0 28px;
    background: var(--se-page-bg); border-bottom: 1px solid var(--se-border);
}
.se-breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 12px; min-width: 0; }
.se-breadcrumb-root, .se-breadcrumb svg { color: var(--se-muted); }
#se-current-page { font-weight: 550; }
.se-icon-button {
    width: 30px; height: 30px; flex: 0 0 30px; display: inline-flex;
    align-items: center; justify-content: center; padding: 0;
    color: var(--se-muted); background: transparent; border: 1px solid transparent; border-radius: 5px;
}
.se-icon-button:hover { color: var(--se-text); background: var(--se-hover); border-color: var(--se-border); }
.se-theme-control {
    position: fixed; top: 13px; right: 28px; z-index: 1030;
    display: flex; align-items: center; gap: 2px; padding: 2px;
    border: 1px solid var(--se-border); border-radius: 6px; background: var(--se-sidebar-bg);
}
.se-theme-option { display: grid; place-items: center; width: 27px; height: 26px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--se-muted); }
.se-theme-option:hover { color: var(--se-text); }
.se-theme-option[aria-pressed="true"] { background: var(--se-surface); color: var(--se-primary); box-shadow: 0 1px 3px #00000012; }
#layout-root .layout-content {
    width: 100% !important; max-width: none !important; min-width: 0 !important;
    margin: 0 !important; padding: 28px 28px 40px !important;
    background: var(--se-page-bg) !important; overflow: visible !important;
}
#layout-root:has(.layout-sidebar.is-collapsed) { --se-sidebar-width: 0px; }
#layout-root .layout-sidebar.is-collapsed { transform: translateX(-100%); width: 220px !important; }
.se-sidebar-backdrop { display: none; }
.se-skip-link { position: fixed; top: -80px; left: 230px; z-index: 2000; background: var(--se-surface); border: 1px solid var(--se-border); padding: 10px; }
.se-skip-link:focus { top: 8px; }
.se-route-loading { min-height: 160px; }
#page-loader { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 2000; pointer-events: none; opacity: 0; overflow: hidden; }
#page-loader.active { opacity: 1; }
#page-loader::after { content: ""; display: block; width: 35%; height: 100%; background: var(--se-primary); animation: se-progress 1.2s ease-in-out infinite; }
@keyframes se-progress { from { transform: translateX(-110%); } to { transform: translateX(390%); } }

/* Page rhythm: open sections, compact toolbars, only individual tools are framed. */
.se-page-wrapper, .se-logger-page, .se-logs-page, .se-mail-workspace { width: 100%; min-width: 0; margin: 0 !important; padding: 0 !important; gap: 24px !important; background: transparent !important; }
.se-page-wrapper { gap: 12px !important; }
.se-page-wrapper > .se-page-section { margin-top: 0 !important; margin-bottom: 8px !important; }
.se-page-wrapper > .se-page-header { margin-bottom: 8px !important; }
.se-review-queues-grid:not(:has(.se-review-panel-slot > *)) { display: none !important; }
.se-page-actions:has(#save-btn-users[style*="display: none"]):has(#users-update-message:empty) { display: none !important; }
.se-user-metrics-grid { background: transparent !important; }
.se-user-metrics-grid .card { background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--se-border) !important; border-radius: 0 !important; }
.se-user-metrics-grid .card-body { padding: 12px 8px !important; }
.se-offer-ops-grid { background: transparent !important; }
.se-page-wrapper > .row > [class*="col"] > .card:has(.se-metric-value) { background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--se-border) !important; border-radius: 0 !important; }
.se-page-wrapper > .container-fluid, .se-page-section { padding-left: 0 !important; padding-right: 0 !important; }
.se-page-header, .se-logger-hero, .se-mail-page-header, .se-booking-header, .se-offers-header {
    min-height: 38px !important; margin: 0 0 24px !important; padding: 0 !important;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
    border: 0 !important; background: transparent !important; box-shadow: none !important;
}
.se-page-title, .se-logger-page h1 { font-size: 24px !important; font-weight: 600 !important; line-height: 1.3 !important; margin: 0 !important; }
.se-page-subtitle, .se-placeholder-text, .se-chat-panel-description, .se-chat-panel-eyebrow, .se-chat-details-subtitle { display: none !important; }
.se-page-section { margin-bottom: 24px !important; }
.se-page-actions, .se-review-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.se-page-section:empty { display: none; }
.se-page-section .row, .se-overview-page .row { --bs-gutter-x: 20px; --bs-gutter-y: 20px; }
.se-page-wrapper .row { background: transparent !important; }
.se-stats-section-title, .se-logger-section-title { font-size: 13px !important; font-weight: 600 !important; margin: 0 0 14px !important; color: var(--se-muted-strong); }
.se-logger-section { margin-bottom: 28px !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.se-logger-row { margin-top: 4px !important; }
.se-logger-hero-copy { flex: 1; }
.se-logger-controls { display: flex; align-items: flex-end; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.se-logger-control { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.se-logger-select { min-width: 116px; }
.se-logger-meta { font-size: 11px; color: var(--se-muted); margin-top: 5px; }

.card, .se-card, .se-table-card, .se-review-panel, .se-offer-ops-card, .se-logger-card, .se-docs-card {
    background: var(--se-surface) !important; color: var(--se-text);
    border-color: var(--se-border) !important; border-radius: 6px !important; box-shadow: none !important;
}
.card-header, .card-footer { background: transparent !important; color: var(--se-text); border-color: var(--se-border) !important; }
.card-header { padding: 14px 16px !important; }
.card-body, .se-stats-graph-body, .se-logger-card-body, .se-offer-ops-card-body { padding: 16px !important; }
.se-logger-card-title, .se-stats-graph-title, .se-offer-ops-title, .se-mail-section-title { font-size: 13px !important; font-weight: 600 !important; color: var(--se-text) !important; }
.se-logger-card-subtitle, .se-offer-ops-subtitle { display: none !important; }
.se-stats-card, .se-logger-kpi-card { border: 0 !important; border-radius: 0 !important; border-bottom: 1px solid var(--se-border) !important; background: transparent !important; }
.se-stats-card-body { display: block !important; padding: 12px 0 20px !important; }
.se-overview-page .se-stats-card-body { padding: 12px 0 20px !important; }
.se-overview-page .se-stats-card, .se-logger-kpi-card { padding: 0 !important; }
.se-overview-page .se-stats-card-row { background: transparent !important; }
.se-overview-page .se-stats-card-copy { min-height: 0 !important; }
.se-stats-card-title { min-height: 18px; }
.se-stats-card-copy .se-stats-card-value { font-size: 25px !important; min-height: 40px; display: flex; align-items: flex-start; margin: 10px 0 14px !important; }
.se-stats-card-icon-wrap { display: none !important; }
.se-stats-card-title, .se-logger-kpi-label { color: var(--se-muted) !important; font-size: 12px !important; font-weight: 500 !important; }
.se-stats-card-value, .se-logger-kpi-value { color: var(--se-text) !important; font-size: 28px !important; line-height: 1.2 !important; font-weight: 600 !important; margin: 10px 0 16px !important; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.se-stats-card-details { display: flex; flex-direction: column; gap: 5px; border: 0 !important; padding: 0 !important; }
.se-stats-card-detail { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.se-stats-card-detail-label { color: var(--se-muted); }
.se-stats-card-detail-value { color: var(--se-text); font-weight: 500; }
.se-overview-page .row { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.se-overview-page .se-stats-graph-card { margin-bottom: 0 !important; }
.se-logger-kpi-card .card-body { padding: 12px 0 16px !important; }
.se-logger-kpi-delta--up { color: var(--se-success) !important; background: var(--se-primary-soft) !important; }
.se-logger-kpi-delta--down { color: var(--se-danger) !important; background: var(--se-danger-soft) !important; }
.se-logger-kpi-delta--flat { color: var(--se-muted) !important; background: var(--se-surface-soft) !important; }
.se-logger-meta-item { color: var(--se-muted); background: transparent; border: 0; border-radius: 0; padding: 0; }
.se-logger-meta-item + .se-logger-meta-item { border-left: 1px solid var(--se-border); padding-left: 8px; }

/* Controls and portals share tokens rather than relying on a color inversion. */
.btn, .se-primary-btn, .se-secondary-btn, .se-review-toggle {
    min-height: 34px !important; border-radius: 5px !important;
    font-size: 12px !important; font-weight: 550 !important; padding: 7px 12px;
    transition: background-color 100ms, border-color 100ms; box-shadow: none !important;
}
.btn-primary, .se-primary-btn, .se-login-submit, .se-mail-primary-action, .se-offer-primary-btn {
    background: var(--se-primary) !important; color: var(--se-on-primary) !important; border-color: var(--se-primary) !important;
}
.btn-primary:hover, .se-primary-btn:hover { filter: brightness(.94); }
.btn-secondary, .btn-light, .se-secondary-btn, .se-review-toggle, .se-docs-action {
    color: var(--se-text) !important; background: var(--se-surface) !important; border-color: var(--se-border-strong) !important;
}
.btn-secondary:hover, .btn-light:hover, .se-secondary-btn:hover { background: var(--se-hover) !important; }
.btn-danger, .btn-outline-danger { color: var(--se-danger) !important; background: var(--se-danger-soft) !important; border-color: var(--se-danger) !important; }
.btn-link { background: transparent !important; color: var(--se-primary) !important; }
.se-logger-refresh, .se-logs-refresh { width: 34px; height: 34px; padding: 0 !important; display: inline-grid; place-items: center; }
.se-logger-control-label, .se-mail-field-label, .se-edit-field-label, .form-label { font-size: 11px !important; font-weight: 550 !important; color: var(--se-muted-strong) !important; text-transform: none !important; }
.form-control, .form-select, .Select-control, .Select-menu-outer, .Select-menu, .Select-option,
.dash-table-container input, .dash-table-container select, .dash-table-container textarea,
.mantine-Input-input, .mantine-Textarea-input, .mantine-PasswordInput-input, .mantine-Select-input {
    background: var(--se-surface) !important; color: var(--se-text) !important;
    border-color: var(--se-border-strong) !important; border-radius: 5px;
    font-size: 12px !important; box-shadow: none !important;
}
.form-control:focus, .Select.is-focused > .Select-control { border-color: var(--se-primary) !important; outline: 2px solid var(--se-primary-soft); }
input::placeholder, textarea::placeholder, .Select-placeholder { color: var(--se-muted) !important; opacity: 1; }
.Select-value-label, .Select-input > input { color: var(--se-text) !important; }
.Select-option.is-focused, .Select-option.is-selected { background: var(--se-primary-soft) !important; color: var(--se-primary) !important; }
.Select-menu-outer { border-color: var(--se-border-strong) !important; z-index: 1100; }
.Select--multi .Select-value { background: var(--se-primary-soft) !important; color: var(--se-primary) !important; border-color: var(--se-border) !important; }
.mantine-InputWrapper-label, .mantine-Checkbox-label, .mantine-Switch-label { color: var(--se-text); }
.mantine-InputWrapper-description, .mantine-Input-description { color: var(--se-muted); }
.modal-content, .popover, .toast, .mantine-Popover-dropdown, .mantine-Menu-dropdown, .mantine-Modal-content, .mantine-Notification-root {
    background: var(--se-surface) !important; color: var(--se-text) !important; border: 1px solid var(--se-border) !important; border-radius: 8px !important;
}
.modal-header, .modal-footer { border-color: var(--se-border) !important; background: transparent !important; }
.modal-title { font-size: 17px; font-weight: 600; }
.modal-body { max-height: 76dvh; overflow-y: auto; }
.modal-content { opacity: 1 !important; }
.modal-backdrop { background: #0d1916; }
.list-group-item { background: var(--se-surface) !important; color: var(--se-text); border-color: var(--se-border); }
.alert-warning { background: var(--se-warning-soft); color: var(--se-warning); border-color: var(--se-border); }
.alert-danger { background: var(--se-danger-soft); color: var(--se-danger); border-color: var(--se-border); }
.alert-success, .alert-info { background: var(--se-primary-soft); color: var(--se-primary); border-color: var(--se-border); }

/* Flat tabs and full-width data surfaces, with their own horizontal scroll. */
.tabs, .se-offers-tabs { border: 0 !important; background: transparent !important; }
.tab-container, .tab-parent { min-width: 0; }
.tab { flex: 1 0 auto !important; box-sizing: border-box; width: auto !important; min-width: max-content; background: transparent !important; color: var(--se-muted) !important; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; padding: 11px 16px !important; font-size: 12px !important; font-weight: 500 !important; white-space: nowrap; }
.tab--active, .tab--selected { color: var(--se-primary) !important; border-bottom-color: var(--se-primary) !important; background: transparent !important; }
#user-type-tabs .tab, #user-status-tabs .tab { background: transparent !important; border-radius: 0 !important; padding: 10px 16px !important; border-bottom: 2px solid transparent !important; }
#user-type-tabs .tab--selected, #user-status-tabs .tab--selected { color: var(--se-primary) !important; background: transparent !important; border-bottom-color: var(--se-primary) !important; }
#user-type-tabs-parent, #user-status-tabs-parent { padding: 0 !important; }
.tabs > .tab-container, .tab-container { overflow-x: auto; flex-wrap: nowrap !important; border-bottom: 1px solid var(--se-border); }
.tab-content { padding-top: 16px; }
.se-table-card { padding: 0 !important; border: 0 !important; border-radius: 0 !important; }
.dash-table-container { width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.dash-table-container .dash-spreadsheet-container { border: 1px solid var(--se-border) !important; border-radius: 5px !important; background: var(--se-surface) !important; }
.dash-table-container .dash-spreadsheet-inner th, .dash-table-container .dash-spreadsheet-inner td { border-color: var(--se-border) !important; }
.dash-table-container .dash-spreadsheet-inner th { background: var(--se-surface-alt) !important; color: var(--se-muted-strong) !important; font-size: 11px !important; height: 38px; }
.dash-table-container .dash-spreadsheet-inner td { color: var(--se-text) !important; font-size: 12px !important; line-height: 1.45; }
.dash-table-container .cell-markdown p { margin: 0; }
.dash-table-container .cell-markdown .se-photo { width: 28px !important; height: 28px !important; min-width: 28px; object-fit: cover; }
.dash-table-container td[data-dash-column="MESSAGE"] .dash-cell-value,
.dash-table-container td[data-dash-column="REQUEST"] .dash-cell-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 460px; }
.dash-table-container .dash-filter { background: var(--se-surface) !important; }
.dash-table-container .dash-filter input { background: transparent !important; color: var(--se-muted) !important; border: 0 !important; min-height: 30px; }
.dash-table-container .dash-cell.focused { box-shadow: inset 0 0 0 1px var(--se-primary) !important; }
.dash-table-container .previous-next-container { background: var(--se-page-bg) !important; color: var(--se-muted); border: 0 !important; min-height: 48px; }
.dash-table-container .previous-next-container button { color: var(--se-muted) !important; background: var(--se-surface) !important; border: 1px solid var(--se-border) !important; border-radius: 4px; min-width: 28px; min-height: 28px; }
.dash-table-container .dash-table-tooltip { background: var(--se-surface) !important; color: var(--se-text) !important; border: 1px solid var(--se-border) !important; }
.dash-spreadsheet-menu { color: var(--se-muted); }
.se-calendar-graph, .se-map-graph { min-width: 0; }
.se-docs-summary { border: 0; padding: 0; background: transparent; }
.se-docs-action-primary { color: var(--se-on-primary) !important; background: var(--se-primary) !important; border-color: var(--se-primary) !important; }
.se-docs-restricted { color: var(--se-warning); background: var(--se-warning-soft); border-color: var(--se-border); }
.se-logs-toolbar { border: 0 !important; border-bottom: 1px solid var(--se-border) !important; border-radius: 0 !important; }
.se-logs-toolbar .card-body { padding: 0 0 20px !important; }
.se-logs-actions { height: 56px; align-items: flex-end; padding-bottom: 1px; }
.se-logs-card { border: 0 !important; }
.se-logs-card .card-body { padding: 0 !important; }
.se-logs-output { background: var(--se-surface-alt) !important; color: var(--se-text) !important; border: 1px solid var(--se-border) !important; padding: 18px !important; font-size: 11px; line-height: 1.75; }
.se-mail-template-preview { background: #ffffff !important; color: #202727 !important; }
.se-mail-workspace .row { background: transparent !important; }
.se-offer-calendar-head, .se-calendar-nav { background: transparent !important; }
.se-offer-calendar-head .row { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between !important; gap: 6px !important; width: 100% !important; margin: 0 !important; }
.se-offer-calendar-head .row > [class*="col"] { flex: 0 0 auto !important; width: auto !important; max-width: none !important; padding: 0 !important; }
.se-offer-calendar-head .row > [class*="col"]:nth-child(2) { flex: 1 1 auto !important; min-width: 0 !important; text-align: center !important; }

/* Inbox: one workspace, list / thread / context, restrained message bubbles. */
.se-chat-page { height: calc(100dvh - 114px) !important; min-height: 480px !important; }
.se-chat-workspace { height: 100% !important; border: 0 !important; background: var(--se-page-bg) !important; border-radius: 0 !important; }
.se-chat-panel { width: 300px !important; flex: 0 0 300px; padding: 0 20px 0 0 !important; border: 0 !important; border-right: 1px solid var(--se-border) !important; border-radius: 0 !important; background: transparent !important; }
.se-chat-panel-head { padding-bottom: 14px; }
.se-chat-panel .se-page-title { font-size: 24px !important; }
.se-chat-thread { padding: 0 !important; background: var(--se-page-bg) !important; border: 0 !important; min-width: 0; }
.se-chat-thread-wrapper { border: 0 !important; border-radius: 0 !important; background: var(--se-page-bg) !important; }
.se-chat-header, .se-chat-input-bar { background: var(--se-page-bg) !important; border-color: var(--se-border) !important; }
.se-chat-details-panel { background: var(--se-surface-alt) !important; border-color: var(--se-border) !important; }
.se-chat-messages { background: var(--se-page-bg) !important; padding: 24px !important; }
.se-chat-message { font-size: 13px !important; line-height: 1.6 !important; padding: 10px 14px !important; max-width: min(560px, 78%) !important; box-shadow: none !important; }
.se-chat-message--admin { background: var(--se-primary-soft) !important; color: var(--se-text) !important; border: 0 !important; }
.se-chat-message--user { background: var(--se-surface-alt) !important; color: var(--se-text) !important; border: 1px solid var(--se-border) !important; }
.se-chat-message-timestamp { font-size: 10px !important; color: var(--se-muted); }
.se-chat-panel { min-height: 0; overflow: hidden; }
.se-chat-panel > :not(.se-chat-list) { flex-shrink: 0; }
.se-chat-list { min-width: 0; overflow-x: hidden; padding-right: 3px; }
.se-chat-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; flex: 0 0 84px; min-height: 84px !important; border: 0 !important; border-radius: 5px !important; padding: 10px 8px !important; background: transparent !important; box-shadow: none !important; }
.se-chat-item-avatar-wrap { min-width: 0 !important; }
.se-chat-item-content { min-width: 0; width: 100%; }
.chat-item-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px; }
.se-chat-item-title { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.chat-item-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 17px !important; }
.chat-item-timestamp { white-space: nowrap; line-height: 17px; }
.se-chat-item .se-chat-pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 1px 5px !important; line-height: 15px; }
.chat-item-body { min-width: 0; gap: 4px; margin-top: 3px; }
.chat-item-preview { flex: 1 1 0; min-width: 0; line-height: 16px; }
.se-chat-item-meta { flex: 0 0 auto; }
.se-chat-filters { display: flex; gap: 4px !important; overflow: visible; padding: 0; }
.se-chat-filters .form-check { flex: 1 1 0; min-width: 0; padding: 0; margin: 0 !important; }
.se-chat-filter-label-item { display: flex; align-items: center; justify-content: center; width: 100%; padding: 5px 6px !important; border-radius: 4px !important; }
.se-chat-item:hover { background: var(--se-hover) !important; }
.se-chat-item--pending { background: var(--se-primary-soft) !important; }
.se-chat-metric, .se-chat-header-stat { background: var(--se-surface-alt) !important; border: 0 !important; }
.se-chat-user-card { border: 0 !important; border-bottom: 1px solid var(--se-border) !important; border-radius: 0 !important; background: transparent !important; }
.se-chat-content-shell { grid-template-columns: minmax(0, 1fr) 250px !important; }
.se-chat-content-shell--details-hidden { grid-template-columns: minmax(0, 1fr) !important; }
.se-chat-filter-label-item { color: var(--se-muted) !important; background: transparent !important; border-color: var(--se-border) !important; }
.se-chat-filter-input:checked + .se-chat-filter-label-item { color: var(--se-primary) !important; background: var(--se-primary-soft) !important; border-color: var(--se-primary-soft) !important; }
.se-logger-control:has(.se-logger-refresh) { flex: 0 0 34px !important; min-width: 34px !important; width: 34px !important; }
.se-logger-refresh { display: inline-flex; align-items: center; justify-content: center; width: 34px !important; min-width: 34px !important; height: 34px; padding: 0 !important; }

/* Login is a form, not a marketing page. */
.login-wrapper, .se-login-page { min-height: 100dvh; display: grid; place-items: center; background: var(--se-sidebar-bg) !important; padding: 24px !important; }
.se-login-card { width: min(100%, 380px) !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.se-login-card-header { padding: 0 0 28px !important; border: 0 !important; background: transparent !important; text-align: left; display: block !important; }
.se-login-logo { width: 40px !important; height: 40px !important; margin: 0 0 16px !important; object-fit: contain; }
.se-login-brand { font-size: 14px; font-weight: 600; color: var(--se-muted); margin-bottom: 5px; }
.se-login-title { font-size: 27px; font-weight: 600; margin: 0; }
.se-login-card-body { padding: 0 !important; }
.se-login-card .mantine-Input-input, .se-login-card .mantine-PasswordInput-input { min-height: 42px; }
.se-login-submit { min-height: 42px !important; font-size: 13px !important; }
.se-login-link { color: var(--se-muted) !important; font-weight: 400 !important; }

@media (max-width: 1280px) and (min-width: 981px) {
    :root { --se-sidebar-width: 200px; }
    #layout-root .layout-content { padding: 24px !important; }
    .se-chat-content-shell { grid-template-columns: minmax(0, 1fr) !important; }
    .se-chat-details-panel { display: none; }
    .se-chat-panel { width: 260px !important; flex-basis: 260px; }
}
@media (max-width: 980px) {
    :root, #layout-root.layout-root { --se-sidebar-width: 0px !important; }
    #layout-root .se-sidebar { width: 240px !important; transform: translateX(-100%); padding: 0 12px 14px !important; z-index: 1060; }
    #layout-root .layout-sidebar.is-collapsed { transform: translateX(0); width: 240px !important; }
    .se-workspace { margin-left: 0; }
    .se-workspace-topbar { height: 56px; padding: 0 16px; gap: 10px; }
    .se-breadcrumb-root, .se-breadcrumb > svg { display: none; }
    .se-theme-control { top: 12px; right: 16px; }
    #layout-root .layout-content { padding: 22px 16px 32px !important; }
    #layout-root:has(.layout-sidebar.is-collapsed) .se-sidebar-backdrop { display: block; position: fixed; inset: 0; background: #0b161775; border: 0; z-index: 1050; }
    .se-page-title, .se-logger-page h1 { font-size: 22px !important; }
    .se-page-header, .se-logger-hero { margin-bottom: 20px !important; gap: 16px; }
    .se-logger-controls { justify-content: flex-start; gap: 10px; }
    .se-stats-card-value, .se-logger-kpi-value { font-size: 25px !important; }
    .se-offer-filter, .se-page-actions .Select-control { min-width: 0 !important; max-width: 100%; }
    .se-page-actions > div { min-width: 0; max-width: 100%; }
    .se-page-actions .Select { width: 100%; min-width: 0 !important; }
    .se-chat-page { height: auto !important; min-height: 0 !important; }
    .se-chat-workspace { display: block !important; height: auto !important; overflow: visible !important; }
    .se-chat-panel { width: 100% !important; padding: 0 0 20px !important; border: 0 !important; border-bottom: 1px solid var(--se-border) !important; }
    .se-chat-list { max-height: 330px; overflow-y: auto; }
    .se-chat-thread, .se-chat-thread-wrapper { min-height: 480px !important; }
    .se-chat-content-shell, .se-chat-content-shell--details-hidden { display: block !important; }
    .se-chat-details-panel { display: block; margin: 0 !important; }
    .se-chat-details-panel--hidden { display: none !important; }
    .se-chat-messages { padding: 16px 0 !important; }
    .se-chat-message { max-width: 94% !important; }
    .se-chat-header { flex-wrap: wrap; gap: 10px; }
    .se-logs-actions { height: 34px; }
    .se-docs-actions { display: flex; }
    .se-skip-link { left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
    #page-loader::after { width: 100%; transform: none; }
}
