/*
 * Knebel CRM theme
 * Diese Datei kapselt die CRM-Oberfläche bewusst von der Website.
 * Das Grundsystem kann später mit einem anderen Theme wiederverwendet werden.
 */

:root {
    --crm-accent: #12aeb7;
    --crm-accent-dark: #0a8f97;
    --crm-line: rgba(18, 174, 183, 0.16);
    --crm-panel: rgba(255, 255, 255, 0.92);
    --crm-shadow: 0 18px 42px -34px rgba(25, 42, 46, 0.42);
}

body.crm-body {
    background:
        radial-gradient(circle at 0% 0%, rgba(18, 174, 183, 0.15), transparent 34%),
        radial-gradient(circle at 100% 30%, rgba(117, 117, 116, 0.1), transparent 28%),
        linear-gradient(135deg, #edf6f6 0%, #f5f7f7 48%, #eef3f3 100%);
}

body.crm-body .site-header {
    display: none;
}

body.crm-body .site-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background: transparent;
}

body.crm-body main {
    flex: 1;
    overflow: visible;
}

html.has-modal {
    overflow: hidden;
}

body.crm-body .site-footer.crm-footer {
    margin-top: 1.25rem;
    padding: 0.65rem 0 1.1rem;
    border-top: 0;
    background: transparent;
}

.crm-footer-minimal {
    display: flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    color: rgba(43, 58, 63, 0.56);
    font-size: 0.74rem;
}

.crm-footer-minimal .footer-link {
    color: rgba(43, 58, 63, 0.72);
    text-decoration-color: rgba(18, 174, 183, 0.35);
}

.crm-app,
.crm-login-screen {
    font-size: 0.88rem;
}

.crm-app .container,
.crm-login-screen .container {
    width: min(calc(100% - 3rem), 1280px);
    max-width: 1280px;
}

.crm-app .button,
.crm-login-screen .button {
    min-height: 44px;
    padding: 0.72rem 1.05rem;
    font-size: 0.88rem;
    border-radius: 18px;
}

.crm-app .button-primary,
.crm-login-screen .button-primary {
    border: 1px solid rgba(10, 155, 164, 0.42);
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, var(--crm-accent), #16c5cd);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 16px 34px -24px rgba(18, 174, 183, 0.86);
}

.crm-app .button-primary:hover,
.crm-login-screen .button-primary:hover {
    transform: translateY(-1px);
    border-color: rgba(10, 143, 151, 0.62);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        0 20px 38px -26px rgba(18, 174, 183, 0.9);
}

.crm-app .button-success,
.crm-login-screen .button-success {
    border: 1px solid rgba(13, 143, 102, 0.46);
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, #18b883, #0f8f66);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.36),
        0 17px 36px -24px rgba(13, 143, 102, 0.88);
}

.crm-app .button-success:hover,
.crm-login-screen .button-success:hover {
    transform: translateY(-1px);
    border-color: rgba(11, 118, 84, 0.62);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, #1ec990, #0c7f5a);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.44),
        0 20px 42px -26px rgba(13, 143, 102, 0.95);
}

.crm-app .button-danger {
    width: auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.76rem;
    border: 1px solid rgba(218, 112, 42, 0.32);
    color: #9b4f14;
    font-size: 0.78rem;
    font-weight: 850;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 232, 0.92));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 14px 28px -24px rgba(218, 112, 42, 0.62);
}

.crm-app .button-danger:hover {
    color: #fff;
    border-color: rgba(218, 112, 42, 0.58);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 44%),
        linear-gradient(135deg, #f5a54d, #df7428);
}

.crm-app .button-danger svg {
    width: 0.92rem;
    height: 0.92rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-app .button-warning,
.crm-login-screen .button-warning {
    border: 1px solid rgba(223, 122, 31, 0.46);
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, #f7aa4d, #e8791f);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        0 17px 36px -24px rgba(223, 122, 31, 0.88);
}

.crm-app .button-warning:hover,
.crm-login-screen .button-warning:hover {
    transform: translateY(-1px);
    border-color: rgba(205, 96, 13, 0.62);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, #ffb45d, #df6f19);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.46),
        0 20px 42px -26px rgba(223, 122, 31, 0.95);
}

.crm-login-screen .crm-login-panel {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    gap: 2.4rem;
    padding: 2rem;
}

.crm-login-screen .crm-login-brand {
    padding: 1.3rem;
}

.crm-login-screen .portal-login-card {
    width: 100%;
    justify-self: center;
}

.crm-app-brand,
.crm-app-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.crm-app-brand {
    padding: 0.25rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.crm-app-brand img {
    display: block;
    width: auto;
    height: clamp(2.55rem, 4vw, 3.25rem);
}

.crm-icon-button {
    display: inline-grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    border: 1px solid var(--crm-line);
    border-radius: 999px;
    color: var(--crm-accent-dark);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--crm-shadow);
    cursor: pointer;
}

.crm-website-button {
    width: 2.75rem;
    min-width: 2.75rem;
    padding: 0;
}

.crm-app-user {
    display: grid;
    gap: 0.05rem;
    min-height: 2.75rem;
    align-content: center;
    padding: 0 0.9rem;
    border: 1px solid rgba(18, 174, 183, 0.13);
    border-radius: 999px;
    color: var(--color-secondary-dark);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--crm-shadow);
}

.crm-app-user small,
.crm-app-user strong {
    display: block;
    white-space: nowrap;
}

.crm-app-user small {
    color: var(--color-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.crm-app-user strong {
    max-width: 14rem;
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: 900;
    text-overflow: ellipsis;
}

.crm-icon-button svg,
.crm-icon-button i,
.crm-app-nav svg,
.crm-app-nav i,
.crm-fab-button svg,
.crm-fab-button i {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-icon-button i,
.crm-app-nav i,
.crm-fab-button i {
    display: grid;
    place-items: center;
    font-size: 1.05rem;
}

.crm-app-nav svg,
.crm-app-nav i {
    width: 1.34rem;
    height: 1.34rem;
}

.crm-app-nav i {
    font-size: 1.22rem;
}

.crm-app .button-print {
    width: auto;
    min-height: 36px;
    gap: 0.48rem;
    padding: 0.45rem 0.76rem;
    border-color: rgba(18, 174, 183, 0.24);
    color: var(--crm-accent-dark);
    font-size: 0.78rem;
    font-weight: 850;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(235, 250, 251, 0.9));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 14px 28px -24px rgba(18, 174, 183, 0.58);
}

.crm-app .button-print img {
    width: 0.9rem;
    height: 0.9rem;
    filter: brightness(0) saturate(100%) invert(42%) sepia(58%) saturate(1123%) hue-rotate(143deg) brightness(92%) contrast(92%);
}

.crm-app .contact-form select,
.crm-app .crm-edit-table select,
.crm-app .crm-offer-item-row select {
    padding-right: 2.8rem;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background:
        rgba(255, 255, 255, 0.94)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%230a8f97' stroke-width='2.35' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E")
        no-repeat calc(100% - 0.95rem) 50% / 1rem 1rem;
}

.crm-app .form-message {
    position: fixed;
    top: max(1.2rem, env(safe-area-inset-top));
    right: max(1.2rem, env(safe-area-inset-right));
    z-index: 220;
    display: grid;
    grid-template-columns: 0.72rem minmax(0, 1fr);
    gap: 0.78rem;
    align-items: center;
    width: min(440px, calc(100% - 2rem));
    margin: 0;
    padding: 0.92rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 22px;
    color: #163337;
    font-size: 0.88rem;
    font-weight: 850;
    line-height: 1.35;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 252, 252, 0.88)),
        rgba(255, 255, 255, 0.9);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        0 26px 60px -32px rgba(15, 36, 40, 0.55),
        0 10px 26px -24px rgba(18, 174, 183, 0.82);
    backdrop-filter: blur(22px) saturate(1.3);
    -webkit-backdrop-filter: blur(22px) saturate(1.3);
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: crmToastIn 260ms cubic-bezier(0.2, 0.9, 0.2, 1);
    transition: opacity 240ms ease, transform 240ms ease;
}

.crm-app .form-message::before {
    content: "";
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: var(--crm-accent);
    box-shadow:
        0 0 0 0.36rem rgba(18, 174, 183, 0.12),
        0 0 22px rgba(18, 174, 183, 0.48);
}

.crm-app .form-message.success {
    border-color: rgba(18, 174, 183, 0.32);
}

.crm-app .form-message.error {
    color: #672020;
    border-color: rgba(204, 73, 73, 0.32);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 241, 241, 0.9)),
        rgba(255, 255, 255, 0.9);
}

.crm-app .form-message.error::before {
    background: #d65f5f;
    box-shadow:
        0 0 0 0.36rem rgba(214, 95, 95, 0.12),
        0 0 22px rgba(214, 95, 95, 0.4);
}

