:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2933;
    background: #f4f6f9;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    background: #f4f6f9;
}

button,
a {
    font: inherit;
}

.app-shell {
    height: 100vh;
    color: #1f2933;
    background: #f4f6f9;
    overflow: hidden;
    transition: background-color 160ms ease, color 160ms ease;
}

.theme-dark {
    color-scheme: dark;
    color: #e6edf5;
    background: #111923;
}

.auth-shell {
    display: flex;
    flex-direction: column;
}

.auth-topbar {
    flex: 0 0 64px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: #ffffff;
    border-bottom: 1px solid #d6dde5;
}

.theme-dark .auth-topbar {
    background: #172232;
    border-bottom-color: #2b3a4c;
}

.brand {
    font-size: 20px;
    font-weight: 800;
    color: #1d3348;
    text-decoration: none;
}

.theme-dark .brand {
    color: #edf4fb;
}

.workspace-shell {
    height: 100vh;
    min-height: 0;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    overflow: hidden;
}

.sidebar-rail {
    z-index: 30;
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 8px 8px 12px;
    background: #100019;
    color: #f7f4fb;
    overflow: hidden;
}

.rail-logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #ffffff;
    color: #66b90f;
    text-decoration: none;
    font-size: 24px;
}

.rail-nav {
    width: 100%;
    display: grid;
    gap: 8px;
}

.rail-button,
.icon-button,
.user-avatar {
    border: 0;
    cursor: pointer;
}

.rail-button {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: transparent;
    color: #e6dff0;
    font-size: 19px;
}

.rail-button:hover,
.rail-button.active {
    background: #24102f;
    color: #9bdc31;
}

.user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    margin-top: auto;
    border-radius: 50%;
    background: #73c914;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.user-avatar.large {
    width: 46px;
    height: 46px;
    margin: 0;
    color: #73c914;
    background: #edf9df;
}

.side-flyout,
.user-panel {
    z-index: 40;
    position: fixed;
    left: 58px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 56px rgba(21, 30, 42, 0.18);
}

.side-flyout {
    top: 32px;
    width: 300px;
    max-height: calc(100vh - 64px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 14px;
}

.compact-flyout {
    display: grid;
    gap: 14px;
}

.menu-section {
    padding: 0 0 16px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e7ecf2;
}

.menu-section:last-child {
    margin-bottom: 0;
    border-bottom: 0;
}

.menu-section h2,
.compact-flyout h2 {
    margin: 0 0 10px;
    color: #758296;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.menu-item {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 6px;
    padding: 5px 8px;
    color: #2d3748;
    font-weight: 750;
    text-decoration: none;
}

.menu-item:hover,
.menu-item.active {
    background: #f2fae8;
    color: #1f2933;
}

.menu-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #eef9e0;
    color: #73c914;
    font-size: 14px;
}

.flyout-hint {
    color: #687789;
    font-size: 14px;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 3px;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border: 2px solid #100019;
    border-radius: 999px;
    padding: 0 4px;
    background: #d93025;
    color: #ffffff;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
}

.toast-stack {
    z-index: 75;
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: min(380px, calc(100vw - 40px));
    display: grid;
    gap: 10px;
}

.inbox-toast {
    min-height: 86px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    align-items: start;
    gap: 12px;
    border: 1px solid #cfd8e3;
    border-left: 4px solid #68b915;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    color: #1f2933;
    box-shadow: 0 18px 42px rgba(21, 30, 42, 0.22);
    cursor: pointer;
}

.inbox-toast:hover,
.inbox-toast:focus-visible {
    border-color: #9ecdf7;
    outline: 0;
    transform: translateY(-1px);
}

.inbox-toast.high {
    border-left-color: #d9822b;
}

.inbox-toast.critical {
    border-left-color: #d93025;
}

.toast-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eef9e0;
    color: #68b915;
    font-size: 17px;
}

.inbox-toast.high .toast-icon {
    background: #fff3df;
    color: #b35c00;
}

.inbox-toast.critical .toast-icon {
    background: #ffe8e6;
    color: #c2261c;
}

