﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

body, html {
    background: #f7f8fb !important;
    font-family: 'Inter', system-ui, Arial, sans-serif;
    color: #253350;
}

/* Container and Cards */
.crm-container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
}

.crm-title {
    font-size: 2.1rem;
    font-weight: 250;
    letter-spacing: -0.06em;
    color: #172849;
}

.crm-card {
    flex: 1 1 auto;
    max-width: 1200px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e8eef6;
}

.crm-header {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.crm-label {
    margin: 4px 0 0px 0;
    font-weight: 100;
    font-size: .9rem;
}

.crm-label, .crm-card-title, .crm-card-label {
    font-weight: 100;
}

.crm-card-title {
    font-size: 1.03em;
    color: #194484;
    word-break: break-word;
    font-weight: 100 !important; /* menos grueso */
}

.crm-card-label {
    font-size: 1em;
    color: #315686;
    font-weight: 100;
}

/* Buscador */
.crm-row, .crm-form-row, .crm-grid {
    display: flex;
    align-items: flex-end;
    gap: 18px;
}

.crm-form-row {
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 17px;
}

.crm-col-8 {
    flex: 4 4 0;
    min-width: 220px;
    display: flex;
    flex-direction: column;
}

.crm-search-group {

    min-width: 220px;
    width: 100%;
    position: relative;
    display: grid;
    flex-direction: column;
}

.crm-label {
    margin: 4px 0 0px 0;
    font-weight: 100;
    font-size: .9rem;
    padding-bottom:15px;
}

.crm-search-horizontal {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
}

.crm-input {
    font-size: 1rem;
    border-radius: 10px;
    border: 2px solid #e7eaf0;
    background: #f7f9fd !important;
    color: #253350;
    padding: 11px 13px;
    margin-bottom: 4px;
    outline: none;
    width: 100%;
    min-width: 160px;
    max-width: 100%;
    box-sizing: border-box;
}

    .crm-input:focus {
        outline: 2px solid #6a4e7a;
        outline-offset: 2px;
    }


.crm-list-suggest {
    background: #fff;
    border-radius: 8px;
    padding: 3px 2px;
    margin-top: 2px !important;
    box-shadow: 0 3px 14px #e4e4f4a6;
    font-size: 0.98rem;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 30;
    top: calc(100% + 2px);
    min-width: 130px;
    max-width: 100%;
}

.crm-list-item {
    font-size: 0.96em;
    font-weight: 500;
    border-radius: 8px;
    padding: 10px 13px;
    transition: background .13s;
    margin: 2px 0;
}

    .crm-list-item:hover {
        background: #dbeafe !important;
        color: #2979e6;
    }

.crm-col-4 {
    flex: 1 1 0;
}

.crm-btn-group {
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
}

.crm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border-radius: 3px;
    border: 1px solid #e3e6e8;
    background: #fff;
    color: var(--se-text);
    padding: .5rem .7rem;
    font-weight: 100;
    text-decoration: none;
    cursor: pointer;
    font-size: .9rem;
    line-height: 1.1;
}

    .crm-btn:hover {
        filter: brightness(0.98);
    }


.crm-btn.crm-btn-primary {
    margin-top: 0px;
    font-size: 1.03rem;
    /* font-weight: 550; */
    /* background: #f1f5f9; */
    color: #2b3b4a;
    border-radius: 50%;
    border-width: 2px;
    /* padding: 8px 0; */
    /* min-width: 110px; */
    /* width: 30%; */
    /* max-width: 125px; */
    /* align-self: stretch; */
    /* font-size: 1.04rem; */
    width: 48px;
    height: 48px;
}

.crm-btn-primary:hover {
    background: #F4EDFC;
    border: 2px solid #6a4e7a;
}

.crm-btn-ghost {
    background: #fff;
    color: var(--se-muted);
}

.crm-btn-link {
    background: transparent;
    border: 0;
    color: var(--se-link);
    padding: 0;
}

    .crm-btn-link:hover {
        color: var(--se-link-hover);
        text-decoration: underline;
    }

.condiciones-paginacion{
    flex: 1 1 auto;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-left: 5px;
    max-width: 1200px;
}

.condiciones-cards {
    flex: 1 1 auto;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-left: 5px;
    max-width: 1200px;
}



/* Cards Grid */
.crm-card-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 22px;
    margin-bottom: 12px;
    width: 100%;
}