.crm-app .form-message.is-hiding {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
}

@keyframes crmToastIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.crm-app .crm-search-icon {
    bottom: 0.86rem;
}

.crm-app-bar {
    display: flex;
    justify-content: flex-end;
    padding-top: 1.05rem;
    padding-bottom: 0;
    align-items: center;
}

.crm-app-bar h1 {
    display: none;
}

.crm-tabs {
    position: sticky;
    position: -webkit-sticky;
    top: max(0.65rem, env(safe-area-inset-top));
    z-index: 110;
    display: flex;
    align-items: stretch;
    gap: 0.42rem;
    margin-top: 0.78rem;
    margin-bottom: 1.12rem;
    padding: 0.56rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.2), transparent 28%),
        linear-gradient(135deg, rgba(44, 61, 65, 0.64), rgba(11, 24, 28, 0.72));
    backdrop-filter: blur(30px) saturate(1.45);
    -webkit-backdrop-filter: blur(30px) saturate(1.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1),
        0 28px 68px -40px rgba(8, 24, 28, 0.9);
    scrollbar-width: none;
    isolation: isolate;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.crm-ai-offer-card.is-loading {
    pointer-events: none;
    border-color: rgba(247, 148, 50, 0.46);
    box-shadow:
        0 34px 78px -50px rgba(16, 56, 61, 0.84),
        0 0 0 1px rgba(247, 148, 50, 0.18);
}

.crm-ai-offer-card.is-loading::after {
    content: "KI kalkuliert den Entwurf ...";
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 34px;
    padding: 0.36rem 0.72rem 0.36rem 2.1rem;
    border: 1px solid rgba(247, 148, 50, 0.22);
    border-radius: 999px;
    color: #8a4c12;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background:
        radial-gradient(circle at 1.05rem 50%, transparent 0 0.36rem, rgba(247, 148, 50, 0.16) 0.37rem 0.72rem, transparent 0.73rem),
        rgba(255, 249, 239, 0.94);
    box-shadow: 0 16px 34px -28px rgba(247, 148, 50, 0.82);
}

.crm-app .button.is-loading {
    position: relative;
    z-index: 2;
    color: transparent;
    pointer-events: none;
}

.crm-app .button.is-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 1rem;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-top-color: #fff;
    border-radius: 999px;
    animation: crmSpin 740ms linear infinite;
}

.crm-app .button.is-loading::after {
    content: attr(data-loading-label);
    position: absolute;
    left: 50%;
    top: 50%;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

@keyframes crmSpin {
    to {
        transform: rotate(360deg);
    }
}

.crm-tabs::-webkit-scrollbar {
    display: none;
}

.crm-tabs a,
.crm-nav-search {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-width: 0;
    flex: 0 0 5.55rem;
    min-height: 4.35rem;
    padding: 0.54rem 0.58rem;
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 22px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    font-family: inherit;
    font-weight: 850;
    line-height: 1.1;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.crm-tabs a:hover,
.crm-nav-search:hover {
    transform: translateY(-2px);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.1);
}

.crm-tabs a span,
.crm-nav-search .crm-nav-icon {
    display: grid;
    width: 2.42rem;
    height: 2.42rem;
    place-items: center;
    border-radius: 1rem;
    color: rgba(255, 255, 255, 0.9);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 12px 24px -20px rgba(0, 0, 0, 0.55);
}

.crm-tabs a span svg,
.crm-tabs a span i,
.crm-nav-search .crm-nav-icon svg,
.crm-nav-search .crm-nav-icon i {
    width: 1.08rem;
    height: 1.08rem;
    font-size: 1.08rem;
}

.crm-tabs a span .svg-inline--fa,
.crm-nav-search .crm-nav-icon .svg-inline--fa {
    width: 1.08rem;
    height: 1.08rem;
}

.crm-nav-search {
    margin-left: auto;
    min-width: 5.2rem;
    color: #dffbfc;
}

.crm-nav-search .crm-nav-icon {
    color: #122529;
    background: rgba(255, 255, 255, 0.92);
}

.crm-tabs a.is-active span {
    color: var(--crm-accent-dark);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 26px -18px rgba(0, 0, 0, 0.4);
}

.crm-tabs a.is-active {
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 46%),
        linear-gradient(135deg, var(--crm-accent), #16c5cd);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 20px 42px -24px rgba(18, 174, 183, 0.9);
}

.crm-searchbar,
.crm-section-head,
.crm-table-wrap,
.portal-card,
.crm-detail-toolbar,
.crm-pagination {
    box-shadow: var(--crm-shadow);
}

.crm-searchbar {
    gap: 0.62rem;
    padding: 0.72rem;
    border-radius: 22px;
}

.crm-filterbar {
    grid-template-columns: minmax(360px, 1fr) minmax(170px, 210px) minmax(190px, 240px) auto auto;
}

.crm-invoice-filterbar {
    grid-template-columns: minmax(280px, 1.1fr) minmax(150px, 180px) minmax(180px, 210px) minmax(140px, 170px) minmax(140px, 170px) auto;
}

.crm-invoice-filterbar .crm-search-submit,
.crm-invoice-filterbar .crm-search-reset {
    align-self: end;
    white-space: nowrap;
}

.crm-search-label,
.crm-filter-field span,
.crm-section-head .eyebrow,
.portal-card .eyebrow {
    font-size: 0.7rem;
}

.crm-searchbar input[type="search"],
.crm-filter-field select {
    min-height: 46px;
    font-size: 0.86rem;
    border-color: var(--crm-line);
}

.crm-search-icon {
    bottom: 0.73rem;
}

.crm-search-submit,
.crm-search-reset {
    min-height: 46px;
    padding: 0 1rem;
    font-size: 0.86rem;
}

.crm-section-head {
    padding: 0.82rem 1rem;
    border-radius: 20px;
}

.crm-section-head h2,
.portal-card h2 {
    font-size: 1.35rem;
}

.crm-profile-form {
    gap: 1.05rem;
    padding-top: 1.15rem;
}

.crm-profile-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(18, 174, 183, 0.12);
}

.crm-profile-head h2 {
    margin: 0;
}

.crm-profile-head .eyebrow {
    margin-bottom: 0.22rem;
}

.crm-profile-head > p {
    max-width: 34ch;
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
    text-align: right;
}

.crm-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0.2rem;
}

.crm-form-actions .button {
    width: auto;
}

.crm-form-actions-end {
    justify-content: flex-end;
}

.crm-app .contact-form > .button-primary[type="submit"] {
    width: min(100%, 360px);
    align-self: flex-end;
}

.crm-table-wrap {
    border-radius: 20px;
}

.crm-table {
    font-size: 0.82rem;
}

.crm-table tbody tr:nth-child(odd) {
    background: rgba(246, 252, 252, 0.48);
}

.crm-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.86);
}

.crm-table th,
.crm-table td {
    padding: 0.64rem 0.72rem;
}

.crm-table th:last-child,
.crm-table td:last-child {
    text-align: right;
}

.crm-table thead {
    border-bottom: 1px solid rgba(25, 42, 46, 0.16);
    background:
        linear-gradient(180deg, rgba(229, 240, 241, 0.92), rgba(244, 249, 249, 0.9));
}

.crm-table th {
    color: #53636a;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.13em;
    background: transparent;
}

.crm-table thead th:first-child {
    border-top-left-radius: 20px;
}

.crm-table thead th:last-child {
    border-top-right-radius: 20px;
}

.crm-row-link,
.crm-row-button,
.crm-pagination a {
    min-height: 32px;
    padding: 0.32rem 0.58rem;
    font-size: 0.78rem;
}

.crm-section-actions,
.crm-table-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.crm-table-actions {
    justify-content: flex-end;
    margin-left: auto;
}

.crm-section-actions > span {
    padding: 0.4rem 0.72rem;
    border-radius: 999px;
    color: var(--crm-accent-dark);
    font-size: 0.82rem;
    font-weight: 900;
    background: rgba(18, 174, 183, 0.1);
}

.crm-soft-tabs {
    gap: 0.35rem;
}

.crm-soft-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 34px;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(18, 174, 183, 0.14);
    border-radius: 999px;
    color: #53636a;
    font-size: 0.78rem;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.crm-soft-tabs a span {
    color: inherit;
    opacity: 0.78;
}

.crm-soft-tabs a.is-active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 48%),
        linear-gradient(135deg, var(--crm-accent), #16c5cd);
    box-shadow: 0 14px 30px -24px rgba(18, 174, 183, 0.92);
}

