/**
 * Conecty - Estilo Guía de Marca
 * Colores: #252726 (oscuro), #99F602 (verde), #BBFF05 (verde lima), #FFF800 (amarillo), #A6A6A6 (gris), #EAEAEA (gris claro)
 * Tipografía secundaria: Titillium Web
 * .conecty-card: contenedor genérico reutilizable en toda el área de clientes (servicios, dashboard, etc.)
 */

.conecty-card,
.conecty-dashboard-block {
    --conecty-card-radius: 14px;
    --conecty-card-shadow: 0 2px 12px rgba(37, 39, 38, 0.06);
    background: #fff;
    border-radius: var(--conecty-card-radius);
    box-shadow: var(--conecty-card-shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: none;
    overflow: visible;
}

.conecty-dashboard-block {
    font-family: 'Titillium Web', 'Open Sans', sans-serif;
}

.conecty-dashboard-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.conecty-dashboard-block__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #252726;
    margin: 0;
    letter-spacing: 0.02em;
}

.conecty-dashboard-block__config {
    color: #A6A6A6;
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s;
}

.conecty-dashboard-block__config:hover {
    color: #252726;
}

.conecty-dashboard-block__body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

@media (min-width: 992px) {
    .conecty-dashboard-block__body {
        flex-direction: row;
        align-items: stretch;
        gap: 32px;
        min-height: 320px;
        overflow: visible;
    }
    .conecty-dashboard-block__donut {
        flex: 6 1 0;
        min-width: 0;
        max-width: 65%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 28px;
        padding: 20px 0 40px 0;
    }
    .conecty-dashboard-block__indicators {
        flex: 4 1 0;
        min-width: 0;
        max-width: 35%;
        display: flex;
        align-items: stretch;
    }
    .conecty-dashboard-block__indicators-grid {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .conecty-dashboard-block__indicators-grid .conecty-tile {
        flex: 1;
        min-height: 80px;
        display: flex;
    }
    .conecty-dashboard-block__indicators-grid .conecty-tile a {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
}

.conecty-dashboard-block__donut {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
}

/* Dona con Chart.js: wrapper + texto central superpuesto. overflow: visible para que el tooltip no se corte */
.conecty-donut-chart-link {
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: visible;
}
.conecty-donut-chart-wrap {
    position: relative;
    width: 280px;
    height: 280px;
    flex-shrink: 0;
    overflow: visible;
}
.conecty-donut-chart-wrap canvas {
    display: block;
    width: 280px !important;
    height: 280px !important;
}
.conecty-donut-chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}
.conecty-donut-chart-center .conecty-donut__label {
    font-size: 1rem;
}
.conecty-donut-chart-center .conecty-donut__value {
    font-size: 3rem;
}
.conecty-donut-chart-link:hover .conecty-donut__value,
.conecty-donut-chart-link:hover .conecty-donut__label {
    color: #99F602;
}

/* Grid de indicadores: uno arriba del otro para ganar espacio para dona y leyenda */
.conecty-dashboard-block__indicators-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 992px) {
    .conecty-dashboard-block__indicators-grid {
        gap: 12px;
    }
}

/* Tiles de indicadores: mismo borde suave que el bloque y los paneles */
.conecty-dashboard-block .conecty-tile {
    position: relative;
    padding: 16px 20px;
    background-color: #fff;
    border-radius: var(--conecty-card-radius, 14px);
    border: none;
    box-shadow: var(--conecty-card-shadow, 0 2px 12px rgba(37, 39, 38, 0.06));
    transition: box-shadow 0.2s, background-color 0.2s;
}
.conecty-dashboard-block .conecty-tile:hover {
    background-color: #fafafa;
    box-shadow: 0 4px 14px rgba(37, 39, 38, 0.08);
}

.conecty-tile a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.conecty-tile__icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 28px;
    line-height: 1;
    color: #A6A6A6;
}

.conecty-tile__stat {
    margin-top: 16px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #252726;
}

.conecty-tile__title {
    font-weight: 600;
    color: #A6A6A6;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.03em;
    margin-top: 4px;
}

.conecty-tile__highlight {
    margin-top: 6px;
    height: 3px;
    border-radius: 2px;
    width: 100%;
}

