/* ═══════════ PANEL DE BÚSQUEDA CON FILTROS ═══════════ */

.sf-wrap {
    background: #fff;
}

.sf-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    padding: 24px 28px;
    margin: -6px auto 0;
    /* el margen negativo hace que "flote" sobre un banner superior si lo tienes */
    position: relative;
}

.sf-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.sf-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #EAF3EC;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1F4A33;
    font-size: 18px;
}

.sf-title {
    font-size: 16px;
    font-weight: 600;
    color: #1F4A33;
    margin: 0 0 4px;
}

.sf-subtitle {
    font-size: 12.5px;
    color: #777;
    margin: 0;
}

.sf-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.sf-field label {
    display: block;
    font-size: 12px;
    font-weight: 900;
    color: #333;
    margin-bottom: 6px;
}

.sf-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 12.5px;
    color: #555;
    box-sizing: border-box;
}

.sf-input::placeholder {
    color: #aaa;
}

.sf-select {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 12.5px;
    color: #888;
    background: #fff;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0 L5 6 L10 0 Z' fill='%23999'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.sf-search-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 9px 12px;
    gap: 5px;
}

.sf-search-input i {
    color: #ddd;
}

.sf-search-input span {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 13px;
}

.sf-search-input input {
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
}

.sf-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.sf-order {
    max-width: 220px;
    width: 220px;
}

.sf-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.sf-clear {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1F4A33;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.sf-clear:hover {
    text-decoration: underline;
}

.sf-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1F4A33;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}

.sf-btn:hover {
    background: #17392A;
}


/* ═══════════ TABLA DE RESULTADOS CON PAGINADOR ═══════════ */

.rt-wrap {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
}

.container-tabla {
    margin: 0px 24px;
    border: 1px solid #eee;
    border-radius: 8px;
    max-width: 100%;
    overflow: auto;
}

/* ── Encabezado ── */
.rt-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.rt-head-left {
    display: flex;
    gap: 14px;
    align-items: center;
}

.rt-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #EAF3EC;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1F4A33;
    font-size: 18px;
    flex: 0 0 44px;
}

.rt-title {
    font-size: 14px;
    font-weight: 800;
    color: #1F4A33;
    margin: 0 0 3px;
}

.rt-sub {
    font-size: 12.5px;
    color: #777;
    margin: 0;
}

.rt-sub b {
    color: #1F4A33;
}

.rt-download {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f7f5;
    color: #1F4A33;
    border: 1px solid #1F4A33;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.rt-download:hover {
    background: #17392A;
    color: white;
}

/* ── Tabla ── */
.rt-table {
    width: 100%;
    border-collapse: collapse;
}

.rt-table thead th {
    text-align: left;
    font-size: 14px;
    color: #1F4A33;
    padding: 0px 24px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.rt-table tbody td {
    padding: 14px 24px;
    font-size: 12.5px;
    color: #444;
    border-bottom: 1px solid #f2f2f2;
    vertical-align: middle;
}

.rt-table tbody td a {
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rt-row-icon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rt-row-icon .box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #EAF3EC;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1F4A33;
    font-size: 16px;
    flex: 0 0 36px;
}

.rt-name {
    font-weight: 700;
    color: #1c1c1c;
    display: block;
    font-size: 13px;
}

.rt-nit {
    color: #999;
    font-size: 11.5px;
}

.rt-link {
    color: #1F4A33;
    text-decoration: none;
    font-weight: 600;
}

.rt-link:hover {
    text-decoration: underline;
}

.rt-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}



