.crm-message-info { background: #fff3cd !important; color: #856404 !important; border: 1px solid #ffc107 !important; }
.crm-message-error { background: #f8d7da !important; color: #721c24 !important; border: 1px solid #f5c6cb !important; }
.crm-confirm-danger .dhx_alert__confirm-aply { background: #a93232 !important; color: #fff !important; border-color: #a93232 !important; }
.crm-confirm-danger .dhx_alert__confirm-aply:hover { background: #8a2626 !important; }

html {
    width: 100vw;
    height: 100%;
    margin: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    font-family: Roboto, Arial, sans-serif;
    background: #f4f6f8;
}

body,
#root {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

#root {
    min-width: 900px;
}

#sidebar,
#content {
    width: 100%;
    height: 100%;
}

.crm-login-shell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(90deg, rgba(20, 31, 45, 0.78), rgba(20, 31, 45, 0.42)),
        url("../img/login-background.jpg") center / cover no-repeat;
    padding: 24px;
}

.crm-login-panel {
    width: 380px;
    max-width: calc(100vw - 32px);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 6px;
    box-shadow: 0 18px 55px rgba(15, 23, 34, 0.32);
    backdrop-filter: blur(8px);
}

.crm-login-head {
    padding: 22px 24px 10px;
    border-bottom: 1px solid #edf0f3;
}

.crm-login-title {
    margin: 0;
    font-size: 22px;
    line-height: 28px;
    font-weight: 600;
    color: #1d2733;
}

.crm-login-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: #6c7885;
}

.crm-login-form {
    padding: 20px 24px 24px;
}

.crm-login-panel-2fa {
    width: 620px;
}

.crm-2fa-setup {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    padding: 20px 24px 24px;
    align-items: start;
}

.crm-2fa-qr {
    width: 190px;
    height: 190px;
    box-sizing: border-box;
    border: 1px solid #d8dee5;
    border-radius: 6px;
    background: #fff;
}

.crm-2fa-details {
    min-width: 0;
}

.crm-2fa-secret {
    display: block;
    margin-bottom: 14px;
}

.crm-2fa-secret span {
    display: block;
    margin-bottom: 4px;
    color: #667381;
    font-size: 12px;
    line-height: 16px;
}

.crm-2fa-secret input {
    width: 100%;
    box-sizing: border-box;
}

.crm-shell-top {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px 0 18px;
    box-sizing: border-box;
    background: #888B90;
    color: #fff;
}

.crm-shell-logo {
    height: 32px;
    width: auto;
}

.crm-shell-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.crm-shell-title {
    font-size: 17px;
    line-height: 22px;
    font-weight: 600;
    white-space: nowrap;
}

.crm-shell-subtitle {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    font-size: 12px;
    line-height: 18px;
    color: rgba(255, 255, 255, 0.68);
    white-space: nowrap;
}

.crm-shell-subtitle span {
    min-width: 0;
}

#crm-shell-joke {
    display: inline-block;
    max-width: min(620px, calc(100vw - 560px));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#crm-shell-joke::before,
.crm-shell-weather::before {
    color: rgba(255, 255, 255, 0.46);
    font-size: 12px;
    font-weight: 400;
}

#crm-shell-joke::before {
    content: "|";
    margin: 0 16px;
}

.crm-shell-meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.82);
}

.crm-shell-time {
    display: inline-flex;
    align-items: center;
    min-width: 82px;
    justify-content: center;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 6px;
    background: #26313d;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 5px rgba(15, 23, 34, 0.18);
    font-size: 18px;
    line-height: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.crm-shell-time::before {
    content: "";
    position: relative;
    width: 14px;
    height: 14px;
    margin-right: 7px;
    border: 2px solid rgba(255, 255, 255, 0.88);
    border-radius: 50%;
    background:
        linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.9) 48% 55%, transparent 56%) center 2px / 10px 8px no-repeat,
        linear-gradient(0deg, transparent 47%, rgba(255, 255, 255, 0.72) 48% 55%, transparent 56%) 7px 5px / 6px 8px no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.crm-shell-weather {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 2px 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    line-height: 18px;
}

.crm-shell-weather::before {
    content: "|";
    margin-right: 7px;
}

.crm-shell-weather[hidden] {
    display: none;
}

.crm-shell-weather-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    box-sizing: border-box;
    margin: -4px -2px -4px -4px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 36px 36px;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 34, 0.2));
}

.crm-shell-weather-icon[hidden] {
    display: none;
}

.crm-shell-weather-text {
    display: inline-block;
    white-space: nowrap;
}

.crm-shell-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crm-shell-user {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
}

.crm-content {
    height: 100%;
    padding: 24px;
    box-sizing: border-box;
    overflow: auto;
}

.crm-module-title {
    margin: 0;
    font-size: 24px;
    line-height: 32px;
    color: #1d2733;
}

.crm-module-note {
    margin: 8px 0 0;
    max-width: 760px;
    font-size: 14px;
    line-height: 22px;
    color: #5b6773;
}

.crm-status {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #d8dee5;
    border-radius: 6px;
    background: #fff;
    color: #384653;
    font-size: 13px;
    line-height: 20px;
}

.crm-error {
    color: #b00020;
    font-size: 13px;
    line-height: 18px;
    min-height: 18px;
    margin-top: 10px;
}

.crm-sidebar.dhx_sidebar,
.crm-sidebar {
    background: #888B90;
    border: 0;
    box-shadow: none;
}

#sidebar {
    background: #888B90;
    height: 100%;
    border: 0;
}

.crm-nav-shell {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #888B90;
    position: relative;
}

.crm-nav-shell #sidebar {
    flex: 1 1 auto;
    min-height: 0;
}

.crm-cip-panel {
    flex: 0 0 auto;
    padding: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    background: #74777c;
    color: #fff;
    box-sizing: border-box;
    overflow-x: hidden;
}

.crm-cip-panel.is-searching {
    position: absolute;
    z-index: 20;
    inset: 0;
    flex: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-top: 0;
    box-shadow: 0 -10px 24px rgba(24, 33, 43, 0.24);
}

.crm-cip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.crm-cip-title {
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
}

.crm-cip-subtitle,
.crm-cip-presence,
.crm-cip-empty,
.crm-cip-result-meta {
    font-size: 11px;
    line-height: 14px;
    color: rgba(255, 255, 255, 0.76);
}

.crm-cip-status-dot {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cfd7df;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.crm-cip-status-dot.is-ok {
    background: #45c46b;
}

.crm-cip-status-dot.is-warning {
    background: #f0bc42;
}

.crm-cip-status-dot.is-error {
    background: #d9534f;
}

.crm-cip-presence {
    min-height: 16px;
    padding: 2px 6px;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.crm-cip-presence.is-available {
    background: rgba(69, 196, 107, 0.18);
    color: #c9f7d5;
}

.crm-cip-presence.is-busy {
    background: rgba(217, 83, 79, 0.2);
    color: #ffd0ce;
}

.crm-cip-presence.is-away {
    background: rgba(240, 188, 66, 0.22);
    color: #ffe5aa;
}

.crm-cip-presence.is-offline {
    background: rgba(185, 194, 204, 0.18);
    color: #d7dde4;
}

.crm-cip-presence.is-neutral {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.78);
}

.crm-cip-call-display {
    margin-bottom: 7px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.84);
    min-height: 52px;
    box-sizing: border-box;
}

.crm-cip-call-display.is-ringing {
    border-color: rgba(69, 164, 99, 0.85);
    background: rgba(69, 164, 99, 0.22);
    color: #fff;
}

.crm-cip-call-display.is-active {
    border-color: rgba(224, 167, 47, 0.75);
    background: rgba(224, 167, 47, 0.18);
    color: #fff3cf;
}

.crm-cip-call-display.is-error {
    border-color: rgba(207, 75, 68, 0.85);
    background: rgba(207, 75, 68, 0.2);
    color: #ffd7d4;
}

.crm-cip-call-display-label {
    margin-bottom: 3px;
    font-size: 10px;
    line-height: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
    opacity: 0.78;
}