.toast-content {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.toast-content small {
    color: #0d66b3;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.toast-content strong,
.toast-content span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toast-content strong {
    font-size: 14px;
    font-weight: 850;
}

.toast-content span {
    color: #687789;
    font-size: 12px;
    font-weight: 650;
}

.toast-close {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #687789;
    cursor: pointer;
}

.toast-close:hover,
.toast-close:focus-visible {
    background: #edf2f7;
    color: #1f2933;
    outline: 0;
}


.user-panel {
    bottom: 14px;
    width: 360px;
    padding: 18px;
}

.user-panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 0 14px;
    border-bottom: 1px solid #dfe5ec;
}

.user-panel-header strong,
.user-panel-header span {
    display: block;
}

.user-panel-header span {
    margin-top: 2px;
    color: #667789;
}

.user-panel-row {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 6px;
    padding: 0 8px;
    background: transparent;
    color: #1f2933;
    cursor: pointer;
}

.user-panel-row:hover {
    background: #f4f8fb;
}

.user-panel-row span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.user-panel-row i {
    color: #73c914;
}

.version-row {
    margin-top: 6px;
    border-top: 1px solid #dfe5ec;
    padding-top: 8px;
}

.version-text {
    min-width: 0;
    display: grid;
    gap: 2px;
    text-align: left;
}

.version-text strong,
.version-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.version-text strong {
    color: #1f2933;
    font-size: 14px;
    font-weight: 850;
}

.version-text small {
    color: #657386;
    font-size: 12px;
    font-weight: 800;
}

.quick-access-backdrop {
    z-index: 80;
    position: fixed;
    inset: 0;
    display: grid;
    place-items: start center;
    padding: 76px 24px 24px;
    background: rgba(15, 23, 33, 0.28);
}

.quick-access-panel {
    width: min(680px, 100%);
    max-height: min(680px, calc(100vh - 112px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.quick-access-header {
    flex: 0 0 auto;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 14px;
    border-bottom: 1px solid #dfe5ec;
}

.quick-access-header h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.quick-access-search {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 16px 18px 10px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    padding: 0 12px;
    background: #f8fafc;
    color: #657386;
}

.quick-access-search:focus-within {
    border-color: #2f80d1;
    box-shadow: 0 0 0 3px rgba(47, 128, 209, 0.16);
}

.quick-access-search input {
    width: 100%;
    height: 46px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1f2933;
    font-size: 16px;
    font-weight: 650;
}

.quick-access-search span {
    border: 1px solid #d6dde5;
    border-radius: 5px;
    padding: 2px 7px;
    background: #ffffff;
    color: #657386;
    font-size: 12px;
    font-weight: 800;
}

.quick-access-list {
    min-height: 0;
    display: grid;
    gap: 6px;
    overflow: auto;
    padding: 4px 18px 16px;
}

.quick-access-item {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 10px;
    background: transparent;
    color: #1f2933;
    text-align: left;
    cursor: pointer;
}

.quick-access-item:hover,
.quick-access-item.active {
    border-color: #9ecdf7;
    background: #edf7ff;
}

.quick-access-item.disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.quick-access-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eef9e0;
    color: #68b915;
    font-size: 17px;
}

.quick-access-text {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.quick-access-text strong,
.quick-access-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-access-text strong {
    font-size: 14px;
    font-weight: 850;
}

.quick-access-text small,
.quick-access-state,
.quick-access-enter {
    color: #687789;
    font-size: 12px;
    font-weight: 800;
}

.quick-access-enter {
    font-size: 15px;
}

.quick-access-state {
    border-radius: 999px;
    padding: 3px 8px;
    background: #eef2f6;
}

.quick-access-empty {
    min-height: 120px;
    display: grid;
    place-items: center;
    gap: 8px;
    color: #687789;
    font-weight: 750;
}

.quick-access-empty i {
    font-size: 22px;
}

.quick-access-footer {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 22px 16px;
    border-top: 1px solid #dfe5ec;
    color: #687789;
    font-size: 12px;
    font-weight: 800;
}

.quick-access-footer span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.state-pill {
    min-width: 36px;
    border-radius: 999px;
    padding: 2px 8px;
    background: #fff0c6;
    color: #8a6500;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.workspace-main {
    min-width: 0;
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-topbar {
    flex: 0 0 52px;
    min-height: 52px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px 0 0;
    background: #100019;
}

.tab-strip {
    min-width: 0;
    display: flex;
    align-items: end;
    gap: 8px;
    padding-left: 0;
}

.app-tab {
    min-width: 148px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px 8px 0 0;
    padding: 0 16px;
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

.app-tab.active {
    background: #ffffff;
    color: #1f2933;
}

.app-tab i:first-child {
    color: #73c914;
}

.tab-with-close {
    padding: 0 8px 0 0;
}

.tab-link {
    min-width: 0;
    height: 100%;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 0 16px;
    color: inherit;
    text-decoration: none;
}

.tab-close-button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 5px;
    margin-left: auto;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 18px;
}

.tab-close-button:hover {
    background: rgba(31, 41, 51, 0.1);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-button {
    position: relative;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: transparent;
    color: #f7f4fb;
    font-size: 18px;
}

.icon-button:hover,
.light-button {
    background: rgba(255, 255, 255, 0.12);
}

.auth-topbar .icon-button {
    color: #1f2933;
}

.auth-topbar .light-button {
    background: #eef2f6;
}

.page-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 32px 24px 48px;
    background: #ffffff;
}

.theme-dark .page-content {
    background: #111923;
}

.login-page {
    display: grid;
    min-height: calc(100vh - 144px);
    place-items: center;
}

.login-panel {
    width: min(460px, 100%);
    padding: 30px;
}

.login-heading {
    margin-bottom: 22px;
}

.dx-surface {
    border: 1px solid #d6dde5;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(31, 41, 51, 0.08);
}

.theme-dark .dx-surface,
.theme-dark .side-flyout,
.theme-dark .user-panel {
    border-color: #2b3a4c;
    background: #172232;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.theme-dark .menu-section,
.theme-dark .user-panel-header,
.theme-dark .version-row,
.theme-dark .quick-access-header,
.theme-dark .quick-access-footer {
    border-color: #2b3a4c;
}

.theme-dark .menu-item,
.theme-dark .user-panel-row,
.theme-dark .quick-access-item,
.theme-dark .quick-access-search input {
    color: #e6edf5;
}

.theme-dark .menu-item:hover,
.theme-dark .menu-item.active,
.theme-dark .user-panel-row:hover,
.theme-dark .quick-access-item:hover,
.theme-dark .quick-access-item.active {
    background: #213145;
}

.theme-dark .quick-access-backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.theme-dark .quick-access-search {
    border-color: #2b3a4c;
    background: #111923;
    color: #a7b6c8;
}

.theme-dark .quick-access-search span,
.theme-dark .quick-access-state {
    border-color: #2b3a4c;
    background: #172232;
    color: #a7b6c8;
}

.theme-dark .quick-access-item:hover,
.theme-dark .quick-access-item.active {
    border-color: #4aa3ff;
}

.theme-dark .version-row span:last-child,
.theme-dark .changelog-entry header {
    color: #a7b6c8;
}

.theme-dark .changelog-entry {
    border-color: #2b3a4c;
    background: #172232;
}

.theme-dark .changelog-entry.current {
    border-color: #609b46;
    background: #1b2c24;
}

.theme-dark .version-badge {
    background: #213145;
    color: #b8f49e;
}

.theme-dark .changelog-entry ul {
    color: #d8e3ee;
}

.theme-dark .app-tab.active {
    background: #111923;
    color: #edf4fb;
}

.theme-dark .tab-close-button:hover {
    background: rgba(237, 244, 251, 0.12);
}

h1 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.2;
}

.muted {
    margin: 0;
    color: #657386;
}

.theme-dark .muted,
.theme-dark .counter,
.theme-dark .empty-state,
.theme-dark .flyout-hint,
.theme-dark .user-panel-header span {
    color: #a7b6c8;
}

.theme-dark .notification-search {
    border-color: #2b3a4c;
    background: #172232;
    color: #a7b6c8;
}

.theme-dark .notification-search input {
    color: #edf4fb;
}

.theme-dark .inbox-toast {
    border-color: #2b3a4c;
    background: #172232;
    color: #edf4fb;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.theme-dark .inbox-toast:hover,
.theme-dark .inbox-toast:focus-visible {
    border-color: #33658f;
}

.theme-dark .toast-icon {
    background: rgba(115, 201, 20, 0.14);
    color: #9bdc31;
}

.theme-dark .inbox-toast.high .toast-icon {
    background: rgba(217, 130, 43, 0.16);
    color: #ffbf75;
}

.theme-dark .inbox-toast.critical .toast-icon {
    background: rgba(217, 48, 37, 0.18);
    color: #ff9b94;
}

.theme-dark .toast-content small {
    color: #69b6ff;
}

.theme-dark .toast-content span,
.theme-dark .toast-close {
    color: #a7b6c8;
}

.theme-dark .toast-close:hover,
.theme-dark .toast-close:focus-visible {
    background: #263346;
    color: #edf4fb;
}

.theme-dark .inbox-cell-button:hover,
.theme-dark .inbox-cell-button:focus-visible {
    background: #1b3145;
}

.theme-dark .inbox-state,
.theme-dark .inbox-priority {
    background: #263346;
    color: #cbd7e6;
}

.theme-dark .inbox-state.unread {
    background: rgba(74, 163, 255, 0.16);
    color: #9fd0ff;
}

.theme-dark .inbox-priority.high {
    background: rgba(217, 130, 43, 0.16);
    color: #ffbf75;
}

.theme-dark .inbox-priority.critical {
    background: rgba(217, 48, 37, 0.18);
    color: #ff9b94;
}

.theme-dark .inbox-title-button small {
    color: #a7b6c8;
}

.eyebrow {
    margin: 0 0 8px;
    color: #0d66b3;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.theme-dark .eyebrow {
    color: #69b6ff;
}

.login-form {
    margin-bottom: 18px;
}

.full-width-button {
    width: 100%;
}

.alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #e0a6a6;
    border-radius: 6px;
    background: #fff1f1;
    color: #8d2424;
}

.theme-dark .alert {
    border-color: #7f3434;
    background: #321f24;
    color: #ffb8b8;
}

.success-alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #a8d88a;
    border-radius: 6px;
    background: #f2fae8;
    color: #2d6e16;
    font-weight: 700;
}

.theme-dark .success-alert {
    border-color: #3f6832;
    background: #1d2c20;
    color: #b8f49e;
}

.active-log-view {
    border-color: var(--accent);
    color: var(--accent);
}

.active-filter {
    border-color: var(--accent);
    color: var(--accent);
}

.log-detail-dialog {
    width: min(980px, calc(100vw - 48px));
    max-height: calc(100dvh - 56px);
}

.log-detail-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 2px 2px;
    overflow-y: auto;
}

.log-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.log-detail-list div {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-muted);
}

.log-detail-list span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.log-detail-list strong {
    display: block;
    color: var(--text);
    overflow-wrap: anywhere;
}

.log-json-section {
    margin-top: 14px;
}

.log-json-section h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.log-json-section pre {
    margin: 0;
    padding: 14px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f8fafc;
    color: #172033;
    font: 0.88rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.theme-dark .log-json-section pre {
    background: #0b1220;
    color: #dbeafe;
}

.work-page {
    max-width: none;
    margin: 0;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.dashboard-page .page-header {
    margin-bottom: 14px;
}

.button-row,
.grid-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grid-actions {
    flex-wrap: wrap;
}

.invoice-grid-actions {
    flex-wrap: nowrap;
    gap: 6px;
}

.toggle-row {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid #d6dde5;
    border-radius: 6px;
    background: #ffffff;
    color: #1f2933;
    font-weight: 750;
    cursor: pointer;
}

.toggle-row input {
    width: 16px;
    height: 16px;
    accent-color: #0d66b3;
}

.theme-dark .toggle-row {
    border-color: #2b3a4c;
    background: #172232;
    color: #e6edf5;
}

.action-icon-button {
    width: 32px;
    height: 30px;
    min-width: 32px;
    padding-inline: 0;
}

.action-icon-button .dxbl-btn-caption {
    display: none;
}

.action-icon-button.danger {
    --dxbl-btn-bg: #c62828;
    --dxbl-btn-hover-bg: #ad2020;
    --dxbl-btn-active-bg: #8d1a1a;
}

.toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
    padding: 16px;
    box-shadow: none;
}

.invoice-outbox-filter {
    align-items: flex-start;
}

.invoice-filter-fields {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 14px;
}

.invoice-filter-fields .form-field {
    min-width: 180px;
}

.invoice-filter-load-button {
    min-height: 38px;
    height: 38px;
}

.invoice-outbox-summary {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.summary-divider {
    width: 1px;
    height: 24px;
    margin: 0 6px;
    background: #d6dde5;
}

.theme-dark .summary-divider {
    background: #2b3a4c;
}

.notification-search {
    width: min(360px, 100%);
    min-height: 38px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border: 1px solid #cfd8e3;
    border-radius: 7px;
    padding: 0 10px;
    background: #ffffff;
    color: #657386;
}

.notification-search:focus-within {
    border-color: #2f80d1;
    box-shadow: 0 0 0 3px rgba(47, 128, 209, 0.16);
}

.notification-search input {
    width: 100%;
    height: 36px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1f2933;
    font-weight: 650;
}

.search-field {
    width: min(460px, 100%);
    display: grid;
    gap: 8px;
}

label {
    font-weight: 650;
}

.counter {
    color: #657386;
    font-weight: 650;
    white-space: nowrap;
}

.thermal-grid {
    border: 1px solid #d6dde5;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(31, 41, 51, 0.06);
}

.theme-dark .thermal-grid {
    border-color: #2b3a4c;
    background: #172232;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

.dashboard-grid-layout {
    width: 100%;
}

.dashboard-grid-layout-maximized {
    min-height: calc(100vh - 178px);
}

.dashboard-widget {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: none;
}

.dashboard-widget-header {
    height: 88px;
    flex: 0 0 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #d6dde5;
    padding: 16px;
}

.dashboard-widget-header > div:first-child {
    min-width: 0;
}

.theme-dark .dashboard-widget-header {
    border-color: #2b3a4c;
}

.dashboard-widget-header h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
}

.dashboard-widget-header p {
    margin: 4px 0 0;
}

.dashboard-widget-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.dashboard-widget-metric {
    min-width: 86px;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 5px;
    color: #1f2933;
    white-space: nowrap;
}

.dashboard-widget-metric strong {
    font-size: 22px;
    line-height: 1;
}

.dashboard-widget-metric span {
    color: #657386;
    font-weight: 750;
}

.theme-dark .dashboard-widget-metric {
    color: #e6edf5;
}

.theme-dark .dashboard-widget-metric span {
    color: #9fb0c3;
}

.dashboard-widget-icon-button {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 32px;
    border: 1px solid #d6dde5;
    border-radius: 6px;
    background: #ffffff;
    color: #657386;
    cursor: pointer;
}

.dashboard-widget-icon-button:hover,
.dashboard-widget-icon-button:focus-visible {
    border-color: #7eb23d;
    color: #1f2933;
    outline: none;
}

.theme-dark .dashboard-widget-icon-button {
    border-color: #2b3a4c;
    background: #172232;
    color: #9fb0c3;
}

.theme-dark .dashboard-widget-icon-button:hover,
.theme-dark .dashboard-widget-icon-button:focus-visible {
    border-color: #7eb23d;
    color: #e6edf5;
}

.dashboard-order-grid {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.dashboard-widget-small {
    padding: 18px;
}

.dashboard-widget-action {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.dashboard-widget-action:hover,
.dashboard-widget-action:focus-visible {
    border-color: #7eb23d;
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.10);
    transform: translateY(-1px);
    outline: none;
}

.theme-dark .dashboard-widget-action:hover,
.theme-dark .dashboard-widget-action:focus-visible {
    border-color: #7eb23d;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.dashboard-small-widget-content {
    height: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.dashboard-small-widget-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eef9e0;
    color: #5fb865;
    font-size: 22px;
}

.theme-dark .dashboard-small-widget-icon {
    background: #213145;
}

.dashboard-small-widget-content h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
}

.dashboard-small-widget-content p {
    margin: 2px 0 0;
}

.dashboard-small-widget-value {
    margin-top: 6px;
    font-size: 28px;
    line-height: 1;
    font-weight: 850;
}

.dashboard-order-lookup-widget {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.dashboard-order-lookup-input {
    margin-top: 12px;
}

.dashboard-widget-body {
    flex: 1 1 auto;
    min-height: 0;
}

.dashboard-widget-body .empty-state {
    height: 100%;
    display: grid;
    align-items: center;
}

.dashboard-order-body {
    overflow: auto;
}

.dashboard-oven-body {
    display: flex;
    min-height: 0;
}

.dashboard-oven-chart {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 12px;
}

.notification-grid .dxbl-grid-table > tbody > tr {
    cursor: default;
}

.inbox-cell-button {
    width: 100%;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border: 0;
    border-radius: 5px;
    padding: 2px 4px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.inbox-cell-button:hover,
.inbox-cell-button:focus-visible {
    background: #f2fae8;
    outline: 0;
}

.inbox-state,
.inbox-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 2px 9px;
    background: #edf2f7;
    color: #4a5568;
    font-size: 12px;
    font-weight: 850;
}

.inbox-state {
    border: 0;
    cursor: pointer;
}

.inbox-state:hover,
.inbox-state:focus-visible {
    box-shadow: 0 0 0 3px rgba(47, 128, 209, 0.16);
    outline: 0;
}

.inbox-state.unread {
    background: #e6f2ff;
    color: #0d66b3;
}

.inbox-priority.high {
    background: #fff3df;
    color: #9c4b00;
}

.inbox-priority.critical {
    background: #ffe8e6;
    color: #b42318;
}

.inbox-kind {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 750;
}

.inbox-kind i {
    color: #68b915;
}

.inbox-title-button {
    display: grid;
    gap: 3px;
}

.inbox-title-button strong,
.inbox-title-button small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-title-button strong {
    font-weight: 850;
}

.inbox-title-button small {
    color: #687789;
    font-size: 12px;
    font-weight: 650;
}

.notification-detail-dialog {
    width: min(760px, calc(100vw - 48px));
    max-height: calc(100dvh - 56px);
}

.notification-detail-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 2px 2px;
    overflow-y: auto;
}

.notification-detail-body p {
    margin: 0 0 18px;
    color: var(--text);
    font-weight: 650;
}

.message-compose-dialog {
    width: min(760px, calc(100vw - 48px));
}

.message-compose-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    gap: 16px;
    padding: 18px 24px;
    overflow-y: auto;
}

.message-compose-body input,
.message-compose-body textarea {
    width: 100%;
    border: 1px solid #d6dee8;
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    background: #fff;
    font: inherit;
}

.message-compose-body textarea {
    min-height: 150px;
    resize: vertical;
}

.recipient-tagbox {
    width: 100%;
}

.message-compose-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 24px 18px;
}

.chat-shell {
    height: min(720px, calc(100dvh - 210px));
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    overflow: hidden;
}

.chat-thread-list {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #dfe5ec;
    background: #f8fafc;
}

.chat-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px;
    padding: 8px 10px;
    border: 1px solid #d6dee8;
    border-radius: 8px;
    background: #fff;
}

.chat-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
}

