/* DesasegurosERP-style chrome — palette from Desaseguros desktop capture */

.desaseguros-shell {
    --desaseguros-toolbar: #c8dff0;
    --desaseguros-toolbar-end: #b5d4ea;
    --desaseguros-chrome: #e8e8e8;
    --desaseguros-chrome-edge: #a8a8a8;
    --desaseguros-header: #d0d0d0;
    --desaseguros-grid-dot: #808080;
    --desaseguros-selected-bg: #000;
    --desaseguros-selected-fg: #fff;

    display: flex;
    flex-direction: column;
    border: 1px solid var(--desaseguros-chrome-edge);
    background: var(--desaseguros-chrome);
    /* Llena el main bajo ribbon + breadcrumb (MainLayoutDesaseguros usa height:100%) */
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

/* Listado dentro de un tab de FormShell */
.desaseguros-shell-embedded {
    height: min(520px, 60vh);
    max-height: min(520px, 60vh);
    border: 1px solid #c5d4e0;
}

.desaseguros-shell-title,
.desaseguros-chrome-toolbar,
.desaseguros-search-bar,
.desaseguros-status-bar {
    flex-shrink: 0;
}

.desaseguros-shell-title {
    display: flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    background: #f0f0f0;
    border-bottom: 1px solid var(--desaseguros-chrome-edge);
    min-height: 1.85rem;
}

.desaseguros-shell-title h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #000;
}

/* Celeste Desaseguros toolbar */
.desaseguros-chrome-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.28rem 0.4rem;
    background: linear-gradient(180deg, #d9ebf7 0%, #c5dcef 45%, #b8d4ea 100%);
    border-bottom: 1px solid #8bb3cc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.desaseguros-chrome-group {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

.desaseguros-chrome-sep {
    width: 1px;
    height: var(--desaseguros-icon-btn-size, 24px);
    background: #8bb3cc;
    margin: 0 0.3rem;
    box-shadow: 1px 0 0 rgba(255, 255, 255, 0.5);
}

.desaseguros-search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    background: #f0f0f0;
    border-bottom: 1px solid #c0c0c0;
}

.desaseguros-search-bar .form-control,
.desaseguros-search-bar .form-select {
    border-radius: 0;
    border-color: #808080;
    font-size: 0.8rem;
}

.desaseguros-search-bar .desaseguros-page-size {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    white-space: nowrap;
    color: #222;
}

.desaseguros-search-bar .desaseguros-page-size select {
    width: auto;
    min-width: 4rem;
}

.desaseguros-search-bar .desaseguros-search-input {
    flex: 1;
    min-width: 12rem;
    max-width: 28rem;
}

.desaseguros-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #fff;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.desaseguros-body .listado-shell-grid.desaseguros-grid {
    --listado-table-min-width: 800px;
    flex: 1 1 auto;
    min-height: 0 !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* anula estilos del .quickgrid-container clásico */
    background: #fff !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    max-width: 100%;
    width: 100%;
}

.desaseguros-shell .desaseguros-grid > .quickgrid,
.desaseguros-shell .desaseguros-grid > .quickgrid-table {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.desaseguros-shell .quickgrid-table {
    font-size: 0.8rem;
    color: #000;
}

.desaseguros-shell .quickgrid[theme=default] > .grid {
    border: none;
    background: #fff;
}

/* Gray headers + dotted cell borders (Desaseguros grid) */
.desaseguros-shell .quickgrid[theme=default] .col-header-content {
    background: var(--desaseguros-header) !important;
    border-bottom: 1px solid #808080 !important;
    border-right: 1px dotted var(--desaseguros-grid-dot) !important;
    font-weight: 600;
    color: #000;
    padding: 0.28rem 0.4rem;
}

.desaseguros-shell .quickgrid[theme=default] > .grid > thead {
    background: var(--desaseguros-header);
}

.desaseguros-shell .quickgrid[theme=default] > .grid > tbody > tr > td {
    background: #fff;
    border-right: 1px dotted var(--desaseguros-grid-dot) !important;
    border-bottom: 1px dotted var(--desaseguros-grid-dot) !important;
    padding: 0.12rem 0.35rem;
}

.desaseguros-shell .quickgrid[theme=default] > .grid > tbody > tr:hover > td {
    background: #f5f5f5;
}

.desaseguros-row-cell {
    cursor: default;
    display: block;
    min-height: 1.15rem;
}

.desaseguros-shell .desaseguros-row-cell.desaseguros-row-selected {
    margin: -0.12rem -0.35rem;
    padding: 0.12rem 0.35rem;
    background: var(--desaseguros-selected-bg) !important;
    color: var(--desaseguros-selected-fg) !important;
}

.desaseguros-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.18rem 0.5rem;
    background: #e8e8e8;
    border-top: 1px solid var(--desaseguros-chrome-edge);
    font-size: 0.75rem;
    color: #222;
    min-height: 1.55rem;
}

.desaseguros-status-bar .desaseguros-status-hint {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desaseguros-status-bar .desaseguros-status-count {
    flex-shrink: 0;
    border-left: 1px solid #b0b0b0;
    padding-left: 0.5rem;
}

.desaseguros-shell .quickgrid-paginator {
    flex-shrink: 0;
    margin-top: auto;
    padding: 0.25rem 0.5rem;
    background: #f0f0f0;
    border-top: 1px solid #c0c0c0;
}

.desaseguros-shell .alert {
    margin: 0.5rem;
    border-radius: 0;
    font-size: 0.85rem;
}