.crm-cip-call-display-name {
    font-size: 12px;
    line-height: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.crm-cip-call-display-number {
    margin-top: 2px;
    font-size: 11px;
    line-height: 14px;
    overflow-wrap: anywhere;
    opacity: 0.9;
}

.crm-cip-work-button {
    margin-top: 6px;
    height: 24px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.crm-cip-work-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.crm-cip-dial {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 6px;
}

.crm-cip-dial-row {
    display: grid;
    gap: 5px;
}

.crm-cip-dial-row-main {
    grid-template-columns: minmax(0, 1fr) 28px;
}

.crm-cip-dial-row-control {
    grid-template-columns: repeat(4, 28px);
    justify-content: end;
    white-space: nowrap;
}

.crm-cip-search {
    margin-bottom: 7px;
    min-height: 0;
}

.crm-cip-search-box {
    position: relative;
}

.crm-cip-search-box .crm-cip-input {
    width: 100%;
    padding-right: 28px;
}

.crm-cip-search-clear {
    position: absolute;
    top: 50%;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 4px;
    background: rgba(35, 45, 58, 0.72);
    color: #fff;
    font-size: 16px;
    line-height: 18px;
    font-weight: 600;
    cursor: pointer;
    transform: translateY(-50%);
}

.crm-cip-search-clear[hidden] {
    display: none;
}

.crm-cip-search-clear:hover {
    background: rgba(31, 111, 178, 0.95);
    color: #fff;
}

.crm-cip-agents {
    margin-bottom: 7px;
}

.crm-cip-agents-head {
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    line-height: 14px;
    font-weight: 600;
}

.crm-cip-agents-list {
    max-height: 230px;
    overflow-y: auto;
    overflow-x: hidden;
}

.crm-cip-agent-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 5px;
    row-gap: 2px;
    align-items: center;
    padding: 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.crm-cip-agent-row.has-active-call {
    margin: 3px 0;
    padding: 5px 4px;
    border-top-color: rgba(255, 207, 106, 0.34);
    border-radius: 4px;
    background: rgba(255, 207, 106, 0.1);
}

.crm-cip-agent-main {
    min-width: 0;
    overflow: hidden;
}

.crm-cip-agent-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-size: 12px;
    line-height: 15px;
}

.crm-cip-agent-number {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    line-height: 14px;
}

.crm-cip-agent-presence {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 1px 5px;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    line-height: 13px;
}

.crm-cip-agent-presence.is-available {
    background: rgba(69, 196, 107, 0.18);
    color: #c9f7d5;
}

.crm-cip-agent-presence.is-busy {
    background: rgba(217, 83, 79, 0.2);
    color: #ffd0ce;
}

.crm-cip-agent-presence.is-away {
    background: rgba(240, 188, 66, 0.22);
    color: #ffe5aa;
}

.crm-cip-agent-presence.is-offline,
.crm-cip-agent-presence.is-neutral {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.78);
}

.crm-cip-agent-call {
    display: flex;
    align-items: center;
    gap: 5px;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 2px 5px;
    border: 1px solid rgba(255, 207, 106, 0.38);
    border-radius: 4px;
    background: rgba(255, 207, 106, 0.18);
    color: #ffe7a8;
    font-size: 10px;
    line-height: 13px;
}

.crm-cip-agent-call-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.crm-cip-agent-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    white-space: nowrap;
}

.crm-cip-agent-actions .crm-cip-agent-button {
    flex: 0 0 25px;
}

.crm-cip-agent-button {
    width: 25px;
    height: 24px;
    padding: 0;
    border: 1px solid #1f6fb2;
    border-radius: 4px;
    background: #1f6fb2;
    color: #fff;
    font: inherit;
    font-size: 12px;
    line-height: 22px;
    cursor: pointer;
}

.crm-cip-agent-transfer {
    border-color: #e0a72f;
    background: #c78d1b;
    font-weight: 600;
}

.crm-cip-agent-blind-transfer {
    border-color: #7c5cc4;
    background: #6847b0;
    font-weight: 600;
}

.crm-cip-list-button {
    width: 100%;
    height: 26px;
    margin-bottom: 7px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.crm-cip-list-button:hover {
    background: rgba(255, 255, 255, 0.18);
}

.crm-cip-input {
    width: 100%;
    min-width: 0;
    height: 26px;
    padding: 3px 6px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.95);
    color: #24313d;
    font: inherit;
    font-size: 12px;
}

.crm-cip-icon-button,
.crm-cip-call-button {
    height: 26px;
    border: 1px solid #1f6fb2;
    border-radius: 4px;
    background: #1f6fb2;
    color: #fff;
    font: inherit;
    font-size: 14px;
    line-height: 24px;
    cursor: pointer;
}

.crm-cip-icon-button {
    width: 28px;
}

.crm-cip-transfer-button {
    border-color: #e0a72f;
    background: #c78d1b;
    font-weight: 600;
}

.crm-cip-blind-transfer-button {
    border-color: #7c5cc4;
    background: #6847b0;
    font-weight: 600;
}

.crm-cip-answer-button {
    border-color: #45a463;
    background: #34884e;
    font-weight: 600;
}

.crm-cip-hangup-button {
    border-color: #cf4b44;
    background: #b93a34;
    font-weight: 600;
}

.crm-cip-icon-button:disabled,
.crm-cip-call-button:disabled {
    cursor: default;
    opacity: 0.55;
}

.crm-cip-results {
    max-height: 190px;
    overflow: auto;
    margin-top: 6px;
}

.crm-cip-panel.is-searching .crm-cip-search {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.crm-cip-panel.is-searching .crm-cip-agents {
    display: none;
}

.crm-cip-panel.is-searching .crm-cip-list-button {
    display: none;
}

.crm-cip-panel.is-searching .crm-cip-results {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
}

.crm-cip-panel.is-searching .crm-cip-result-name,
.crm-cip-panel.is-searching .crm-cip-result-meta {
    white-space: normal;
    overflow-wrap: anywhere;
}

.crm-cip-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    align-items: center;
    padding: 5px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.crm-cip-result-main {
    min-width: 0;
}

.crm-cip-result-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-size: 12px;
    line-height: 16px;
}

.crm-cip-result-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-cip-call-button {
    width: 28px;
    padding: 0;
}

.crm-cip-number-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

.crm-cip-number-button {
    min-height: 24px;
    max-width: 100%;
    padding: 2px 6px;
    border: 1px solid rgba(31, 111, 178, 0.95);
    border-radius: 4px;
    background: #1f6fb2;
    color: #fff;
    font: inherit;
    font-size: 11px;
    line-height: 16px;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.crm-cip-number-button:hover {
    background: #185b93;
}

.crm-cip-calls-modal {
    width: 980px;
    height: min(620px, calc(100vh - 80px));
    max-height: calc(100vh - 80px);
}

.crm-cip-calls-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    flex: 1;
}

.crm-cip-calls-filter {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

.crm-cip-calls-tab {
    height: 28px;
    padding: 0 10px;
    border: 1px solid #c5ced8;
    border-radius: 4px;
    background: #fff;
    color: #263238;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.crm-cip-calls-tab.is-active {
    border-color: #1f6fb2;
    background: #1f6fb2;
    color: #fff;
}

.crm-cip-calls-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border: 1px solid #edf0f3;
}

.crm-cip-calls-empty {
    padding: 12px;
    color: #667381;
    font-size: 12px;
}

.crm-cip-calls-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.crm-cip-calls-table th,
.crm-cip-calls-table td {
    padding: 5px 7px;
    border-bottom: 1px solid #edf0f3;
    text-align: left;
    vertical-align: middle;
}

.crm-cip-calls-table th {
    position: sticky;
    top: 0;
    background: #f7f9fb;
    color: #4f5d6a;
    font-weight: 600;
}

.crm-cip-calls-actions {
    width: 34px;
    text-align: center;
}

.crm-cip-call-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 14px;
}

.crm-cip-call-status.is-answered {
    background: #dff3df;
    color: #23622d;
}

.crm-cip-call-status.is-missed {
    background: #ffe1df;
    color: #9c2e2a;
}

.crm-cip-work-root {
    pointer-events: none;
}

.crm-cip-work-popup-page {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    background: #f7f9fb;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #1f2933;
}

.crm-cip-work-popup-page .crm-cip-work-root {
    position: static;
    inset: auto;
    width: 100vw;
    height: 100vh;
    z-index: auto;
    pointer-events: auto;
}

.crm-cip-work-modal {
    width: min(760px, calc(100vw - 40px));
    height: min(650px, calc(100vh - 96px));
    pointer-events: auto;
}

.crm-cip-work-popup-page .crm-cip-work-modal {
    position: static;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    transform: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.crm-cip-work-popup-page .services-modal-head {
    padding: 9px 18px 9px 12px;
}

.crm-cip-work-popup-page #crm-cip-work-close {
    margin-right: 4px;
}

.crm-cip-work-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    background: #f7f9fb;
}

.crm-cip-work-popup-page .crm-cip-work-body {
    gap: 8px;
    padding: 10px;
    overflow: hidden;
}

.crm-cip-work-call {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #d5e2ef;
    border-radius: 6px;
    background: #fff;
}