.chat-thread-items {
    min-height: 0;
    overflow-y: auto;
}

.chat-thread-item {
    width: 100%;
    min-height: 74px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #e5ebf2;
    color: var(--text);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.chat-thread-item:hover,
.chat-thread-item.active {
    background: #eef6ff;
}

.chat-thread-item strong,
.chat-thread-item small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-thread-item small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 650;
}

.chat-thread-meta {
    display: grid;
    justify-items: end;
    align-content: start;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.chat-unread-badge {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 99px;
    padding: 0 7px;
    color: #102235;
    background: #b8f27e;
    font-size: 11px;
    font-weight: 900;
}

.chat-conversation {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: #fff;
}

.chat-conversation-header {
    padding: 18px 22px;
    border-bottom: 1px solid #dfe5ec;
}

.chat-conversation-header h2 {
    margin: 0;
    font-size: 22px;
}

.chat-conversation-header span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-weight: 700;
}

.chat-message-list {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 22px;
    overflow-y: auto;
    background: #f7f9fb;
}

.chat-message {
    display: flex;
    justify-content: flex-start;
}

.chat-message.own {
    justify-content: flex-end;
}

.chat-message > div {
    max-width: min(620px, 78%);
    padding: 12px 14px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(21, 30, 42, 0.06);
}

