/* Contabilidad — lista facturas estilo Odoo */
.account-module-shell .sfe-module-shell__toolbar.account-odo-toolbar,
.account-odo-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding: 0 0 8px;
    border-bottom: 0;
}

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

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

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

.account-module-shell .data-table {
    font-size: .875rem;
}

.account-module-shell .data-table th,
.account-module-shell .data-table td {
    padding: 6px 10px;
}

.account-module-shell .data-table td:nth-child(n+5) {
    text-align: right;
}

.account-module-shell .data-table th:nth-child(n+5) {
    text-align: right;
}

.account-module-shell .list-view-table-wrap {
    border-radius: 8px;
}

.account-module-shell .list-view-wrap {
    position: relative;
}

.account-odo-due--today {
    color: #b45309;
    font-weight: 650;
}

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

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

.account-module-shell .list-view-table-wrap.is-empty {
    opacity: .22;
    filter: saturate(.7);
    min-height: 320px;
    pointer-events: none;
}

.account-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: color-mix(in srgb, var(--sfe-primary, #007BFF) 14%, white);
    color: var(--sfe-primary, #007BFF);
}

.account-module-shell .sfe-empty-state__title {
    color: var(--sfe-navy, #1e2b3c);
    font-size: 1.15rem;
    font-weight: 700;
}

.account-module-shell .sfe-empty-state__hint {
    color: var(--gray-500, #6b7280);
    font-size: .9rem;
}

/* Barra selección Odoo (compartida con ventas) */
.account-module-shell .sfe-odo-selection-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--sfe-primary, #007BFF) 35%, white);
    border-radius: 8px;
    background: color-mix(in srgb, var(--sfe-primary, #007BFF) 8%, white);
}

.account-module-shell .sfe-odo-selection-bar__clear {
    border: 0;
    background: transparent;
    color: var(--gray-600, #4b5563);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.account-module-shell .sfe-odo-selection-bar__primary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.account-module-shell .sfe-odo-selection-bar__primary .btn-primary {
    background: var(--sfe-primary, #007BFF);
    border-color: var(--sfe-primary, #007BFF);
}

.account-module-shell .has-odo-selection .table-responsive {
    border-radius: 8px;
}

/* —— Control panel Odoo (1 fila L→R) —— */
.accountant-module-shell .sfe-collection-chrome--cp,
.accountant-module-shell .sfe-collection-chrome {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.accountant-module-shell .sfe-collection-chrome__cp-row {
    display: grid;
    grid-template-columns:
        auto
        auto
        auto
        minmax(140px, 1fr)
        auto;
    align-items: center;
    gap: 10px 12px;
    width: 100%;
    min-height: 40px;
}

.accountant-module-shell .sfe-cp__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.accountant-module-shell .sfe-cp__actions .btn {
    min-height: 32px;
    padding: 0 14px;
    font-size: .875rem;
}

.accountant-module-shell .sfe-cp__actions .btn-primary {
    background: var(--sfe-primary, #007BFF);
    border-color: var(--sfe-primary, #007BFF);
}

.accountant-module-shell .sfe-cp__title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
}

.accountant-module-shell .sfe-cp__title-text {
    margin: 0;
    color: var(--sfe-navy, #1e2b3c);
    font-size: 1.05rem;
    font-weight: 650;
    line-height: 1.2;
}

.accountant-module-shell .sfe-cp__gear .o_cp_gear_btn,
.accountant-module-shell .sfe-cp__gear .sfe-collection-view-gear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--gray-600, #4b5563);
    cursor: pointer;
}

.accountant-module-shell .sfe-cp__gear .o_cp_gear_btn:hover,
.accountant-module-shell .sfe-cp__gear .sfe-collection-view-gear-btn:hover {
    background: var(--gray-100, #f3f4f6);
    color: var(--sfe-navy, #1e2b3c);
}

.accountant-module-shell .sfe-cp__views {
    flex: 0 0 auto;
}

.accountant-module-shell .sfe-cp-view-switcher,
.accountant-module-shell .sfe-collection-chrome--cp .kanban-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 6px;
    background: #fff;
}

.accountant-module-shell .sfe-cp-view-switch,
.accountant-module-shell .sfe-collection-chrome--cp .kanban-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 4px;
    color: var(--gray-600, #4b5563);
    text-decoration: none;
}

.accountant-module-shell .sfe-cp-view-switch .icon,
.accountant-module-shell .sfe-collection-chrome--cp .kanban-switch .icon {
    width: 16px;
    height: 16px;
}

.accountant-module-shell .sfe-cp-view-switch.is-active,
.accountant-module-shell .sfe-collection-chrome--cp .kanban-switch.is-active {
    background: color-mix(in srgb, var(--sfe-primary, #007BFF) 14%, white);
    color: var(--sfe-primary, #007BFF);
}

.accountant-module-shell .sfe-cp__search {
    min-width: 0;
    width: 100%;
}

.accountant-module-shell .sfe-cp__search .sfe-collection-chrome__row--search,
.accountant-module-shell .sfe-cp__search .web-list-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
}

.accountant-module-shell .sfe-cp__search .web-list-search-bar,
.accountant-module-shell .sfe-cp__search .o_apps_search.web-list-search-bar {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.accountant-module-shell .sfe-cp__pager {
    flex: 0 0 auto;
    justify-self: end;
}

.accountant-module-shell .sfe-cp-pager,
.accountant-module-shell .o_apps_pager.sfe-cp-pager {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: var(--gray-600, #4b5563);
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
}

.accountant-module-shell .o_apps_pager_nav {
    display: inline-flex;
    gap: 2px;
}

.accountant-module-shell .o_apps_pager_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 4px;
    background: #fff;
    color: var(--gray-600, #4b5563);
}

.accountant-module-shell .o_apps_pager_btn:disabled {
    opacity: .45;
    cursor: default;
}

/* Con CP Odoo: ocultar toolbar shell duplicado si quedara */
.accountant-module-shell:has([data-sfe-cp-row]) > .sfe-module-shell__body > .sfe-module-shell__toolbar.accountant-odo-toolbar,
.accountant-module-shell:has([data-sfe-cp-row]) .sfe-module-shell__body > .accountant-odo-toolbar {
    display: none !important;
}

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

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

/* Chips de estado: ocultos en listas CP Compras (RFQ=KPI; PO/contratos/proveedores=engrane). */
.accountant-module-shell .sfe-collection-chrome__row--filters,
.accountant-module-shell[data-purchase-active-nav="rfq"] .sfe-collection-chrome__row--filters,
.accountant-module-shell[data-purchase-active-nav="orders"] .sfe-collection-chrome__row--filters,
.accountant-module-shell[data-purchase-active-nav="contracts"] .sfe-collection-chrome__row--filters,
.accountant-module-shell[data-purchase-active-nav="vendors"] .sfe-collection-chrome__row--filters,
.accountant-module-shell .web-list-search-chips:empty,
.accountant-module-shell .sfe-collection-chrome--cp .sfe-collection-chrome__row--filters {
    display: none !important;
}

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

.accountant-module-shell .sfe-collection-chrome__row--actions .sfe-search-panel-toggle,
.accountant-module-shell .sfe-collection-chrome__row--actions .web-list-search-drawer {
    display: none;
}

@media (max-width: 1100px) {
    .accountant-module-shell .sfe-collection-chrome__cp-row {
        grid-template-columns: auto auto 1fr auto;
        grid-template-areas:
            "actions title pager pager"
            "views search search search";
    }

    .accountant-module-shell .sfe-cp__actions { grid-area: actions; }
    .accountant-module-shell .sfe-cp__title { grid-area: title; }
    .accountant-module-shell .sfe-cp__views { grid-area: views; }
    .accountant-module-shell .sfe-cp__search { grid-area: search; }
    .accountant-module-shell .sfe-cp__pager { grid-area: pager; }
}



.accountant-module-shell .sfe-cp__fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--gray-400, #9ca3af);
  cursor: pointer;
}
.accountant-module-shell .sfe-cp__fav:hover,
.accountant-module-shell .sfe-cp__fav[aria-pressed="true"] {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}
.accountant-module-shell .sfe-cp__fav .icon {
  width: 16px;
  height: 16px;
}
.accountant-module-shell .account-odo-board {
  margin-top: 8px;
}