.crm-card-condicion {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

.crm-card-inner {
    background: #fff !important;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgb(180 193 239 / 10%);
    border: none;
    padding: 1.2rem 0.8rem 1.0rem 0.8rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.crm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
}

.crm-card-title {
    font-size: .9em;
}

.crm-btn.crm-btn-delete {
    background: #f3f5f8 !important;
    border-radius: 9px !important;
    padding: 4px 10px !important;
    margin-left: 7px;
    color: #e7042a !important;
    border: none !important;
    font-size: 1em;
    transition: background .12s, box-shadow .09s;
    box-shadow: none;
    font-weight:100;
}

    .crm-btn.crm-btn-delete:hover {
        background: #ffeaea !important;
    }

/* Fechas/inputs/badges */
.crm-card-group {
    font-size: 0.98em;
    color: #315686;
    font-weight: 100;
    padding-bottom:10px;
    margin-bottom: 7px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2em;
    align-items: center;
    
}

.crm-card-value {
    margin-left: 7px;
    font-weight: 100;
    color: #146996;
}

.crm-card-fecha {
    margin-bottom: 7px;
}

.crm-input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 7px;
}

.crm-input-label {
    background: #eceffd !important;
    border-radius: 7px;
    font-size: 0.98em;
    
    color: #374159;
    padding: 5px 13px;
    border: none;
    margin-right: 5px;
}

.crm-input-date {
    font-size: 0.96em;
    border-radius: 8px;
    border: 2px solid #e2e6ef;
    background: #f9fbfd !important;
    color: #24315a;
    padding: 7px 9px;
    margin-bottom: 4px;
    outline: none;
    box-shadow: none;
}

.crm-btn.crm-btn-secondary {
    font-size: .80rem;
    line-height: 1.35;
    color: #9C5EE5;
    word-wrap: break-word;
    border:none;

}

.crm-btn.crm-btn-success {
    font-size: .80rem;
    line-height: 1.35;
    color: #9C5EE5;
    word-wrap: break-word;
    border: none;
}

.crm-btn.crm-btn-cancel {
    font-size: .80rem;
    line-height: 1.35;
    color: #9C5EE5;
    word-wrap: break-word;
    border: none;
    ;
}

.crm-card-badges {
    margin-top: 14px;
    margin-bottom: 2px;
}

.crm-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 6px;
}

.crm-badge {
    font-size: 0.9em;
    font-weight: 100;
    border-radius: 8px;
    background: #ebeff7 !important;
    color: #2f4277 !important;
    padding: 7px 11px !important;
    word-break: break-word;
    white-space: normal;
    box-shadow: 0 1px 4px 0 #e3eaea3a;
}

    .crm-badge.crm-badge-count {
        background: #f4edfc !important;
        color: #6a4e7a !important;
        font-weight: 100;
        margin-left: 0px;
        padding: 7px 13px !important;
        box-shadow: 0 0 0 2px #6a4e7a;
    }

.crm-empty {
    font-size: 1em;
    color: #a0a5af !important;
    padding: 11px 0 11px 0;
}

/* Grid for 3 columns */
@media (min-width: 900px) {
    .crm-card-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1350px) {
    .crm-container {
        max-width: 98vw;
    }

    .crm-card-row {
        gap: 15px;
    }
}

@media (max-width: 950px) {
    .crm-card-row {
        gap: 10px;
    }

    .crm-title {
        font-size: 1.32rem;
    }

    .crm-input, .crm-btn.crm-btn-primary {
        font-size: 0.97em;
    }
}

@media (max-width: 750px) {
    .crm-card-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .crm-container, .crm-row, .crm-form-row, .crm-card, .crm-header-block {
        padding-left: 3px;
        padding-right: 3px;
    }

    .crm-card-inner {
        padding: 0.7rem 0.4rem 0.6rem 0.4rem;
    }
}


/* Quitar color azul de los links activos en el sidebar */
/* Si usas Bootstrap nav-pills, sobrescribe así: */

.sidebar-menu .nav-link.active,
.sidebar-menu .nav-link.active:focus,
.sidebar-menu .nav-link.active:hover {
    background: transparent !important;
    color: #253350 !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

    /* Solo el icono morado en el link activo del sidebar */
    .sidebar-menu .nav-link.active i {
        color: #7522ca !important;
    }

    /* Opcional: si usas ms-4, sobrescribe también: */
    .sidebar-menu .nav-link.active.ms-4,
    .sidebar-menu .nav-link.active.ms-4:focus,
    .sidebar-menu .nav-link.active.ms-4:hover {
        background: transparent !important;
        color: #253350 !important;
        border-color: transparent !important;
        box-shadow: none !important;
    }

        .sidebar-menu .nav-link.active.ms-4 i {
            color: #7522ca !important;
        }