.chat-message.own > div {
    border-color: #afd889;
    background: #f1f8e9;
}

.chat-message header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.chat-message p {
    margin: 0;
    white-space: pre-wrap;
}

.chat-reply-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    border-top: 1px solid #dfe5ec;
    background: #fff;
}

.chat-reply-box .field-error {
    grid-column: 1 / -1;
}

.chat-reply-box textarea {
    width: 100%;
    min-height: 76px;
    border: 1px solid #d6dee8;
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    background: #fff;
    font: inherit;
    resize: vertical;
}

.chat-placeholder,
.chat-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 220px;
    padding: 28px;
    color: var(--muted);
    font-weight: 750;
    text-align: center;
}

.chat-placeholder i {
    font-size: 34px;
}

.empty-state {
    padding: 28px;
    color: #657386;
}

.access-denied-page {
    min-height: min(560px, 100%);
    display: grid;
    place-items: center;
}

.access-denied-panel {
    width: min(560px, 100%);
    display: grid;
    justify-items: center;
    gap: 18px;
    padding: 34px;
    text-align: center;
}

.access-denied-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef9e0;
    color: #68b817;
    font-size: 27px;
}

.access-denied-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border: 1px solid #d6dde5;
    border-radius: 6px;
    color: #1d3348;
    font-weight: 750;
    text-decoration: none;
}

.access-denied-link:hover {
    background: #f2fae8;
}

.theme-dark .access-denied-icon {
    background: #213145;
    color: #9bdc31;
}

.theme-dark .access-denied-link {
    border-color: #2b3a4c;
    color: #edf4fb;
}

.theme-dark .access-denied-link:hover {
    background: #213145;
}

.modal-backdrop {
    z-index: 80;
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(12, 20, 30, 0.36);
}

.editor-dialog,
.confirm-dialog {
    width: min(980px, 100%);
    max-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(21, 30, 42, 0.24);
}

.confirm-dialog {
    width: min(500px, 100%);
    padding: 22px;
}

.changelog-dialog {
    width: min(720px, 100%);
    max-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(21, 30, 42, 0.24);
}

.dialog-header,
.dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dialog-header {
    padding: 22px 24px 16px;
    border-bottom: 1px solid #dfe5ec;
}

.confirm-dialog .dialog-header {
    padding: 0 0 16px;
}

.dialog-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.dialog-close {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: transparent;
    color: #657386;
}

.dialog-close:hover {
    background: #eef3f8;
    color: #1f2933;
}

.editor-body {
    min-height: 0;
    overflow: auto;
    padding: 22px 24px;
}

.changelog-body {
    min-height: 0;
    display: grid;
    gap: 12px;
    overflow: auto;
    padding: 18px 22px 22px;
}

.changelog-entry {
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    padding: 14px 16px;
    background: #ffffff;
}

.changelog-entry.current {
    border-color: #9ed17d;
    background: #f7fcf0;
}

.changelog-entry header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #657386;
    font-size: 12px;
    font-weight: 800;
}

.version-badge {
    border-radius: 999px;
    padding: 3px 9px;
    background: #eef9e0;
    color: #3d7d12;
}

.changelog-entry h3 {
    margin: 10px 0 8px;
    font-size: 18px;
}

.changelog-entry ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 20px;
    color: #354253;
}

.editor-section {
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid #dfe5ec;
}

.editor-section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.editor-section h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.role-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.role-row {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #ffffff;
}

.role-row small {
    display: block;
    margin-top: 3px;
    color: #657386;
    font-weight: 500;
}

.roles-tree {
    max-height: 320px;
    overflow: auto;
    padding: 8px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #ffffff;
}

.roles-tree .dxbl-treeview-item-content {
    min-height: 34px;
}

.roles-tree .dxbl-treeview-item-text {
    white-space: normal;
}

.status-section {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.status-item {
    min-height: 70px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #f7f9fb;
}

.status-item span {
    color: #657386;
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.status-item strong {
    color: #1f2933;
    font-size: 15px;
}

.field-error {
    margin-top: 6px;
    color: #b3261e;
    font-size: 13px;
    font-weight: 650;
}

.dialog-footer {
    padding: 16px 24px 22px;
    border-top: 1px solid #dfe5ec;
    justify-content: flex-end;
}

.confirm-dialog .dialog-footer {
    padding: 18px 0 0;
}

.theme-dark .modal-backdrop {
    background: rgba(2, 6, 12, 0.58);
}

.theme-dark .dialog-header,
.theme-dark .dialog-footer,
.theme-dark .editor-section,
.theme-dark .role-row,
.theme-dark .roles-tree,
.theme-dark .status-item {
    border-color: #2b3a4c;
}

.theme-dark .role-row,
.theme-dark .roles-tree {
    background: #172232;
}

.theme-dark .message-compose-body input,
.theme-dark .message-compose-body textarea {
    border-color: #2b3a4c;
    color: #e6edf5;
    background: #172232;
}

.theme-dark .chat-thread-list,
.theme-dark .chat-message-list {
    border-color: #2b3a4c;
    background: #121d2a;
}

.theme-dark .chat-search,
.theme-dark .chat-conversation,
.theme-dark .chat-conversation-header,
.theme-dark .chat-reply-box {
    border-color: #2b3a4c;
    background: #172232;
}

.theme-dark .chat-search input,
.theme-dark .chat-reply-box textarea {
    border-color: #2b3a4c;
    color: #e6edf5;
    background: #172232;
}

.theme-dark .chat-thread-item {
    border-color: #243448;
    color: #e6edf5;
}

.theme-dark .chat-thread-item:hover,
.theme-dark .chat-thread-item.active {
    background: #213145;
}

.theme-dark .chat-message > div {
    border-color: #2b3a4c;
    background: #172232;
}

.theme-dark .chat-message.own > div {
    border-color: #55743c;
    background: #1f3426;
}

.theme-dark .status-item {
    background: #121d2a;
}

.theme-dark .role-row small {
    color: #a7b6c8;
}

.theme-dark .status-item span {
    color: #a7b6c8;
}

.theme-dark .status-item strong {
    color: #e6edf5;
}

.theme-dark .dialog-close {
    color: #a7b6c8;
}

.theme-dark .dialog-close:hover {
    background: #213145;
    color: #edf4fb;
}

.theme-dark .field-error {
    color: #ffb8b8;
}

.summary-layout {
    padding: 18px;
}

.customer-editor-dialog {
    width: min(1260px, calc(100vw - 52px));
}

.customer-editor-body {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    padding: 0;
    background:
        linear-gradient(90deg, #f2f5f8 0 260px, transparent 260px);
}

.editor-tabs {
    display: grid;
    align-content: start;
    gap: 6px;
    min-height: 100%;
    padding: 22px 14px;
    border-right: 1px solid #dfe5ec;
}

.editor-tabs button {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 10px 12px;
    background: transparent;
    color: #526274;
    cursor: pointer;
    font-weight: 750;
    text-align: left;
}

.editor-tabs button:hover {
    background: #eef3f8;
    color: #1f2933;
}

.editor-tabs button.active {
    border-color: #cfe0f1;
    background: #ffffff;
    color: #0d66b3;
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.1);
}

.editor-tabs i {
    width: 20px;
    text-align: center;
}

.customer-form-content {
    min-width: 0;
    display: grid;
    gap: 18px;
    padding: 24px;
}

.invoice-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: start;
}

.invoice-layout .editor-card:last-child {
    grid-column: 1 / -1;
}

.editor-card {
    min-width: 0;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(31, 41, 51, 0.06);
}

.editor-card-header {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #dfe5ec;
}

.editor-card-header h3 {
    margin: 2px 0 0;
    font-size: 18px;
    line-height: 1.2;
}

.customer-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px 16px;
    padding: 18px;
}