.crm-action-muted {
    padding: 0.9rem 1rem;
    border: 1px solid rgba(117, 117, 116, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.crm-action-muted strong,
.crm-action-muted span {
    display: block;
}

.crm-action-muted span {
    margin-top: 0.2rem;
    color: var(--muted);
}

.crm-offer-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 0 0 0.9rem;
}

.crm-stat-card {
    padding: 0.86rem 0.92rem;
    border: 1px solid rgba(18, 174, 183, 0.2);
    border-radius: 20px;
    background:
        radial-gradient(circle at 14% 0%, rgba(18, 174, 183, 0.1), transparent 42%),
        rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 45px -38px rgba(25, 42, 46, 0.45);
}

.crm-stat-card > span {
    display: block;
    margin-bottom: 0.28rem;
    color: var(--crm-accent-dark);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.crm-stat-card > strong {
    display: block;
    color: var(--color-ink);
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.05;
}

.crm-stat-card > small {
    display: block;
    margin-top: 0.25rem;
    color: var(--color-muted);
    font-weight: 760;
}

.crm-status-distribution {
    display: grid;
    gap: 0.34rem;
}

.crm-status-distribution div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(18, 174, 183, 0.12);
}

.crm-status-distribution div:last-child {
    border-bottom: 0;
}

.crm-status-distribution strong {
    font-size: 0.78rem;
}

.crm-status-distribution small {
    color: var(--color-muted);
    font-size: 0.74rem;
    font-weight: 820;
    white-space: nowrap;
}

.crm-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    color: inherit;
    text-decoration: none;
}

.crm-sort-link span {
    display: inline-grid;
    min-width: 1.25rem;
    height: 1.25rem;
    place-items: center;
    border-radius: 999px;
    color: var(--crm-accent-dark);
    background: rgba(18, 174, 183, 0.1);
    font-size: 0.72rem;
}

.crm-sort-link.is-active span {
    color: #fff;
    background: linear-gradient(135deg, var(--crm-accent), #16c5cd);
}

.crm-icon-action {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    gap: 0.36rem;
    padding: 0.32rem 0.58rem;
    border: 1px solid rgba(18, 174, 183, 0.25);
    border-radius: 999px;
    color: var(--crm-accent-dark);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 850;
    background: rgba(236, 250, 251, 0.72);
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.crm-icon-action:hover {
    border-color: rgba(18, 174, 183, 0.48);
    background: rgba(226, 248, 249, 0.95);
    transform: translateY(-1px);
}

.crm-icon-action svg,
.crm-icon-action i {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-icon-action i {
    display: grid;
    place-items: center;
    font-size: 0.96rem;
}

.crm-table-action-form {
    margin: 0;
}

.crm-icon-danger {
    border-color: rgba(218, 112, 42, 0.28);
    color: #9b4f14;
    background: rgba(255, 246, 232, 0.84);
}

.crm-icon-danger:hover {
    border-color: rgba(218, 112, 42, 0.48);
    color: #8c3f0e;
    background: rgba(255, 239, 213, 0.96);
}

.crm-inline-form {
    display: none;
}

.crm-offer-preview-panel {
    width: min(900px, calc(100vw - 2rem));
}

.crm-offer-preview-sheet {
    margin: 1.1rem;
    padding: 1.05rem;
    border: 1px solid rgba(18, 174, 183, 0.18);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 253, 253, 0.88)),
        radial-gradient(circle at 0% 0%, rgba(18, 174, 183, 0.08), transparent 38%);
}

.crm-offer-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.crm-offer-preview-meta span {
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(18, 174, 183, 0.18);
    border-radius: 999px;
    color: var(--color-muted);
    background: rgba(255, 255, 255, 0.68);
    font-size: 0.72rem;
    font-weight: 800;
}

.crm-offer-preview-sheet h3 {
    margin: 0 0 0.45rem;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.crm-offer-preview-sheet p {
    margin: 0 0 0.9rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.crm-offer-preview-lines {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(18, 174, 183, 0.12);
    border-radius: 16px;
}

.crm-offer-preview-lines div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.62rem 0.72rem;
    border-bottom: 1px solid rgba(18, 174, 183, 0.1);
    background: rgba(255, 255, 255, 0.58);
}

.crm-offer-preview-lines div:nth-child(even) {
    background: rgba(246, 252, 252, 0.82);
}

.crm-offer-preview-lines div:last-child {
    border-bottom: 0;
}

.crm-offer-preview-lines strong {
    white-space: nowrap;
}

.crm-offer-preview-total {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 2px solid rgba(18, 174, 183, 0.18);
    font-size: 1.05rem;
    font-weight: 900;
}

.crm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.58rem;
    padding: 0 1.1rem 1.1rem;
}

.crm-app .button-small {
    width: auto;
    min-height: 34px;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
}

.crm-fab-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 40px;
    padding: 0 0.85rem;
    border: 1px solid rgba(10, 155, 164, 0.42);
    border-radius: 999px;
    color: #fff;
    font: inherit;
    font-weight: 850;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, var(--crm-accent), #16c5cd);
    cursor: pointer;
    box-shadow: 0 16px 34px -24px rgba(18, 174, 183, 0.86);
}

.crm-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.crm-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.crm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 32, 35, 0.18);
    backdrop-filter: blur(11px);
}

.crm-modal-panel {
    position: relative;
    z-index: 1;
    width: min(860px, calc(100vw - 2rem));
    max-height: min(86vh, 900px);
    overflow: auto;
    padding: 0;
    border: 1px solid var(--crm-line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 30px 90px -42px rgba(25, 42, 46, 0.55);
    transform: translateY(10px) scale(0.98);
    transition: transform 180ms ease;
}

.crm-modal.is-open .crm-modal-panel {
    transform: translateY(0) scale(1);
}

.crm-modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: 1.15rem 1.15rem 0.95rem;
    border-bottom: 1px solid rgba(18, 174, 183, 0.12);
    background:
        radial-gradient(circle at 0% 0%, rgba(18, 174, 183, 0.08), transparent 36%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 252, 252, 0.9));
}

.crm-modal-header-magic {
    background:
        radial-gradient(circle at 8% 12%, rgba(18, 174, 183, 0.2), transparent 34%),
        radial-gradient(circle at 92% 0%, rgba(247, 148, 50, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 252, 252, 0.9));
}

.crm-modal-header .eyebrow {
    margin: 0 0 0.32rem;
    font-size: 0.7rem;
}

.crm-modal-header h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.08;
}

.crm-modal-header p:not(.eyebrow) {
    max-width: 66ch;
    margin: 0.42rem 0 0;
    color: var(--color-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.crm-modal-close {
    display: inline-grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border: 1px solid rgba(18, 174, 183, 0.32);
    border-radius: 999px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 900;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 44%),
        linear-gradient(135deg, var(--color-secondary-dark), #4c5557);
    box-shadow: 0 14px 32px -22px rgba(25, 42, 46, 0.5);
    cursor: pointer;
}

.crm-modal .contact-form {
    padding: 1.1rem 1.15rem 1.2rem;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.crm-modal .contact-form > .form-grid:first-child,
.crm-modal .contact-form > label:first-child {
    margin-top: 0;
}

.crm-search-overlay-panel {
    width: min(920px, 100%);
    overflow: hidden;
}

.crm-search-overlay-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 1.15rem;
}

.crm-search-overlay-form .crm-search-field {
    margin: 0;
}

.crm-search-overlay-form .crm-search-icon {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

.crm-search-overlay-form input[type="search"] {
    width: 100%;
    min-height: 52px;
    padding: 0 1rem 0 3rem;
    border: 1px solid var(--crm-line);
    border-radius: 999px;
    color: var(--color-secondary-dark);
    font: inherit;
    font-weight: 750;
    background: rgba(255, 255, 255, 0.96);
    outline: none;
}

.crm-search-overlay-form .button {
    min-height: 52px;
    padding-inline: 1.35rem;
}

.crm-search-overlay-form input[type="search"]:focus {
    border-color: var(--crm-accent);
    box-shadow: 0 0 0 4px rgba(18, 174, 183, 0.12);
}

.crm-search-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 1rem 1.15rem 1.15rem;
}

.crm-search-results div {
    padding: 0.9rem;
    border: 1px solid var(--crm-line);
    border-radius: 18px;
    background: rgba(246, 252, 252, 0.74);
}

.crm-search-results h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.crm-search-results a,
.crm-search-results small {
    display: block;
    padding: 0.45rem 0;
    color: var(--color-secondary-dark);
    font-weight: 700;
}

.crm-search-results small {
    color: var(--color-muted);
    font-weight: 600;
}

.crm-legal-note {
    position: relative;
    overflow: hidden;
    border-color: rgba(18, 174, 183, 0.34) !important;
    background:
        radial-gradient(circle at top left, rgba(18, 174, 183, 0.18), transparent 36%),
        linear-gradient(135deg, rgba(222, 248, 249, 0.92), rgba(255, 255, 255, 0.92)) !important;
}

.crm-legal-note::before {
    content: "!";
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    display: grid;
    width: 1.85rem;
    height: 1.85rem;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--crm-accent), #16c5cd);
    box-shadow: 0 14px 28px -18px rgba(18, 174, 183, 0.9);
}

.crm-ai-card {
    position: relative;
    border-color: rgba(18, 174, 183, 0.24);
    background:
        radial-gradient(circle at top left, rgba(18, 174, 183, 0.1), transparent 34%),
        rgba(255, 255, 255, 0.94);
}

.crm-ai-card.is-ai-loading {
    pointer-events: none;
    border-color: rgba(247, 148, 50, 0.42);
}

.crm-ai-card.is-ai-loading:not(.crm-ai-offer-card)::after {
    content: "KI bereitet den Entwurf vor ...";
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    padding: 0.38rem 0.72rem;
    border: 1px solid rgba(247, 148, 50, 0.22);
    border-radius: 999px;
    color: #8a4c12;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 249, 239, 0.94);
    box-shadow: 0 16px 34px -28px rgba(247, 148, 50, 0.82);
}

.crm-ai-offer-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 1rem;
    align-items: stretch;
    padding: 1rem;
    overflow: hidden;
    border-color: rgba(18, 174, 183, 0.34);
    background:
        radial-gradient(circle at 12% 18%, rgba(18, 174, 183, 0.22), transparent 28%),
        radial-gradient(circle at 88% 0%, rgba(247, 148, 50, 0.16), transparent 24%),
        rgba(255, 255, 255, 0.96);
    box-shadow:
        0 30px 70px -48px rgba(16, 56, 61, 0.78),
        0 0 0 1px rgba(18, 174, 183, 0.08);
}