.crm-cip-work-call-label {
    color: #667381;
    font-size: 11px;
    line-height: 14px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.crm-cip-work-call-name {
    margin-top: 2px;
    color: #1f2933;
    font-size: 16px;
    line-height: 21px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.crm-cip-work-call-number {
    margin-top: 2px;
    color: #52606d;
    font-size: 13px;
    line-height: 18px;
    overflow-wrap: anywhere;
}

.crm-cip-work-call-duration {
    flex: 0 0 auto;
    min-width: 72px;
    padding: 6px 8px;
    border-radius: 5px;
    background: #1f6fb2;
    color: #fff;
    text-align: center;
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
}

.crm-cip-work-call-state.is-ended {
    color: #667381;
    font-size: 13px;
}

.crm-cip-work-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: 0;
}

.crm-cip-work-popup-page .crm-cip-work-grid {
    flex: 1 1 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
}

.crm-cip-work-section {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid #d8dee5;
    border-radius: 6px;
    background: #fff;
}

.crm-cip-work-section-wide {
    grid-column: 1 / -1;
}

.crm-cip-work-popup-page .crm-cip-work-section-wide {
    grid-column: auto;
}

.crm-cip-work-popup-page .crm-cip-work-section {
    gap: 6px;
    padding: 9px;
    overflow: visible;
}

.crm-cip-work-section-title {
    color: #263238;
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
}

.crm-cip-work-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.crm-cip-work-source {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 5px 7px;
    border: 1px solid #d5e2ef;
    border-radius: 5px;
    background: #f7fbff;
    color: #52606d;
    font-size: 11px;
    line-height: 14px;
}

.crm-cip-work-source strong {
    color: #1f2933;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.crm-cip-work-section > .services-button {
    margin-top: auto;
}

.crm-cip-work-notes {
    min-height: 0;
}

.crm-cip-work-notes textarea {
    min-height: 82px;
    height: auto;
    resize: vertical;
}

.crm-cip-work-popup-page .crm-cip-work-notes textarea {
    flex: 1 1 auto;
    min-height: 58px;
    height: auto;
    resize: none;
}

.crm-cip-work-popup-page .crm-cip-work-notes {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.crm-cip-work-popup-page .services-field {
    gap: 2px;
}

.crm-cip-work-popup-page .services-field span {
    font-size: 11px;
    line-height: 14px;
}

.crm-cip-work-popup-page .services-input {
    min-height: 28px;
    height: 28px;
    padding: 4px 7px;
}

.crm-cip-work-popup-page textarea.services-input {
    height: 58px;
}

.crm-cip-work-popup-page .crm-cip-work-notes textarea.services-input {
    flex: 1 1 auto;
    height: auto;
}

.crm-cip-work-popup-page .services-button {
    height: 30px;
    min-height: 30px;
}

.crm-cip-work-popup-page .crm-customer-menu {
    z-index: 240;
}

.crm-cip-work-popup-page .crm-customer-options {
    max-height: 170px;
}

@media (max-width: 860px) {
    .crm-cip-work-grid {
        grid-template-columns: 1fr;
    }

    .crm-cip-work-field-row {
        grid-template-columns: 1fr;
    }
}

.crm-sidebar .dhx_layout-cell-content,
.dhx_layout-cell#nav .dhx_layout-cell-content {
    background: #888B90;
    border: 0;
    box-shadow: none;
}

.crm-sidebar .dhx_sidebar-button {
    color: #fff !important;
    padding: 8px 12px;
}

.crm-sidebar .dhx_sidebar-button__text,
.crm-sidebar .dhx_sidebar-button__icon {
    color: #fff !important;
}

.crm-sidebar .dhx_sidebar-button:hover {
    background: #5D5D5F;
    color: #fff !important;
}

.crm-sidebar .dhx_sidebar-button--active {
    background: #6D6D6F;
    color: #fff !important;
    box-shadow: none;
}

.crm-sidebar .dhx_sidebar-button--active .dhx_sidebar-button__text,
.crm-sidebar .dhx_sidebar-button--active .dhx_sidebar-button__icon {
    color: #fff !important;
}

/* Toggle-Button im Sidebar-Header weiss halten */
.crm-sidebar .dhx_sidebar-button .dxi-menu {
    color: #fff !important;
}

.crm-sidebar .crm-sidebar-separator {
    pointer-events: none;
}

.crm-sidebar .crm-sidebar-separator .dhx_sidebar-button,
.crm-sidebar .dhx_sidebar-button.crm-sidebar-separator {
    min-height: 22px;
    padding: 4px 12px;
    background: transparent !important;
    opacity: 1;
}

.crm-sidebar .crm-sidebar-separator .dhx_sidebar-button__icon,
.crm-sidebar .dhx_sidebar-button.crm-sidebar-separator .dhx_sidebar-button__icon {
    display: none;
}

.crm-sidebar .crm-sidebar-separator .dhx_sidebar-button__text,
.crm-sidebar .dhx_sidebar-button.crm-sidebar-separator .dhx_sidebar-button__text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 11px;
    font-weight: 600;
    line-height: 14px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.crm-sidebar .crm-sidebar-separator .dhx_sidebar-button__text::before,
.crm-sidebar .crm-sidebar-separator .dhx_sidebar-button__text::after,
.crm-sidebar .dhx_sidebar-button.crm-sidebar-separator .dhx_sidebar-button__text::before,
.crm-sidebar .dhx_sidebar-button.crm-sidebar-separator .dhx_sidebar-button__text::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(255, 255, 255, 0.32);
}

/* Layout-Trennlinie zwischen Sidebar und Content entfernen */
.dhx_layout-cell#nav,
.dhx_layout-cell#nav .dhx_layout-cell-content {
    border: 0 !important;
    box-shadow: none !important;
    outline: none;
}

.doku-module,
.kunden-module,
.produkte-module,
.angebote-module,
.gutschriften-module,
.services-module,
.fibu-module,
.auftraege-module,
.lieferscheine-module,
.rechnungen-module,
.admin-module {
    height: 100%;
    background: #eef2f5;
}

.doku-module .dhx_layout-cell-content,
.doku-module .dhx_layout-cell-inner_html,
.doku-module,
.kunden-module .dhx_layout-cell-content,
.kunden-module .dhx_layout-cell-inner_html,
.produkte-module .dhx_layout-cell-content,
.produkte-module .dhx_layout-cell-inner_html,
.angebote-module .dhx_layout-cell-content,
.gutschriften-module .dhx_layout-cell-content,
.services-module .dhx_layout-cell-content,
.angebote-module .dhx_layout-cell-inner_html,
.gutschriften-module .dhx_layout-cell-inner_html,
.services-module .dhx_layout-cell-inner_html,
.auftraege-module,
.lieferscheine-module .dhx_layout-cell-content,
.auftraege-module,
.lieferscheine-module .dhx_layout-cell-inner_html,
.rechnungen-module .dhx_layout-cell-content,
.rechnungen-module .dhx_layout-cell-inner_html,
.rechnungen-module,
.admin-module .dhx_layout-cell-content,
.admin-module .dhx_layout-cell-inner_html,
.admin-module {
    height: 100%;
}

.doku-list-panel,
.doku-detail-panel,
.kunden-detail-panel,
.produkte-detail-panel,
.angebote-detail-panel,
.gutschriften-detail-panel,
.services-detail-panel,
.auftraege-detail-panel,
.lieferscheine-detail-panel,
.rechnungen-detail-panel,
.admin-list-panel,
.admin-detail-panel {
    min-width: 0;
    min-height: 0;
    background: #fff;
}

.doku-detail-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.doku-list-panel,
.kunden-list-panel,
.produkte-list-panel,
.angebote-list-panel,
.gutschriften-list-panel,
.services-list-panel,
.fibu-list-panel,
.auftraege-list-panel,
.lieferscheine-list-panel,
.rechnungen-list-panel,
.admin-list-panel {
    border-right: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.doku-panel-head,
.doku-detail-toolbar,
.doku-section-head,
.kunden-panel-head,
.kunden-detail-toolbar,
.kunden-section-head,
.produkte-panel-head,
.produkte-detail-toolbar,
.produkte-section-head,
.angebote-panel-head,
.gutschriften-panel-head,
.services-panel-head,
.fibu-panel-head,
.angebote-detail-toolbar,
.gutschriften-detail-toolbar,
.services-detail-toolbar,
.angebote-section-head,
.gutschriften-section-head,
.services-section-head,
.auftraege-panel-head,
.auftraege-detail-toolbar,
.auftraege-section-head,
.lieferscheine-panel-head,
.lieferscheine-detail-toolbar,
.lieferscheine-section-head,
.rechnungen-panel-head,
.rechnungen-detail-toolbar,
.rechnungen-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.doku-panel-head,
.doku-detail-toolbar,
.kunden-panel-head,
.kunden-detail-toolbar,
.produkte-panel-head,
.produkte-detail-toolbar,
.angebote-panel-head,
.gutschriften-panel-head,
.services-panel-head,
.fibu-panel-head,
.angebote-detail-toolbar,
.gutschriften-detail-toolbar,
.services-detail-toolbar,
.auftraege-panel-head,
.auftraege-detail-toolbar,
.lieferscheine-panel-head,
.rechnungen-panel-head {
    min-height: 42px;
    padding: 6px 10px;
    border-bottom: 1px solid #d8dee5;
    box-sizing: border-box;
}

.doku-panel-title,
.kunden-panel-title,
.produkte-panel-title,
.angebote-panel-title,
.gutschriften-panel-title,
.services-panel-title,
.fibu-panel-title,
.auftraege-panel-title,
.lieferscheine-panel-title,
.rechnungen-panel-title {
    color: #1d2733;
    font-size: 14px;
    line-height: 18px;
    font-weight: 600;
}

.doku-panel-subtitle,
.kunden-panel-subtitle,
.produkte-panel-subtitle,
.angebote-panel-subtitle,
.gutschriften-panel-subtitle,
.services-panel-subtitle,
.fibu-panel-subtitle,
.auftraege-panel-subtitle,
.lieferscheine-panel-subtitle,
.rechnungen-panel-subtitle {
    color: #667381;
    font-size: 11px;
    line-height: 15px;
}

.kunden-search-row,
.produkte-search-row,
.angebote-search-row,
.gutschriften-search-row,
.services-search-row,
.auftraege-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid #edf0f3;
}