.form-field {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.form-field label {
    color: #526274;
    font-size: 12px;
    font-weight: 800;
}

.field-label-with-unit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.customer-editor-dialog .dxbl-text-edit,
.customer-editor-dialog .dxbl-spin-edit,
.customer-editor-dialog .dxbl-date-edit {
    width: 100%;
}

.customer-editor-dialog .dxbl-text-edit,
.customer-editor-dialog .dxbl-spin-edit {
    min-height: 36px;
}

.span-1 {
    grid-column: span 1;
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

.span-4 {
    grid-column: span 4;
}

.span-6 {
    grid-column: span 6;
}

.span-12 {
    grid-column: span 12;
}

.new-row {
    grid-column-start: 1;
}

.compact-check {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border: 1px solid #dfe5ec;
    border-radius: 6px;
    background: #f7f9fb;
    color: #526274;
    white-space: nowrap;
}

.compact-check input {
    width: 15px;
    height: 15px;
    accent-color: #0d66b3;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.form-check-row {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2933;
    font-weight: 700;
}

.form-check-row input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    accent-color: #0d66b3;
}

.settings-list {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
}

.settings-page {
    display: grid;
    gap: 16px;
}

.settings-tabs {
    width: min(960px, 100%);
    box-shadow: none;
    overflow: hidden;
}

.settings-tab-list {
    display: flex;
    gap: 4px;
    padding: 10px 12px 0;
    border-bottom: 1px solid #dfe5ec;
    background: #f8fbff;
}

.settings-tab-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #526173;
    font: inherit;
    font-weight: 800;
    padding: 10px 14px 9px;
    cursor: pointer;
}

.settings-tab-button:hover {
    color: #0d66b3;
    background: rgba(13, 102, 179, 0.08);
}

.settings-tab-button.active {
    color: #0d66b3;
    border-bottom-color: #6bd300;
    background: #ffffff;
}

.settings-panel {
    width: min(820px, 100%);
    box-shadow: none;
}

.settings-tabs .settings-panel {
    width: 100%;
}

.settings-panel-header {
    padding: 18px 18px 12px;
    border-bottom: 1px solid #dfe5ec;
}

.settings-panel-header h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.settings-page .settings-list {
    display: grid;
    gap: 0;
    padding: 0;
}

.settings-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 340px);
    gap: 24px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #edf1f5;
}

.settings-row:last-child {
    border-bottom: 0;
}

.settings-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.settings-copy strong {
    font-size: 14px;
    font-weight: 850;
}

.settings-copy span {
    color: #657386;
    font-size: 13px;
}

