/* ─── CONTENEDOR ─── */
.franquicias-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ─── VER TODAS ─── */
.ver-todas-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.ver-todas-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--blue-800);
    margin: 0;
}

.btn-ver-todas {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--surface);
    transition: all 0.2s;
}

.btn-ver-todas:hover {
    background: var(--blue-50);
    border-color: rgba(37, 99, 235, 0.3);
    color: var(--blue-600);
    text-decoration: none;
}

.btn-ver-todas.active {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-ver-todas.active:hover {
    color: white;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* ─── FRANQUICIA CARD ─── */
.franquicia-card {
    background: linear-gradient(135deg, var(--blue-900) 0%, #071830 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
    animation: zonaIn 0.35s ease both;
}

.franquicia-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(96, 165, 250, 0.4),
        transparent
    );
}

/* Estado activo/seleccionado */
.franquicia-card.selected {
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.2),
        0 8px 28px rgba(37, 99, 235, 0.2);
}

.franquicia-card.selected::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(96, 165, 250, 0.8),
        transparent
    );
}

.franquicia-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.2);
    border-color: rgba(96, 165, 250, 0.4);
}

.franquicia-card-body {
    padding: 16px 18px;
    position: relative;
    z-index: 1;
}

/* ─── HEADER ─── */
.franquicia-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}

.franquicia-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

/* Botón ojo */
.btn-ver {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-ver:hover {
    background: rgba(37, 99, 235, 0.3);
    border-color: rgba(96, 165, 250, 0.5);
    color: var(--blue-400);
    text-decoration: none;
}

/* Ojo activo */
.franquicia-card.selected .btn-ver {
    background: var(--blue-600);
    border-color: var(--blue-600);
    color: white;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

/* ─── KPI ROW ─── */
.franquicia-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.franquicia-kpi {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;
    padding: 8px 6px;
    text-align: center;
    transition: background 0.2s;
}

.franquicia-card:hover .franquicia-kpi,
.franquicia-card.selected .franquicia-kpi {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

.franquicia-kpi-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.38);
    margin-bottom: 3px;
}

.franquicia-kpi-value {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.franquicia-kpi-value.success {
    color: #34d399;
}
.franquicia-kpi-value.danger {
    color: #f87171;
}

/* ─── ACORDEÓN ─── */
.franquicia-extra {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.franquicia-extra-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 5px;
}

.franquicia-extra-item:last-child {
    margin-bottom: 0;
}

.franquicia-extra-item i {
    font-size: 13px;
    color: var(--blue-400);
    opacity: 0.7;
    width: 14px;
    text-align: center;
}

/* ─── ANIMACIÓN ─── */
@keyframes zonaIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.franquicia-card:nth-child(1) {
    animation-delay: 0ms;
}
.franquicia-card:nth-child(2) {
    animation-delay: 60ms;
}
.franquicia-card:nth-child(3) {
    animation-delay: 120ms;
}
.franquicia-card:nth-child(4) {
    animation-delay: 180ms;
}
.franquicia-card:nth-child(5) {
    animation-delay: 240ms;
}
.franquicia-card:nth-child(6) {
    animation-delay: 300ms;
}
.franquicia-card:nth-child(7) {
    animation-delay: 360ms;
}
.franquicia-card:nth-child(8) {
    animation-delay: 420ms;
}