/* ── Pie / paginador ── */
.rt-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.rt-pager {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rt-pager button {
    border: none;
    background: none;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    font-size: 12.5px;
    color: #555;
    cursor: pointer;
}

.rt-pager button:hover:not(.active):not(:disabled) {
    background: #f2f2f2;
}

.rt-pager button.active {
    background: #1F4A33;
    color: #fff;
    font-weight: 700;
}

.rt-pager button:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.rt-pager .dots {
    color: #999;
    padding: 0 4px;
    font-size: 12.5px;
}

.rt-container-count {
    display: flex;
    align-items: center;
    gap: 30px;
}

.rt-count {
    font-size: 12.5px;
    color: #555;
}

.rt-perpage {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12.5px;
    color: #555;
}

/* ── Info final ── */
.rt-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #ededed;
    padding: 16px 24px;
    font-size: 12.5px;
    color: #333;
    line-height: 1.5;
    margin: 15px 24px;
    border-radius: 10px;
}

.rt-info .dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1F4A33;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex: 0 0 22px;
}

.rt-info a {
    color: #1F4A33;
    font-weight: 700;
    text-decoration: none;
}

.rt-info a:hover {
    text-decoration: underline;
}



/* ═══════════ MODAL: FICHA DE ENTIDAD ═══════════ */

.md-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, Helvetica, sans-serif;
    z-index: 1000;
    padding: 16px;
}

.md-overlay[hidden] {
    display: none;
}

.md-card {
    background: #fff;
    border-radius: 14px;
    width: 560px;
    max-width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.md-header {
    background: #1F4A33;
    padding: 22px 26px;
    position: relative;
    color: #fff;
}

.md-header h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    padding-right: 40px;
}

.md-header p {
    margin: 0;
    font-size: 12.5px;
    opacity: 0.85;
}

.md-close {
    position: absolute;
    right: 18px;
    top: 18px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
}

.md-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.md-body {
    padding: 22px 26px;
    max-height: 60vh;
    overflow-y: auto;
}

.md-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.md-field {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
}

.md-field label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #1F4A33;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.md-field span,
.md-field a {
    font-size: 13px;
    color: #333;
}

.md-field a {
    color: #1F4A33;
    font-weight: 700;
    text-decoration: none;
}

.md-field a:hover {
    text-decoration: underline;
}

.md-field.full {
    grid-column: 1 / -1;
}

.md-footer {
    padding: 16px 26px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #f0f0f0;
}

.md-btn {
    background: #1F4A33;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.md-btn:hover {
    background: #17392A;
}



/* ── Responsive ── */
@media (max-width: 992px) {
    .sf-row {
        grid-template-columns: 1fr 1fr;
    }

    .rt-table thead {
        display: none;
    }

    .rt-table,
    .rt-table tbody,
    .rt-table tr,
    .rt-table td {
        display: block;
        width: 100%;
    }

    .rt-table tr {
        padding: 14px 24px;
        border-bottom: 1px solid #eee;
    }

    .rt-table td {
        border-bottom: none;
        padding: 4px 0;
    }

    .rt-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .rt-pager {
        justify-content: center;
    }


}


