.crm-order-stat {
    display: grid;
    gap: 18px;
    width: 100%;
}

.crm-order-stat__summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.crm-order-stat__summary-card,
.crm-order-stat__panel,
.crm-order-stat__item,
.crm-order-stat__total {
    border: 1px solid #e3e8ef;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.07), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.crm-order-stat__summary-card {
    padding: 16px 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.crm-order-stat__summary-label,
.crm-order-stat__metric-label,
.crm-order-stat__meta-chip,
.crm-order-stat__total-count {
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.crm-order-stat__summary-value {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.15;
}

.crm-order-stat__summary-note {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

.crm-order-stat__panel {
    padding: 20px;
}

.crm-order-stat__panel-head,
.crm-order-stat__total-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.crm-order-stat__title,
.crm-order-stat__total-title {
    margin: 0;
    color: #101828;
    font-size: 18px;
    font-weight: 700;
}

.crm-order-stat__subtitle {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.crm-order-stat__legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.crm-order-stat__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667085;
    font-size: 12px;
}

.crm-order-stat__legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #cbd5e1;
}

.crm-order-stat__legend-dot.is-positive,
.crm-order-stat__metric-card.is-positive,
.crm-order-stat__summary-value.is-positive {
    background-color: rgba(34, 197, 94, 0.10);
    color: #166534;
}

.crm-order-stat__legend-dot.is-negative,
.crm-order-stat__metric-card.is-negative,
.crm-order-stat__summary-value.is-negative {
    background-color: rgba(239, 68, 68, 0.10);
    color: #b42318;
}

.crm-order-stat__legend-dot.is-neutral,
.crm-order-stat__metric-card.is-neutral {
    background-color: rgba(148, 163, 184, 0.10);
    color: #475467;
}

.crm-order-stat__summary-value.is-positive,
.crm-order-stat__summary-value.is-negative {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
}

.crm-order-stat__list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.crm-order-stat__item,
.crm-order-stat__total {
    padding: 18px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.crm-order-stat__item.has-warnings {
    border-left: 4px solid #f59e0b;
}

.crm-order-stat__item.is-clean {
    border-left: 4px solid #22c55e;
}

.crm-order-stat__item-head {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.crm-order-stat__item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.crm-order-stat__meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2f7;
    letter-spacing: 0.03em;
    text-transform: none;
}

.crm-order-stat__meta-chip.is-danger {
    background: rgba(239, 68, 68, 0.10);
    color: #b42318;
}

.crm-order-stat__meta-chip.is-success {
    background: rgba(34, 197, 94, 0.10);
    color: #166534;
}

.crm-order-stat__item-main {
    display: grid;
    gap: 8px;
}

.crm-order-stat__event-link {
    color: #101828;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    text-decoration: none;
}

.crm-order-stat__event-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.crm-order-stat__event-org {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100%;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
}

.crm-order-stat__event-org span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.35;
}

.crm-order-stat__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.crm-order-stat__metric-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #e4e9f0;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    text-align: left;
}

.crm-order-stat__metric-card--action {
    border: 1px dashed #93c5fd;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    cursor: pointer;
}

.crm-order-stat__metric-card--action:hover {
    border-color: #60a5fa;
}

.crm-order-stat__metric-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
}

.crm-order-stat__metric-note {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.crm-order-stat__item-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #edf1f6;
}

.crm-order-stat__flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.crm-order-stat__flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.crm-order-stat__flag.is-warning {
    color: #b54708;
    background: rgba(245, 158, 11, 0.12);
}

.crm-order-stat__flag.is-danger {
    color: #b42318;
    background: rgba(239, 68, 68, 0.12);
}

.crm-order-stat__flag.is-success {
    color: #166534;
    background: rgba(34, 197, 94, 0.12);
}

.crm-order-stat__actions {
    display: flex;
    justify-content: flex-end;
    min-width: 160px;
}

.crm-order-stat__pay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
}

.crm-order-stat__pay-btn:hover:not(:disabled) {
    background: #dbeafe;
    color: #1d4ed8;
}

.crm-order-stat__pay-btn:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.crm-order-stat__empty-state {
    padding: 32px 18px;
    border: 1px dashed #d5dce5;
    border-radius: 16px;
    color: #64748b;
    text-align: center;
    background: #fff;
}

.crm-order-stat__total {
    margin-top: 16px;
}

.crm-order-stat__total-count {
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2f7;
}

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

    .crm-order-stat__panel-head,
    .crm-order-stat__item-footer,
    .crm-order-stat__total-head {
        flex-direction: column;
    }

    .crm-order-stat__actions {
        min-width: 0;
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .crm-order-stat__summary,
    .crm-order-stat__metrics {
        grid-template-columns: 1fr;
    }

    .crm-order-stat__panel,
    .crm-order-stat__item,
    .crm-order-stat__total {
        padding: 16px;
    }

    .crm-order-stat__event-link {
        font-size: 18px;
    }

    .crm-order-stat__metric-value,
    .crm-order-stat__summary-value {
        font-size: 21px;
    }
}

.crm-calendar-screen {
    --crm-calendar-surface: #ffffff;
    --crm-calendar-surface-muted: #f8fafc;
    --crm-calendar-surface-subtle: #eef2f7;
    --crm-calendar-border: #d8e1eb;
    --crm-calendar-border-soft: #e7edf4;
    --crm-calendar-text: #101828;
    --crm-calendar-muted: #667085;
    --crm-calendar-accent: #1d4ed8;
    width: 100%;
}