/* Compatibilidad con clases antiguas del resumen solo-donut (bordes suavizados) */
.conecty-services-summary {
    font-family: 'Titillium Web', 'Open Sans', sans-serif;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(37, 39, 38, 0.06);
    padding: 24px;
    margin-bottom: 24px;
    border: none;
}

.conecty-services-summary__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.conecty-services-summary__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #252726;
    margin: 0;
    letter-spacing: 0.02em;
}

.conecty-services-summary__config {
    color: #A6A6A6;
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s;
}

.conecty-services-summary__config:hover {
    color: #252726;
}

.conecty-services-summary__chart-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
}

/* Donut chart - Conecty green / gris */
.conecty-donut {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    /* Mismo azul que la línea del tile Servicios activos (bg-color-blue #5bc0de) */
    background: conic-gradient(#5bc0de 0deg 360deg);
}

.conecty-donut::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 58%;
    height: 58%;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 0 0 2px #EAEAEA;
}

.conecty-donut__center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
}

.conecty-donut__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #A6A6A6;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

.conecty-donut__value {
    display: block;
    font-size: 2.25rem;
    font-weight: 700;
    color: #252726;
    line-height: 1.1;
}

/* Dona tipo referencia: SVG con segmentos y % en el anillo */
.conecty-donut-wrap {
    display: block;
    text-decoration: none;
    color: inherit;
}

.conecty-donut-svg {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.conecty-donut-svg .conecty-donut-center-label {
    font-family: 'Titillium Web', 'Open Sans', sans-serif;
}

.conecty-donut-svg .conecty-donut-center-value {
    font-family: 'Titillium Web', 'Open Sans', sans-serif;
}

.conecty-donut-svg .conecty-donut-segment-pct {
    font-family: 'Titillium Web', 'Open Sans', sans-serif;
}

/* Tabla leyenda (estilo referencia: columnas Servicios, %, Estado) - texto más grande */
.conecty-legend-table-wrap {
    min-width: 0;
}

.conecty-legend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.05rem;
    color: #252726;
}

.conecty-legend-table thead th {
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
    color: #A6A6A6;
    padding: 8px 12px 8px 0;
    border-bottom: 1px solid #EAEAEA;
}

.conecty-legend-table tbody td {
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.conecty-legend-table__th-dot,
.conecty-legend-table__dot {
    width: 28px;
    padding-right: 10px;
}

.conecty-legend-table__th-servicios,
.conecty-legend-table__count {
    padding-right: 14px;
    font-weight: 600;
    font-size: 1.15rem;
}

.conecty-legend-table__th-pct,
.conecty-legend-table__pct {
    padding-right: 14px;
    font-size: 1.2rem;
    font-weight: 600;
}
.conecty-legend-table__pct {
    display: flex;
    align-items: center;
    gap: 6px;
}
.conecty-legend-table__pct .conecty-legend-item__dot {
    flex-shrink: 0;
}

.conecty-legend-table__th-estado,
.conecty-legend-table__label {
    color: #252726;
    font-size: 1.05rem;
}
.conecty-legend-table__label {
    font-weight: 500;
}
.conecty-legend-table .conecty-legend-item__dot {
    width: 14px;
    height: 14px;
}

.conecty-donut-link:hover .conecty-donut-center-value {
    fill: #5bc0de;
}

.conecty-services-summary__legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conecty-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #252726;
}

.conecty-legend-item__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.conecty-legend-item__dot--active {
    background: #5bc0de;
}

.conecty-legend-item__dot--inactive {
    background: #A6A6A6;
}

.conecty-services-summary a {
    text-decoration: none;
    color: inherit;
}

.conecty-services-summary a:hover .conecty-donut__value,
.conecty-services-summary a:hover .conecty-donut__label {
    color: #5bc0de;
}

.conecty-dashboard-block a:hover .conecty-donut__value,
.conecty-dashboard-block a:hover .conecty-donut__label {
    color: #5bc0de;
}

@media (max-width: 767px) {
    .conecty-dashboard-block {
        padding: 12px;
    }
    .conecty-donut {
        width: 160px;
        height: 160px;
    }
    .conecty-donut-svg {
        width: 160px;
        height: 160px;
    }
    .conecty-donut__value {
        font-size: 1.75rem;
    }
}

