/* CRM SaaS v6.84.0 — global layout rhythm
 * Keep visual sections, cards, fields and actions from collapsing into each other.
 * This layer is loaded last so route-specific styles keep their look without
 * removing the minimum spacing contract.
 */
:root {
    --crm-section-gap: 20px;
    --crm-component-gap: 16px;
    --crm-control-gap: 12px;
}

.crm-market-ui .crm-page-shell {
    display: grid;
    gap: var(--crm-section-gap);
}

.crm-market-ui .crm-page-shell > * {
    margin-block: 0 !important;
}

.crm-market-ui .crm-page-shell > .row,
.crm-market-ui .crm-page-shell > form,
.crm-market-ui .crm-page-shell > .crm-panel,
.crm-market-ui .crm-page-shell > .card {
    min-width: 0;
}

.crm-market-ui .crm-page-shell > .row {
    row-gap: var(--crm-section-gap) !important;
}

.crm-market-ui .crm-page-head,
.crm-market-ui .crm-page-header,
.crm-market-ui .page-header,
.crm-market-ui .crm-section-head {
    margin-bottom: var(--crm-component-gap) !important;
}

.crm-market-ui .crm-panel > * + *,
.crm-market-ui .card > * + *,
.crm-market-ui .market-card > * + * {
    margin-top: var(--crm-component-gap);
}

.crm-market-ui .crm-panel > .crm-page-head + *,
.crm-market-ui .crm-panel > .crm-page-header + *,
.crm-market-ui .crm-panel > .page-header + *,
.crm-market-ui .crm-panel > form + *,
.crm-market-ui .crm-panel > .crm-form-grid + *,
.crm-market-ui .crm-panel > .table-responsive + *,
.crm-market-ui .crm-panel > .crm-responsive-table + * {
    margin-top: var(--crm-section-gap);
}

.crm-market-ui .crm-panel > .crm-panel + .crm-panel,
.crm-market-ui .card > .card + .card,
.crm-market-ui .market-card > .market-card + .market-card {
    margin-top: var(--crm-section-gap);
}

.crm-market-ui .crm-form-grid,
.crm-market-ui form.form-grid,
.crm-market-ui .crm-grid,
.crm-market-ui .crm-layout-grid,
.crm-market-ui .crm-info-grid,
.crm-market-ui .crm-profile-stat-grid,
.crm-market-ui .crm-backup-stats,
.crm-market-ui .crm-security-checks,
.crm-market-ui .market-kpi-grid,
.crm-market-ui .market-kpi-grid-pro,
.crm-market-ui .market-dashboard-grid,
.crm-market-ui .market-dashboard-main-grid,
.crm-market-ui .market-dashboard-pro,
.crm-market-ui .ic-connection-grid,
.crm-market-ui .ic-catalog-grid,
.crm-market-ui .ic-two-col {
    gap: var(--crm-component-gap) !important;
}

.crm-market-ui .row.g-2,
.crm-market-ui .row.g-3,
.crm-market-ui .row.g-4,
.crm-market-ui .row.g-5 {
    row-gap: var(--crm-section-gap) !important;
}

.crm-market-ui .crm-form-action,
.crm-market-ui .crm-actions,
.crm-market-ui .crm-hero-actions,
.crm-market-ui .market-hero-actions-pro,
.crm-market-ui .crm-inline-actions,
.crm-market-ui .ic-form-actions,
.crm-market-ui .ic-list-row__actions {
    gap: var(--crm-control-gap) !important;
}

.crm-market-ui .crm-panel > form > * + *,
.crm-market-ui .card > form > * + * {
    margin-top: var(--crm-control-gap);
}

.crm-market-ui .crm-panel > form > .crm-form-grid + .crm-actions,
.crm-market-ui .crm-panel > form > .crm-form-grid + .crm-form-action,
.crm-market-ui .card > form > .crm-form-grid + .crm-actions,
.crm-market-ui .card > form > .crm-form-grid + .crm-form-action {
    margin-top: var(--crm-component-gap);
}

.crm-market-ui .crm-form-grid > div,
.crm-market-ui form.form-grid > div {
    min-width: 0;
}

@media (max-width: 767.98px) {
    :root {
        --crm-section-gap: 16px;
        --crm-component-gap: 13px;
        --crm-control-gap: 10px;
    }
}