.crm-calendar-screen__mount.fc {
    max-width: 1280px;
    margin: 20px auto 24px;
    padding: 10px 12px 12px;
    border: 1px solid var(--crm-calendar-border);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.crm-calendar-screen .fc .fc-toolbar {
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.crm-calendar-screen .fc .fc-toolbar-chunk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.crm-calendar-screen .fc .fc-toolbar-title {
    margin: 0;
    color: var(--crm-calendar-text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: capitalize;
}

.crm-calendar-screen .fc .fc-button-group {
    gap: 4px;
    box-shadow: none;
}

.crm-calendar-screen .fc .fc-button,
.crm-calendar-screen .fc .fc-button-primary {
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--crm-calendar-border);
    border-radius: 6px;
    background: var(--crm-calendar-surface);
    color: #344054;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.crm-calendar-screen .fc .fc-button:hover,
.crm-calendar-screen .fc .fc-button-primary:hover {
    border-color: #b8c7d8;
    background: #f4f8fb;
    color: #0f172a;
    transform: translateY(-1px);
}

.crm-calendar-screen .fc .fc-button-primary:not(:disabled).fc-button-active,
.crm-calendar-screen .fc .fc-button-primary:not(:disabled):active {
    border-color: #274b73;
    background: #274b73;
    color: #ffffff;
}

.crm-calendar-screen .fc .fc-button-primary:disabled {
    border-color: var(--crm-calendar-border-soft);
    background: #eef2f6;
    color: #98a2b3;
    opacity: 1;
}

.crm-calendar-screen .fc .fc-scrollgrid,
.crm-calendar-screen .fc-theme-standard td,
.crm-calendar-screen .fc-theme-standard th {
    border-color: var(--crm-calendar-border-soft);
}

.crm-calendar-screen .fc .fc-scrollgrid {
    overflow: hidden;
    border-radius: 6px;
    background: var(--crm-calendar-surface);
}

.crm-calendar-screen .fc .fc-col-header-cell {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.crm-calendar-screen .fc .fc-col-header-cell-cushion {
    padding: 8px 3px;
    color: var(--crm-calendar-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.crm-calendar-screen .fc .fc-daygrid-day-frame {
    min-height: 108px;
    padding: 4px 6px 6px;
    background: transparent;
    transition: background-color 0.18s ease;
}

.crm-calendar-screen .fc .fc-daygrid-day:hover .fc-daygrid-day-frame {
    background: rgba(226, 232, 240, 0.28);
}

.crm-calendar-screen .fc .fc-daygrid-day-top {
    position: relative;
    justify-content: flex-end;
    min-height: 24px;
}

.crm-calendar-screen .fc .fc-daygrid-day-number {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 4px;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.crm-calendar-screen .fc .fc-day-today {
    background: linear-gradient(180deg, rgba(29, 78, 216, 0.07) 0%, rgba(255, 255, 255, 0) 70%) !important;
}

.crm-calendar-screen .fc .fc-day-today .fc-daygrid-day-number {
    background: #274b73;
    color: #ffffff;
}

.crm-calendar-screen .fc .fc-day-other {
    background: rgba(248, 250, 252, 0.84);
}

.crm-calendar-screen .fc .fc-day-other .fc-daygrid-day-number {
    color: #98a2b3;
}

.crm-calendar-screen .fc .fc-daygrid-week-number {
    top: 4px;
    left: 4px;
    padding: 2px 4px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 4px;
    background: rgba(248, 250, 252, 0.92);
    color: #667085;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.crm-calendar-screen .fc .fc-daygrid-day-events {
    margin-top: 2px;
}

.crm-calendar-screen .fc .fc-daygrid-event-harness {
    margin-top: 2px;
}

.crm-calendar-screen .fc .fc-daygrid-event-harness:first-child {
    margin-top: 0;
}

.crm-calendar-screen .fc .fc-daygrid-event {
    margin: 0;
}

.crm-calendar-screen .fc .fc-h-event,
.crm-calendar-screen .fc .fc-event.crm-calendar-event-card {
    border: 1px solid var(--crm-calendar-event-border, #dbe4ef);
    border-left: 3px solid var(--crm-calendar-event-accent, #94a3b8);
    border-radius: 6px;
    background: var(--crm-calendar-event-bg, #ffffff);
    box-shadow: none;
    overflow: hidden;
}

.crm-calendar-screen .fc .crm-calendar-event-card:hover {
    border-color: var(--crm-calendar-event-accent, #94a3b8);
    background: #ffffff;
}

.crm-calendar-screen .fc .fc-event .fc-event-main {
    color: var(--crm-calendar-text);
}

.crm-calendar-screen .fc .crm-calendar-event-card .fc-event-main {
    padding: 5px 6px;
}

.crm-calendar-event {
    display: grid;
    gap: 2px;
}

.crm-calendar-event__title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--crm-calendar-text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.crm-calendar-event__meta {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    color: #475467;
    font-size: 10px;
    line-height: 1.1;
}

.crm-calendar-event__meta span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-calendar-event__meta i {
    width: 8px;
    color: #344054;
    text-align: center;
    font-size: 10px;
}

.crm-calendar-event__flags {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
}

.crm-calendar-event__flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.08);
    color: #475467;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
}

.crm-calendar-event__flag i {
    font-size: 8px;
}

.crm-calendar-event__flag.is-info {
    background: rgba(37, 99, 235, 0.10);
    color: #1d4ed8;
}

.crm-calendar-event__flag.is-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.crm-calendar-event__flag.is-neutral {
    background: rgba(15, 23, 42, 0.08);
    color: #344054;
}

.crm-calendar-screen .fc .fc-more-link {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(29, 78, 216, 0.08);
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.crm-calendar-screen .fc .fc-highlight {
    background: rgba(37, 99, 235, 0.12);
}

.crm-calendar-screen .fc .fc-popover {
    border: 1px solid var(--crm-calendar-border);
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.crm-calendar-screen .fc .fc-popover-header {
    padding: 8px 10px;
    background: #f8fafc;
}

.crm-calendar-screen .fc .fc-list {
    border: 0;
}

.crm-calendar-screen .fc .fc-list-day-cushion,
.crm-calendar-screen .fc .fc-timegrid-slot-label-cushion,
.crm-calendar-screen .fc .fc-timegrid-axis-cushion {
    color: var(--crm-calendar-muted);
    font-size: 11px;
    font-weight: 700;
}

.crm-calendar-screen .fc .fc-list-day-cushion {
    background: #f8fafc;
}

.crm-calendar-screen .fc .fc-list-event:hover td {
    background: rgba(37, 99, 235, 0.03);
}

.crm-calendar-screen .fc .fc-list-event-time {
    color: var(--crm-calendar-muted);
}

.crm-calendar-screen .fc .fc-timegrid-event .fc-event-main {
    padding: 8px;
}

.crm-calendar-screen .fc .fc-timegrid-event .crm-calendar-event__title {
    -webkit-line-clamp: 1;
}

.crm-calendar-screen .fc .fc-timegrid-event .crm-calendar-event__footer,
.crm-calendar-screen .fc .fc-list-event .crm-calendar-event__footer {
    display: none;
}

.crm-calendar-screen .fc .fc-view-harness {
    min-height: 0;
}

@media (max-width: 1199.98px) {
    .crm-calendar-screen__mount.fc {
        padding: 10px;
    }

    .crm-calendar-screen .fc .fc-toolbar {
        flex-direction: column;
    }

    .crm-calendar-screen .fc .fc-toolbar-title {
        font-size: 20px;
    }
}

@media (max-width: 767.98px) {
    .crm-calendar-screen__mount.fc {
        margin-top: 18px;
        padding: 8px;
        border-radius: 8px;
    }

    .crm-calendar-screen .fc .fc-toolbar-title {
        font-size: 18px;
    }

    .crm-calendar-screen .fc .fc-button,
    .crm-calendar-screen .fc .fc-button-primary {
        min-height: 30px;
        padding: 5px 8px;
        font-size: 11px;
    }

    .crm-calendar-screen .fc .fc-col-header-cell-cushion {
        padding: 6px 2px;
        font-size: 9px;
    }

    .crm-calendar-screen .fc .fc-daygrid-day-frame {
        min-height: 86px;
        padding: 3px 4px 4px;
    }

    .crm-calendar-screen .fc .crm-calendar-event-card .fc-event-main {
        padding: 4px 5px;
    }

    .crm-calendar-event {
        gap: 2px;
    }

    .crm-calendar-event__title {
        font-size: 10px;
    }

    .crm-calendar-event__meta {
        font-size: 9px;
    }

    .crm-calendar-screen .fc .fc-daygrid-week-number,
    .crm-calendar-event__flags {
        display: none;
    }
}

.page-platform-financial-main .workspace,
.page-platform-financial-self .workspace {
    --crm-financial-border: #d6dde7;
    --crm-financial-border-strong: #b8c3d1;
    --crm-financial-surface: #ffffff;
    --crm-financial-surface-muted: #f4f7fb;
    --crm-financial-surface-strong: #eef3f8;
    --crm-financial-text: #21303f;
    --crm-financial-text-muted: #66788a;
    --crm-financial-danger: #b94a48;
    --crm-financial-success: #386b4f;
    color: var(--crm-financial-text);
}

.page-platform-financial-main .layout.d-md-flex.align-items-center,
.page-platform-financial-self .layout.d-md-flex.align-items-center {
    gap: 12px;
    margin-bottom: 12px;
}

.page-platform-financial-main .layout.d-md-flex.align-items-center h1,
.page-platform-financial-self .layout.d-md-flex.align-items-center h1 {
    margin-bottom: 0;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.page-platform-financial-main .command-bar,
.page-platform-financial-self .command-bar {
    gap: 8px;
}

.page-platform-financial-main .command-bar .nav-item .btn,
.page-platform-financial-main .command-bar .nav-item a,
.page-platform-financial-self .command-bar .nav-item .btn,
.page-platform-financial-self .command-bar .nav-item a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--crm-financial-border);
    border-radius: 5px;
    background: var(--crm-financial-surface);
    color: var(--crm-financial-text);
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
}

.page-platform-financial-main .command-bar .nav-item .btn:hover,
.page-platform-financial-main .command-bar .nav-item a:hover,
.page-platform-financial-self .command-bar .nav-item .btn:hover,
.page-platform-financial-self .command-bar .nav-item a:hover {
    background: var(--crm-financial-surface-muted);
}

.crm-financial-report__overview {
    margin-bottom: 12px;
    padding: 10px 12px 12px;
    border: 1px solid var(--crm-financial-border);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 251, 0.94)),
        var(--crm-financial-surface);
    box-shadow: 0 2px 8px rgba(23, 38, 61, 0.04);
}

.crm-financial-report__overview-bar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 10px;
}

.crm-financial-report__kicker {
    color: var(--crm-financial-text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.crm-financial-report__overview-total {
    margin-top: 2px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.crm-financial-report__overview-caption {
    color: var(--crm-financial-text-muted);
    font-size: 11px;
    white-space: nowrap;
}

.crm-financial-report__overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.crm-financial-report__summary-card {
    min-width: 0;
    border: 1px solid var(--crm-financial-border);
    border-radius: 6px;
    background: var(--crm-financial-surface);
    overflow: hidden;
}

.crm-financial-report__summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--crm-financial-border);
    background: var(--crm-financial-surface-muted);
}

.crm-financial-report__summary-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.crm-financial-report__summary-total {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.crm-financial-report__summary-table-wrap {
    overflow: auto;
}

.crm-financial-report__summary-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
}

.crm-financial-report__summary-table th,
.crm-financial-report__summary-table td {
    padding: 5px 10px;
    border-bottom: 1px solid var(--crm-financial-border);
}

.crm-financial-report__summary-table thead th {
    color: var(--crm-financial-text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #fbfcfe;
}

.crm-financial-report__summary-table th:first-child,
.crm-financial-report__summary-table td:first-child {
    text-align: left;
}

.crm-financial-report__summary-table th:last-child,
.crm-financial-report__summary-table td:last-child {
    width: 130px;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.crm-financial-report__summary-table tbody tr:last-child td {
    border-bottom: 0;
}

.crm-financial-report__summary-table tbody tr:nth-child(even) {
    background: rgba(244, 247, 251, 0.55);
}

.crm-financial-report__summary-table tbody tr.is-negative td:last-child {
    color: var(--crm-financial-danger);
}

.page-platform-financial-main #post-form > .row.form-group.align-items-baseline {
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--crm-financial-border);
    border-radius: 8px;
    background: var(--crm-financial-surface);
    box-shadow: 0 2px 8px rgba(23, 38, 61, 0.04);
    gap: 8px 0;
}

.page-platform-financial-main #post-form > .row.form-group.align-items-baseline > [class*="col-"] {
    min-width: 130px;
}

.page-platform-financial-main #post-form > .row.form-group.align-items-baseline .form-group {
    margin-bottom: 0;
}

.page-platform-financial-main #post-form > .row.form-group.align-items-baseline .form-control,
.page-platform-financial-main #post-form > .row.form-group.align-items-baseline .ts-control {
    min-height: 34px;
    padding: 6px 10px;
    border-color: var(--crm-financial-border);
    border-radius: 5px;
    font-size: 12px;
    box-shadow: none;
}

.page-platform-financial-main #post-form > .row.form-group.align-items-baseline .ts-control {
    padding: 5px 10px;
}

.page-platform-financial-main #post-form > .row.form-group.align-items-baseline .btn.btn-link {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--crm-financial-border-strong);
    border-radius: 5px;
    background: var(--crm-financial-surface-muted);
    color: var(--crm-financial-text);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.page-platform-financial-main #post-form > .row.form-group.align-items-baseline .btn.btn-link:hover {
    background: var(--crm-financial-surface-strong);
}

.crm-financial-report__section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin: 12px 0 6px;
}

.crm-financial-report__section-main {
    min-width: 0;
}

.crm-financial-report__section-title {
    margin-top: 2px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.crm-financial-report__section-meta {
    display: flex;
    align-items: baseline;
    gap: 12px;
    color: var(--crm-financial-text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.crm-financial-report__section-total {
    color: var(--crm-financial-text);
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.crm-financial-report__table-card {
    margin-bottom: 14px;
    border: 1px solid var(--crm-financial-border);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(23, 38, 61, 0.04);
    overflow: hidden;
}

.crm-financial-report__table-card .table-responsive {
    scrollbar-gutter: stable;
}

.crm-financial-report__table {
    margin-bottom: 0;
    table-layout: fixed;
    font-size: 12px;
}

.crm-financial-report__table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 10px;
    border-bottom: 1px solid var(--crm-financial-border-strong);
    background: #f8fafc;
    color: var(--crm-financial-text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.crm-financial-report__table tbody td {
    padding: 6px 10px;
    vertical-align: top;
    border-color: var(--crm-financial-border);
    line-height: 1.25;
}

.crm-financial-report__table tbody tr:nth-child(even) {
    background: rgba(244, 247, 251, 0.55);
}

.crm-financial-report__table tbody tr:hover {
    background: rgba(238, 243, 248, 0.8);
}

.crm-financial-report__table th:first-child,
.crm-financial-report__table td:first-child {
    width: 48px;
    text-align: right;
    white-space: nowrap;
}

.crm-financial-report__table th:nth-child(2),
.crm-financial-report__table td:nth-child(2) {
    width: 92px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.crm-financial-report__table th:nth-child(5),
.crm-financial-report__table td:nth-child(5) {
    width: 126px;
    text-align: right;
}

.crm-financial-report__table th:nth-child(6),
.crm-financial-report__table td:nth-child(6) {
    width: 120px;
}

.crm-financial-report__table th:last-child,
.crm-financial-report__table td:last-child {
    width: 72px;
    text-align: center;
    white-space: nowrap;
}

.crm-financial-report__table td:last-child .row.form-group.align-items-baseline {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.crm-financial-report__table td:last-child .row.form-group.align-items-baseline > [class*="col-"] {
    min-width: auto;
    width: auto;
    padding: 0;
}

.crm-financial-report__table td:last-child .form-group {
    margin: 0;
}

.crm-financial-report__table td:last-child .btn.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    border: 1px solid var(--crm-financial-border);
    border-radius: 4px;
    background: var(--crm-financial-surface-muted);
    color: var(--crm-financial-text-muted);
    text-decoration: none;
}

.crm-financial-report__table td:last-child .btn.btn-link:hover {
    background: var(--crm-financial-surface-strong);
    color: var(--crm-financial-text);
}

.crm-financial-report__table td:last-child .btn.btn-link span {
    display: none;
}

.crm-financial-report__index-cell,
.crm-financial-report__amount-cell,
.crm-financial-report__payment-cell {
    display: inline-block;
    width: 100%;
}

.crm-financial-report__index-cell,
.crm-financial-report__amount-cell {
    font-variant-numeric: tabular-nums;
}

.crm-financial-report__amount-cell {
    text-align: right;
    font-weight: 700;
}

.crm-financial-report__payment-cell {
    color: var(--crm-financial-text-muted);
}

.crm-financial-report__name-cell,
.crm-financial-report__classification-link {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.crm-financial-report__author-note {
    color: var(--crm-financial-text-muted);
    font-size: 11px;
}

.crm-financial-report__classification {
    display: grid;
    gap: 4px;
}

.crm-financial-report__classification a {
    color: inherit;
    text-decoration: none;
}

.crm-financial-report__classification a:hover {
    color: #0d6efd;
}

.crm-financial-report__classification-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100%;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    background: var(--crm-financial-surface-strong);
}

.crm-financial-report__classification-badge--success {
    color: var(--crm-financial-success);
}

.crm-financial-report__classification-badge--danger {
    color: var(--crm-financial-danger);
}

.crm-financial-report__table-card .btn-link.dropdown-toggle {
    color: var(--crm-financial-text-muted);
    font-size: 11px;
    text-decoration: none;
}

.crm-financial-report__table-card .btn-link.dropdown-toggle:hover {
    color: var(--crm-financial-text);
}

.crm-financial-report__table-card .d-flex.flex-wrap {
    padding-top: 8px;
    padding-bottom: 8px;
}

@media (max-width: 1199px) {
    .crm-financial-report__overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .page-platform-financial-main .layout.d-md-flex.align-items-center {
        margin-bottom: 10px;
    }

    .crm-financial-report__overview {
        padding: 10px;
    }

    .crm-financial-report__overview-bar,
    .crm-financial-report__section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-financial-report__overview-caption,
    .crm-financial-report__section-meta {
        white-space: normal;
    }

    .crm-financial-report__table {
        table-layout: auto;
        min-width: 760px;
    }
}

/*
 * Экран «Заявки (новые)» — очередь заявок слева, карточка справа.
 * Разметку строит resources/js/modules/order-new.js.
 *
 * Типографика — платформенная: наследуем шрифт Orchid, для колонок с датами
 * и суммами берём его же моноширинный стек (--bs-font-monospace).
 */

.crm-order-new {
    --crm-on-bg: #eceef1;
    --crm-on-surface: #fff;
    --crm-on-line: #e6e9ed;
    --crm-on-line-strong: #dde0e5;
    --crm-on-line-soft: #eef0f3;
    --crm-on-text: #171a1f;
    --crm-on-text-2: #3c434d;
    --crm-on-text-3: #6b7280;
    --crm-on-muted: #8a9099;
    --crm-on-muted-2: #a2a8b1;
    --crm-on-muted-3: #b3b9c2;
    --crm-on-accent: #2f6ae0;
    --crm-on-accent-dark: #2559c4;
    --crm-on-accent-soft: #e4edfc;
    --crm-on-danger: #c0392b;
    --crm-on-danger-2: #b6413c;
    --crm-on-success: #3d7a2e;
    --crm-on-mono: var(--bs-font-monospace, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);

    color: var(--crm-on-text);
}

.crm-order-new__body {
    display: flex;
    height: calc(100vh - 190px);
    min-height: 560px;
    background: var(--crm-on-surface);
    border: 1px solid var(--crm-on-line);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.crm-order-new__mono {
    font-family: var(--crm-on-mono);
}

.crm-order-new__muted {
    color: var(--crm-on-muted);
}

.crm-order-new__ellipsis {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Очередь ──────────────────────────────────────────────────────────── */

.crm-order-new__queue {
    width: 412px;
    flex-shrink: 0;
    border-right: 1px solid var(--crm-on-line);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.crm-order-new__queue-head {
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--crm-on-line);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crm-order-new__queue-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.crm-order-new__title {
    font-size: 16px;
    font-weight: 600;
}

.crm-order-new__queue-title .crm-order-new__mono {
    font-size: 12.5px;
}

.crm-order-new__hint {
    margin-left: auto;
    font-size: 12px;
    color: var(--crm-on-muted-3);
}

.crm-order-new__search-row {
    display: flex;
    gap: 8px;
}

.crm-order-new__search {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 11px;
    border: 1px solid var(--crm-on-line-strong);
    border-radius: 8px;
    background: #fafbfc;
    font-size: 13px;
    color: var(--crm-on-text);
    outline: none;
}

.crm-order-new__search:focus {
    border-color: #b9d1f7;
}

.crm-order-new__btn {
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid var(--crm-on-line-strong);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    background: var(--crm-on-surface);
}

.crm-order-new__btn:hover {
    background: #f5f7fa;
}

.crm-order-new__btn--primary {
    border-color: transparent;
    background: var(--crm-on-accent);
    color: #fff;
    font-weight: 500;
}

.crm-order-new__btn--primary:hover {
    background: var(--crm-on-accent-dark);
}

.crm-order-new__btn--danger {
    border-color: #eecccc;
    color: var(--crm-on-danger-2);
}

.crm-order-new__btn--danger:hover {
    background: #fdf2f2;
}

.crm-order-new__btn--muted {
    background: var(--crm-on-bg);
    border-color: transparent;
    color: var(--crm-on-muted);
    cursor: default;
}

.crm-order-new__btn--muted:hover {
    background: var(--crm-on-bg);
}

.crm-order-new__btn--sm {
    height: 28px;
    padding: 0 11px;
    font-size: 12.5px;
    border-radius: 7px;
}

.crm-order-new__counter {
    font-family: var(--crm-on-mono);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 20px;
    background: var(--crm-on-accent);
    color: #fff;
}

.crm-order-new__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.crm-order-new__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 6px;
    background: var(--crm-on-accent-soft);
    color: var(--crm-on-accent-dark);
    font-size: 12px;
}

.crm-order-new__chip-remove {
    cursor: pointer;
    opacity: .7;
    font-size: 13px;
}

.crm-order-new__chip-reset {
    padding: 4px 6px;
    font-size: 12px;
    color: var(--crm-on-muted);
    cursor: pointer;
}

.crm-order-new__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.crm-order-new__quick-item {
    padding: 5px 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 20px;
    background: #f2f4f7;
    color: var(--crm-on-text-2);
    font-size: 12.5px;
    white-space: nowrap;
    cursor: pointer;
}

.crm-order-new__quick-item.is-active {
    background: var(--crm-on-text);
    color: #fff;
}

.crm-order-new__quick-count {
    font-family: var(--crm-on-mono);
    font-size: 11px;
    opacity: .7;
}

.crm-order-new__queue-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.crm-order-new__row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--crm-on-line-soft);
    border-left: 3px solid transparent;
    cursor: pointer;
    background: var(--crm-on-surface);
}

.crm-order-new__row:hover {
    background: #fafbfc;
}

.crm-order-new__row.is-flagged {
    border-left-color: #e8a33d;
}

.crm-order-new__row.is-selected {
    background: #f2f7fe;
    border-left-color: var(--crm-on-accent);
}

.crm-order-new__row-top,
.crm-order-new__row-mid,
.crm-order-new__row-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.crm-order-new__row-top {
    align-items: baseline;
}

.crm-order-new__row-client {
    font-size: 14px;
    font-weight: 600;
}

.crm-order-new__row-contact {
    font-size: 12px;
    color: #7c828d;
    flex-shrink: 0;
}

.crm-order-new__row-id {
    margin-left: auto;
    font-family: var(--crm-on-mono);
    font-size: 11.5px;
    color: var(--crm-on-muted-2);
    flex-shrink: 0;
}

.crm-order-new__status {
    display: inline-flex;
    height: 20px;
    align-items: center;
    padding: 0 8px;
    border-radius: 5px;
    font-size: 11.5px;
    color: #2c2f36;
    white-space: nowrap;
    flex-shrink: 0;
}

.crm-order-new__row-type,
.crm-order-new__row-source {
    font-size: 12px;
    color: #7c828d;
}

.crm-order-new__row-bottom {
    font-size: 12px;
}

.crm-order-new__row-due {
    font-family: var(--crm-on-mono);
    color: var(--crm-on-text-2);
}

.crm-order-new__row-due.is-soon {
    color: var(--crm-on-danger);
}

.crm-order-new__row-budget {
    font-family: var(--crm-on-mono);
    color: var(--crm-on-text-2);
}

.crm-order-new__row-manager {
    margin-left: auto;
    color: var(--crm-on-text-3);
}

.crm-order-new__row-dot {
    color: #c3ccda;
}

.crm-order-new__empty {
    padding: 28px 18px;
    font-size: 13px;
    color: var(--crm-on-muted-2);
    text-align: center;
}

.crm-order-new__more {
    padding: 12px 18px 20px;
    text-align: center;
}

/* ── Карточка ─────────────────────────────────────────────────────────── */

.crm-order-new__card {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.crm-order-new__card-head {
    padding: 20px 26px 16px;
    border-bottom: 1px solid var(--crm-on-line);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.crm-order-new__card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crm-order-new__client {
    font-size: 22px;
    font-weight: 600;
}

.crm-order-new__card-id {
    font-family: var(--crm-on-mono);
    font-size: 13px;
    color: var(--crm-on-muted-2);
}

.crm-order-new__card-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.crm-order-new__status-wrap {
    position: relative;
}

.crm-order-new__status--lg {
    height: 26px;
    gap: 6px;
    padding: 0 11px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.crm-order-new__caret {
    font-size: 9px;
    opacity: .6;
}

.crm-order-new__dropdown {
    position: absolute;
    top: 32px;
    left: 0;
    z-index: 15;
    width: 230px;
    background: var(--crm-on-surface);
    border: 1px solid var(--crm-on-line-strong);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(16, 20, 28, .14);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crm-order-new__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.crm-order-new__option:hover {
    background: #f2f4f7;
}

.crm-order-new__option-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.crm-order-new__option-current {
    margin-left: auto;
    color: var(--crm-on-accent);
    font-size: 12px;
}

.crm-order-new__note {
    padding: 6px 8px 2px;
    font-size: 11.5px;
    color: var(--crm-on-muted-2);
    line-height: 1.4;
}

.crm-order-new__closed {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: #fdeeee;
    color: var(--crm-on-danger-2);
    font-size: 13px;
    white-space: nowrap;
}

.crm-order-new__stages {
    display: flex;
    gap: 6px;
    max-width: 860px;
}

.crm-order-new__stage {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: default;
}

.crm-order-new__stage.is-manual {
    cursor: pointer;
}

.crm-order-new__stage-bar {
    height: 5px;
    border-radius: 3px;
    background: var(--crm-on-line);
}

.crm-order-new__stage.is-done .crm-order-new__stage-bar {
    background: #9fb8e8;
}

.crm-order-new__stage.is-current .crm-order-new__stage-bar {
    background: var(--crm-on-accent);
}

.crm-order-new__stage-label {
    font-size: 11.5px;
    color: var(--crm-on-muted-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-order-new__stage.is-done .crm-order-new__stage-label,
.crm-order-new__stage.is-current .crm-order-new__stage-label {
    color: var(--crm-on-text-2);
}

.crm-order-new__card-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 26px 28px;
}

.crm-order-new__columns {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.crm-order-new__fields {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crm-order-new__side {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Поля ─────────────────────────────────────────────────────────────── */

.crm-order-new__group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crm-order-new__group-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--crm-on-muted-2);
}

.crm-order-new__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0 12px;
}

.crm-order-new__field {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px dashed transparent;
    min-width: 0;
    position: relative;
    cursor: pointer;
}

.crm-order-new__field:hover {
    background: #f5f7fa;
    border-color: var(--crm-on-line-strong);
}

.crm-order-new__field.is-readonly,
.crm-order-new__field.is-readonly:hover {
    cursor: default;
    background: transparent;
    border-color: transparent;
}

.crm-order-new__field-label {
    font-size: 11px;
    color: var(--crm-on-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-order-new__field-view {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.crm-order-new__field-value {
    font-size: 13px;
    line-height: 1.4;
    color: var(--crm-on-text);
}

.crm-order-new__field-value.is-empty {
    color: var(--crm-on-muted-3);
}

.crm-order-new__field-value.is-danger {
    color: var(--crm-on-danger);
}

.crm-order-new__field-value.is-success {
    color: var(--crm-on-success);
}

.crm-order-new__field-value.is-mono {
    font-family: var(--crm-on-mono);
}

.crm-order-new__field-value--area {
    white-space: pre-line;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.crm-order-new__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 6px;
    border-radius: 4px;
    background: #f2f4f7;
    color: var(--crm-on-text-3);
    font-size: 10.5px;
}

.crm-order-new__copy-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.crm-order-new__copy-chip {
    max-width: 100%;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 7px;
    border: 1px solid #e3e6ea;
    background: #f8f9fb;
    border-radius: 5px;
    font-family: var(--crm-on-mono);
    font-size: 11px;
    color: var(--crm-on-text-2);
    cursor: pointer;
}

.crm-order-new__copy-chip:hover {
    border-color: #b9d1f7;
    background: #eff5fe;
    color: var(--crm-on-accent-dark);
}

.crm-order-new__copy-chip-icon {
    font-family: var(--bs-font-sans-serif, sans-serif);
    color: var(--crm-on-muted-2);
    flex-shrink: 0;
}

.crm-order-new__input {
    height: 26px;
    width: 100%;
    box-sizing: border-box;
    font-size: 13.5px;
    border: 2px solid var(--crm-on-accent);
    border-radius: 5px;
    padding: 0 6px;
    outline: none;
    color: var(--crm-on-text);
    background: var(--crm-on-surface);
}

.crm-order-new__textarea {
    height: 76px;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    font-size: 13px;
    line-height: 1.45;
    border: 2px solid var(--crm-on-accent);
    border-radius: 6px;
    padding: 5px 7px;
    outline: none;
    color: var(--crm-on-text);
    background: var(--crm-on-surface);
}

.crm-order-new__combo {
    position: relative;
}

.crm-order-new__combo-list {
    position: absolute;
    top: 30px;
    left: 0;
    z-index: 25;
    min-width: 100%;
    width: -moz-max-content;
    width: max-content;
    max-width: 280px;
    max-height: 208px;
    overflow-y: auto;
    background: var(--crm-on-surface);
    border: 1px solid var(--crm-on-line-strong);
    border-radius: 9px;
    box-shadow: 0 10px 28px rgba(16, 20, 28, .16);
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.crm-order-new__combo-empty {
    padding: 6px 8px;
    font-size: 12.5px;
    color: var(--crm-on-muted-2);
}

/* ── Правая колонка карточки ──────────────────────────────────────────── */

.crm-order-new__panel {
    padding: 14px;
    border: 1px solid var(--crm-on-line);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crm-order-new__panel--tight {
    gap: 4px;
    padding: 12px 14px 14px;
}

.crm-order-new__panel-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--crm-on-text-2);
}

.crm-order-new__panel--tight .crm-order-new__panel-title {
    padding-bottom: 4px;
}

.crm-order-new__toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 7px;
    margin: 0 -7px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--crm-on-text-2);
    cursor: pointer;
}

.crm-order-new__toggle:hover {
    background: #f5f7fa;
}

.crm-order-new__toggle.is-on {
    color: var(--crm-on-accent-dark);
}

.crm-order-new__toggle.is-locked {
    cursor: default;
    opacity: .75;
}

.crm-order-new__toggle.is-locked:hover {
    background: transparent;
}

.crm-order-new__toggle-box {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    border-radius: 4px;
    border: 1px solid #c3ccda;
    background: var(--crm-on-surface);
    color: #fff;
    font-size: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.crm-order-new__toggle.is-on .crm-order-new__toggle-box {
    border-color: var(--crm-on-accent);
    background: var(--crm-on-accent);
}

.crm-order-new__toggle-hint {
    margin-left: auto;
    font-size: 11px;
    color: var(--crm-on-muted-3);
    white-space: nowrap;
}

.crm-order-new__log-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crm-order-new__log-meta {
    font-family: var(--crm-on-mono);
    font-size: 11px;
    color: var(--crm-on-muted-2);
}

.crm-order-new__log-text {
    font-size: 12.5px;
    color: var(--crm-on-text-2);
    line-height: 1.45;
    white-space: pre-line;
}

.crm-order-new__log-more {
    font-size: 12px;
    color: var(--crm-on-muted);
}

.crm-order-new__history-item {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #f2f4f7;
    font-size: 12.5px;
}

.crm-order-new__history-item:last-child {
    border-bottom: none;
}

.crm-order-new__history-date {
    font-family: var(--crm-on-mono);
    font-size: 11.5px;
    color: var(--crm-on-muted-2);
    width: 66px;
    flex-shrink: 0;
}

.crm-order-new__self-start {
    align-self: flex-start;
}

/* ── Панель фильтров ──────────────────────────────────────────────────── */

.crm-order-new__filters-panel {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 412px;
    background: var(--crm-on-surface);
    border-right: 1px solid var(--crm-on-line-strong);
    box-shadow: 8px 0 24px rgba(16, 20, 28, .10);
    z-index: 12;
    display: flex;
    flex-direction: column;
}

.crm-order-new__filters-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--crm-on-line);
}

.crm-order-new__filters-title {
    font-size: 15px;
    font-weight: 600;
}

.crm-order-new__close {
    margin-left: auto;
    color: var(--crm-on-muted-2);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}

.crm-order-new__filters-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.crm-order-new__filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.crm-order-new__filter {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.crm-order-new__filter-label {
    font-size: 12px;
    color: var(--crm-on-text-2);
}

.crm-order-new__select {
    height: 32px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
    border: 1px solid var(--crm-on-line-strong);
    border-radius: 7px;
    background: var(--crm-on-surface);
    font-size: 13px;
    padding: 0 8px;
    cursor: pointer;
}

.crm-order-new__select:hover {
    border-color: #c3ccda;
}

.crm-order-new__select-value.is-empty {
    color: var(--crm-on-muted);
}

.crm-order-new__select-caret {
    margin-left: auto;
    font-size: 9px;
    color: var(--crm-on-muted-2);
}

.crm-order-new__select-panel {
    position: absolute;
    top: 36px;
    left: 0;
    z-index: 25;
    width: 240px;
    background: var(--crm-on-surface);
    border: 1px solid var(--crm-on-line-strong);
    border-radius: 9px;
    box-shadow: 0 10px 28px rgba(16, 20, 28, .16);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crm-order-new__select-search {
    height: 28px;
    box-sizing: border-box;
    border: 1px solid var(--crm-on-line-strong);
    border-radius: 6px;
    font-size: 12.5px;
    padding: 0 8px;
    outline: none;
}

.crm-order-new__select-options {
    max-height: 190px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.crm-order-new__date-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.crm-order-new__date {
    flex: 1;
    min-width: 0;
    height: 32px;
    box-sizing: border-box;
    border: 1px solid var(--crm-on-line-strong);
    border-radius: 7px;
    background: var(--crm-on-surface);
    font-family: var(--crm-on-mono);
    font-size: 12px;
    padding: 0 6px;
    outline: none;
    color: var(--crm-on-text);
}

.crm-order-new__date-clear {
    width: 22px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--crm-on-muted-3);
    font-size: 14px;
    cursor: pointer;
}

.crm-order-new__date-clear:hover {
    color: var(--crm-on-danger);
}

.crm-order-new__filters-foot {
    display: flex;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid var(--crm-on-line);
}

.crm-order-new__filters-foot .crm-order-new__btn--primary {
    flex: 1;
    justify-content: center;
    height: 36px;
}

/* ── Модалки и тост ───────────────────────────────────────────────────── */

.crm-order-new__overlay {
    position: absolute;
    inset: 0;
    background: rgba(23, 26, 31, .42);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-order-new__modal {
    width: 520px;
    max-width: calc(100% - 48px);
    background: var(--crm-on-surface);
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(16, 20, 28, .28);
    overflow: hidden;
}

.crm-order-new__modal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 22px 14px;
    font-size: 17px;
    font-weight: 600;
}

.crm-order-new__modal-body {
    padding: 0 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.crm-order-new__modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.crm-order-new__modal-label {
    font-size: 12.5px;
    color: var(--crm-on-text-2);
}

.crm-order-new__required {
    color: var(--crm-on-danger);
}

.crm-order-new__modal-select {
    height: 34px;
    border: 1px solid var(--crm-on-line-strong);
    border-radius: 8px;
    background: var(--crm-on-surface);
    font-size: 13.5px;
    padding: 0 8px;
    outline: none;
    color: var(--crm-on-text);
}

.crm-order-new__modal-select:disabled {
    background: #f5f7fa;
    color: var(--crm-on-muted);
}

.crm-order-new__modal-textarea {
    height: 96px;
    resize: none;
    font-size: 13.5px;
    line-height: 1.5;
    padding: 9px 10px;
    border: 1px solid var(--crm-on-line-strong);
    border-radius: 8px;
    outline: none;
    color: var(--crm-on-text);
    font-family: inherit;
}

.crm-order-new__radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--crm-on-text-3);
    cursor: pointer;
}

.crm-order-new__radio.is-on {
    color: var(--crm-on-text);
}

.crm-order-new__radio-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 4px solid #c3ccda;
    background: var(--crm-on-surface);
    box-sizing: border-box;
}

.crm-order-new__radio.is-on .crm-order-new__radio-dot {
    border-color: var(--crm-on-accent);
    background: var(--crm-on-accent);
}

.crm-order-new__radio-hint {
    font-size: 12px;
    color: var(--crm-on-muted-2);
}

.crm-order-new__modal-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    background: #f8f9fb;
    border-top: 1px solid var(--crm-on-line);
}

.crm-order-new__modal-note {
    font-size: 12px;
    color: var(--crm-on-muted);
}

.crm-order-new__link {
    margin-left: auto;
    font-size: 13.5px;
    color: var(--crm-on-text-2);
    cursor: pointer;
}

.crm-order-new__toast {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    background: var(--crm-on-text);
    color: #fff;
    font-size: 13px;
    padding: 9px 16px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(16, 20, 28, .24);
    z-index: 40;
    max-width: 80%;
}

.crm-order-new__toast.is-error {
    background: var(--crm-on-danger-2);
}

.crm-order-new__placeholder {
    margin: auto;
    font-size: 13.5px;
    color: var(--crm-on-muted-2);
}