.angebote-filter-bar,
.gutschriften-filter-bar,
.services-filter-bar,
.auftraege-filter-bar,
.lieferscheine-filter-bar,
.rechnungen-filter-bar {
    display: flex;
    align-items: end;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid #edf0f3;
}

.angebote-filter-field,
.gutschriften-filter-field,
.services-filter-field,
.auftraege-filter-field,
.lieferscheine-filter-field,
.rechnungen-filter-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.angebote-filter-field span,
.gutschriften-filter-field span,
.services-filter-field span,
.auftraege-filter-field span,
.lieferscheine-filter-field span,
.rechnungen-filter-field span {
    color: #667381;
    font-size: 11px;
    line-height: 14px;
}

.angebote-filter-field input,
.gutschriften-filter-field input,
.services-filter-field input,
.auftraege-filter-field input,
.lieferscheine-filter-field input,
.rechnungen-filter-field input {
    width: 130px;
}

.angebote-filter-select,
.gutschriften-filter-select,
.services-filter-select,
.auftraege-filter-select,
.lieferscheine-filter-select,
.rechnungen-filter-select {
    width: 140px;
    align-self: end;
}

textarea.doku-input {
    height: auto;
    min-height: 28px;
}

.doku-input,
.kunden-input,
.produkte-input,
.angebote-input,
.gutschriften-input,
.services-input,
.auftraege-input,
.lieferscheine-input,
.rechnungen-input {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 3px 7px;
    box-sizing: border-box;
    border: 1px solid #cfd7df;
    border-radius: 4px;
    background: #fff;
    color: #24313d;
    font: inherit;
    font-size: 12px;
}

.auftraege-customer-combo {
    position: relative;
    width: 100%;
}

.auftraege-customer-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    cursor: pointer;
}

.auftraege-customer-toggle span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auftraege-customer-caret {
    flex: 0 0 auto;
    color: #667381;
    font-size: 10px;
}

.auftraege-customer-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    padding: 6px;
    border: 1px solid #cfd7df;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(30, 43, 55, 0.16);
}

.auftraege-customer-search {
    margin-bottom: 6px;
}

.auftraege-customer-options {
    max-height: 230px;
    overflow: auto;
}

.auftraege-customer-option {
    display: block;
    width: 100%;
    min-height: 26px;
    padding: 5px 7px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #24313d;
    font: inherit;
    font-size: 12px;
    line-height: 16px;
    text-align: left;
    cursor: pointer;
}

.auftraege-customer-option:hover,
.auftraege-customer-option:focus,
.auftraege-customer-option.is-selected {
    background: #e8f1f9;
    outline: none;
}

.auftraege-customer-empty {
    padding: 8px 7px;
    color: #667381;
    font-size: 12px;
}

.crm-customer-combo {
    position: relative;
    width: 100%;
}

.crm-customer-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    cursor: pointer;
}

.crm-customer-toggle span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-customer-caret {
    flex: 0 0 auto;
    color: #667381;
    font-size: 10px;
}

.crm-customer-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    padding: 6px;
    border: 1px solid #cfd7df;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(30, 43, 55, 0.16);
}

.crm-customer-search {
    margin-bottom: 6px;
}

.crm-customer-options {
    max-height: 230px;
    overflow: auto;
}

.crm-customer-option {
    display: block;
    width: 100%;
    min-height: 26px;
    padding: 5px 7px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #24313d;
    font: inherit;
    font-size: 12px;
    line-height: 16px;
    text-align: left;
    cursor: pointer;
}

.crm-customer-option:hover,
.crm-customer-option:focus,
.crm-customer-option.is-selected {
    background: #e8f1f9;
    outline: none;
}

.crm-customer-empty {
    padding: 8px 7px;
    color: #667381;
    font-size: 12px;
}

.doku-button,
.doku-icon-button,
.kunden-button,
.kunden-icon-button,
.produkte-button,
.produkte-icon-button,
.angebote-button,
.gutschriften-button,
.services-button,
.fibu-button,
.toolbox-button,
.angebote-icon-button,
.gutschriften-icon-button,
.services-icon-button,
.auftraege-button,
.auftraege-icon-button,
.lieferscheine-button,
.lieferscheine-icon-button,
.rechnungen-button,
.rechnungen-icon-button,
.toolbox-icon-button {
    height: 28px;
    border: 1px solid #1f6fb2;
    border-radius: 4px;
    background: #1f6fb2;
    color: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.doku-button,
.kunden-button,
.produkte-button,
.angebote-button,
.gutschriften-button,
.services-button,
.fibu-button,
.auftraege-button,
.lieferscheine-button,
.rechnungen-button,
.toolbox-button {
    padding: 0 10px;
}

.doku-icon-button,
.kunden-icon-button,
.produkte-icon-button,
.angebote-icon-button,
.gutschriften-icon-button,
.services-icon-button,
.auftraege-icon-button,
.lieferscheine-icon-button,
.rechnungen-icon-button,
.toolbox-icon-button {
    width: 28px;
    font-size: 16px;
    line-height: 26px;
}

.doku-button-secondary,
.kunden-button-secondary,
.produkte-button-secondary,
.angebote-button-secondary,
.gutschriften-button-secondary,
.services-button-secondary,
.fibu-button-secondary,
.auftraege-button-secondary,
.lieferscheine-button-secondary,
.rechnungen-button-secondary,
.toolbox-button-secondary {
    border-color: #c5ced8;
    background: #fff;
    color: #263238;
}

.doku-button-danger,
.kunden-button-danger,
.produkte-button-danger,
.angebote-button-danger,
.gutschriften-button-danger,
.services-button-danger,
.fibu-button-danger,
.auftraege-button-danger,
.lieferscheine-button-danger,
.rechnungen-button-danger,
.toolbox-button-danger {
    border-color: #a93232;
    background: #a93232;
}

.doku-button:disabled,
.doku-icon-button:disabled,
.doku-input:disabled,
.kunden-button:disabled,
.kunden-icon-button:disabled,
.kunden-input:disabled,
.produkte-button:disabled,
.produkte-icon-button:disabled,
.produkte-input:disabled,
.angebote-button:disabled,
.gutschriften-button:disabled,
.services-button:disabled,
.fibu-button:disabled,
.toolbox-button:disabled,
.toolbox-icon-button:disabled,
.angebote-icon-button:disabled,
.gutschriften-icon-button:disabled,
.services-icon-button:disabled,
.angebote-input:disabled,
.gutschriften-input:disabled,
.services-input:disabled,
.auftraege-button:disabled,
.auftraege-icon-button:disabled,
.auftraege-input:disabled,
.fibu-input:disabled,
.lieferscheine-button:disabled,
.lieferscheine-icon-button:disabled,
.lieferscheine-input:disabled,
.rechnungen-button:disabled,
.rechnungen-icon-button:disabled,
.rechnungen-input:disabled {
    cursor: default;
    opacity: 0.55;
}

.crm-grid-container {
    min-height: 0;
    flex: 1;
    overflow: hidden;
    width: 100%;
}

.crm-grid {
    --dhx-font-size-normal: 12px;
    --dhx-font-size-small: 12px;
    --dhx-font-weight-regular: 400;
    --dhx-s-grid-selection-background: #EBA832;
}
.crm-grid .dhx_grid-cell {
    padding: 1px 6px !important;
    font-family: Tahoma !important;
    font-size: 12px !important;
    color: #000 !important;
}
.crm-grid .dhx_grid-header-cell {
    padding: 2px 6px !important;
    font-family: Tahoma !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    background: #EEEEEE !important;
    color: #333 !important;
    border-bottom: 2px solid #bbb !important;
}
.crm-grid .dhx_grid-header-cell .dhx_input,
.crm-grid .dhx_grid-filter {
    font-size: 12px !important;
    height: 20px !important;
    padding: 0 4px !important;
}

.crm-grid .dhx_grid-header-cell .dxi:before,
.crm-grid .dhx_grid-filter .dxi:before,
.crm-grid .dhx_grid-header-cell .dhx_grid-sort-icon,
.crm-grid .dhx_grid-header-cell .dhx_grid-filter__icon,
.crm-grid .dhx_grid-header-cell .dhx_input__icon {
    display: none !important;
}

.crm-grid .dhx_grid-header-cell .dhx_grid-header-cell-text,
.crm-grid .dhx_grid-header-cell .dhx_grid-header-cell-text_content {
    padding-right: 0 !important;
}

.crm-grid .dhx_grid-cell {
    padding: 1px 6px !important;
}
.crm-grid .dhx_grid-header-cell {
    padding: 2px 6px !important;
    background: #EEEEEE !important;
}
.crm-grid .dhx_grid-header-cell .dhx_input,
.crm-grid .dhx_grid-filter {
    font-size: 12px !important;
    height: 20px !important;
    padding: 0 4px !important;
    background: #eef1f4 !important;
    border: 1px solid #c0c8d0 !important;
}
.crm-grid .dhx_grid-selected-row:after {
    opacity: 0.35 !important;
}
.crm-grid .dhx_grid-selected-row .dhx_grid-cell {
    background: transparent !important;
}

.doku-detail-scroll,
.kunden-detail-scroll,
.produkte-detail-scroll,
.angebote-detail-scroll,
.gutschriften-detail-scroll,
.services-detail-scroll,
.auftraege-detail-scroll,
.lieferscheine-detail-scroll,
.rechnungen-detail-scroll {
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}



.doku-detail-scroll > .doku-section:last-child,
.angebote-detail-scroll > .angebote-section:last-child,
.gutschriften-detail-scroll > .gutschriften-section:last-child,
.services-detail-scroll > .services-section:last-child,
.auftraege-detail-scroll > .auftraege-section:last-child,
.lieferscheine-detail-scroll > .lieferscheine-section:last-child,
.rechnungen-detail-scroll > .rechnungen-section:last-child {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.kunden-form-columns,
.angebote-form-columns,
.gutschriften-form-columns,
.services-form-columns,
.auftraege-form-columns,
.lieferscheine-form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}

.doku-section,
.kunden-section,
.produkte-section,
.angebote-section,
.gutschriften-section,
.services-section,
.auftraege-section,
.lieferscheine-section {
    padding: 10px;
    border: 1px solid #d8dee5;
    border-radius: 6px;
    background: #fff;
}

.doku-section + .doku-section,
.kunden-section + .kunden-section,
.produkte-section + .produkte-section,
.angebote-section + .angebote-section,
.gutschriften-section + .gutschriften-section,
.services-section + .services-section,
.auftraege-section + .auftraege-section,
.lieferscheine-section + .lieferscheine-section,
.doku-bottom-grid,
.kunden-bottom-grid,
.angebote-bottom-grid,
.gutschriften-bottom-grid,
.services-bottom-grid,
.auftraege-bottom-grid,
.lieferscheine-bottom-grid {
    margin-top: 10px;
}

.kunden-form-columns .kunden-section + .kunden-section,
.angebote-form-columns .angebote-section + .angebote-section,
.gutschriften-form-columns .gutschriften-section + .gutschriften-section,
.services-form-columns .services-section + .services-section,
.auftraege-form-columns .auftraege-section + .auftraege-section,
.lieferscheine-form-columns .lieferscheine-section + .lieferscheine-section {
    margin-top: 0;
}

.doku-section-title,
.kunden-section-title,
.produkte-section-title,
.angebote-section-title,
.gutschriften-section-title,
.services-section-title,
.auftraege-section-title,
.lieferscheine-section-title {
    color: #1d2733;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}

.doku-stammdaten-grid,
.kunden-stammdaten-grid,
.angebote-stammdaten-grid,
.gutschriften-stammdaten-grid,
.services-stammdaten-grid,
.auftraege-stammdaten-grid,
.lieferscheine-stammdaten-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin-top: 10px;
}

.kunden-zusatzdaten-grid,
.angebote-zusatzdaten-grid,
.gutschriften-zusatzdaten-grid,
.services-zusatzdaten-grid,
.auftraege-zusatzdaten-grid,
.lieferscheine-zusatzdaten-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
}