.crm-ai-offer-card::before {
    content: "";
    position: absolute;
    inset: 1rem auto auto 1rem;
    width: 70px;
    height: 70px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(18, 174, 183, 0.28), transparent 68%);
    filter: blur(2px);
    pointer-events: none;
}

.crm-ai-offer-info,
.crm-ai-offer-input {
    min-width: 0;
}

.crm-ai-offer-info {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.5rem;
    padding: 1.05rem;
    border: 1px solid rgba(18, 174, 183, 0.28);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(225, 249, 250, 0.95), rgba(255, 255, 255, 0.82));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 22px 48px -42px rgba(18, 174, 183, 0.9);
}

.crm-ai-offer-info::after {
    content: "KI";
    position: absolute;
    top: 0.95rem;
    right: 0.95rem;
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, var(--crm-accent), #16c5cd);
    box-shadow: 0 14px 26px -16px rgba(18, 174, 183, 0.95);
}

.crm-ai-offer-info .eyebrow,
.crm-ai-offer-info h2,
.crm-ai-offer-info p {
    margin: 0;
}

.crm-ai-offer-info h2 {
    font-size: 1.28rem;
    line-height: 1.16;
    max-width: calc(100% - 2.8rem);
}

.crm-ai-offer-info p {
    color: var(--color-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.crm-ai-steps {
    display: grid;
    gap: 0.38rem;
    margin-top: 0.25rem;
}

.crm-ai-steps span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--color-secondary-dark);
    font-size: 0.76rem;
    font-weight: 850;
}

.crm-ai-steps span::before {
    content: "";
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--crm-accent), #16c5cd);
    box-shadow: 0 0 0 4px rgba(18, 174, 183, 0.1);
}

.crm-ai-offer-input {
    display: grid;
    gap: 0.62rem;
}

.crm-ai-offer-input textarea {
    min-height: 136px;
}

.crm-field-hint,
.crm-ai-dictation-hint {
    display: block;
    margin-top: 0.35rem;
    color: var(--color-muted);
    font-size: 0.7rem;
    font-weight: 750;
    line-height: 1.35;
}

.crm-ai-dictation-hint {
    color: rgba(124, 80, 22, 0.86);
}

.crm-ai-voice-wrap {
    position: relative;
    display: block;
}

.crm-voice-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
}

.crm-mic-select {
    width: min(100%, 280px);
    min-height: 40px;
    padding: 0.58rem 2.4rem 0.58rem 0.78rem;
    border: 1px solid rgba(117, 117, 116, 0.2);
    border-radius: 12px;
    color: var(--color-text);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    background:
        rgba(255, 255, 255, 0.95)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a76818' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E")
        no-repeat calc(100% - 0.8rem) 50% / 0.95rem 0.95rem;
    appearance: none;
    -webkit-appearance: none;
}

.crm-mic-select[hidden] {
    display: none;
}

.crm-mic-status {
    display: block;
    min-height: 1rem;
    margin-top: 0.35rem;
    color: var(--color-muted);
    font-size: 0.68rem;
    font-weight: 760;
    line-height: 1.35;
}

.crm-mic-status[data-type="ok"] {
    color: #258252;
}

.crm-mic-status[data-type="recording"] {
    color: #b36210;
}

.crm-mic-status[data-type="error"] {
    color: #a83c2f;
}

.crm-voice-button {
    position: static;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(223, 122, 31, 0.38);
    border-radius: 999px;
    color: #fff;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 46%),
        linear-gradient(135deg, #f7aa4d, #e8791f);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.36),
        0 14px 28px -20px rgba(223, 122, 31, 0.9);
    cursor: pointer;
}

.crm-voice-button i,
.crm-voice-button svg {
    width: 0.95rem;
    height: 0.95rem;
}

.crm-voice-button span {
    display: none;
}

.crm-voice-button:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.crm-voice-button.is-recording {
    animation: crmRecordingPulse 1.1s ease-in-out infinite;
}

@keyframes crmRecordingPulse {
    0%,
    100% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.36),
            0 0 0 0 rgba(247, 148, 50, 0.36),
            0 14px 28px -20px rgba(223, 122, 31, 0.9);
    }

    50% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.36),
            0 0 0 8px rgba(247, 148, 50, 0),
            0 18px 32px -20px rgba(223, 122, 31, 0.98);
    }
}

.crm-ai-note {
    margin: 0;
    padding: 0.62rem 0.72rem;
    border: 1px solid rgba(130, 91, 35, 0.14);
    border-radius: 15px;
    color: #685025;
    font-size: 0.76rem;
    font-weight: 750;
    background: rgba(252, 246, 234, 0.82);
}

.crm-ai-offer-input .button {
    justify-self: end;
    width: auto;
}

.crm-offer-item-template {
    display: none !important;
}

