/* ============================================================
   TRATAMIENTOS LISTING — Estilos
   ============================================================ */

:root {
    --tl-accent:         #1E1B58;
    --tl-border:         #D2DAF3;
    --tl-bg-row:         #EEF3FF;
    --tl-bg-row-hover:   #BED2FF;
    --tl-radius:         8px;
    --tl-font-size:      16px;
    --tl-row-height:     45px;
    --tl-tag-bg:         #DDE8FF;
    --tl-tag-color:      #1E1B58;
    --tl-divider:        #E2E8F0;
    --tl-btn-bck:         #3E66FF;
}

.tl-wrap {
    max-width: 1400px;
    margin: 0 auto;
    font-size: var(--tl-font-size);
    font-family: inherit;
    color: inherit;
}

.tl-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 0;
}

.tl-filter-group  { position: relative; flex: 1 1 160px; }
.tl-search-group  { flex: 1 1 200px; }

.tl-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #9AA5B4;
    display: flex;
    align-items: center;
    pointer-events: none;
}
.tl-icon-search { left: 12px; }
.tl-icon-filter { left: 12px; }

.tl-filters input[type="search"],
.tl-filters select {
    width: 100%;
    height: var(--tl-row-height);
    padding: 0 14px;
    border: 1px solid var(--tl-border);
    border-radius: var(--tl-radius);
    background: #fff;
    font-size: var(--tl-font-size);
    font-family: inherit;
    color: inherit;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
        padding-right: 36px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.tl-filters input[type="search"]          { padding-left: 36px; }
.tl-filters input[type="search"]::-webkit-search-cancel-button { display: none; }
.tl-filter-parent-group select            { padding-left: 36px; }

.tl-filter-group::after {
    content: '';
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #9AA5B4;
    pointer-events: none;
}
.tl-search-group::after { display: none; }

.tl-filters input:focus,
.tl-filters select:focus {
    border-color: var(--tl-accent);
    box-shadow: 0 0 0 3px rgba(58,74,155,.1);
}

.tl-btn-primary {
    height: var(--tl-row-height);
    padding: 0 24px;
    background: var(--tl-btn-bck)!important;
    color: #fff;
    border: 2px solid var(--tl-btn-bck)!important;
    border-radius: var(--tl-radius);
    font-size: var(--tl-font-size);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .2s, color .2s, border-color .2s;
}



.tl-btn-primary:focus {
    color: var(--e-global-color-f29012e)!important;
}
.tl-btn-primary:hover {
    background: transparent!important;
    color: var(--tl-btn-bck)!important;
    border-color: var(--tl-btn-bck)!important;
}

.tl-divider {
    border: none;
    border-top: 1px solid var(--tl-divider);
    margin: 32px 0!important;
}

.tl-list {
    list-style: none;
    margin: 0; 
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tl-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--tl-row-height);
    padding: 8px 16px;
    background: var(--tl-bg-row);
    border-radius: var(--tl-radius);
    border: 1px solid transparent;
    transition: background .15s, border-color .15s;
}
.tl-item:hover {
    background: var(--tl-bg-row-hover);
    border-color: var(--tl-border);
}

.tl-item__link {
    font-size: var(--tl-font-size);
    font-weight: 500;
    color: inherit;
    text-decoration: none;
    flex: 1;
    line-height: 1.35;
}
.tl-item__link:hover { color: var(--tl-accent); }

.tl-item__tag {
    font-size: 11px;
    color: var(--tl-tag-color);
    background: var(--tl-tag-bg);
    border-radius: 4px;
    padding: 3px 9px;
    white-space: nowrap;
    margin-left: 12px;
    flex-shrink: 0;
}

.tl-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.tl-page-btn {
    min-width: 34px;
    height: 32px!important;
    padding: 0 10px!important;
    border: none;
    color: #667389!important;
    border-radius: 100px!important;
    background: #fff!important;
    border: none!important;
    font-size: 16px!important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s, color .15s;
}
.tl-page-btn:hover         { background: var(--tl-bg-row); }
.tl-page--active {
    background: #FAFBFC!important;
    border-color: var(--tl-accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0px 4px 3px 0px #00000024 !important;
}
.tl-page--active:hover     { background: var(--tl-accent); }
.tl-page-arrow             { color: #6B7280; }
.tl-page-btn--disabled     { opacity: .4; cursor: default; pointer-events: none; }

.tl-empty   { color: #9AA5B4; font-size: var(--tl-font-size); padding: 24px 0; text-align: center; }
.tl-loading { opacity: .5; pointer-events: none; transition: opacity .2s; }

@media (max-width: 600px) {
    .tl-filters      { flex-direction: column; align-items: stretch; }
    .tl-filter-group,
    .tl-search-group { flex: 1 1 100%; }
    .tl-btn-primary  { width: 100%; }
    .tl-pagination   { justify-content: center; }
}