.services-telefonie-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}

.doku-form,
.produkte-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin-top: 10px;
}

.doku-field,
.kunden-field,
.produkte-field,
.angebote-field,
.gutschriften-field,
.services-field,
.auftraege-field,
.lieferscheine-field {
    display: block;
}

.doku-field span,
.kunden-field span,
.produkte-field span,
.angebote-field span,
.gutschriften-field span,
.services-field span,
.auftraege-field span,
.lieferscheine-field span {
    display: block;
    margin-bottom: 4px;
    color: #667381;
    font-size: 12px;
    line-height: 16px;
}

.doku-check {
    min-height: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 20px;
}

.doku-check input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    flex: 0 0 16px;
}

.doku-field input,
.doku-field select,
.doku-field textarea,
.kunden-field input,
.kunden-field select,
.angebote-field input,
.gutschriften-field input,
.services-field input,
.angebote-field select,
.gutschriften-field select,
.services-field select,
.angebote-field textarea,
.gutschriften-field textarea,
.services-field textarea,
.auftraege-field input,
.auftraege-field select,
.auftraege-field textarea,
.lieferscheine-field input,
.lieferscheine-field select,
.lieferscheine-field textarea {
    width: 100%;
    box-sizing: border-box;
}

.services-field--checkbox {
    min-height: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 20px;
}

.services-field--checkbox span {
    margin-bottom: 0;
}

.services-field--checkbox input[type="checkbox"].services-input {
    width: 16px;
    min-width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    flex: 0 0 16px;
}

.doku-actions,
.kunden-actions,
.produkte-actions,
.angebote-actions,
.gutschriften-actions,
.services-actions,
.fibu-actions,
.auftraege-actions,
.lieferscheine-actions {
    display: flex;
    gap: 8px;
}

.fibu-actions {
    flex: 1 1 auto;
}

.fibu-action-spacer {
    flex: 1 1 auto;
}

.kunden-bottom-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.angebote-bottom-grid,
.gutschriften-bottom-grid,
.services-bottom-grid,
.auftraege-bottom-grid,
.lieferscheine-bottom-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.kunden-table-wrap {
    max-height: 220px;
    margin-top: 8px;
    overflow: auto;
    border: 1px solid #edf0f3;
}

.doku-search-row {
    padding: 6px 10px;
    border-bottom: 1px solid #edf0f3;
}

.doku-search-row input {
    width: 100%;
    box-sizing: border-box;
}

.doku-table-wrap {
    flex: 1;
    min-height: 0;
    margin-top: 10px;
    overflow: auto;
    border: 1px solid #edf0f3;
}

.angebote-table-wrap,
.gutschriften-table-wrap,
.services-table-wrap,
.auftraege-table-wrap,
.lieferscheine-table-wrap {
    flex: 1;
    min-height: 0;
    margin-top: 10px;
    overflow: auto;
    border: 1px solid #edf0f3;
}

.doku-table,
.kunden-table,
.angebote-table,
.gutschriften-table,
.services-table,
.auftraege-table,
.lieferscheine-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.doku-table th,
.doku-table td,
.kunden-table th,
.kunden-table td,
.angebote-table th,
.gutschriften-table th,
.services-table th,
.angebote-table td,
.gutschriften-table td,
.services-table td,
.auftraege-table th,
.auftraege-table td,
.lieferscheine-table th,
.lieferscheine-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #edf0f3;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.doku-table th,
.kunden-table th,
.angebote-table th,
.gutschriften-table th,
.services-table th,
.auftraege-table th,
.lieferscheine-table th {
    position: sticky;
    top: 0;
    background: #f7f9fb;
    color: #4f5d6a;
    font-weight: 600;
}

.doku-table th:nth-child(1) { width: 180px; }
.doku-table th:nth-child(2) { width: 140px; }
.doku-table th:nth-child(3) { width: 100px; }
.doku-table th:nth-child(4) { width: 300px; }
.doku-table th:nth-child(5) { width: 200px; }
.doku-table th:nth-child(6) { width: 50px; }
.doku-table th:nth-child(7) { width: 80px; }
.doku-table th:nth-child(8) { width: 50px; }

.services-rechnungen-table th {
    white-space: nowrap;
    word-break: normal;
}

.services-rechnung-row {
    cursor: pointer;
}

.services-rechnung-row:hover td {
    background: #eef4fb;
}

.doku-row-actions,
.kunden-row-actions,
.angebote-row-actions,
.gutschriften-row-actions,
.services-row-actions,
.auftraege-row-actions {
    width: 50px;
    white-space: nowrap;
    text-align: center;
}

.doku-row-actions button,
.kunden-row-actions button,
.angebote-row-actions button,
.gutschriften-row-actions button,
.services-row-actions button,
.auftraege-row-actions button {
    margin: 0 2px;
    border: 0;
    background: transparent;
    color: #1f6fb2;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
}

.kunden-row-actions button:hover,
.angebote-row-actions button:hover,
.gutschriften-row-actions button:hover,
.services-row-actions button:hover,
.auftraege-row-actions button:hover {
    background: #eef1f4;
    border-radius: 3px;
}

