.crm-sales-page {
    display: grid;
    gap: 22px;
}

.crm-sales-page .mb-4 {
    margin-bottom: 0 !important;
}

.crm-sales-hero {
    padding: 24px !important;
}

.crm-sales-head {
    align-items: flex-start !important;
    gap: 18px;
    margin-bottom: 18px;
}

.crm-sales-head-copy {
    display: grid;
    gap: 8px;
    max-width: 760px;
}

.crm-sales-eyebrow,
.crm-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b5df0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .01em;
}

.crm-sales-head-copy h2 {
    font-size: 31px;
    line-height: 1.35;
    font-weight: 900;
    color: #162033;
}

.crm-sales-head-copy p,
.crm-section-head p {
    margin: 0;
    color: #778298;
    font-size: 14px;
    line-height: 1.9;
}

.crm-sales-top-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.crm-sales-top-actions .crm-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-inline: 16px;
}

.crm-sales-btn-icon,
.crm-sales-tool-icon,
.crm-sales-input-icon,
.crm-sales-empty-icon,
.crm-sales-stat-icon {
    display: inline-grid;
    place-items: center;
}

.crm-sales-btn-icon svg,
.crm-sales-tool-icon svg,
.crm-sales-input-icon svg,
.crm-sales-empty-icon svg,
.market-kpi-pro-icon svg,
.crm-sales-stat-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.crm-sales-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid #edf1f7;
}

.crm-sales-tool {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid #e2e8f2;
    border-radius: 14px;
    background: #fff;
    color: #314159;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    transition: all .18s ease;
}

.crm-sales-tool:hover {
    border-color: #cfd8ea;
    color: #463be8;
    box-shadow: 0 10px 22px rgba(51, 64, 99, .08);
}

.crm-sales-tool.is-active {
    background: linear-gradient(135deg, #6c63f0 0%, #4f46e5 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 18px 32px rgba(96, 86, 240, .22);
}

.market-tone-teal { --tone:#00a7b7; --tone-bg:#e8fbfd; }

.crm-sales-kpis {
    gap: 16px !important;
}

.crm-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.crm-section-head h3 {
    margin: 4px 0 6px;
    color: #172033;
    font-size: 24px;
    line-height: 1.45;
    font-weight: 900;
}

.crm-section-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.crm-badge-soft-success,
.crm-badge-soft-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.crm-badge-soft-success {
    background: #eaf9f2;
    color: #12845b;
}

.crm-badge-soft-info {
    background: #eef4ff;
    color: #365ad9;
}

.crm-sales-search-panel {
    padding-top: 22px !important;
}

.crm-sales-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.crm-sales-field-span {
    min-width: 0;
}

.crm-sales-input-wrap {
    position: relative;
}

.crm-sales-input-wrap .crm-input {
    padding-inline-end: 44px;
}

.crm-sales-input-icon {
    position: absolute;
    inset-inline-end: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #97a2b5;
    pointer-events: none;
}

.crm-search-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

.crm-search-actions .crm-btn {
    min-width: 132px;
    min-height: 44px;
}

.crm-sales-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.crm-sales-table thead th {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    color: #6e7b90;
    font-size: 12.5px;
    font-weight: 800;
    vertical-align: middle;
}

.crm-sales-table tbody td {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    color: #1d2638;
    font-size: 14px;
    line-height: 1.8;
    vertical-align: middle;
}

.crm-sales-cell-title {
    color: #162033;
    font-weight: 800;
    line-height: 1.75;
}

.crm-sales-cell-subtitle {
    display: block;
    margin-top: 3px;
    color: #8b97aa;
    font-size: 12px;
    line-height: 1.7;
}

.crm-sales-inline-form {
    display: inline-flex;
    margin: 0;
}

.crm-sales-inline-form .crm-btn {
    min-height: 38px;
}

.crm-sales-stage-form {
    display: grid;
    gap: 10px;
    min-width: 270px;
}

.crm-sales-stage-form .crm-input,
.crm-sales-stage-form .crm-btn {
    min-height: 40px;
}

.crm-sales-percent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f5f2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 900;
}

.crm-sales-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.crm-sales-status-info { background: #eef4ff; color: #365ad9; }
.crm-sales-status-success { background: #eaf9f2; color: #12845b; }
.crm-sales-status-warn { background: #fff6e9; color: #b7770a; }
.crm-sales-status-danger { background: #fff0f1; color: #cf3759; }

.crm-sales-muted {
    color: #a0acbe;
    font-size: 12px;
    font-weight: 700;
}

.crm-sales-empty-state {
    display: grid;
    justify-items: center;
    gap: 12px;
    min-height: 240px;
    padding: 32px 20px !important;
    border: 1px dashed #d9e2f1;
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfcff 0%, #f7f9fd 100%);
    text-align: center;
}

.crm-sales-empty-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: #f1efff;
    color: #5c54e6;
}

.crm-sales-empty-icon svg {
    width: 28px;
    height: 28px;
}

.crm-sales-empty-state h4 {
    margin: 0;
    color: #162033;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 900;
}

.crm-sales-empty-state p {
    max-width: 640px;
    margin: 0;
    color: #7c879a;
    font-size: 14px;
    line-height: 1.9;
}

.crm-sales-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.crm-sales-empty-note {
    color: #94a0b4;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 1199.98px) {
    .crm-sales-search-form {
        grid-template-columns: 1fr;
    }

    .crm-search-actions {
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    .crm-sales-head {
        flex-direction: column;
        align-items: stretch !important;
    }

    .crm-section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-search-actions,
    .crm-sales-top-actions,
    .crm-sales-empty-actions {
        width: 100%;
    }

    .crm-search-actions .crm-btn,
    .crm-sales-top-actions .crm-btn,
    .crm-sales-empty-actions .crm-btn {
        flex: 1 1 0;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .crm-sales-page {
        gap: 16px;
    }

    .crm-sales-head-copy h2 {
        font-size: 25px;
    }

    .crm-section-head h3 {
        font-size: 20px;
    }

    .crm-sales-toolbar {
        gap: 8px;
    }

    .crm-sales-tool {
        width: 100%;
        justify-content: center;
    }

    .crm-search-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .crm-search-actions .crm-btn {
        width: 100%;
    }

    .crm-sales-stage-form {
        min-width: 0;
    }
}