@media (max-width: 767px) {
    .sf-row {
        grid-template-columns: 1fr;
    }

    .sf-order {
        max-width: 100%;
        width: 100%;
    }

    .sf-actions {
        justify-content: space-between;
    }

    .sf-bottom {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 576px) {
    .md-row {
        grid-template-columns: 1fr;
    }
}

/* BEGIN CDM_SUJETOS_CONTROL_READABILITY */

/* =========================================================
   SUJETOS DE CONTROL - LEGIBILIDAD
   Encapsulado exclusivamente en los bloques sf/rt/md.
   No altera colores, banner ni estructura editorial.
========================================================= */

.sf-wrap .sf-title {
    font-size: clamp(1.05rem, 1.25vw, 1.2rem);
    line-height: 1.3;
}

.sf-wrap .sf-subtitle {
    font-size: clamp(0.86rem, 0.95vw, 0.94rem);
    line-height: 1.5;
}

.sf-wrap .sf-field label {
    font-size: clamp(0.79rem, 0.9vw, 0.86rem);
    line-height: 1.35;
}

.sf-wrap .sf-input,
.sf-wrap .sf-select {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: clamp(0.86rem, 0.95vw, 0.94rem);
    line-height: 1.35;
}

.sf-wrap .sf-search-input {
    min-height: 44px;
}

.sf-wrap .sf-search-input input {
    width: 100%;
    font-size: clamp(0.86rem, 0.95vw, 0.94rem);
    line-height: 1.35;
}

.sf-wrap .sf-clear {
    min-height: 40px;
    font-size: clamp(0.86rem, 0.95vw, 0.94rem);
}

.sf-wrap .sf-btn {
    min-height: 44px;
    padding: 11px 22px;
    font-size: clamp(0.88rem, 1vw, 0.96rem);
}

.rt-wrap .rt-title {
    font-size: clamp(0.98rem, 1.1vw, 1.06rem);
    line-height: 1.35;
}

.rt-wrap .rt-sub {
    font-size: clamp(0.86rem, 0.95vw, 0.94rem);
    line-height: 1.45;
}

.rt-wrap .rt-download {
    min-height: 42px;
    font-size: clamp(0.84rem, 0.95vw, 0.92rem);
}

.rt-wrap .rt-table thead th {
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: clamp(0.75rem, 0.84vw, 0.81rem);
    line-height: 1.35;
}

.rt-wrap .rt-table tbody td {
    font-size: clamp(0.86rem, 0.95vw, 0.94rem);
    line-height: 1.45;
}

.rt-wrap .rt-name {
    font-size: clamp(0.9rem, 1vw, 0.98rem);
    line-height: 1.35;
}

.rt-wrap .rt-nit {
    font-size: clamp(0.76rem, 0.84vw, 0.82rem);
    line-height: 1.35;
}

.rt-wrap .rt-link {
    font-size: clamp(0.84rem, 0.92vw, 0.9rem);
    overflow-wrap: anywhere;
}

.rt-wrap .rt-action {
    min-height: 40px;
    font-size: clamp(0.8rem, 0.9vw, 0.88rem);
}

.rt-wrap .rt-pager button,
.rt-wrap .rt-pager .dots,
.rt-wrap .rt-count,
.rt-wrap .rt-perpage {
    font-size: clamp(0.8rem, 0.9vw, 0.88rem);
}

.rt-wrap .rt-perpage {
    min-height: 40px;
}

.rt-wrap .rt-info {
    font-size: clamp(0.84rem, 0.93vw, 0.91rem);
    line-height: 1.55;
}

.rt-wrap .rt-empty {
    padding: 28px 24px !important;
    color: #555;
    font-size: clamp(0.9rem, 1vw, 0.98rem) !important;
    line-height: 1.55;
    text-align: center;
}

.md-overlay .md-header h3 {
    font-size: clamp(1.12rem, 1.3vw, 1.25rem);
}

.md-overlay .md-header p {
    font-size: clamp(0.84rem, 0.92vw, 0.9rem);
}

.md-overlay .md-field label {
    font-size: clamp(0.75rem, 0.84vw, 0.82rem);
}

.md-overlay .md-field span,
.md-overlay .md-field a,
.md-overlay .md-btn {
    font-size: clamp(0.86rem, 0.95vw, 0.94rem);
}

.sf-wrap :focus-visible,
.rt-wrap :focus-visible,
.md-overlay :focus-visible {
    outline: 3px solid #8bd936;
    outline-offset: 3px;
}

@media (max-width: 992px) {
    .sf-wrap .sf-input,
    .sf-wrap .sf-select,
    .sf-wrap .sf-search-input input {
        font-size: 0.94rem;
    }

    .rt-wrap .rt-table tbody td {
        font-size: 0.92rem;
    }
}

@media (max-width: 767px) {
    .sf-wrap .sf-actions {
        gap: 12px;
    }

    .sf-wrap .sf-btn,
    .sf-wrap .sf-clear {
        min-height: 44px;
    }

    .rt-wrap .rt-head,
    .rt-wrap .rt-foot {
        padding-right: 18px;
        padding-left: 18px;
    }

    .rt-wrap .container-tabla {
        margin-right: 18px;
        margin-left: 18px;
    }
}

/* END CDM_SUJETOS_CONTROL_READABILITY */