.doku-modal-root,
.kunden-modal-root,
.angebote-modal-root,
.gutschriften-modal-root,
.services-modal-root,
.auftraege-modal-root {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.doku-modal-backdrop,
.kunden-modal-backdrop,
.angebote-modal-backdrop,
.gutschriften-modal-backdrop,
.services-modal-backdrop,
.auftraege-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 31, 42, 0.42);
}

.doku-modal,
.kunden-modal,
.angebote-modal,
.gutschriften-modal,
.services-modal,
.auftraege-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 620px;
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    display: flex;
    flex-direction: column;
    transform: translate(-50%, -50%);
    border: 1px solid #c7d0da;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(19, 31, 43, 0.28);
}

.doku-modal-head,
.doku-modal-actions,
.kunden-modal-head,
.kunden-modal-actions,
.angebote-modal-head,
.gutschriften-modal-head,
.services-modal-head,
.angebote-modal-actions,
.gutschriften-modal-actions,
.services-modal-actions,
.auftraege-modal-head,
.auftraege-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #d8dee5;
}

.doku-modal-actions,
.kunden-modal-actions,
.angebote-modal-actions,
.gutschriften-modal-actions,
.services-modal-actions,
.auftraege-modal-actions {
    justify-content: flex-end;
    border-top: 1px solid #d8dee5;
    border-bottom: 0;
}

.doku-modal-body,
.kunden-modal-body,
.angebote-modal-body,
.gutschriften-modal-body,
.services-modal-body,
.auftraege-modal-body {
    min-height: 0;
    overflow: auto;
    padding: 14px;
}

.doku-item-form,
.kunden-sepa-form,
.kunden-contact-form,
.kunden-price-form,
.angebote-artikel-form,
.gutschriften-artikel-form,
.services-artikel-form,
.auftraege-artikel-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    margin-top: 0;
}

.kunden-price-results,
.angebote-price-results,
.gutschriften-price-results,
.services-price-results,
.auftraege-price-results {
    margin-top: 10px;
    max-height: 260px;
    overflow: auto;
    border: 1px solid #d8dee5;
    border-radius: 4px;
}

.kunden-price-result,
.angebote-price-result,
.gutschriften-price-result,
.services-price-result,
.auftraege-price-result {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.kunden-price-result:hover,
.angebote-price-result:hover,
.gutschriften-price-result:hover,
.services-price-result:hover,
.auftraege-price-result:hover {
    background: #e8f2fb;
}

.kunden-price-result-active,
.angebote-price-result-active,
.gutschriften-price-result-active,
.services-price-result-active,
.auftraege-price-result-active {
    background: #EBA832;
}

.kunden-price-result-active:hover,
.angebote-price-result-active:hover,
.gutschriften-price-result-active:hover,
.services-price-result-active:hover,
.auftraege-price-result-active:hover {
    background: #EBA832;
}

.kunden-price-result-name,
.angebote-price-result-name,
.gutschriften-price-result-name,
.services-price-result-name,
.auftraege-price-result-name {
    font-weight: 600;
    color: #24313d;
}

.kunden-price-result-preis,
.angebote-price-result-preis,
.gutschriften-price-result-preis,
.services-price-result-preis,
.auftraege-price-result-preis {
    color: #667381;
    font-size: 12px;
}

.angebote-filter-row,
.gutschriften-filter-row,
.services-filter-row,
.auftraege-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid #edf0f3;
    align-items: center;
}

.angebote-filter-row label,
.gutschriften-filter-row label,
.services-filter-row label,
.auftraege-filter-row label {
    color: #667381;
    font-size: 11px;
    white-space: nowrap;
}

.angebote-filter-row .angebote-input,
.gutschriften-filter-row .gutschriften-input,
.services-filter-row .services-input,
.auftraege-filter-row .auftraege-input {
    width: auto;
}

.angebote-filter-status,
.gutschriften-filter-status,
.services-filter-status,
.auftraege-filter-status {
    min-width: 80px;
}

.angebote-detail-toolbar .angebote-actions button:disabled,
.gutschriften-detail-toolbar .gutschriften-actions button:disabled,
.services-detail-toolbar .services-actions button:disabled,
.auftraege-detail-toolbar .auftraege-actions button:disabled {
    opacity: 0.55;
    cursor: default;
}

.angebote-modal--wide,
.gutschriften-modal--wide,
.services-modal--wide,
.auftraege-modal--wide {
    width: 1150px;
}

.services-modal--kopfnummer {
    width: 920px;
    height: min(620px, calc(100vh - 56px));
}

.services-modal--kopfnummer .services-modal-body {
    display: flex;
    flex-direction: column;
}

.services-modal--kopfnummer .services-table-wrap {
    min-height: 0;
}

.services-modal--nis2 {
    height: 480px;
}

.services-modal--nis2 .services-modal-body {
    flex: 1 1 auto;
    overflow: visible;
}

.services-modal--nis2 .crm-customer-options {
    max-height: 340px;
}

.backup-module {
    display: flex;
    height: 100%;
    min-height: 0;
}

.backup-list-panel {
    width: 58%;
    min-width: 520px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid #d0d0d0;
    background: #f8fafc;
}

.backup-detail-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 430px;
    min-height: 0;
    background: #fff;
}

.backup-detail-panel.is-collapsed {
    display: none;
}

.backup-search-row {
    padding: 7px 10px;
    border-bottom: 1px solid #d8dee5;
    background: #fafbfc;
}

.backup-search-row .services-input {
    max-width: 420px;
}

.backup-customers-list,
.backup-items-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: #fff;
}

.backup-customer-card {
    width: 100%;
    min-height: 50px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) minmax(118px, auto);
    gap: 8px;
    align-items: center;
    padding: 7px 10px;
    border: 0;
    border-bottom: 1px solid #e1e7ee;
    background: #fff;
    color: #1f2933;
    text-align: left;
    cursor: pointer;
}

.backup-customer-card:hover,
.backup-customer-card.is-selected {
    background: #eef5ff;
}

.backup-customer-card.is-selected {
    box-shadow: inset 3px 0 0 #2f76d2;
}

.backup-status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 16px;
    background: #8a98a8;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.backup-status-dot-ok {
    background: #28a745;
}

.backup-status-dot-warning {
    background: #f0ad4e;
}

.backup-status-dot-time {
    background: #d9534f;
}

.backup-status-dot-error {
    background: #c9302c;
}

.backup-customer-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.backup-customer-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.backup-customer-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6a7785;
    font-size: 12px;
}

.backup-customer-time {
    justify-self: end;
    color: #6a7785;
    font-size: 12px;
    white-space: nowrap;
}

.backup-customer-time.is-critical {
    color: #c9302c;
    font-weight: 600;
}

.backup-empty {
    padding: 14px 12px;
    color: #6a7785;
    font-size: 13px;
}

.backup-item-card {
    grid-template-columns: 24px minmax(0, 1fr) minmax(132px, auto);
    min-height: 46px;
}

.backup-lists {
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 10px;
    flex: 1;
}

.backup-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.backup-section .services-section-title {
    padding: 5px 8px;
    border: 1px solid #d1d7de;
    border-bottom: 2px solid #bbb;
    background: #EEEEEE;
    color: #333;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 12px;
    line-height: 18px;
    font-weight: 600;
}

.backup-statusbar {
    min-height: 22px;
    padding: 3px 10px;
    border-top: 1px solid #d8dee5;
    color: #667381;
    font-size: 12px;
    background: #fff;
}

.backup-form {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.backup-modal {
    width: min(900px, calc(100vw - 40px));
    max-height: calc(100vh - 56px);
}

.backup-imports-modal {
    width: min(860px, calc(100vw - 40px));
    max-height: calc(100vh - 56px);
}

.backup-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    overflow: auto;
}

.backup-history {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(460px, calc(100vh - 330px));
    gap: 10px;
    border-top: 1px solid #d8dee5;
    padding-top: 12px;
}

.backup-history-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.backup-history-form {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

#backup-history-list {
    flex: 1;
    min-height: 220px;
    max-height: 360px;
    overflow: auto;
}

.backup-history-table {
    table-layout: fixed;
}

.backup-history-table th:nth-child(1),
.backup-history-table td:nth-child(1) {
    width: 145px;
    white-space: nowrap;
}

.backup-history-table th:nth-child(2),
.backup-history-table td:nth-child(2) {
    width: 115px;
    white-space: nowrap;
}

.backup-history-table th:nth-child(4),
.backup-history-table td:nth-child(4) {
    width: 90px;
    white-space: nowrap;
}

.backup-history-table td:nth-child(3) {
    overflow-wrap: anywhere;
}

.backup-history-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.backup-text-modal-body {
    min-width: min(900px, calc(100vw - 80px));
    min-height: min(720px, calc(100vh - 120px));
}

.backup-text-field {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.backup-textarea {
    min-height: 540px;
    height: min(620px, calc(100vh - 260px));
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
    line-height: 18px;
}

#backup-imports-list {
    min-height: 180px;
    max-height: min(520px, calc(100vh - 190px));
    overflow: auto;
}

#backup-imports-list .services-table {
    table-layout: fixed;
}