.settings-control {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.settings-editor {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.settings-input.invalid {
    border-radius: 6px;
    outline: 1px solid #d93025;
    outline-offset: 1px;
}

.settings-native-input {
    min-height: 38px;
    width: 100%;
    border: 1px solid #d7e1ec;
    border-radius: 6px;
    background: #ffffff;
    color: #1f2933;
    font: inherit;
    padding: 8px 10px;
}

.settings-native-input:focus {
    border-color: #1876c9;
    box-shadow: 0 0 0 3px rgba(24, 118, 201, 0.14);
    outline: 0;
}

.settings-native-input.invalid {
    border-color: #d93025;
    background: #fff8f7;
}

.settings-native-input.invalid:focus {
    border-color: #d93025;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.16);
}

.settings-field-error {
    margin-top: 0;
    font-size: 12px;
}

.settings-test-mail {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(360px, 480px);
    gap: 24px;
    align-items: start;
    padding: 16px 18px;
    border-top: 1px solid #edf1f5;
}

.settings-test-mail-form {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.settings-test-mail-status {
    color: #197347;
    font-size: 12px;
    font-weight: 750;
}

.settings-unit {
    color: #657386;
    font-size: 13px;
    font-weight: 800;
}

.theme-dark .settings-panel-header,
.theme-dark .settings-row,
.theme-dark .settings-test-mail {
    border-color: #2b3a4c;
}

.theme-dark .settings-tabs {
    background: #101821;
}

.theme-dark .settings-tab-list {
    background: #0c121a;
    border-color: #2b3a4c;
}

.theme-dark .settings-tab-button {
    color: #a7b6c8;
}

.theme-dark .settings-tab-button:hover {
    color: #8bdcff;
    background: rgba(105, 182, 255, 0.1);
}

.theme-dark .settings-tab-button.active {
    color: #edf4ff;
    background: #101821;
}

.theme-dark .settings-copy span,
.theme-dark .settings-unit {
    color: #a7b6c8;
}

.theme-dark .settings-native-input {
    background: #101821;
    border-color: #263545;
    color: #edf4ff;
}

.theme-dark .settings-input.invalid {
    outline-color: #ff8a80;
}

.theme-dark .settings-native-input:focus {
    border-color: #69b6ff;
    box-shadow: 0 0 0 3px rgba(105, 182, 255, 0.18);
}

.theme-dark .settings-native-input.invalid {
    border-color: #ff8a80;
    background: #2a1718;
}

.theme-dark .settings-native-input.invalid:focus {
    border-color: #ff8a80;
    box-shadow: 0 0 0 3px rgba(255, 138, 128, 0.18);
}

.theme-dark .settings-test-mail-status {
    color: #8fe3b3;
}

.template-settings-panel {
    width: 100%;
}

.email-template-editor {
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
}

.email-template-list {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 14px;
    border-right: 1px solid #edf1f5;
    background: #f8fbff;
}

.email-template-list-item {
    display: grid;
    gap: 3px;
    text-align: left;
    border: 1px solid #dfe7f0;
    border-radius: 6px;
    background: #ffffff;
    color: #1f2933;
    padding: 10px 12px;
    cursor: pointer;
}

.email-template-list-item:hover {
    border-color: #0d66b3;
    background: #f4f9ff;
}

.email-template-list-item.active {
    border-color: #0d66b3;
    box-shadow: inset 3px 0 0 #6bd300;
}

.email-template-list-item span {
    font-weight: 850;
}

.email-template-list-item small {
    color: #657386;
    font-weight: 750;
}

.email-template-form {
    min-width: 0;
    display: grid;
    gap: 16px;
    padding: 18px;
}

.template-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.template-document-type {
    color: #0d66b3;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.template-active-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
}

.template-form-grid {
    display: grid;
    gap: 14px;
}

.template-field {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.template-field span {
    font-size: 13px;
    font-weight: 850;
}

.template-textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    border: 1px solid #d7e1ec;
    border-radius: 6px;
    background: #ffffff;
    color: #1f2933;
    font: inherit;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    padding: 10px;
}

.template-textarea:focus {
    border-color: #1876c9;
    box-shadow: 0 0 0 3px rgba(24, 118, 201, 0.14);
    outline: 0;
}

.template-textarea.invalid {
    border-color: #d93025;
    background: #fff8f7;
}

.template-textarea.invalid:focus {
    border-color: #d93025;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.16);
}

.template-html-editor {
    min-width: 0;
}

.template-html-editor.invalid {
    border-radius: 6px;
    outline: 1px solid #d93025;
    outline-offset: 1px;
}

.template-support-grid {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.template-placeholders,
.template-preview {
    display: grid;
    gap: 10px;
}

.template-placeholders strong,
.template-preview strong {
    font-size: 13px;
    font-weight: 900;
}

.template-placeholder-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.template-placeholder-list span {
    border: 1px solid #dfe7f0;
    border-radius: 6px;
    background: #ffffff;
    color: #526173;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 7px;
}

.template-preview-box {
    min-height: 180px;
    max-height: 320px;
    overflow: auto;
    border: 1px solid #dfe7f0;
    border-radius: 6px;
    background: #ffffff;
    color: #1f2933;
    padding: 14px;
}

.template-preview-box p {
    margin: 0 0 12px;
}

.theme-dark .email-template-list {
    background: #0c121a;
    border-color: #2b3a4c;
}

.theme-dark .email-template-list-item,
.theme-dark .template-placeholder-list span,
.theme-dark .template-preview-box {
    border-color: #2b3a4c;
    background: #101821;
    color: #edf4ff;
}

.theme-dark .email-template-list-item:hover {
    border-color: #69b6ff;
    background: #162332;
}

.theme-dark .email-template-list-item small,
.theme-dark .template-placeholder-list span {
    color: #9dafc2;
}

.theme-dark .template-document-type {
    color: #8bdcff;
}

.contacts-placeholder {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 36px;
    color: #526274;
    text-align: left;
}

.contacts-placeholder i {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef9e0;
    color: #68b817;
    font-size: 26px;
}

.contacts-placeholder strong,
.contacts-placeholder span {
    display: block;
}

.contacts-placeholder strong {
    margin-bottom: 6px;
    color: #1f2933;
}

.contacts-layout {
    grid-template-columns: minmax(0, 1fr);
}

.contact-list-card {
    overflow: hidden;
}

.contacts-grid {
    border: 0;
}

.contacts-grid .grid-actions {
    justify-content: flex-start;
}

.inline-alert {
    margin: 14px 18px 0;
    padding: 11px 12px;
    border: 1px solid #f0c7c7;
    border-radius: 8px;
    background: #fff1f1;
    color: #a92929;
    font-weight: 700;
}

.contact-editor-card {
    overflow: hidden;
}

.contact-editor-content {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.contact-section {
    min-width: 0;
    border: 1px solid #e6ebf1;
    border-radius: 8px;
    background: #fbfcfe;
}

.contact-section .customer-form-grid {
    padding-top: 12px;
}

.contact-person-grid {
    display: grid;
    grid-template-columns: 110px minmax(210px, 1.15fr) minmax(190px, 1fr);
    grid-template-areas:
        "salutation last first"
        "position letter birthday";
    gap: 14px 16px;
    padding: 12px 18px 18px;
    align-items: start;
}

.contact-salutation-field {
    grid-area: salutation;
}

.contact-last-name-field {
    grid-area: last;
}

.contact-first-name-field {
    grid-area: first;
}

.contact-position-field {
    grid-area: position;
}

.contact-letter-field {
    grid-area: letter;
}

.contact-birthday-field {
    grid-area: birthday;
}

.contact-info-grid {
    align-items: start;
}

.contact-email-field {
    align-self: start;
}

.contact-info-grid .dxbl-memo-edit {
    min-height: 76px;
}

.section-label {
    margin: 0;
    padding: 14px 18px 0;
    color: #0d66b3;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-right: 18px;
}

.document-routing-list {
    display: grid;
    gap: 10px;
    padding: 14px 18px 18px;
}

.document-routing-row {
    min-height: 48px;
    display: grid;
    grid-template-columns: 8px minmax(120px, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #ffffff;
}

.document-color {
    width: 8px;
    height: 28px;
    border-radius: 99px;
    background: var(--document-color);
}

.document-name {
    color: #1f2933;
    font-weight: 850;
}

.nested-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid #dfe5ec;
    background: #f7f9fb;
}

.contact-empty-card {
    min-height: 220px;
}

.feature-dialog {
    width: min(460px, 100%);
}

.feature-dialog-body {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 22px 0 6px;
    color: #526274;
    text-align: center;
}

.feature-dialog-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef9e0;
    color: #68b817;
    font-size: 28px;
}

.theme-dark .customer-editor-body {
    background:
        linear-gradient(90deg, #121d2a 0 260px, transparent 260px);
}

.theme-dark .editor-tabs,
.theme-dark .editor-card,
.theme-dark .editor-card-header,
.theme-dark .compact-check {
    border-color: #2b3a4c;
}

.theme-dark .editor-tabs button {
    color: #a7b6c8;
}

.theme-dark .editor-tabs button:hover {
    background: #213145;
    color: #edf4fb;
}

.theme-dark .editor-tabs button.active {
    border-color: #2b3a4c;
    background: #172232;
    color: #69b6ff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.theme-dark .editor-card {
    background: #172232;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.theme-dark .form-field label,
.theme-dark .compact-check,
.theme-dark .contacts-placeholder {
    color: #a7b6c8;
}

.theme-dark .compact-check {
    background: #121d2a;
}

.theme-dark .form-check-row {
    border-color: #2b3a4c;
    background: #172232;
    color: #e6edf5;
}

.theme-dark .contacts-placeholder strong {
    color: #e6edf5;
}

.theme-dark .contacts-placeholder i {
    background: #213145;
    color: #9bdc31;
}

.theme-dark .inline-alert {
    border-color: #694147;
    background: #321b20;
    color: #ffb8b8;
}

.theme-dark .contact-section,
.theme-dark .document-routing-row {
    border-color: #2b3a4c;
    background: #121d2a;
}

.theme-dark .document-name {
    color: #e6edf5;
}

.theme-dark .nested-footer {
    border-color: #2b3a4c;
    background: #121d2a;
}

.theme-dark .feature-dialog-body {
    color: #a7b6c8;
}

.theme-dark .feature-dialog-icon {
    background: #213145;
    color: #9bdc31;
}

.summary-value {
    min-height: 34px;
    display: flex;
    align-items: center;
    font-weight: 700;
    color: #1f2933;
}

.theme-dark .summary-value {
    color: #e6edf5;
}

.dxbl-btn-primary {
    --dxbl-btn-bg: #0d66b3;
    --dxbl-btn-hover-bg: #0b5798;
    --dxbl-btn-active-bg: #094a82;
}

.theme-dark .dxbl-btn-primary {
    --dxbl-btn-bg: #247dce;
    --dxbl-btn-hover-bg: #2f8ee5;
    --dxbl-btn-active-bg: #1b6daf;
}

.dxbl-grid {
    --dxbl-grid-header-bg: #f5f8fb;
}

.theme-dark .dxbl-grid {
    --dxbl-grid-header-bg: #1d2a3a;
}

.ai-assistant {
    z-index: 90;
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: grid;
    justify-items: end;
    gap: 14px;
    pointer-events: none;
}

.ai-assistant.open {
    width: min(390px, calc(100vw - 88px));
}

.ai-panel {
    width: 100%;
    height: min(620px, calc(100vh - 72px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}

.ai-panel-header {
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #dfe5ec;
}

.ai-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-header-button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #1f2933;
    cursor: pointer;
    font-size: 18px;
}

.ai-header-button:hover {
    background: #eef3f8;
}

.ai-messages {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: auto;
    padding: 18px;
}

.ai-welcome {
    min-height: 100%;
    display: grid;
    align-content: end;
    gap: 10px;
}

.ai-welcome h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.ai-suggestion {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 6px;
    padding: 7px 6px;
    background: transparent;
    color: #5f6f80;
    cursor: pointer;
    text-align: left;
}

.ai-suggestion:hover {
    background: #f4f8fb;
    color: #1f2933;
}

.ai-suggestion i {
    width: 22px;
    color: #1f2933;
    font-size: 17px;
}

.ai-message {
    max-width: 86%;
    border-radius: 12px;
    padding: 10px 12px;
    line-height: 1.45;
}

.ai-message.user {
    align-self: flex-end;
    background: #0d66b3;
    color: #ffffff;
}

.ai-message.assistant {
    align-self: flex-start;
    background: #f0f4f8;
    color: #1f2933;
}

.ai-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    margin: 0 12px;
    padding: 10px;
    border: 1px solid #dfe5ec;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(31, 41, 51, 0.1);
}

.ai-composer textarea {
    min-height: 42px;
    max-height: 130px;
    border: 0;
    outline: 0;
    resize: none;
    background: transparent;
    color: #1f2933;
    font: inherit;
}

.ai-composer textarea::placeholder {
    color: #8995a3;
}

.ai-send-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    align-self: end;
    border: 0;
    border-radius: 50%;
    background: #0d66b3;
    color: #ffffff;
    cursor: pointer;
}

.ai-send-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.ai-disclaimer {
    margin: 8px 12px 12px;
    color: #8a96a5;
    font-size: 12px;
    text-align: center;
}

.ai-launcher {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #101820;
    color: #ffffff;
    cursor: pointer;
    font-size: 25px;
    box-shadow: 0 16px 34px rgba(16, 24, 32, 0.24);
    pointer-events: auto;
}

.ai-launcher:hover {
    background: #1c2733;
}

.theme-dark .ai-panel-header,
.theme-dark .ai-composer {
    border-color: #2b3a4c;
}

.theme-dark .ai-header-button,
.theme-dark .ai-suggestion i,
.theme-dark .ai-composer textarea {
    color: #e6edf5;
}

.theme-dark .ai-header-button:hover,
.theme-dark .ai-suggestion:hover {
    background: #213145;
}

.theme-dark .ai-suggestion {
    color: #a7b6c8;
}

.theme-dark .ai-message.assistant {
    background: #213145;
    color: #e6edf5;
}

.theme-dark .ai-composer {
    background: #111923;
}

.theme-dark .ai-launcher {
    background: #edf4fb;
    color: #111923;
}

@media (max-width: 860px) {
    .workspace-shell {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .sidebar-rail {
        padding-inline: 5px;
    }

    .side-flyout,
    .user-panel {
        left: 52px;
        width: min(320px, calc(100vw - 68px));
    }

    .tab-topbar,
    .page-header,
    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .tab-topbar {
        padding: 8px 12px;
    }

    .tab-strip,
    .top-actions {
        flex-wrap: wrap;
    }

    .app-tab {
        min-width: 132px;
        border-radius: 8px;
    }

    .page-content {
        padding: 24px 16px 36px;
    }

    .counter {
        white-space: normal;
    }

    .settings-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .settings-test-mail {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .settings-test-mail-form {
        grid-template-columns: 1fr;
    }

    .settings-control {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .modal-backdrop {
        align-items: stretch;
        padding: 12px;
    }

    .quick-access-backdrop {
        place-items: stretch;
        padding: 12px;
    }

    .quick-access-panel {
        max-height: calc(100vh - 24px);
    }

    .quick-access-header,
    .quick-access-footer {
        padding-inline: 16px;
    }

    .quick-access-search,
    .quick-access-list {
        margin-inline: 14px;
    }

    .quick-access-list {
        padding-inline: 0;
    }

    .dialog-header,
    .dialog-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .dialog-close {
        position: absolute;
        top: 16px;
        right: 16px;
    }

    .role-list {
        grid-template-columns: 1fr;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .customer-editor-body {
        grid-template-columns: 1fr;
        background: transparent;
    }

    .theme-dark .customer-editor-body {
        background: transparent;
    }

    .editor-tabs {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        border-right: 0;
        border-bottom: 1px solid #dfe5ec;
    }

    .editor-tabs button {
        justify-content: center;
        min-width: 0;
    }

    .invoice-layout,
    .customer-form-grid {
        grid-template-columns: 1fr;
    }

    .contact-person-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "salutation"
            "last"
            "first"
            "position"
            "letter"
            "birthday";
    }

    .invoice-layout .editor-card,
    .span-1,
    .span-2,
    .span-3,
    .span-4,
    .span-6,
    .span-12 {
        grid-column: 1;
    }

    .ai-assistant {
        right: 14px;
        bottom: 14px;
    }

    .ai-assistant.open {
        width: calc(100vw - 80px);
    }

.ai-panel {
    height: min(590px, calc(100vh - 72px));
}
}

.reportcenter-page {
    min-height: calc(100vh - 116px);
}

.reportcenter-shell {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.reportcenter-picker {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    position: sticky;
    top: 82px;
    max-height: calc(100vh - 116px);
    overflow: auto;
}

.reportcenter-picker-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.reportcenter-picker-header h2 {
    margin: 0;
}

.reportcenter-picker-actions {
    display: flex;
    gap: 4px;
    padding-top: 2px;
}

.reportcenter-picker-actions .icon-button {
    background: #eef3f8;
    border: 1px solid #d7e1ec;
    color: #536173;
    height: 28px;
    width: 28px;
}

.reportcenter-picker-actions .icon-button:hover {
    background: #e1ebf5;
    color: #1f2933;
}

.reportcenter-picker-actions .icon-button:disabled {
    cursor: default;
    opacity: 0.55;
}

.report-category {
    display: grid;
    gap: 10px;
}

.report-category-header {
    appearance: none;
    align-items: center;
    background: transparent;
    border: 0;
    color: #536173;
    cursor: pointer;
    display: grid;
    font-size: 0.78rem;
    font-weight: 800;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    letter-spacing: 0;
    padding: 2px 0;
    text-align: left;
    text-transform: uppercase;
}

.report-category-header i {
    font-size: 0.8rem;
}

.report-category-count {
    align-items: center;
    background: #eef3f8;
    border-radius: 999px;
    color: #536173;
    display: inline-flex;
    font-size: 0.72rem;
    height: 20px;
    justify-content: center;
    min-width: 24px;
    padding: 0 7px;
}

.report-list {
    display: grid;
    gap: 8px;
}

.report-list-item {
    appearance: none;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #ffffff;
    color: #1d2734;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.report-list-item:hover,
.report-list-item.active {
    border-color: #1576d1;
    background: #eef6ff;
}

.report-list-item strong,
.report-list-item small {
    display: block;
}

.report-list-item strong {
    font-size: 0.92rem;
}

.reportcenter-results {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.reportcenter-welcome {
    min-height: 360px;
}

.report-grid {
    min-height: 520px;
}

.report-parameter-dialog {
    width: min(560px, 100%);
}

.report-parameter-body {
    display: grid;
    gap: 14px;
    padding: 18px 24px;
}

.report-parameter-input {
    min-height: 38px;
    width: 100%;
    border: 1px solid #d7e1ec;
    border-radius: 6px;
    background: #ffffff;
    color: #1f2933;
    font: inherit;
    padding: 8px 10px;
}

.report-parameter-input:focus {
    border-color: #1876c9;
    box-shadow: 0 0 0 3px rgba(24, 118, 201, 0.14);
    outline: 0;
}

.report-parameter-check {
    min-height: 38px;
}

.report-parameter-input.invalid {
    border-color: #d93025;
    background: #fff8f7;
}

.report-parameter-input.invalid:focus {
    border-color: #d93025;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.16);
}

.report-parameter-check.invalid {
    border: 1px solid #d93025;
    border-radius: 6px;
    background: #fff8f7;
    padding: 8px 10px;
}

.parameter-field-error {
    margin-top: 0;
    font-size: 12px;
}

.report-parameter-error {
    margin: 0 24px;
}

.theme-dark .report-list-item {
    background: #101821;
    border-color: #263545;
    color: #edf4ff;
}

.theme-dark .report-list-item:hover,
.theme-dark .report-list-item.active {
    background: #13273a;
    border-color: #4aa3ff;
}

.theme-dark .report-category-header {
    color: #9dafc2;
}

.theme-dark .reportcenter-picker-actions .icon-button {
    background: #1b2a39;
    border-color: #263545;
    color: #b9c7d6;
}

.theme-dark .reportcenter-picker-actions .icon-button:hover {
    background: #22364a;
    color: #edf4ff;
}

.theme-dark .report-parameter-input {
    background: #101821;
    border-color: #263545;
    color: #edf4ff;
}

.theme-dark .report-parameter-input:focus {
    border-color: #69b6ff;
    box-shadow: 0 0 0 3px rgba(105, 182, 255, 0.18);
}

.theme-dark .report-parameter-input.invalid {
    border-color: #ff8a80;
    background: #2a1718;
}

.theme-dark .report-parameter-input.invalid:focus {
    border-color: #ff8a80;
    box-shadow: 0 0 0 3px rgba(255, 138, 128, 0.18);
}

.theme-dark .report-parameter-check.invalid {
    border-color: #ff8a80;
    background: #2a1718;
}

.theme-dark .report-category-count {
    background: #1b2a39;
    color: #9dafc2;
}

@media (max-width: 920px) {
    .chat-shell {
        height: auto;
        grid-template-columns: 1fr;
    }

    .chat-thread-list {
        max-height: 320px;
        border-right: 0;
        border-bottom: 1px solid #dfe5ec;
    }

    .chat-conversation {
        min-height: 520px;
    }

    .chat-reply-box {
        grid-template-columns: 1fr;
    }

    .reportcenter-shell {
        grid-template-columns: 1fr;
    }

    .reportcenter-picker {
        position: static;
        max-height: none;
    }
}

.mobile-app-shell {
    height: 100vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #f6f8fb;
    overflow: hidden;
}

.mobile-app-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #d8e1ea;
    background: #fff;
    padding: 0 14px;
}

.mobile-app-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1d2733;
    font-weight: 800;
    text-decoration: none;
}

.mobile-app-brand i {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: #e5f8d6;
    color: #5fb600;
}

.mobile-menu-button {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #d8e1ea;
    border-radius: 8px;
    background: #fff;
    color: #1d2733;
    font-size: 1.25rem;
}

.mobile-app-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.mobile-menu-backdrop {
    position: fixed;
    inset: 56px 0 0;
    z-index: 35;
    background: rgba(15, 23, 32, 0.34);
}

.mobile-menu-panel {
    display: grid;
    gap: 6px;
    width: min(320px, calc(100vw - 28px));
    margin: 12px 14px 0 auto;
    border: 1px solid #d8e1ea;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 18px 40px rgba(28, 43, 58, 0.18);
}

.mobile-menu-user {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid #eef2f6;
    padding: 8px 8px 12px;
}

.mobile-menu-avatar {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #5fb600;
    color: #fff;
    font-weight: 800;
    line-height: 1;
}

.mobile-menu-user > div > strong,
.mobile-menu-user > div > span {
    display: block;
}

.mobile-menu-user > div > strong {
    color: #1d2733;
}

.mobile-menu-user > div > span {
    color: #687789;
    font-size: 0.85rem;
}

.mobile-menu-item {
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 12px;
    border-radius: 6px;
    color: #1d2733;
    padding: 0 10px;
    text-decoration: none;
    font-weight: 700;
}

.mobile-menu-item.active,
.mobile-menu-item:hover {
    background: #e8f3ff;
    color: #0b77d5;
}

.mobile-page {
    min-height: calc(100vh - 56px);
    background: #f6f8fb;
    padding: 24px;
}

.mobile-shell {
    width: min(100%, 760px);
    margin: 0 auto;
}

.mobile-header {
    margin-bottom: 18px;
}

.mobile-header h1,
.mobile-shell h1 {
    margin: 0;
    color: #1d2733;
    font-size: 2rem;
    line-height: 1.15;
}

.mobile-muted {
    margin: 6px 0 0;
    color: #687789;
    font-size: 1rem;
}

.mobile-search-form,
.mobile-order-card,
.mobile-empty-state,
.mobile-alert {
    border: 1px solid #d8e1ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(28, 43, 58, 0.06);
}

.mobile-search-form {
    display: grid;
    gap: 10px;
    padding: 16px;
    margin-bottom: 14px;
}

.mobile-search-form label {
    color: #1d2733;
    font-weight: 700;
}

.mobile-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: stretch;
}

.mobile-search-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    padding: 0 12px;
    color: #1d2733;
    font-size: 1rem;
}

.mobile-search-input:focus {
    border-color: #0b77d5;
    box-shadow: 0 0 0 3px rgba(11, 119, 213, 0.16);
    outline: none;
}

.mobile-primary-button {
    min-height: 46px;
    border: 1px solid #0a66b3;
    border-radius: 6px;
    background: #0b77d5;
    color: #fff;
    padding: 0 18px;
    font-weight: 700;
}

.mobile-scan-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #c4d5e6;
    border-radius: 6px;
    background: #f7fbff;
    color: #0b77d5;
    padding: 0 14px;
    font-weight: 700;
}

.mobile-scan-button:disabled {
    color: #7d91a5;
    background: #eef3f8;
}

.mobile-primary-button:disabled {
    background: #9eb7ce;
    border-color: #9eb7ce;
}

.mobile-alert {
    margin-bottom: 14px;
    padding: 14px 16px;
    color: #8a1f11;
    background: #fff4f2;
    border-color: #ffd2cc;
}

.mobile-empty-state {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
    padding: 20px 16px;
    color: #687789;
}

.mobile-empty-state strong {
    color: #1d2733;
}

.mobile-result-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0;
    color: #687789;
    font-weight: 700;
}

.mobile-link-button {
    border: 0;
    background: transparent;
    color: #0b77d5;
    font-weight: 700;
    padding: 8px 0;
}

.mobile-order-list {
    display: grid;
    gap: 14px;
    padding-bottom: 24px;
}

.mobile-order-card {
    overflow: hidden;
}

.mobile-order-card-header {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    border-bottom: 1px solid #d8e1ea;
    padding: 16px;
}

.mobile-order-card-header h2 {
    margin: 8px 0 4px;
    color: #1d2733;
    font-size: 1.2rem;
    line-height: 1.25;
}

.mobile-order-card-header p {
    margin: 0;
    color: #687789;
}

.mobile-status-badge {
    display: inline-flex;
    min-width: 30px;
    justify-content: center;
    border-radius: 999px;
    background: #e8f3ff;
    color: #0b77d5;
    padding: 3px 8px;
    font-weight: 800;
}

.mobile-order-number {
    flex: 0 0 auto;
    text-align: right;
}

.mobile-order-number span {
    display: block;
    color: #687789;
    font-size: 0.82rem;
}

.mobile-order-number strong {
    color: #1d2733;
    font-size: 1.25rem;
}

.mobile-order-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 0;
}

.mobile-order-fields > div {
    min-width: 0;
    border-bottom: 1px solid #eef2f6;
    padding: 12px 16px;
}

.mobile-order-fields > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.mobile-order-fields > div.wide {
    grid-column: span 2;
}

.mobile-order-fields dt {
    margin-bottom: 4px;
    color: #687789;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.mobile-order-fields dd {
    margin: 0;
    color: #1d2733;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.theme-dark .mobile-page {
    background: #0f1720;
}

.theme-dark .mobile-app-shell,
.theme-dark .mobile-app-content {
    background: #0f1720;
}

.theme-dark .mobile-app-topbar,
.theme-dark .mobile-menu-button,
.theme-dark .mobile-menu-panel {
    background: #111d28;
    border-color: #263545;
}

.theme-dark .mobile-app-brand,
.theme-dark .mobile-menu-button,
.theme-dark .mobile-menu-user strong,
.theme-dark .mobile-menu-item {
    color: #edf4ff;
}

.theme-dark .mobile-menu-user {
    border-color: #263545;
}

.theme-dark .mobile-header h1,
.theme-dark .mobile-shell h1,
.theme-dark .mobile-search-form label,
.theme-dark .mobile-empty-state strong,
.theme-dark .mobile-order-card-header h2,
.theme-dark .mobile-order-number strong,
.theme-dark .mobile-order-fields dd {
    color: #edf4ff;
}

.theme-dark .mobile-search-form,
.theme-dark .mobile-order-card,
.theme-dark .mobile-empty-state {
    background: #111d28;
    border-color: #263545;
}

.theme-dark .mobile-search-input {
    background: #101821;
    border-color: #263545;
    color: #edf4ff;
}

.theme-dark .mobile-scan-button {
    background: #101821;
    border-color: #263545;
    color: #8cc8ff;
}

.theme-dark .mobile-order-card-header,
.theme-dark .mobile-order-fields > div {
    border-color: #263545;
}

.mobile-scanner-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(11, 18, 28, 0.72);
}

.mobile-scanner-panel {
    width: min(100%, 520px);
    display: grid;
    gap: 12px;
    border: 1px solid #d8e1ea;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.mobile-scanner-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.mobile-scanner-header h2 {
    margin: 0;
    color: #1d2733;
    font-size: 1.15rem;
    line-height: 1.25;
}

.mobile-scanner-header p {
    margin: 3px 0 0;
    color: #687789;
    font-size: 0.94rem;
}

.mobile-scanner-close {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid #d8e1ea;
    border-radius: 6px;
    background: #fff;
    color: #1d2733;
}

.mobile-scanner-view {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #0b121c;
    aspect-ratio: 4 / 3;
}

.mobile-scanner-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.mobile-scanner-frame {
    position: absolute;
    inset: 26% 12%;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.22);
    pointer-events: none;
}

.mobile-scanner-status {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(11, 18, 28, 0.78);
    color: #fff;
    padding: 7px 12px;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.mobile-scanner-alert {
    margin-bottom: 0;
}

.theme-dark .mobile-scanner-panel,
.theme-dark .mobile-scanner-close {
    background: #111d28;
    border-color: #263545;
}

.theme-dark .mobile-scanner-header h2,
.theme-dark .mobile-scanner-close {
    color: #edf4ff;
}

@media (max-width: 640px) {
    .mobile-page {
        min-height: calc(100vh - 56px);
        padding: 14px;
    }

    .mobile-header h1,
    .mobile-shell h1 {
        font-size: 1.65rem;
    }

    .mobile-search-row {
        grid-template-columns: 1fr 1fr;
    }

    .mobile-search-input {
        grid-column: 1 / -1;
    }

    .mobile-scan-button {
        width: 100%;
    }

    .mobile-primary-button {
        width: 100%;
    }

    .mobile-order-card-header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .mobile-order-number {
        text-align: left;
    }

    .mobile-order-fields {
        grid-template-columns: 1fr;
    }

    .mobile-order-fields > div.wide {
        grid-column: span 1;
    }

    .mobile-order-fields > div:nth-last-child(-n + 2) {
        border-bottom: 1px solid #eef2f6;
    }

    .mobile-order-fields > div:last-child {
        border-bottom: 0;
    }

    .theme-dark .mobile-order-fields > div:nth-last-child(-n + 2) {
        border-bottom-color: #263545;
    }
}
