/* CRM Flujo — SFE colors, full-width, Odoo layout */
.crm-module-shell,
.crm-module-shell .sfe-module-shell__body,
.crm-module-shell .kanban-view {
    width: 100%;
    max-width: none;
}

.crm-module-shell .sfe-module-shell__toolbar.crm-odo-toolbar,
.crm-odo-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding: 0 0 8px;
    border-bottom: 0;
}

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

.crm-odo-toolbar .btn-primary,
.crm-odo-toolbar .crm-odo-nuevo {
    background: var(--sfe-primary, #007BFF);
    border-color: var(--sfe-primary, #007BFF);
    color: #fff;
    min-height: 32px;
    padding: 0 14px;
    font-size: .875rem;
    box-shadow: var(--sfe-shadow-primary, none);
}

.crm-odo-toolbar .btn-primary:hover,
.crm-odo-toolbar .crm-odo-nuevo:hover {
    background: var(--sfe-primary-dark, #0056CC);
    border-color: var(--sfe-primary-dark, #0056CC);
    filter: none;
}

.crm-odo-toolbar .sfe-module-shell__toolbar-title {
    margin: 0 0 0 6px;
    color: var(--sfe-navy, #1e2b3c);
    font-size: 1.05rem;
    font-weight: 650;
}

.crm-odo-generate {
    position: relative;
}

.crm-odo-generate__btn {
    min-height: 32px;
    padding: 0 12px;
    font-size: .875rem;
}

.crm-odo-generate__caret {
    margin-left: 4px;
    opacity: .7;
}

.crm-odo-generate__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    min-width: min(560px, 92vw);
    padding: 10px;
    border: 1px solid var(--sfe-border, #e2e8f0);
    border-radius: var(--sfe-radius, 10px);
    background: var(--sfe-surface, #fff);
    box-shadow: var(--sfe-shadow-menu, 0 12px 32px rgba(30, 43, 60, .12));
}

.crm-odo-generate__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
}

.crm-odo-generate__col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.crm-odo-generate__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.crm-odo-generate__item:hover {
    background: var(--sfe-primary-light, #E8F4FF);
}

.crm-odo-generate__item strong {
    color: var(--sfe-navy, #1e2b3c);
    font-size: .9rem;
    font-weight: 650;
}

.crm-odo-generate__item span {
    color: var(--sfe-text-muted, #475569);
    font-size: .78rem;
    line-height: 1.3;
}

.crm-odo-generate__post {
    margin: 0;
}

/* Kanban full width */
.crm-module-shell .kanban-board,
.crm-module-shell .kanban-view .kanban-board {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: none;
    padding-top: 4px;
    overflow-x: auto;
}

.crm-module-shell .kanban-column {
    flex: 1 1 240px;
    min-width: 220px;
    max-width: none;
    padding: 8px;
    border-radius: 8px;
    background: var(--sfe-surface-muted, #f8fafc);
    border: 1px solid var(--sfe-border, #e2e8f0);
}

.crm-module-shell .kanban-column-header {
    min-height: 28px;
    margin-bottom: 6px;
    padding: 4px 6px;
}

.crm-module-shell .kanban-column-header h3 {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--sfe-navy, #1e2b3c);
}

.crm-module-shell .kanban-card {
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: none;
    background: #fff;
    border: 1px solid var(--sfe-border, #e2e8f0);
}

.crm-module-shell .kanban-card + .kanban-card {
    margin-top: 6px;
}

/* Empty state: no bloquear quick-create */
.crm-module-shell .kanban-view {
    position: relative;
}

.crm-module-shell .kanban-empty-banner {
    position: absolute;
    inset: 48px 12px 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    pointer-events: none;
}

.crm-module-shell .kanban-empty-banner .sfe-empty-state,
.crm-module-shell .kanban-empty-banner .sfe-doc-empty {
    pointer-events: auto;
    max-width: 420px;
    padding: 28px 24px;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.crm-module-shell .kanban-board.is-empty {
    opacity: .35;
    filter: saturate(.75);
    min-height: 320px;
}

.crm-module-shell .kanban-board.is-empty .kanban-quick-create,
.crm-module-shell .kanban-board.is-quick-creating .kanban-quick-create,
.crm-module-shell .kanban-column.is-qc-open .kanban-quick-create {
    pointer-events: auto;
    opacity: 1;
    filter: none;
}

.crm-module-shell .kanban-board.is-quick-creating {
    opacity: 1;
    filter: none;
}

.crm-module-shell .sfe-empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--sfe-empty-icon-bg, var(--sfe-primary-light));
    color: var(--sfe-primary, #007BFF);
}

/* Quick-create card (Odoo-like) */
.crm-module-shell .kanban-quick-create-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--sfe-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--sfe-shadow-card, 0 1px 2px rgba(30,43,60,.06));
}

.crm-module-shell .kanban-quick-create-form .form-control {
    min-height: 32px;
    font-size: .85rem;
}

.crm-module-shell .kanban-qc-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.crm-module-shell .kanban-qc-actions .btn-primary {
    background: var(--sfe-primary, #007BFF);
    border-color: var(--sfe-primary, #007BFF);
}

.crm-module-shell .kanban-qc-trigger {
    color: var(--sfe-primary, #007BFF);
    font-weight: 600;
}

@media (max-width: 700px) {
    .crm-odo-generate__cols {
        grid-template-columns: 1fr;
    }
}

/* ===== CRM denser 20260826 ===== */
.content-area:has(.crm-module-shell) {
    padding: 8px 12px 16px !important;
}

.crm-module-shell > .discuss-module-nav,
.crm-module-shell > [class*="-module-nav"] {
    padding: 4px 8px !important;
    gap: 2px !important;
}

.crm-module-shell > .discuss-module-nav .discuss-module-nav-item,
.crm-module-shell > [class*="-module-nav"] .discuss-module-nav-item {
    padding: 4px 10px !important;
    font-size: 12px !important;
    min-height: 28px !important;
}

.crm-module-shell > .discuss-module-nav .o_cp_gear_btn,
.crm-module-shell > [class*="-module-nav"] .o_cp_gear_btn {
    width: 28px !important;
    height: 28px !important;
}

.crm-module-shell .sfe-module-shell__toolbar.crm-odo-toolbar,
.crm-module-shell .crm-odo-toolbar {
    gap: 8px !important;
    margin-bottom: 4px !important;
    padding: 0 0 4px !important;
}

.crm-module-shell .crm-odo-toolbar .btn-primary,
.crm-module-shell .crm-odo-toolbar .crm-odo-nuevo,
.crm-module-shell .crm-odo-generate__btn {
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
}

.crm-module-shell .crm-odo-toolbar .sfe-module-shell__toolbar-title {
    margin-left: 4px !important;
    font-size: 0.95rem !important;
}

/* Collection chrome: less air between search / filters / views */
.o_web_client .crm-module-shell .sfe-collection-chrome {
    gap: 4px !important;
    margin: 0 0 6px !important;
}

.o_web_client .crm-module-shell .web-list-search,
.o_web_client .crm-module-shell .web-list-search[data-list-search] {
    gap: 4px !important;
    padding-bottom: 4px !important;
    margin: 0 !important;
}

.o_web_client .crm-module-shell .web-list-search-toolbar {
    gap: 4px !important;
}

.o_web_client .crm-module-shell .web-list-search-chips {
    gap: 4px !important;
}

.o_web_client .crm-module-shell .web-list-search-chip,
.crm-module-shell .web-list-search-chip {
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 7px !important;
    font-size: 11.5px !important;
}

.o_web_client .crm-module-shell .o_apps_search_input,
.o_web_client .crm-module-shell .web-list-search input,
.crm-module-shell .web-list-search .o_apps_search_input {
    min-height: 28px !important;
    height: 28px !important;
    padding: 3px 8px !important;
    font-size: 12.5px !important;
}

.o_web_client .crm-module-shell .web-list-search-toolbar-end .btn,
.o_web_client .crm-module-shell .web-list-search-actions .btn,
.o_web_client .crm-module-shell .web-list-search-drawer-toggle {
    min-height: 26px !important;
    padding: 0 8px !important;
    font-size: 11.5px !important;
}

.o_web_client .crm-module-shell .sfe-collection-chrome__row--views,
.o_web_client .crm-module-shell .sfe-collection-chrome__row--filters,
.o_web_client .crm-module-shell .sfe-collection-chrome__row--actions {
    padding: 2px 6px !important;
}

.o_web_client .crm-module-shell .sfe-collection-chrome__row--views .kanban-switch {
    min-height: 24px !important;
    padding: 0 0.45rem !important;
    font-size: 0.72rem !important;
}

/* Equipo: no heredar filter-band gordo */
.crm-module-shell .crm-team-toolbar,
.o_web_client .crm-module-shell .crm-team-toolbar,
.o_web_client .crm-module-shell .sfe-collection-chrome__row--views .crm-team-toolbar {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 2px 0 !important;
    min-height: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
}

.crm-module-shell .crm-team-filter,
.o_web_client .crm-module-shell .crm-team-filter,
.crm-module-shell form.crm-team-filter {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    max-width: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.crm-module-shell .crm-team-filter label,
.o_web_client .crm-module-shell .crm-team-filter label {
    display: inline !important;
    flex-direction: row !important;
    gap: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--sfe-text-muted, #64748b) !important;
}

.crm-module-shell .crm-team-filter .form-control,
.crm-module-shell .crm-team-filter select,
.o_web_client .crm-module-shell .crm-team-filter select {
    min-width: 140px !important;
    max-width: 220px !important;
    width: auto !important;
    min-height: 28px !important;
    height: 28px !important;
    padding: 2px 8px !important;
    font-size: 12.5px !important;
}

/* Lista denser */
.crm-module-shell .data-table th,
.crm-module-shell .data-table td,
.crm-module-shell .list-view table th,
.crm-module-shell .list-view table td {
    padding: 5px 8px !important;
    font-size: 12.5px !important;
}

.crm-module-shell .sfe-empty-state__icon {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 8px !important;
}

.crm-module-shell .kanban-empty-banner .sfe-empty-state,
.crm-module-shell .list-empty-banner .sfe-empty-state,
.crm-module-shell .sfe-empty-state,
.crm-module-shell .sfe-doc-empty {
    padding: 16px 12px !important;
}

.crm-module-shell .sfe-empty-state__title {
    font-size: 1rem !important;
}

.crm-module-shell .sfe-empty-state__hint {
    font-size: 0.82rem !important;
}

.crm-module-shell .sfe-module-shell__body {
    padding-top: 4px !important;
}


/* ===== CRM purchase-parity chrome ===== */
.crm-module-shell .sfe-collection-chrome {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.crm-module-shell .sfe-collection-chrome__row--search,
.crm-module-shell .web-list-search .sfe-collection-chrome__row--search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.crm-module-shell .web-list-search-bar,
.crm-module-shell .o_apps_search.web-list-search-bar {
    flex: 1 1 auto;
    min-width: 0;
}

.crm-module-shell .sfe-collection-chrome__row--filters {
    margin: 0;
}

.crm-module-shell .web-list-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.crm-module-shell .web-list-search-chip {
    min-height: 28px;
    padding: 2px 12px;
    font-size: .8rem;
}

.crm-module-shell .sfe-collection-chrome__row--actions:empty,
.crm-module-shell .web-list-search-toolbar-end:empty {
    display: none;
}

.crm-module-shell .sfe-collection-chrome__row--views {
    margin: 0;
}

.crm-module-shell .kanban-toolbar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    width: 100%;
}

.crm-module-shell .kanban-view-switch {
    flex: 0 0 auto;
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gray-200, #e5e7eb) 70%, white);
}

.crm-module-shell .kanban-view-switch .kanban-switch {
    min-height: 28px;
    padding: 2px 12px;
    font-size: .8rem;
    border-radius: 999px;
}

.crm-module-shell .crm-team-filter--inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.crm-module-shell .crm-team-filter--inline label {
    margin: 0;
    font-size: .8rem;
    font-weight: 600;
    color: var(--gray-600, #4b5563);
}

.crm-module-shell .crm-team-filter--inline select {
    min-width: 120px;
    max-width: 180px;
    min-height: 28px;
    height: 28px;
    font-size: .8rem;
}

.crm-module-shell .kanban-toolbar__actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.crm-module-shell .sfe-doc-list-chrome:empty {
    display: none;
}

.crm-module-shell .sfe-split-toggle,
.crm-module-shell [data-sfe-save-view],
.crm-module-shell [data-sfe-last-view],
.crm-module-shell .sfe-collection-search-lite {
    display: none !important;
}

.crm-module-shell .sfe-odo-selection-bar {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    width: 100%;
    margin: 0 0 10px;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--sfe-primary, #007BFF) 22%, #e5e7eb);
    border-radius: 8px;
    background: color-mix(in srgb, var(--sfe-primary, #007BFF) 6%, #fff);
}

.crm-module-shell .sfe-odo-selection-bar:not([hidden]) {
    display: flex;
}

.crm-module-shell .sfe-doc-list-view.has-odo-selection .crm-odo-toolbar {
    opacity: .45;
    pointer-events: none;
}