#backup-imports-list .services-table th:nth-child(1),
#backup-imports-list .services-table td:nth-child(1) {
    width: 145px;
    white-space: nowrap;
}

#backup-imports-list .services-table th:nth-child(2),
#backup-imports-list .services-table td:nth-child(2) {
    width: 80px;
    white-space: nowrap;
}

#backup-imports-list .services-table th:nth-child(3),
#backup-imports-list .services-table td:nth-child(3) {
    width: auto;
}

#backup-imports-list .services-table th:nth-child(4),
#backup-imports-list .services-table td:nth-child(4) {
    width: 260px;
}

#backup-imports-list .services-table td:nth-child(3),
#backup-imports-list .services-table td:nth-child(4) {
    overflow-wrap: anywhere;
}

.backup-config-body {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 12px;
    min-height: 520px;
}

.backup-config-body > div {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.row-negative {
    background-color: #fdd !important;
}

.dhx_grid-row.row-negative {
    background-color: #fdd;
}

.dhx_grid-row.row-negative .dhx_grid-cell {
    background-color: #fdd !important;
}

.dhx_grid-row.row-green,
.dhx_grid-row.row-green .dhx_grid-cell,
.dhx_grid-row.row-green .dhx_grid-cell__content,
.dhx_grid-row.row-green .fibu-grid-input {
    background: #dff3df !important;
}
.dhx_grid-row.row-green input,
.dhx_grid-row.row-green select {
    background-color: #dff3df !important;
}
.dhx_grid-row.row-blue .dhx_grid-cell {
    color: #1565C0 !important;
}
.dhx_grid-row.row-orange .dhx_grid-cell {
    color: #C7A317 !important;
}
.dhx_grid-row.row-red .dhx_grid-cell {
    color: #C62828 !important;
}
.dhx_grid-row.row-grey .dhx_grid-cell {
    color: #757575 !important;
}
.dhx_grid-row.row-camt-open,
.dhx_grid-row.row-camt-open .dhx_grid-cell,
.dhx_grid-row.row-camt-open .dhx_grid-cell__content {
    background: #f7c8c8 !important;
}
.dhx_grid-row.row-camt-single,
.dhx_grid-row.row-camt-single .dhx_grid-cell,
.dhx_grid-row.row-camt-single .dhx_grid-cell__content {
    background: #c8f7c5 !important;
}
.dhx_grid-row.row-camt-multi,
.dhx_grid-row.row-camt-multi .dhx_grid-cell,
.dhx_grid-row.row-camt-multi .dhx_grid-cell__content {
    background: #d5e8ff !important;
}
.dhx_grid-row.row-camt-fallback,
.dhx_grid-row.row-camt-fallback .dhx_grid-cell,
.dhx_grid-row.row-camt-fallback .dhx_grid-cell__content {
    background: #ffe5b4 !important;
}
.dhx_grid-row.row-camt-matched,
.dhx_grid-row.row-camt-matched .dhx_grid-cell,
.dhx_grid-row.row-camt-matched .dhx_grid-cell__content {
    background: #e0ffd5 !important;
}
.dhx_grid-row.row-camt-ignored,
.dhx_grid-row.row-camt-ignored .dhx_grid-cell,
.dhx_grid-row.row-camt-ignored .dhx_grid-cell__content {
    background: #eeeeee !important;
}

.fibu-camt-amount {
    display: block;
    width: 100%;
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

#rechnungen-grid .dhx_grid-cell {
    white-space: normal !important;
    word-break: break-word !important;
    overflow: hidden !important;
    line-height: 1.3 !important;
}

#artikel-produkt-grid .dhx_number-cell,
#produkte-grid .dhx_number-cell {
    justify-content: flex-end !important;
    text-align: right !important;
}

.crm-grid .dhx_grid-row:nth-child(even) {
    background: #f4f5f7;
}
.crm-grid .dhx_grid-row:nth-child(even) .dhx_grid-cell {
    background: #f4f5f7;
}

@media (max-width: 1100px) {
    .kunden-form-columns,
    .angebote-form-columns,
    .gutschriften-form-columns,
    .services-form-columns,
    .auftraege-form-columns,
    .lieferscheine-form-columns {
        grid-template-columns: 1fr;
    }

    .kunden-bottom-grid,
    .produkte-form,
    .angebote-bottom-grid,
    .gutschriften-bottom-grid,
    .services-bottom-grid,
    .auftraege-bottom-grid,
    .lieferscheine-bottom-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.admin-module {
    height: 100%;
    background: #eef2f5;
}

#services-outer,
#fibu-outer {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#services-tabbar,
#fibu-tabbar {
    flex: 0 0 42px;
    min-height: 42px;
}

#services-tabs-content,
#fibu-tabs-content {
    flex: 1;
    min-height: 0;
}

.services-tab-pane,
.fibu-tab-pane {
    height: 100%;
    min-height: 0;
}

.services-tab-pane[hidden],
.fibu-tab-pane[hidden] {
    display: none !important;
}

.services-tabbar .dhx_tabbar,
.fibu-tabbar .dhx_tabbar {
    border-bottom: 1px solid #d8dee5;
}
.services-tabbar .dhx_tabbar__item,
.fibu-tabbar .dhx_tabbar__item {
    font-size: 13px;
}

.fibu-filter-bar {
    display: flex;
    align-items: end;
    gap: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid #edf0f3;
}

.fibu-filter-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fibu-filter-field span {
    color: #667381;
    font-size: 11px;
    line-height: 14px;
}
.fibu-filter-field input {
    width: 130px;
}

.fibu-summe-label {
    margin-left: auto;
    font-size: 12px;
    color: #384653;
    white-space: nowrap;
}

.fibu-import-layout {
    display: grid;
    grid-template-columns: minmax(520px, 0.9fr) minmax(620px, 1.1fr);
    gap: 10px;
    height: 100%;
    min-height: 0;
}

.fibu-import-main,
.fibu-import-details {
    height: 100%;
    min-height: 0;
}

.fibu-import-actions {
    flex-wrap: wrap;
}

.fibu-import-filter {
    margin-left: 4px;
}

.fibu-auswertung-layout {
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(360px, 1fr) minmax(420px, 1.2fr);
    gap: 10px;
    height: 100%;
    min-height: 0;
}

.fibu-auswertung-controls,
.fibu-auswertung-chart {
    height: 100%;
    min-height: 0;
}

.fibu-auswertung-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
}

.fibu-auswertung-wide {
    grid-column: span 2;
}

.fibu-auswertung-button-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 0 12px 12px;
}

.fibu-simple-chart {
    height: 100%;
    min-height: 0;
    overflow: auto;
    padding: 12px;
}

.fibu-simple-row {
    display: grid;
    grid-template-columns: 120px 1fr 82px;
    gap: 8px;
    align-items: center;
    min-height: 30px;
    font-size: 12px;
}

.fibu-simple-label {
    color: #384653;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fibu-simple-bars {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fibu-simple-bar {
    height: 7px;
    min-width: 2px;
    border-radius: 2px;
    background: #6c8ebf;
}

.fibu-simple-bar-db {
    background: #58dccd;
}

.fibu-simple-bar-expense {
    background: #ffae35;
}

.fibu-simple-value {
    color: #667381;
    text-align: right;
    white-space: nowrap;
}

.fibu-empty-state {
    color: #667381;
    font-size: 13px;
    padding: 8px;
}

.fibu-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}

.fibu-field {
    display: block;
}
.fibu-field span {
    display: block;
    margin-bottom: 4px;
    color: #667381;
    font-size: 12px;
    line-height: 16px;
}
.fibu-field input,
.fibu-field select {
    width: 100%;
    box-sizing: border-box;
}

.fibu-input {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 3px 7px;
    box-sizing: border-box;
    border: 1px solid #cfd7df;
    border-radius: 4px;
    background: #fff;
    color: #24313d;
    font: inherit;
    font-size: 12px;
}

.fibu-grid-input {
    width: 100%;
    min-width: 0;
    height: 24px;
    padding: 2px 5px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 12px;
}

.fibu-grid-input:focus {
    border-color: #1f6fb2;
    background: #fff;
    outline: none;
}

.fibu-modal-root {
    position: fixed;
    inset: 0;
    z-index: 1000;
}
.fibu-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 31, 42, 0.42);
}
.fibu-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    display: flex;
    flex-direction: column;
    transform: translate(-50%, -50%);
    border: 1px solid #c7d0da;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(19, 31, 43, 0.28);
}
.fibu-modal-head,
.fibu-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #d8dee5;
}
.fibu-modal-actions {
    justify-content: flex-end;
    border-top: 1px solid #d8dee5;
    border-bottom: 0;
}
.fibu-modal-body {
    min-height: 0;
    overflow: auto;
    padding: 14px;
}
.fibu-icon-button {
    width: 28px;
    height: 28px;
    border: 1px solid #1f6fb2;
    border-radius: 4px;
    background: #1f6fb2;
    color: #fff;
    font: inherit;
    font-size: 16px;
    line-height: 26px;
    cursor: pointer;
}