.crm-time-clock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
    padding: 0.82rem;
    border: 1px solid rgba(18, 174, 183, 0.22);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 0%, rgba(18, 174, 183, 0.16), transparent 38%),
        rgba(247, 252, 252, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.crm-time-clock strong {
    display: block;
    margin-bottom: 0.18rem;
    color: var(--color-secondary-dark);
    font-size: 0.92rem;
}

.crm-time-clock span {
    display: block;
    max-width: 68ch;
    color: var(--color-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.crm-time-clock-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.crm-time-clock-actions .button {
    min-width: 108px;
}

.crm-time-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 0.85rem;
    margin-bottom: 0.85rem;
    align-items: stretch;
}

.crm-time-dashboard > * {
    min-width: 0;
    height: 100%;
}

.crm-time-kpi,
.crm-legal-note {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.crm-legal-note p {
    max-width: 58ch;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.crm-legal-note .eyebrow {
    margin-bottom: 0.7rem;
}

.crm-time-kpi h3 {
    margin: 0.15rem 0;
    font-size: 1.65rem;
}

.crm-time-kpi p {
    margin: 0;
    color: var(--color-muted);
}

.crm-print-sheet-head,
.crm-print-sheet,
.crm-time-employee-card {
    margin-bottom: 1rem;
}

.crm-print-sheet-head {
    align-items: center;
}

.crm-print-sheet-head .crm-form-head {
    width: 100%;
    align-items: center;
}

.crm-print-sheet-head strong {
    color: var(--color-secondary-dark);
    font-size: 0.88rem;
    font-weight: 900;
    white-space: nowrap;
}

.crm-time-employee-card .crm-table-wrap {
    box-shadow: none;
}

.crm-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

.crm-detail-grid div {
    padding: 0.85rem;
    border: 1px solid var(--crm-line);
    border-radius: 16px;
    background: rgba(246, 252, 252, 0.72);
}

.crm-detail-grid span {
    display: block;
    margin-bottom: 0.24rem;
    color: var(--crm-accent-dark);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.crm-customer-hero {
    border-color: rgba(18, 174, 183, 0.28);
    background:
        radial-gradient(circle at 0% 0%, rgba(18, 174, 183, 0.18), transparent 35%),
        linear-gradient(135deg, rgba(229, 248, 249, 0.92), rgba(255, 255, 255, 0.95));
}

.crm-request-actions {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(18, 174, 183, 0.18);
    border-radius: 26px;
    background:
        radial-gradient(circle at 0% 0%, rgba(18, 174, 183, 0.1), transparent 34%),
        rgba(255, 255, 255, 0.88);
    box-shadow: var(--crm-shadow);
}

.crm-request-actions-magic {
    border-color: rgba(247, 148, 50, 0.24);
    background:
        radial-gradient(circle at 8% 0%, rgba(18, 174, 183, 0.16), transparent 34%),
        radial-gradient(circle at 96% 10%, rgba(247, 148, 50, 0.18), transparent 30%),
        rgba(255, 255, 255, 0.92);
}

.crm-request-actions-head {
    display: grid;
    gap: 0.24rem;
}

.crm-request-actions-head .eyebrow,
.crm-request-actions-head h3,
.crm-request-actions-head p {
    margin: 0;
}

.crm-request-actions-head h3 {
    font-size: 1.12rem;
    line-height: 1.18;
}

.crm-request-actions-head p {
    max-width: 72ch;
    color: var(--color-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.crm-request-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 0.75rem;
    align-items: stretch;
}

.crm-request-action-card {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.82rem;
    border: 1px solid rgba(18, 174, 183, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
}

.crm-request-action-primary {
    border-color: rgba(18, 174, 183, 0.28);
    background:
        linear-gradient(135deg, rgba(223, 249, 250, 0.82), rgba(255, 255, 255, 0.92));
}

.crm-request-action-magic {
    position: relative;
    overflow: hidden;
    border-color: rgba(247, 148, 50, 0.32);
    background:
        radial-gradient(circle at 12% 18%, rgba(18, 174, 183, 0.22), transparent 32%),
        radial-gradient(circle at 92% 8%, rgba(247, 148, 50, 0.2), transparent 28%),
        rgba(255, 255, 255, 0.94);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        0 24px 50px -42px rgba(223, 122, 31, 0.92);
}

.crm-request-action-magic::after {
    content: "KS";
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #f7aa4d, #e8791f);
    box-shadow: 0 14px 26px -18px rgba(223, 122, 31, 0.9);
}

.crm-request-action-magic strong,
.crm-request-action-magic small {
    max-width: calc(100% - 2.6rem);
}

.crm-request-action-card span {
    color: var(--crm-accent-dark);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.crm-request-action-card strong {
    color: var(--color-secondary-dark);
    font-size: 1rem;
    line-height: 1.2;
}

.crm-request-action-card small {
    color: var(--color-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.crm-request-action-card label {
    display: grid;
    align-self: end;
    gap: 0.32rem;
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.crm-request-action-card input {
    min-height: 42px;
}

.crm-request-action-card .button {
    width: 100%;
    min-height: 42px;
    padding: 0.56rem 0.9rem;
    font-size: 0.84rem;
}

.crm-decline-form > span {
    color: #b46413;
}

.crm-decline-form .button {
    border-color: rgba(213, 118, 25, 0.42);
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, #f0a13a, #df7a1f);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 16px 34px -24px rgba(223, 122, 31, 0.86);
}

.crm-app .crm-table a:not(.crm-row-link):not(.crm-row-button) {
    color: var(--crm-accent-dark);
    font-weight: 700;
}

@media print {
    body {
        background: #fff !important;
    }

    .site-header,
    .site-footer,
    .crm-app-bar,
    .crm-tabs,
    .crm-searchbar,
    .crm-month-filter,
    .crm-legal-note,
    .crm-no-print,
    .crm-app .button,
    .crm-row-button,
    .crm-row-link,
    .crm-pagination,
    .crm-time-employee-card {
        display: none !important;
    }

    .crm-app,
    .crm-app .container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }

    .crm-print-sheet {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    .crm-print-sheet .crm-table {
        width: 100%;
        border-collapse: collapse;
    }
}

.status-pill {
    font-size: 0.66rem;
}

.status-entwurf {
    color: #5f6264;
    background: rgba(117, 117, 116, 0.16);
}

.status-offen {
    color: #0c767d;
    background: rgba(23, 179, 187, 0.14);
}

.status-versendet {
    color: #0f5f68;
    background: rgba(23, 179, 187, 0.18);
}

.status-teilbezahlt {
    color: #7b5719;
    background: rgba(240, 185, 75, 0.2);
}

.status-bezahlt {
    color: #0f6a5d;
    background: rgba(34, 168, 132, 0.16);
}

.status-storniert {
    color: #8b3f34;
    background: rgba(194, 87, 72, 0.14);
}

.project-file {
    padding: 1.25rem;
}

.project-file-head h2 {
    font-size: 1.5rem;
}

.project-meta-grid {
    gap: 0.75rem;
}

.project-meta-grid div,
.project-message,
.project-timeline {
    padding: 0.85rem;
    border-radius: 16px;
}

.contact-form {
    gap: 0.9rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.crm-edit-table input,
.crm-edit-table select {
    min-height: 42px;
    padding: 0.68rem 0.78rem;
    font-size: 0.86rem;
    border-radius: 12px;
}

.crm-offer-item-row {
    border-color: rgba(18, 174, 183, 0.1);
    background: rgba(246, 252, 252, 0.52);
}

.crm-offer-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 0.35rem;
}

.crm-offer-summary div {
    padding: 0.92rem 1rem;
    border: 1px solid rgba(18, 174, 183, 0.16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 250, 250, 0.72));
    box-shadow: 0 15px 34px rgba(20, 65, 70, 0.06);
}

.crm-offer-summary span {
    display: block;
    margin-bottom: 0.22rem;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.crm-offer-summary strong {
    color: var(--ink);
    font-size: clamp(1rem, 1.8vw, 1.34rem);
    font-weight: 900;
}

.crm-offer-summary .is-total {
    border-color: rgba(18, 174, 183, 0.34);
    background: linear-gradient(135deg, rgba(226, 250, 250, 0.96), rgba(255, 255, 255, 0.86));
}

.crm-offer-summary .is-total strong {
    color: var(--accent-strong);
}

.crm-add-position,
.crm-remove-position {
    border-radius: 999px;
    font-weight: 850;
}

.crm-remove-position {
    border-color: rgba(130, 91, 35, 0.2);
    background: linear-gradient(135deg, rgba(251, 243, 226, 0.96), rgba(255, 255, 255, 0.92));
}

.crm-compact-form .form-grid {
    gap: 0.75rem;
}

.crm-login-brand h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
}

@media (max-width: 860px) {
    .crm-app,
    .crm-login-screen {
        font-size: 0.84rem;
    }

    .crm-app .container,
    .crm-login-screen .container {
        width: min(calc(100% - 1rem), 1280px);
    }

    .crm-filterbar {
        grid-template-columns: 1fr;
    }

    .crm-invoice-filterbar {
        grid-template-columns: 1fr;
    }

    .crm-app .button,
    .crm-login-screen .button {
        width: 100%;
    }

    .crm-app .button-print {
        width: auto;
        margin-left: auto;
    }

    .crm-profile-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .crm-profile-head > p {
        max-width: none;
        text-align: left;
    }

    .crm-form-actions .button {
        width: 100%;
    }

    .crm-offer-summary {
        grid-template-columns: 1fr;
    }

    .crm-login-screen {
        padding: 1rem 0 2.4rem;
    }

    .crm-login-screen .crm-login-panel {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        border-radius: 26px;
    }

    .crm-login-screen .crm-login-brand {
        padding: 0.35rem;
    }

    .crm-login-screen .crm-login-brand h1 {
        max-width: 12ch;
        margin-bottom: 0.75rem;
        font-size: clamp(2.55rem, 13vw, 4rem);
        line-height: 0.98;
    }

    .crm-login-screen .crm-login-brand p:last-child {
        max-width: none;
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .crm-login-screen .portal-login-card {
        max-width: none;
        padding: 1.25rem;
        border-radius: 24px;
    }

    .crm-time-dashboard,
    .crm-detail-grid,
    .crm-request-actions-grid,
    .crm-ai-offer-card {
        grid-template-columns: 1fr;
    }

    .crm-ai-offer-input .button {
        width: 100%;
    }

    .crm-voice-toolbar {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .crm-mic-select {
        flex: 1 1 12rem;
    }

    .crm-time-clock {
        align-items: stretch;
        flex-direction: column;
    }

    .crm-time-clock-actions {
        justify-content: stretch;
    }

    .crm-time-clock-actions .button {
        flex: 1 1 130px;
    }

    .crm-section-actions {
        align-items: stretch;
        width: 100%;
    }

    .crm-offer-stats {
        grid-template-columns: 1fr 1fr;
    }

    .crm-stat-card-wide {
        grid-column: 1 / -1;
    }

    .crm-table-actions {
        gap: 0.35rem;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    .crm-icon-action span {
        display: none;
    }

    .crm-icon-action {
        width: 34px;
        justify-content: center;
        padding-inline: 0;
    }

    .crm-modal-actions {
        flex-direction: column;
    }

    .crm-search-overlay-form,
    .crm-search-results {
        grid-template-columns: 1fr;
    }

    .crm-app-bar {
        gap: 0.75rem;
        padding-top: 0.72rem;
    }

    .crm-app-actions {
        margin-left: auto;
    }

    .crm-tabs {
        display: flex;
        justify-content: flex-start;
        top: max(0.5rem, env(safe-area-inset-top));
        width: calc(100vw - 1rem);
        max-width: none;
        margin-top: 0.65rem;
        margin-bottom: 0.95rem;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        padding: 0.38rem;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 24px;
        overflow-x: auto;
        overflow-y: hidden;
        background:
            radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.22), transparent 30%),
            linear-gradient(135deg, rgba(47, 66, 70, 0.66), rgba(10, 24, 28, 0.76));
        backdrop-filter: blur(30px) saturate(1.48);
        -webkit-backdrop-filter: blur(30px) saturate(1.48);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.18),
            0 20px 54px -34px rgba(8, 24, 28, 0.9);
        scrollbar-width: none;
    }

    .crm-tabs::-webkit-scrollbar {
        display: none;
    }

    .crm-tabs a,
    .crm-nav-search {
        flex: 0 0 4.62rem;
        min-width: 4.62rem;
        min-height: 3.82rem;
        gap: 0.28rem;
        padding: 0.36rem 0.32rem;
        border-radius: 18px;
        font-size: 0.67rem;
    }

    .crm-tabs a span,
    .crm-nav-search .crm-nav-icon {
        width: 1.96rem;
        height: 1.96rem;
        border-radius: 0.82rem;
    }

    .crm-tabs a span svg,
    .crm-tabs a span i,
    .crm-nav-search .crm-nav-icon svg,
    .crm-nav-search .crm-nav-icon i {
        width: 0.98rem;
        height: 0.98rem;
        font-size: 0.98rem;
    }

    .crm-tabs a span .svg-inline--fa,
    .crm-nav-search .crm-nav-icon .svg-inline--fa {
        width: 0.98rem;
        height: 0.98rem;
    }

    .crm-tabs a.is-active {
        transform: none;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.28),
            0 14px 28px -20px rgba(18, 174, 183, 0.85);
    }

    .crm-nav-search {
        margin-left: 0;
    }

}

.crm-app-bar {
    display: flex;
    gap: 0.75rem;
    justify-content: stretch;
    align-items: center;
}

.crm-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 0.55rem;
    min-height: 2.75rem;
    padding: 0 0.9rem;
    border: 1px solid rgba(18, 174, 183, 0.2);
    border-radius: 999px;
    color: var(--crm-accent-dark);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--crm-shadow);
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.crm-menu-toggle:hover,
.crm-menu-toggle[aria-expanded="true"] {
    color: #fff;
    border-color: rgba(18, 174, 183, 0.46);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, var(--crm-accent), #16c5cd);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 18px 36px -26px rgba(18, 174, 183, 0.9);
}

.crm-menu-toggle i,
.crm-menu-toggle .svg-inline--fa {
    width: 1.05rem;
    height: 1.05rem;
}

.crm-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 210;
    background:
        radial-gradient(circle at 50% 48%, rgba(18, 35, 39, 0.7), rgba(8, 16, 18, 0.88) 62%, rgba(4, 8, 9, 0.92)),
        rgba(5, 7, 8, 0.76);
    backdrop-filter: blur(12px) saturate(1.05);
    -webkit-backdrop-filter: blur(12px) saturate(1.05);
}

html.crm-nav-is-open {
    overflow: hidden;
}

.crm-nav-orbit.crm-tabs {
    --crm-nav-radius: 154px;
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 211;
    display: block;
    width: min(86vw, 430px);
    height: min(86vw, 430px);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.96);
    transition: opacity 180ms ease, transform 220ms ease;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    scrollbar-width: auto;
    isolation: auto;
}

.crm-nav-orbit.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.crm-nav-orbit .crm-nav-node,
.crm-nav-orbit .crm-nav-close {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 76px;
    min-width: 0;
    height: 76px;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 50%;
    color: #122529;
    font: inherit;
    font-weight: 900;
    line-height: 1;
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 28px 54px -34px rgba(0, 0, 0, 0.82);
    opacity: 0;
    cursor: pointer;
    transform: translate(-50%, -50%) scale(0.36);
    transition:
        opacity 200ms ease var(--delay, 0ms),
        transform 330ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--delay, 0ms),
        color 180ms ease,
        background 180ms ease;
}

.crm-nav-orbit.is-open .crm-nav-node {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--crm-nav-radius)) rotate(var(--angle-back));
}

.crm-nav-orbit.is-open .crm-nav-close {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.crm-nav-orbit .crm-nav-close {
    width: 54px;
    height: 54px;
    border: 0;
    color: #252b2d;
    background: rgba(255, 255, 255, 0.58);
}

.crm-nav-orbit .crm-nav-icon,
.crm-nav-orbit.crm-tabs a span,
.crm-nav-orbit .crm-nav-search .crm-nav-icon {
    display: grid;
    width: auto;
    height: auto;
    place-items: center;
    border-radius: 0;
    color: currentColor;
    background: transparent;
    box-shadow: none;
}

.crm-nav-orbit .crm-nav-icon i,
.crm-nav-orbit .crm-nav-icon svg,
.crm-nav-orbit .crm-nav-icon .svg-inline--fa,
.crm-nav-orbit .crm-nav-close i,
.crm-nav-orbit .crm-nav-close .svg-inline--fa {
    width: 1.42rem;
    height: 1.42rem;
    font-size: 1.42rem;
}

.crm-nav-orbit .crm-nav-label {
    position: absolute;
    top: 50%;
    left: calc(100% + 0.55rem);
    max-width: 12rem;
    width: auto;
    height: auto;
    padding: 0.42rem 0.72rem;
    border-radius: 999px 999px 999px 0.25rem;
    color: #111719;
    font-size: 0.76rem;
    font-weight: 950;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 16px 34px -26px rgba(0, 0, 0, 0.78);
    opacity: 0;
    transform: translate(0, -50%) scale(0.96);
    transition: opacity 180ms ease, transform 180ms ease;
}

.crm-nav-orbit .crm-nav-node:hover .crm-nav-label,
.crm-nav-orbit .crm-nav-node:focus-visible .crm-nav-label,
.crm-nav-orbit .crm-nav-node.is-active .crm-nav-label {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
}

.crm-nav-orbit .crm-nav-node:hover,
.crm-nav-orbit .crm-nav-node:focus-visible,
.crm-nav-orbit .crm-nav-node.is-active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, var(--crm-accent), #16c5cd);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 22px 44px -26px rgba(18, 174, 183, 0.95);
}

.crm-nav-orbit .crm-nav-node:focus-visible,
.crm-nav-orbit .crm-nav-close:focus-visible,
.crm-menu-toggle:focus-visible {
    outline: 3px solid rgba(18, 174, 183, 0.32);
    outline-offset: 4px;
}

@media (max-width: 680px) {
    .crm-app-bar {
        gap: 0.55rem;
    }

    .crm-menu-toggle {
        width: 2.75rem;
        padding: 0;
        justify-content: center;
    }

    .crm-menu-toggle span {
        display: none;
    }

    .crm-app-actions {
        gap: 0.42rem;
    }

    .crm-nav-orbit.crm-tabs {
        --crm-nav-radius: 132px;
        width: min(92vw, 350px);
        height: min(92vw, 350px);
    }

    .crm-nav-orbit .crm-nav-node {
        width: 64px;
        height: 64px;
    }

    .crm-nav-orbit .crm-nav-icon i,
    .crm-nav-orbit .crm-nav-icon svg,
    .crm-nav-orbit .crm-nav-icon .svg-inline--fa {
        width: 1.18rem;
        height: 1.18rem;
        font-size: 1.18rem;
    }

    .crm-nav-orbit .crm-nav-label {
        top: calc(100% + 0.42rem);
        left: 50%;
        max-width: 7.5rem;
        border-radius: 999px;
        font-size: 0.68rem;
        transform: translate(-50%, 0) scale(0.96);
    }

.crm-nav-orbit .crm-nav-node:hover .crm-nav-label,
.crm-nav-orbit .crm-nav-node:focus-visible .crm-nav-label,
.crm-nav-orbit .crm-nav-node.is-active .crm-nav-label {
        transform: translate(-50%, 0) scale(1);
    }
}

.crm-app {
    padding-top: clamp(1.35rem, 2.4vw, 2.15rem);
}

.crm-app-bar {
    padding-top: 0;
    padding-bottom: clamp(1.15rem, 2vw, 1.75rem);
}

.crm-workspace {
    margin-top: 0.35rem;
}

.crm-nav-orbit .crm-nav-node {
    z-index: 1;
}

.crm-nav-orbit .crm-nav-node:hover,
.crm-nav-orbit .crm-nav-node:focus-visible,
.crm-nav-orbit .crm-nav-node.is-active {
    z-index: 3;
}

.crm-nav-orbit .crm-nav-label {
    top: calc(100% + 0.58rem);
    left: 50%;
    display: inline-flex;
    width: max-content;
    max-width: 11rem;
    min-height: 2rem;
    align-items: center;
    justify-content: center;
    padding: 0.44rem 0.78rem;
    border: 1px solid rgba(18, 174, 183, 0.22);
    border-radius: 999px;
    color: #0d4247;
    text-align: center;
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 18px 36px -24px rgba(0, 0, 0, 0.74);
    transform: translate(-50%, 0) scale(0.96);
}

.crm-nav-orbit .crm-nav-node:hover .crm-nav-label,
.crm-nav-orbit .crm-nav-node:focus-visible .crm-nav-label,
.crm-nav-orbit .crm-nav-node.is-active .crm-nav-label {
    transform: translate(-50%, 0) scale(1);
}

@media (max-width: 680px) {
    .crm-app {
        padding-top: 1rem;
    }

    .crm-app-bar {
        padding-bottom: 1rem;
    }

    .crm-nav-orbit .crm-nav-label {
        max-width: 7.8rem;
        min-height: 1.75rem;
        padding: 0.34rem 0.62rem;
        font-size: 0.66rem;
    }
}

/* CRM radial menu mirrors the public website menu. */
.crm-nav-backdrop {
    background:
        radial-gradient(circle at 50% 48%, rgba(17, 26, 28, 0.72), rgba(10, 12, 13, 0.84) 58%, rgba(5, 6, 7, 0.9)),
        rgba(5, 6, 7, 0.74);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.crm-nav-orbit.crm-tabs {
    --crm-nav-radius: clamp(150px, 20vw, 190px);
    width: min(88vw, 560px);
    height: min(88vw, 560px);
}

.crm-nav-orbit .crm-nav-node,
.crm-nav-orbit .crm-nav-close {
    width: 76px;
    height: 76px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    color: #121719;
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 28px 54px -34px rgba(0, 0, 0, 0.8);
}

.crm-nav-orbit .crm-nav-close {
    width: 54px;
    height: 54px;
    border: 0;
    color: #252b2d;
    background: rgba(255, 255, 255, 0.56);
}

.crm-nav-orbit .crm-nav-icon i,
.crm-nav-orbit .crm-nav-icon svg,
.crm-nav-orbit .crm-nav-icon .svg-inline--fa,
.crm-nav-orbit .crm-nav-close i,
.crm-nav-orbit .crm-nav-close .svg-inline--fa {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 1.45rem;
}

.crm-nav-orbit .crm-nav-label {
    position: absolute;
    top: 50%;
    left: calc(100% + 0.55rem);
    display: inline-flex;
    width: max-content;
    max-width: 12rem;
    min-height: 0;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.72rem;
    border: 0;
    border-radius: 999px 999px 999px 0.25rem;
    color: #111719;
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1.1;
    text-align: left;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 16px 34px -26px rgba(0, 0, 0, 0.78);
    opacity: 0;
    transform: translate(0, -50%) scale(0.96);
}

.crm-nav-orbit .crm-nav-node:hover .crm-nav-label,
.crm-nav-orbit .crm-nav-node:focus-visible .crm-nav-label,
.crm-nav-orbit .crm-nav-node.is-active .crm-nav-label {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
}

.crm-nav-orbit .crm-nav-node:hover,
.crm-nav-orbit .crm-nav-node:focus-visible,
.crm-nav-orbit .crm-nav-node.is-active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, var(--crm-accent), #0b9ca5);
}

.crm-nav-orbit .crm-nav-node.is-active {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 22px 44px -26px rgba(18, 174, 183, 0.95);
}

@media (max-width: 680px) {
    .crm-nav-orbit.crm-tabs {
        --crm-nav-radius: clamp(118px, 33vw, 140px);
        width: min(92vw, 360px);
        height: min(92vw, 360px);
    }

    .crm-nav-orbit .crm-nav-node {
        width: 62px;
        height: 62px;
    }

    .crm-nav-orbit .crm-nav-close {
        width: 48px;
        height: 48px;
    }

    .crm-nav-orbit .crm-nav-label {
        left: calc(100% + 0.42rem);
        max-width: 8rem;
        padding: 0.36rem 0.58rem;
        border-radius: 999px 999px 999px 0.25rem;
        font-size: 0.68rem;
        transform: translate(0, -50%) scale(0.96);
    }

    .crm-nav-orbit .crm-nav-node:hover .crm-nav-label,
    .crm-nav-orbit .crm-nav-node:focus-visible .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-active .crm-nav-label {
        transform: translate(0, -50%) scale(1);
    }
}

.crm-nav-backdrop {
    background:
        radial-gradient(circle at 50% 48%, rgba(12, 22, 24, 0.34), rgba(8, 12, 13, 0.54) 58%, rgba(4, 6, 7, 0.68)),
        rgba(4, 7, 8, 0.42);
    backdrop-filter: blur(7px) saturate(0.96);
    -webkit-backdrop-filter: blur(7px) saturate(0.96);
}

.crm-nav-orbit.crm-tabs {
    --crm-nav-radius: clamp(128px, 15.5vw, 170px);
    width: min(82vw, 500px);
    height: min(82vw, 500px);
}

.crm-nav-orbit .crm-nav-node {
    width: clamp(62px, 6.2vw, 76px);
    height: clamp(62px, 6.2vw, 76px);
}

.crm-nav-orbit .crm-nav-label {
    pointer-events: none;
}

.crm-nav-orbit .crm-nav-node.is-label-left .crm-nav-label {
    right: calc(100% + 0.55rem);
    left: auto;
    border-radius: 999px 999px 0.25rem 999px;
    text-align: right;
    transform: translate(0, -50%) scale(0.96);
}

.crm-nav-orbit .crm-nav-node.is-label-top .crm-nav-label {
    top: auto;
    bottom: calc(100% + 0.55rem);
    left: 50%;
    border-radius: 999px 999px 0.25rem 999px;
    text-align: center;
    transform: translate(-50%, 0) scale(0.96);
}

.crm-nav-orbit .crm-nav-node.is-label-left:hover .crm-nav-label,
.crm-nav-orbit .crm-nav-node.is-label-left:focus-visible .crm-nav-label,
.crm-nav-orbit .crm-nav-node.is-label-left.is-active .crm-nav-label {
    transform: translate(0, -50%) scale(1);
}

.crm-nav-orbit .crm-nav-node.is-label-top:hover .crm-nav-label,
.crm-nav-orbit .crm-nav-node.is-label-top:focus-visible .crm-nav-label,
.crm-nav-orbit .crm-nav-node.is-label-top.is-active .crm-nav-label {
    transform: translate(-50%, 0) scale(1);
}

@media (max-width: 760px) {
    .crm-nav-backdrop {
        background:
            radial-gradient(circle at 50% 38%, rgba(12, 22, 24, 0.28), rgba(7, 12, 13, 0.58) 68%),
            rgba(4, 7, 8, 0.5);
        backdrop-filter: blur(6px) saturate(0.96);
        -webkit-backdrop-filter: blur(6px) saturate(0.96);
    }

    .crm-nav-orbit.crm-tabs {
        position: fixed;
        top: 50%;
        left: 50%;
        display: grid;
        width: min(92vw, 380px);
        height: auto;
        max-height: min(78vh, 620px);
        grid-template-columns: repeat(3, minmax(76px, 1fr));
        gap: 0.86rem 0.58rem;
        align-content: center;
        justify-items: center;
        padding: 1rem 0.7rem;
        border-radius: 28px;
        overflow-y: auto;
        background: rgba(8, 16, 18, 0.18);
        scrollbar-width: none;
        transform: translate(-50%, -50%) scale(0.96);
    }

    .crm-nav-orbit.is-open {
        transform: translate(-50%, -50%) scale(1);
    }

    .crm-nav-orbit .crm-nav-node,
    .crm-nav-orbit .crm-nav-close,
    .crm-nav-orbit.is-open .crm-nav-node,
    .crm-nav-orbit.is-open .crm-nav-close {
        position: static;
        top: auto;
        left: auto;
        opacity: 1;
        transform: none;
    }

    .crm-nav-orbit .crm-nav-node {
        display: inline-flex;
        width: min(100%, 7.2rem);
        height: auto;
        min-height: 5.9rem;
        flex-direction: column;
        gap: 0.42rem;
        border: 0;
        border-radius: 20px;
        color: rgba(255, 255, 255, 0.92);
        background: transparent;
        box-shadow: none;
    }

    .crm-nav-orbit .crm-nav-icon,
    .crm-nav-orbit.crm-tabs a span.crm-nav-icon,
    .crm-nav-orbit .crm-nav-search .crm-nav-icon {
        width: 62px;
        height: 62px;
        border: 1px solid rgba(255, 255, 255, 0.58);
        border-radius: 50%;
        color: #121719;
        background: rgba(255, 255, 255, 0.92);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.8),
            0 24px 48px -32px rgba(0, 0, 0, 0.82);
    }

    .crm-nav-orbit .crm-nav-node:hover .crm-nav-icon,
    .crm-nav-orbit .crm-nav-node:focus-visible .crm-nav-icon,
    .crm-nav-orbit .crm-nav-node.is-active .crm-nav-icon {
        color: #fff;
        border-color: rgba(255, 255, 255, 0.24);
        background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 42%),
            linear-gradient(135deg, var(--crm-accent), #0b9ca5);
    }

    .crm-nav-orbit .crm-nav-node:hover,
    .crm-nav-orbit .crm-nav-node:focus-visible,
    .crm-nav-orbit .crm-nav-node.is-active {
        background: transparent;
        box-shadow: none;
    }

    .crm-nav-orbit .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-label-left .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-label-top .crm-nav-label {
        position: static;
        inset: auto;
        width: auto;
        max-width: 6.6rem;
        min-height: 0;
        padding: 0.28rem 0.48rem;
        border-radius: 999px;
        color: #111719;
        font-size: 0.62rem;
        line-height: 1.1;
        text-align: center;
        white-space: normal;
        opacity: 1;
        transform: none;
    }

    .crm-nav-orbit .crm-nav-close {
        width: 48px;
        height: 48px;
        grid-column: 2;
        grid-row: 1;
        margin-bottom: 0.1rem;
    }
}

@media (max-width: 760px) {
    .crm-nav-orbit .crm-nav-label,
    .crm-nav-orbit .crm-nav-search .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-label-left .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-label-top .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-label-right .crm-nav-label {
        display: block;
        position: static;
        inset: auto;
        width: auto;
        max-width: 6.8rem;
        min-height: 0;
        margin: 0.42rem auto 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        color: rgba(255, 255, 255, 0.94);
        font-size: 0.72rem;
        font-weight: 950;
        line-height: 1.12;
        text-align: center;
        white-space: normal;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        transform: none;
    }

    .crm-nav-orbit .crm-nav-node:hover .crm-nav-label,
    .crm-nav-orbit .crm-nav-node:focus-visible .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-active .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-label-left:hover .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-label-left:focus-visible .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-label-left.is-active .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-label-top:hover .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-label-top:focus-visible .crm-nav-label,
    .crm-nav-orbit .crm-nav-node.is-label-top.is-active .crm-nav-label {
        color: #fff;
        background: transparent;
        box-shadow: none;
        transform: none;
    }
}

@media (max-width: 680px) {
    .crm-section-head {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
        gap: 0.9rem;
        padding: 1rem;
    }

    .crm-section-head > div:first-child {
        width: 100%;
    }

    .crm-section-head h2 {
        font-size: clamp(1.55rem, 9vw, 2.2rem);
        line-height: 1.05;
    }

    .crm-section-actions {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: flex-start;
        gap: 0.55rem;
    }

    .crm-section-actions > span {
        min-height: 2.75rem;
        display: inline-flex;
        max-width: calc(100% - 6.4rem);
        align-items: center;
        justify-content: center;
        padding: 0.58rem 0.78rem;
        font-size: 0.76rem;
        line-height: 1.1;
        white-space: normal;
    }

    .crm-section-actions .crm-fab-button {
        width: 2.85rem;
        height: 2.85rem;
        min-width: 2.85rem;
        min-height: 2.85rem;
        justify-content: center;
        gap: 0;
        padding: 0;
        border-radius: 999px;
        font-size: 0;
        white-space: nowrap;
    }

    .crm-section-actions .crm-fab-button i,
    .crm-section-actions .crm-fab-button svg,
    .crm-section-actions .crm-fab-button .svg-inline--fa {
        width: 1.15rem;
        height: 1.15rem;
        font-size: 1.15rem;
    }

    .crm-app .button,
    .crm-row-button,
    .crm-icon-action {
        min-width: 0;
        white-space: normal;
        text-align: center;
        line-height: 1.16;
    }
}

.crm-section-actions > span,
.crm-section-head > span {
    display: none;
}

@media (max-width: 680px) {
    .crm-section-actions {
        align-items: flex-start;
        gap: 0.55rem;
    }

    .crm-section-actions .crm-fab-button {
        width: auto;
        height: 2.85rem;
        min-width: 0;
        max-width: 100%;
        min-height: 2.85rem;
        justify-content: center;
        gap: 0.42rem;
        padding: 0 0.86rem;
        border-radius: 999px;
        font-size: 0.84rem;
        line-height: 1;
        white-space: nowrap;
    }

    .crm-section-actions .crm-fab-button i,
    .crm-section-actions .crm-fab-button svg,
    .crm-section-actions .crm-fab-button .svg-inline--fa {
        flex: 0 0 auto;
        width: 1rem;
        height: 1rem;
        font-size: 1rem;
    }
}

.crm-stats-head p:not(.eyebrow) {
    max-width: 52rem;
    margin: 0.35rem 0 0;
    color: var(--color-muted);
    font-weight: 720;
    line-height: 1.5;
}

.crm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.crm-kpi-card,
.crm-chart-card {
    border: 1px solid var(--crm-line);
    background:
        radial-gradient(circle at 12% 0%, rgba(18, 174, 183, 0.1), transparent 34%),
        rgba(255, 255, 255, 0.86);
}

.crm-kpi-card {
    display: grid;
    gap: 0.28rem;
    min-height: 8rem;
    align-content: center;
    padding: 1rem;
    border-radius: 20px;
    box-shadow: var(--crm-shadow);
}

.crm-kpi-card span,
.crm-chart-head small {
    color: var(--crm-accent-dark);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.crm-kpi-card strong {
    color: var(--ink);
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    font-weight: 950;
    letter-spacing: 0;
}

.crm-kpi-card small {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 820;
}

.crm-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.crm-chart-wide {
    grid-column: 1 / -1;
}

.crm-chart-card {
    padding: 1.1rem;
    border-radius: 20px;
}

.crm-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.crm-chart-head h2 {
    margin: 0.12rem 0 0;
    font-size: 1.18rem;
}

.crm-month-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    min-height: 14rem;
    align-items: end;
}

.crm-month-column {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
    color: var(--color-muted);
    font-size: 0.7rem;
    font-weight: 850;
    text-align: center;
}

.crm-month-column strong {
    color: var(--ink);
    font-size: 0.74rem;
}

.crm-month-bars {
    display: flex;
    height: 9rem;
    align-items: end;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.55rem 0.35rem;
    border-radius: 16px;
    background: rgba(236, 250, 251, 0.62);
}

.crm-bar {
    display: block;
    width: 34%;
    min-height: 0.4rem;
    border-radius: 999px 999px 0.3rem 0.3rem;
}

.crm-bar-offers,
.crm-chart-legend .is-offer {
    background: linear-gradient(180deg, #f6aa4e, #df7b22);
}

.crm-bar-invoices,
.crm-chart-legend .is-invoice,
.crm-bar-row i {
    background: linear-gradient(90deg, var(--crm-accent), #16c5cd);
}

.crm-chart-legend {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.8rem;
    color: var(--color-muted);
    font-size: 0.74rem;
    font-weight: 850;
}

.crm-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.crm-chart-legend i {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 999px;
}

.crm-bar-list {
    display: grid;
    gap: 0.62rem;
}

.crm-bar-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    min-height: 2.7rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(236, 250, 251, 0.58);
}

.crm-bar-row span,
.crm-bar-row strong {
    position: relative;
    z-index: 1;
}

.crm-bar-row span {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-weight: 880;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-bar-row strong {
    color: var(--crm-accent-dark);
    font-weight: 950;
}

.crm-bar-row i {
    position: absolute;
    inset: auto auto 0 0;
    height: 0.18rem;
    border-radius: 999px;
}

.crm-top-list {
    display: grid;
    gap: 0.55rem;
}

.crm-top-list div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border-radius: 14px;
    background: rgba(236, 250, 251, 0.58);
}

.crm-top-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-top-list span {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 820;
}

.crm-top-list b {
    color: var(--crm-accent-dark);
    font-weight: 950;
}

@media (max-width: 980px) {
    .crm-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .crm-kpi-grid,
    .crm-stats-grid {
        grid-template-columns: 1fr;
    }

    .crm-month-chart {
        gap: 0.42rem;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .crm-month-column {
        min-width: 4.2rem;
    }

    .crm-top-list div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}