/* Paneles inferiores del home: mismo borde suave que el bloque y los tiles */
.client-home-panels .panel {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(37, 39, 38, 0.06);
}
.client-home-panels .panel > .panel-heading {
    border-radius: 14px 14px 0 0;
}
.client-home-panels .panel > .panel-body:last-child,
.client-home-panels .panel > .list-group:last-child,
.client-home-panels .panel > .panel-footer:last-child {
    border-radius: 0 0 14px 14px;
}

/* Llamadores a la acción (reemplazo de client-home-panels) */
.conecty-cta-block {
    margin-top: 8px;
    margin-bottom: 32px;
}
.conecty-cta-block .row {
    margin-left: -12px;
    margin-right: -12px;
}
.conecty-cta-block [class*="col-"] {
    padding-left: 12px;
    padding-right: 12px;
    margin-bottom: 24px;
}
@media (min-width: 992px) {
    .conecty-cta-block [class*="col-"] {
        margin-bottom: 0;
    }
}

.conecty-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 28px 24px;
    min-height: 200px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(37, 39, 38, 0.06);
    border: none;
    text-decoration: none;
    color: #252726;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.conecty-cta:hover {
    color: #252726;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(37, 39, 38, 0.1);
    transform: translateY(-2px);
}

.conecty-cta__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.conecty-cta--sim .conecty-cta__icon {
    background: rgba(153, 246, 2, 0.2);
    color: #99F602;
}
.conecty-cta--contact .conecty-cta__icon {
    background: rgba(37, 211, 102, 0.2);
    color: #25d366;
}

.conecty-cta__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #252726;
    margin: 0 0 8px 0;
    letter-spacing: 0.02em;
}
.conecty-cta__text {
    font-size: 1rem;
    color: #5d6d7e;
    line-height: 1.45;
    margin: 0 0 auto 0;
    flex: 1;
}
.conecty-cta__action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #252726;
    margin-top: 16px;
}
.conecty-cta__action i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}
.conecty-cta:hover .conecty-cta__action i {
    transform: translateX(4px);
}
.conecty-cta--sim:hover .conecty-cta__action {
    color: #99F602;
}
.conecty-cta--contact:hover .conecty-cta__action {
    color: #25d366;
}

/* --- Abrir Ticket (submit ticket step one) --- */
.conecty-card-submitticket {
    font-family: 'Titillium Web', 'Open Sans', sans-serif;
}
.submit-ticket-intro {
    text-align: center;
    color: #5d6d7e;
    font-size: 1.125rem;
    line-height: 1.55;
    margin: 0 0 28px 0;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.submit-ticket-departments {
    margin-left: -12px;
    margin-right: -12px;
}
.submit-ticket-dept-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    margin: 0 12px 24px 12px;
    border: 1px solid #EAEAEA;
    border-radius: 12px;
    background: #fafafa;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.submit-ticket-dept-card:hover {
    border-color: #99F602;
    box-shadow: 0 4px 16px rgba(37, 39, 38, 0.08);
    background: #fff;
    color: inherit;
}
.submit-ticket-dept-card__icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(153, 246, 2, 0.2);
    color: #99F602;
    border-radius: 10px;
    font-size: 1.35rem;
    margin-bottom: 16px;
}
.submit-ticket-dept-card__name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #252726;
    margin: 0 0 8px 0;
    letter-spacing: 0.02em;
}
.submit-ticket-dept-card__desc {
    font-size: 1.1rem;
    color: #5d6d7e;
    line-height: 1.5;
    margin: 0 0 16px 0;
    flex: 1;
}
.submit-ticket-dept-card__action {
    font-size: 1.05rem;
    font-weight: 600;
    color: #252726;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.submit-ticket-dept-card__action i {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}
.submit-ticket-dept-card:hover .submit-ticket-dept-card__action i {
    transform: translateX(4px);
}
.submit-ticket-dept-card:hover .submit-ticket-dept-card__action {
    color: #99F602;
}
@media (max-width: 767px) {
    .conecty-card-submitticket {
        padding: 16px;
    }
    .submit-ticket-departments {
        margin-left: 0;
        margin-right: 0;
    }
    .submit-ticket-dept-card {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 16px;
        padding: 20px;
    }
}