#services-tabbar {
    flex: 0 0 42px;
    min-height: 42px;
}

#services-tabs-content {
    flex: 1;
    min-height: 0;
}

.services-tab-pane {
    height: 100%;
    min-height: 0;
}

.services-tab-pane[hidden] {
    display: none !important;
}

.admin-list-panel,
.admin-detail-panel {
    min-width: 0;
    min-height: 0;
    background: #fff;
}
.admin-detail-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.admin-list-panel {
    border-right: 1px solid #d8dee5;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.admin-panel-head,
.admin-detail-toolbar,
.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 6px 10px;
    border-bottom: 1px solid #d8dee5;
    box-sizing: border-box;
}
.admin-panel-title {
    color: #1d2733;
    font-size: 14px;
    line-height: 18px;
    font-weight: 600;
}
.admin-panel-subtitle {
    color: #667381;
    font-size: 11px;
    line-height: 15px;
}
.admin-input {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 3px 7px;
    box-sizing: border-box;
    border: 1px solid #cfd7df;
    border-radius: 4px;
    background: #fff;
    color: #24313d;
    font: inherit;
    font-size: 12px;
}
.admin-button,
.admin-icon-button {
    height: 28px;
    border: 1px solid #1f6fb2;
    border-radius: 4px;
    background: #1f6fb2;
    color: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    padding: 0 10px;
}
.admin-icon-button {
    width: 28px;
    padding: 0;
    font-size: 16px;
    line-height: 26px;
}
.admin-button-danger {
    border-color: #a93232;
    background: #a93232;
}
.admin-button:disabled {
    cursor: default;
    opacity: 0.55;
}
.admin-detail-toolbar--menu .admin-actions {
    display: none;
}
.admin-tabs {
    display: flex;
    gap: 6px;
    padding: 8px 10px 0;
    border-bottom: 1px solid #d8dee5;
    background: #fff;
}
.admin-tab-button {
    height: 30px;
    padding: 0 12px;
    border: 1px solid #cfd7df;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
    background: #eef2f5;
    color: #4f5d6a;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.admin-tab-button.is-active {
    background: #fff;
    color: #1d2733;
    font-weight: 600;
}
.admin-tab-panel {
    display: none;
    min-height: 0;
    flex: 1;
}
.admin-tab-panel:not(.is-active) {
    display: none !important;
}
.admin-tab-panel.is-active {
    display: flex;
}
.admin-detail-scroll {
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.admin-detail-scroll > .admin-form-columns {
    flex: 0 0 auto;
}
.admin-detail-scroll > .admin-section {
    flex: 0 0 auto;
}
.admin-detail-scroll > .admin-section:last-child {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.admin-form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}
.admin-section {
    padding: 10px;
    border: 1px solid #d8dee5;
    border-radius: 6px;
    background: #fff;
}
.admin-section + .admin-section {
    margin-top: 10px;
}
.admin-form-columns .admin-section + .admin-section {
    margin-top: 0;
}
.admin-section-title {
    color: #1d2733;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}
.admin-stammdaten-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin-top: 10px;
}
.admin-menu-form {
    display: grid;
    grid-template-columns: 110px 1fr 1.2fr 1fr 100px;
    gap: 8px 10px;
    margin-top: 10px;
}
.admin-menu-grid {
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}
.admin-2fa-modal {
    display: grid;
    grid-template-columns: 180px minmax(220px, 1fr);
    gap: 16px;
    align-items: start;
}
.admin-2fa-qr {
    width: 180px;
    height: 180px;
    border: 1px solid #d8dee5;
    border-radius: 6px;
    background: #fff;
}
.admin-field {
    display: block;
}
.admin-field span {
    display: block;
    margin-bottom: 4px;
    color: #667381;
    font-size: 12px;
    line-height: 16px;
}
.admin-field input[type="text"],
.admin-field input[type="password"],
.admin-field select {
    width: 100%;
    box-sizing: border-box;
}
.admin-actions {
    display: flex;
    gap: 8px;
}
.admin-table-wrap {
    flex: 1;
    min-height: 0;
    margin-top: 10px;
    overflow: auto;
    border: 1px solid #edf0f3;
}
#admin-rights {
    flex: 1;
    min-height: 0;
}
.admin-menu-panel {
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
}
.admin-menu-panel > .admin-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.admin-table th,
.admin-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #edf0f3;
    text-align: left;
    vertical-align: middle;
    word-break: break-word;
}
.admin-table th {
    position: sticky;
    top: 0;
    background: #f7f9fb;
    color: #4f5d6a;
    font-weight: 600;
}
.admin-row-actions {
    text-align: center;
    white-space: nowrap;
}
.admin-select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-weight: 600;
}

.rechnungen-op-sums {
    padding: 4px 10px;
    font-size: 11px;
    color: #4f5d6a;
    background: #f7f9fb;
    border-bottom: 1px solid #edf0f3;
}
.rechnungen-op-sums strong {
    color: #1d2733;
}
.rechnungen-detail-scroll {
    min-height: 0;
    flex: 1;
    overflow: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.rechnungen-detail-scroll > .rechnungen-section:last-child {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.rechnungen-form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}
.rechnungen-section {
    padding: 10px;
    border: 1px solid #d8dee5;
    border-radius: 6px;
    background: #fff;
}
.rechnungen-section + .rechnungen-section {
    margin-top: 10px;
}
.rechnungen-form-columns .rechnungen-section + .rechnungen-section {
    margin-top: 0;
}
.rechnungen-section-title {
    color: #1d2733;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}
.rechnungen-stammdaten-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin-top: 10px;
}
.rechnungen-zusatzdaten-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin-top: 10px;
}
.rechnungen-adress-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    margin-top: 10px;
}
.rechnungen-field {
    display: block;
}
.rechnungen-field span {
    display: block;
    margin-bottom: 4px;
    color: #667381;
    font-size: 12px;
    line-height: 16px;
}
.rechnungen-field input[type="text"],
.rechnungen-field input[type="password"],
.rechnungen-field select,
.rechnungen-field textarea {
    width: 100%;
    box-sizing: border-box;
}
.rechnungen-actions {
    display: flex;
    gap: 8px;
}
.rechnungen-table-wrap {
    flex: 1;
    min-height: 0;
    margin-top: 10px;
    overflow: auto;
    border: 1px solid #edf0f3;
}
.rechnungen-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.rechnungen-table th,
.rechnungen-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #edf0f3;
    text-align: left;
    vertical-align: middle;
    word-break: break-word;
}
.rechnungen-table th {
    position: sticky;
    top: 0;
    background: #f7f9fb;
    color: #4f5d6a;
    font-weight: 600;
}
.rechnungen-row-actions {
    text-align: center;
    white-space: nowrap;
}
.rechnungen-row-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 4px;
    font-size: 14px;
    line-height: 1;
    color: #4f5d6a;
}
.rechnungen-row-actions button:hover {
    color: #1f6fb2;
}
.rechnungen-modal-root {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rechnungen-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}
.rechnungen-modal {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.rechnungen-modal--wide {
    width: 1150px;
}
.rechnungen-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #d8dee5;
}
.rechnungen-modal-body {
    flex: 1;
    overflow: auto;
    padding: 14px;
}
.rechnungen-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: end;
    padding: 10px 14px;
    border-top: 1px solid #d8dee5;
}

.services-tabbar .dhx_tabbar {
    border-bottom: 1px solid #d8dee5;
}
.services-tabbar .dhx_tabbar__item {
    font-size: 13px;
}

/* ─── Toolbox Module ─── */
.toolbox-module {
    height: 100%;
    background: #eef2f5;
    display: flex;
    flex-direction: column;
}
.toolbox-tab-pane {
    flex: 1;
    min-height: 0;
}
.toolbox-tab-pane[hidden] {
    display: none !important;
}
.toolbox-tabbar .dhx_tabbar {
    border-bottom: 1px solid #d8dee5;
}
.toolbox-tabbar .dhx_tabbar__item {
    font-size: 13px;
}
.toolbox-toolbar {
    flex-shrink: 0;
    background: #fafbfc;
    border-bottom: 1px solid #d8dee5;
}
.toolbox-vpn-layout,
.toolbox-rufnummern-layout,
.toolbox-cdr-layout,
.toolbox-syslog-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.toolbox-cdr-actions,
.toolbox-syslog-actions {
    flex-wrap: wrap;
}
.toolbox-cdr-filter,
.toolbox-syslog-filter {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #667381;
    font-size: 12px;
}
.toolbox-cdr-filter .fibu-input,
.toolbox-syslog-filter .fibu-input {
    width: 132px;
}
.toolbox-cdr-search .fibu-input,
.toolbox-syslog-search .fibu-input {
    width: 220px;
}
.toolbox-cdr-limit .fibu-input,
.toolbox-syslog-limit .fibu-input {
    width: 82px;
}
.toolbox-form {
    font-size: 13px;
}
